Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add delete to runs and builds #428

Merged
merged 2 commits into from Oct 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/resource_clients/build.ts
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
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