@binalyze/air-sdk 5.4.2 → 5.5.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.
@@ -122,4 +122,29 @@ export interface ITasksAPI {
122
122
  get: (options: IGetTaskOptions) => Promise<Task>;
123
123
  getMany: (options?: IGetTasksOptions) => Promise<ITasksPage>;
124
124
  getAssignments: (options: IGetTaskAssignmentsOptions) => Promise<ITaskAssignmentsPage>;
125
+ waitForCompletion: (options: IWaitForCompletionOptions) => Promise<IWaitForCompletionResult>;
126
+ }
127
+ export interface IWaitForCompletionOptions {
128
+ taskId: string;
129
+ /**
130
+ * Timeout in seconds. If 0 or undefined, waits indefinitely.
131
+ */
132
+ timeoutSeconds?: number;
133
+ /**
134
+ * Poll interval in milliseconds. If not provided, defaults to 300000 when waiting indefinitely,
135
+ * otherwise 60000.
136
+ */
137
+ pollIntervalMs?: number;
138
+ }
139
+ export type WaitForCompletionStatus = 'completed' | 'cancelled' | 'failed' | 'timeout';
140
+ export interface IWaitForCompletionResult {
141
+ taskId: string;
142
+ status: WaitForCompletionStatus;
143
+ message: string;
144
+ taskStatus?: string;
145
+ taskType?: string;
146
+ organizationId?: number;
147
+ createdAt?: string;
148
+ updatedAt?: string;
149
+ error?: string;
125
150
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@binalyze/air-sdk",
3
- "version": "5.4.2",
3
+ "version": "5.5.0",
4
4
  "private": false,
5
5
  "description": "Binalyze AIR - Typescript Axios SDK",
6
6
  "license": "MIT",