Skip to content

Commit a399663

Browse files
authored
feat: Add delete to runs and builds (#428)
resolves: apify/apify-core#12462 docs: apify/apify-docs#727
1 parent 44ced4d commit a399663

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

src/resource_clients/build.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,13 @@ export class BuildClient extends ResourceClient {
4343
return cast(parseDateFields(pluckData(response.data)));
4444
}
4545

46+
/**
47+
* https://docs.apify.com/api/v2#/reference/actor-builds/delete-build/delete-build
48+
*/
49+
async delete(): Promise<void> {
50+
return this._delete();
51+
}
52+
4653
/**
4754
* Returns a promise that resolves with the finished Build object when the provided actor build finishes
4855
* or with the unfinished Build object when the `waitSecs` timeout lapses. The promise is NOT rejected

src/resource_clients/run.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,13 @@ export class RunClient extends ResourceClient {
5252
return cast(parseDateFields(pluckData(response.data)));
5353
}
5454

55+
/**
56+
* https://docs.apify.com/api/v2#/reference/actor-runs/delete-run/delete-run
57+
*/
58+
async delete(): Promise<void> {
59+
return this._delete();
60+
}
61+
5562
/**
5663
* https://docs.apify.com/api/v2#/reference/actor-runs/metamorph-run/metamorph-run
5764
*/

0 commit comments

Comments
 (0)