@io-orkes/conductor-javascript 2.0.0-rc1 → 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.
package/dist/index.d.mts CHANGED
@@ -1,5 +1,2201 @@
1
- import { O as OrkesApiConfig, C as ConductorHttpRequest, a as ConductorClient, b as ConductorClientAPIConfig, F as FetchFn, c as OpenAPIConfig, A as ApiRequestOptions, d as CancelablePromise } from './types-dbfd77fb.js';
2
- export { p as Action, m as ApiError, k as ApiResult, B as BaseHttpRequest, o as CancelError, ao as CommonTaskDef, aN as ConductorError, aj as ConductorLogLevel, ai as ConductorLogger, h as ConductorWorker, al as DefaultLogger, ak as DefaultLoggerConfig, ar as DoWhileTaskDef, E as EventHandler, _ as EventResourceService, as as EventTaskDef, q as ExternalStorageLocation, av as ForkJoinDynamicDef, at as ForkJoinTaskDef, G as GenerateTokenRequest, a6 as HTScrollableSearchResultHumanTaskEntry, $ as HealthCheckResourceService, aw as HttpInputParameters, ax as HttpTaskDef, aP as HumanExecutor, ab as HumanTaskAssignment, aa as HumanTaskDefinition, ah as HumanTaskEntry, ag as HumanTaskSearch, af as HumanTaskSearchResult, ae as HumanTaskTemplate, ac as HumanTaskTrigger, a9 as HumanTaskUser, az as InlineTaskDef, ay as InlineTaskInputParameters, au as JoinTaskDef, aA as JsonJQTransformTaskDef, aB as KafkaPublishInputParameters, aC as KafkaPublishTaskDef, a0 as MetadataResourceService, l as OnCancel, P as PollData, an as RequestType, r as RerunWorkflowRequest, s as Response, R as RunnerArgs, S as SaveScheduleRequest, a1 as SchedulerResourceService, t as ScrollableSearchResultWorkflowSummary, u as SearchResultTask, v as SearchResultTaskSummary, w as SearchResultWorkflow, x as SearchResultWorkflowScheduleExecutionModel, y as SearchResultWorkflowSummary, aD as SetVariableTaskDef, aE as SimpleTaskDef, z as SkipTaskRequest, D as StartWorkflow, H as StartWorkflowRequest, I as SubWorkflowParams, aF as SubWorkflowTaskDef, aG as SwitchTaskDef, J as Task, K as TaskDef, aq as TaskDefTypes, L as TaskDetails, i as TaskErrorHandler, M as TaskExecLog, aK as TaskFinderPredicate, g as TaskManager, f as TaskManagerConfig, e as TaskManagerOptions, a2 as TaskResourceService, N as TaskResult, aO as TaskResultStatus, T as TaskRunner, j as TaskRunnerOptions, Q as TaskSummary, ap as TaskType, a7 as Terminate, aH as TerminateTaskDef, a8 as TimeoutPolicy, a3 as TokenResourceService, ad as UserFormTemplate, aI as WaitTaskDef, W as Workflow, a4 as WorkflowBulkResourceService, aJ as WorkflowDef, aM as WorkflowExecutor, a5 as WorkflowResourceService, U as WorkflowSchedule, V as WorkflowScheduleExecutionModel, X as WorkflowStatus, Y as WorkflowSummary, Z as WorkflowTask, aL as completedTaskMatchingType, aV as conductorEventTask, aQ as doWhileTask, aS as dynamicForkTask, aT as eventTask, aW as forkTask, aX as forkTaskJoin, bn as generate, ba as generateDoWhileTask, bb as generateEventTask, bc as generateForkJoinTask, be as generateHTTPTask, bf as generateInlineTask, bg as generateJQTransformTask, bd as generateJoinTask, bh as generateKafkaPublishTask, bj as generateSetVariableTask, b9 as generateSimpleTask, bi as generateSubWorkflowTask, bm as generateSwitchTask, bk as generateTerminateTask, bl as generateWaitTask, aY as httpTask, aZ as inlineTask, a_ as joinTask, a$ as jsonJqTask, b0 as kafkaPublishTask, aR as newLoopTask, n as noopErrorHandler, am as noopLogger, b1 as setVariableTask, b2 as simpleTask, aU as sqsEventTask, b3 as subWorkflowTask, b4 as switchTask, bo as taskGenMapper, b5 as terminateTask, b6 as waitTaskDuration, b7 as waitTaskUntil, b8 as workflow } from './types-dbfd77fb.js';
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$1: <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$1;
1178
+ declare type ConductorHttpRequest = <T>(request: RequestType, config: OpenAPIConfig, options: ApiRequestOptions) => CancelablePromise<T>;
1179
+
1180
+ declare type HumanTaskUser = {
1181
+ user?: string;
1182
+ userType?: 'EXTERNAL_USER' | 'EXTERNAL_GROUP' | 'CONDUCTOR_USER' | 'CONDUCTOR_GROUP';
1183
+ };
1184
+
1185
+ declare type HumanTaskAssignment = {
1186
+ assignee?: HumanTaskUser;
1187
+ slaMinutes?: number;
1188
+ };
1189
+
1190
+ declare type HumanTaskTrigger = {
1191
+ startWorkflowRequest?: StartWorkflowRequest;
1192
+ triggerType?: 'ASSIGNEE_CHANGED' | 'PENDING' | 'IN_PROGRESS' | 'ASSIGNED' | 'COMPLETED' | 'TIMED_OUT';
1193
+ };
1194
+
1195
+ declare type UserFormTemplate = {
1196
+ name?: string;
1197
+ version?: number;
1198
+ };
1199
+
1200
+ declare type HumanTaskDefinition = {
1201
+ assignmentCompletionStrategy?: 'LEAVE_OPEN' | 'TERMINATE';
1202
+ assignments?: Array<HumanTaskAssignment>;
1203
+ taskTriggers?: Array<HumanTaskTrigger>;
1204
+ userFormTemplate?: UserFormTemplate;
1205
+ };
1206
+
1207
+ declare type HumanTaskEntry = {
1208
+ assignee?: HumanTaskUser;
1209
+ claimant?: HumanTaskUser;
1210
+ createdBy?: string;
1211
+ createdOn?: number;
1212
+ definitionName?: string;
1213
+ humanTaskDef?: HumanTaskDefinition;
1214
+ input?: Record<string, any>;
1215
+ output?: Record<string, any>;
1216
+ state?: 'PENDING' | 'ASSIGNED' | 'IN_PROGRESS' | 'COMPLETED' | 'TIMED_OUT' | 'DELETED';
1217
+ taskId?: string;
1218
+ taskRefName?: string;
1219
+ updatedBy?: string;
1220
+ updatedOn?: number;
1221
+ workflowId?: string;
1222
+ workflowName?: string;
1223
+ };
1224
+
1225
+ declare type HumanTaskSearch = {
1226
+ assignees?: Array<HumanTaskUser>;
1227
+ claimants?: Array<HumanTaskUser>;
1228
+ definitionNames?: Array<string>;
1229
+ taskOutputQuery?: string;
1230
+ taskInputQuery?: string;
1231
+ searchType?: 'ADMIN' | 'INBOX';
1232
+ size?: number;
1233
+ start?: number;
1234
+ states?: Array<'PENDING' | 'ASSIGNED' | 'IN_PROGRESS' | 'COMPLETED' | 'TIMED_OUT' | 'DELETED'>;
1235
+ taskRefNames?: Array<string>;
1236
+ workflowNames?: Array<string>;
1237
+ };
1238
+
1239
+ declare type HumanTaskSearchResult = {
1240
+ results?: Array<HumanTaskEntry>;
1241
+ totalHits?: number;
1242
+ };
1243
+
1244
+ declare type HumanTaskTemplate = {
1245
+ createdBy?: string;
1246
+ createdOn?: number;
1247
+ jsonSchema: Record<string, any>;
1248
+ name: string;
1249
+ templateUI: Record<string, any>;
1250
+ updatedBy?: string;
1251
+ updatedOn?: number;
1252
+ version: number;
1253
+ };
1254
+
1255
+ declare class HumanTaskService {
1256
+ readonly httpRequest: BaseHttpRequest;
1257
+ constructor(httpRequest: BaseHttpRequest);
1258
+ /**
1259
+ * If the workflow is disconnected from tasks, this API can be used to clean up (in bulk)
1260
+ * @param requestBody
1261
+ * @returns any OK
1262
+ * @throws ApiError
1263
+ */
1264
+ deleteTaskFromHumanTaskRecords(requestBody: Array<string>): CancelablePromise<any>;
1265
+ /**
1266
+ * If the workflow is disconnected from tasks, this API can be used to clean up
1267
+ * @param taskId
1268
+ * @returns any OK
1269
+ * @throws ApiError
1270
+ */
1271
+ deleteTaskFromHumanTaskRecords1(taskId: string): CancelablePromise<any>;
1272
+ /**
1273
+ * Search human tasks
1274
+ * @param requestBody
1275
+ * @returns HumanTaskSearchResult OK
1276
+ * @throws ApiError
1277
+ */
1278
+ search(requestBody: HumanTaskSearch): CancelablePromise<HumanTaskSearchResult>;
1279
+ /**
1280
+ * Update task output, optionally complete
1281
+ * @param workflowId
1282
+ * @param taskRefName
1283
+ * @param requestBody
1284
+ * @param complete
1285
+ * @param iteration Populate this value if your task is in a loop and you want to update a specific iteration. If its not in a loop OR if you want to just update the latest iteration, leave this as empty
1286
+ * @returns any OK
1287
+ * @throws ApiError
1288
+ */
1289
+ updateTaskOutputByRef(workflowId: string, taskRefName: string, requestBody: Record<string, any>, complete?: boolean, iteration?: Array<number>): CancelablePromise<any>;
1290
+ /**
1291
+ * Get a task
1292
+ * @param taskId
1293
+ * @returns HumanTaskEntry OK
1294
+ * @throws ApiError
1295
+ */
1296
+ getTask1(taskId: string): CancelablePromise<HumanTaskEntry>;
1297
+ /**
1298
+ * Claim a task by authenticated Conductor user
1299
+ * @param taskId
1300
+ * @param overrideAssignment
1301
+ * @returns any OK
1302
+ * @throws ApiError
1303
+ */
1304
+ claimTask(taskId: string, overrideAssignment?: boolean): CancelablePromise<HumanTaskEntry>;
1305
+ /**
1306
+ * Claim a task to an external user
1307
+ * @param taskId
1308
+ * @param userId
1309
+ * @param overrideAssignment
1310
+ * @returns any OK
1311
+ * @throws ApiError
1312
+ */
1313
+ assignAndClaim(taskId: string, userId: string, overrideAssignment?: boolean): CancelablePromise<HumanTaskEntry>;
1314
+ /**
1315
+ * Release a task without completing it
1316
+ * @param taskId
1317
+ * @param requestBody
1318
+ * @returns any OK
1319
+ * @throws ApiError
1320
+ */
1321
+ reassignTask(taskId: string, requestBody: Array<HumanTaskAssignment>): CancelablePromise<any>;
1322
+ /**
1323
+ * Release a task without completing it
1324
+ * @param taskId
1325
+ * @returns any OK
1326
+ * @throws ApiError
1327
+ */
1328
+ releaseTask(taskId: string): CancelablePromise<any>;
1329
+ /**
1330
+ * If a task is assigned to a user, this API can be used to skip that assignment and move to the next assignee
1331
+ * @param taskId
1332
+ * @param reason
1333
+ * @returns any OK
1334
+ * @throws ApiError
1335
+ */
1336
+ skipTask(taskId: string, reason?: string): CancelablePromise<any>;
1337
+ /**
1338
+ * Update task output, optionally complete
1339
+ * @param taskId
1340
+ * @param requestBody
1341
+ * @param complete
1342
+ * @returns any OK
1343
+ * @throws ApiError
1344
+ */
1345
+ updateTaskOutput(taskId: string, requestBody: Record<string, any>, complete?: boolean): CancelablePromise<any>;
1346
+ /**
1347
+ * List all user form templates or get templates by name, or a template by name and version
1348
+ * @param name
1349
+ * @param version
1350
+ * @returns HumanTaskTemplate OK
1351
+ * @throws ApiError
1352
+ */
1353
+ getAllTemplates(name?: string, version?: number): CancelablePromise<Array<HumanTaskTemplate>>;
1354
+ /**
1355
+ * Save user form template
1356
+ * @param requestBody
1357
+ * @param newVersion
1358
+ * @returns HumanTaskTemplate OK
1359
+ * @throws ApiError
1360
+ */
1361
+ saveTemplate(requestBody: HumanTaskTemplate, newVersion?: boolean): CancelablePromise<HumanTaskTemplate>;
1362
+ /**
1363
+ * Save user form template
1364
+ * @param requestBody
1365
+ * @param newVersion
1366
+ * @returns HumanTaskTemplate OK
1367
+ * @throws ApiError
1368
+ */
1369
+ saveTemplates(requestBody: Array<HumanTaskTemplate>, newVersion?: boolean): CancelablePromise<Array<HumanTaskTemplate>>;
1370
+ /**
1371
+ * Delete all versions of user form template by name
1372
+ * @param name
1373
+ * @returns any OK
1374
+ * @throws ApiError
1375
+ */
1376
+ deleteTemplateByName(name: string): CancelablePromise<any>;
1377
+ /**
1378
+ * Delete a version of form template by name
1379
+ * @param name
1380
+ * @param version
1381
+ * @returns any OK
1382
+ * @throws ApiError
1383
+ */
1384
+ deleteTemplatesByNameAndVersion(name: string, version: number): CancelablePromise<any>;
1385
+ /**
1386
+ * Get user form template by name and version
1387
+ * @param name
1388
+ * @param version
1389
+ * @returns HumanTaskTemplate OK
1390
+ * @throws ApiError
1391
+ */
1392
+ getTemplateByNameAndVersion(name: string, version: number): CancelablePromise<HumanTaskTemplate>;
1393
+ }
1394
+
1395
+ declare class HumanTaskResourceService {
1396
+ readonly httpRequest: BaseHttpRequest;
1397
+ constructor(httpRequest: BaseHttpRequest);
1398
+ /**
1399
+ * Get Conductor task by id (for human tasks only)
1400
+ * @param taskId
1401
+ * @returns Task OK
1402
+ * @throws ApiError
1403
+ */
1404
+ getConductorTaskById(taskId: string): CancelablePromise<Task>;
1405
+ }
1406
+
1407
+ interface ConductorClientAPIConfig extends Omit<OpenAPIConfig, "BASE"> {
1408
+ serverUrl: string;
1409
+ }
1410
+ declare class ConductorClient {
1411
+ readonly eventResource: EventResourceService;
1412
+ readonly healthCheckResource: HealthCheckResourceService;
1413
+ readonly metadataResource: MetadataResourceService;
1414
+ readonly schedulerResource: SchedulerResourceService;
1415
+ readonly taskResource: TaskResourceService;
1416
+ readonly tokenResource: TokenResourceService;
1417
+ readonly workflowBulkResource: WorkflowBulkResourceService;
1418
+ readonly workflowResource: WorkflowResourceService;
1419
+ readonly humanTask: HumanTaskService;
1420
+ readonly humanTaskResource: HumanTaskResourceService;
1421
+ readonly request: BaseHttpRequest;
1422
+ token?: string | Resolver<string>;
1423
+ constructor(config?: Partial<ConductorClientAPIConfig>, requestHandler?: ConductorHttpRequest);
1424
+ stop(): void;
1425
+ }
1426
+
1427
+ declare type ApiResult = {
1428
+ readonly url: string;
1429
+ readonly ok: boolean;
1430
+ readonly status: number;
1431
+ readonly statusText: string;
1432
+ readonly body: any;
1433
+ };
1434
+
1435
+ declare class ApiError extends Error {
1436
+ readonly url: string;
1437
+ readonly status: number;
1438
+ readonly statusText: string;
1439
+ readonly body: any;
1440
+ readonly request: ApiRequestOptions;
1441
+ constructor(request: ApiRequestOptions, response: ApiResult, message: string);
1442
+ }
1443
+
1444
+ declare type HTScrollableSearchResultHumanTaskEntry = {
1445
+ queryId?: string;
1446
+ results?: Array<HumanTaskEntry>;
1447
+ };
1448
+
1449
+ declare type TimeoutPolicy = {
1450
+ type: string;
1451
+ };
1452
+
1453
+ declare type Terminate = (TimeoutPolicy & {
1454
+ timeoutSeconds?: number;
1455
+ });
1456
+
1457
+ /**
1458
+ * Functional interface for defining a worker implementation that processes tasks from a conductor queue.
1459
+ *
1460
+ * @remarks
1461
+ * Optional items allow overriding properties on a per-worker basis. Items not overridden
1462
+ * here will be inherited from the `TaskManager` options.
1463
+ */
1464
+ interface ConductorWorker {
1465
+ taskDefName: string;
1466
+ execute: (task: Task) => Promise<Omit<TaskResult, "workflowInstanceId" | "taskId">>;
1467
+ domain?: string;
1468
+ concurrency?: number;
1469
+ pollInterval?: number;
1470
+ }
1471
+
1472
+ interface ConductorLogger {
1473
+ info(...args: any): void;
1474
+ error(...args: any): void;
1475
+ debug(...args: any): void;
1476
+ }
1477
+ declare type ConductorLogLevel = keyof typeof LOG_LEVELS;
1478
+ interface DefaultLoggerConfig {
1479
+ level?: ConductorLogLevel;
1480
+ tags?: Object[];
1481
+ }
1482
+ declare const LOG_LEVELS: {
1483
+ readonly DEBUG: 10;
1484
+ readonly INFO: 30;
1485
+ readonly ERROR: 60;
1486
+ };
1487
+ declare class DefaultLogger implements ConductorLogger {
1488
+ private readonly tags;
1489
+ private readonly level;
1490
+ constructor(config?: DefaultLoggerConfig);
1491
+ private log;
1492
+ info: (...args: any) => void;
1493
+ debug: (...args: any) => void;
1494
+ error: (...args: any) => void;
1495
+ }
1496
+ declare const noopLogger: ConductorLogger;
1497
+
1498
+ interface CommonTaskDef {
1499
+ name: string;
1500
+ taskReferenceName: string;
1501
+ }
1502
+ declare enum TaskType {
1503
+ START = "START",
1504
+ SIMPLE = "SIMPLE",
1505
+ DYNAMIC = "DYNAMIC",
1506
+ FORK_JOIN = "FORK_JOIN",
1507
+ FORK_JOIN_DYNAMIC = "FORK_JOIN_DYNAMIC",
1508
+ DECISION = "DECISION",
1509
+ SWITCH = "SWITCH",
1510
+ JOIN = "JOIN",
1511
+ DO_WHILE = "DO_WHILE",
1512
+ SUB_WORKFLOW = "SUB_WORKFLOW",
1513
+ EVENT = "EVENT",
1514
+ WAIT = "WAIT",
1515
+ USER_DEFINED = "USER_DEFINED",
1516
+ HTTP = "HTTP",
1517
+ LAMBDA = "LAMBDA",
1518
+ INLINE = "INLINE",
1519
+ EXCLUSIVE_JOIN = "EXCLUSIVE_JOIN",
1520
+ TERMINAL = "TERMINAL",
1521
+ TERMINATE = "TERMINATE",
1522
+ KAFKA_PUBLISH = "KAFKA_PUBLISH",
1523
+ JSON_JQ_TRANSFORM = "JSON_JQ_TRANSFORM",
1524
+ SET_VARIABLE = "SET_VARIABLE"
1525
+ }
1526
+ declare type TaskDefTypes = SimpleTaskDef | DoWhileTaskDef | EventTaskDef | ForkJoinTaskDef | ForkJoinDynamicDef | HttpTaskDef | InlineTaskDef | JsonJQTransformTaskDef | KafkaPublishTaskDef | SetVariableTaskDef | SubWorkflowTaskDef | SwitchTaskDef | TerminateTaskDef | JoinTaskDef | WaitTaskDef;
1527
+ interface DoWhileTaskDef extends CommonTaskDef {
1528
+ inputParameters: Record<string, unknown>;
1529
+ type: TaskType.DO_WHILE;
1530
+ startDelay?: number;
1531
+ optional?: boolean;
1532
+ asyncComplete?: boolean;
1533
+ loopCondition: string;
1534
+ loopOver: TaskDefTypes[];
1535
+ }
1536
+ interface EventTaskDef extends CommonTaskDef {
1537
+ type: TaskType.EVENT;
1538
+ sink: string;
1539
+ asyncComplete?: boolean;
1540
+ }
1541
+ interface ForkJoinTaskDef extends CommonTaskDef {
1542
+ type: TaskType.FORK_JOIN;
1543
+ inputParameters?: Record<string, string>;
1544
+ forkTasks: Array<Array<TaskDefTypes>>;
1545
+ }
1546
+ interface JoinTaskDef extends CommonTaskDef {
1547
+ type: TaskType.JOIN;
1548
+ inputParameters?: Record<string, string>;
1549
+ joinOn: string[];
1550
+ optional?: boolean;
1551
+ asyncComplete?: boolean;
1552
+ }
1553
+ interface ForkJoinDynamicDef extends CommonTaskDef {
1554
+ inputParameters: {
1555
+ dynamicTasks: any;
1556
+ dynamicTasksInput: any;
1557
+ };
1558
+ type: TaskType.FORK_JOIN_DYNAMIC;
1559
+ dynamicForkTasksParam: string;
1560
+ dynamicForkTasksInputParamName: string;
1561
+ startDelay?: number;
1562
+ optional?: boolean;
1563
+ asyncComplete?: boolean;
1564
+ }
1565
+ interface HttpInputParameters {
1566
+ uri: string;
1567
+ method: "GET" | "PUT" | "POST" | "DELETE" | "OPTIONS" | "HEAD";
1568
+ accept?: string;
1569
+ contentType?: string;
1570
+ headers?: Record<string, string>;
1571
+ body?: unknown;
1572
+ connectionTimeOut?: number;
1573
+ readTimeOut?: string;
1574
+ }
1575
+ interface HttpTaskDef extends CommonTaskDef {
1576
+ inputParameters: {
1577
+ [x: string]: unknown;
1578
+ http_request: HttpInputParameters;
1579
+ };
1580
+ type: TaskType.HTTP;
1581
+ }
1582
+ interface InlineTaskInputParameters {
1583
+ evaluatorType: "javascript" | "graaljs";
1584
+ expression: string;
1585
+ [x: string]: unknown;
1586
+ }
1587
+ interface InlineTaskDef extends CommonTaskDef {
1588
+ type: TaskType.INLINE;
1589
+ inputParameters: InlineTaskInputParameters;
1590
+ }
1591
+ interface ContainingQueryExpression {
1592
+ queryExpression: string;
1593
+ [x: string | number | symbol]: unknown;
1594
+ }
1595
+ interface JsonJQTransformTaskDef extends CommonTaskDef {
1596
+ type: TaskType.JSON_JQ_TRANSFORM;
1597
+ inputParameters: ContainingQueryExpression;
1598
+ }
1599
+ interface KafkaPublishInputParameters {
1600
+ topic: string;
1601
+ value: string;
1602
+ bootStrapServers: string;
1603
+ headers: Record<string, string>;
1604
+ key: string;
1605
+ keySerializer: string;
1606
+ }
1607
+ interface KafkaPublishTaskDef extends CommonTaskDef {
1608
+ inputParameters: {
1609
+ kafka_request: KafkaPublishInputParameters;
1610
+ };
1611
+ type: TaskType.KAFKA_PUBLISH;
1612
+ }
1613
+ interface SetVariableTaskDef extends CommonTaskDef {
1614
+ type: TaskType.SET_VARIABLE;
1615
+ inputParameters: Record<string, unknown>;
1616
+ }
1617
+ interface SimpleTaskDef extends CommonTaskDef {
1618
+ type: TaskType.SIMPLE;
1619
+ inputParameters?: Record<string, unknown>;
1620
+ }
1621
+ interface SubWorkflowTaskDef extends CommonTaskDef {
1622
+ type: TaskType.SUB_WORKFLOW;
1623
+ inputParameters?: Record<string, unknown>;
1624
+ subWorkflowParam: {
1625
+ name: string;
1626
+ version?: number;
1627
+ taskToDomain?: Record<string, string>;
1628
+ };
1629
+ }
1630
+ interface SwitchTaskDef extends CommonTaskDef {
1631
+ inputParameters: Record<string, unknown>;
1632
+ type: TaskType.SWITCH;
1633
+ decisionCases: Record<string, TaskDefTypes[]>;
1634
+ defaultCase: TaskDefTypes[];
1635
+ evaluatorType: "value-param" | "javascript";
1636
+ expression: string;
1637
+ }
1638
+ interface TerminateTaskDef extends CommonTaskDef {
1639
+ inputParameters: {
1640
+ terminationStatus: "COMPLETED" | "FAILED";
1641
+ workflowOutput?: Record<string, string>;
1642
+ terminationReason?: string;
1643
+ };
1644
+ type: TaskType.TERMINATE;
1645
+ startDelay?: number;
1646
+ optional?: boolean;
1647
+ }
1648
+ interface WaitTaskDef extends CommonTaskDef {
1649
+ type: TaskType.WAIT;
1650
+ inputParameters: {
1651
+ duration?: string;
1652
+ until?: string;
1653
+ };
1654
+ }
1655
+ interface WorkflowDef extends Omit<WorkflowDef$1, "tasks" | "version" | "inputParameters"> {
1656
+ inputParameters: string[];
1657
+ version: number;
1658
+ tasks: TaskDefTypes[];
1659
+ }
1660
+
1661
+ declare type TaskErrorHandler = (error: Error, task?: Task) => void;
1662
+ interface TaskRunnerOptions {
1663
+ workerID: string;
1664
+ domain: string | undefined;
1665
+ pollInterval?: number;
1666
+ concurrency?: number;
1667
+ batchPollingTimeout?: number;
1668
+ }
1669
+ interface RunnerArgs {
1670
+ worker: ConductorWorker;
1671
+ taskResource: TaskResourceService;
1672
+ options: TaskRunnerOptions;
1673
+ logger?: ConductorLogger;
1674
+ onError?: TaskErrorHandler;
1675
+ concurrency?: number;
1676
+ }
1677
+
1678
+ declare const noopErrorHandler: TaskErrorHandler;
1679
+ /**
1680
+ * Responsible for polling and executing tasks from a queue.
1681
+ *
1682
+ * Because a `poll` in conductor "pops" a task off of a conductor queue,
1683
+ * each runner participates in the poll -> work -> update loop.
1684
+ * We could potentially split this work into a separate "poller" and "worker" pools
1685
+ * but that could lead to picking up more work than the pool of workers are actually able to handle.
1686
+ *
1687
+ */
1688
+ declare class TaskRunner {
1689
+ taskResource: TaskResourceService;
1690
+ worker: ConductorWorker;
1691
+ private logger;
1692
+ private options;
1693
+ errorHandler: TaskErrorHandler;
1694
+ private poller;
1695
+ constructor({ worker, taskResource, options, logger, onError: errorHandler, }: RunnerArgs);
1696
+ get isPolling(): boolean;
1697
+ /**
1698
+ * Starts polling for work
1699
+ */
1700
+ startPolling: () => void;
1701
+ /**
1702
+ * Stops Polling for work
1703
+ */
1704
+ stopPolling: () => Promise<void>;
1705
+ updateOptions(options: Partial<TaskRunnerOptions>): void;
1706
+ get getOptions(): TaskRunnerOptions;
1707
+ private batchPoll;
1708
+ updateTaskWithRetry: (task: Task, taskResult: TaskResult) => Promise<void>;
1709
+ private executeTask;
1710
+ handleUnknownError: (unknownError: unknown) => void;
1711
+ }
1712
+
1713
+ declare type TaskManagerOptions = TaskRunnerOptions;
1714
+ interface TaskManagerConfig {
1715
+ logger?: ConductorLogger;
1716
+ options?: Partial<TaskManagerOptions>;
1717
+ onError?: TaskErrorHandler;
1718
+ }
1719
+ /**
1720
+ * Responsible for initializing and managing the runners that poll and work different task queues.
1721
+ */
1722
+ declare class TaskManager {
1723
+ private workerRunners;
1724
+ private readonly client;
1725
+ private readonly logger;
1726
+ private readonly errorHandler;
1727
+ private workers;
1728
+ readonly options: Required<TaskManagerOptions>;
1729
+ private polling;
1730
+ constructor(client: ConductorClient, workers: Array<ConductorWorker>, config?: TaskManagerConfig);
1731
+ private workerManagerWorkerOptions;
1732
+ get isPolling(): boolean;
1733
+ updatePollingOptionForWorker: (workerTaskDefName: string, options: Partial<TaskManagerOptions>) => void;
1734
+ /**
1735
+ * new options will get merged to existing options
1736
+ * @param options new options to update polling options
1737
+ */
1738
+ updatePollingOptions: (options: Partial<TaskManagerOptions>) => void;
1739
+ sanityCheck: () => void;
1740
+ /**
1741
+ * Start polling for tasks
1742
+ */
1743
+ startPolling: () => void;
1744
+ /**
1745
+ * Stops polling for tasks
1746
+ */
1747
+ stopPolling: () => Promise<void>;
1748
+ }
1749
+
1750
+ declare class ConductorError extends Error {
1751
+ private _trace;
1752
+ private __proto__;
1753
+ constructor(message?: string, innerError?: Error);
1754
+ }
1755
+ declare type TaskResultStatus = NonNullable<TaskResult['status']>;
1756
+
1757
+ declare type TaskFinderPredicate = (task: Task) => boolean;
1758
+ declare const completedTaskMatchingType: (taskType: string) => TaskFinderPredicate;
1759
+ declare class WorkflowExecutor {
1760
+ readonly _client: ConductorClient;
1761
+ constructor(client: ConductorClient);
1762
+ /**
1763
+ * Will persist a workflow in conductor
1764
+ * @param override If true will override the existing workflow with the definition
1765
+ * @param workflow Complete workflow definition
1766
+ * @returns null
1767
+ */
1768
+ registerWorkflow(override: boolean, workflow: WorkflowDef): Promise<void>;
1769
+ /**
1770
+ * Takes a StartWorkflowRequest. returns a Promise<string> with the workflowInstanceId of the running workflow
1771
+ * @param workflowRequest
1772
+ * @returns
1773
+ */
1774
+ startWorkflow(workflowRequest: StartWorkflowRequest): Promise<string>;
1775
+ /**
1776
+ * Execute a workflow synchronously. returns a Promise<WorkflowRun> with details of the running workflow
1777
+ * @param workflowRequest
1778
+ * @returns
1779
+ */
1780
+ executeWorkflow(workflowRequest: StartWorkflowRequest, name: string, version: number, requestId: string, waitUntilTaskRef?: string): Promise<WorkflowRun>;
1781
+ startWorkflows(workflowsRequest: StartWorkflowRequest[]): Promise<string>[];
1782
+ goBackToTask(workflowInstanceId: string, taskFinderPredicate: TaskFinderPredicate, rerunWorkflowRequestOverrides?: Partial<RerunWorkflowRequest>): Promise<void>;
1783
+ goBackToFirstTaskMatchingType(workflowInstanceId: string, taskType: string): Promise<void>;
1784
+ /**
1785
+ * Takes an workflowInstanceId and an includeTasks and an optional retry parameter returns the whole execution status.
1786
+ * If includeTasks flag is provided. Details of tasks execution will be returned as well,
1787
+ * retry specifies the amount of retrys before throwing an error.
1788
+ *
1789
+ * @param workflowInstanceId
1790
+ * @param includeTasks
1791
+ * @param retry
1792
+ * @returns
1793
+ */
1794
+ getWorkflow(workflowInstanceId: string, includeTasks: boolean, retry?: number): Promise<Workflow>;
1795
+ /**
1796
+ * Returns a summary of the current workflow status.
1797
+ *
1798
+ * @param workflowInstanceId current running workflow
1799
+ * @param includeOutput flag to include output
1800
+ * @param includeVariables flag to include variable
1801
+ * @returns Promise<WorkflowStatus>
1802
+ */
1803
+ getWorkflowStatus(workflowInstanceId: string, includeOutput: boolean, includeVariables: boolean): Promise<WorkflowStatus>;
1804
+ /**
1805
+ * Returns a summary of the current workflow status.
1806
+ *
1807
+ * @param workflowInstanceId current running workflow
1808
+ * @param includeOutput flag to include output
1809
+ * @param includeVariables flag to include variable
1810
+ * @returns Promise<WorkflowStatus>
1811
+ */
1812
+ getExecution(workflowInstanceId: string, includeTasks?: boolean): Promise<Workflow>;
1813
+ /**
1814
+ * Pauses a running workflow
1815
+ * @param workflowInstanceId current workflow execution
1816
+ * @returns
1817
+ */
1818
+ pause(workflowInstanceId: string): Promise<void>;
1819
+ /**
1820
+ * Reruns workflowInstanceId workflow. with new parameters
1821
+ *
1822
+ * @param workflowInstanceId current workflow execution
1823
+ * @param rerunWorkflowRequest Rerun Workflow Execution Request
1824
+ * @returns
1825
+ */
1826
+ reRun(workflowInstanceId: string, rerunWorkflowRequest?: Partial<RerunWorkflowRequest>): Promise<string>;
1827
+ /**
1828
+ * Restarts workflow with workflowInstanceId, if useLatestDefinition uses last defintion
1829
+ * @param workflowInstanceId
1830
+ * @param useLatestDefinitions
1831
+ * @returns
1832
+ */
1833
+ restart(workflowInstanceId: string, useLatestDefinitions: boolean): Promise<void>;
1834
+ /**
1835
+ * Resumes a previously paused execution
1836
+ *
1837
+ * @param workflowInstanceId Running workflow workflowInstanceId
1838
+ * @returns
1839
+ */
1840
+ resume(workflowInstanceId: string): Promise<void>;
1841
+ /**
1842
+ * Retrys workflow from last failing task
1843
+ * if resumeSubworkflowTasks is true will resume tasks in spawned subworkflows
1844
+ *
1845
+ * @param workflowInstanceId
1846
+ * @param resumeSubworkflowTasks
1847
+ * @returns
1848
+ */
1849
+ retry(workflowInstanceId: string, resumeSubworkflowTasks: boolean): Promise<void>;
1850
+ /**
1851
+ * Searches for existing workflows given the following querys
1852
+ *
1853
+ * @param start
1854
+ * @param size
1855
+ * @param query
1856
+ * @param freeText
1857
+ * @param sort
1858
+ * @param skipCache
1859
+ * @returns
1860
+ */
1861
+ search(start: number, size: number, query: string, freeText: string, sort?: string, skipCache?: boolean): Promise<ScrollableSearchResultWorkflowSummary>;
1862
+ /**
1863
+ * Skips a task of a running workflow.
1864
+ * by providing a skipTaskRequest you can set the input and the output of the skipped tasks
1865
+ * @param workflowInstanceId
1866
+ * @param taskReferenceName
1867
+ * @param skipTaskRequest
1868
+ * @returns
1869
+ */
1870
+ skipTasksFromWorkflow(workflowInstanceId: string, taskReferenceName: string, skipTaskRequest: Partial<SkipTaskRequest>): Promise<void>;
1871
+ /**
1872
+ * Takes an workflowInstanceId, and terminates a running workflow
1873
+ * @param workflowInstanceId
1874
+ * @param reason
1875
+ * @returns
1876
+ */
1877
+ terminate(workflowInstanceId: string, reason: string): Promise<void>;
1878
+ /**
1879
+ * Takes a taskId and a workflowInstanceId. Will update the task for the corresponding taskId
1880
+ * @param taskId
1881
+ * @param workflowInstanceId
1882
+ * @param taskStatus
1883
+ * @param taskOutput
1884
+ * @returns
1885
+ */
1886
+ updateTask(taskId: string, workflowInstanceId: string, taskStatus: TaskResultStatus, outputData: Record<string, any>): Promise<string>;
1887
+ /**
1888
+ * Updates a task by reference Name
1889
+ * @param taskReferenceName
1890
+ * @param workflowInstanceId
1891
+ * @param status
1892
+ * @param taskOutput
1893
+ * @returns
1894
+ */
1895
+ updateTaskByRefName(taskReferenceName: string, workflowInstanceId: string, status: TaskResultStatus, taskOutput: Record<string, any>): Promise<string>;
1896
+ /**
1897
+ *
1898
+ * @param taskId
1899
+ * @returns
1900
+ */
1901
+ getTask(taskId: string): Promise<Task>;
1902
+ }
1903
+
1904
+ declare type PollIntervalOptions = {
1905
+ pollInterval: number;
1906
+ maxPollTimes: number;
1907
+ };
1908
+ declare class HumanExecutor {
1909
+ readonly _client: ConductorClient;
1910
+ constructor(client: ConductorClient);
1911
+ /**
1912
+ * @deprecated use search instead
1913
+ * Takes a set of filter parameters. return matches of human tasks for that set of parameters
1914
+ * @param state
1915
+ * @param assignee
1916
+ * @param assigneeType
1917
+ * @param claimedBy
1918
+ * @param taskName
1919
+ * @param freeText
1920
+ * @param includeInputOutput
1921
+ * @returns
1922
+ */
1923
+ getTasksByFilter(state: "PENDING" | "ASSIGNED" | "IN_PROGRESS" | "COMPLETED" | "TIMED_OUT", assignee?: string, assigneeType?: "EXTERNAL_USER" | "EXTERNAL_GROUP" | "CONDUCTOR_USER" | "CONDUCTOR_GROUP", claimedBy?: string, taskName?: string, taskInputQuery?: string, taskOutputQuery?: string): Promise<HumanTaskEntry[]>;
1924
+ /**
1925
+ * Takes a set of filter parameters. return matches of human tasks for that set of parameters
1926
+ * @param state
1927
+ * @param assignee
1928
+ * @param assigneeType
1929
+ * @param claimedBy
1930
+ * @param taskName
1931
+ * @param freeText
1932
+ * @param includeInputOutput
1933
+ * @returns Promise<HumanTaskEntry[]>
1934
+ */
1935
+ search(searchParams: Partial<HumanTaskSearch>): Promise<HumanTaskEntry[]>;
1936
+ /**
1937
+ * Takes a set of filter parameters. An polling interval options. will poll until the task returns a result
1938
+ * @param state
1939
+ * @param assignee
1940
+ * @param assigneeType
1941
+ * @param claimedBy
1942
+ * @param taskName
1943
+ * @param freeText
1944
+ * @param includeInputOutput
1945
+ * @returns Promise<HumanTaskEntry[]>
1946
+ */
1947
+ pollSearch(searchParams: Partial<HumanTaskSearch>, { pollInterval, maxPollTimes, }?: PollIntervalOptions): Promise<HumanTaskEntry[]>;
1948
+ /**
1949
+ * Returns task for a given task id
1950
+ * @param taskId
1951
+ * @returns
1952
+ */
1953
+ getTaskById(taskId: string): Promise<HumanTaskEntry>;
1954
+ /**
1955
+ * Assigns taskId to assignee. If the task is already assigned to another user, this will fail.
1956
+ * @param taskId
1957
+ * @param assignee
1958
+ * @returns
1959
+ */
1960
+ claimTaskAsExternalUser(taskId: string, assignee: string): Promise<HumanTaskEntry>;
1961
+ /**
1962
+ * Claim task as conductor user
1963
+ * @param taskId
1964
+ * @returns
1965
+ */
1966
+ claimTaskAsConductorUser(taskId: string): Promise<HumanTaskEntry>;
1967
+ /**
1968
+ * Claim task as conductor user
1969
+ * @param taskId
1970
+ * @param assignee
1971
+ * @returns
1972
+ */
1973
+ releaseTask(taskId: string): Promise<void>;
1974
+ /**
1975
+ * Returns a HumanTaskTemplateEntry for a given name and version
1976
+ * @param templateId
1977
+ * @returns
1978
+ */
1979
+ getTemplateByNameVersion(name: string, version: number): Promise<HumanTaskTemplate>;
1980
+ /**
1981
+ * @deprecated use getTemplate instead. name will be used as id here with version 1
1982
+ * Returns a HumanTaskTemplateEntry for a given templateId
1983
+ * @param templateId
1984
+ * @returns
1985
+ */
1986
+ getTemplateById(templateNameVersionOne: string): Promise<HumanTaskTemplate>;
1987
+ /**
1988
+ * Takes a taskId and a partial body. will update with given body
1989
+ * @param taskId
1990
+ * @param requestBody
1991
+ */
1992
+ updateTaskOutput(taskId: string, requestBody: Record<string, Record<string, any>>): Promise<void>;
1993
+ /**
1994
+ * Takes a taskId and an optional partial body. will complete the task with the given body
1995
+ * @param taskId
1996
+ * @param requestBody
1997
+ */
1998
+ completeTask(taskId: string, requestBody?: Record<string, Record<string, any>>): Promise<void>;
1999
+ }
2000
+
2001
+ declare const doWhileTask: (taskRefName: string, terminationCondition: string, tasks: TaskDefTypes[]) => DoWhileTaskDef;
2002
+ declare const newLoopTask: (taskRefName: string, iterations: number, tasks: TaskDefTypes[]) => DoWhileTaskDef;
2003
+
2004
+ declare const dynamicForkTask: (taskReferenceName: string, preForkTasks?: TaskDefTypes[], dynamicTasksInput?: string) => ForkJoinDynamicDef;
2005
+
2006
+ declare const eventTask: (taskReferenceName: string, eventPrefix: string, eventSuffix: string) => EventTaskDef;
2007
+ declare const sqsEventTask: (taskReferenceName: string, queueName: string) => EventTaskDef;
2008
+ declare const conductorEventTask: (taskReferenceName: string, eventName: string) => EventTaskDef;
2009
+
2010
+ declare const forkTask: (taskReferenceName: string, forkTasks: TaskDefTypes[]) => ForkJoinTaskDef;
2011
+ declare const forkTaskJoin: (taskReferenceName: string, forkTasks: TaskDefTypes[]) => [ForkJoinTaskDef, JoinTaskDef];
2012
+
2013
+ declare const httpTask: (taskReferenceName: string, inputParameters: HttpInputParameters) => HttpTaskDef;
2014
+
2015
+ declare const inlineTask: (taskReferenceName: string, script: string, evaluatorType?: "javascript" | "graaljs") => InlineTaskDef;
2016
+
2017
+ declare const joinTask: (taskReferenceName: string, joinOn: string[]) => JoinTaskDef;
2018
+
2019
+ declare const jsonJqTask: (taskReferenceName: string, script: string) => JsonJQTransformTaskDef;
2020
+
2021
+ declare const kafkaPublishTask: (taskReferenceName: string, kafka_request: KafkaPublishInputParameters) => KafkaPublishTaskDef;
2022
+
2023
+ declare const setVariableTask: (taskReferenceName: string, inputParameters: Record<string, unknown>) => SetVariableTaskDef;
2024
+
2025
+ declare const simpleTask: (taskReferenceName: string, name: string, inputParameters: Record<string, unknown>) => SimpleTaskDef;
2026
+
2027
+ declare const subWorkflowTask: (taskReferenceName: string, workflowName: string, version?: number | undefined) => SubWorkflowTaskDef;
2028
+
2029
+ declare const switchTask: (taskReferenceName: string, expression: string, decisionCases?: Record<string, TaskDefTypes[]>, defaultCase?: TaskDefTypes[]) => SwitchTaskDef;
2030
+
2031
+ declare const terminateTask: (taskReferenceName: string, status: "COMPLETED" | "FAILED", terminationReason?: string | undefined) => TerminateTaskDef;
2032
+
2033
+ declare const waitTaskDuration: (taskReferenceName: string, duration: string) => WaitTaskDef;
2034
+ declare const waitTaskUntil: (taskReferenceName: string, until: string) => WaitTaskDef;
2035
+
2036
+ declare const workflow: (name: string, tasks: TaskDefTypes[]) => WorkflowDef;
2037
+
2038
+ /**
2039
+ * Takes an optional partial SimpleTaskDef
2040
+ * generates a task replacing default values with provided overrides
2041
+ *
2042
+ * @param overrides overrides for defaults
2043
+ * @returns a fully defined task
2044
+ */
2045
+ declare const generateSimpleTask: (overrides?: Partial<SimpleTaskDef>) => SimpleTaskDef;
2046
+
2047
+ /**
2048
+ * Takes an optional partial EventTaskDef
2049
+ * generates a task replacing default/fake values with provided overrides
2050
+ *
2051
+ * @param overrides overrides for defaults
2052
+ * @returns a fully defined task
2053
+ */
2054
+ declare const generateEventTask: (overrides?: Partial<EventTaskDef>) => EventTaskDef;
2055
+
2056
+ declare type TaskDefTypesGen = SimpleTaskDef | DoWhileTaskDefGen | EventTaskDef | ForkJoinTaskDefGen | ForkJoinDynamicDef | HttpTaskDef | InlineTaskDefGen | JsonJQTransformTaskDef | KafkaPublishTaskDef | SetVariableTaskDef | SubWorkflowTaskDef | SwitchTaskDefGen | TerminateTaskDef | JoinTaskDef | WaitTaskDef;
2057
+ interface WorkflowDefGen extends Omit<WorkflowDef, "tasks"> {
2058
+ tasks: Partial<TaskDefTypesGen>[];
2059
+ }
2060
+ declare type ForkJoinTaskDefGen = Omit<ForkJoinTaskDef, "forkTasks"> & {
2061
+ forkTasks: Array<Array<Partial<TaskDefTypesGen>>>;
2062
+ };
2063
+ declare type SwitchTaskDefGen = Omit<SwitchTaskDef, "decisionCases" | "defaultCase"> & {
2064
+ decisionCases: Record<string, Partial<TaskDefTypesGen>[]>;
2065
+ defaultCase: Partial<TaskDefTypesGen>[];
2066
+ };
2067
+ declare type DoWhileTaskDefGen = Omit<DoWhileTaskDef, "loopOver"> & {
2068
+ loopOver: Partial<TaskDefTypesGen>[];
2069
+ };
2070
+ interface InlineTaskInputParametersGen extends Omit<InlineTaskInputParameters, "expression"> {
2071
+ expression: string | Function;
2072
+ }
2073
+ interface InlineTaskDefGen extends Omit<InlineTaskDef, "inputParameters"> {
2074
+ inputParameters: InlineTaskInputParametersGen;
2075
+ }
2076
+ declare type NestedTaskMapper = {
2077
+ (tasks: Partial<TaskDefTypesGen>[]): TaskDefTypes[];
2078
+ };
2079
+
2080
+ declare const generateJoinTask: (overrides?: Partial<JoinTaskDef>) => JoinTaskDef;
2081
+
2082
+ /**
2083
+ * Takes an optional partial HttpTaskDef
2084
+ * generates a task replacing default/fake values with provided overrides
2085
+ *
2086
+ * @param overrides overrides for defaults
2087
+ * @returns a fully defined task
2088
+ */
2089
+ declare const generateHTTPTask: (overrides?: Partial<HttpTaskDef>) => HttpTaskDef;
2090
+
2091
+ /**
2092
+ * Takes an optional partial InlineTaskDefGen
2093
+ * generates a task replacing default/fake values with provided overrides
2094
+ *
2095
+ * <b>note</b> that the inputParameters.expression can be either a string containing javascript
2096
+ * or a function thar returns an ES5 function
2097
+ *
2098
+ * @param overrides overrides for defaults
2099
+ * @returns a fully defined task
2100
+ */
2101
+ declare const generateInlineTask: (override?: Partial<InlineTaskDefGen>) => InlineTaskDef;
2102
+
2103
+ /**
2104
+ * Takes an optional partial JsonJQTransformTaskDef
2105
+ * generates a task replacing default/fake values with provided overrides
2106
+ *
2107
+ * @param overrides overrides for defaults
2108
+ * @returns a fully defined task
2109
+ */
2110
+ declare const generateJQTransformTask: (overrides?: Partial<JsonJQTransformTaskDef>) => JsonJQTransformTaskDef;
2111
+
2112
+ /**
2113
+ * Takes an optional partial KafkaPublishTaskDef
2114
+ * generates a task replacing default/fake values with provided overrides
2115
+ *
2116
+ * @param overrides overrides for defaults
2117
+ * @returns a fully defined task
2118
+ */
2119
+ declare const generateKafkaPublishTask: (overrides?: Partial<KafkaPublishTaskDef>) => KafkaPublishTaskDef;
2120
+
2121
+ /**
2122
+ * Takes an optional partial SubWorkflowTaskDef
2123
+ * generates a task replacing default/fake values with provided overrides
2124
+ *
2125
+ * @param overrides overrides for defaults
2126
+ * @returns a fully defined task
2127
+ */
2128
+ declare const generateSubWorkflowTask: (overrides?: Partial<SubWorkflowTaskDef>) => SubWorkflowTaskDef;
2129
+
2130
+ /**
2131
+ * Takes an optional partial SetVariableTaskDef
2132
+ * generates a task replacing default/fake values with provided overrides
2133
+ *
2134
+ * @param overrides overrides for defaults
2135
+ * @returns a fully defined task
2136
+ */
2137
+ declare const generateSetVariableTask: (overrides?: Partial<SetVariableTaskDef>) => SetVariableTaskDef;
2138
+
2139
+ /**
2140
+ * Takes an optional partial TerminateTaskDef
2141
+ * generates a task replacing default/fake values with provided overrides
2142
+ *
2143
+ * @param overrides overrides for defaults
2144
+ * @returns a fully defined task
2145
+ */
2146
+ declare const generateTerminateTask: (overrides?: Partial<TerminateTaskDef>) => TerminateTaskDef;
2147
+
2148
+ /**
2149
+ * Takes an optional partial WaitTaskDef
2150
+ * generates a task replacing default/fake values with provided overrides
2151
+ *
2152
+ * @param overrides overrides for defaults
2153
+ * @returns a fully defined task
2154
+ */
2155
+ declare const generateWaitTask: (overrides?: Partial<WaitTaskDef>) => WaitTaskDef;
2156
+
2157
+ declare const taskGenMapper: (tasks: Partial<TaskDefTypesGen>[]) => TaskDefTypes[];
2158
+ /**
2159
+ * Takes an optional partial WorkflowDefGen
2160
+ * generates a workflow replacing default/fake values with provided overrides
2161
+ *
2162
+ * @param overrides overrides for defaults
2163
+ * @returns a fully defined task
2164
+ */
2165
+ declare const generate: (overrides: Partial<WorkflowDefGen>) => WorkflowDef;
2166
+
2167
+ /**
2168
+ * Takes an optional partial SwitchTaskDefGen and an optional nestedMapper
2169
+ * generates a task replacing default/fake values with provided overrides
2170
+ *
2171
+ * @param overrides overrides for defaults
2172
+ * @param nestedTasksMapper function to run on array of nested tasks
2173
+ * @returns a fully defined task
2174
+ */
2175
+ declare const generateSwitchTask: (overrides?: Partial<SwitchTaskDefGen>, nestedTasksMapper?: NestedTaskMapper) => SwitchTaskDef;
2176
+ /**
2177
+ * Takes an optional partial DoWhileTaskDefGen and an optional nestedMapper
2178
+ * generates a task replacing default/fake values with provided overrides
2179
+ *
2180
+ * @param overrides overrides for defaults
2181
+ * @param nestedTasksMapper function to run on array of nested tasks
2182
+ * @returns a fully defined task
2183
+ */
2184
+ declare const generateDoWhileTask: (overrides?: Partial<DoWhileTaskDefGen>, nestedTasksMapper?: NestedTaskMapper) => DoWhileTaskDef;
2185
+ /**
2186
+ * Takes an optional partial DoWhileTaskDefGen and an optional nestedMapper
2187
+ * generates a task replacing default/fake values with provided overrides
2188
+ *
2189
+ * @param overrides overrides for defaults
2190
+ * @param nestedTasksMapper function to run on array of nested tasks
2191
+ * @returns a fully defined task
2192
+ */
2193
+ declare const generateForkJoinTask: (overrides?: Partial<ForkJoinTaskDefGen>, nestedMapper?: NestedTaskMapper) => ForkJoinTaskDef;
2194
+
2195
+ declare type FetchFn<T = RequestInit, R extends {
2196
+ json: () => Promise<any>;
2197
+ } = Response> = (input: RequestInfo, init?: T) => Promise<R>;
2198
+ declare type OrkesApiConfig = ConductorClientAPIConfig & GenerateTokenRequest;
3
2199
 
