@io-orkes/conductor-javascript 2.1.3 → 2.1.5
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 +721 -341
- package/dist/index.d.ts +721 -341
- package/dist/index.js +456 -35
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +451 -32
- package/dist/index.mjs.map +1 -1
- package/package.json +13 -18
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
type ApiRequestOptions = {
|
|
2
2
|
readonly method: 'GET' | 'PUT' | 'POST' | 'DELETE' | 'OPTIONS' | 'HEAD' | 'PATCH';
|
|
3
3
|
readonly url: string;
|
|
4
4
|
readonly path?: Record<string, any>;
|
|
@@ -39,9 +39,9 @@ declare class CancelablePromise<T> implements Promise<T> {
|
|
|
39
39
|
get isCancelled(): boolean;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
type Resolver<T> = (options: ApiRequestOptions) => Promise<T>;
|
|
43
|
+
type Headers = Record<string, string>;
|
|
44
|
+
type OpenAPIConfig = {
|
|
45
45
|
BASE: string;
|
|
46
46
|
VERSION: string;
|
|
47
47
|
WITH_CREDENTIALS: boolean;
|
|
@@ -59,7 +59,7 @@ declare abstract class BaseHttpRequest {
|
|
|
59
59
|
abstract request<T>(options: ApiRequestOptions): CancelablePromise<T>;
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
|
|
62
|
+
type StartWorkflow = {
|
|
63
63
|
name?: string;
|
|
64
64
|
version?: number;
|
|
65
65
|
correlationId?: string;
|
|
@@ -67,14 +67,14 @@ declare type StartWorkflow = {
|
|
|
67
67
|
taskToDomain?: Record<string, string>;
|
|
68
68
|
};
|
|
69
69
|
|
|
70
|
-
|
|
70
|
+
type TaskDetails = {
|
|
71
71
|
workflowId?: string;
|
|
72
72
|
taskRefName?: string;
|
|
73
73
|
output?: Record<string, any>;
|
|
74
74
|
taskId?: string;
|
|
75
75
|
};
|
|
76
76
|
|
|
77
|
-
|
|
77
|
+
type Action = {
|
|
78
78
|
action?: 'start_workflow' | 'complete_task' | 'fail_task';
|
|
79
79
|
start_workflow?: StartWorkflow;
|
|
80
80
|
complete_task?: TaskDetails;
|
|
@@ -82,7 +82,7 @@ declare type Action = {
|
|
|
82
82
|
expandInlineJSON?: boolean;
|
|
83
83
|
};
|
|
84
84
|
|
|
85
|
-
|
|
85
|
+
type EventHandler = {
|
|
86
86
|
name: string;
|
|
87
87
|
event: string;
|
|
88
88
|
condition?: string;
|
|
@@ -172,7 +172,7 @@ declare class HealthCheckResourceService {
|
|
|
172
172
|
doCheck(): CancelablePromise<Record<string, any>>;
|
|
173
173
|
}
|
|
174
174
|
|
|
175
|
-
|
|
175
|
+
type TaskDef = {
|
|
176
176
|
ownerApp?: string;
|
|
177
177
|
createTime?: number;
|
|
178
178
|
updateTime?: number;
|
|
@@ -199,7 +199,7 @@ declare type TaskDef = {
|
|
|
199
199
|
backoffScaleFactor?: number;
|
|
200
200
|
};
|
|
201
201
|
|
|
202
|
-
|
|
202
|
+
type SubWorkflowParams = {
|
|
203
203
|
name: string;
|
|
204
204
|
version?: number;
|
|
205
205
|
taskToDomain?: Record<string, string>;
|
|
@@ -208,7 +208,7 @@ declare type SubWorkflowParams = {
|
|
|
208
208
|
idempotencyStrategy?: 'FAIL' | 'RETURN_EXISTING';
|
|
209
209
|
};
|
|
210
210
|
|
|
211
|
-
|
|
211
|
+
type WorkflowTask = {
|
|
212
212
|
name: string;
|
|
213
213
|
taskReferenceName: string;
|
|
214
214
|
description?: string;
|
|
@@ -250,7 +250,7 @@ declare type WorkflowTask = {
|
|
|
250
250
|
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';
|
|
251
251
|
};
|
|
252
252
|
|
|
253
|
-
|
|
253
|
+
type WorkflowDef$1 = {
|
|
254
254
|
ownerApp?: string;
|
|
255
255
|
createTime?: number;
|
|
256
256
|
updateTime?: number;
|
|
@@ -360,7 +360,7 @@ declare class MetadataResourceService {
|
|
|
360
360
|
get(name: string, version?: number, metadata?: boolean): CancelablePromise<WorkflowDef$1>;
|
|
361
361
|
}
|
|
362
362
|
|
|
363
|
-
|
|
363
|
+
type StartWorkflowRequest = {
|
|
364
364
|
name: string;
|
|
365
365
|
version?: number;
|
|
366
366
|
correlationId?: string;
|
|
@@ -374,7 +374,7 @@ declare type StartWorkflowRequest = {
|
|
|
374
374
|
createdBy?: string;
|
|
375
375
|
};
|
|
376
376
|
|
|
377
|
-
|
|
377
|
+
type SaveScheduleRequest = {
|
|
378
378
|
name: string;
|
|
379
379
|
cronExpression: string;
|
|
380
380
|
runCatchupScheduleInstances?: boolean;
|
|
@@ -386,7 +386,7 @@ declare type SaveScheduleRequest = {
|
|
|
386
386
|
scheduleEndTime?: number;
|
|
387
387
|
};
|
|
388
388
|
|
|
389
|
-
|
|
389
|
+
type WorkflowScheduleExecutionModel = {
|
|
390
390
|
executionId?: string;
|
|
391
391
|
scheduleName?: string;
|
|
392
392
|
scheduledTime?: number;
|
|
@@ -399,12 +399,12 @@ declare type WorkflowScheduleExecutionModel = {
|
|
|
399
399
|
state?: 'POLLED' | 'FAILED' | 'EXECUTED';
|
|
400
400
|
};
|
|
401
401
|
|
|
402
|
-
|
|
402
|
+
type SearchResultWorkflowScheduleExecutionModel = {
|
|
403
403
|
totalHits?: number;
|
|
404
404
|
results?: Array<WorkflowScheduleExecutionModel>;
|
|
405
405
|
};
|
|
406
406
|
|
|
407
|
-
|
|
407
|
+
type WorkflowSchedule = {
|
|
408
408
|
name?: string;
|
|
409
409
|
cronExpression?: string;
|
|
410
410
|
runCatchupScheduleInstances?: boolean;
|
|
@@ -511,19 +511,19 @@ declare class SchedulerResourceService {
|
|
|
511
511
|
searchV21(start?: number, size?: number, sort?: string, freeText?: string, query?: string): CancelablePromise<SearchResultWorkflowScheduleExecutionModel>;
|
|
512
512
|
}
|
|
513
513
|
|
|
514
|
-
|
|
514
|
+
type ExternalStorageLocation = {
|
|
515
515
|
uri?: string;
|
|
516
516
|
path?: string;
|
|
517
517
|
};
|
|
518
518
|
|
|
519
|
-
|
|
519
|
+
type PollData = {
|
|
520
520
|
queueName?: string;
|
|
521
521
|
domain?: string;
|
|
522
522
|
workerId?: string;
|
|
523
523
|
lastPollTime?: number;
|
|
524
524
|
};
|
|
525
525
|
|
|
526
|
-
|
|
526
|
+
type Task = {
|
|
527
527
|
taskType?: string;
|
|
528
528
|
status?: 'IN_PROGRESS' | 'CANCELED' | 'FAILED' | 'FAILED_WITH_TERMINAL_ERROR' | 'COMPLETED' | 'COMPLETED_WITH_ERRORS' | 'SCHEDULED' | 'TIMED_OUT' | 'SKIPPED';
|
|
529
529
|
inputData?: Record<string, any>;
|
|
@@ -567,12 +567,12 @@ declare type Task = {
|
|
|
567
567
|
loopOverTask?: boolean;
|
|
568
568
|
};
|
|
569
569
|
|
|
570
|
-
|
|
570
|
+
type SearchResultTask = {
|
|
571
571
|
totalHits?: number;
|
|
572
572
|
results?: Array<Task>;
|
|
573
573
|
};
|
|
574
574
|
|
|
575
|
-
|
|
575
|
+
type TaskSummary = {
|
|
576
576
|
workflowId?: string;
|
|
577
577
|
workflowType?: string;
|
|
578
578
|
correlationId?: string;
|
|
@@ -594,18 +594,18 @@ declare type TaskSummary = {
|
|
|
594
594
|
workflowPriority?: number;
|
|
595
595
|
};
|
|
596
596
|
|
|
597
|
-
|
|
597
|
+
type SearchResultTaskSummary = {
|
|
598
598
|
totalHits?: number;
|
|
599
599
|
results?: Array<TaskSummary>;
|
|
600
600
|
};
|
|
601
601
|
|
|
602
|
-
|
|
602
|
+
type TaskExecLog = {
|
|
603
603
|
log?: string;
|
|
604
604
|
taskId?: string;
|
|
605
605
|
createdTime?: number;
|
|
606
606
|
};
|
|
607
607
|
|
|
608
|
-
|
|
608
|
+
type TaskResult = {
|
|
609
609
|
workflowInstanceId: string;
|
|
610
610
|
taskId: string;
|
|
611
611
|
reasonForIncompletion?: string;
|
|
@@ -618,6 +618,340 @@ declare type TaskResult = {
|
|
|
618
618
|
subWorkflowId?: string;
|
|
619
619
|
};
|
|
620
620
|
|
|
621
|
+
type Workflow = {
|
|
622
|
+
ownerApp?: string;
|
|
623
|
+
createTime?: number;
|
|
624
|
+
updateTime?: number;
|
|
625
|
+
createdBy?: string;
|
|
626
|
+
updatedBy?: string;
|
|
627
|
+
status?: 'RUNNING' | 'COMPLETED' | 'FAILED' | 'TIMED_OUT' | 'TERMINATED' | 'PAUSED';
|
|
628
|
+
idempotencyKey?: string;
|
|
629
|
+
endTime?: number;
|
|
630
|
+
workflowId?: string;
|
|
631
|
+
parentWorkflowId?: string;
|
|
632
|
+
parentWorkflowTaskId?: string;
|
|
633
|
+
tasks?: Array<Task>;
|
|
634
|
+
input?: Record<string, any>;
|
|
635
|
+
output?: Record<string, any>;
|
|
636
|
+
correlationId?: string;
|
|
637
|
+
reRunFromWorkflowId?: string;
|
|
638
|
+
reasonForIncompletion?: string;
|
|
639
|
+
event?: string;
|
|
640
|
+
taskToDomain?: Record<string, string>;
|
|
641
|
+
failedReferenceTaskNames?: Array<string>;
|
|
642
|
+
workflowDefinition?: WorkflowDef$1;
|
|
643
|
+
externalInputPayloadStoragePath?: string;
|
|
644
|
+
externalOutputPayloadStoragePath?: string;
|
|
645
|
+
priority?: number;
|
|
646
|
+
variables?: Record<string, any>;
|
|
647
|
+
lastRetriedTime?: number;
|
|
648
|
+
startTime?: number;
|
|
649
|
+
workflowVersion?: number;
|
|
650
|
+
workflowName?: string;
|
|
651
|
+
};
|
|
652
|
+
|
|
653
|
+
interface CommonTaskDef {
|
|
654
|
+
name: string;
|
|
655
|
+
taskReferenceName: string;
|
|
656
|
+
}
|
|
657
|
+
declare enum Consistency {
|
|
658
|
+
SYNCHRONOUS = "SYNCHRONOUS",
|
|
659
|
+
DURABLE = "DURABLE",
|
|
660
|
+
REGION_DURABLE = "REGION_DURABLE"
|
|
661
|
+
}
|
|
662
|
+
declare enum ReturnStrategy {
|
|
663
|
+
TARGET_WORKFLOW = "TARGET_WORKFLOW",
|
|
664
|
+
BLOCKING_WORKFLOW = "BLOCKING_WORKFLOW",
|
|
665
|
+
BLOCKING_TASK = "BLOCKING_TASK",
|
|
666
|
+
BLOCKING_TASK_INPUT = "BLOCKING_TASK_INPUT"
|
|
667
|
+
}
|
|
668
|
+
declare enum TaskType {
|
|
669
|
+
START = "START",
|
|
670
|
+
SIMPLE = "SIMPLE",
|
|
671
|
+
DYNAMIC = "DYNAMIC",
|
|
672
|
+
FORK_JOIN = "FORK_JOIN",
|
|
673
|
+
FORK_JOIN_DYNAMIC = "FORK_JOIN_DYNAMIC",
|
|
674
|
+
DECISION = "DECISION",
|
|
675
|
+
SWITCH = "SWITCH",
|
|
676
|
+
JOIN = "JOIN",
|
|
677
|
+
DO_WHILE = "DO_WHILE",
|
|
678
|
+
SUB_WORKFLOW = "SUB_WORKFLOW",
|
|
679
|
+
EVENT = "EVENT",
|
|
680
|
+
WAIT = "WAIT",
|
|
681
|
+
USER_DEFINED = "USER_DEFINED",
|
|
682
|
+
HTTP = "HTTP",
|
|
683
|
+
LAMBDA = "LAMBDA",
|
|
684
|
+
INLINE = "INLINE",
|
|
685
|
+
EXCLUSIVE_JOIN = "EXCLUSIVE_JOIN",
|
|
686
|
+
TERMINAL = "TERMINAL",
|
|
687
|
+
TERMINATE = "TERMINATE",
|
|
688
|
+
KAFKA_PUBLISH = "KAFKA_PUBLISH",
|
|
689
|
+
JSON_JQ_TRANSFORM = "JSON_JQ_TRANSFORM",
|
|
690
|
+
SET_VARIABLE = "SET_VARIABLE"
|
|
691
|
+
}
|
|
692
|
+
type TaskDefTypes = SimpleTaskDef | DoWhileTaskDef | EventTaskDef | ForkJoinTaskDef | ForkJoinDynamicDef | HttpTaskDef | InlineTaskDef | JsonJQTransformTaskDef | KafkaPublishTaskDef | SetVariableTaskDef | SubWorkflowTaskDef | SwitchTaskDef | TerminateTaskDef | JoinTaskDef | WaitTaskDef;
|
|
693
|
+
interface DoWhileTaskDef extends CommonTaskDef {
|
|
694
|
+
inputParameters: Record<string, unknown>;
|
|
695
|
+
type: TaskType.DO_WHILE;
|
|
696
|
+
startDelay?: number;
|
|
697
|
+
optional?: boolean;
|
|
698
|
+
asyncComplete?: boolean;
|
|
699
|
+
loopCondition: string;
|
|
700
|
+
loopOver: TaskDefTypes[];
|
|
701
|
+
}
|
|
702
|
+
interface EventTaskDef extends CommonTaskDef {
|
|
703
|
+
type: TaskType.EVENT;
|
|
704
|
+
sink: string;
|
|
705
|
+
asyncComplete?: boolean;
|
|
706
|
+
}
|
|
707
|
+
interface ForkJoinTaskDef extends CommonTaskDef {
|
|
708
|
+
type: TaskType.FORK_JOIN;
|
|
709
|
+
inputParameters?: Record<string, string>;
|
|
710
|
+
forkTasks: Array<Array<TaskDefTypes>>;
|
|
711
|
+
}
|
|
712
|
+
interface JoinTaskDef extends CommonTaskDef {
|
|
713
|
+
type: TaskType.JOIN;
|
|
714
|
+
inputParameters?: Record<string, string>;
|
|
715
|
+
joinOn: string[];
|
|
716
|
+
optional?: boolean;
|
|
717
|
+
asyncComplete?: boolean;
|
|
718
|
+
}
|
|
719
|
+
interface ForkJoinDynamicDef extends CommonTaskDef {
|
|
720
|
+
inputParameters: {
|
|
721
|
+
dynamicTasks: any;
|
|
722
|
+
dynamicTasksInput: any;
|
|
723
|
+
};
|
|
724
|
+
type: TaskType.FORK_JOIN_DYNAMIC;
|
|
725
|
+
dynamicForkTasksParam: string;
|
|
726
|
+
dynamicForkTasksInputParamName: string;
|
|
727
|
+
startDelay?: number;
|
|
728
|
+
optional?: boolean;
|
|
729
|
+
asyncComplete?: boolean;
|
|
730
|
+
}
|
|
731
|
+
interface HttpInputParameters {
|
|
732
|
+
uri: string;
|
|
733
|
+
method: "GET" | "PUT" | "POST" | "DELETE" | "OPTIONS" | "HEAD";
|
|
734
|
+
accept?: string;
|
|
735
|
+
contentType?: string;
|
|
736
|
+
headers?: Record<string, string>;
|
|
737
|
+
body?: unknown;
|
|
738
|
+
connectionTimeOut?: number;
|
|
739
|
+
readTimeOut?: string;
|
|
740
|
+
}
|
|
741
|
+
interface HttpTaskDef extends CommonTaskDef {
|
|
742
|
+
inputParameters: {
|
|
743
|
+
[x: string]: unknown;
|
|
744
|
+
http_request: HttpInputParameters;
|
|
745
|
+
};
|
|
746
|
+
type: TaskType.HTTP;
|
|
747
|
+
asyncComplete?: boolean;
|
|
748
|
+
}
|
|
749
|
+
interface InlineTaskInputParameters {
|
|
750
|
+
evaluatorType: "javascript" | "graaljs";
|
|
751
|
+
expression: string;
|
|
752
|
+
[x: string]: unknown;
|
|
753
|
+
}
|
|
754
|
+
interface InlineTaskDef extends CommonTaskDef {
|
|
755
|
+
type: TaskType.INLINE;
|
|
756
|
+
inputParameters: InlineTaskInputParameters;
|
|
757
|
+
}
|
|
758
|
+
interface ContainingQueryExpression {
|
|
759
|
+
queryExpression: string;
|
|
760
|
+
[x: string | number | symbol]: unknown;
|
|
761
|
+
}
|
|
762
|
+
interface JsonJQTransformTaskDef extends CommonTaskDef {
|
|
763
|
+
type: TaskType.JSON_JQ_TRANSFORM;
|
|
764
|
+
inputParameters: ContainingQueryExpression;
|
|
765
|
+
}
|
|
766
|
+
interface KafkaPublishInputParameters {
|
|
767
|
+
topic: string;
|
|
768
|
+
value: string;
|
|
769
|
+
bootStrapServers: string;
|
|
770
|
+
headers: Record<string, string>;
|
|
771
|
+
key: string;
|
|
772
|
+
keySerializer: string;
|
|
773
|
+
}
|
|
774
|
+
interface KafkaPublishTaskDef extends CommonTaskDef {
|
|
775
|
+
inputParameters: {
|
|
776
|
+
kafka_request: KafkaPublishInputParameters;
|
|
777
|
+
};
|
|
778
|
+
type: TaskType.KAFKA_PUBLISH;
|
|
779
|
+
}
|
|
780
|
+
interface SetVariableTaskDef extends CommonTaskDef {
|
|
781
|
+
type: TaskType.SET_VARIABLE;
|
|
782
|
+
inputParameters: Record<string, unknown>;
|
|
783
|
+
}
|
|
784
|
+
interface SimpleTaskDef extends CommonTaskDef {
|
|
785
|
+
type: TaskType.SIMPLE;
|
|
786
|
+
inputParameters?: Record<string, unknown>;
|
|
787
|
+
}
|
|
788
|
+
interface SubWorkflowTaskDef extends CommonTaskDef {
|
|
789
|
+
type: TaskType.SUB_WORKFLOW;
|
|
790
|
+
inputParameters?: Record<string, unknown>;
|
|
791
|
+
subWorkflowParam: {
|
|
792
|
+
name: string;
|
|
793
|
+
version?: number;
|
|
794
|
+
taskToDomain?: Record<string, string>;
|
|
795
|
+
};
|
|
796
|
+
}
|
|
797
|
+
interface SwitchTaskDef extends CommonTaskDef {
|
|
798
|
+
inputParameters: Record<string, unknown>;
|
|
799
|
+
type: TaskType.SWITCH;
|
|
800
|
+
decisionCases: Record<string, TaskDefTypes[]>;
|
|
801
|
+
defaultCase: TaskDefTypes[];
|
|
802
|
+
evaluatorType: "value-param" | "javascript";
|
|
803
|
+
expression: string;
|
|
804
|
+
}
|
|
805
|
+
interface TerminateTaskDef extends CommonTaskDef {
|
|
806
|
+
inputParameters: {
|
|
807
|
+
terminationStatus: "COMPLETED" | "FAILED";
|
|
808
|
+
workflowOutput?: Record<string, string>;
|
|
809
|
+
terminationReason?: string;
|
|
810
|
+
};
|
|
811
|
+
type: TaskType.TERMINATE;
|
|
812
|
+
startDelay?: number;
|
|
813
|
+
optional?: boolean;
|
|
814
|
+
}
|
|
815
|
+
interface WaitTaskDef extends CommonTaskDef {
|
|
816
|
+
type: TaskType.WAIT;
|
|
817
|
+
inputParameters: {
|
|
818
|
+
duration?: string;
|
|
819
|
+
until?: string;
|
|
820
|
+
};
|
|
821
|
+
}
|
|
822
|
+
interface WorkflowDef extends Omit<WorkflowDef$1, "tasks" | "version" | "inputParameters"> {
|
|
823
|
+
inputParameters: string[];
|
|
824
|
+
version: number;
|
|
825
|
+
tasks: TaskDefTypes[];
|
|
826
|
+
}
|
|
827
|
+
|
|
828
|
+
/**
|
|
829
|
+
* SignalResponse represents a unified response from the signal API
|
|
830
|
+
*/
|
|
831
|
+
declare class SignalResponse {
|
|
832
|
+
/** Type of response based on return strategy */
|
|
833
|
+
responseType?: string;
|
|
834
|
+
/** ID of the target workflow */
|
|
835
|
+
targetWorkflowId?: string;
|
|
836
|
+
/** Status of the target workflow */
|
|
837
|
+
targetWorkflowStatus?: string;
|
|
838
|
+
/** ID of the workflow */
|
|
839
|
+
workflowId?: string;
|
|
840
|
+
/** Input data for the workflow/task */
|
|
841
|
+
input?: Record<string, any>;
|
|
842
|
+
/** Output data from the workflow/task */
|
|
843
|
+
output?: Record<string, any>;
|
|
844
|
+
/** Priority of the workflow */
|
|
845
|
+
priority?: number;
|
|
846
|
+
/** Workflow variables */
|
|
847
|
+
variables?: Record<string, any>;
|
|
848
|
+
/** Array of tasks in the workflow */
|
|
849
|
+
tasks?: Array<Task>;
|
|
850
|
+
/** User who created the workflow */
|
|
851
|
+
createdBy?: string;
|
|
852
|
+
/** Timestamp when workflow was created */
|
|
853
|
+
createTime?: number;
|
|
854
|
+
/** Current status of the workflow */
|
|
855
|
+
status?: string;
|
|
856
|
+
/** Timestamp when workflow was last updated */
|
|
857
|
+
updateTime?: number;
|
|
858
|
+
/** Type of the blocking task */
|
|
859
|
+
taskType?: string;
|
|
860
|
+
/** ID of the blocking task */
|
|
861
|
+
taskId?: string;
|
|
862
|
+
/** Reference name of the blocking task */
|
|
863
|
+
referenceTaskName?: string;
|
|
864
|
+
/** Number of retries for the task */
|
|
865
|
+
retryCount?: number;
|
|
866
|
+
/** Definition name of the task */
|
|
867
|
+
taskDefName?: string;
|
|
868
|
+
/** Type of the workflow containing the task */
|
|
869
|
+
workflowType?: string;
|
|
870
|
+
/**
|
|
871
|
+
* Returns true if the response contains target workflow details
|
|
872
|
+
*/
|
|
873
|
+
isTargetWorkflow(): boolean;
|
|
874
|
+
/**
|
|
875
|
+
* Returns true if the response contains blocking workflow details
|
|
876
|
+
*/
|
|
877
|
+
isBlockingWorkflow(): boolean;
|
|
878
|
+
/**
|
|
879
|
+
* Returns true if the response contains blocking task details
|
|
880
|
+
*/
|
|
881
|
+
isBlockingTask(): boolean;
|
|
882
|
+
/**
|
|
883
|
+
* Returns true if the response contains blocking task input
|
|
884
|
+
*/
|
|
885
|
+
isBlockingTaskInput(): boolean;
|
|
886
|
+
/**
|
|
887
|
+
* Extracts workflow details from a SignalResponse
|
|
888
|
+
* @throws Error if the response type doesn't contain workflow details
|
|
889
|
+
*/
|
|
890
|
+
getWorkflow(): Workflow;
|
|
891
|
+
/**
|
|
892
|
+
* Extracts task details from a SignalResponse
|
|
893
|
+
* @throws Error if the response type doesn't contain task details
|
|
894
|
+
*/
|
|
895
|
+
getBlockingTask(): Task;
|
|
896
|
+
/**
|
|
897
|
+
* Extracts task input from a SignalResponse
|
|
898
|
+
* Only valid for BLOCKING_TASK_INPUT responses
|
|
899
|
+
* @throws Error if the response type doesn't contain task input details
|
|
900
|
+
*/
|
|
901
|
+
getTaskInput(): Record<string, any>;
|
|
902
|
+
/**
|
|
903
|
+
* Get the workflow ID from the response
|
|
904
|
+
*/
|
|
905
|
+
getWorkflowId(): string;
|
|
906
|
+
/**
|
|
907
|
+
* Get the target workflow ID from the response
|
|
908
|
+
*/
|
|
909
|
+
getTargetWorkflowId(): string;
|
|
910
|
+
/**
|
|
911
|
+
* Check if the response has workflow data
|
|
912
|
+
*/
|
|
913
|
+
hasWorkflowData(): boolean;
|
|
914
|
+
/**
|
|
915
|
+
* Check if the response has task data
|
|
916
|
+
*/
|
|
917
|
+
hasTaskData(): boolean;
|
|
918
|
+
/**
|
|
919
|
+
* Get response type as string
|
|
920
|
+
*/
|
|
921
|
+
getResponseType(): string;
|
|
922
|
+
/**
|
|
923
|
+
* Check if the workflow/task is in a terminal state
|
|
924
|
+
*/
|
|
925
|
+
isTerminal(): boolean;
|
|
926
|
+
/**
|
|
927
|
+
* Check if the workflow/task is currently running
|
|
928
|
+
*/
|
|
929
|
+
isRunning(): boolean;
|
|
930
|
+
/**
|
|
931
|
+
* Check if the workflow/task is paused
|
|
932
|
+
*/
|
|
933
|
+
isPaused(): boolean;
|
|
934
|
+
/**
|
|
935
|
+
* Get a summary of the response for logging
|
|
936
|
+
*/
|
|
937
|
+
getSummary(): string;
|
|
938
|
+
/**
|
|
939
|
+
* Convert to JSON for debugging (excludes large objects)
|
|
940
|
+
*/
|
|
941
|
+
toDebugJSON(): Record<string, any>;
|
|
942
|
+
/**
|
|
943
|
+
* String representation for debugging
|
|
944
|
+
*/
|
|
945
|
+
toString(): string;
|
|
946
|
+
}
|
|
947
|
+
|
|
948
|
+
declare enum TaskResultStatusEnum {
|
|
949
|
+
IN_PROGRESS = "IN_PROGRESS",
|
|
950
|
+
FAILED = "FAILED",
|
|
951
|
+
FAILED_WITH_TERMINAL_ERROR = "FAILED_WITH_TERMINAL_ERROR",
|
|
952
|
+
COMPLETED = "COMPLETED"
|
|
953
|
+
}
|
|
954
|
+
|
|
621
955
|
declare class TaskResourceService {
|
|
622
956
|
readonly httpRequest: BaseHttpRequest;
|
|
623
957
|
constructor(httpRequest: BaseHttpRequest);
|
|
@@ -752,15 +1086,45 @@ declare class TaskResourceService {
|
|
|
752
1086
|
* @throws ApiError
|
|
753
1087
|
*/
|
|
754
1088
|
getExternalStorageLocation1(path: string, operation: string, payloadType: string): CancelablePromise<ExternalStorageLocation>;
|
|
1089
|
+
/**
|
|
1090
|
+
* Update a task By Ref Name synchronously. The output data is merged if data from a previous API call already exists.
|
|
1091
|
+
* @param workflowId
|
|
1092
|
+
* @param taskRefName
|
|
1093
|
+
* @param status
|
|
1094
|
+
* @param output
|
|
1095
|
+
* @param workerId - Optional
|
|
1096
|
+
* @returns Workflow
|
|
1097
|
+
* @throws ApiError
|
|
1098
|
+
*/
|
|
1099
|
+
updateTaskSync(workflowId: string, taskRefName: string, status: TaskResultStatusEnum, output: Record<string, any>, workerId?: string): CancelablePromise<Workflow>;
|
|
1100
|
+
/**
|
|
1101
|
+
* Signals a task in a workflow synchronously and returns data based on the specified return strategy
|
|
1102
|
+
* @param workflowId - Workflow ID of the workflow to be signaled
|
|
1103
|
+
* @param status - Signal status to be set for the workflow
|
|
1104
|
+
* @param output - Output for the task
|
|
1105
|
+
* @param returnStrategy - Optional strategy for what data to return (defaults to TARGET_WORKFLOW)
|
|
1106
|
+
* @returns SignalResponse with data based on the return strategy
|
|
1107
|
+
* @throws ApiError
|
|
1108
|
+
*/
|
|
1109
|
+
signal(workflowId: string, status: TaskResultStatusEnum, output: Record<string, any>, returnStrategy?: ReturnStrategy): CancelablePromise<SignalResponse>;
|
|
1110
|
+
/**
|
|
1111
|
+
* Signals a task in a workflow asynchronously (fire-and-forget)
|
|
1112
|
+
* @param workflowId - Workflow ID of the workflow to be signaled
|
|
1113
|
+
* @param status - Signal status to be set for the workflow
|
|
1114
|
+
* @param output - Output for the task
|
|
1115
|
+
* @returns Promise<void>
|
|
1116
|
+
* @throws ApiError
|
|
1117
|
+
*/
|
|
1118
|
+
signalAsync(workflowId: string, status: TaskResultStatusEnum, output: Record<string, any>): CancelablePromise<void>;
|
|
755
1119
|
}
|
|
756
1120
|
|
|
757
|
-
|
|
1121
|
+
type GenerateTokenRequest = {
|
|
758
1122
|
keyId: string;
|
|
759
1123
|
keySecret: string;
|
|
760
1124
|
refreshTokenInterval?: number;
|
|
761
1125
|
};
|
|
762
1126
|
|
|
763
|
-
|
|
1127
|
+
type Response$1 = {};
|
|
764
1128
|
|
|
765
1129
|
declare class TokenResourceService {
|
|
766
1130
|
readonly httpRequest: BaseHttpRequest;
|
|
@@ -780,7 +1144,7 @@ declare class TokenResourceService {
|
|
|
780
1144
|
getUserInfo(): CancelablePromise<any>;
|
|
781
1145
|
}
|
|
782
1146
|
|
|
783
|
-
|
|
1147
|
+
type BulkResponse = {
|
|
784
1148
|
bulkErrorResults?: Record<string, string>;
|
|
785
1149
|
bulkSuccessfulResults?: Array<string>;
|
|
786
1150
|
};
|
|
@@ -827,7 +1191,7 @@ declare class WorkflowBulkResourceService {
|
|
|
827
1191
|
pauseWorkflow1(requestBody: Array<string>): CancelablePromise<BulkResponse>;
|
|
828
1192
|
}
|
|
829
1193
|
|
|
830
|
-
|
|
1194
|
+
type RerunWorkflowRequest = {
|
|
831
1195
|
reRunFromWorkflowId?: string;
|
|
832
1196
|
workflowInput?: Record<string, any>;
|
|
833
1197
|
reRunFromTaskId?: string;
|
|
@@ -835,7 +1199,7 @@ declare type RerunWorkflowRequest = {
|
|
|
835
1199
|
correlationId?: string;
|
|
836
1200
|
};
|
|
837
1201
|
|
|
838
|
-
|
|
1202
|
+
type WorkflowSummary = {
|
|
839
1203
|
workflowType?: string;
|
|
840
1204
|
version?: number;
|
|
841
1205
|
workflowId?: string;
|
|
@@ -858,74 +1222,27 @@ declare type WorkflowSummary = {
|
|
|
858
1222
|
inputSize?: number;
|
|
859
1223
|
};
|
|
860
1224
|
|
|
861
|
-
|
|
1225
|
+
type ScrollableSearchResultWorkflowSummary = {
|
|
862
1226
|
results?: Array<WorkflowSummary>;
|
|
863
1227
|
totalHits?: number;
|
|
864
1228
|
};
|
|
865
1229
|
|
|
866
|
-
|
|
867
|
-
ownerApp?: string;
|
|
868
|
-
createTime?: number;
|
|
869
|
-
updateTime?: number;
|
|
870
|
-
createdBy?: string;
|
|
871
|
-
updatedBy?: string;
|
|
872
|
-
status?: 'RUNNING' | 'COMPLETED' | 'FAILED' | 'TIMED_OUT' | 'TERMINATED' | 'PAUSED';
|
|
873
|
-
idempotencyKey?: string;
|
|
874
|
-
endTime?: number;
|
|
875
|
-
workflowId?: string;
|
|
876
|
-
parentWorkflowId?: string;
|
|
877
|
-
parentWorkflowTaskId?: string;
|
|
878
|
-
tasks?: Array<Task>;
|
|
879
|
-
input?: Record<string, any>;
|
|
880
|
-
output?: Record<string, any>;
|
|
881
|
-
correlationId?: string;
|
|
882
|
-
reRunFromWorkflowId?: string;
|
|
883
|
-
reasonForIncompletion?: string;
|
|
884
|
-
event?: string;
|
|
885
|
-
taskToDomain?: Record<string, string>;
|
|
886
|
-
failedReferenceTaskNames?: Array<string>;
|
|
887
|
-
workflowDefinition?: WorkflowDef$1;
|
|
888
|
-
externalInputPayloadStoragePath?: string;
|
|
889
|
-
externalOutputPayloadStoragePath?: string;
|
|
890
|
-
priority?: number;
|
|
891
|
-
variables?: Record<string, any>;
|
|
892
|
-
lastRetriedTime?: number;
|
|
893
|
-
startTime?: number;
|
|
894
|
-
workflowVersion?: number;
|
|
895
|
-
workflowName?: string;
|
|
896
|
-
};
|
|
897
|
-
|
|
898
|
-
declare type SearchResultWorkflow = {
|
|
1230
|
+
type SearchResultWorkflow = {
|
|
899
1231
|
totalHits?: number;
|
|
900
1232
|
results?: Array<Workflow>;
|
|
901
1233
|
};
|
|
902
1234
|
|
|
903
|
-
|
|
1235
|
+
type SearchResultWorkflowSummary = {
|
|
904
1236
|
totalHits?: number;
|
|
905
1237
|
results?: Array<WorkflowSummary>;
|
|
906
1238
|
};
|
|
907
1239
|
|
|
908
|
-
|
|
1240
|
+
type SkipTaskRequest = {
|
|
909
1241
|
taskInput?: Record<string, any>;
|
|
910
1242
|
taskOutput?: Record<string, any>;
|
|
911
1243
|
};
|
|
912
1244
|
|
|
913
|
-
|
|
914
|
-
correlationId?: string;
|
|
915
|
-
createTime?: number;
|
|
916
|
-
createdBy?: string;
|
|
917
|
-
priority?: number;
|
|
918
|
-
requestId?: string;
|
|
919
|
-
status?: string;
|
|
920
|
-
tasks?: Array<Task>;
|
|
921
|
-
updateTime?: number;
|
|
922
|
-
workflowId?: string;
|
|
923
|
-
variables?: Record<string, object>;
|
|
924
|
-
input?: Record<string, object>;
|
|
925
|
-
output?: Record<string, object>;
|
|
926
|
-
};
|
|
927
|
-
|
|
928
|
-
declare type WorkflowStatus = {
|
|
1245
|
+
type WorkflowStatus = {
|
|
929
1246
|
workflowId?: string;
|
|
930
1247
|
correlationId?: string;
|
|
931
1248
|
output?: Record<string, any>;
|
|
@@ -933,14 +1250,14 @@ declare type WorkflowStatus = {
|
|
|
933
1250
|
status?: 'RUNNING' | 'COMPLETED' | 'FAILED' | 'TIMED_OUT' | 'TERMINATED' | 'PAUSED';
|
|
934
1251
|
};
|
|
935
1252
|
|
|
936
|
-
|
|
1253
|
+
type TaskMock = {
|
|
937
1254
|
executionTime?: number;
|
|
938
1255
|
output: Record<string, any>;
|
|
939
1256
|
queueWaitTime?: number;
|
|
940
1257
|
status: "IN_PROGRESS" | "FAILED" | "FAILED_WITH_TERMINAL_ERROR" | "COMPLETED";
|
|
941
1258
|
};
|
|
942
1259
|
|
|
943
|
-
|
|
1260
|
+
type WorkflowTestRequest = {
|
|
944
1261
|
correlationId?: string;
|
|
945
1262
|
createdBy?: string;
|
|
946
1263
|
externalInputPayloadStoragePath?: string;
|
|
@@ -976,11 +1293,13 @@ declare class WorkflowResourceService {
|
|
|
976
1293
|
* @param version
|
|
977
1294
|
* @param requestId
|
|
978
1295
|
* @param waitUntilTaskRef
|
|
979
|
-
* @param
|
|
980
|
-
* @
|
|
1296
|
+
* @param waitForSeconds - Optional, defaults to 10
|
|
1297
|
+
* @param consistency - Optional, defaults to "DURABLE"
|
|
1298
|
+
* @param returnStrategy - Optional, defaults to "TARGET_WORKFLOW"
|
|
1299
|
+
* @returns SignalResponse
|
|
981
1300
|
* @throws ApiError
|
|
982
1301
|
*/
|
|
983
|
-
executeWorkflow(body: StartWorkflowRequest, name: string, version: number, requestId
|
|
1302
|
+
executeWorkflow(body: StartWorkflowRequest, name: string, version: number, requestId?: string, waitUntilTaskRef?: string, waitForSeconds?: number, consistency?: string, returnStrategy?: string): CancelablePromise<SignalResponse>;
|
|
984
1303
|
/**
|
|
985
1304
|
* Start a new workflow with StartWorkflowRequest, which allows task to be executed in a domain
|
|
986
1305
|
* @param requestBody
|
|
@@ -1209,37 +1528,37 @@ declare const request$1: <T>(config: OpenAPIConfig, options: ApiRequestOptions)
|
|
|
1209
1528
|
* @param config @see OpenAPIConfig
|
|
1210
1529
|
* @param options {see ApiRequestOptions}
|
|
1211
1530
|
*/
|
|
1212
|
-
|
|
1213
|
-
|
|
1531
|
+
type RequestType = typeof request$1;
|
|
1532
|
+
type ConductorHttpRequest = <T>(request: RequestType, config: OpenAPIConfig, options: ApiRequestOptions) => CancelablePromise<T>;
|
|
1214
1533
|
|
|
1215
|
-
|
|
1534
|
+
type HumanTaskUser = {
|
|
1216
1535
|
user?: string;
|
|
1217
1536
|
userType?: 'EXTERNAL_USER' | 'EXTERNAL_GROUP' | 'CONDUCTOR_USER' | 'CONDUCTOR_GROUP';
|
|
1218
1537
|
};
|
|
1219
1538
|
|
|
1220
|
-
|
|
1539
|
+
type HumanTaskAssignment = {
|
|
1221
1540
|
assignee?: HumanTaskUser;
|
|
1222
1541
|
slaMinutes?: number;
|
|
1223
1542
|
};
|
|
1224
1543
|
|
|
1225
|
-
|
|
1544
|
+
type HumanTaskTrigger = {
|
|
1226
1545
|
startWorkflowRequest?: StartWorkflowRequest;
|
|
1227
1546
|
triggerType?: 'ASSIGNEE_CHANGED' | 'PENDING' | 'IN_PROGRESS' | 'ASSIGNED' | 'COMPLETED' | 'TIMED_OUT';
|
|
1228
1547
|
};
|
|
1229
1548
|
|
|
1230
|
-
|
|
1549
|
+
type UserFormTemplate = {
|
|
1231
1550
|
name?: string;
|
|
1232
1551
|
version?: number;
|
|
1233
1552
|
};
|
|
1234
1553
|
|
|
1235
|
-
|
|
1554
|
+
type HumanTaskDefinition = {
|
|
1236
1555
|
assignmentCompletionStrategy?: 'LEAVE_OPEN' | 'TERMINATE';
|
|
1237
1556
|
assignments?: Array<HumanTaskAssignment>;
|
|
1238
1557
|
taskTriggers?: Array<HumanTaskTrigger>;
|
|
1239
1558
|
userFormTemplate?: UserFormTemplate;
|
|
1240
1559
|
};
|
|
1241
1560
|
|
|
1242
|
-
|
|
1561
|
+
type HumanTaskEntry = {
|
|
1243
1562
|
assignee?: HumanTaskUser;
|
|
1244
1563
|
claimant?: HumanTaskUser;
|
|
1245
1564
|
createdBy?: string;
|
|
@@ -1258,7 +1577,7 @@ declare type HumanTaskEntry = {
|
|
|
1258
1577
|
workflowName?: string;
|
|
1259
1578
|
};
|
|
1260
1579
|
|
|
1261
|
-
|
|
1580
|
+
type HumanTaskSearch = {
|
|
1262
1581
|
assignees?: Array<HumanTaskUser>;
|
|
1263
1582
|
claimants?: Array<HumanTaskUser>;
|
|
1264
1583
|
definitionNames?: Array<string>;
|
|
@@ -1272,12 +1591,12 @@ declare type HumanTaskSearch = {
|
|
|
1272
1591
|
workflowNames?: Array<string>;
|
|
1273
1592
|
};
|
|
1274
1593
|
|
|
1275
|
-
|
|
1594
|
+
type HumanTaskSearchResult = {
|
|
1276
1595
|
results?: Array<HumanTaskEntry>;
|
|
1277
1596
|
totalHits?: number;
|
|
1278
1597
|
};
|
|
1279
1598
|
|
|
1280
|
-
|
|
1599
|
+
type HumanTaskTemplate = {
|
|
1281
1600
|
createdBy?: string;
|
|
1282
1601
|
createdOn?: number;
|
|
1283
1602
|
jsonSchema: Record<string, any>;
|
|
@@ -1354,94 +1673,265 @@ declare class HumanTaskService {
|
|
|
1354
1673
|
* @returns any OK
|
|
1355
1674
|
* @throws ApiError
|
|
1356
1675
|
*/
|
|
1357
|
-
reassignTask(taskId: string, requestBody: Array<HumanTaskAssignment>): CancelablePromise<any>;
|
|
1676
|
+
reassignTask(taskId: string, requestBody: Array<HumanTaskAssignment>): CancelablePromise<any>;
|
|
1677
|
+
/**
|
|
1678
|
+
* Release a task without completing it
|
|
1679
|
+
* @param taskId
|
|
1680
|
+
* @returns any OK
|
|
1681
|
+
* @throws ApiError
|
|
1682
|
+
*/
|
|
1683
|
+
releaseTask(taskId: string): CancelablePromise<any>;
|
|
1684
|
+
/**
|
|
1685
|
+
* If a task is assigned to a user, this API can be used to skip that assignment and move to the next assignee
|
|
1686
|
+
* @param taskId
|
|
1687
|
+
* @param reason
|
|
1688
|
+
* @returns any OK
|
|
1689
|
+
* @throws ApiError
|
|
1690
|
+
*/
|
|
1691
|
+
skipTask(taskId: string, reason?: string): CancelablePromise<any>;
|
|
1692
|
+
/**
|
|
1693
|
+
* Update task output, optionally complete
|
|
1694
|
+
* @param taskId
|
|
1695
|
+
* @param requestBody
|
|
1696
|
+
* @param complete
|
|
1697
|
+
* @returns any OK
|
|
1698
|
+
* @throws ApiError
|
|
1699
|
+
*/
|
|
1700
|
+
updateTaskOutput(taskId: string, requestBody: Record<string, any>, complete?: boolean): CancelablePromise<any>;
|
|
1701
|
+
/**
|
|
1702
|
+
* List all user form templates or get templates by name, or a template by name and version
|
|
1703
|
+
* @param name
|
|
1704
|
+
* @param version
|
|
1705
|
+
* @returns HumanTaskTemplate OK
|
|
1706
|
+
* @throws ApiError
|
|
1707
|
+
*/
|
|
1708
|
+
getAllTemplates(name?: string, version?: number): CancelablePromise<Array<HumanTaskTemplate>>;
|
|
1709
|
+
/**
|
|
1710
|
+
* Save user form template
|
|
1711
|
+
* @param requestBody
|
|
1712
|
+
* @param newVersion
|
|
1713
|
+
* @returns HumanTaskTemplate OK
|
|
1714
|
+
* @throws ApiError
|
|
1715
|
+
*/
|
|
1716
|
+
saveTemplate(requestBody: HumanTaskTemplate, newVersion?: boolean): CancelablePromise<HumanTaskTemplate>;
|
|
1717
|
+
/**
|
|
1718
|
+
* Save user form template
|
|
1719
|
+
* @param requestBody
|
|
1720
|
+
* @param newVersion
|
|
1721
|
+
* @returns HumanTaskTemplate OK
|
|
1722
|
+
* @throws ApiError
|
|
1723
|
+
*/
|
|
1724
|
+
saveTemplates(requestBody: Array<HumanTaskTemplate>, newVersion?: boolean): CancelablePromise<Array<HumanTaskTemplate>>;
|
|
1725
|
+
/**
|
|
1726
|
+
* Delete all versions of user form template by name
|
|
1727
|
+
* @param name
|
|
1728
|
+
* @returns any OK
|
|
1729
|
+
* @throws ApiError
|
|
1730
|
+
*/
|
|
1731
|
+
deleteTemplateByName(name: string): CancelablePromise<any>;
|
|
1732
|
+
/**
|
|
1733
|
+
* Delete a version of form template by name
|
|
1734
|
+
* @param name
|
|
1735
|
+
* @param version
|
|
1736
|
+
* @returns any OK
|
|
1737
|
+
* @throws ApiError
|
|
1738
|
+
*/
|
|
1739
|
+
deleteTemplatesByNameAndVersion(name: string, version: number): CancelablePromise<any>;
|
|
1740
|
+
/**
|
|
1741
|
+
* Get user form template by name and version
|
|
1742
|
+
* @param name
|
|
1743
|
+
* @param version
|
|
1744
|
+
* @returns HumanTaskTemplate OK
|
|
1745
|
+
* @throws ApiError
|
|
1746
|
+
*/
|
|
1747
|
+
getTemplateByNameAndVersion(name: string, version: number): CancelablePromise<HumanTaskTemplate>;
|
|
1748
|
+
}
|
|
1749
|
+
|
|
1750
|
+
declare class HumanTaskResourceService {
|
|
1751
|
+
readonly httpRequest: BaseHttpRequest;
|
|
1752
|
+
constructor(httpRequest: BaseHttpRequest);
|
|
1753
|
+
/**
|
|
1754
|
+
* Get Conductor task by id (for human tasks only)
|
|
1755
|
+
* @param taskId
|
|
1756
|
+
* @returns Task OK
|
|
1757
|
+
* @throws ApiError
|
|
1758
|
+
*/
|
|
1759
|
+
getConductorTaskById(taskId: string): CancelablePromise<Task>;
|
|
1760
|
+
}
|
|
1761
|
+
|
|
1762
|
+
declare enum ServiceType {
|
|
1763
|
+
HTTP = "HTTP",
|
|
1764
|
+
gRPC = "gRPC"
|
|
1765
|
+
}
|
|
1766
|
+
interface RequestParamSchema {
|
|
1767
|
+
type: string;
|
|
1768
|
+
format?: string;
|
|
1769
|
+
defaultValue?: any;
|
|
1770
|
+
}
|
|
1771
|
+
interface RequestParam {
|
|
1772
|
+
name: string;
|
|
1773
|
+
type: string;
|
|
1774
|
+
required: boolean;
|
|
1775
|
+
schema?: RequestParamSchema;
|
|
1776
|
+
}
|
|
1777
|
+
interface ServiceMethod {
|
|
1778
|
+
id?: number;
|
|
1779
|
+
operationName: string;
|
|
1780
|
+
methodName: string;
|
|
1781
|
+
methodType: string;
|
|
1782
|
+
inputType: string;
|
|
1783
|
+
outputType: string;
|
|
1784
|
+
requestParams?: RequestParam[];
|
|
1785
|
+
exampleInput?: Record<string, any>;
|
|
1786
|
+
}
|
|
1787
|
+
interface OrkesCircuitBreakerConfig {
|
|
1788
|
+
failureRateThreshold?: number;
|
|
1789
|
+
slidingWindowSize?: number;
|
|
1790
|
+
minimumNumberOfCalls?: number;
|
|
1791
|
+
waitDurationInOpenState?: number;
|
|
1792
|
+
permittedNumberOfCallsInHalfOpenState?: number;
|
|
1793
|
+
slowCallRateThreshold?: number;
|
|
1794
|
+
slowCallDurationThreshold?: number;
|
|
1795
|
+
automaticTransitionFromOpenToHalfOpenEnabled?: boolean;
|
|
1796
|
+
maxWaitDurationInHalfOpenState?: number;
|
|
1797
|
+
}
|
|
1798
|
+
interface ServiceRegistryConfig {
|
|
1799
|
+
circuitBreakerConfig?: OrkesCircuitBreakerConfig;
|
|
1800
|
+
}
|
|
1801
|
+
interface ServiceRegistry {
|
|
1802
|
+
name: string;
|
|
1803
|
+
type: ServiceType;
|
|
1804
|
+
serviceURI: string;
|
|
1805
|
+
methods?: ServiceMethod[];
|
|
1806
|
+
requestParams?: RequestParam[];
|
|
1807
|
+
config?: ServiceRegistryConfig;
|
|
1808
|
+
}
|
|
1809
|
+
interface CircuitBreakerTransitionResponse {
|
|
1810
|
+
service: string;
|
|
1811
|
+
previousState: string;
|
|
1812
|
+
currentState: string;
|
|
1813
|
+
transitionTimestamp: number;
|
|
1814
|
+
message: string;
|
|
1815
|
+
}
|
|
1816
|
+
interface ProtoRegistryEntry {
|
|
1817
|
+
filename: string;
|
|
1818
|
+
lastUpdated: number;
|
|
1819
|
+
}
|
|
1820
|
+
|
|
1821
|
+
declare class ServiceRegistryResourceService {
|
|
1822
|
+
readonly httpRequest: BaseHttpRequest;
|
|
1823
|
+
constructor(httpRequest: BaseHttpRequest);
|
|
1824
|
+
/**
|
|
1825
|
+
* Retrieve all registered services
|
|
1826
|
+
* @returns Array<ServiceRegistryModels> List of all registered services
|
|
1827
|
+
* @throws ApiError
|
|
1828
|
+
*/
|
|
1829
|
+
getRegisteredServices(): CancelablePromise<Array<ServiceRegistry>>;
|
|
1830
|
+
/**
|
|
1831
|
+
* Remove a service by name
|
|
1832
|
+
* @param name The name of the service to remove
|
|
1833
|
+
* @returns void
|
|
1834
|
+
* @throws ApiError
|
|
1835
|
+
*/
|
|
1836
|
+
removeService(name: string): CancelablePromise<void>;
|
|
1837
|
+
/**
|
|
1838
|
+
* Get a service by name
|
|
1839
|
+
* @param name The name of the service to retrieve
|
|
1840
|
+
* @returns ServiceRegistryModels The requested service registry
|
|
1841
|
+
* @throws ApiError
|
|
1842
|
+
*/
|
|
1843
|
+
getService(name: string): CancelablePromise<ServiceRegistry>;
|
|
1844
|
+
/**
|
|
1845
|
+
* Open the circuit breaker for a service
|
|
1846
|
+
* @param name The name of the service
|
|
1847
|
+
* @returns CircuitBreakerTransitionResponse Response with circuit breaker status
|
|
1848
|
+
* @throws ApiError
|
|
1849
|
+
*/
|
|
1850
|
+
openCircuitBreaker(name: string): CancelablePromise<CircuitBreakerTransitionResponse>;
|
|
1358
1851
|
/**
|
|
1359
|
-
*
|
|
1360
|
-
* @param
|
|
1361
|
-
* @returns
|
|
1852
|
+
* Close the circuit breaker for a service
|
|
1853
|
+
* @param name The name of the service
|
|
1854
|
+
* @returns CircuitBreakerTransitionResponse Response with circuit breaker status
|
|
1362
1855
|
* @throws ApiError
|
|
1363
1856
|
*/
|
|
1364
|
-
|
|
1857
|
+
closeCircuitBreaker(name: string): CancelablePromise<CircuitBreakerTransitionResponse>;
|
|
1365
1858
|
/**
|
|
1366
|
-
*
|
|
1367
|
-
* @param
|
|
1368
|
-
* @
|
|
1369
|
-
* @returns any OK
|
|
1859
|
+
* Get circuit breaker status for a service
|
|
1860
|
+
* @param name The name of the service
|
|
1861
|
+
* @returns CircuitBreakerTransitionResponse Response with circuit breaker status
|
|
1370
1862
|
* @throws ApiError
|
|
1371
1863
|
*/
|
|
1372
|
-
|
|
1864
|
+
getCircuitBreakerStatus(name: string): CancelablePromise<CircuitBreakerTransitionResponse>;
|
|
1373
1865
|
/**
|
|
1374
|
-
*
|
|
1375
|
-
* @param
|
|
1376
|
-
* @
|
|
1377
|
-
* @param complete
|
|
1378
|
-
* @returns any OK
|
|
1866
|
+
* Add or update a service registry
|
|
1867
|
+
* @param serviceRegistry The service registry to add or update
|
|
1868
|
+
* @returns void
|
|
1379
1869
|
* @throws ApiError
|
|
1380
1870
|
*/
|
|
1381
|
-
|
|
1871
|
+
addOrUpdateService(serviceRegistry: ServiceRegistry): CancelablePromise<void>;
|
|
1382
1872
|
/**
|
|
1383
|
-
*
|
|
1384
|
-
* @param name
|
|
1385
|
-
* @param
|
|
1386
|
-
* @returns
|
|
1873
|
+
* Add or update a service method
|
|
1874
|
+
* @param registryName The name of the registry
|
|
1875
|
+
* @param method The service method to add or update
|
|
1876
|
+
* @returns void
|
|
1387
1877
|
* @throws ApiError
|
|
1388
1878
|
*/
|
|
1389
|
-
|
|
1879
|
+
addOrUpdateServiceMethod(registryName: string, method: ServiceMethod): CancelablePromise<void>;
|
|
1390
1880
|
/**
|
|
1391
|
-
*
|
|
1392
|
-
* @param
|
|
1393
|
-
* @param
|
|
1394
|
-
* @
|
|
1881
|
+
* Remove a service method
|
|
1882
|
+
* @param registryName The name of the registry
|
|
1883
|
+
* @param serviceName The name of the service
|
|
1884
|
+
* @param method The name of the method
|
|
1885
|
+
* @param methodType The type of the method
|
|
1886
|
+
* @returns void
|
|
1395
1887
|
* @throws ApiError
|
|
1396
1888
|
*/
|
|
1397
|
-
|
|
1889
|
+
removeMethod(registryName: string, serviceName: string, method: string, methodType: string): CancelablePromise<void>;
|
|
1398
1890
|
/**
|
|
1399
|
-
*
|
|
1400
|
-
* @param
|
|
1401
|
-
* @param
|
|
1402
|
-
* @returns
|
|
1891
|
+
* Get proto data
|
|
1892
|
+
* @param registryName The name of the registry
|
|
1893
|
+
* @param filename The name of the proto file
|
|
1894
|
+
* @returns binary The proto file data
|
|
1403
1895
|
* @throws ApiError
|
|
1404
1896
|
*/
|
|
1405
|
-
|
|
1897
|
+
getProtoData(registryName: string, filename: string): CancelablePromise<Blob>;
|
|
1406
1898
|
/**
|
|
1407
|
-
*
|
|
1408
|
-
* @param name
|
|
1409
|
-
* @
|
|
1899
|
+
* Set proto data
|
|
1900
|
+
* @param registryName The name of the registry
|
|
1901
|
+
* @param filename The name of the proto file
|
|
1902
|
+
* @param data The proto file data
|
|
1903
|
+
* @returns void
|
|
1410
1904
|
* @throws ApiError
|
|
1411
1905
|
*/
|
|
1412
|
-
|
|
1906
|
+
setProtoData(registryName: string, filename: string, data: Blob): CancelablePromise<void>;
|
|
1413
1907
|
/**
|
|
1414
|
-
* Delete a
|
|
1415
|
-
* @param name
|
|
1416
|
-
* @param
|
|
1417
|
-
* @returns
|
|
1908
|
+
* Delete a proto file
|
|
1909
|
+
* @param registryName The name of the registry
|
|
1910
|
+
* @param filename The name of the proto file
|
|
1911
|
+
* @returns void
|
|
1418
1912
|
* @throws ApiError
|
|
1419
1913
|
*/
|
|
1420
|
-
|
|
1914
|
+
deleteProto(registryName: string, filename: string): CancelablePromise<void>;
|
|
1421
1915
|
/**
|
|
1422
|
-
* Get
|
|
1423
|
-
* @param name
|
|
1424
|
-
* @
|
|
1425
|
-
* @returns HumanTaskTemplate OK
|
|
1916
|
+
* Get all proto files for a registry
|
|
1917
|
+
* @param registryName The name of the registry
|
|
1918
|
+
* @returns Array<ProtoRegistryEntry> List of proto registry entries
|
|
1426
1919
|
* @throws ApiError
|
|
1427
1920
|
*/
|
|
1428
|
-
|
|
1429
|
-
}
|
|
1430
|
-
|
|
1431
|
-
declare class HumanTaskResourceService {
|
|
1432
|
-
readonly httpRequest: BaseHttpRequest;
|
|
1433
|
-
constructor(httpRequest: BaseHttpRequest);
|
|
1921
|
+
getAllProtos(registryName: string): CancelablePromise<Array<ProtoRegistryEntry>>;
|
|
1434
1922
|
/**
|
|
1435
|
-
*
|
|
1436
|
-
* @param
|
|
1437
|
-
* @
|
|
1923
|
+
* Discover service methods
|
|
1924
|
+
* @param name The name of the service
|
|
1925
|
+
* @param create Whether to create the discovered methods (defaults to false)
|
|
1926
|
+
* @returns Array<ServiceMethod> The discovered service methods
|
|
1438
1927
|
* @throws ApiError
|
|
1439
1928
|
*/
|
|
1440
|
-
|
|
1929
|
+
discover(name: string, create?: boolean): CancelablePromise<Array<ServiceMethod>>;
|
|
1441
1930
|
}
|
|
1442
1931
|
|
|
1443
1932
|
interface ConductorClientAPIConfig extends Omit<OpenAPIConfig, "BASE"> {
|
|
1444
1933
|
serverUrl: string;
|
|
1934
|
+
useEnvVars: boolean;
|
|
1445
1935
|
}
|
|
1446
1936
|
declare class ConductorClient {
|
|
1447
1937
|
readonly eventResource: EventResourceService;
|
|
@@ -1452,6 +1942,7 @@ declare class ConductorClient {
|
|
|
1452
1942
|
readonly tokenResource: TokenResourceService;
|
|
1453
1943
|
readonly workflowBulkResource: WorkflowBulkResourceService;
|
|
1454
1944
|
readonly workflowResource: WorkflowResourceService;
|
|
1945
|
+
readonly serviceRegistryResource: ServiceRegistryResourceService;
|
|
1455
1946
|
readonly humanTask: HumanTaskService;
|
|
1456
1947
|
readonly humanTaskResource: HumanTaskResourceService;
|
|
1457
1948
|
readonly request: BaseHttpRequest;
|
|
@@ -1460,7 +1951,7 @@ declare class ConductorClient {
|
|
|
1460
1951
|
stop(): void;
|
|
1461
1952
|
}
|
|
1462
1953
|
|
|
1463
|
-
|
|
1954
|
+
type ApiResult = {
|
|
1464
1955
|
readonly url: string;
|
|
1465
1956
|
readonly ok: boolean;
|
|
1466
1957
|
readonly status: number;
|
|
@@ -1477,16 +1968,31 @@ declare class ApiError extends Error {
|
|
|
1477
1968
|
constructor(request: ApiRequestOptions, response: ApiResult, message: string);
|
|
1478
1969
|
}
|
|
1479
1970
|
|
|
1480
|
-
|
|
1971
|
+
type WorkflowRun = {
|
|
1972
|
+
correlationId?: string;
|
|
1973
|
+
createTime?: number;
|
|
1974
|
+
createdBy?: string;
|
|
1975
|
+
priority?: number;
|
|
1976
|
+
requestId?: string;
|
|
1977
|
+
status?: string;
|
|
1978
|
+
tasks?: Array<Task>;
|
|
1979
|
+
updateTime?: number;
|
|
1980
|
+
workflowId?: string;
|
|
1981
|
+
variables?: Record<string, object>;
|
|
1982
|
+
input?: Record<string, object>;
|
|
1983
|
+
output?: Record<string, object>;
|
|
1984
|
+
};
|
|
1985
|
+
|
|
1986
|
+
type HTScrollableSearchResultHumanTaskEntry = {
|
|
1481
1987
|
queryId?: string;
|
|
1482
1988
|
results?: Array<HumanTaskEntry>;
|
|
1483
1989
|
};
|
|
1484
1990
|
|
|
1485
|
-
|
|
1991
|
+
type TimeoutPolicy = {
|
|
1486
1992
|
type: string;
|
|
1487
1993
|
};
|
|
1488
1994
|
|
|
1489
|
-
|
|
1995
|
+
type Terminate = (TimeoutPolicy & {
|
|
1490
1996
|
timeoutSeconds?: number;
|
|
1491
1997
|
});
|
|
1492
1998
|
|
|
@@ -1510,7 +2016,7 @@ interface ConductorLogger {
|
|
|
1510
2016
|
error(...args: any): void;
|
|
1511
2017
|
debug(...args: any): void;
|
|
1512
2018
|
}
|
|
1513
|
-
|
|
2019
|
+
type ConductorLogLevel = keyof typeof LOG_LEVELS;
|
|
1514
2020
|
interface DefaultLoggerConfig {
|
|
1515
2021
|
level?: ConductorLogLevel;
|
|
1516
2022
|
tags?: Object[];
|
|
@@ -1531,170 +2037,7 @@ declare class DefaultLogger implements ConductorLogger {
|
|
|
1531
2037
|
}
|
|
1532
2038
|
declare const noopLogger: ConductorLogger;
|
|
1533
2039
|
|
|
1534
|
-
|
|
1535
|
-
name: string;
|
|
1536
|
-
taskReferenceName: string;
|
|
1537
|
-
}
|
|
1538
|
-
declare enum TaskType {
|
|
1539
|
-
START = "START",
|
|
1540
|
-
SIMPLE = "SIMPLE",
|
|
1541
|
-
DYNAMIC = "DYNAMIC",
|
|
1542
|
-
FORK_JOIN = "FORK_JOIN",
|
|
1543
|
-
FORK_JOIN_DYNAMIC = "FORK_JOIN_DYNAMIC",
|
|
1544
|
-
DECISION = "DECISION",
|
|
1545
|
-
SWITCH = "SWITCH",
|
|
1546
|
-
JOIN = "JOIN",
|
|
1547
|
-
DO_WHILE = "DO_WHILE",
|
|
1548
|
-
SUB_WORKFLOW = "SUB_WORKFLOW",
|
|
1549
|
-
EVENT = "EVENT",
|
|
1550
|
-
WAIT = "WAIT",
|
|
1551
|
-
USER_DEFINED = "USER_DEFINED",
|
|
1552
|
-
HTTP = "HTTP",
|
|
1553
|
-
LAMBDA = "LAMBDA",
|
|
1554
|
-
INLINE = "INLINE",
|
|
1555
|
-
EXCLUSIVE_JOIN = "EXCLUSIVE_JOIN",
|
|
1556
|
-
TERMINAL = "TERMINAL",
|
|
1557
|
-
TERMINATE = "TERMINATE",
|
|
1558
|
-
KAFKA_PUBLISH = "KAFKA_PUBLISH",
|
|
1559
|
-
JSON_JQ_TRANSFORM = "JSON_JQ_TRANSFORM",
|
|
1560
|
-
SET_VARIABLE = "SET_VARIABLE"
|
|
1561
|
-
}
|
|
1562
|
-
declare type TaskDefTypes = SimpleTaskDef | DoWhileTaskDef | EventTaskDef | ForkJoinTaskDef | ForkJoinDynamicDef | HttpTaskDef | InlineTaskDef | JsonJQTransformTaskDef | KafkaPublishTaskDef | SetVariableTaskDef | SubWorkflowTaskDef | SwitchTaskDef | TerminateTaskDef | JoinTaskDef | WaitTaskDef;
|
|
1563
|
-
interface DoWhileTaskDef extends CommonTaskDef {
|
|
1564
|
-
inputParameters: Record<string, unknown>;
|
|
1565
|
-
type: TaskType.DO_WHILE;
|
|
1566
|
-
startDelay?: number;
|
|
1567
|
-
optional?: boolean;
|
|
1568
|
-
asyncComplete?: boolean;
|
|
1569
|
-
loopCondition: string;
|
|
1570
|
-
loopOver: TaskDefTypes[];
|
|
1571
|
-
}
|
|
1572
|
-
interface EventTaskDef extends CommonTaskDef {
|
|
1573
|
-
type: TaskType.EVENT;
|
|
1574
|
-
sink: string;
|
|
1575
|
-
asyncComplete?: boolean;
|
|
1576
|
-
}
|
|
1577
|
-
interface ForkJoinTaskDef extends CommonTaskDef {
|
|
1578
|
-
type: TaskType.FORK_JOIN;
|
|
1579
|
-
inputParameters?: Record<string, string>;
|
|
1580
|
-
forkTasks: Array<Array<TaskDefTypes>>;
|
|
1581
|
-
}
|
|
1582
|
-
interface JoinTaskDef extends CommonTaskDef {
|
|
1583
|
-
type: TaskType.JOIN;
|
|
1584
|
-
inputParameters?: Record<string, string>;
|
|
1585
|
-
joinOn: string[];
|
|
1586
|
-
optional?: boolean;
|
|
1587
|
-
asyncComplete?: boolean;
|
|
1588
|
-
}
|
|
1589
|
-
interface ForkJoinDynamicDef extends CommonTaskDef {
|
|
1590
|
-
inputParameters: {
|
|
1591
|
-
dynamicTasks: any;
|
|
1592
|
-
dynamicTasksInput: any;
|
|
1593
|
-
};
|
|
1594
|
-
type: TaskType.FORK_JOIN_DYNAMIC;
|
|
1595
|
-
dynamicForkTasksParam: string;
|
|
1596
|
-
dynamicForkTasksInputParamName: string;
|
|
1597
|
-
startDelay?: number;
|
|
1598
|
-
optional?: boolean;
|
|
1599
|
-
asyncComplete?: boolean;
|
|
1600
|
-
}
|
|
1601
|
-
interface HttpInputParameters {
|
|
1602
|
-
uri: string;
|
|
1603
|
-
method: "GET" | "PUT" | "POST" | "DELETE" | "OPTIONS" | "HEAD";
|
|
1604
|
-
accept?: string;
|
|
1605
|
-
contentType?: string;
|
|
1606
|
-
headers?: Record<string, string>;
|
|
1607
|
-
body?: unknown;
|
|
1608
|
-
connectionTimeOut?: number;
|
|
1609
|
-
readTimeOut?: string;
|
|
1610
|
-
}
|
|
1611
|
-
interface HttpTaskDef extends CommonTaskDef {
|
|
1612
|
-
inputParameters: {
|
|
1613
|
-
[x: string]: unknown;
|
|
1614
|
-
http_request: HttpInputParameters;
|
|
1615
|
-
};
|
|
1616
|
-
type: TaskType.HTTP;
|
|
1617
|
-
}
|
|
1618
|
-
interface InlineTaskInputParameters {
|
|
1619
|
-
evaluatorType: "javascript" | "graaljs";
|
|
1620
|
-
expression: string;
|
|
1621
|
-
[x: string]: unknown;
|
|
1622
|
-
}
|
|
1623
|
-
interface InlineTaskDef extends CommonTaskDef {
|
|
1624
|
-
type: TaskType.INLINE;
|
|
1625
|
-
inputParameters: InlineTaskInputParameters;
|
|
1626
|
-
}
|
|
1627
|
-
interface ContainingQueryExpression {
|
|
1628
|
-
queryExpression: string;
|
|
1629
|
-
[x: string | number | symbol]: unknown;
|
|
1630
|
-
}
|
|
1631
|
-
interface JsonJQTransformTaskDef extends CommonTaskDef {
|
|
1632
|
-
type: TaskType.JSON_JQ_TRANSFORM;
|
|
1633
|
-
inputParameters: ContainingQueryExpression;
|
|
1634
|
-
}
|
|
1635
|
-
interface KafkaPublishInputParameters {
|
|
1636
|
-
topic: string;
|
|
1637
|
-
value: string;
|
|
1638
|
-
bootStrapServers: string;
|
|
1639
|
-
headers: Record<string, string>;
|
|
1640
|
-
key: string;
|
|
1641
|
-
keySerializer: string;
|
|
1642
|
-
}
|
|
1643
|
-
interface KafkaPublishTaskDef extends CommonTaskDef {
|
|
1644
|
-
inputParameters: {
|
|
1645
|
-
kafka_request: KafkaPublishInputParameters;
|
|
1646
|
-
};
|
|
1647
|
-
type: TaskType.KAFKA_PUBLISH;
|
|
1648
|
-
}
|
|
1649
|
-
interface SetVariableTaskDef extends CommonTaskDef {
|
|
1650
|
-
type: TaskType.SET_VARIABLE;
|
|
1651
|
-
inputParameters: Record<string, unknown>;
|
|
1652
|
-
}
|
|
1653
|
-
interface SimpleTaskDef extends CommonTaskDef {
|
|
1654
|
-
type: TaskType.SIMPLE;
|
|
1655
|
-
inputParameters?: Record<string, unknown>;
|
|
1656
|
-
}
|
|
1657
|
-
interface SubWorkflowTaskDef extends CommonTaskDef {
|
|
1658
|
-
type: TaskType.SUB_WORKFLOW;
|
|
1659
|
-
inputParameters?: Record<string, unknown>;
|
|
1660
|
-
subWorkflowParam: {
|
|
1661
|
-
name: string;
|
|
1662
|
-
version?: number;
|
|
1663
|
-
taskToDomain?: Record<string, string>;
|
|
1664
|
-
};
|
|
1665
|
-
}
|
|
1666
|
-
interface SwitchTaskDef extends CommonTaskDef {
|
|
1667
|
-
inputParameters: Record<string, unknown>;
|
|
1668
|
-
type: TaskType.SWITCH;
|
|
1669
|
-
decisionCases: Record<string, TaskDefTypes[]>;
|
|
1670
|
-
defaultCase: TaskDefTypes[];
|
|
1671
|
-
evaluatorType: "value-param" | "javascript";
|
|
1672
|
-
expression: string;
|
|
1673
|
-
}
|
|
1674
|
-
interface TerminateTaskDef extends CommonTaskDef {
|
|
1675
|
-
inputParameters: {
|
|
1676
|
-
terminationStatus: "COMPLETED" | "FAILED";
|
|
1677
|
-
workflowOutput?: Record<string, string>;
|
|
1678
|
-
terminationReason?: string;
|
|
1679
|
-
};
|
|
1680
|
-
type: TaskType.TERMINATE;
|
|
1681
|
-
startDelay?: number;
|
|
1682
|
-
optional?: boolean;
|
|
1683
|
-
}
|
|
1684
|
-
interface WaitTaskDef extends CommonTaskDef {
|
|
1685
|
-
type: TaskType.WAIT;
|
|
1686
|
-
inputParameters: {
|
|
1687
|
-
duration?: string;
|
|
1688
|
-
until?: string;
|
|
1689
|
-
};
|
|
1690
|
-
}
|
|
1691
|
-
interface WorkflowDef extends Omit<WorkflowDef$1, "tasks" | "version" | "inputParameters"> {
|
|
1692
|
-
inputParameters: string[];
|
|
1693
|
-
version: number;
|
|
1694
|
-
tasks: TaskDefTypes[];
|
|
1695
|
-
}
|
|
1696
|
-
|
|
1697
|
-
declare type TaskErrorHandler = (error: Error, task?: Task) => void;
|
|
2040
|
+
type TaskErrorHandler = (error: Error, task?: Task) => void;
|
|
1698
2041
|
interface TaskRunnerOptions {
|
|
1699
2042
|
workerID: string;
|
|
1700
2043
|
domain: string | undefined;
|
|
@@ -1749,7 +2092,7 @@ declare class TaskRunner {
|
|
|
1749
2092
|
handleUnknownError: (unknownError: unknown) => void;
|
|
1750
2093
|
}
|
|
1751
2094
|
|
|
1752
|
-
|
|
2095
|
+
type TaskManagerOptions = TaskRunnerOptions;
|
|
1753
2096
|
interface TaskManagerConfig {
|
|
1754
2097
|
logger?: ConductorLogger;
|
|
1755
2098
|
options?: Partial<TaskManagerOptions>;
|
|
@@ -1793,9 +2136,9 @@ declare class ConductorError extends Error {
|
|
|
1793
2136
|
private __proto__;
|
|
1794
2137
|
constructor(message?: string, innerError?: Error);
|
|
1795
2138
|
}
|
|
1796
|
-
|
|
2139
|
+
type TaskResultStatus = NonNullable<TaskResult['status']>;
|
|
1797
2140
|
|
|
1798
|
-
|
|
2141
|
+
type TaskFinderPredicate = (task: Task) => boolean;
|
|
1799
2142
|
declare const completedTaskMatchingType: (taskType: string) => TaskFinderPredicate;
|
|
1800
2143
|
declare class WorkflowExecutor {
|
|
1801
2144
|
readonly _client: ConductorClient;
|
|
@@ -1814,11 +2157,13 @@ declare class WorkflowExecutor {
|
|
|
1814
2157
|
*/
|
|
1815
2158
|
startWorkflow(workflowRequest: StartWorkflowRequest): Promise<string>;
|
|
1816
2159
|
/**
|
|
1817
|
-
* Execute a workflow synchronously
|
|
1818
|
-
* @param workflowRequest
|
|
1819
|
-
* @returns
|
|
2160
|
+
* Execute a workflow synchronously (original method - backward compatible)
|
|
1820
2161
|
*/
|
|
1821
2162
|
executeWorkflow(workflowRequest: StartWorkflowRequest, name: string, version: number, requestId: string, waitUntilTaskRef?: string): Promise<WorkflowRun>;
|
|
2163
|
+
/**
|
|
2164
|
+
* Execute a workflow with return strategy support (new method)
|
|
2165
|
+
*/
|
|
2166
|
+
executeWorkflow(workflowRequest: StartWorkflowRequest, name: string, version: number, requestId: string, waitUntilTaskRef: string, waitForSeconds: number, consistency: Consistency, returnStrategy: ReturnStrategy): Promise<SignalResponse>;
|
|
1822
2167
|
startWorkflows(workflowsRequest: StartWorkflowRequest[]): Promise<string>[];
|
|
1823
2168
|
goBackToTask(workflowInstanceId: string, taskFinderPredicate: TaskFinderPredicate, rerunWorkflowRequestOverrides?: Partial<RerunWorkflowRequest>): Promise<void>;
|
|
1824
2169
|
goBackToFirstTaskMatchingType(workflowInstanceId: string, taskType: string): Promise<void>;
|
|
@@ -1940,9 +2285,36 @@ declare class WorkflowExecutor {
|
|
|
1940
2285
|
* @returns
|
|
1941
2286
|
*/
|
|
1942
2287
|
getTask(taskId: string): Promise<Task>;
|
|
2288
|
+
/**
|
|
2289
|
+
* Updates a task by reference name synchronously and returns the complete workflow
|
|
2290
|
+
* @param taskReferenceName
|
|
2291
|
+
* @param workflowInstanceId
|
|
2292
|
+
* @param status
|
|
2293
|
+
* @param taskOutput
|
|
2294
|
+
* @param workerId - Optional
|
|
2295
|
+
* @returns Promise<Workflow>
|
|
2296
|
+
*/
|
|
2297
|
+
updateTaskSync(taskReferenceName: string, workflowInstanceId: string, status: TaskResultStatusEnum, taskOutput: Record<string, any>, workerId?: string): Promise<Workflow>;
|
|
2298
|
+
/**
|
|
2299
|
+
* Signals a workflow task and returns data based on the specified return strategy
|
|
2300
|
+
* @param workflowInstanceId - Workflow instance ID to signal
|
|
2301
|
+
* @param status - Task status to set
|
|
2302
|
+
* @param taskOutput - Output data for the task
|
|
2303
|
+
* @param returnStrategy - Optional strategy for what data to return (defaults to TARGET_WORKFLOW)
|
|
2304
|
+
* @returns Promise<SignalResponse> with data based on the return strategy
|
|
2305
|
+
*/
|
|
2306
|
+
signal(workflowInstanceId: string, status: TaskResultStatusEnum, taskOutput: Record<string, any>, returnStrategy?: ReturnStrategy): Promise<SignalResponse>;
|
|
2307
|
+
/**
|
|
2308
|
+
* Signals a workflow task asynchronously (fire-and-forget)
|
|
2309
|
+
* @param workflowInstanceId - Workflow instance ID to signal
|
|
2310
|
+
* @param status - Task status to set
|
|
2311
|
+
* @param taskOutput - Output data for the task
|
|
2312
|
+
* @returns Promise<void>
|
|
2313
|
+
*/
|
|
2314
|
+
signalAsync(workflowInstanceId: string, status: TaskResultStatusEnum, taskOutput: Record<string, any>): Promise<void>;
|
|
1943
2315
|
}
|
|
1944
2316
|
|
|
1945
|
-
|
|
2317
|
+
type PollIntervalOptions = {
|
|
1946
2318
|
pollInterval: number;
|
|
1947
2319
|
maxPollTimes: number;
|
|
1948
2320
|
};
|
|
@@ -2051,7 +2423,7 @@ declare const conductorEventTask: (taskReferenceName: string, eventName: string)
|
|
|
2051
2423
|
declare const forkTask: (taskReferenceName: string, forkTasks: TaskDefTypes[]) => ForkJoinTaskDef;
|
|
2052
2424
|
declare const forkTaskJoin: (taskReferenceName: string, forkTasks: TaskDefTypes[]) => [ForkJoinTaskDef, JoinTaskDef];
|
|
2053
2425
|
|
|
2054
|
-
declare const httpTask: (taskReferenceName: string, inputParameters: HttpInputParameters) => HttpTaskDef;
|
|
2426
|
+
declare const httpTask: (taskReferenceName: string, inputParameters: HttpInputParameters, asyncComplete?: boolean) => HttpTaskDef;
|
|
2055
2427
|
|
|
2056
2428
|
declare const inlineTask: (taskReferenceName: string, script: string, evaluatorType?: "javascript" | "graaljs") => InlineTaskDef;
|
|
2057
2429
|
|
|
@@ -2065,13 +2437,13 @@ declare const setVariableTask: (taskReferenceName: string, inputParameters: Reco
|
|
|
2065
2437
|
|
|
2066
2438
|
declare const simpleTask: (taskReferenceName: string, name: string, inputParameters: Record<string, unknown>) => SimpleTaskDef;
|
|
2067
2439
|
|
|
2068
|
-
declare const subWorkflowTask: (taskReferenceName: string, workflowName: string, version?: number
|
|
2440
|
+
declare const subWorkflowTask: (taskReferenceName: string, workflowName: string, version?: number) => SubWorkflowTaskDef;
|
|
2069
2441
|
|
|
2070
2442
|
declare const switchTask: (taskReferenceName: string, expression: string, decisionCases?: Record<string, TaskDefTypes[]>, defaultCase?: TaskDefTypes[]) => SwitchTaskDef;
|
|
2071
2443
|
|
|
2072
2444
|
declare const taskDefinition: ({ name, ownerApp, description, retryCount, timeoutSeconds, inputKeys, outputKeys, timeoutPolicy, retryLogic, retryDelaySeconds, responseTimeoutSeconds, concurrentExecLimit, inputTemplate, rateLimitPerFrequency, rateLimitFrequencyInSeconds, ownerEmail, pollTimeoutSeconds, backoffScaleFactor, }: TaskDef) => TaskDef;
|
|
2073
2445
|
|
|
2074
|
-
declare const terminateTask: (taskReferenceName: string, status: "COMPLETED" | "FAILED", terminationReason?: string
|
|
2446
|
+
declare const terminateTask: (taskReferenceName: string, status: "COMPLETED" | "FAILED", terminationReason?: string) => TerminateTaskDef;
|
|
2075
2447
|
|
|
2076
2448
|
declare const waitTaskDuration: (taskReferenceName: string, duration: string) => WaitTaskDef;
|
|
2077
2449
|
declare const waitTaskUntil: (taskReferenceName: string, until: string) => WaitTaskDef;
|
|
@@ -2096,18 +2468,18 @@ declare const generateSimpleTask: (overrides?: Partial<SimpleTaskDef>) => Simple
|
|
|
2096
2468
|
*/
|
|
2097
2469
|
declare const generateEventTask: (overrides?: Partial<EventTaskDef>) => EventTaskDef;
|
|
2098
2470
|
|
|
2099
|
-
|
|
2471
|
+
type TaskDefTypesGen = SimpleTaskDef | DoWhileTaskDefGen | EventTaskDef | ForkJoinTaskDefGen | ForkJoinDynamicDef | HttpTaskDef | InlineTaskDefGen | JsonJQTransformTaskDef | KafkaPublishTaskDef | SetVariableTaskDef | SubWorkflowTaskDef | SwitchTaskDefGen | TerminateTaskDef | JoinTaskDef | WaitTaskDef;
|
|
2100
2472
|
interface WorkflowDefGen extends Omit<WorkflowDef, "tasks"> {
|
|
2101
2473
|
tasks: Partial<TaskDefTypesGen>[];
|
|
2102
2474
|
}
|
|
2103
|
-
|
|
2475
|
+
type ForkJoinTaskDefGen = Omit<ForkJoinTaskDef, "forkTasks"> & {
|
|
2104
2476
|
forkTasks: Array<Array<Partial<TaskDefTypesGen>>>;
|
|
2105
2477
|
};
|
|
2106
|
-
|
|
2478
|
+
type SwitchTaskDefGen = Omit<SwitchTaskDef, "decisionCases" | "defaultCase"> & {
|
|
2107
2479
|
decisionCases: Record<string, Partial<TaskDefTypesGen>[]>;
|
|
2108
2480
|
defaultCase: Partial<TaskDefTypesGen>[];
|
|
2109
2481
|
};
|
|
2110
|
-
|
|
2482
|
+
type DoWhileTaskDefGen = Omit<DoWhileTaskDef, "loopOver"> & {
|
|
2111
2483
|
loopOver: Partial<TaskDefTypesGen>[];
|
|
2112
2484
|
};
|
|
2113
2485
|
interface InlineTaskInputParametersGen extends Omit<InlineTaskInputParameters, "expression"> {
|
|
@@ -2116,7 +2488,7 @@ interface InlineTaskInputParametersGen extends Omit<InlineTaskInputParameters, "
|
|
|
2116
2488
|
interface InlineTaskDefGen extends Omit<InlineTaskDef, "inputParameters"> {
|
|
2117
2489
|
inputParameters: InlineTaskInputParametersGen;
|
|
2118
2490
|
}
|
|
2119
|
-
|
|
2491
|
+
type NestedTaskMapper = {
|
|
2120
2492
|
(tasks: Partial<TaskDefTypesGen>[]): TaskDefTypes[];
|
|
2121
2493
|
};
|
|
2122
2494
|
|
|
@@ -2394,12 +2766,20 @@ declare class MetadataClient {
|
|
|
2394
2766
|
* @returns
|
|
2395
2767
|
*/
|
|
2396
2768
|
registerWorkflowDef(workflowDef: WorkflowDef$1, overwrite?: boolean): any;
|
|
2769
|
+
/**
|
|
2770
|
+
* Unregister (overwrite: true) a workflow definition
|
|
2771
|
+
*
|
|
2772
|
+
* @param workflowDef
|
|
2773
|
+
* @param overwrite
|
|
2774
|
+
* @returns
|
|
2775
|
+
*/
|
|
2776
|
+
unregisterWorkflow(workflowName: string, version?: number): any;
|
|
2397
2777
|
}
|
|
2398
2778
|
|
|
2399
|
-
|
|
2779
|
+
type FetchFn<T = RequestInit, R extends {
|
|
2400
2780
|
json: () => Promise<any>;
|
|
2401
2781
|
} = Response> = (input: RequestInfo, init?: T) => Promise<R>;
|
|
2402
|
-
|
|
2782
|
+
type OrkesApiConfig = ConductorClientAPIConfig & GenerateTokenRequest;
|
|
2403
2783
|
|
|
2404
2784
|
/**
|
|
2405
2785
|
* Takes a config with keyId and keySecret returns a promise with an instance of ConductorClient
|
|
@@ -2408,7 +2788,7 @@ declare type OrkesApiConfig = ConductorClientAPIConfig & GenerateTokenRequest;
|
|
|
2408
2788
|
* @param requestHandler (optional) ConductorHttpRequest handler
|
|
2409
2789
|
* @returns
|
|
2410
2790
|
*/
|
|
2411
|
-
declare const orkesConductorClient: (config?: Partial<OrkesApiConfig
|
|
2791
|
+
declare const orkesConductorClient: (config?: Partial<OrkesApiConfig>, requestHandler?: ConductorHttpRequest) => Promise<ConductorClient>;
|
|
2412
2792
|
|
|
2413
2793
|
declare class AuthConductorClient extends ConductorClient {
|
|
2414
2794
|
intervalId?: NodeJS.Timeout;
|
|
@@ -2420,7 +2800,7 @@ declare class AuthConductorClient extends ConductorClient {
|
|
|
2420
2800
|
}
|
|
2421
2801
|
declare const baseOrkesConductorClient: <T = RequestInit, R extends {
|
|
2422
2802
|
json: () => Promise<any>;
|
|
2423
|
-
} = Response>(fetchFn: FetchFn<T, R>, baseRequestHandler?: ConductorHttpRequest) => (config?: Partial<OrkesApiConfig
|
|
2803
|
+
} = Response>(fetchFn: FetchFn<T, R>, baseRequestHandler?: ConductorHttpRequest) => (config?: Partial<OrkesApiConfig>, requestHandler?: ConductorHttpRequest) => Promise<ConductorClient>;
|
|
2424
2804
|
|
|
2425
2805
|
/**
|
|
2426
2806
|
* Request method
|
|
@@ -2431,4 +2811,4 @@ declare const baseOrkesConductorClient: <T = RequestInit, R extends {
|
|
|
2431
2811
|
*/
|
|
2432
2812
|
declare const request: <T>(config: OpenAPIConfig, options: ApiRequestOptions, fetchFn?: FetchFn) => CancelablePromise<T>;
|
|
2433
2813
|
|
|
2434
|
-
export { Action, ApiError, ApiRequestOptions, ApiResult, AuthConductorClient, BaseHttpRequest, CancelError, CancelablePromise, CommonTaskDef, ConductorClient, ConductorClientAPIConfig, ConductorError, ConductorHttpRequest, ConductorLogLevel, ConductorLogger, ConductorWorker, DefaultLogger, DefaultLoggerConfig, 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, MAX_RETRIES, MetadataClient, MetadataResourceService, OnCancel, OpenAPIConfig, OrkesApiConfig, PollData, RequestType, RerunWorkflowRequest, Response$1 as Response, RunnerArgs, SaveScheduleRequest, SchedulerClient, SchedulerResourceService, ScrollableSearchResultWorkflowSummary, SearchResultTask, SearchResultTaskSummary, SearchResultWorkflow, SearchResultWorkflowScheduleExecutionModel, SearchResultWorkflowSummary, SetVariableTaskDef, SimpleTaskDef, SkipTaskRequest, StartWorkflow, StartWorkflowRequest, SubWorkflowParams, SubWorkflowTaskDef, SwitchTaskDef, Task, TaskClient, TaskDef, TaskDefTypes, TaskDetails, TaskErrorHandler, TaskExecLog, TaskFinderPredicate, TaskManager, TaskManagerConfig, TaskManagerOptions, TaskResourceService, TaskResult, TaskResultStatus, TaskRunner, TaskRunnerOptions, TaskSummary, TaskType, TemplateClient, Terminate, TerminateTaskDef, TimeoutPolicy, TokenResourceService, UserFormTemplate, WaitTaskDef, Workflow, WorkflowBulkResourceService, WorkflowDef, WorkflowExecutor, WorkflowResourceService, WorkflowSchedule, WorkflowScheduleExecutionModel, WorkflowStatus, WorkflowSummary, WorkflowTask, baseOrkesConductorClient, completedTaskMatchingType, conductorEventTask, doWhileTask, dynamicForkTask, eventTask, forkTask, forkTaskJoin, generate, generateDoWhileTask, generateEventTask, generateForkJoinTask, generateHTTPTask, generateInlineTask, generateJQTransformTask, generateJoinTask, generateKafkaPublishTask, generateSetVariableTask, generateSimpleTask, generateSubWorkflowTask, generateSwitchTask, generateTerminateTask, generateWaitTask, httpTask, inlineTask, joinTask, jsonJqTask, kafkaPublishTask, newLoopTask, noopErrorHandler, noopLogger, orkesConductorClient, request, setVariableTask, simpleTask, sqsEventTask, subWorkflowTask, switchTask, taskDefinition, taskGenMapper, terminateTask, waitTaskDuration, waitTaskUntil, workflow };
|
|
2814
|
+
export { type Action, ApiError, type ApiRequestOptions, type ApiResult, AuthConductorClient, BaseHttpRequest, CancelError, CancelablePromise, type CommonTaskDef, ConductorClient, type ConductorClientAPIConfig, ConductorError, type ConductorHttpRequest, type ConductorLogLevel, type ConductorLogger, type ConductorWorker, Consistency, DefaultLogger, type DefaultLoggerConfig, type DoWhileTaskDef, type EventHandler, EventResourceService, type EventTaskDef, type ExternalStorageLocation, type FetchFn, type ForkJoinDynamicDef, type ForkJoinTaskDef, type GenerateTokenRequest, type HTScrollableSearchResultHumanTaskEntry, HealthCheckResourceService, type HttpInputParameters, type HttpTaskDef, HumanExecutor, type HumanTaskAssignment, type HumanTaskDefinition, type HumanTaskEntry, type HumanTaskSearch, type HumanTaskSearchResult, type HumanTaskTemplate, type HumanTaskTrigger, type HumanTaskUser, type InlineTaskDef, type InlineTaskInputParameters, type JoinTaskDef, type JsonJQTransformTaskDef, type KafkaPublishInputParameters, type KafkaPublishTaskDef, MAX_RETRIES, MetadataClient, MetadataResourceService, type OnCancel, type OpenAPIConfig, type OrkesApiConfig, type PollData, type RequestType, type RerunWorkflowRequest, type Response$1 as Response, ReturnStrategy, type RunnerArgs, type SaveScheduleRequest, SchedulerClient, SchedulerResourceService, type ScrollableSearchResultWorkflowSummary, type SearchResultTask, type SearchResultTaskSummary, type SearchResultWorkflow, type SearchResultWorkflowScheduleExecutionModel, type SearchResultWorkflowSummary, type SetVariableTaskDef, type SimpleTaskDef, type SkipTaskRequest, type StartWorkflow, type StartWorkflowRequest, type SubWorkflowParams, type SubWorkflowTaskDef, type SwitchTaskDef, type Task, TaskClient, type TaskDef, type TaskDefTypes, type TaskDetails, type TaskErrorHandler, type TaskExecLog, type TaskFinderPredicate, TaskManager, type TaskManagerConfig, type TaskManagerOptions, TaskResourceService, type TaskResult, type TaskResultStatus, TaskRunner, type TaskRunnerOptions, type TaskSummary, TaskType, TemplateClient, type Terminate, type TerminateTaskDef, type TimeoutPolicy, TokenResourceService, type UserFormTemplate, type WaitTaskDef, type Workflow, WorkflowBulkResourceService, type WorkflowDef, WorkflowExecutor, WorkflowResourceService, type WorkflowSchedule, type WorkflowScheduleExecutionModel, type WorkflowStatus, type WorkflowSummary, type WorkflowTask, baseOrkesConductorClient, completedTaskMatchingType, conductorEventTask, doWhileTask, dynamicForkTask, eventTask, forkTask, forkTaskJoin, generate, generateDoWhileTask, generateEventTask, generateForkJoinTask, generateHTTPTask, generateInlineTask, generateJQTransformTask, generateJoinTask, generateKafkaPublishTask, generateSetVariableTask, generateSimpleTask, generateSubWorkflowTask, generateSwitchTask, generateTerminateTask, generateWaitTask, httpTask, inlineTask, joinTask, jsonJqTask, kafkaPublishTask, newLoopTask, noopErrorHandler, noopLogger, orkesConductorClient, request, setVariableTask, simpleTask, sqsEventTask, subWorkflowTask, switchTask, taskDefinition, taskGenMapper, terminateTask, waitTaskDuration, waitTaskUntil, workflow };
|