Skip to content

Commit

Permalink
feat: Add delete to runs and builds (#428)
Browse files Browse the repository at this point in the history
  • Loading branch information
superman030129-p committed Oct 10, 2023
1 parent 13bfe82 commit 9831d85
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/resource_clients/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,13 @@ export class BuildClient extends ResourceClient {
return cast(parseDateFields(pluckData(response.data)));
}

/**
* https://docs.apify.com/api/v2#/reference/actor-builds/delete-build/delete-build
*/
async delete(): Promise<void> {
return this._delete();
}

/**
* Returns a promise that resolves with the finished Build object when the provided actor build finishes
* or with the unfinished Build object when the `waitSecs` timeout lapses. The promise is NOT rejected
Expand Down
7 changes: 7 additions & 0 deletions src/resource_clients/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,13 @@ export class RunClient extends ResourceClient {
return cast(parseDateFields(pluckData(response.data)));
}

/**
* https://docs.apify.com/api/v2#/reference/actor-runs/delete-run/delete-run
*/
async delete(): Promise<void> {
return this._delete();
}

/**
* https://docs.apify.com/api/v2#/reference/actor-runs/metamorph-run/metamorph-run
*/
Expand Down

0 comments on commit 9831d85

Please sign in to comment.