@io-orkes/conductor-javascript 1.2.3 → 2.0.0-rc2

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.
@@ -1,2186 +0,0 @@
1
- declare type ApiRequestOptions = {
2
- readonly method: 'GET' | 'PUT' | 'POST' | 'DELETE' | 'OPTIONS' | 'HEAD' | 'PATCH';
3
- readonly url: string;
4
- readonly path?: Record<string, any>;
5
- readonly cookies?: Record<string, any>;
6
- readonly headers?: Record<string, any>;
7
- readonly query?: Record<string, any>;
8
- readonly formData?: Record<string, any>;
9
- readonly body?: any;
10
- readonly mediaType?: string;
11
- readonly responseHeader?: string;
12
- readonly errors?: Record<number, string>;
13
- };
14
-
15
- declare class CancelError extends Error {
16
- constructor(message: string);
17
- get isCancelled(): boolean;
18
- }
19
- interface OnCancel {
20
- readonly isResolved: boolean;
21
- readonly isRejected: boolean;
22
- readonly isCancelled: boolean;
23
- (cancelHandler: () => void): void;
24
- }
25
- declare class CancelablePromise<T> implements Promise<T> {
26
- readonly [Symbol.toStringTag]: string;
27
- private _isResolved;
28
- private _isRejected;
29
- private _isCancelled;
30
- private readonly _cancelHandlers;
31
- private readonly _promise;
32
- private _resolve?;
33
- private _reject?;
34
- constructor(executor: (resolve: (value: T | PromiseLike<T>) => void, reject: (reason?: any) => void, onCancel: OnCancel) => void);
35
- then<TResult1 = T, TResult2 = never>(onFulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null, onRejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null): Promise<TResult1 | TResult2>;
36
- catch<TResult = never>(onRejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null): Promise<T | TResult>;
37
- finally(onFinally?: (() => void) | null): Promise<T>;
38
- cancel(): void;
39
- get isCancelled(): boolean;
40
- }
41
-
42
- declare type Resolver<T> = (options: ApiRequestOptions) => Promise<T>;
43
- declare type Headers$1 = Record<string, string>;
44
- declare type OpenAPIConfig = {
45
- BASE: string;
46
- VERSION: string;
47
- WITH_CREDENTIALS: boolean;
48
- CREDENTIALS: 'include' | 'omit' | 'same-origin';
49
- TOKEN?: string | Resolver<string>;
50
- USERNAME?: string | Resolver<string>;
51
- PASSWORD?: string | Resolver<string>;
52
- HEADERS?: Headers$1 | Resolver<Headers$1>;
53
- ENCODE_PATH?: (path: string) => string;
54
- };
55
-
56
- declare abstract class BaseHttpRequest {
57
- readonly config: OpenAPIConfig;
58
- constructor(config: OpenAPIConfig);
59
- abstract request<T>(options: ApiRequestOptions): CancelablePromise<T>;
60
- }
61
-
62
- declare type StartWorkflow = {
63
- name?: string;
64
- version?: number;
65
- correlationId?: string;
66
- input?: Record<string, any>;
67
- taskToDomain?: Record<string, string>;
68
- };
69
-
70
- declare type TaskDetails = {
71
- workflowId?: string;
72
- taskRefName?: string;
73
- output?: Record<string, any>;
74
- taskId?: string;
75
- };
76
-
77
- declare type Action = {
78
- action?: 'start_workflow' | 'complete_task' | 'fail_task';
79
- start_workflow?: StartWorkflow;
80
- complete_task?: TaskDetails;
81
- fail_task?: TaskDetails;
82
- expandInlineJSON?: boolean;
83
- };
84
-
85
- declare type EventHandler = {
86
- name: string;
87
- event: string;
88
- condition?: string;
89
- actions: Array<Action>;
90
- active?: boolean;
91
- evaluatorType?: string;
92
- };
93
-
94
- declare class EventResourceService {
95
- readonly httpRequest: BaseHttpRequest;
96
- constructor(httpRequest: BaseHttpRequest);
97
- /**
98
- * Get queue config by name
99
- * @param queueType
100
- * @param queueName
101
- * @returns any OK
102
- * @throws ApiError
103
- */
104
- getQueueConfig(queueType: string, queueName: string): CancelablePromise<any>;
105
- /**
106
- * Create or update queue config by name
107
- * @param queueType
108
- * @param queueName
109
- * @param requestBody
110
- * @returns any OK
111
- * @throws ApiError
112
- */
113
- putQueueConfig(queueType: string, queueName: string, requestBody: string): CancelablePromise<any>;
114
- /**
115
- * Delete queue config by name
116
- * @param queueType
117
- * @param queueName
118
- * @returns any OK
119
- * @throws ApiError
120
- */
121
- deleteQueueConfig(queueType: string, queueName: string): CancelablePromise<any>;
122
- /**
123
- * Get all the event handlers
124
- * @returns EventHandler OK
125
- * @throws ApiError
126
- */
127
- getEventHandlers(): CancelablePromise<Array<EventHandler>>;
128
- /**
129
- * Update an existing event handler.
130
- * @param requestBody
131
- * @returns any OK
132
- * @throws ApiError
133
- */
134
- updateEventHandler(requestBody: EventHandler): CancelablePromise<any>;
135
- /**
136
- * Add a new event handler.
137
- * @param requestBody
138
- * @returns any OK
139
- * @throws ApiError
140
- */
141
- addEventHandler(requestBody: EventHandler): CancelablePromise<any>;
142
- /**
143
- * Get all queue configs
144
- * @returns any OK
145
- * @throws ApiError
146
- */
147
- getQueueNames(): CancelablePromise<any>;
148
- /**
149
- * Remove an event handler
150
- * @param name
151
- * @returns any OK
152
- * @throws ApiError
153
- */
154
- removeEventHandlerStatus(name: string): CancelablePromise<any>;
155
- /**
156
- * Get event handlers for a given event
157
- * @param event
158
- * @param activeOnly
159
- * @returns EventHandler OK
160
- * @throws ApiError
161
- */
162
- getEventHandlersForEvent(event: string, activeOnly?: boolean): CancelablePromise<Array<EventHandler>>;
163
- }
164
-
165
- declare class HealthCheckResourceService {
166
- readonly httpRequest: BaseHttpRequest;
167
- constructor(httpRequest: BaseHttpRequest);
168
- /**
169
- * @returns any OK
170
- * @throws ApiError
171
- */
172
- doCheck(): CancelablePromise<Record<string, any>>;
173
- }
174
-
175
- declare type TaskDef = {
176
- ownerApp?: string;
177
- createTime?: number;
178
- updateTime?: number;
179
- createdBy?: string;
180
- updatedBy?: string;
181
- name: string;
182
- description?: string;
183
- retryCount?: number;
184
- timeoutSeconds: number;
185
- inputKeys?: Array<string>;
186
- outputKeys?: Array<string>;
187
- timeoutPolicy?: 'RETRY' | 'TIME_OUT_WF' | 'ALERT_ONLY';
188
- retryLogic?: 'FIXED' | 'EXPONENTIAL_BACKOFF' | 'LINEAR_BACKOFF';
189
- retryDelaySeconds?: number;
190
- responseTimeoutSeconds?: number;
191
- concurrentExecLimit?: number;
192
- inputTemplate?: Record<string, any>;
193
- rateLimitPerFrequency?: number;
194
- rateLimitFrequencyInSeconds?: number;
195
- isolationGroupId?: string;
196
- executionNameSpace?: string;
197
- ownerEmail?: string;
198
- pollTimeoutSeconds?: number;
199
- backoffScaleFactor?: number;
200
- };
201
-
202
- declare type SubWorkflowParams = {
203
- name: string;
204
- version?: number;
205
- taskToDomain?: Record<string, string>;
206
- workflowDefinition?: WorkflowDef$1;
207
- };
208
-
209
- declare type WorkflowTask = {
210
- name: string;
211
- taskReferenceName: string;
212
- description?: string;
213
- inputParameters?: Record<string, any>;
214
- type?: string;
215
- dynamicTaskNameParam?: string;
216
- /**
217
- * @deprecated
218
- */
219
- caseValueParam?: string;
220
- /**
221
- * @deprecated
222
- */
223
- caseExpression?: string;
224
- scriptExpression?: string;
225
- decisionCases?: Record<string, Array<WorkflowTask>>;
226
- /**
227
- * @deprecated
228
- */
229
- dynamicForkJoinTasksParam?: string;
230
- dynamicForkTasksParam?: string;
231
- dynamicForkTasksInputParamName?: string;
232
- defaultCase?: Array<WorkflowTask>;
233
- forkTasks?: Array<Array<WorkflowTask>>;
234
- startDelay?: number;
235
- subWorkflowParam?: SubWorkflowParams;
236
- joinOn?: Array<string>;
237
- sink?: string;
238
- optional?: boolean;
239
- taskDefinition?: TaskDef;
240
- rateLimited?: boolean;
241
- defaultExclusiveJoinTask?: Array<string>;
242
- asyncComplete?: boolean;
243
- loopCondition?: string;
244
- loopOver?: Array<WorkflowTask>;
245
- retryCount?: number;
246
- evaluatorType?: string;
247
- expression?: string;
248
- 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';
249
- };
250
-
251
- declare type WorkflowDef$1 = {
252
- ownerApp?: string;
253
- createTime?: number;
254
- updateTime?: number;
255
- createdBy?: string;
256
- updatedBy?: string;
257
- name: string;
258
- description?: string;
259
- version?: number;
260
- tasks: Array<WorkflowTask>;
261
- inputParameters?: Array<string>;
262
- outputParameters?: Record<string, any>;
263
- failureWorkflow?: string;
264
- schemaVersion?: number;
265
- restartable?: boolean;
266
- workflowStatusListenerEnabled?: boolean;
267
- ownerEmail?: string;
268
- timeoutPolicy?: 'TIME_OUT_WF' | 'ALERT_ONLY';
269
- timeoutSeconds: number;
270
- variables?: Record<string, any>;
271
- inputTemplate?: Record<string, any>;
272
- };
273
-
274
- declare class MetadataResourceService {
275
- readonly httpRequest: BaseHttpRequest;
276
- constructor(httpRequest: BaseHttpRequest);
277
- /**
278
- * Gets the task definition
279
- * @param tasktype
280
- * @param metadata
281
- * @returns TaskDef OK
282
- * @throws ApiError
283
- */
284
- getTaskDef(tasktype: string, metadata?: boolean): CancelablePromise<TaskDef>;
285
- /**
286
- * Remove a task definition
287
- * @param tasktype
288
- * @returns any OK
289
- * @throws ApiError
290
- */
291
- unregisterTaskDef(tasktype: string): CancelablePromise<any>;
292
- /**
293
- * Retrieves all workflow definition along with blueprint
294
- * @param access
295
- * @param metadata
296
- * @param tagKey
297
- * @param tagValue
298
- * @returns WorkflowDef OK
299
- * @throws ApiError
300
- */
301
- getAllWorkflows(access?: string, metadata?: boolean, tagKey?: string, tagValue?: string): CancelablePromise<Array<WorkflowDef$1>>;
302
- /**
303
- * Create or update workflow definition(s)
304
- * @param requestBody
305
- * @param overwrite
306
- * @returns any OK
307
- * @throws ApiError
308
- */
309
- update(requestBody: Array<WorkflowDef$1>, overwrite?: boolean): CancelablePromise<any>;
310
- /**
311
- * Create a new workflow definition
312
- * @param requestBody
313
- * @param overwrite
314
- * @returns any OK
315
- * @throws ApiError
316
- */
317
- create(requestBody: WorkflowDef$1, overwrite?: boolean): CancelablePromise<any>;
318
- /**
319
- * Gets all task definition
320
- * @param access
321
- * @param metadata
322
- * @param tagKey
323
- * @param tagValue
324
- * @returns TaskDef OK
325
- * @throws ApiError
326
- */
327
- getTaskDefs(access?: string, metadata?: boolean, tagKey?: string, tagValue?: string): CancelablePromise<Array<TaskDef>>;
328
- /**
329
- * Update an existing task
330
- * @param requestBody
331
- * @returns any OK
332
- * @throws ApiError
333
- */
334
- updateTaskDef(requestBody: TaskDef): CancelablePromise<any>;
335
- /**
336
- * Create or update task definition(s)
337
- * @param requestBody
338
- * @returns any OK
339
- * @throws ApiError
340
- */
341
- registerTaskDef(requestBody: Array<TaskDef>): CancelablePromise<any>;
342
- /**
343
- * Removes workflow definition. It does not remove workflows associated with the definition.
344
- * @param name
345
- * @param version
346
- * @returns any OK
347
- * @throws ApiError
348
- */
349
- unregisterWorkflowDef(name: string, version: number): CancelablePromise<any>;
350
- /**
351
- * Retrieves workflow definition along with blueprint
352
- * @param name
353
- * @param version
354
- * @param metadata
355
- * @returns WorkflowDef OK
356
- * @throws ApiError
357
- */
358
- get(name: string, version?: number, metadata?: boolean): CancelablePromise<WorkflowDef$1>;
359
- }
360
-
361
- declare type StartWorkflowRequest = {
362
- name: string;
363
- version?: number;
364
- correlationId?: string;
365
- input?: Record<string, any>;
366
- taskToDomain?: Record<string, string>;
367
- workflowDef?: WorkflowDef$1;
368
- externalInputPayloadStoragePath?: string;
369
- priority?: number;
370
- createdBy?: string;
371
- };
372
-
373
- declare type SaveScheduleRequest = {
374
- name: string;
375
- cronExpression: string;
376
- runCatchupScheduleInstances?: boolean;
377
- paused?: boolean;
378
- startWorkflowRequest?: StartWorkflowRequest;
379
- createdBy?: string;
380
- updatedBy?: string;
381
- scheduleStartTime?: number;
382
- scheduleEndTime?: number;
383
- };
384
-
385
- declare type WorkflowScheduleExecutionModel = {
386
- executionId?: string;
387
- scheduleName?: string;
388
- scheduledTime?: number;
389
- executionTime?: number;
390
- workflowName?: string;
391
- workflowId?: string;
392
- reason?: string;
393
- stackTrace?: string;
394
- startWorkflowRequest?: StartWorkflowRequest;
395
- state?: 'POLLED' | 'FAILED' | 'EXECUTED';
396
- };
397
-
398
- declare type SearchResultWorkflowScheduleExecutionModel = {
399
- totalHits?: number;
400
- results?: Array<WorkflowScheduleExecutionModel>;
401
- };
402
-
403
- declare type WorkflowSchedule = {
404
- name?: string;
405
- cronExpression?: string;
406
- runCatchupScheduleInstances?: boolean;
407
- paused?: boolean;
408
- startWorkflowRequest?: StartWorkflowRequest;
409
- scheduleStartTime?: number;
410
- scheduleEndTime?: number;
411
- createTime?: number;
412
- updatedTime?: number;
413
- createdBy?: string;
414
- updatedBy?: string;
415
- };
416
-
417
- declare class SchedulerResourceService {
418
- readonly httpRequest: BaseHttpRequest;
419
- constructor(httpRequest: BaseHttpRequest);
420
- /**
421
- * Get an existing workflow schedule by name
422
- * @param name
423
- * @returns any OK
424
- * @throws ApiError
425
- */
426
- getSchedule(name: string): CancelablePromise<any>;
427
- /**
428
- * Deletes an existing workflow schedule by name
429
- * @param name
430
- * @returns any OK
431
- * @throws ApiError
432
- */
433
- deleteSchedule(name: string): CancelablePromise<any>;
434
- /**
435
- * Get list of the next x (default 3, max 5) execution times for a scheduler
436
- * @param cronExpression
437
- * @param scheduleStartTime
438
- * @param scheduleEndTime
439
- * @param limit
440
- * @returns number OK
441
- * @throws ApiError
442
- */
443
- getNextFewSchedules(cronExpression: string, scheduleStartTime?: number, scheduleEndTime?: number, limit?: number): CancelablePromise<Array<number>>;
444
- /**
445
- * Pauses an existing schedule by name
446
- * @param name
447
- * @returns any OK
448
- * @throws ApiError
449
- */
450
- pauseSchedule(name: string): CancelablePromise<any>;
451
- /**
452
- * Pause all scheduling in a single conductor server instance (for debugging only)
453
- * @returns any OK
454
- * @throws ApiError
455
- */
456
- pauseAllSchedules(): CancelablePromise<Record<string, any>>;
457
- /**
458
- * Resume a paused schedule by name
459
- * @param name
460
- * @returns any OK
461
- * @throws ApiError
462
- */
463
- resumeSchedule(name: string): CancelablePromise<any>;
464
- /**
465
- * Requeue all execution records
466
- * @returns any OK
467
- * @throws ApiError
468
- */
469
- requeueAllExecutionRecords(): CancelablePromise<Record<string, any>>;
470
- /**
471
- * Resume all scheduling
472
- * @returns any OK
473
- * @throws ApiError
474
- */
475
- resumeAllSchedules(): CancelablePromise<Record<string, any>>;
476
- /**
477
- * Get all existing workflow schedules and optionally filter by workflow name
478
- * @param workflowName
479
- * @returns WorkflowSchedule OK
480
- * @throws ApiError
481
- */
482
- getAllSchedules(workflowName?: string): CancelablePromise<Array<WorkflowSchedule>>;
483
- /**
484
- * Create or update a schedule for a specified workflow with a corresponding start workflow request
485
- * @param requestBody
486
- * @returns any OK
487
- * @throws ApiError
488
- */
489
- saveSchedule(requestBody: SaveScheduleRequest): CancelablePromise<any>;
490
- /**
491
- * Test timeout - do not use in production
492
- * @returns any OK
493
- * @throws ApiError
494
- */
495
- testTimeout(): CancelablePromise<any>;
496
- /**
497
- * Search for workflows based on payload and other parameters
498
- * use sort options as sort=<field>:ASC|DESC e.g. sort=name&sort=workflowId:DESC. If order is not specified, defaults to ASC.
499
- * @param start
500
- * @param size
501
- * @param sort
502
- * @param freeText
503
- * @param query
504
- * @returns SearchResultWorkflowScheduleExecutionModel OK
505
- * @throws ApiError
506
- */
507
- searchV21(start?: number, size?: number, sort?: string, freeText?: string, query?: string): CancelablePromise<SearchResultWorkflowScheduleExecutionModel>;
508
- }
509
-
510
- declare type ExternalStorageLocation = {
511
- uri?: string;
512
- path?: string;
513
- };
514
-
515
- declare type PollData = {
516
- queueName?: string;
517
- domain?: string;
518
- workerId?: string;
519
- lastPollTime?: number;
520
- };
521
-
522
- declare type Task = {
523
- taskType?: string;
524
- status?: 'IN_PROGRESS' | 'CANCELED' | 'FAILED' | 'FAILED_WITH_TERMINAL_ERROR' | 'COMPLETED' | 'COMPLETED_WITH_ERRORS' | 'SCHEDULED' | 'TIMED_OUT' | 'SKIPPED';
525
- inputData?: Record<string, any>;
526
- referenceTaskName?: string;
527
- retryCount?: number;
528
- seq?: number;
529
- correlationId?: string;
530
- pollCount?: number;
531
- taskDefName?: string;
532
- scheduledTime?: number;
533
- startTime?: number;
534
- endTime?: number;
535
- updateTime?: number;
536
- startDelayInSeconds?: number;
537
- retriedTaskId?: string;
538
- retried?: boolean;
539
- executed?: boolean;
540
- callbackFromWorker?: boolean;
541
- responseTimeoutSeconds?: number;
542
- workflowInstanceId?: string;
543
- workflowType?: string;
544
- taskId?: string;
545
- reasonForIncompletion?: string;
546
- callbackAfterSeconds?: number;
547
- workerId?: string;
548
- outputData?: Record<string, any>;
549
- workflowTask?: WorkflowTask;
550
- domain?: string;
551
- rateLimitPerFrequency?: number;
552
- rateLimitFrequencyInSeconds?: number;
553
- externalInputPayloadStoragePath?: string;
554
- externalOutputPayloadStoragePath?: string;
555
- workflowPriority?: number;
556
- executionNameSpace?: string;
557
- isolationGroupId?: string;
558
- iteration?: number;
559
- subWorkflowId?: string;
560
- subworkflowChanged?: boolean;
561
- queueWaitTime?: number;
562
- taskDefinition?: TaskDef;
563
- loopOverTask?: boolean;
564
- };
565
-
566
- declare type SearchResultTask = {
567
- totalHits?: number;
568
- results?: Array<Task>;
569
- };
570
-
571
- declare type TaskSummary = {
572
- workflowId?: string;
573
- workflowType?: string;
574
- correlationId?: string;
575
- scheduledTime?: string;
576
- startTime?: string;
577
- updateTime?: string;
578
- endTime?: string;
579
- status?: 'IN_PROGRESS' | 'CANCELED' | 'FAILED' | 'FAILED_WITH_TERMINAL_ERROR' | 'COMPLETED' | 'COMPLETED_WITH_ERRORS' | 'SCHEDULED' | 'TIMED_OUT' | 'SKIPPED';
580
- reasonForIncompletion?: string;
581
- executionTime?: number;
582
- queueWaitTime?: number;
583
- taskDefName?: string;
584
- taskType?: string;
585
- input?: string;
586
- output?: string;
587
- taskId?: string;
588
- externalInputPayloadStoragePath?: string;
589
- externalOutputPayloadStoragePath?: string;
590
- workflowPriority?: number;
591
- };
592
-
593
- declare type SearchResultTaskSummary = {
594
- totalHits?: number;
595
- results?: Array<TaskSummary>;
596
- };
597
-
598
- declare type TaskExecLog = {
599
- log?: string;
600
- taskId?: string;
601
- createdTime?: number;
602
- };
603
-
604
- declare type TaskResult = {
605
- workflowInstanceId: string;
606
- taskId: string;
607
- reasonForIncompletion?: string;
608
- callbackAfterSeconds?: number;
609
- workerId?: string;
610
- status?: 'IN_PROGRESS' | 'FAILED' | 'FAILED_WITH_TERMINAL_ERROR' | 'COMPLETED';
611
- outputData?: Record<string, any>;
612
- logs?: Array<TaskExecLog>;
613
- externalOutputPayloadStoragePath?: string;
614
- subWorkflowId?: string;
615
- };
616
-
617
- declare class TaskResourceService {
618
- readonly httpRequest: BaseHttpRequest;
619
- constructor(httpRequest: BaseHttpRequest);
620
- /**
621
- * Poll for a task of a certain type
622
- * @param tasktype
623
- * @param workerid
624
- * @param domain
625
- * @returns Task OK
626
- * @throws ApiError
627
- */
628
- poll(tasktype: string, workerid?: string, domain?: string): CancelablePromise<Task>;
629
- /**
630
- * Get the details about each queue
631
- * @returns number OK
632
- * @throws ApiError
633
- */
634
- allVerbose(): CancelablePromise<Record<string, Record<string, Record<string, number>>>>;
635
- /**
636
- * Update a task By Ref Name
637
- * @param workflowId
638
- * @param taskRefName
639
- * @param status
640
- * @param requestBody
641
- * @returns string OK
642
- * @throws ApiError
643
- */
644
- updateTask(workflowId: string, taskRefName: string, status: 'IN_PROGRESS' | 'FAILED' | 'FAILED_WITH_TERMINAL_ERROR' | 'COMPLETED', requestBody: Record<string, any>): CancelablePromise<string>;
645
- /**
646
- * Get task by Id
647
- * @param taskId
648
- * @returns Task OK
649
- * @throws ApiError
650
- */
651
- getTask(taskId: string): CancelablePromise<Task>;
652
- /**
653
- * Get the details about each queue
654
- * @returns number OK
655
- * @throws ApiError
656
- */
657
- all(): CancelablePromise<Record<string, number>>;
658
- /**
659
- * Requeue pending tasks
660
- * @param taskType
661
- * @returns string OK
662
- * @throws ApiError
663
- */
664
- requeuePendingTask(taskType: string): CancelablePromise<string>;
665
- /**
666
- * Search for tasks based in payload and other parameters
667
- * use sort options as sort=<field>:ASC|DESC e.g. sort=name&sort=workflowId:DESC. If order is not specified, defaults to ASC
668
- * @param start
669
- * @param size
670
- * @param sort
671
- * @param freeText
672
- * @param query
673
- * @returns SearchResultTaskSummary OK
674
- * @throws ApiError
675
- */
676
- search(start?: number, size?: number, sort?: string, freeText?: string, query?: string): CancelablePromise<SearchResultTaskSummary>;
677
- /**
678
- * Search for tasks based in payload and other parameters
679
- * use sort options as sort=<field>:ASC|DESC e.g. sort=name&sort=workflowId:DESC. If order is not specified, defaults to ASC
680
- * @param start
681
- * @param size
682
- * @param sort
683
- * @param freeText
684
- * @param query
685
- * @returns SearchResultTask OK
686
- * @throws ApiError
687
- */
688
- searchV22(start?: number, size?: number, sort?: string, freeText?: string, query?: string): CancelablePromise<SearchResultTask>;
689
- /**
690
- * Get the last poll data for a given task type
691
- * @param taskType
692
- * @returns PollData OK
693
- * @throws ApiError
694
- */
695
- getPollData(taskType: string): CancelablePromise<Array<PollData>>;
696
- /**
697
- * Get Task Execution Logs
698
- * @param taskId
699
- * @returns TaskExecLog OK
700
- * @throws ApiError
701
- */
702
- getTaskLogs(taskId: string): CancelablePromise<Array<TaskExecLog>>;
703
- /**
704
- * Log Task Execution Details
705
- * @param taskId
706
- * @param requestBody
707
- * @returns any OK
708
- * @throws ApiError
709
- */
710
- log(taskId: string, requestBody: string): CancelablePromise<any>;
711
- /**
712
- * Get the last poll data for all task types
713
- * @returns PollData OK
714
- * @throws ApiError
715
- */
716
- getAllPollData(): CancelablePromise<Array<PollData>>;
717
- /**
718
- * Batch poll for a task of a certain type
719
- * @param tasktype
720
- * @param workerid
721
- * @param domain
722
- * @param count
723
- * @param timeout
724
- * @returns Task OK
725
- * @throws ApiError
726
- */
727
- batchPoll(tasktype: string, workerid?: string, domain?: string, count?: number, timeout?: number): CancelablePromise<Array<Task>>;
728
- /**
729
- * Update a task
730
- * @param requestBody
731
- * @returns string OK
732
- * @throws ApiError
733
- */
734
- updateTask1(requestBody: TaskResult): CancelablePromise<string>;
735
- /**
736
- * Get Task type queue sizes
737
- * @param taskType
738
- * @returns number OK
739
- * @throws ApiError
740
- */
741
- size1(taskType?: Array<string>): CancelablePromise<Record<string, number>>;
742
- /**
743
- * Get the external uri where the task payload is to be stored
744
- * @param path
745
- * @param operation
746
- * @param payloadType
747
- * @returns ExternalStorageLocation OK
748
- * @throws ApiError
749
- */
750
- getExternalStorageLocation1(path: string, operation: string, payloadType: string): CancelablePromise<ExternalStorageLocation>;
751
- }
752
-
753
- declare type GenerateTokenRequest = {
754
- keyId: string;
755
- keySecret: string;
756
- refreshTokenInterval?: number;
757
- };
758
-
759
- declare type Response$1 = {};
760
-
761
- declare class TokenResourceService {
762
- readonly httpRequest: BaseHttpRequest;
763
- constructor(httpRequest: BaseHttpRequest);
764
- /**
765
- * Generate JWT with the given access key
766
- * @param requestBody
767
- * @returns Response OK
768
- * @throws ApiError
769
- */
770
- generateToken(requestBody: GenerateTokenRequest): CancelablePromise<Response$1>;
771
- /**
772
- * Get the user info from the token
773
- * @returns any OK
774
- * @throws ApiError
775
- */
776
- getUserInfo(): CancelablePromise<any>;
777
- }
778
-
779
- declare type BulkResponse = {
780
- bulkErrorResults?: Record<string, string>;
781
- bulkSuccessfulResults?: Array<string>;
782
- };
783
-
784
- declare class WorkflowBulkResourceService {
785
- readonly httpRequest: BaseHttpRequest;
786
- constructor(httpRequest: BaseHttpRequest);
787
- /**
788
- * Retry the last failed task for each workflow from the list
789
- * @param requestBody
790
- * @returns BulkResponse OK
791
- * @throws ApiError
792
- */
793
- retry(requestBody: Array<string>): CancelablePromise<BulkResponse>;
794
- /**
795
- * Restart the list of completed workflow
796
- * @param requestBody
797
- * @param useLatestDefinitions
798
- * @returns BulkResponse OK
799
- * @throws ApiError
800
- */
801
- restart(requestBody: Array<string>, useLatestDefinitions?: boolean): CancelablePromise<BulkResponse>;
802
- /**
803
- * Terminate workflows execution
804
- * @param requestBody
805
- * @param reason
806
- * @returns BulkResponse OK
807
- * @throws ApiError
808
- */
809
- terminate(requestBody: Array<string>, reason?: string): CancelablePromise<BulkResponse>;
810
- /**
811
- * Resume the list of workflows
812
- * @param requestBody
813
- * @returns BulkResponse OK
814
- * @throws ApiError
815
- */
816
- resumeWorkflow(requestBody: Array<string>): CancelablePromise<BulkResponse>;
817
- /**
818
- * Pause the list of workflows
819
- * @param requestBody
820
- * @returns BulkResponse OK
821
- * @throws ApiError
822
- */
823
- pauseWorkflow1(requestBody: Array<string>): CancelablePromise<BulkResponse>;
824
- }
825
-
826
- declare type RerunWorkflowRequest = {
827
- reRunFromWorkflowId?: string;
828
- workflowInput?: Record<string, any>;
829
- reRunFromTaskId?: string;
830
- taskInput?: Record<string, any>;
831
- correlationId?: string;
832
- };
833
-
834
- declare type WorkflowSummary = {
835
- workflowType?: string;
836
- version?: number;
837
- workflowId?: string;
838
- correlationId?: string;
839
- startTime?: string;
840
- updateTime?: string;
841
- endTime?: string;
842
- status?: 'RUNNING' | 'COMPLETED' | 'FAILED' | 'TIMED_OUT' | 'TERMINATED' | 'PAUSED';
843
- input?: string;
844
- output?: string;
845
- reasonForIncompletion?: string;
846
- executionTime?: number;
847
- event?: string;
848
- failedReferenceTaskNames?: string;
849
- externalInputPayloadStoragePath?: string;
850
- externalOutputPayloadStoragePath?: string;
851
- priority?: number;
852
- createdBy?: string;
853
- outputSize?: number;
854
- inputSize?: number;
855
- };
856
-
857
- declare type ScrollableSearchResultWorkflowSummary = {
858
- results?: Array<WorkflowSummary>;
859
- queryId?: string;
860
- };
861
-
862
- declare type Workflow = {
863
- ownerApp?: string;
864
- createTime?: number;
865
- updateTime?: number;
866
- createdBy?: string;
867
- updatedBy?: string;
868
- status?: 'RUNNING' | 'COMPLETED' | 'FAILED' | 'TIMED_OUT' | 'TERMINATED' | 'PAUSED';
869
- endTime?: number;
870
- workflowId?: string;
871
- parentWorkflowId?: string;
872
- parentWorkflowTaskId?: string;
873
- tasks?: Array<Task>;
874
- input?: Record<string, any>;
875
- output?: Record<string, any>;
876
- correlationId?: string;
877
- reRunFromWorkflowId?: string;
878
- reasonForIncompletion?: string;
879
- event?: string;
880
- taskToDomain?: Record<string, string>;
881
- failedReferenceTaskNames?: Array<string>;
882
- workflowDefinition?: WorkflowDef$1;
883
- externalInputPayloadStoragePath?: string;
884
- externalOutputPayloadStoragePath?: string;
885
- priority?: number;
886
- variables?: Record<string, any>;
887
- lastRetriedTime?: number;
888
- startTime?: number;
889
- workflowVersion?: number;
890
- workflowName?: string;
891
- };
892
-
893
- declare type SearchResultWorkflow = {
894
- totalHits?: number;
895
- results?: Array<Workflow>;
896
- };
897
-
898
- declare type SearchResultWorkflowSummary = {
899
- totalHits?: number;
900
- results?: Array<WorkflowSummary>;
901
- };
902
-
903
- declare type SkipTaskRequest = {
904
- taskInput?: Record<string, any>;
905
- taskOutput?: Record<string, any>;
906
- };
907
-
908
- declare type WorkflowRun = {
909
- correlationId?: string;
910
- createTime?: number;
911
- createdBy?: string;
912
- priority?: number;
913
- requestId?: string;
914
- status?: string;
915
- tasks?: Array<Task>;
916
- updateTime?: number;
917
- workflowId?: string;
918
- variables?: Record<string, object>;
919
- input?: Record<string, object>;
920
- output?: Record<string, object>;
921
- };
922
-
923
- declare type WorkflowStatus = {
924
- workflowId?: string;
925
- correlationId?: string;
926
- output?: Record<string, any>;
927
- variables?: Record<string, any>;
928
- status?: 'RUNNING' | 'COMPLETED' | 'FAILED' | 'TIMED_OUT' | 'TERMINATED' | 'PAUSED';
929
- };
930
-
931
- declare class WorkflowResourceService {
932
- readonly httpRequest: BaseHttpRequest;
933
- constructor(httpRequest: BaseHttpRequest);
934
- /**
935
- * Retrieve all the running workflows
936
- * @param name
937
- * @param version
938
- * @param startTime
939
- * @param endTime
940
- * @returns string OK
941
- * @throws ApiError
942
- */
943
- getRunningWorkflow(name: string, version?: number, startTime?: number, endTime?: number): CancelablePromise<Array<string>>;
944
- /**
945
- * Execute a workflow synchronously
946
- * @param body
947
- * @param name
948
- * @param version
949
- * @param requestId
950
- * @param waitUntilTaskRef
951
- * @param callback
952
- * @returns workflowRun
953
- * @throws ApiError
954
- */
955
- executeWorkflow(body: StartWorkflowRequest, name: string, version: number, requestId: string, waitUntilTaskRef: string): CancelablePromise<WorkflowRun>;
956
- /**
957
- * Start a new workflow with StartWorkflowRequest, which allows task to be executed in a domain
958
- * @param requestBody
959
- * @returns string OK
960
- * @throws ApiError
961
- */
962
- startWorkflow(requestBody: StartWorkflowRequest): CancelablePromise<string>;
963
- /**
964
- * Starts the decision task for a workflow
965
- * @param workflowId
966
- * @returns any OK
967
- * @throws ApiError
968
- */
969
- decide(workflowId: string): CancelablePromise<any>;
970
- /**
971
- * Reruns the workflow from a specific task
972
- * @param workflowId
973
- * @param requestBody
974
- * @returns string OK
975
- * @throws ApiError
976
- */
977
- rerun(workflowId: string, requestBody: RerunWorkflowRequest): CancelablePromise<string>;
978
- /**
979
- * Search for workflows based on payload and other parameters
980
- * use sort options as sort=<field>:ASC|DESC e.g. sort=name&sort=workflowId:DESC. If order is not specified, defaults to ASC.
981
- * @param start
982
- * @param size
983
- * @param sort
984
- * @param freeText
985
- * @param query
986
- * @returns SearchResultWorkflow OK
987
- * @throws ApiError
988
- */
989
- searchV21(start?: number, size?: number, sort?: string, freeText?: string, query?: string): CancelablePromise<SearchResultWorkflow>;
990
- /**
991
- * Pauses the workflow
992
- * @param workflowId
993
- * @returns any OK
994
- * @throws ApiError
995
- */
996
- pauseWorkflow(workflowId: string): CancelablePromise<any>;
997
- /**
998
- * Skips a given task from a current running workflow
999
- * @param workflowId
1000
- * @param taskReferenceName
1001
- * @param requestBody
1002
- * @returns any OK
1003
- * @throws ApiError
1004
- */
1005
- skipTaskFromWorkflow(workflowId: string, taskReferenceName: string, requestBody?: SkipTaskRequest): CancelablePromise<any>;
1006
- /**
1007
- * Lists workflows for the given correlation id list
1008
- * @param name
1009
- * @param requestBody
1010
- * @param includeClosed
1011
- * @param includeTasks
1012
- * @returns Workflow OK
1013
- * @throws ApiError
1014
- */
1015
- getWorkflows(name: string, requestBody: Array<string>, includeClosed?: boolean, includeTasks?: boolean): CancelablePromise<Record<string, Array<Workflow>>>;
1016
- /**
1017
- * Gets the workflow by workflow id
1018
- * @param workflowId
1019
- * @param includeOutput
1020
- * @param includeVariables
1021
- * @returns WorkflowStatus OK
1022
- * @throws ApiError
1023
- */
1024
- getWorkflowStatusSummary(workflowId: string, includeOutput?: boolean, includeVariables?: boolean): CancelablePromise<WorkflowStatus>;
1025
- /**
1026
- * Lists workflows for the given correlation id
1027
- * @param name
1028
- * @param correlationId
1029
- * @param includeClosed
1030
- * @param includeTasks
1031
- * @returns Workflow OK
1032
- * @throws ApiError
1033
- */
1034
- getWorkflows1(name: string, correlationId: string, includeClosed?: boolean, includeTasks?: boolean): CancelablePromise<Array<Workflow>>;
1035
- /**
1036
- * Retries the last failed task
1037
- * @param workflowId
1038
- * @param resumeSubworkflowTasks
1039
- * @returns void
1040
- * @throws ApiError
1041
- */
1042
- retry1(workflowId: string, resumeSubworkflowTasks?: boolean): CancelablePromise<void>;
1043
- /**
1044
- * Gets the workflow by workflow id
1045
- * @param workflowId
1046
- * @param includeTasks
1047
- * @returns Workflow OK
1048
- * @throws ApiError
1049
- */
1050
- getExecutionStatus(workflowId: string, includeTasks?: boolean): CancelablePromise<Workflow>;
1051
- /**
1052
- * Terminate workflow execution
1053
- * @param workflowId
1054
- * @param reason
1055
- * @returns any OK
1056
- * @throws ApiError
1057
- */
1058
- terminate1(workflowId: string, reason?: string): CancelablePromise<any>;
1059
- /**
1060
- * Resumes the workflow
1061
- * @param workflowId
1062
- * @returns any OK
1063
- * @throws ApiError
1064
- */
1065
- resumeWorkflow(workflowId: string): CancelablePromise<any>;
1066
- /**
1067
- * Removes the workflow from the system
1068
- * @param workflowId
1069
- * @param archiveWorkflow
1070
- * @returns any OK
1071
- * @throws ApiError
1072
- */
1073
- delete(workflowId: string, archiveWorkflow?: boolean): CancelablePromise<any>;
1074
- /**
1075
- * Search for workflows based on task parameters
1076
- * use sort options as sort=<field>:ASC|DESC e.g. sort=name&sort=workflowId:DESC. If order is not specified, defaults to ASC
1077
- * @param start
1078
- * @param size
1079
- * @param sort
1080
- * @param freeText
1081
- * @param query
1082
- * @returns SearchResultWorkflowSummary OK
1083
- * @throws ApiError
1084
- */
1085
- searchWorkflowsByTasks(start?: number, size?: number, sort?: string, freeText?: string, query?: string): CancelablePromise<SearchResultWorkflowSummary>;
1086
- /**
1087
- * Get the uri and path of the external storage where the workflow payload is to be stored
1088
- * @param path
1089
- * @param operation
1090
- * @param payloadType
1091
- * @returns ExternalStorageLocation OK
1092
- * @throws ApiError
1093
- */
1094
- getExternalStorageLocation(path: string, operation: string, payloadType: string): CancelablePromise<ExternalStorageLocation>;
1095
- /**
1096
- * Start a new workflow. Returns the ID of the workflow instance that can be later used for tracking
1097
- * @param name
1098
- * @param requestBody
1099
- * @param version
1100
- * @param correlationId
1101
- * @param priority
1102
- * @returns string OK
1103
- * @throws ApiError
1104
- */
1105
- startWorkflow1(name: string, requestBody: Record<string, any>, version?: number, correlationId?: string, priority?: number): CancelablePromise<string>;
1106
- /**
1107
- * Restarts a completed workflow
1108
- * @param workflowId
1109
- * @param useLatestDefinitions
1110
- * @returns void
1111
- * @throws ApiError
1112
- */
1113
- restart1(workflowId: string, useLatestDefinitions?: boolean): CancelablePromise<void>;
1114
- /**
1115
- * Search for workflows based on payload and other parameters
1116
- * use sort options as sort=<field>:ASC|DESC e.g. sort=name&sort=workflowId:DESC. If order is not specified, defaults to ASC.
1117
- * @param queryId
1118
- * @param start
1119
- * @param size
1120
- * @param sort
1121
- * @param freeText
1122
- * @param query
1123
- * @param skipCache
1124
- * @returns ScrollableSearchResultWorkflowSummary OK
1125
- * @throws ApiError
1126
- */
1127
- search1(queryId?: string, start?: number, size?: number, sort?: string, freeText?: string, query?: string, skipCache?: boolean): CancelablePromise<ScrollableSearchResultWorkflowSummary>;
1128
- /**
1129
- * Search for workflows based on task parameters
1130
- * use sort options as sort=<field>:ASC|DESC e.g. sort=name&sort=workflowId:DESC. If order is not specified, defaults to ASC
1131
- * @param start
1132
- * @param size
1133
- * @param sort
1134
- * @param freeText
1135
- * @param query
1136
- * @returns SearchResultWorkflow OK
1137
- * @throws ApiError
1138
- */
1139
- searchWorkflowsByTasksV2(start?: number, size?: number, sort?: string, freeText?: string, query?: string): CancelablePromise<SearchResultWorkflow>;
1140
- /**
1141
- * Resets callback times of all non-terminal SIMPLE tasks to 0
1142
- * @param workflowId
1143
- * @returns void
1144
- * @throws ApiError
1145
- */
1146
- resetWorkflow(workflowId: string): CancelablePromise<void>;
1147
- }
1148
-
1149
- /**
1150
- * Request method
1151
- * @param config The OpenAPI configuration object
1152
- * @param options The request options from the service
1153
- * @returns CancelablePromise<T>
1154
- * @throws ApiError
1155
- */
1156
- declare const request: <T>(config: OpenAPIConfig, options: ApiRequestOptions) => CancelablePromise<T>;
1157
-
1158
- /**
1159
- * A handler to modify requests made by ConductorClient. Useful for metrics/option transformation/etc.
1160
- *
1161
- * @remarks
1162
- * Example: Customizing the request URL
1163
- * ```
1164
- *
1165
- * const requestCustomizer = (request, config, options) => {
1166
- * const url = options.url.replace(/^\/api/, '')
1167
- * return request(config, {...options, url });
1168
- * }
1169
- * const config = { BASE: "https://my-api.com"}
1170
- * const client = new ConductorClient(config, requestCustomizer)
1171
- * ```
1172
- *
1173
- * @param request the underlying node-fetch powered function
1174
- * @param config @see OpenAPIConfig
1175
- * @param options {see ApiRequestOptions}
1176
- */
1177
- declare type RequestType = typeof request;
1178
- declare type ConductorHttpRequest = <T>(request: RequestType, config: OpenAPIConfig, options: ApiRequestOptions) => CancelablePromise<T>;
1179
-
1180
- declare type AssignmentPolicy = {
1181
- type: string;
1182
- };
1183
-
1184
- declare type FFAAssignment = AssignmentPolicy;
1185
-
1186
- declare type Fixed = (AssignmentPolicy & {
1187
- assignee?: string;
1188
- assigneeType?: 'EXTERNAL_USER' | 'EXTERNAL_GROUP' | 'CONDUCTOR_USER' | 'CONDUCTOR_GROUP';
1189
- });
1190
-
1191
- declare type TimeoutPolicy = {
1192
- type: string;
1193
- };
1194
-
1195
- declare type BackToAssigment = (TimeoutPolicy & {
1196
- timeoutSeconds?: number;
1197
- });
1198
-
1199
- declare type ClearAssigment = (TimeoutPolicy & {
1200
- timeoutSeconds?: number;
1201
- });
1202
-
1203
- declare type Escalate = (TimeoutPolicy & {
1204
- subjects?: Array<string>;
1205
- timeoutSeconds?: number;
1206
- } & {
1207
- subjects: Array<string>;
1208
- });
1209
-
1210
- declare type LeastBusyGroupMemberAssignment = (AssignmentPolicy & {
1211
- groupId?: string;
1212
- });
1213
-
1214
- declare type Never = TimeoutPolicy;
1215
-
1216
- declare type Terminate = (TimeoutPolicy & {
1217
- timeoutSeconds?: number;
1218
- });
1219
-
1220
- declare type HumanTaskEntry = {
1221
- assignee?: string;
1222
- assigneeType?: 'EXTERNAL_USER' | 'EXTERNAL_GROUP' | 'CONDUCTOR_USER' | 'CONDUCTOR_GROUP';
1223
- assignmentPolicy?: (FFAAssignment | Fixed | LeastBusyGroupMemberAssignment);
1224
- claimedBy?: string;
1225
- createdBy?: string;
1226
- createdOn?: number;
1227
- escalatedAt?: number;
1228
- output?: Record<string, Record<string, any>>;
1229
- owners?: Array<string>;
1230
- predefinedInput?: Record<string, Record<string, any>>;
1231
- state?: 'PENDING' | 'ASSIGNED' | 'IN_PROGRESS' | 'COMPLETED' | 'TIMED_OUT';
1232
- taskId?: string;
1233
- taskName?: string;
1234
- taskRefName?: string;
1235
- templateId?: string;
1236
- timeoutPolicy?: (BackToAssigment | ClearAssigment | Escalate | Never | Terminate);
1237
- workflowId?: string;
1238
- workflowName?: string;
1239
- };
1240
-
1241
- declare type HTScrollableSearchResultHumanTaskEntry = {
1242
- queryId?: string;
1243
- results?: Array<HumanTaskEntry>;
1244
- };
1245
-
1246
- declare type HumanTaskActionLogEntry = {
1247
- action?: string;
1248
- actionTime?: number;
1249
- cause?: string;
1250
- id?: string;
1251
- taskId?: string;
1252
- taskRefName?: string;
1253
- workflowId?: string;
1254
- workflowName?: string;
1255
- };
1256
-
1257
- declare type HumanTaskLoad = {
1258
- assignedUser?: string;
1259
- count?: number;
1260
- taskRefName?: string;
1261
- workflowName?: string;
1262
- };
1263
-
1264
- declare type HumanTaskStateLogEntry = {
1265
- assignee?: string;
1266
- assigneeType?: 'EXTERNAL_USER' | 'EXTERNAL_GROUP' | 'CONDUCTOR_USER' | 'CONDUCTOR_GROUP';
1267
- claimedBy?: string;
1268
- id?: string;
1269
- state?: 'PENDING' | 'ASSIGNED' | 'IN_PROGRESS' | 'COMPLETED' | 'TIMED_OUT';
1270
- stateEnd?: number;
1271
- stateStart?: number;
1272
- taskId?: string;
1273
- taskRefName?: string;
1274
- workflowId?: string;
1275
- workflowName?: string;
1276
- };
1277
-
1278
- declare type HumanTaskTemplate = {
1279
- jsonSchema: Record<string, Record<string, any>>;
1280
- name: string;
1281
- templateUI: Record<string, Record<string, any>>;
1282
- version?: number;
1283
- };
1284
-
1285
- declare type HumanTaskTemplateEntry = {
1286
- createdBy?: string;
1287
- createdOn?: number;
1288
- id?: string;
1289
- jsonSchema?: Record<string, Record<string, any>>;
1290
- name?: string;
1291
- templateUI?: Record<string, Record<string, any>>;
1292
- updatedBy?: string;
1293
- updatedOn?: number;
1294
- version?: number;
1295
- };
1296
-
1297
- declare type SearchResultHumanTaskEntry = {
1298
- results?: Array<HumanTaskEntry>;
1299
- totalHits?: number;
1300
- };
1301
-
1302
- declare class HumanTaskService {
1303
- readonly httpRequest: BaseHttpRequest;
1304
- constructor(httpRequest: BaseHttpRequest);
1305
- /**
1306
- * List tasks by filters - task name, state, assignee, assignee type, claimed
1307
- * @param state
1308
- * @param assignee
1309
- * @param assigneeType
1310
- * @param claimedBy
1311
- * @param taskName
1312
- * @param freeText
1313
- * @param includeInputOutput
1314
- * @returns SearchResultHumanTaskEntry OK
1315
- * @throws ApiError
1316
- */
1317
- getTasksByFilter(state: 'PENDING' | 'ASSIGNED' | 'IN_PROGRESS' | 'COMPLETED' | 'TIMED_OUT', assignee?: string, assigneeType?: 'EXTERNAL_USER' | 'EXTERNAL_GROUP' | 'CONDUCTOR_USER' | 'CONDUCTOR_GROUP', claimedBy?: string, taskName?: string, freeText?: string, includeInputOutput?: boolean): CancelablePromise<SearchResultHumanTaskEntry>;
1318
- /**
1319
- * Get task load grouped by workflow name and task ref name per user
1320
- * @returns HumanTaskLoad OK
1321
- * @throws ApiError
1322
- */
1323
- getTaskLoad(): CancelablePromise<Array<HumanTaskLoad>>;
1324
- /**
1325
- * Search human tasks
1326
- * @param queryId
1327
- * @param start
1328
- * @param size
1329
- * @param freeText
1330
- * @param query
1331
- * @param jsonQuery
1332
- * @param includeInputOutput
1333
- * @returns HTScrollableSearchResultHumanTaskEntry OK
1334
- * @throws ApiError
1335
- */
1336
- search1(queryId?: string, start?: number, size?: number, freeText?: string, query?: string, jsonQuery?: string, includeInputOutput?: boolean): CancelablePromise<HTScrollableSearchResultHumanTaskEntry>;
1337
- /**
1338
- * If the workflow is disconnected from tasks, this API can be used to clean up
1339
- * @param taskId
1340
- * @returns any OK
1341
- * @throws ApiError
1342
- */
1343
- updateTaskOutput1(taskId: string): CancelablePromise<any>;
1344
- /**
1345
- * Get a task
1346
- * @param taskId
1347
- * @returns HumanTaskEntry OK
1348
- * @throws ApiError
1349
- */
1350
- getTask1(taskId: string): CancelablePromise<HumanTaskEntry>;
1351
- /**
1352
- * Get human task action log entries by task id
1353
- * @param taskId
1354
- * @returns HumanTaskActionLogEntry OK
1355
- * @throws ApiError
1356
- */
1357
- getActionLogs(taskId: string): CancelablePromise<Array<HumanTaskActionLogEntry>>;
1358
- /**
1359
- * Claim a task by authenticated Conductor user
1360
- * @param taskId
1361
- * @returns any OK
1362
- * @throws ApiError
1363
- */
1364
- claimTask(taskId: string): CancelablePromise<any>;
1365
- /**
1366
- * Claim a task to an external user
1367
- * @param taskId
1368
- * @param userId
1369
- * @returns any OK
1370
- * @throws ApiError
1371
- */
1372
- assignAndClaim(taskId: string, userId: string): CancelablePromise<any>;
1373
- /**
1374
- * Release a task without completing it
1375
- * @param taskId
1376
- * @param requestBody
1377
- * @returns any OK
1378
- * @throws ApiError
1379
- */
1380
- reassignTask(taskId: string, requestBody: (FFAAssignment | Fixed | LeastBusyGroupMemberAssignment)): CancelablePromise<any>;
1381
- /**
1382
- * Release a task without completing it
1383
- * @param taskId
1384
- * @returns any OK
1385
- * @throws ApiError
1386
- */
1387
- releaseTask(taskId: string): CancelablePromise<any>;
1388
- /**
1389
- * Get human task state log entries by task id
1390
- * @param taskId
1391
- * @returns HumanTaskStateLogEntry OK
1392
- * @throws ApiError
1393
- */
1394
- getStateLogs(taskId: string): CancelablePromise<Array<HumanTaskStateLogEntry>>;
1395
- /**
1396
- * Update task output, optionally complete
1397
- * @param taskId
1398
- * @param requestBody
1399
- * @param complete
1400
- * @returns any OK
1401
- * @throws ApiError
1402
- */
1403
- updateTaskOutput(taskId: string, requestBody: Record<string, Record<string, any>>, complete?: boolean): CancelablePromise<any>;
1404
- /**
1405
- * Delete human task templates by name
1406
- * @param name
1407
- * @returns any OK
1408
- * @throws ApiError
1409
- */
1410
- deleteTemplatesByName(name: string): CancelablePromise<any>;
1411
- /**
1412
- * List all human task templates or get templates by name, or a template by name and version
1413
- * @param name
1414
- * @param version
1415
- * @returns HumanTaskTemplateEntry OK
1416
- * @throws ApiError
1417
- */
1418
- getAllTemplates(name?: string, version?: number): CancelablePromise<Array<HumanTaskTemplateEntry>>;
1419
- /**
1420
- * Save human task template
1421
- * @param requestBody
1422
- * @param newVersion
1423
- * @returns string OK
1424
- * @throws ApiError
1425
- */
1426
- saveTemplate(requestBody: HumanTaskTemplate, newVersion?: boolean): CancelablePromise<string>;
1427
- /**
1428
- * Delete human task template
1429
- * @param id
1430
- * @returns any OK
1431
- * @throws ApiError
1432
- */
1433
- deleteTemplateById(id: string): CancelablePromise<any>;
1434
- /**
1435
- * Get human task template by id
1436
- * @param id
1437
- * @returns HumanTaskTemplateEntry OK
1438
- * @throws ApiError
1439
- */
1440
- getTemplateById(id: string): CancelablePromise<HumanTaskTemplateEntry>;
1441
- }
1442
-
1443
- declare class HumanTaskResourceService {
1444
- readonly httpRequest: BaseHttpRequest;
1445
- constructor(httpRequest: BaseHttpRequest);
1446
- /**
1447
- * Get Conductor task by id (for human tasks only)
1448
- * @param taskId
1449
- * @returns Task OK
1450
- * @throws ApiError
1451
- */
1452
- getConductorTaskById(taskId: string): CancelablePromise<Task>;
1453
- }
1454
-
1455
- interface ConductorClientAPIConfig extends Omit<OpenAPIConfig, "BASE"> {
1456
- serverUrl: string;
1457
- }
1458
- declare class ConductorClient {
1459
- readonly eventResource: EventResourceService;
1460
- readonly healthCheckResource: HealthCheckResourceService;
1461
- readonly metadataResource: MetadataResourceService;
1462
- readonly schedulerResource: SchedulerResourceService;
1463
- readonly taskResource: TaskResourceService;
1464
- readonly tokenResource: TokenResourceService;
1465
- readonly workflowBulkResource: WorkflowBulkResourceService;
1466
- readonly workflowResource: WorkflowResourceService;
1467
- readonly humanTask: HumanTaskService;
1468
- readonly humanTaskResource: HumanTaskResourceService;
1469
- readonly request: BaseHttpRequest;
1470
- token?: string | Resolver<string>;
1471
- constructor(config?: Partial<ConductorClientAPIConfig>, requestHandler?: ConductorHttpRequest);
1472
- stop(): void;
1473
- }
1474
-
1475
- declare type ApiResult = {
1476
- readonly url: string;
1477
- readonly ok: boolean;
1478
- readonly status: number;
1479
- readonly statusText: string;
1480
- readonly body: any;
1481
- };
1482
-
1483
- declare class ApiError extends Error {
1484
- readonly url: string;
1485
- readonly status: number;
1486
- readonly statusText: string;
1487
- readonly body: any;
1488
- readonly request: ApiRequestOptions;
1489
- constructor(request: ApiRequestOptions, response: ApiResult, message: string);
1490
- }
1491
-
1492
- /**
1493
- * Functional interface for defining a worker implementation that processes tasks from a conductor queue.
1494
- *
1495
- * @remarks
1496
- * Optional items allow overriding properties on a per-worker basis. Items not overridden
1497
- * here will be inherited from the `TaskManager` options.
1498
- */
1499
- interface ConductorWorker {
1500
- taskDefName: string;
1501
- execute: (task: Task) => Promise<Omit<TaskResult, "workflowInstanceId" | "taskId">>;
1502
- domain?: string;
1503
- concurrency?: number;
1504
- pollInterval?: number;
1505
- }
1506
-
1507
- interface ConductorLogger {
1508
- info(...args: any): void;
1509
- error(...args: any): void;
1510
- debug(...args: any): void;
1511
- }
1512
- declare type ConductorLogLevel = keyof typeof LOG_LEVELS;
1513
- interface DefaultLoggerConfig {
1514
- level?: ConductorLogLevel;
1515
- tags?: Object[];
1516
- }
1517
- declare const LOG_LEVELS: {
1518
- readonly DEBUG: 10;
1519
- readonly INFO: 30;
1520
- readonly ERROR: 60;
1521
- };
1522
- declare class DefaultLogger implements ConductorLogger {
1523
- private readonly tags;
1524
- private readonly level;
1525
- constructor(config?: DefaultLoggerConfig);
1526
- private log;
1527
- info: (...args: any) => void;
1528
- debug: (...args: any) => void;
1529
- error: (...args: any) => void;
1530
- }
1531
- declare const noopLogger: ConductorLogger;
1532
-
1533
- interface CommonTaskDef {
1534
- name: string;
1535
- taskReferenceName: string;
1536
- }
1537
- declare enum TaskType {
1538
- START = "START",
1539
- SIMPLE = "SIMPLE",
1540
- DYNAMIC = "DYNAMIC",
1541
- FORK_JOIN = "FORK_JOIN",
1542
- FORK_JOIN_DYNAMIC = "FORK_JOIN_DYNAMIC",
1543
- DECISION = "DECISION",
1544
- SWITCH = "SWITCH",
1545
- JOIN = "JOIN",
1546
- DO_WHILE = "DO_WHILE",
1547
- SUB_WORKFLOW = "SUB_WORKFLOW",
1548
- EVENT = "EVENT",
1549
- WAIT = "WAIT",
1550
- USER_DEFINED = "USER_DEFINED",
1551
- HTTP = "HTTP",
1552
- LAMBDA = "LAMBDA",
1553
- INLINE = "INLINE",
1554
- EXCLUSIVE_JOIN = "EXCLUSIVE_JOIN",
1555
- TERMINAL = "TERMINAL",
1556
- TERMINATE = "TERMINATE",
1557
- KAFKA_PUBLISH = "KAFKA_PUBLISH",
1558
- JSON_JQ_TRANSFORM = "JSON_JQ_TRANSFORM",
1559
- SET_VARIABLE = "SET_VARIABLE"
1560
- }
1561
- declare type TaskDefTypes = SimpleTaskDef | DoWhileTaskDef | EventTaskDef | ForkJoinTaskDef | ForkJoinDynamicDef | HttpTaskDef | InlineTaskDef | JsonJQTransformTaskDef | KafkaPublishTaskDef | SetVariableTaskDef | SubWorkflowTaskDef | SwitchTaskDef | TerminateTaskDef | JoinTaskDef | WaitTaskDef;
1562
- interface DoWhileTaskDef extends CommonTaskDef {
1563
- inputParameters: Record<string, unknown>;
1564
- type: TaskType.DO_WHILE;
1565
- startDelay?: number;
1566
- optional?: boolean;
1567
- asyncComplete?: boolean;
1568
- loopCondition: string;
1569
- loopOver: TaskDefTypes[];
1570
- }
1571
- interface EventTaskDef extends CommonTaskDef {
1572
- type: TaskType.EVENT;
1573
- sink: string;
1574
- asyncComplete?: boolean;
1575
- }
1576
- interface ForkJoinTaskDef extends CommonTaskDef {
1577
- type: TaskType.FORK_JOIN;
1578
- inputParameters?: Record<string, string>;
1579
- forkTasks: Array<Array<TaskDefTypes>>;
1580
- }
1581
- interface JoinTaskDef extends CommonTaskDef {
1582
- type: TaskType.JOIN;
1583
- inputParameters?: Record<string, string>;
1584
- joinOn: string[];
1585
- optional?: boolean;
1586
- asyncComplete?: boolean;
1587
- }
1588
- interface ForkJoinDynamicDef extends CommonTaskDef {
1589
- inputParameters: {
1590
- dynamicTasks: any;
1591
- dynamicTasksInput: any;
1592
- };
1593
- type: TaskType.FORK_JOIN_DYNAMIC;
1594
- dynamicForkTasksParam: string;
1595
- dynamicForkTasksInputParamName: string;
1596
- startDelay?: number;
1597
- optional?: boolean;
1598
- asyncComplete?: boolean;
1599
- }
1600
- interface HttpInputParameters {
1601
- uri: string;
1602
- method: "GET" | "PUT" | "POST" | "DELETE" | "OPTIONS" | "HEAD";
1603
- accept?: string;
1604
- contentType?: string;
1605
- headers?: Record<string, string>;
1606
- body?: unknown;
1607
- connectionTimeOut?: number;
1608
- readTimeOut?: string;
1609
- }
1610
- interface HttpTaskDef extends CommonTaskDef {
1611
- inputParameters: {
1612
- [x: string]: unknown;
1613
- http_request: HttpInputParameters;
1614
- };
1615
- type: TaskType.HTTP;
1616
- }
1617
- interface InlineTaskInputParameters {
1618
- evaluatorType: "javascript" | "graaljs";
1619
- expression: string;
1620
- [x: string]: unknown;
1621
- }
1622
- interface InlineTaskDef extends CommonTaskDef {
1623
- type: TaskType.INLINE;
1624
- inputParameters: InlineTaskInputParameters;
1625
- }
1626
- interface ContainingQueryExpression {
1627
- queryExpression: string;
1628
- [x: string | number | symbol]: unknown;
1629
- }
1630
- interface JsonJQTransformTaskDef extends CommonTaskDef {
1631
- type: TaskType.JSON_JQ_TRANSFORM;
1632
- inputParameters: ContainingQueryExpression;
1633
- }
1634
- interface KafkaPublishInputParameters {
1635
- topic: string;
1636
- value: string;
1637
- bootStrapServers: string;
1638
- headers: Record<string, string>;
1639
- key: string;
1640
- keySerializer: string;
1641
- }
1642
- interface KafkaPublishTaskDef extends CommonTaskDef {
1643
- inputParameters: {
1644
- kafka_request: KafkaPublishInputParameters;
1645
- };
1646
- type: TaskType.KAFKA_PUBLISH;
1647
- }
1648
- interface SetVariableTaskDef extends CommonTaskDef {
1649
- type: TaskType.SET_VARIABLE;
1650
- inputParameters: Record<string, unknown>;
1651
- }
1652
- interface SimpleTaskDef extends CommonTaskDef {
1653
- type: TaskType.SIMPLE;
1654
- inputParameters?: Record<string, unknown>;
1655
- }
1656
- interface SubWorkflowTaskDef extends CommonTaskDef {
1657
- type: TaskType.SUB_WORKFLOW;
1658
- inputParameters?: Record<string, unknown>;
1659
- subWorkflowParam: {
1660
- name: string;
1661
- version?: number;
1662
- taskToDomain?: Record<string, string>;
1663
- };
1664
- }
1665
- interface SwitchTaskDef extends CommonTaskDef {
1666
- inputParameters: Record<string, unknown>;
1667
- type: TaskType.SWITCH;
1668
- decisionCases: Record<string, TaskDefTypes[]>;
1669
- defaultCase: TaskDefTypes[];
1670
- evaluatorType: "value-param" | "javascript";
1671
- expression: string;
1672
- }
1673
- interface TerminateTaskDef extends CommonTaskDef {
1674
- inputParameters: {
1675
- terminationStatus: "COMPLETED" | "FAILED";
1676
- workflowOutput?: Record<string, string>;
1677
- terminationReason?: string;
1678
- };
1679
- type: TaskType.TERMINATE;
1680
- startDelay?: number;
1681
- optional?: boolean;
1682
- }
1683
- interface WaitTaskDef extends CommonTaskDef {
1684
- type: TaskType.WAIT;
1685
- inputParameters: {
1686
- duration?: string;
1687
- until?: string;
1688
- };
1689
- }
1690
- interface WorkflowDef extends Omit<WorkflowDef$1, "tasks" | "version" | "inputParameters"> {
1691
- inputParameters: string[];
1692
- version: number;
1693
- tasks: TaskDefTypes[];
1694
- }
1695
-
1696
- declare type TaskErrorHandler = (error: Error, task?: Task) => void;
1697
- interface TaskRunnerOptions {
1698
- workerID: string;
1699
- domain: string | undefined;
1700
- pollInterval?: number;
1701
- concurrency?: number;
1702
- batchPollingTimeout?: number;
1703
- }
1704
- interface RunnerArgs {
1705
- worker: ConductorWorker;
1706
- taskResource: TaskResourceService;
1707
- options: TaskRunnerOptions;
1708
- logger?: ConductorLogger;
1709
- onError?: TaskErrorHandler;
1710
- concurrency?: number;
1711
- }
1712
-
1713
- declare const noopErrorHandler: TaskErrorHandler;
1714
- /**
1715
- * Responsible for polling and executing tasks from a queue.
1716
- *
1717
- * Because a `poll` in conductor "pops" a task off of a conductor queue,
1718
- * each runner participates in the poll -> work -> update loop.
1719
- * We could potentially split this work into a separate "poller" and "worker" pools
1720
- * but that could lead to picking up more work than the pool of workers are actually able to handle.
1721
- *
1722
- */
1723
- declare class TaskRunner {
1724
- taskResource: TaskResourceService;
1725
- worker: ConductorWorker;
1726
- private logger;
1727
- private options;
1728
- errorHandler: TaskErrorHandler;
1729
- private poller;
1730
- constructor({ worker, taskResource, options, logger, onError: errorHandler, }: RunnerArgs);
1731
- get isPolling(): boolean;
1732
- /**
1733
- * Starts polling for work
1734
- */
1735
- startPolling: () => void;
1736
- /**
1737
- * Stops Polling for work
1738
- */
1739
- stopPolling: () => Promise<void>;
1740
- updateOptions(options: Partial<TaskRunnerOptions>): void;
1741
- get getOptions(): TaskRunnerOptions;
1742
- private batchPoll;
1743
- updateTaskWithRetry: (task: Task, taskResult: TaskResult) => Promise<void>;
1744
- private executeTask;
1745
- handleUnknownError: (unknownError: unknown) => void;
1746
- }
1747
-
1748
- declare type TaskManagerOptions = TaskRunnerOptions;
1749
- interface TaskManagerConfig {
1750
- logger?: ConductorLogger;
1751
- options?: Partial<TaskManagerOptions>;
1752
- onError?: TaskErrorHandler;
1753
- }
1754
- /**
1755
- * Responsible for initializing and managing the runners that poll and work different task queues.
1756
- */
1757
- declare class TaskManager {
1758
- private workerRunners;
1759
- private readonly client;
1760
- private readonly logger;
1761
- private readonly errorHandler;
1762
- private workers;
1763
- readonly options: Required<TaskManagerOptions>;
1764
- private polling;
1765
- constructor(client: ConductorClient, workers: Array<ConductorWorker>, config?: TaskManagerConfig);
1766
- private workerManagerWorkerOptions;
1767
- get isPolling(): boolean;
1768
- updatePollingOptionForWorker: (workerTaskDefName: string, options: Partial<TaskManagerOptions>) => void;
1769
- /**
1770
- * new options will get merged to existing options
1771
- * @param options new options to update polling options
1772
- */
1773
- updatePollingOptions: (options: Partial<TaskManagerOptions>) => void;
1774
- sanityCheck: () => void;
1775
- /**
1776
- * Start polling for tasks
1777
- */
1778
- startPolling: () => void;
1779
- /**
1780
- * Stops polling for tasks
1781
- */
1782
- stopPolling: () => Promise<void>;
1783
- }
1784
-
1785
- declare class ConductorError extends Error {
1786
- private _trace;
1787
- private __proto__;
1788
- constructor(message?: string, innerError?: Error);
1789
- }
1790
- declare type TaskResultStatus = NonNullable<TaskResult['status']>;
1791
-
1792
- declare class WorkflowExecutor {
1793
- readonly _client: ConductorClient;
1794
- constructor(client: ConductorClient);
1795
- /**
1796
- * Will persist a workflow in conductor
1797
- * @param override If true will override the existing workflow with the definition
1798
- * @param workflow Complete workflow definition
1799
- * @returns null
1800
- */
1801
- registerWorkflow(override: boolean, workflow: WorkflowDef): any;
1802
- /**
1803
- * Takes a StartWorkflowRequest. returns a Promise<string> with the workflowInstanceId of the running workflow
1804
- * @param workflowRequest
1805
- * @returns
1806
- */
1807
- startWorkflow(workflowRequest: StartWorkflowRequest): Promise<string>;
1808
- /**
1809
- * Execute a workflow synchronously. returns a Promise<WorkflowRun> with details of the running workflow
1810
- * @param workflowRequest
1811
- * @returns
1812
- */
1813
- executeWorkflow(workflowRequest: StartWorkflowRequest, name: string, version: number, requestId: string, waitUntilTaskRef?: string): Promise<WorkflowRun>;
1814
- startWorkflows(workflowsRequest: StartWorkflowRequest[]): Promise<string>[];
1815
- /**
1816
- * Takes an workflowInstanceId and an includeTasks and an optional retry parameter returns the whole execution status.
1817
- * If includeTasks flag is provided. Details of tasks execution will be returned as well,
1818
- * retry specifies the amount of retrys before throwing an error.
1819
- *
1820
- * @param workflowInstanceId
1821
- * @param includeTasks
1822
- * @param retry
1823
- * @returns
1824
- */
1825
- getWorkflow(workflowInstanceId: string, includeTasks: boolean, retry?: number): Promise<Workflow>;
1826
- /**
1827
- * Returns a summary of the current workflow status.
1828
- *
1829
- * @param workflowInstanceId current running workflow
1830
- * @param includeOutput flag to include output
1831
- * @param includeVariables flag to include variable
1832
- * @returns Promise<WorkflowStatus>
1833
- */
1834
- getWorkflowStatus(workflowInstanceId: string, includeOutput: boolean, includeVariables: boolean): Promise<WorkflowStatus>;
1835
- /**
1836
- * Pauses a running workflow
1837
- * @param workflowInstanceId current workflow execution
1838
- * @returns
1839
- */
1840
- pause(workflowInstanceId: string): any;
1841
- /**
1842
- * Reruns workflowInstanceId workflow. with new parameters
1843
- *
1844
- * @param workflowInstanceId current workflow execution
1845
- * @param rerunWorkflowRequest Rerun Workflow Execution Request
1846
- * @returns
1847
- */
1848
- reRun(workflowInstanceId: string, rerunWorkflowRequest?: Partial<RerunWorkflowRequest>): Promise<string>;
1849
- /**
1850
- * Restarts workflow with workflowInstanceId, if useLatestDefinition uses last defintion
1851
- * @param workflowInstanceId
1852
- * @param useLatestDefinitions
1853
- * @returns
1854
- */
1855
- restart(workflowInstanceId: string, useLatestDefinitions: boolean): any;
1856
- /**
1857
- * Resumes a previously paused execution
1858
- *
1859
- * @param workflowInstanceId Running workflow workflowInstanceId
1860
- * @returns
1861
- */
1862
- resume(workflowInstanceId: string): any;
1863
- /**
1864
- * Retrys workflow from last failing task
1865
- * if resumeSubworkflowTasks is true will resume tasks in spawned subworkflows
1866
- *
1867
- * @param workflowInstanceId
1868
- * @param resumeSubworkflowTasks
1869
- * @returns
1870
- */
1871
- retry(workflowInstanceId: string, resumeSubworkflowTasks: boolean): any;
1872
- /**
1873
- * Searches for existing workflows given the following querys
1874
- *
1875
- * @param start
1876
- * @param size
1877
- * @param query
1878
- * @param freeText
1879
- * @param sort
1880
- * @param skipCache
1881
- * @returns
1882
- */
1883
- search(start: number, size: number, query: string, freeText: string, sort?: string, skipCache?: boolean): any;
1884
- /**
1885
- * Skips a task of a running workflow.
1886
- * by providing a skipTaskRequest you can set the input and the output of the skipped tasks
1887
- * @param workflowInstanceId
1888
- * @param taskReferenceName
1889
- * @param skipTaskRequest
1890
- * @returns
1891
- */
1892
- skipTasksFromWorkflow(workflowInstanceId: string, taskReferenceName: string, skipTaskRequest: Partial<SkipTaskRequest>): any;
1893
- /**
1894
- * Takes an workflowInstanceId, and terminates a running workflow
1895
- * @param workflowInstanceId
1896
- * @param reason
1897
- * @returns
1898
- */
1899
- terminate(workflowInstanceId: string, reason: string): any;
1900
- /**
1901
- * Takes a taskId and a workflowInstanceId. Will update the task for the corresponding taskId
1902
- * @param taskId
1903
- * @param workflowInstanceId
1904
- * @param taskStatus
1905
- * @param taskOutput
1906
- * @returns
1907
- */
1908
- updateTask(taskId: string, workflowInstanceId: string, taskStatus: TaskResultStatus, outputData: Record<string, any>): any;
1909
- /**
1910
- * Updates a task by reference Name
1911
- * @param taskReferenceName
1912
- * @param workflowInstanceId
1913
- * @param status
1914
- * @param taskOutput
1915
- * @returns
1916
- */
1917
- updateTaskByRefName(taskReferenceName: string, workflowInstanceId: string, status: TaskResultStatus, taskOutput: Record<string, any>): any;
1918
- /**
1919
- *
1920
- * @param taskId
1921
- * @returns
1922
- */
1923
- getTask(taskId: string): Promise<Task>;
1924
- }
1925
-
1926
- declare class HumanExecutor {
1927
- readonly _client: ConductorClient;
1928
- constructor(client: ConductorClient);
1929
- /**
1930
- * Takes a set of filter parameters. return matches of human tasks for that set of parameters
1931
- * @param state
1932
- * @param assignee
1933
- * @param assigneeType
1934
- * @param claimedBy
1935
- * @param taskName
1936
- * @param freeText
1937
- * @param includeInputOutput
1938
- * @returns
1939
- */
1940
- getTasksByFilter(state: "PENDING" | "ASSIGNED" | "IN_PROGRESS" | "COMPLETED" | "TIMED_OUT", assignee?: string, assigneeType?: "EXTERNAL_USER" | "EXTERNAL_GROUP" | "CONDUCTOR_USER" | "CONDUCTOR_GROUP", claimedBy?: string, taskName?: string, freeText?: string, includeInputOutput?: boolean): Promise<HumanTaskEntry[]>;
1941
- /**
1942
- * Returns task for a given task id
1943
- * @param taskId
1944
- * @returns
1945
- */
1946
- getTaskById(taskId: string): Promise<HumanTaskEntry>;
1947
- /**
1948
- * Assigns taskId to assignee. If the task is already assigned to another user, this will fail.
1949
- * @param taskId
1950
- * @param assignee
1951
- * @returns
1952
- */
1953
- claimTaskAsExternalUser(taskId: string, assignee: string): Promise<void>;
1954
- /**
1955
- * Claim task as conductor user
1956
- * @param taskId
1957
- * @returns
1958
- */
1959
- claimTaskAsConductorUser(taskId: string): Promise<void>;
1960
- /**
1961
- * Claim task as conductor user
1962
- * @param taskId
1963
- * @param assignee
1964
- * @returns
1965
- */
1966
- releaseTask(taskId: string): Promise<void>;
1967
- /**
1968
- * Returns a HumanTaskTemplateEntry for a given templateId
1969
- * @param templateId
1970
- * @returns
1971
- */
1972
- getTemplateById(templateId: string): Promise<HumanTaskTemplateEntry>;
1973
- /**
1974
- * Takes a taskId and a partial body. will update with given body
1975
- * @param taskId
1976
- * @param requestBody
1977
- */
1978
- updateTaskOutput(taskId: string, requestBody: Record<string, Record<string, any>>): Promise<void>;
1979
- /**
1980
- * Takes a taskId and an optional partial body. will complete the task with the given body
1981
- * @param taskId
1982
- * @param requestBody
1983
- */
1984
- completeTask(taskId: string, requestBody?: Record<string, Record<string, any>>): Promise<void>;
1985
- }
1986
-
1987
- declare const doWhileTask: (taskRefName: string, terminationCondition: string, tasks: TaskDefTypes[]) => DoWhileTaskDef;
1988
- declare const newLoopTask: (taskRefName: string, iterations: number, tasks: TaskDefTypes[]) => DoWhileTaskDef;
1989
-
1990
- declare const dynamicForkTask: (taskReferenceName: string, preForkTasks?: TaskDefTypes[], dynamicTasksInput?: string) => ForkJoinDynamicDef;
1991
-
1992
- declare const eventTask: (taskReferenceName: string, eventPrefix: string, eventSuffix: string) => EventTaskDef;
1993
- declare const sqsEventTask: (taskReferenceName: string, queueName: string) => EventTaskDef;
1994
- declare const conductorEventTask: (taskReferenceName: string, eventName: string) => EventTaskDef;
1995
-
1996
- declare const forkTask: (taskReferenceName: string, forkTasks: TaskDefTypes[]) => ForkJoinTaskDef;
1997
- declare const forkTaskJoin: (taskReferenceName: string, forkTasks: TaskDefTypes[]) => [ForkJoinTaskDef, JoinTaskDef];
1998
-
1999
- declare const httpTask: (taskReferenceName: string, inputParameters: HttpInputParameters) => HttpTaskDef;
2000
-
2001
- declare const inlineTask: (taskReferenceName: string, script: string, evaluatorType?: "javascript" | "graaljs") => InlineTaskDef;
2002
-
2003
- declare const joinTask: (taskReferenceName: string, joinOn: string[]) => JoinTaskDef;
2004
-
2005
- declare const jsonJqTask: (taskReferenceName: string, script: string) => JsonJQTransformTaskDef;
2006
-
2007
- declare const kafkaPublishTask: (taskReferenceName: string, kafka_request: KafkaPublishInputParameters) => KafkaPublishTaskDef;
2008
-
2009
- declare const setVariableTask: (taskReferenceName: string, inputParameters: Record<string, unknown>) => SetVariableTaskDef;
2010
-
2011
- declare const simpleTask: (taskReferenceName: string, name: string, inputParameters: Record<string, unknown>) => SimpleTaskDef;
2012
-
2013
- declare const subWorkflowTask: (taskReferenceName: string, workflowName: string, version?: number | undefined) => SubWorkflowTaskDef;
2014
-
2015
- declare const switchTask: (taskReferenceName: string, expression: string, decisionCases?: Record<string, TaskDefTypes[]>, defaultCase?: TaskDefTypes[]) => SwitchTaskDef;
2016
-
2017
- declare const terminateTask: (taskReferenceName: string, status: "COMPLETED" | "FAILED", terminationReason?: string | undefined) => TerminateTaskDef;
2018
-
2019
- declare const waitTaskDuration: (taskReferenceName: string, duration: string) => WaitTaskDef;
2020
- declare const waitTaskUntil: (taskReferenceName: string, until: string) => WaitTaskDef;
2021
-
2022
- declare const workflow: (name: string, tasks: TaskDefTypes[]) => WorkflowDef;
2023
-
2024
- /**
2025
- * Takes an optional partial SimpleTaskDef
2026
- * generates a task replacing default values with provided overrides
2027
- *
2028
- * @param overrides overrides for defaults
2029
- * @returns a fully defined task
2030
- */
2031
- declare const generateSimpleTask: (overrides?: Partial<SimpleTaskDef>) => SimpleTaskDef;
2032
-
2033
- /**
2034
- * Takes an optional partial EventTaskDef
2035
- * generates a task replacing default/fake values with provided overrides
2036
- *
2037
- * @param overrides overrides for defaults
2038
- * @returns a fully defined task
2039
- */
2040
- declare const generateEventTask: (overrides?: Partial<EventTaskDef>) => EventTaskDef;
2041
-
2042
- declare type TaskDefTypesGen = SimpleTaskDef | DoWhileTaskDefGen | EventTaskDef | ForkJoinTaskDefGen | ForkJoinDynamicDef | HttpTaskDef | InlineTaskDefGen | JsonJQTransformTaskDef | KafkaPublishTaskDef | SetVariableTaskDef | SubWorkflowTaskDef | SwitchTaskDefGen | TerminateTaskDef | JoinTaskDef | WaitTaskDef;
2043
- interface WorkflowDefGen extends Omit<WorkflowDef, "tasks"> {
2044
- tasks: Partial<TaskDefTypesGen>[];
2045
- }
2046
- declare type ForkJoinTaskDefGen = Omit<ForkJoinTaskDef, "forkTasks"> & {
2047
- forkTasks: Array<Array<Partial<TaskDefTypesGen>>>;
2048
- };
2049
- declare type SwitchTaskDefGen = Omit<SwitchTaskDef, "decisionCases" | "defaultCase"> & {
2050
- decisionCases: Record<string, Partial<TaskDefTypesGen>[]>;
2051
- defaultCase: Partial<TaskDefTypesGen>[];
2052
- };
2053
- declare type DoWhileTaskDefGen = Omit<DoWhileTaskDef, "loopOver"> & {
2054
- loopOver: Partial<TaskDefTypesGen>[];
2055
- };
2056
- interface InlineTaskInputParametersGen extends Omit<InlineTaskInputParameters, "expression"> {
2057
- expression: string | Function;
2058
- }
2059
- interface InlineTaskDefGen extends Omit<InlineTaskDef, "inputParameters"> {
2060
- inputParameters: InlineTaskInputParametersGen;
2061
- }
2062
- declare type NestedTaskMapper = {
2063
- (tasks: Partial<TaskDefTypesGen>[]): TaskDefTypes[];
2064
- };
2065
-
2066
- declare const generateJoinTask: (overrides?: Partial<JoinTaskDef>) => JoinTaskDef;
2067
-
2068
- /**
2069
- * Takes an optional partial HttpTaskDef
2070
- * generates a task replacing default/fake values with provided overrides
2071
- *
2072
- * @param overrides overrides for defaults
2073
- * @returns a fully defined task
2074
- */
2075
- declare const generateHTTPTask: (overrides?: Partial<HttpTaskDef>) => HttpTaskDef;
2076
-
2077
- /**
2078
- * Takes an optional partial InlineTaskDefGen
2079
- * generates a task replacing default/fake values with provided overrides
2080
- *
2081
- * <b>note</b> that the inputParameters.expression can be either a string containing javascript
2082
- * or a function thar returns an ES5 function
2083
- *
2084
- * @param overrides overrides for defaults
2085
- * @returns a fully defined task
2086
- */
2087
- declare const generateInlineTask: (override?: Partial<InlineTaskDefGen>) => InlineTaskDef;
2088
-
2089
- /**
2090
- * Takes an optional partial JsonJQTransformTaskDef
2091
- * generates a task replacing default/fake values with provided overrides
2092
- *
2093
- * @param overrides overrides for defaults
2094
- * @returns a fully defined task
2095
- */
2096
- declare const generateJQTransformTask: (overrides?: Partial<JsonJQTransformTaskDef>) => JsonJQTransformTaskDef;
2097
-
2098
- /**
2099
- * Takes an optional partial KafkaPublishTaskDef
2100
- * generates a task replacing default/fake values with provided overrides
2101
- *
2102
- * @param overrides overrides for defaults
2103
- * @returns a fully defined task
2104
- */
2105
- declare const generateKafkaPublishTask: (overrides?: Partial<KafkaPublishTaskDef>) => KafkaPublishTaskDef;
2106
-
2107
- /**
2108
- * Takes an optional partial SubWorkflowTaskDef
2109
- * generates a task replacing default/fake values with provided overrides
2110
- *
2111
- * @param overrides overrides for defaults
2112
- * @returns a fully defined task
2113
- */
2114
- declare const generateSubWorkflowTask: (overrides?: Partial<SubWorkflowTaskDef>) => SubWorkflowTaskDef;
2115
-
2116
- /**
2117
- * Takes an optional partial SetVariableTaskDef
2118
- * generates a task replacing default/fake values with provided overrides
2119
- *
2120
- * @param overrides overrides for defaults
2121
- * @returns a fully defined task
2122
- */
2123
- declare const generateSetVariableTask: (overrides?: Partial<SetVariableTaskDef>) => SetVariableTaskDef;
2124
-
2125
- /**
2126
- * Takes an optional partial TerminateTaskDef
2127
- * generates a task replacing default/fake values with provided overrides
2128
- *
2129
- * @param overrides overrides for defaults
2130
- * @returns a fully defined task
2131
- */
2132
- declare const generateTerminateTask: (overrides?: Partial<TerminateTaskDef>) => TerminateTaskDef;
2133
-
2134
- /**
2135
- * Takes an optional partial WaitTaskDef
2136
- * generates a task replacing default/fake values with provided overrides
2137
- *
2138
- * @param overrides overrides for defaults
2139
- * @returns a fully defined task
2140
- */
2141
- declare const generateWaitTask: (overrides?: Partial<WaitTaskDef>) => WaitTaskDef;
2142
-
2143
- declare const taskGenMapper: (tasks: Partial<TaskDefTypesGen>[]) => TaskDefTypes[];
2144
- /**
2145
- * Takes an optional partial WorkflowDefGen
2146
- * generates a workflow replacing default/fake values with provided overrides
2147
- *
2148
- * @param overrides overrides for defaults
2149
- * @returns a fully defined task
2150
- */
2151
- declare const generate: (overrides: Partial<WorkflowDefGen>) => WorkflowDef;
2152
-
2153
- /**
2154
- * Takes an optional partial SwitchTaskDefGen and an optional nestedMapper
2155
- * generates a task replacing default/fake values with provided overrides
2156
- *
2157
- * @param overrides overrides for defaults
2158
- * @param nestedTasksMapper function to run on array of nested tasks
2159
- * @returns a fully defined task
2160
- */
2161
- declare const generateSwitchTask: (overrides?: Partial<SwitchTaskDefGen>, nestedTasksMapper?: NestedTaskMapper) => SwitchTaskDef;
2162
- /**
2163
- * Takes an optional partial DoWhileTaskDefGen and an optional nestedMapper
2164
- * generates a task replacing default/fake values with provided overrides
2165
- *
2166
- * @param overrides overrides for defaults
2167
- * @param nestedTasksMapper function to run on array of nested tasks
2168
- * @returns a fully defined task
2169
- */
2170
- declare const generateDoWhileTask: (overrides?: Partial<DoWhileTaskDefGen>, nestedTasksMapper?: NestedTaskMapper) => DoWhileTaskDef;
2171
- /**
2172
- * Takes an optional partial DoWhileTaskDefGen and an optional nestedMapper
2173
- * generates a task replacing default/fake values with provided overrides
2174
- *
2175
- * @param overrides overrides for defaults
2176
- * @param nestedTasksMapper function to run on array of nested tasks
2177
- * @returns a fully defined task
2178
- */
2179
- declare const generateForkJoinTask: (overrides?: Partial<ForkJoinTaskDefGen>, nestedMapper?: NestedTaskMapper) => ForkJoinTaskDef;
2180
-
2181
- declare type FetchFn<T = RequestInit, R extends {
2182
- json: () => Promise<any>;
2183
- } = Response> = (input: RequestInfo, init?: T) => Promise<R>;
2184
- declare type OrkesApiConfig = ConductorClientAPIConfig & GenerateTokenRequest;
2185
-
2186
- export { HealthCheckResourceService as $, ApiRequestOptions as A, BaseHttpRequest as B, ConductorHttpRequest as C, StartWorkflow as D, EventHandler as E, FetchFn as F, GenerateTokenRequest as G, StartWorkflowRequest as H, SubWorkflowParams as I, Task as J, TaskDef as K, TaskDetails as L, TaskExecLog as M, TaskResult as N, OrkesApiConfig as O, PollData as P, TaskSummary as Q, RunnerArgs as R, SaveScheduleRequest as S, TaskRunner as T, WorkflowSchedule as U, WorkflowScheduleExecutionModel as V, Workflow as W, WorkflowStatus as X, WorkflowSummary as Y, WorkflowTask as Z, EventResourceService as _, ConductorClient as a, forkTaskJoin as a$, MetadataResourceService as a0, SchedulerResourceService as a1, TaskResourceService as a2, TokenResourceService as a3, WorkflowBulkResourceService as a4, WorkflowResourceService as a5, AssignmentPolicy as a6, Fixed as a7, BackToAssigment as a8, ClearAssigment as a9, JoinTaskDef as aA, ForkJoinDynamicDef as aB, HttpInputParameters as aC, HttpTaskDef as aD, InlineTaskInputParameters as aE, InlineTaskDef as aF, JsonJQTransformTaskDef as aG, KafkaPublishInputParameters as aH, KafkaPublishTaskDef as aI, SetVariableTaskDef as aJ, SimpleTaskDef as aK, SubWorkflowTaskDef as aL, SwitchTaskDef as aM, TerminateTaskDef as aN, WaitTaskDef as aO, WorkflowDef as aP, WorkflowExecutor as aQ, ConductorError as aR, TaskResultStatus as aS, HumanExecutor as aT, doWhileTask as aU, newLoopTask as aV, dynamicForkTask as aW, eventTask as aX, sqsEventTask as aY, conductorEventTask as aZ, forkTask as a_, Escalate as aa, FFAAssignment as ab, HTScrollableSearchResultHumanTaskEntry as ac, HumanTaskActionLogEntry as ad, HumanTaskEntry as ae, HumanTaskLoad as af, HumanTaskStateLogEntry as ag, HumanTaskTemplate as ah, HumanTaskTemplateEntry as ai, LeastBusyGroupMemberAssignment as aj, Never as ak, SearchResultHumanTaskEntry as al, Terminate as am, TimeoutPolicy as an, ConductorLogger as ao, ConductorLogLevel as ap, DefaultLoggerConfig as aq, DefaultLogger as ar, noopLogger as as, RequestType as at, CommonTaskDef as au, TaskType as av, TaskDefTypes as aw, DoWhileTaskDef as ax, EventTaskDef as ay, ForkJoinTaskDef as az, ConductorClientAPIConfig as b, httpTask as b0, inlineTask as b1, joinTask as b2, jsonJqTask as b3, kafkaPublishTask as b4, setVariableTask as b5, simpleTask as b6, subWorkflowTask as b7, switchTask as b8, terminateTask as b9, waitTaskDuration as ba, waitTaskUntil as bb, workflow as bc, generateSimpleTask as bd, generateDoWhileTask as be, generateEventTask as bf, generateForkJoinTask as bg, generateJoinTask as bh, generateHTTPTask as bi, generateInlineTask as bj, generateJQTransformTask as bk, generateKafkaPublishTask as bl, generateSubWorkflowTask as bm, generateSetVariableTask as bn, generateTerminateTask as bo, generateWaitTask as bp, generateSwitchTask as bq, generate as br, taskGenMapper as bs, OpenAPIConfig as c, CancelablePromise as d, TaskManagerOptions as e, TaskManagerConfig as f, TaskManager as g, ConductorWorker as h, TaskErrorHandler as i, TaskRunnerOptions as j, ApiResult as k, OnCancel as l, ApiError as m, noopErrorHandler as n, CancelError as o, Action as p, ExternalStorageLocation as q, RerunWorkflowRequest as r, Response$1 as s, ScrollableSearchResultWorkflowSummary as t, SearchResultTask as u, SearchResultTaskSummary as v, SearchResultWorkflow as w, SearchResultWorkflowScheduleExecutionModel as x, SearchResultWorkflowSummary as y, SkipTaskRequest as z };