@narrative.io/data-collaboration-sdk-ts 2.28.0 → 2.29.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -22,5 +22,10 @@ declare class JobsApi extends BaseApi {
22
22
  * @returns {Promise<Job>} - Promise resolving with the job.
23
23
  */
24
24
  getJob(jobId: string): Promise<Job>;
25
+ /**
26
+ * Cancel a job by id
27
+ * @returns {Promise<void>} - Promise resolving with void.
28
+ */
29
+ cancelJob(jobId: string): Promise<void>;
25
30
  }
26
31
  export { type Job, type ExplainInput, type MaterializedViewInput, type ExplainOutput, type MaterializedViewOutput, JobsApi, type GetJobsParameters, };
@@ -21,5 +21,12 @@ class JobsApi extends BaseApi {
21
21
  async getJob(jobId) {
22
22
  return await this.get(`${resourceName}/${jobId}`);
23
23
  }
24
+ /**
25
+ * Cancel a job by id
26
+ * @returns {Promise<void>} - Promise resolving with void.
27
+ */
28
+ async cancelJob(jobId) {
29
+ await this.post(`${resourceName}/${jobId}/request-cancellation`);
30
+ }
24
31
  }
25
32
  export { JobsApi, };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@narrative.io/data-collaboration-sdk-ts",
3
- "version": "2.28.0",
3
+ "version": "2.29.0",
4
4
  "main": "build/index.js",
5
5
  "repository": "github:narrative-io/data-collaboration-sdk-ts",
6
6
  "source": "src/index.ts",