@qlik/api 1.31.0 → 1.33.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.
Files changed (142) hide show
  1. package/api-keys.d.ts +10 -10
  2. package/api-keys.js +64 -50
  3. package/apps.d.ts +56 -56
  4. package/apps.js +392 -304
  5. package/assistants.d.ts +1301 -0
  6. package/assistants.js +329 -0
  7. package/audits.d.ts +10 -10
  8. package/audits.js +48 -36
  9. package/{auth-types-DqfMuSRX.d.ts → auth-types-Cj5bM3Yk.d.ts} +29 -9
  10. package/auth.d.ts +17 -4
  11. package/auth.js +4 -2
  12. package/automation-connections.d.ts +366 -0
  13. package/automation-connections.js +107 -0
  14. package/automations.d.ts +27 -27
  15. package/automations.js +159 -123
  16. package/automl-deployments.d.ts +97 -0
  17. package/automl-deployments.js +29 -0
  18. package/automl-predictions.d.ts +214 -0
  19. package/automl-predictions.js +84 -0
  20. package/brands.d.ts +18 -18
  21. package/brands.js +107 -83
  22. package/chunks/{KBSD75QL.js → 33GQY7N7.js} +1 -1
  23. package/chunks/{M64RLKVG.js → 62DXIH3S.js} +7 -5
  24. package/chunks/7MMXU6EL.js +86 -0
  25. package/chunks/{DLKLPD7T.js → GPRUNZV4.js} +3 -3
  26. package/chunks/{YKZ2QYHN.js → LIEZG7IM.js} +3 -3
  27. package/chunks/{FKDGGR2O.js → OTIO4SEJ.js} +698 -708
  28. package/chunks/{UZTIZ4H5.js → RP3EJGHG.js} +74 -74
  29. package/chunks/{GUU3KZGK.js → SPATCXXU.js} +9 -2
  30. package/chunks/{LY7RP2HA.js → XF3TPZKZ.js} +23 -8
  31. package/chunks/{6ZONDHRN.js → YYZCS5PW.js} +11 -4
  32. package/chunks/{3RGGGGAR.js → ZCTVPXGO.js} +1 -1
  33. package/collections.d.ts +16 -15
  34. package/collections.js +98 -76
  35. package/conditions.d.ts +662 -0
  36. package/conditions.js +135 -0
  37. package/consumption.d.ts +182 -0
  38. package/consumption.js +26 -0
  39. package/csp-origins.d.ts +9 -9
  40. package/csp-origins.js +53 -41
  41. package/csrf-token.d.ts +62 -0
  42. package/csrf-token.js +25 -0
  43. package/data-alerts.d.ts +1004 -0
  44. package/data-alerts.js +187 -0
  45. package/data-assets.d.ts +8 -8
  46. package/data-assets.js +50 -40
  47. package/data-connections.d.ts +16 -16
  48. package/data-connections.js +87 -69
  49. package/data-credentials.d.ts +11 -11
  50. package/data-credentials.js +52 -42
  51. package/data-files.d.ts +18 -18
  52. package/data-files.js +107 -83
  53. package/data-qualities.d.ts +175 -0
  54. package/data-qualities.js +50 -0
  55. package/data-sets.d.ts +424 -0
  56. package/data-sets.js +87 -0
  57. package/data-sources.d.ts +268 -0
  58. package/data-sources.js +45 -0
  59. package/data-stores.d.ts +537 -0
  60. package/data-stores.js +128 -0
  61. package/dcaas.d.ts +192 -0
  62. package/dcaas.js +45 -0
  63. package/di-projects.d.ts +673 -0
  64. package/di-projects.js +196 -0
  65. package/direct-access-agents.d.ts +328 -0
  66. package/direct-access-agents.js +108 -0
  67. package/encryption.d.ts +370 -0
  68. package/encryption.js +118 -0
  69. package/extensions.d.ts +11 -11
  70. package/extensions.js +61 -47
  71. package/glossaries.d.ts +33 -33
  72. package/glossaries.js +221 -173
  73. package/groups.d.ts +12 -12
  74. package/groups.js +72 -56
  75. package/identity-providers.d.ts +11 -11
  76. package/identity-providers.js +67 -51
  77. package/index.d.ts +113 -4
  78. package/index.js +626 -40
  79. package/interceptors.d.ts +9 -2
  80. package/interceptors.js +2 -2
  81. package/invoke-fetch-types-BYCD4pc9.d.ts +98 -0
  82. package/items.d.ts +14 -13
  83. package/items.js +71 -55
  84. package/knowledgebases.d.ts +890 -0
  85. package/knowledgebases.js +203 -0
  86. package/licenses.d.ts +14 -14
  87. package/licenses.js +76 -58
  88. package/lineage-graphs.d.ts +712 -0
  89. package/lineage-graphs.js +108 -0
  90. package/ml.d.ts +2676 -0
  91. package/ml.js +477 -0
  92. package/notes.d.ts +110 -0
  93. package/notes.js +35 -0
  94. package/notifications.d.ts +98 -0
  95. package/notifications.js +26 -0
  96. package/oauth-clients.d.ts +14 -14
  97. package/oauth-clients.js +96 -74
  98. package/oauth-tokens.d.ts +126 -0
  99. package/oauth-tokens.js +35 -0
  100. package/package.json +34 -6
  101. package/qix.d.ts +145 -4
  102. package/qix.js +2 -2
  103. package/questions.d.ts +364 -0
  104. package/questions.js +38 -0
  105. package/quotas.d.ts +6 -6
  106. package/quotas.js +20 -16
  107. package/reload-tasks.d.ts +8 -8
  108. package/reload-tasks.js +46 -36
  109. package/reloads.d.ts +7 -7
  110. package/reloads.js +36 -28
  111. package/report-templates.d.ts +287 -0
  112. package/report-templates.js +94 -0
  113. package/reports.d.ts +4 -4
  114. package/reports.js +20 -16
  115. package/roles.d.ts +8 -8
  116. package/roles.js +46 -36
  117. package/sharing-tasks.d.ts +952 -0
  118. package/sharing-tasks.js +125 -0
  119. package/spaces.d.ts +22 -22
  120. package/spaces.js +153 -119
  121. package/tasks.d.ts +564 -0
  122. package/tasks.js +126 -0
  123. package/temp-contents.d.ts +7 -7
  124. package/temp-contents.js +30 -24
  125. package/tenants.d.ts +8 -8
  126. package/tenants.js +57 -45
  127. package/themes.d.ts +11 -11
  128. package/themes.js +61 -47
  129. package/transports.d.ts +8 -8
  130. package/transports.js +49 -37
  131. package/ui-config.d.ts +274 -0
  132. package/ui-config.js +91 -0
  133. package/users.d.ts +15 -15
  134. package/users.js +81 -63
  135. package/web-integrations.d.ts +8 -8
  136. package/web-integrations.js +46 -36
  137. package/web-notifications.d.ts +9 -9
  138. package/web-notifications.js +53 -41
  139. package/webhooks.d.ts +14 -14
  140. package/webhooks.js +88 -68
  141. package/chunks/2ZQ3ZX7F.js +0 -33
  142. package/invoke-fetch-types-Cq7bjkqn.d.ts +0 -243