4
2200
  /**
5
2201
  * Takes a config with keyId and keySecret returns a promise with an instance of ConductorClient
@@ -59,4 +2255,4 @@ declare const fetchCatchDns: <T extends {
59
2255
  json: () => Promise<any>;
60
2256
  }>(fetch: FetchFn<T, R>, { dnsCache, headerFactory, }?: CatcherOptions) => FetchFn<T, R>;
61
2257
 
62
- export { ApiRequestOptions, AuthConductorClient, CancelablePromise, ConductorClient, ConductorClientAPIConfig, ConductorHttpRequest, DnsCacheResolver, FetchFn, OpenAPIConfig, OrkesApiConfig, baseOrkesConductorClient, fetchCatchDns, orkesConductorClient, request, toMaybeUrl };
2258
+ export { Action, ApiError, ApiRequestOptions, ApiResult, AuthConductorClient, BaseHttpRequest, CancelError, CancelablePromise, CommonTaskDef, ConductorClient, ConductorClientAPIConfig, ConductorError, ConductorHttpRequest, ConductorLogLevel, ConductorLogger, ConductorWorker, DefaultLogger, DefaultLoggerConfig, DnsCacheResolver, DoWhileTaskDef, EventHandler, EventResourceService, EventTaskDef, ExternalStorageLocation, FetchFn, ForkJoinDynamicDef, ForkJoinTaskDef, GenerateTokenRequest, HTScrollableSearchResultHumanTaskEntry, HealthCheckResourceService, HttpInputParameters, HttpTaskDef, HumanExecutor, HumanTaskAssignment, HumanTaskDefinition, HumanTaskEntry, HumanTaskSearch, HumanTaskSearchResult, HumanTaskTemplate, HumanTaskTrigger, HumanTaskUser, InlineTaskDef, InlineTaskInputParameters, JoinTaskDef, JsonJQTransformTaskDef, KafkaPublishInputParameters, KafkaPublishTaskDef, MetadataResourceService, OnCancel, OpenAPIConfig, OrkesApiConfig, PollData, RequestType, RerunWorkflowRequest, Response$1 as Response, RunnerArgs, SaveScheduleRequest, SchedulerResourceService, ScrollableSearchResultWorkflowSummary, SearchResultTask, SearchResultTaskSummary, SearchResultWorkflow, SearchResultWorkflowScheduleExecutionModel, SearchResultWorkflowSummary, SetVariableTaskDef, SimpleTaskDef, SkipTaskRequest, StartWorkflow, StartWorkflowRequest, SubWorkflowParams, SubWorkflowTaskDef, SwitchTaskDef, Task, TaskDef, TaskDefTypes, TaskDetails, TaskErrorHandler, TaskExecLog, TaskFinderPredicate, TaskManager, TaskManagerConfig, TaskManagerOptions, TaskResourceService, TaskResult, TaskResultStatus, TaskRunner, TaskRunnerOptions, TaskSummary, TaskType, Terminate, TerminateTaskDef, TimeoutPolicy, TokenResourceService, UserFormTemplate, WaitTaskDef, Workflow, WorkflowBulkResourceService, WorkflowDef, WorkflowExecutor, WorkflowResourceService, WorkflowSchedule, WorkflowScheduleExecutionModel, WorkflowStatus, WorkflowSummary, WorkflowTask, baseOrkesConductorClient, completedTaskMatchingType, conductorEventTask, doWhileTask, dynamicForkTask, eventTask, fetchCatchDns, forkTask, forkTaskJoin, generate, generateDoWhileTask, generateEventTask, generateForkJoinTask, generateHTTPTask, generateInlineTask, generateJQTransformTask, generateJoinTask, generateKafkaPublishTask, generateSetVariableTask, generateSimpleTask, generateSubWorkflowTask, generateSwitchTask, generateTerminateTask, generateWaitTask, httpTask, inlineTask, joinTask, jsonJqTask, kafkaPublishTask, newLoopTask, noopErrorHandler, noopLogger, orkesConductorClient, request, setVariableTask, simpleTask, sqsEventTask, subWorkflowTask, switchTask, taskGenMapper, terminateTask, toMaybeUrl, waitTaskDuration, waitTaskUntil, workflow };