@io-orkes/conductor-javascript 0.0.11 → 0.9.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.
package/dist/index.d.ts CHANGED
@@ -115,344 +115,6 @@ declare abstract class BaseHttpRequest {
115
115
  abstract request<T>(options: ApiRequestOptions): CancelablePromise<T>;
116
116
  }
117
117
 
118
- declare type TaskDef = {
119
- ownerApp?: string;
120
- createTime?: number;
121
- updateTime?: number;
122
- createdBy?: string;
123
- updatedBy?: string;
124
- name: string;
125
- description?: string;
126
- retryCount?: number;
127
- timeoutSeconds: number;
128
- inputKeys?: Array<string>;
129
- outputKeys?: Array<string>;
130
- timeoutPolicy?: 'RETRY' | 'TIME_OUT_WF' | 'ALERT_ONLY';
131
- retryLogic?: 'FIXED' | 'EXPONENTIAL_BACKOFF' | 'LINEAR_BACKOFF';
132
- retryDelaySeconds?: number;
133
- responseTimeoutSeconds?: number;
134
- concurrentExecLimit?: number;
135
- inputTemplate?: Record<string, any>;
136
- rateLimitPerFrequency?: number;
137
- rateLimitFrequencyInSeconds?: number;
138
- isolationGroupId?: string;
139
- executionNameSpace?: string;
140
- ownerEmail?: string;
141
- pollTimeoutSeconds?: number;
142
- backoffScaleFactor?: number;
143
- };
144
-
145
- declare type WorkflowDef$1 = {
146
- ownerApp?: string;
147
- createTime?: number;
148
- updateTime?: number;
149
- createdBy?: string;
150
- updatedBy?: string;
151
- name: string;
152
- description?: string;
153
- version?: number;
154
- tasks: Array<WorkflowTask>;
155
- inputParameters?: Array<string>;
156
- outputParameters?: Record<string, any>;
157
- failureWorkflow?: string;
158
- schemaVersion?: number;
159
- restartable?: boolean;
160
- workflowStatusListenerEnabled?: boolean;
161
- ownerEmail?: string;
162
- timeoutPolicy?: 'TIME_OUT_WF' | 'ALERT_ONLY';
163
- timeoutSeconds: number;
164
- variables?: Record<string, any>;
165
- inputTemplate?: Record<string, any>;
166
- };
167
-
168
- declare type SubWorkflowParams = {
169
- name: string;
170
- version?: number;
171
- taskToDomain?: Record<string, string>;
172
- workflowDefinition?: WorkflowDef$1;
173
- };
174
-
175
- declare type WorkflowTask = {
176
- name: string;
177
- taskReferenceName: string;
178
- description?: string;
179
- inputParameters?: Record<string, any>;
180
- type?: string;
181
- dynamicTaskNameParam?: string;
182
- /**
183
- * @deprecated
184
- */
185
- caseValueParam?: string;
186
- /**
187
- * @deprecated
188
- */
189
- caseExpression?: string;
190
- scriptExpression?: string;
191
- decisionCases?: Record<string, Array<WorkflowTask>>;
192
- /**
193
- * @deprecated
194
- */
195
- dynamicForkJoinTasksParam?: string;
196
- dynamicForkTasksParam?: string;
197
- dynamicForkTasksInputParamName?: string;
198
- defaultCase?: Array<WorkflowTask>;
199
- forkTasks?: Array<Array<WorkflowTask>>;
200
- startDelay?: number;
201
- subWorkflowParam?: SubWorkflowParams;
202
- joinOn?: Array<string>;
203
- sink?: string;
204
- optional?: boolean;
205
- taskDefinition?: TaskDef;
206
- rateLimited?: boolean;
207
- defaultExclusiveJoinTask?: Array<string>;
208
- asyncComplete?: boolean;
209
- loopCondition?: string;
210
- loopOver?: Array<WorkflowTask>;
211
- retryCount?: number;
212
- evaluatorType?: string;
213
- expression?: string;
214
- workflowTaskType?: 'SIMPLE' | 'DYNAMIC' | 'FORK_JOIN' | 'FORK_JOIN_DYNAMIC' | 'DECISION' | 'SWITCH' | 'JOIN' | 'DO_WHILE' | 'SUB_WORKFLOW' | 'START_WORKFLOW' | 'EVENT' | 'WAIT' | 'HUMAN' | 'USER_DEFINED' | 'HTTP' | 'LAMBDA' | 'INLINE' | 'EXCLUSIVE_JOIN' | 'TERMINATE' | 'KAFKA_PUBLISH' | 'JSON_JQ_TRANSFORM' | 'SET_VARIABLE';
215
- };
216
-
217
- declare type Task = {
218
- taskType?: string;
219
- status?: 'IN_PROGRESS' | 'CANCELED' | 'FAILED' | 'FAILED_WITH_TERMINAL_ERROR' | 'COMPLETED' | 'COMPLETED_WITH_ERRORS' | 'SCHEDULED' | 'TIMED_OUT' | 'SKIPPED';
220
- inputData?: Record<string, any>;
221
- referenceTaskName?: string;
222
- retryCount?: number;
223
- seq?: number;
224
- correlationId?: string;
225
- pollCount?: number;
226
- taskDefName?: string;
227
- scheduledTime?: number;
228
- startTime?: number;
229
- endTime?: number;
230
- updateTime?: number;
231
- startDelayInSeconds?: number;
232
- retriedTaskId?: string;
233
- retried?: boolean;
234
- executed?: boolean;
235
- callbackFromWorker?: boolean;
236
- responseTimeoutSeconds?: number;
237
- workflowInstanceId?: string;
238
- workflowType?: string;
239
- taskId?: string;
240
- reasonForIncompletion?: string;
241
- callbackAfterSeconds?: number;
242
- workerId?: string;
243
- outputData?: Record<string, any>;
244
- workflowTask?: WorkflowTask;
245
- domain?: string;
246
- rateLimitPerFrequency?: number;
247
- rateLimitFrequencyInSeconds?: number;
248
- externalInputPayloadStoragePath?: string;
249
- externalOutputPayloadStoragePath?: string;
250
- workflowPriority?: number;
251
- executionNameSpace?: string;
252
- isolationGroupId?: string;
253
- iteration?: number;
254
- subWorkflowId?: string;
255
- subworkflowChanged?: boolean;
256
- queueWaitTime?: number;
257
- taskDefinition?: TaskDef;
258
- loopOverTask?: boolean;
259
- };
260
-
261
- declare class AdminResourceService {
262
- readonly httpRequest: BaseHttpRequest;
263
- constructor(httpRequest: BaseHttpRequest);
264
- /**
265
- * Verify and repair workflow consistency
266
- * @param workflowId
267
- * @returns string OK
268
- * @throws ApiError
269
- */
270
- verifyAndRepairWorkflowConsistency(workflowId: string): CancelablePromise<string>;
271
- /**
272
- * Get details of redis usage
273
- * @returns any OK
274
- * @throws ApiError
275
- */
276
- getRedisUsage(): CancelablePromise<Record<string, any>>;
277
- /**
278
- * Get the list of pending tasks for a given task type
279
- * @param tasktype
280
- * @param start
281
- * @param count
282
- * @returns Task OK
283
- * @throws ApiError
284
- */
285
- view(tasktype: string, start?: number, count?: number): CancelablePromise<Array<Task>>;
286
- /**
287
- * Queue up all the running workflows for sweep
288
- * @param workflowId
289
- * @returns string OK
290
- * @throws ApiError
291
- */
292
- requeueSweep(workflowId: string): CancelablePromise<string>;
293
- /**
294
- * Get registered queues
295
- * @param verbose
296
- * @returns any OK
297
- * @throws ApiError
298
- */
299
- getEventQueues(verbose?: boolean): CancelablePromise<Record<string, any>>;
300
- }
301
-
302
- declare type ConductorApplication = {
303
- id?: string;
304
- name?: string;
305
- createdBy?: string;
306
- };
307
-
308
- declare type CreateOrUpdateApplicationRequest = {
309
- /**
310
- * Application's name e.g.: Payment Processors
311
- */
312
- name: string;
313
- };
314
-
315
- declare class ApplicationResourceService {
316
- readonly httpRequest: BaseHttpRequest;
317
- constructor(httpRequest: BaseHttpRequest);
318
- /**
319
- * Get an application by id
320
- * @param id
321
- * @returns any OK
322
- * @throws ApiError
323
- */
324
- getApplication(id: string): CancelablePromise<any>;
325
- /**
326
- * Update an application
327
- * @param id
328
- * @param requestBody
329
- * @returns any OK
330
- * @throws ApiError
331
- */
332
- updateApplication(id: string, requestBody: CreateOrUpdateApplicationRequest): CancelablePromise<any>;
333
- /**
334
- * Delete an application
335
- * @param id
336
- * @returns any OK
337
- * @throws ApiError
338
- */
339
- deleteApplication(id: string): CancelablePromise<any>;
340
- /**
341
- * Get application's access keys
342
- * @param id
343
- * @returns any OK
344
- * @throws ApiError
345
- */
346
- getAccessKeys(id: string): CancelablePromise<any>;
347
- /**
348
- * Create an access key for an application
349
- * @param id
350
- * @returns any OK
351
- * @throws ApiError
352
- */
353
- createAccessKey(id: string): CancelablePromise<any>;
354
- /**
355
- * @param applicationId
356
- * @param role
357
- * @returns any OK
358
- * @throws ApiError
359
- */
360
- addRoleToApplicationUser(applicationId: string, role: string): CancelablePromise<any>;
361
- /**
362
- * @param applicationId
363
- * @param role
364
- * @returns any OK
365
- * @throws ApiError
366
- */
367
- removeRoleFromApplicationUser(applicationId: string, role: string): CancelablePromise<any>;
368
- /**
369
- * Toggle the status of an access key
370
- * @param applicationId
371
- * @param keyId
372
- * @returns any OK
373
- * @throws ApiError
374
- */
375
- toggleAccessKeyStatus(applicationId: string, keyId: string): CancelablePromise<any>;
376
- /**
377
- * Get all applications
378
- * @returns ConductorApplication OK
379
- * @throws ApiError
380
- */
381
- listApplications(): CancelablePromise<Array<ConductorApplication>>;
382
- /**
383
- * Create an application
384
- * @param requestBody
385
- * @returns any OK
386
- * @throws ApiError
387
- */
388
- createApplication(requestBody: CreateOrUpdateApplicationRequest): CancelablePromise<any>;
389
- /**
390
- * Delete an access key
391
- * @param applicationId
392
- * @param keyId
393
- * @returns any OK
394
- * @throws ApiError
395
- */
396
- deleteAccessKey(applicationId: string, keyId: string): CancelablePromise<any>;
397
- }
398
-
399
- /**
400
- * User, group or role which is granted/removed access
401
- */
402
- declare type SubjectRef = {
403
- /**
404
- * User, role or group
405
- */
406
- type?: 'USER' | 'ROLE' | 'GROUP';
407
- id: string;
408
- };
409
-
410
- /**
411
- * The object over which access is being granted or removed
412
- */
413
- declare type TargetRef = {
414
- type: 'WORKFLOW_DEF' | 'TASK_DEF' | 'APPLICATION' | 'USER';
415
- id: 'Identifier of the target e.g. `name` in case it\'s a WORKFLOW_DEF';
416
- };
417
-
418
- declare type AuthorizationRequest = {
419
- subject: SubjectRef;
420
- target: TargetRef;
421
- /**
422
- * The set of access which is granted or removed
423
- */
424
- access: Array<'CREATE' | 'READ' | 'UPDATE' | 'DELETE' | 'EXECUTE'>;
425
- };
426
-
427
- declare type Response = {};
428
-
429
- declare class AuthorizationResourceService {
430
- readonly httpRequest: BaseHttpRequest;
431
- constructor(httpRequest: BaseHttpRequest);
432
- /**
433
- * Grant access to a user over the target
434
- * @param requestBody
435
- * @returns Response OK
436
- * @throws ApiError
437
- */
438
- grantPermissions(requestBody: AuthorizationRequest): CancelablePromise<Response>;
439
- /**
440
- * Remove user's access over the target
441
- * @param requestBody
442
- * @returns Response OK
443
- * @throws ApiError
444
- */
445
- removePermissions(requestBody: AuthorizationRequest): CancelablePromise<Response>;
446
- /**
447
- * Get the access that have been granted over the given object
448
- * @param type
449
- * @param id
450
- * @returns any OK
451
- * @throws ApiError
452
- */
453
- getPermissions(type: string, id: string): CancelablePromise<any>;
454
- }
455
-
456
118
  declare type StartWorkflow = {
457
119
  name?: string;
458
120
  version?: number;
@@ -556,101 +218,114 @@ declare class EventResourceService {
556
218
  getEventHandlersForEvent(event: string, activeOnly?: boolean): CancelablePromise<Array<EventHandler>>;
557
219
  }
558
220
 
559
- declare type Permission = {
560
- name?: string;
561
- };
562
-
563
- declare type Role = {
564
- name?: string;
565
- permissions?: Array<Permission>;
566
- };
567
-
568
- declare type Group = {
569
- id?: string;
570
- description?: string;
571
- roles?: Array<Role>;
572
- };
573
-
574
- declare type UpsertGroupRequest = {
575
- /**
576
- * A general description of the group
577
- */
578
- description: string;
579
- roles?: 'ADMIN' | 'USER' | 'WORKER' | 'METADATA_MANAGER' | 'WORKFLOW_MANAGER';
580
- };
581
-
582
- declare class GroupResourceService {
221
+ declare class HealthCheckResourceService {
583
222
  readonly httpRequest: BaseHttpRequest;
584
223
  constructor(httpRequest: BaseHttpRequest);
585
224
  /**
586
- * Add user to group
587
- * @param groupId
588
- * @param userId
589
- * @returns any OK
590
- * @throws ApiError
591
- */
592
- addUserToGroup(groupId: string, userId: string): CancelablePromise<any>;
593
- /**
594
- * Remove user from group
595
- * @param groupId
596
- * @param userId
597
- * @returns any OK
598
- * @throws ApiError
599
- */
600
- removeUserFromGroup(groupId: string, userId: string): CancelablePromise<any>;
601
- /**
602
- * Get a group by id
603
- * @param id
604
- * @returns any OK
605
- * @throws ApiError
606
- */
607
- getGroup(id: string): CancelablePromise<any>;
608
- /**
609
- * Create or update a group
610
- * @param id
611
- * @param requestBody
612
- * @returns any OK
613
- * @throws ApiError
614
- */
615
- upsertGroup(id: string, requestBody: UpsertGroupRequest): CancelablePromise<any>;
616
- /**
617
- * Delete a group
618
- * @param id
619
- * @returns Response OK
620
- * @throws ApiError
621
- */
622
- deleteGroup(id: string): CancelablePromise<Response>;
623
- /**
624
- * Get the permissions this group has over workflows and tasks
625
- * @param groupId
626
225
  * @returns any OK
627
226
  * @throws ApiError
628
227
  */
629
- getGrantedPermissions(groupId: string): CancelablePromise<any>;
228
+ doCheck(): CancelablePromise<Record<string, any>>;
229
+ }
230
+
231
+ declare type TaskDef = {
232
+ ownerApp?: string;
233
+ createTime?: number;
234
+ updateTime?: number;
235
+ createdBy?: string;
236
+ updatedBy?: string;
237
+ name: string;
238
+ description?: string;
239
+ retryCount?: number;
240
+ timeoutSeconds: number;
241
+ inputKeys?: Array<string>;
242
+ outputKeys?: Array<string>;
243
+ timeoutPolicy?: 'RETRY' | 'TIME_OUT_WF' | 'ALERT_ONLY';
244
+ retryLogic?: 'FIXED' | 'EXPONENTIAL_BACKOFF' | 'LINEAR_BACKOFF';
245
+ retryDelaySeconds?: number;
246
+ responseTimeoutSeconds?: number;
247
+ concurrentExecLimit?: number;
248
+ inputTemplate?: Record<string, any>;
249
+ rateLimitPerFrequency?: number;
250
+ rateLimitFrequencyInSeconds?: number;
251
+ isolationGroupId?: string;
252
+ executionNameSpace?: string;
253
+ ownerEmail?: string;
254
+ pollTimeoutSeconds?: number;
255
+ backoffScaleFactor?: number;
256
+ };
257
+
258
+ declare type SubWorkflowParams = {
259
+ name: string;
260
+ version?: number;
261
+ taskToDomain?: Record<string, string>;
262
+ workflowDefinition?: WorkflowDef$1;
263
+ };
264
+
265
+ declare type WorkflowTask = {
266
+ name: string;
267
+ taskReferenceName: string;
268
+ description?: string;
269
+ inputParameters?: Record<string, any>;
270
+ type?: string;
271
+ dynamicTaskNameParam?: string;
630
272
  /**
631
- * Get all users in group
632
- * @param id
633
- * @returns any OK
634
- * @throws ApiError
273
+ * @deprecated
635
274
  */
636
- getUsersInGroup(id: string): CancelablePromise<any>;
275
+ caseValueParam?: string;
637
276
  /**
638
- * Get all groups
639
- * @returns Group OK
640
- * @throws ApiError
277
+ * @deprecated
641
278
  */
642
- listGroups(): CancelablePromise<Array<Group>>;
643
- }
644
-
645
- declare class HealthCheckResourceService {
646
- readonly httpRequest: BaseHttpRequest;
647
- constructor(httpRequest: BaseHttpRequest);
279
+ caseExpression?: string;
280
+ scriptExpression?: string;
281
+ decisionCases?: Record<string, Array<WorkflowTask>>;
648
282
  /**
649
- * @returns any OK
650
- * @throws ApiError
283
+ * @deprecated
651
284
  */
652
- doCheck(): CancelablePromise<Record<string, any>>;
653
- }
285
+ dynamicForkJoinTasksParam?: string;
286
+ dynamicForkTasksParam?: string;
287
+ dynamicForkTasksInputParamName?: string;
288
+ defaultCase?: Array<WorkflowTask>;
289
+ forkTasks?: Array<Array<WorkflowTask>>;
290
+ startDelay?: number;
291
+ subWorkflowParam?: SubWorkflowParams;
292
+ joinOn?: Array<string>;
293
+ sink?: string;
294
+ optional?: boolean;
295
+ taskDefinition?: TaskDef;
296
+ rateLimited?: boolean;
297
+ defaultExclusiveJoinTask?: Array<string>;
298
+ asyncComplete?: boolean;
299
+ loopCondition?: string;
300
+ loopOver?: Array<WorkflowTask>;
301
+ retryCount?: number;
302
+ evaluatorType?: string;
303
+ expression?: string;
304
+ workflowTaskType?: 'SIMPLE' | 'DYNAMIC' | 'FORK_JOIN' | 'FORK_JOIN_DYNAMIC' | 'DECISION' | 'SWITCH' | 'JOIN' | 'DO_WHILE' | 'SUB_WORKFLOW' | 'START_WORKFLOW' | 'EVENT' | 'WAIT' | 'HUMAN' | 'USER_DEFINED' | 'HTTP' | 'LAMBDA' | 'INLINE' | 'EXCLUSIVE_JOIN' | 'TERMINATE' | 'KAFKA_PUBLISH' | 'JSON_JQ_TRANSFORM' | 'SET_VARIABLE';
305
+ };
306
+
307
+ declare type WorkflowDef$1 = {
308
+ ownerApp?: string;
309
+ createTime?: number;
310
+ updateTime?: number;
311
+ createdBy?: string;
312
+ updatedBy?: string;
313
+ name: string;
314
+ description?: string;
315
+ version?: number;
316
+ tasks: Array<WorkflowTask>;
317
+ inputParameters?: Array<string>;
318
+ outputParameters?: Record<string, any>;
319
+ failureWorkflow?: string;
320
+ schemaVersion?: number;
321
+ restartable?: boolean;
322
+ workflowStatusListenerEnabled?: boolean;
323
+ ownerEmail?: string;
324
+ timeoutPolicy?: 'TIME_OUT_WF' | 'ALERT_ONLY';
325
+ timeoutSeconds: number;
326
+ variables?: Record<string, any>;
327
+ inputTemplate?: Record<string, any>;
328
+ };
654
329
 
655
330
  declare class MetadataResourceService {
656
331
  readonly httpRequest: BaseHttpRequest;
@@ -739,101 +414,6 @@ declare class MetadataResourceService {
739
414
  get(name: string, version?: number, metadata?: boolean): CancelablePromise<WorkflowDef$1>;
740
415
  }
741
416
 
742
- declare class MigrationResourceService {
743
- readonly httpRequest: BaseHttpRequest;
744
- constructor(httpRequest: BaseHttpRequest);
745
- /**
746
- * Migrate workflows from Redis to Postgres
747
- * @param batchSize
748
- * @param startFromTimestamp
749
- * @returns any OK
750
- * @throws ApiError
751
- */
752
- migrateWorkflows(batchSize: number, startFromTimestamp: number): CancelablePromise<Record<string, any>>;
753
- /**
754
- * Migrate Workflow Index t o the sharded table
755
- * @returns number OK
756
- * @throws ApiError
757
- */
758
- migrateIndex(): CancelablePromise<number>;
759
- /**
760
- * Migrate Workflow and Task Definitions to Postgres
761
- * @returns any OK
762
- * @throws ApiError
763
- */
764
- migrateMetadata(): CancelablePromise<any>;
765
- }
766
-
767
- declare class PublisherConfigResourceService {
768
- readonly httpRequest: BaseHttpRequest;
769
- constructor(httpRequest: BaseHttpRequest);
770
- /**
771
- * Get all publisher configurations
772
- * @returns any OK
773
- * @throws ApiError
774
- */
775
- listAllConfigs(): CancelablePromise<any>;
776
- /**
777
- * Get a publisher config value by id
778
- * @param id
779
- * @returns string OK
780
- * @throws ApiError
781
- */
782
- downloadConfig(id: string): CancelablePromise<string>;
783
- /**
784
- * Put a publisher config value by id
785
- * @param id
786
- * @param requestBody
787
- * @returns any OK
788
- * @throws ApiError
789
- */
790
- uploadConfig(id: string, requestBody: string): CancelablePromise<any>;
791
- /**
792
- * Delete a publisher config value by id
793
- * @param id
794
- * @returns any OK
795
- * @throws ApiError
796
- */
797
- deleteConfig(id: string): CancelablePromise<any>;
798
- }
799
-
800
- declare class QueueAdminResourceService {
801
- readonly httpRequest: BaseHttpRequest;
802
- constructor(httpRequest: BaseHttpRequest);
803
- /**
804
- * Get Queue Names
805
- * @returns string OK
806
- * @throws ApiError
807
- */
808
- names(): CancelablePromise<Record<string, string>>;
809
- /**
810
- * Get the queue length
811
- * @returns number OK
812
- * @throws ApiError
813
- */
814
- size(): CancelablePromise<Record<string, number>>;
815
- /**
816
- * Publish a message in queue to mark a wait task (by taskId) as completed.
817
- * @param workflowId
818
- * @param taskId
819
- * @param status
820
- * @param requestBody
821
- * @returns any OK
822
- * @throws ApiError
823
- */
824
- updateByTaskId(workflowId: string, taskId: string, status: 'IN_PROGRESS' | 'CANCELED' | 'FAILED' | 'FAILED_WITH_TERMINAL_ERROR' | 'COMPLETED' | 'COMPLETED_WITH_ERRORS' | 'SCHEDULED' | 'TIMED_OUT' | 'SKIPPED', requestBody: Record<string, any>): CancelablePromise<any>;
825
- /**
826
- * Publish a message in queue to mark a wait task as completed.
827
- * @param workflowId
828
- * @param taskRefName
829
- * @param status
830
- * @param requestBody
831
- * @returns any OK
832
- * @throws ApiError
833
- */
834
- update1(workflowId: string, taskRefName: string, status: 'IN_PROGRESS' | 'CANCELED' | 'FAILED' | 'FAILED_WITH_TERMINAL_ERROR' | 'COMPLETED' | 'COMPLETED_WITH_ERRORS' | 'SCHEDULED' | 'TIMED_OUT' | 'SKIPPED', requestBody: Record<string, any>): CancelablePromise<any>;
835
- }
836
-
837
417
  declare type StartWorkflowRequest$1 = {
838
418
  name: string;
839
419
  version?: number;
@@ -983,131 +563,6 @@ declare class SchedulerResourceService {
983
563
  searchV21(start?: number, size?: number, sort?: string, freeText?: string, query?: string): CancelablePromise<SearchResultWorkflowScheduleExecutionModel>;
984
564
  }
985
565
 
986
- declare class SecretResourceService {
987
- readonly httpRequest: BaseHttpRequest;
988
- constructor(httpRequest: BaseHttpRequest);
989
- /**
990
- * Get secret value by key
991
- * @param key
992
- * @returns any OK
993
- * @throws ApiError
994
- */
995
- getSecret(key: string): CancelablePromise<any>;
996
- /**
997
- * Put a secret value by key
998
- * @param key
999
- * @param requestBody
1000
- * @returns any OK
1001
- * @throws ApiError
1002
- */
1003
- putSecret(key: string, requestBody: string): CancelablePromise<any>;
1004
- /**
1005
- * Delete a secret value by key
1006
- * @param key
1007
- * @returns any OK
1008
- * @throws ApiError
1009
- */
1010
- deleteSecret(key: string): CancelablePromise<any>;
1011
- /**
1012
- * List all secret names user can grant access to
1013
- * @returns string OK
1014
- * @throws ApiError
1015
- */
1016
- listSecretsThatUserCanGrantAccessTo(): CancelablePromise<Array<string>>;
1017
- /**
1018
- * List all secret names
1019
- * @returns any OK
1020
- * @throws ApiError
1021
- */
1022
- listAllSecretNames(): CancelablePromise<any>;
1023
- /**
1024
- * Check if secret exists
1025
- * @param key
1026
- * @returns any OK
1027
- * @throws ApiError
1028
- */
1029
- secretExists(key: string): CancelablePromise<any>;
1030
- }
1031
-
1032
- declare type TagObject = {
1033
- type?: 'METADATA' | 'RATE_LIMIT';
1034
- key?: string;
1035
- value?: any;
1036
- };
1037
-
1038
- declare type TagString = {
1039
- type?: 'METADATA' | 'RATE_LIMIT';
1040
- key?: string;
1041
- value?: string;
1042
- };
1043
-
1044
- declare class TagsExperimentalService {
1045
- readonly httpRequest: BaseHttpRequest;
1046
- constructor(httpRequest: BaseHttpRequest);
1047
- /**
1048
- * Returns all the tags of the workflow
1049
- * @param name
1050
- * @returns TagObject OK
1051
- * @throws ApiError
1052
- */
1053
- getWorkflowTags(name: string): CancelablePromise<Array<TagObject>>;
1054
- /**
1055
- * Set the tags of the workflow
1056
- * @param name
1057
- * @param requestBody
1058
- * @returns any OK
1059
- * @throws ApiError
1060
- */
1061
- setWorkflowTags(name: string, requestBody: Array<TagObject>): CancelablePromise<any>;
1062
- /**
1063
- * Adds the tag to the workflow
1064
- * @param name
1065
- * @param requestBody
1066
- * @returns any OK
1067
- * @throws ApiError
1068
- */
1069
- addWorkflowTag(name: string, requestBody: TagObject): CancelablePromise<any>;
1070
- /**
1071
- * Removes the tag of the workflow
1072
- * @param name
1073
- * @param requestBody
1074
- * @returns any OK
1075
- * @throws ApiError
1076
- */
1077
- deleteWorkflowTag(name: string, requestBody: TagObject): CancelablePromise<any>;
1078
- /**
1079
- * Returns all the tags of the task
1080
- * @param taskName
1081
- * @returns TagObject OK
1082
- * @throws ApiError
1083
- */
1084
- getTaskTags(taskName: string): CancelablePromise<Array<TagObject>>;
1085
- /**
1086
- * Adds the tag to the task
1087
- * @param taskName
1088
- * @param requestBody
1089
- * @returns any OK
1090
- * @throws ApiError
1091
- */
1092
- setTaskTags(taskName: string, requestBody: Array<TagObject>): CancelablePromise<any>;
1093
- /**
1094
- * Adds the tag to the task
1095
- * @param taskName
1096
- * @param requestBody
1097
- * @returns any OK
1098
- * @throws ApiError
1099
- */
1100
- addTaskTag(taskName: string, requestBody: TagObject): CancelablePromise<any>;
1101
- /**
1102
- * Removes the tag of the task
1103
- * @param taskName
1104
- * @param requestBody
1105
- * @returns any OK
1106
- * @throws ApiError
1107
- */
1108
- deleteTaskTag(taskName: string, requestBody: TagString): CancelablePromise<any>;
1109
- }
1110
-
1111
566
  declare type ExternalStorageLocation = {
1112
567
  uri?: string;
1113
568
  path?: string;
@@ -1120,6 +575,50 @@ declare type PollData = {
1120
575
  lastPollTime?: number;
1121
576
  };
1122
577
 
578
+ declare type Task = {
579
+ taskType?: string;
580
+ status?: 'IN_PROGRESS' | 'CANCELED' | 'FAILED' | 'FAILED_WITH_TERMINAL_ERROR' | 'COMPLETED' | 'COMPLETED_WITH_ERRORS' | 'SCHEDULED' | 'TIMED_OUT' | 'SKIPPED';
581
+ inputData?: Record<string, any>;
582
+ referenceTaskName?: string;
583
+ retryCount?: number;
584
+ seq?: number;
585
+ correlationId?: string;
586
+ pollCount?: number;
587
+ taskDefName?: string;
588
+ scheduledTime?: number;
589
+ startTime?: number;
590
+ endTime?: number;
591
+ updateTime?: number;
592
+ startDelayInSeconds?: number;
593
+ retriedTaskId?: string;
594
+ retried?: boolean;
595
+ executed?: boolean;
596
+ callbackFromWorker?: boolean;
597
+ responseTimeoutSeconds?: number;
598
+ workflowInstanceId?: string;
599
+ workflowType?: string;
600
+ taskId?: string;
601
+ reasonForIncompletion?: string;
602
+ callbackAfterSeconds?: number;
603
+ workerId?: string;
604
+ outputData?: Record<string, any>;
605
+ workflowTask?: WorkflowTask;
606
+ domain?: string;
607
+ rateLimitPerFrequency?: number;
608
+ rateLimitFrequencyInSeconds?: number;
609
+ externalInputPayloadStoragePath?: string;
610
+ externalOutputPayloadStoragePath?: string;
611
+ workflowPriority?: number;
612
+ executionNameSpace?: string;
613
+ isolationGroupId?: string;
614
+ iteration?: number;
615
+ subWorkflowId?: string;
616
+ subworkflowChanged?: boolean;
617
+ queueWaitTime?: number;
618
+ taskDefinition?: TaskDef;
619
+ loopOverTask?: boolean;
620
+ };
621
+
1123
622
  declare type SearchResultTask = {
1124
623
  totalHits?: number;
1125
624
  results?: Array<Task>;
@@ -1312,6 +811,8 @@ declare type GenerateTokenRequest = {
1312
811
  keySecret: string;
1313
812
  };
1314
813
 
814
+ declare type Response = {};
815
+
1315
816
  declare class TokenResourceService {
1316
817
  readonly httpRequest: BaseHttpRequest;
1317
818
  constructor(httpRequest: BaseHttpRequest);
@@ -1330,79 +831,6 @@ declare class TokenResourceService {
1330
831
  getUserInfo(): CancelablePromise<any>;
1331
832
  }
1332
833
 
1333
- declare type ConductorUser = {
1334
- id?: string;
1335
- name?: string;
1336
- roles?: Array<Role>;
1337
- groups?: Array<Group>;
1338
- uuid?: string;
1339
- applicationUser?: boolean;
1340
- };
1341
-
1342
- declare type UpsertUserRequest = {
1343
- /**
1344
- * User's full name
1345
- */
1346
- name: string;
1347
- roles?: 'ADMIN' | 'USER' | 'WORKER' | 'METADATA_MANAGER' | 'WORKFLOW_MANAGER';
1348
- /**
1349
- * Ids of the groups this user belongs to
1350
- */
1351
- groups?: Array<string>;
1352
- };
1353
-
1354
- declare class UserResourceService {
1355
- readonly httpRequest: BaseHttpRequest;
1356
- constructor(httpRequest: BaseHttpRequest);
1357
- /**
1358
- * Get a user by id
1359
- * @param id
1360
- * @returns any OK
1361
- * @throws ApiError
1362
- */
1363
- getUser(id: string): CancelablePromise<any>;
1364
- /**
1365
- * Create or update a user
1366
- * @param id
1367
- * @param requestBody
1368
- * @returns any OK
1369
- * @throws ApiError
1370
- */
1371
- upsertUser(id: string, requestBody: UpsertUserRequest): CancelablePromise<any>;
1372
- /**
1373
- * Delete a user
1374
- * @param id
1375
- * @returns Response OK
1376
- * @throws ApiError
1377
- */
1378
- deleteUser(id: string): CancelablePromise<Response>;
1379
- /**
1380
- * Get all users
1381
- * @param apps
1382
- * @returns ConductorUser OK
1383
- * @throws ApiError
1384
- */
1385
- listUsers(apps?: boolean): CancelablePromise<Array<ConductorUser>>;
1386
- /**
1387
- * Get the permissions this user has over workflows and tasks
1388
- * @param userId
1389
- * @returns any OK
1390
- * @throws ApiError
1391
- */
1392
- getGrantedPermissions1(userId: string): CancelablePromise<any>;
1393
- }
1394
-
1395
- declare class VersionResourceService {
1396
- readonly httpRequest: BaseHttpRequest;
1397
- constructor(httpRequest: BaseHttpRequest);
1398
- /**
1399
- * Get the server's version
1400
- * @returns string OK
1401
- * @throws ApiError
1402
- */
1403
- getVersion(): CancelablePromise<string>;
1404
- }
1405
-
1406
834
  declare type BulkResponse = {
1407
835
  bulkErrorResults?: Record<string, string>;
1408
836
  bulkSuccessfulResults?: Array<string>;
@@ -1750,23 +1178,12 @@ interface ConductorClientAPIConfig extends Omit<OpenAPIConfig, "BASE"> {
1750
1178
  serverUrl: string;
1751
1179
  }
1752
1180
  declare class ConductorClient {
1753
- readonly adminResource: AdminResourceService;
1754
- readonly applicationResource: ApplicationResourceService;
1755
- readonly authorizationResource: AuthorizationResourceService;
1756
1181
  readonly eventResource: EventResourceService;
1757
- readonly groupResource: GroupResourceService;
1758
1182
  readonly healthCheckResource: HealthCheckResourceService;
1759
1183
  readonly metadataResource: MetadataResourceService;
1760
- readonly migrationResource: MigrationResourceService;
1761
- readonly publisherConfigResource: PublisherConfigResourceService;
1762
- readonly queueAdminResource: QueueAdminResourceService;
1763
1184
  readonly schedulerResource: SchedulerResourceService;
1764
- readonly secretResource: SecretResourceService;
1765
- readonly tagsExperimental: TagsExperimentalService;
1766
1185
  readonly taskResource: TaskResourceService;
1767
1186
  readonly tokenResource: TokenResourceService;
1768
- readonly userResource: UserResourceService;
1769
- readonly versionResource: VersionResourceService;
1770
1187
  readonly workflowBulkResource: WorkflowBulkResourceService;
1771
1188
  readonly workflowResource: WorkflowResourceService;
1772
1189
  readonly request: BaseHttpRequest;
@@ -2171,6 +1588,7 @@ interface TaskManagerOptions {
2171
1588
  interface TaskManagerConfig {
2172
1589
  logger?: ConductorLogger;
2173
1590
  options?: Partial<TaskManagerOptions>;
1591
+ onError?: TaskErrorHandler;
2174
1592
  }
2175
1593
  /**
2176
1594
  * Responsible for initializing and managing the runners that poll and work different task queues.
@@ -2179,6 +1597,7 @@ declare class TaskManager {
2179
1597
  private tasks;
2180
1598
  private readonly client;
2181
1599
  private readonly logger;
1600
+ private readonly errorHandler;
2182
1601
  private workers;
2183
1602
  private readonly taskManageOptions;
2184
1603
  constructor(client: ConductorClient, workers: Array<ConductorWorker>, config?: TaskManagerConfig);
@@ -2186,12 +1605,15 @@ declare class TaskManager {
2186
1605
  stopPolling: () => void;
2187
1606
  }
2188
1607
 
1608
+ declare type TaskErrorHandler = (error: Error, task?: Task) => void;
2189
1609
  interface RunnerArgs {
2190
1610
  worker: ConductorWorker;
2191
1611
  taskResource: TaskResourceService;
2192
1612
  options: Required<TaskManagerOptions>;
2193
1613
  logger?: ConductorLogger;
1614
+ onError?: TaskErrorHandler;
2194
1615
  }
1616
+ declare const noopErrorHandler: TaskErrorHandler;
2195
1617
  /**
2196
1618
  * Responsible for polling and executing tasks from a queue.
2197
1619
  *
@@ -2207,10 +1629,12 @@ declare class TaskRunner {
2207
1629
  worker: ConductorWorker;
2208
1630
  logger: ConductorLogger;
2209
1631
  options: Required<TaskManagerOptions>;
2210
- constructor({ worker, taskResource, options, logger, }: RunnerArgs);
1632
+ errorHandler: TaskErrorHandler;
1633
+ constructor({ worker, taskResource, options, logger, onError: errorHandler, }: RunnerArgs);
2211
1634
  startPolling: () => Promise<void>;
2212
1635
  stopPolling: () => void;
2213
1636
  poll: () => Promise<void>;
1637
+ updateTaskWithRetry: (task: Task, taskResult: TaskResult$1) => Promise<void>;
2214
1638
  executeTask: (task: Task) => Promise<void>;
2215
1639
  handleUnknownError: (unknownError: unknown) => void;
2216
1640
  }
@@ -2369,4 +1793,4 @@ declare class WorkflowExecutor {
2369
1793
  updateTaskByRefName(taskReferenceName: string, workflowInstanceId: string, status: TaskResult, taskOutput: Record<string, any>): any;
2370
1794
  }
2371
1795
 
2372
- export { CancelError, CancelablePromise, CommonTaskDef, ConductorClient, ConductorError, ConductorHttpRequest, ConductorLogLevel, ConductorLogger, ConductorWorker, DefaultLogger, DefaultLoggerConfig, DoWhileTaskDef, EventTaskDef, ForkJoinDynamicDef, ForkJoinTaskDef, HttpInputParameters, HttpTaskDef, InlineTaskDef, InlineTaskInputParameters, JoinTaskDef, JsonJQTransformTaskDef, KafkaPublishInputParameters, KafkaPublishTaskDef, OnCancel, OpenAPIConfig, OrkesApiConfig, RequestType, RerunWorkflowRequest, RunnerArgs, SetVariableTaskDef, SimpleTaskDef, SkipTaskRequest, StartWorkflowRequest, SubWorkflowTaskDef, SwitchTaskDef, TaskDefTypes, TaskManager, TaskManagerConfig, TaskManagerOptions, TaskResult, TaskRunner, TaskType, TerminateTaskDef, WaitTaskDef, WorkflowDef, WorkflowExecutor, WorkflowInputParameters, conductorEventTask, doWhileTask, dynamicForkTask, eventTask, forkTask, forkTaskJoin, generate, generateDoWhileTask, generateEventTask, generateForkJoinTask, generateHTTPTask, generateInlineTask, generateJQTransformTask, generateJoinTask, generateKafkaPublishTask, generateSetVariableTask, generateSimpleTask, generateSubWorkflowTask, generateSwitchTask, generateTerminateTask, generateWaitTask, httpTask, inlineTask, joinTask, jsonJqTask, kafkaPublishTask, newLoopTask, orkesConductorClient, setVariableTask, simpleTask, sqsEventTask, subWorkflowTask, switchTask, taskGenMapper, terminateTask, waitTaskDuration, waitTaskUntil, workflow };
1796
+ export { CancelError, CancelablePromise, CommonTaskDef, ConductorClient, ConductorError, ConductorHttpRequest, ConductorLogLevel, ConductorLogger, ConductorWorker, DefaultLogger, DefaultLoggerConfig, DoWhileTaskDef, EventTaskDef, ForkJoinDynamicDef, ForkJoinTaskDef, HttpInputParameters, HttpTaskDef, InlineTaskDef, InlineTaskInputParameters, JoinTaskDef, JsonJQTransformTaskDef, KafkaPublishInputParameters, KafkaPublishTaskDef, OnCancel, OpenAPIConfig, OrkesApiConfig, RequestType, RerunWorkflowRequest, RunnerArgs, SetVariableTaskDef, SimpleTaskDef, SkipTaskRequest, StartWorkflowRequest, SubWorkflowTaskDef, SwitchTaskDef, TaskDefTypes, TaskErrorHandler, TaskManager, TaskManagerConfig, TaskManagerOptions, TaskResult, TaskRunner, TaskType, TerminateTaskDef, WaitTaskDef, WorkflowDef, WorkflowExecutor, WorkflowInputParameters, conductorEventTask, doWhileTask, dynamicForkTask, eventTask, forkTask, forkTaskJoin, generate, generateDoWhileTask, generateEventTask, generateForkJoinTask, generateHTTPTask, generateInlineTask, generateJQTransformTask, generateJoinTask, generateKafkaPublishTask, generateSetVariableTask, generateSimpleTask, generateSubWorkflowTask, generateSwitchTask, generateTerminateTask, generateWaitTask, httpTask, inlineTask, joinTask, jsonJqTask, kafkaPublishTask, newLoopTask, noopErrorHandler, orkesConductorClient, setVariableTask, simpleTask, sqsEventTask, subWorkflowTask, switchTask, taskGenMapper, terminateTask, waitTaskDuration, waitTaskUntil, workflow };