package/tasks.d.ts ADDED
@@ -0,0 +1,564 @@
1
+ import { A as ApiCallOptions } from './invoke-fetch-types-BYCD4pc9.js';
2
+ import './auth-types-Cj5bM3Yk.js';
3
+
4
+ type ErrorResponse = {
5
+ errors?: HttpResult[];
6
+ /** A way to trace the source of the error. */
7
+ traceId?: string;
8
+ };
9
+ /**
10
+ * Workflow CloudEvent definitions. Defines CloudEvents that can be consumed or produced
11
+ */
12
+ type Events = Eventdef[];
13
+ type HttpResult = {
14
+ code?: number;
15
+ context?: string;
16
+ inner?: HttpResult;
17
+ result?: unknown;
18
+ timestamp?: string;
19
+ title?: string;
20
+ };
21
+ type Link = {
22
+ /** URL to a resource request */
23
+ href: string;
24
+ };
25
+ type OrchMeta = {
26
+ attrs?: Record<string, string>;
27
+ /** The ID of the orchestration associated with the task in the choreographer */
28
+ id: string;
29
+ /** orchestration system type */
30
+ type: 0 | 1 | 2 | 3;
31
+ };
32
+ type OrchRun = {
33
+ /** The ID of the action */
34
+ actionId: string;
35
+ /** The UTC timestamp when the task run ended */
36
+ readonly endedAt?: string;
37
+ /** user ID of on behalf of whom the Task was executed. */
38
+ executedAs?: string;
39
+ /** The ID of the task run */
40
+ id: string;
41
+ /** log info of the run */
42
+ log?: string;
43
+ /** The ID of the resource */
44
+ resourceId: string;
45
+ /** The UTC timestamp when the task run started */
46
+ readonly startedAt?: string;
47
+ /** task run status */
48
+ status: "RUNNING" | "SUCCEEDED" | "FAILED";
49
+ /** The ID of the task */
50
+ taskId: string;
51
+ taskMeta: TaskMetadata;
52
+ /** task name */
53
+ taskName: string;
54
+ /** Information about who or what triggered the task run. */
55
+ triggeredBy: string;
56
+ /** The ID of the worker who is carrying out the real job. e.g. App.Reload job is carried out by Reload Engine, in this case, workerId will be reloadId from reload engine. Or, if we are using Automation, workerId will be Automation runId. */
57
+ workerId: string;
58
+ /** worker type or target system */
59
+ workerType: string;
60
+ };
61
+ type OrchRunList = {
62
+ data?: OrchRun[];
63
+ links?: {
64
+ next?: Link;
65
+ prev?: Link;
66
+ self?: Link;
67
+ };
68
+ };
69
+ type Task = {
70
+ /** List of helpful terms describing the workflows intended purpose, subject areas, or other important qualities */
71
+ annotations?: string[];
72
+ /** Workflow description */
73
+ description?: string;
74
+ /** Indicates whether the task is enabled or not */
75
+ enabled?: boolean;
76
+ /** Workflow CloudEvent definitions. Defines CloudEvents that can be consumed or produced */
77
+ events?: Events;
78
+ /** The choreographer's unique identifier */
79
+ readonly id?: string;
80
+ /** If 'true', workflow instances is not terminated when there are no active execution paths. Instance can be terminated via 'terminate end definition' or reaching defined 'workflowExecTimeout' */
81
+ keepActive?: boolean;
82
+ /** Optional expression that will be used to generate a domain-specific workflow instance identifier */
83
+ key?: string;
84
+ metadata?: TaskMetadata;
85
+ /** The name that identifies the workflow definition, and which, when combined with its version, forms a unique identifier. */
86
+ name: string;
87
+ /** The resource ID of the task. The `Task.resourceId` value from user input is ignored and will be calculated automatically from `Task.states`. */
88
+ resourceId?: string;
89
+ /** Serverless Workflow schema version */
90
+ specVersion: string;
91
+ start?: Startdef;
92
+ /** State definitions */
93
+ states?: Eventstate[];
94
+ /** Workflow version */
95
+ version?: string;
96
+ };
97
+ type TaskList = {
98
+ data?: Task[];
99
+ links?: {
100
+ next?: Link;
101
+ prev?: Link;
102
+ self?: Link;
103
+ };
104
+ };
105
+ type TriggerMeta = {
106
+ /** The ID of the Trigger associated with the task in the choreographer */
107
+ id: string;
108
+ /** trigger type */
109
+ type: 0 | 1 | 2 | 3;
110
+ };
111
+ type Action = {
112
+ /** Expression, if defined, must evaluate to true for this action to be performed. If false, action is disregarded */
113
+ condition?: string;
114
+ functionRef?: Functionref;
115
+ /** Unique action definition name */
116
+ name?: string;
117
+ /** List of unique references to defined workflow errors for which the action should not be retried. Used only when `autoRetries` is set to `true` */
118
+ nonRetryableErrors?: string[];
119
+ /** References a defined workflow retry definition. If not defined the default retry policy is assumed */
120
+ retryRef?: string;
121
+ /** List of unique references to defined workflow errors for which the action should be retried. Used only when `autoRetries` is set to `false` */
122
+ retryableErrors?: string[];
123
+ } & unknown;
124
+ /**
125
+ * Action execution timeout duration (literal ISO 8601 duration format or expression which evaluation results in an ISO 8601 duration)
126
+ */
127
+ type ActionExecTimeout = string;
128
+ /**
129
+ * CloudEvent correlation definition
130
+ */
131
+ type CorrelationDef = {
132
+ /** CloudEvent Extension Context Attribute name */
133
+ contextAttributeName: "id" | "status";
134
+ /** CloudEvent Extension Context Attribute value */
135
+ contextAttributeValue?: string;
136
+ };
137
+ type Crondef = string | {
138
+ /** Repeating interval (cron expression) describing when the workflow instance should be created */
139
+ expression: string;
140
+ /** Specific date and time (ISO 8601 format) when the cron expression invocation is no longer valid */
141
+ validUntil?: string;
142
+ };
143
+ /**
144
+ * State end definition
145
+ */
146
+ type End = boolean;
147
+ /**
148
+ * Timeout duration to wait for consuming defined events (literal ISO 8601 duration format or expression which evaluation results in an ISO 8601 duration)
149
+ */
150
+ type EventTimeout = string;
151
+ type Eventdef = {
152
+ /** CloudEvent correlation definitions */
153
+ correlation?: CorrelationDef[];
154
+ /** If `true`, only the Event payload is accessible to consuming Workflow states. If `false`, both event payload and context attributes should be accessible */
155
+ dataOnly?: boolean;
156
+ /** Unique event name */
157
+ name?: string;
158
+ /** CloudEvent source */
159
+ source?: "system-events.task";
160
+ /** CloudEvent type */
161
+ type?: "com.qlik.v1.task.run.finished";
162
+ };
163
+ /**
164
+ * This state is used to wait for events from event sources, then consumes them and invoke one or more actions to run in sequence or parallel
165
+ */
166
+ type Eventstate = {
167
+ /** Unique Name of a workflow state which is responsible for compensation of this state */
168
+ compensatedBy?: string;
169
+ /** State end definition */
170
+ end?: End;
171
+ /** If true consuming one of the defined events causes its associated actions to be performed. If false all of the defined events must be consumed in order for actions to be performed */
172
+ exclusive?: boolean;
173
+ /** State name */
174
+ name?: string;
175
+ /** Define the events to be consumed and optional actions to be performed */
176
+ onEvents?: Onevents[];
177
+ /** State specific timeouts */
178
+ timeouts?: {
179
+ /** Action execution timeout duration (literal ISO 8601 duration format or expression which evaluation results in an ISO 8601 duration) */
180
+ actionExecTimeout?: ActionExecTimeout;
181
+ /** Timeout duration to wait for consuming defined events (literal ISO 8601 duration format or expression which evaluation results in an ISO 8601 duration) */
182
+ eventTimeout?: EventTimeout;
183
+ /** Workflow state execution timeout duration (literal ISO 8601 duration format or expression which evaluation results in an ISO 8601 duration) */
184
+ stateExecTimeout?: StateExecTimeout;
185
+ };
186
+ /** State type */
187
+ type?: "EVENT";
188
+ } & unknown;
189
+ type Functionref = string | {
190
+ /** Function arguments/inputs */
191
+ arguments?: unknown;
192
+ /** Specifies if the function should be invoked sync or async */
193
+ invoke?: "SYNC" | "ASYNC";
194
+ /** Name of the referenced function */
195
+ refName: "app.reload";
196
+ /** Only used if function type is 'graphql'. A string containing a valid GraphQL selection set */
197
+ selectionSet?: string;
198
+ };
199
+ type Onevents = {
200
+ /** Specifies how actions are to be performed (in sequence or in parallel) */
201
+ actionMode?: "SEQUENTIAL" | "PARALLEL";
202
+ /** Actions to be performed if expression matches */
203
+ actions?: Action[];
204
+ /** References one or more unique event names in the defined workflow events */
205
+ eventRefs: string[];
206
+ };
207
+ type Schedule = string | ({
208
+ cron?: Crondef;
209
+ /** Specific date and time (ISO 8601 format) when the workflow instance should be terminated */
210
+ endDateTime?: string;
211
+ /** Time interval (must be repeating interval) described with ISO 8601 format. Declares when workflow instances will be automatically created. */
212
+ interval?: string;
213
+ /** The RRULE recurrence string for chronos job */
214
+ recurrence?: string;
215
+ /** Specific date and time (ISO 8601 format) when the workflow instance should be created */
216
+ startDateTime?: string;
217
+ /** Timezone name used to evaluate the interval & cron-expression. (default: UTC) */
218
+ timezone?: string;
219
+ } & unknown);
220
+ type Startdef = {
221
+ schedule: Schedule;
222
+ /** Name of the starting workflow state */
223
+ stateName?: string;
224
+ };
225
+ /**
226
+ * Workflow state execution timeout duration (literal ISO 8601 duration format or expression which evaluation results in an ISO 8601 duration)
227
+ */
228
+ type StateExecTimeout = string;
229
+ type TaskMetadata = {
230
+ /** The UTC timestamp when the task was created */
231
+ readonly createdAt?: string;
232
+ /** The user ID of the user that created the task */
233
+ createdBy?: string;
234
+ /** The UTC timestamp when the task was deleted */
235
+ readonly deletedAt?: string;
236
+ /** why the Task is disabled */
237
+ disabledCode?: "MANUALLY" | "CONSECUTIVE-FAILURES" | "APP-SCRIPT-UPDATED" | "OWNER-DELETED" | "OWNER-DISABLED";
238
+ /** The ID of the reload-task this one was migrated from (if applicable) */
239
+ migratedFrom?: string;
240
+ orchestration?: OrchMeta;
241
+ /** The user ID of the owner of the task */
242
+ ownerId?: string;
243
+ /** The space ID that the Task will operate in */
244
+ spaceId?: string;
245
+ /** The tenant ID that the Task will operate in */
246
+ tenantId?: string;
247
+ trigger?: TriggerMeta;
248
+ /** The UTC timestamp when the task was last updated */
249
+ updatedAt?: string;
250
+ /** resource usage. Normally it means in which product domain the resource is used. if this field is not presented, it has default of `ANALYTICS` */
251
+ usage?: "ANALYTICS" | "DATA_PREPARATION" | "DATAFLOW_PREP" | "SINGLE_TABLE_PREP";
252
+ };
253
+ /**
254
+ * Retrieves a list of the tasks that the requesting user has access to.
255
+ *
256
+ * @param query an object with query parameters
257
+ * @throws GetTasksHttpError
258
+ */
259
+ declare function getTasks(query: {
260
+ /** The maximum number of resources to return for a request. */
261
+ limit?: number;
262
+ /** The page cursor. */
263
+ page?: string;
264
+ /** **Required**. Filter tasks by its target resource ID. If not provided, request will fail with 400 (Bad Request). */
265
+ resourceId: string;
266
+ /** The property of a resource to sort on (default sort is
267
+ * -updatedAt). A property must be prefixed by + or - to
268
+ * indicate ascending or descending sort order respectively. */
269
+ sort?: "+createdAt" | "-createdAt" | "+updatedAt" | "-updatedAt";
270
+ }, options?: ApiCallOptions): Promise<GetTasksHttpResponse>;
271
+ type GetTasksHttpResponse = {
272
+ data: TaskList;
273
+ headers: Headers;
274
+ status: 200;
275
+ prev?: (options?: ApiCallOptions) => Promise<GetTasksHttpResponse>;
276
+ next?: (options?: ApiCallOptions) => Promise<GetTasksHttpResponse>;
277
+ };
278
+ type GetTasksHttpError = {
279
+ data: ErrorResponse;
280
+ headers: Headers;
281
+ status: 400 | 401 | 403 | 404 | 500 | 503;
282
+ };
283
+ /**
284
+ * Creates a new task.
285
+ *
286
+ * @param query an object with query parameters
287
+ * @param body an object with the body content
288
+ * @throws CreateTaskHttpError
289
+ */
290
+ declare function createTask(query: {
291
+ /** ID of the reload-task to migrate from the old system (optional). */
292
+ migrateFrom?: string;
293
+ }, body: Task, options?: ApiCallOptions): Promise<CreateTaskHttpResponse>;
294
+ type CreateTaskHttpResponse = {
295
+ data: Task;
296
+ headers: Headers;
297
+ status: 201;
298
+ };
299
+ type CreateTaskHttpError = {
300
+ data: ErrorResponse;
301
+ headers: Headers;
302
+ status: 400 | 401 | 403 | 404 | 500 | 503;
303
+ };
304
+ /**
305
+ * Returns a list of task runs for a specified `resourceId`.
306
+ *
307
+ * @param id Filter tasks by its target resource ID
308
+ * @param query an object with query parameters
309
+ * @throws GetTasksResourceRunsHttpError
310
+ */
311
+ declare function getTasksResourceRuns(id: string, query: {
312
+ /** The maximum number of task runs to return for a request. */
313
+ limit?: number;
314
+ /** The page cursor. */
315
+ page?: string;
316
+ /** The property of a resource to sort on (default sort is -startedAt).
317
+ * A property must be prefixed by + or - to indicate ascending or descending sort order respectively. */
318
+ sort?: "+startedAt" | "-startedAt" | "+endedAt" | "-endedAt" | "+status" | "-status" | "+taskId" | "-taskId" | "+actionId" | "-actionId";
319
+ }, options?: ApiCallOptions): Promise<GetTasksResourceRunsHttpResponse>;
320
+ type GetTasksResourceRunsHttpResponse = {
321
+ data: OrchRunList;
322
+ headers: Headers;
323
+ status: 200;
324
+ prev?: (options?: ApiCallOptions) => Promise<GetTasksResourceRunsHttpResponse>;
325
+ next?: (options?: ApiCallOptions) => Promise<GetTasksResourceRunsHttpResponse>;
326
+ };
327
+ type GetTasksResourceRunsHttpError = {
328
+ data: ErrorResponse;
329
+ headers: Headers;
330
+ status: 400 | 401 | 403 | 404 | 500 | 503;
331
+ };
332
+ /**
333
+ * Deletes a specific task.
334
+ *
335
+ * @param id The task's unique identifier.
336
+ * @throws DeleteTaskHttpError
337
+ */
338
+ declare function deleteTask(id: string, options?: ApiCallOptions): Promise<DeleteTaskHttpResponse>;
339
+ type DeleteTaskHttpResponse = {
340
+ data: void;
341
+ headers: Headers;
342
+ status: 204;
343
+ };
344
+ type DeleteTaskHttpError = {
345
+ data: ErrorResponse;
346
+ headers: Headers;
347
+ status: 400 | 401 | 403 | 404 | 500 | 503;
348
+ };
349
+ /**
350
+ * Retrieves details for a specific task.
351
+ *
352
+ * @param id The task's unique identifier.
353
+ * @throws GetTaskHttpError
354
+ */
355
+ declare function getTask(id: string, options?: ApiCallOptions): Promise<GetTaskHttpResponse>;
356
+ type GetTaskHttpResponse = {
357
+ data: Task;
358
+ headers: Headers;
359
+ status: 200;
360
+ };
361
+ type GetTaskHttpError = {
362
+ data: ErrorResponse;
363
+ headers: Headers;
364
+ status: 400 | 401 | 403 | 404 | 500 | 503;
365
+ };
366
+ /**
367
+ * Updates a specific task. If the task is owned by another user, ownership will be transferred to the requesting user.
368
+ *
369
+ * @param id The task's unique identifier.
370
+ * @param body an object with the body content
371
+ * @throws UpdateTaskHttpError
372
+ */
373
+ declare function updateTask(id: string, body: Task, options?: ApiCallOptions): Promise<UpdateTaskHttpResponse>;
374
+ type UpdateTaskHttpResponse = {
375
+ data: Task;
376
+ headers: Headers;
377
+ status: 200;
378
+ };
379
+ type UpdateTaskHttpError = {
380
+ data: ErrorResponse;
381
+ headers: Headers;
382
+ status: 400 | 401 | 403 | 404 | 500 | 503;
383
+ };
384
+ /**
385
+ * Starts the specified task.
386
+ *
387
+ * @param id The task's unique identifier.
388
+ * @param query an object with query parameters
389
+ * @throws StartTaskHttpError
390
+ */
391
+ declare function startTask(id: string, query: {
392
+ /** Indicates the origin of the trigger. If not provided, defaults to 'manual'. For event-triggered tasks, this can be the name of the triggering task. */
393
+ source?: string;
394
+ }, options?: ApiCallOptions): Promise<StartTaskHttpResponse>;
395
+ type StartTaskHttpResponse = {
396
+ data: {
397
+ message?: string;
398
+ };
399
+ headers: Headers;
400
+ status: 200;
401
+ };
402
+ type StartTaskHttpError = {
403
+ data: ErrorResponse;
404
+ headers: Headers;
405
+ status: 400 | 401 | 403 | 404 | 500 | 503;
406
+ };
407
+ /**
408
+ * Returns runs for the specified task.
409
+ *
410
+ * @param id The task's unique identifier.
411
+ * @param query an object with query parameters
412
+ * @throws GetTaskRunsHttpError
413
+ */
414
+ declare function getTaskRuns(id: string, query: {
415
+ /** The maximum number of task runs to return for a request. */
416
+ limit?: number;
417
+ /** The page cursor. */
418
+ page?: string;
419
+ /** The property of a resource to sort on (default sort is -startedAt).
420
+ * A property must be prefixed by + or - to indicate ascending or descending sort order respectively. */
421
+ sort?: "+startedAt" | "-startedAt" | "+endedAt" | "-endedAt" | "+status" | "-status" | "+taskId" | "-taskId" | "+actionId" | "-actionId";
422
+ }, options?: ApiCallOptions): Promise<GetTaskRunsHttpResponse>;
423
+ type GetTaskRunsHttpResponse = {
424
+ data: OrchRunList;
425
+ headers: Headers;
426
+ status: 200;
427
+ prev?: (options?: ApiCallOptions) => Promise<GetTaskRunsHttpResponse>;
428
+ next?: (options?: ApiCallOptions) => Promise<GetTaskRunsHttpResponse>;
429
+ };
430
+ type GetTaskRunsHttpError = {
431
+ data: ErrorResponse;
432
+ headers: Headers;
433
+ status: 400 | 401 | 403 | 404 | 500 | 503;
434
+ };
435
+ /**
436
+ * Returns the last run of a specific task.
437
+ *
438
+ * @param id The task's unique identifier.
439
+ * @throws GetLastTaskRunHttpError
440
+ */
441
+ declare function getLastTaskRun(id: string, options?: ApiCallOptions): Promise<GetLastTaskRunHttpResponse>;
442
+ type GetLastTaskRunHttpResponse = {
443
+ data: OrchRun;
444
+ headers: Headers;
445
+ status: 200;
446
+ };
447
+ type GetLastTaskRunHttpError = {
448
+ data: ErrorResponse;
449
+ headers: Headers;
450
+ status: 400 | 401 | 403 | 404 | 500 | 503;
451
+ };
452
+ /**
453
+ * Get specific run log of a task.
454
+ *
455
+ * @param id The task's unique identifier.
456
+ * @param runId The run's unique identifier.
457
+ * @throws GetTaskRunLogHttpError
458
+ */
459
+ declare function getTaskRunLog(id: string, runId: string, options?: ApiCallOptions): Promise<GetTaskRunLogHttpResponse>;
460
+ type GetTaskRunLogHttpResponse = {
461
+ data: {
462
+ /** Log content in plain text format */
463
+ logContent?: string;
464
+ };
465
+ headers: Headers;
466
+ status: 200;
467
+ };
468
+ type GetTaskRunLogHttpError = {
469
+ data: ErrorResponse;
470
+ headers: Headers;
471
+ status: 400 | 401 | 403 | 404 | 500 | 503;
472
+ };
473
+ /**
474
+ * Clears the cache for tasks api requests.
475
+ */
476
+ declare function clearCache(): void;
477
+ interface TasksAPI {
478
+ /**
479
+ * Retrieves a list of the tasks that the requesting user has access to.
480
+ *
481
+ * @param query an object with query parameters
482
+ * @throws GetTasksHttpError
483
+ */
484
+ getTasks: typeof getTasks;
485
+ /**
486
+ * Creates a new task.
487
+ *
488
+ * @param query an object with query parameters
489
+ * @param body an object with the body content
490
+ * @throws CreateTaskHttpError
491
+ */
492
+ createTask: typeof createTask;
493
+ /**
494
+ * Returns a list of task runs for a specified `resourceId`.
495
+ *
496
+ * @param id Filter tasks by its target resource ID
497
+ * @param query an object with query parameters
498
+ * @throws GetTasksResourceRunsHttpError
499
+ */
500
+ getTasksResourceRuns: typeof getTasksResourceRuns;
501
+ /**
502
+ * Deletes a specific task.
503
+ *
504
+ * @param id The task's unique identifier.
505
+ * @throws DeleteTaskHttpError
506
+ */
507
+ deleteTask: typeof deleteTask;
508
+ /**
509
+ * Retrieves details for a specific task.
510
+ *
511
+ * @param id The task's unique identifier.
512
+ * @throws GetTaskHttpError
513
+ */
514
+ getTask: typeof getTask;
515
+ /**
516
+ * Updates a specific task. If the task is owned by another user, ownership will be transferred to the requesting user.
517
+ *
518
+ * @param id The task's unique identifier.
519
+ * @param body an object with the body content
520
+ * @throws UpdateTaskHttpError
521
+ */
522
+ updateTask: typeof updateTask;
523
+ /**
524
+ * Starts the specified task.
525
+ *
526
+ * @param id The task's unique identifier.
527
+ * @param query an object with query parameters
528
+ * @throws StartTaskHttpError
529
+ */
530
+ startTask: typeof startTask;
531
+ /**
532
+ * Returns runs for the specified task.
533
+ *
534
+ * @param id The task's unique identifier.
535
+ * @param query an object with query parameters
536
+ * @throws GetTaskRunsHttpError
537
+ */
538
+ getTaskRuns: typeof getTaskRuns;
539
+ /**
540
+ * Returns the last run of a specific task.
541
+ *
542
+ * @param id The task's unique identifier.
543
+ * @throws GetLastTaskRunHttpError
544
+ */
545
+ getLastTaskRun: typeof getLastTaskRun;
546
+ /**
547
+ * Get specific run log of a task.
548
+ *
549
+ * @param id The task's unique identifier.
550
+ * @param runId The run's unique identifier.
551
+ * @throws GetTaskRunLogHttpError
552
+ */
553
+ getTaskRunLog: typeof getTaskRunLog;
554
+ /**
555
+ * Clears the cache for tasks api requests.
556
+ */
557
+ clearCache: typeof clearCache;
558
+ }
559
+ /**
560
+ * Functions for the tasks api
561
+ */
562
+ declare const tasksExport: TasksAPI;
563
+
564
+ export { type Action, type ActionExecTimeout, type CorrelationDef, type CreateTaskHttpError, type CreateTaskHttpResponse, type Crondef, type DeleteTaskHttpError, type DeleteTaskHttpResponse, type End, type ErrorResponse, type EventTimeout, type Eventdef, type Events, type Eventstate, type Functionref, type GetLastTaskRunHttpError, type GetLastTaskRunHttpResponse, type GetTaskHttpError, type GetTaskHttpResponse, type GetTaskRunLogHttpError, type GetTaskRunLogHttpResponse, type GetTaskRunsHttpError, type GetTaskRunsHttpResponse, type GetTasksHttpError, type GetTasksHttpResponse, type GetTasksResourceRunsHttpError, type GetTasksResourceRunsHttpResponse, type HttpResult, type Link, type Onevents, type OrchMeta, type OrchRun, type OrchRunList, type Schedule, type StartTaskHttpError, type StartTaskHttpResponse, type Startdef, type StateExecTimeout, type Task, type TaskList, type TaskMetadata, type TasksAPI, type TriggerMeta, type UpdateTaskHttpError, type UpdateTaskHttpResponse, clearCache, createTask, tasksExport as default, deleteTask, getLastTaskRun, getTask, getTaskRunLog, getTaskRuns, getTasks, getTasksResourceRuns, startTask, updateTask };
package/tasks.js ADDED
@@ -0,0 +1,126 @@
1
+ import {
2
+ clearApiCache,
3
+ invokeFetch
4
+ } from "./chunks/LIEZG7IM.js";
5
+ import "./chunks/GPRUNZV4.js";
6
+ import "./chunks/7MMXU6EL.js";
7
+
8
+ // src/public/rest/tasks.ts
9
+ async function getTasks(query, options) {
10
+ return invokeFetch("tasks", {
11
+ method: "get",
12
+ pathTemplate: "/api/v1/tasks",
13
+ query,
14
+ options
15
+ });
16
+ }
17
+ async function createTask(query, body, options) {
18
+ return invokeFetch("tasks", {
19
+ method: "post",
20
+ pathTemplate: "/api/v1/tasks",
21
+ query,
22
+ body,
23
+ contentType: "application/json",
24
+ options
25
+ });
26
+ }
27
+ async function getTasksResourceRuns(id, query, options) {
28
+ return invokeFetch("tasks", {
29
+ method: "get",
30
+ pathTemplate: "/api/v1/tasks/resources/{id}/runs",
31
+ pathVariables: { id },
32
+ query,
33
+ options
34
+ });
35
+ }
36
+ async function deleteTask(id, options) {
37
+ return invokeFetch("tasks", {
38
+ method: "delete",
39
+ pathTemplate: "/api/v1/tasks/{id}",
40
+ pathVariables: { id },
41
+ options
42
+ });
43
+ }
44
+ async function getTask(id, options) {
45
+ return invokeFetch("tasks", {
46
+ method: "get",
47
+ pathTemplate: "/api/v1/tasks/{id}",
48
+ pathVariables: { id },
49
+ options
50
+ });
51
+ }
52
+ async function updateTask(id, body, options) {
53
+ return invokeFetch("tasks", {
54
+ method: "put",
55
+ pathTemplate: "/api/v1/tasks/{id}",
56
+ pathVariables: { id },
57
+ body,
58
+ contentType: "application/json",
59
+ options
60
+ });
61
+ }
62
+ async function startTask(id, query, options) {
63
+ return invokeFetch("tasks", {
64
+ method: "post",
65
+ pathTemplate: "/api/v1/tasks/{id}/actions/start",
66
+ pathVariables: { id },
67
+ query,
68
+ options
69
+ });
70
+ }
71
+ async function getTaskRuns(id, query, options) {
72
+ return invokeFetch("tasks", {
73
+ method: "get",
74
+ pathTemplate: "/api/v1/tasks/{id}/runs",
75
+ pathVariables: { id },
76
+ query,
77
+ options
78
+ });
79
+ }
80
+ async function getLastTaskRun(id, options) {
81
+ return invokeFetch("tasks", {
82
+ method: "get",
83
+ pathTemplate: "/api/v1/tasks/{id}/runs/last",
84
+ pathVariables: { id },
85
+ options
86
+ });
87
+ }
88
+ async function getTaskRunLog(id, runId, options) {
89
+ return invokeFetch("tasks", {
90
+ method: "get",
91
+ pathTemplate: "/api/v1/tasks/{id}/runs/{runId}/log",
92
+ pathVariables: { id, runId },
93
+ options
94
+ });
95
+ }
96
+ function clearCache() {
97
+ return clearApiCache("tasks");
98
+ }
99
+ var tasksExport = {
100
+ getTasks,
101
+ createTask,
102
+ getTasksResourceRuns,
103
+ deleteTask,
104
+ getTask,
105
+ updateTask,
106
+ startTask,
107
+ getTaskRuns,
108
+ getLastTaskRun,
109
+ getTaskRunLog,
110
+ clearCache
111
+ };
112
+ var tasks_default = tasksExport;
113
+ export {
114
+ clearCache,
115
+ createTask,
116
+ tasks_default as default,
117
+ deleteTask,
118
+ getLastTaskRun,
119
+ getTask,
120
+ getTaskRunLog,
121
+ getTaskRuns,
122
+ getTasks,
123
+ getTasksResourceRuns,
124
+ startTask,
125
+ updateTask
126
+ };