@io-orkes/conductor-javascript 1.2.2 → 2.0.0-rc1
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/README.md +0 -1
- package/dist/browser.d.mts +2 -2
- package/dist/browser.d.ts +2 -2
- package/dist/browser.js +268 -134
- package/dist/browser.js.map +1 -1
- package/dist/browser.mjs +267 -134
- package/dist/browser.mjs.map +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +268 -134
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +267 -134
- package/dist/index.mjs.map +1 -1
- package/dist/{types-1e3272c6.d.ts → types-dbfd77fb.d.ts} +536 -521
- package/package.json +1 -1
|
@@ -1,29 +1,3 @@
|
|
|
1
|
-
interface ConductorLogger {
|
|
2
|
-
info(...args: any): void;
|
|
3
|
-
error(...args: any): void;
|
|
4
|
-
debug(...args: any): void;
|
|
5
|
-
}
|
|
6
|
-
declare type ConductorLogLevel = keyof typeof LOG_LEVELS;
|
|
7
|
-
interface DefaultLoggerConfig {
|
|
8
|
-
level?: ConductorLogLevel;
|
|
9
|
-
tags?: Object[];
|
|
10
|
-
}
|
|
11
|
-
declare const LOG_LEVELS: {
|
|
12
|
-
readonly DEBUG: 10;
|
|
13
|
-
readonly INFO: 30;
|
|
14
|
-
readonly ERROR: 60;
|
|
15
|
-
};
|
|
16
|
-
declare class DefaultLogger implements ConductorLogger {
|
|
17
|
-
private readonly tags;
|
|
18
|
-
private readonly level;
|
|
19
|
-
constructor(config?: DefaultLoggerConfig);
|
|
20
|
-
private log;
|
|
21
|
-
info: (...args: any) => void;
|
|
22
|
-
debug: (...args: any) => void;
|
|
23
|
-
error: (...args: any) => void;
|
|
24
|
-
}
|
|
25
|
-
declare const noopLogger: ConductorLogger;
|
|
26
|
-
|
|
27
1
|
declare type ApiRequestOptions = {
|
|
28
2
|
readonly method: 'GET' | 'PUT' | 'POST' | 'DELETE' | 'OPTIONS' | 'HEAD' | 'PATCH';
|
|
29
3
|
readonly url: string;
|
|
@@ -45,333 +19,40 @@ declare class CancelError extends Error {
|
|
|
45
19
|
interface OnCancel {
|
|
46
20
|
readonly isResolved: boolean;
|
|
47
21
|
readonly isRejected: boolean;
|
|
48
|
-
readonly isCancelled: boolean;
|
|
49
|
-
(cancelHandler: () => void): void;
|
|
50
|
-
}
|
|
51
|
-
declare class CancelablePromise<T> implements Promise<T> {
|
|
52
|
-
readonly [Symbol.toStringTag]: string;
|
|
53
|
-
private _isResolved;
|
|
54
|
-
private _isRejected;
|
|
55
|
-
private _isCancelled;
|
|
56
|
-
private readonly _cancelHandlers;
|
|
57
|
-
private readonly _promise;
|
|
58
|
-
private _resolve?;
|
|
59
|
-
private _reject?;
|
|
60
|
-
constructor(executor: (resolve: (value: T | PromiseLike<T>) => void, reject: (reason?: any) => void, onCancel: OnCancel) => void);
|
|
61
|
-
then<TResult1 = T, TResult2 = never>(onFulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null, onRejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null): Promise<TResult1 | TResult2>;
|
|
62
|
-
catch<TResult = never>(onRejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null): Promise<T | TResult>;
|
|
63
|
-
finally(onFinally?: (() => void) | null): Promise<T>;
|
|
64
|
-
cancel(): void;
|
|
65
|
-
get isCancelled(): boolean;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
declare type Resolver<T> = (options: ApiRequestOptions) => Promise<T>;
|
|
69
|
-
declare type Headers$1 = Record<string, string>;
|
|
70
|
-
declare type OpenAPIConfig = {
|
|
71
|
-
BASE: string;
|
|
72
|
-
VERSION: string;
|
|
73
|
-
WITH_CREDENTIALS: boolean;
|
|
74
|
-
CREDENTIALS: 'include' | 'omit' | 'same-origin';
|
|
75
|
-
TOKEN?: string | Resolver<string>;
|
|
76
|
-
USERNAME?: string | Resolver<string>;
|
|
77
|
-
PASSWORD?: string | Resolver<string>;
|
|
78
|
-
HEADERS?: Headers$1 | Resolver<Headers$1>;
|
|
79
|
-
ENCODE_PATH?: (path: string) => string;
|
|
80
|
-
};
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* Request method
|
|
84
|
-
* @param config The OpenAPI configuration object
|
|
85
|
-
* @param options The request options from the service
|
|
86
|
-
* @returns CancelablePromise<T>
|
|
87
|
-
* @throws ApiError
|
|
88
|
-
*/
|
|
89
|
-
declare const request: <T>(config: OpenAPIConfig, options: ApiRequestOptions) => CancelablePromise<T>;
|
|
90
|
-
|
|
91
|
-
/**
|
|
92
|
-
* A handler to modify requests made by ConductorClient. Useful for metrics/option transformation/etc.
|
|
93
|
-
*
|
|
94
|
-
* @remarks
|
|
95
|
-
* Example: Customizing the request URL
|
|
96
|
-
* ```
|
|
97
|
-
*
|
|
98
|
-
* const requestCustomizer = (request, config, options) => {
|
|
99
|
-
* const url = options.url.replace(/^\/api/, '')
|
|
100
|
-
* return request(config, {...options, url });
|
|
101
|
-
* }
|
|
102
|
-
* const config = { BASE: "https://my-api.com"}
|
|
103
|
-
* const client = new ConductorClient(config, requestCustomizer)
|
|
104
|
-
* ```
|
|
105
|
-
*
|
|
106
|
-
* @param request the underlying node-fetch powered function
|
|
107
|
-
* @param config @see OpenAPIConfig
|
|
108
|
-
* @param options {see ApiRequestOptions}
|
|
109
|
-
*/
|
|
110
|
-
declare type RequestType = typeof request;
|
|
111
|
-
declare type ConductorHttpRequest = <T>(request: RequestType, config: OpenAPIConfig, options: ApiRequestOptions) => CancelablePromise<T>;
|
|
112
|
-
|
|
113
|
-
declare type SubWorkflowParams = {
|
|
114
|
-
name: string;
|
|
115
|
-
version?: number;
|
|
116
|
-
taskToDomain?: Record<string, string>;
|
|
117
|
-
workflowDefinition?: WorkflowDef$1;
|
|
118
|
-
};
|
|
119
|
-
|
|
120
|
-
declare type TaskDef = {
|
|
121
|
-
ownerApp?: string;
|
|
122
|
-
createTime?: number;
|
|
123
|
-
updateTime?: number;
|
|
124
|
-
createdBy?: string;
|
|
125
|
-
updatedBy?: string;
|
|
126
|
-
name: string;
|
|
127
|
-
description?: string;
|
|
128
|
-
retryCount?: number;
|
|
129
|
-
timeoutSeconds: number;
|
|
130
|
-
inputKeys?: Array<string>;
|
|
131
|
-
outputKeys?: Array<string>;
|
|
132
|
-
timeoutPolicy?: 'RETRY' | 'TIME_OUT_WF' | 'ALERT_ONLY';
|
|
133
|
-
retryLogic?: 'FIXED' | 'EXPONENTIAL_BACKOFF' | 'LINEAR_BACKOFF';
|
|
134
|
-
retryDelaySeconds?: number;
|
|
135
|
-
responseTimeoutSeconds?: number;
|
|
136
|
-
concurrentExecLimit?: number;
|
|
137
|
-
inputTemplate?: Record<string, any>;
|
|
138
|
-
rateLimitPerFrequency?: number;
|
|
139
|
-
rateLimitFrequencyInSeconds?: number;
|
|
140
|
-
isolationGroupId?: string;
|
|
141
|
-
executionNameSpace?: string;
|
|
142
|
-
ownerEmail?: string;
|
|
143
|
-
pollTimeoutSeconds?: number;
|
|
144
|
-
backoffScaleFactor?: number;
|
|
145
|
-
};
|
|
146
|
-
|
|
147
|
-
declare type WorkflowTask = {
|
|
148
|
-
name: string;
|
|
149
|
-
taskReferenceName: string;
|
|
150
|
-
description?: string;
|
|
151
|
-
inputParameters?: Record<string, any>;
|
|
152
|
-
type?: string;
|
|
153
|
-
dynamicTaskNameParam?: string;
|
|
154
|
-
/**
|
|
155
|
-
* @deprecated
|
|
156
|
-
*/
|
|
157
|
-
caseValueParam?: string;
|
|
158
|
-
/**
|
|
159
|
-
* @deprecated
|
|
160
|
-
*/
|
|
161
|
-
caseExpression?: string;
|
|
162
|
-
scriptExpression?: string;
|
|
163
|
-
decisionCases?: Record<string, Array<WorkflowTask>>;
|
|
164
|
-
/**
|
|
165
|
-
* @deprecated
|
|
166
|
-
*/
|
|
167
|
-
dynamicForkJoinTasksParam?: string;
|
|
168
|
-
dynamicForkTasksParam?: string;
|
|
169
|
-
dynamicForkTasksInputParamName?: string;
|
|
170
|
-
defaultCase?: Array<WorkflowTask>;
|
|
171
|
-
forkTasks?: Array<Array<WorkflowTask>>;
|
|
172
|
-
startDelay?: number;
|
|
173
|
-
subWorkflowParam?: SubWorkflowParams;
|
|
174
|
-
joinOn?: Array<string>;
|
|
175
|
-
sink?: string;
|
|
176
|
-
optional?: boolean;
|
|
177
|
-
taskDefinition?: TaskDef;
|
|
178
|
-
rateLimited?: boolean;
|
|
179
|
-
defaultExclusiveJoinTask?: Array<string>;
|
|
180
|
-
asyncComplete?: boolean;
|
|
181
|
-
loopCondition?: string;
|
|
182
|
-
loopOver?: Array<WorkflowTask>;
|
|
183
|
-
retryCount?: number;
|
|
184
|
-
evaluatorType?: string;
|
|
185
|
-
expression?: string;
|
|
186
|
-
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';
|
|
187
|
-
};
|
|
188
|
-
|
|
189
|
-
declare type WorkflowDef$1 = {
|
|
190
|
-
ownerApp?: string;
|
|
191
|
-
createTime?: number;
|
|
192
|
-
updateTime?: number;
|
|
193
|
-
createdBy?: string;
|
|
194
|
-
updatedBy?: string;
|
|
195
|
-
name: string;
|
|
196
|
-
description?: string;
|
|
197
|
-
version?: number;
|
|
198
|
-
tasks: Array<WorkflowTask>;
|
|
199
|
-
inputParameters?: Array<string>;
|
|
200
|
-
outputParameters?: Record<string, any>;
|
|
201
|
-
failureWorkflow?: string;
|
|
202
|
-
schemaVersion?: number;
|
|
203
|
-
restartable?: boolean;
|
|
204
|
-
workflowStatusListenerEnabled?: boolean;
|
|
205
|
-
ownerEmail?: string;
|
|
206
|
-
timeoutPolicy?: 'TIME_OUT_WF' | 'ALERT_ONLY';
|
|
207
|
-
timeoutSeconds: number;
|
|
208
|
-
variables?: Record<string, any>;
|
|
209
|
-
inputTemplate?: Record<string, any>;
|
|
210
|
-
};
|
|
211
|
-
|
|
212
|
-
interface CommonTaskDef {
|
|
213
|
-
name: string;
|
|
214
|
-
taskReferenceName: string;
|
|
215
|
-
}
|
|
216
|
-
declare enum TaskType {
|
|
217
|
-
START = "START",
|
|
218
|
-
SIMPLE = "SIMPLE",
|
|
219
|
-
DYNAMIC = "DYNAMIC",
|
|
220
|
-
FORK_JOIN = "FORK_JOIN",
|
|
221
|
-
FORK_JOIN_DYNAMIC = "FORK_JOIN_DYNAMIC",
|
|
222
|
-
DECISION = "DECISION",
|
|
223
|
-
SWITCH = "SWITCH",
|
|
224
|
-
JOIN = "JOIN",
|
|
225
|
-
DO_WHILE = "DO_WHILE",
|
|
226
|
-
SUB_WORKFLOW = "SUB_WORKFLOW",
|
|
227
|
-
EVENT = "EVENT",
|
|
228
|
-
WAIT = "WAIT",
|
|
229
|
-
USER_DEFINED = "USER_DEFINED",
|
|
230
|
-
HTTP = "HTTP",
|
|
231
|
-
LAMBDA = "LAMBDA",
|
|
232
|
-
INLINE = "INLINE",
|
|
233
|
-
EXCLUSIVE_JOIN = "EXCLUSIVE_JOIN",
|
|
234
|
-
TERMINAL = "TERMINAL",
|
|
235
|
-
TERMINATE = "TERMINATE",
|
|
236
|
-
KAFKA_PUBLISH = "KAFKA_PUBLISH",
|
|
237
|
-
JSON_JQ_TRANSFORM = "JSON_JQ_TRANSFORM",
|
|
238
|
-
SET_VARIABLE = "SET_VARIABLE"
|
|
239
|
-
}
|
|
240
|
-
declare type TaskDefTypes = SimpleTaskDef | DoWhileTaskDef | EventTaskDef | ForkJoinTaskDef | ForkJoinDynamicDef | HttpTaskDef | InlineTaskDef | JsonJQTransformTaskDef | KafkaPublishTaskDef | SetVariableTaskDef | SubWorkflowTaskDef | SwitchTaskDef | TerminateTaskDef | JoinTaskDef | WaitTaskDef;
|
|
241
|
-
interface DoWhileTaskDef extends CommonTaskDef {
|
|
242
|
-
inputParameters: Record<string, unknown>;
|
|
243
|
-
type: TaskType.DO_WHILE;
|
|
244
|
-
startDelay?: number;
|
|
245
|
-
optional?: boolean;
|
|
246
|
-
asyncComplete?: boolean;
|
|
247
|
-
loopCondition: string;
|
|
248
|
-
loopOver: TaskDefTypes[];
|
|
249
|
-
}
|
|
250
|
-
interface EventTaskDef extends CommonTaskDef {
|
|
251
|
-
type: TaskType.EVENT;
|
|
252
|
-
sink: string;
|
|
253
|
-
asyncComplete?: boolean;
|
|
254
|
-
}
|
|
255
|
-
interface ForkJoinTaskDef extends CommonTaskDef {
|
|
256
|
-
type: TaskType.FORK_JOIN;
|
|
257
|
-
inputParameters?: Record<string, string>;
|
|
258
|
-
forkTasks: Array<Array<TaskDefTypes>>;
|
|
259
|
-
}
|
|
260
|
-
interface JoinTaskDef extends CommonTaskDef {
|
|
261
|
-
type: TaskType.JOIN;
|
|
262
|
-
inputParameters?: Record<string, string>;
|
|
263
|
-
joinOn: string[];
|
|
264
|
-
optional?: boolean;
|
|
265
|
-
asyncComplete?: boolean;
|
|
266
|
-
}
|
|
267
|
-
interface ForkJoinDynamicDef extends CommonTaskDef {
|
|
268
|
-
inputParameters: {
|
|
269
|
-
dynamicTasks: any;
|
|
270
|
-
dynamicTasksInput: any;
|
|
271
|
-
};
|
|
272
|
-
type: TaskType.FORK_JOIN_DYNAMIC;
|
|
273
|
-
dynamicForkTasksParam: string;
|
|
274
|
-
dynamicForkTasksInputParamName: string;
|
|
275
|
-
startDelay?: number;
|
|
276
|
-
optional?: boolean;
|
|
277
|
-
asyncComplete?: boolean;
|
|
278
|
-
}
|
|
279
|
-
interface HttpInputParameters {
|
|
280
|
-
uri: string;
|
|
281
|
-
method: "GET" | "PUT" | "POST" | "DELETE" | "OPTIONS" | "HEAD";
|
|
282
|
-
accept?: string;
|
|
283
|
-
contentType?: string;
|
|
284
|
-
headers?: Record<string, string>;
|
|
285
|
-
body?: unknown;
|
|
286
|
-
connectionTimeOut?: number;
|
|
287
|
-
readTimeOut?: string;
|
|
288
|
-
}
|
|
289
|
-
interface HttpTaskDef extends CommonTaskDef {
|
|
290
|
-
inputParameters: {
|
|
291
|
-
[x: string]: unknown;
|
|
292
|
-
http_request: HttpInputParameters;
|
|
293
|
-
};
|
|
294
|
-
type: TaskType.HTTP;
|
|
295
|
-
}
|
|
296
|
-
interface InlineTaskInputParameters {
|
|
297
|
-
evaluatorType: "javascript" | "graaljs";
|
|
298
|
-
expression: string;
|
|
299
|
-
[x: string]: unknown;
|
|
300
|
-
}
|
|
301
|
-
interface InlineTaskDef extends CommonTaskDef {
|
|
302
|
-
type: TaskType.INLINE;
|
|
303
|
-
inputParameters: InlineTaskInputParameters;
|
|
304
|
-
}
|
|
305
|
-
interface ContainingQueryExpression {
|
|
306
|
-
queryExpression: string;
|
|
307
|
-
[x: string | number | symbol]: unknown;
|
|
308
|
-
}
|
|
309
|
-
interface JsonJQTransformTaskDef extends CommonTaskDef {
|
|
310
|
-
type: TaskType.JSON_JQ_TRANSFORM;
|
|
311
|
-
inputParameters: ContainingQueryExpression;
|
|
312
|
-
}
|
|
313
|
-
interface KafkaPublishInputParameters {
|
|
314
|
-
topic: string;
|
|
315
|
-
value: string;
|
|
316
|
-
bootStrapServers: string;
|
|
317
|
-
headers: Record<string, string>;
|
|
318
|
-
key: string;
|
|
319
|
-
keySerializer: string;
|
|
320
|
-
}
|
|
321
|
-
interface KafkaPublishTaskDef extends CommonTaskDef {
|
|
322
|
-
inputParameters: {
|
|
323
|
-
kafka_request: KafkaPublishInputParameters;
|
|
324
|
-
};
|
|
325
|
-
type: TaskType.KAFKA_PUBLISH;
|
|
326
|
-
}
|
|
327
|
-
interface SetVariableTaskDef extends CommonTaskDef {
|
|
328
|
-
type: TaskType.SET_VARIABLE;
|
|
329
|
-
inputParameters: Record<string, unknown>;
|
|
330
|
-
}
|
|
331
|
-
interface SimpleTaskDef extends CommonTaskDef {
|
|
332
|
-
type: TaskType.SIMPLE;
|
|
333
|
-
inputParameters?: Record<string, unknown>;
|
|
334
|
-
}
|
|
335
|
-
interface SubWorkflowTaskDef extends CommonTaskDef {
|
|
336
|
-
type: TaskType.SUB_WORKFLOW;
|
|
337
|
-
inputParameters?: Record<string, unknown>;
|
|
338
|
-
subWorkflowParam: {
|
|
339
|
-
name: string;
|
|
340
|
-
version?: number;
|
|
341
|
-
taskToDomain?: Record<string, string>;
|
|
342
|
-
};
|
|
343
|
-
}
|
|
344
|
-
interface SwitchTaskDef extends CommonTaskDef {
|
|
345
|
-
inputParameters: Record<string, unknown>;
|
|
346
|
-
type: TaskType.SWITCH;
|
|
347
|
-
decisionCases: Record<string, TaskDefTypes[]>;
|
|
348
|
-
defaultCase: TaskDefTypes[];
|
|
349
|
-
evaluatorType: "value-param" | "javascript";
|
|
350
|
-
expression: string;
|
|
351
|
-
}
|
|
352
|
-
interface TerminateTaskDef extends CommonTaskDef {
|
|
353
|
-
inputParameters: {
|
|
354
|
-
terminationStatus: "COMPLETED" | "FAILED";
|
|
355
|
-
workflowOutput?: Record<string, string>;
|
|
356
|
-
terminationReason?: string;
|
|
357
|
-
};
|
|
358
|
-
type: TaskType.TERMINATE;
|
|
359
|
-
startDelay?: number;
|
|
360
|
-
optional?: boolean;
|
|
361
|
-
}
|
|
362
|
-
interface WaitTaskDef extends CommonTaskDef {
|
|
363
|
-
type: TaskType.WAIT;
|
|
364
|
-
inputParameters: {
|
|
365
|
-
duration?: string;
|
|
366
|
-
until?: string;
|
|
367
|
-
};
|
|
22
|
+
readonly isCancelled: boolean;
|
|
23
|
+
(cancelHandler: () => void): void;
|
|
368
24
|
}
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
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;
|
|
373
40
|
}
|
|
374
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
|
+
|
|
375
56
|
declare abstract class BaseHttpRequest {
|
|
376
57
|
readonly config: OpenAPIConfig;
|
|
377
58
|
constructor(config: OpenAPIConfig);
|
|
@@ -491,6 +172,105 @@ declare class HealthCheckResourceService {
|
|
|
491
172
|
doCheck(): CancelablePromise<Record<string, any>>;
|
|
492
173
|
}
|
|
493
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
|
+
|
|
494
274
|
declare class MetadataResourceService {
|
|
495
275
|
readonly httpRequest: BaseHttpRequest;
|
|
496
276
|
constructor(httpRequest: BaseHttpRequest);
|
|
@@ -1366,199 +1146,171 @@ declare class WorkflowResourceService {
|
|
|
1366
1146
|
resetWorkflow(workflowId: string): CancelablePromise<void>;
|
|
1367
1147
|
}
|
|
1368
1148
|
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1149
|
+
/**
|
|
1150
|
+
* Request method
|
|
1151
|
+
* @param config The OpenAPI configuration object
|
|
1152
|
+
* @param options The request options from the service
|
|
1153
|
+
* @returns CancelablePromise<T>
|
|
1154
|
+
* @throws ApiError
|
|
1155
|
+
*/
|
|
1156
|
+
declare const request: <T>(config: OpenAPIConfig, options: ApiRequestOptions) => CancelablePromise<T>;
|
|
1374
1157
|
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1158
|
+
/**
|
|
1159
|
+
* A handler to modify requests made by ConductorClient. Useful for metrics/option transformation/etc.
|
|
1160
|
+
*
|
|
1161
|
+
* @remarks
|
|
1162
|
+
* Example: Customizing the request URL
|
|
1163
|
+
* ```
|
|
1164
|
+
*
|
|
1165
|
+
* const requestCustomizer = (request, config, options) => {
|
|
1166
|
+
* const url = options.url.replace(/^\/api/, '')
|
|
1167
|
+
* return request(config, {...options, url });
|
|
1168
|
+
* }
|
|
1169
|
+
* const config = { BASE: "https://my-api.com"}
|
|
1170
|
+
* const client = new ConductorClient(config, requestCustomizer)
|
|
1171
|
+
* ```
|
|
1172
|
+
*
|
|
1173
|
+
* @param request the underlying node-fetch powered function
|
|
1174
|
+
* @param config @see OpenAPIConfig
|
|
1175
|
+
* @param options {see ApiRequestOptions}
|
|
1176
|
+
*/
|
|
1177
|
+
declare type RequestType = typeof request;
|
|
1178
|
+
declare type ConductorHttpRequest = <T>(request: RequestType, config: OpenAPIConfig, options: ApiRequestOptions) => CancelablePromise<T>;
|
|
1379
1179
|
|
|
1380
|
-
declare type
|
|
1381
|
-
|
|
1180
|
+
declare type HumanTaskUser = {
|
|
1181
|
+
user?: string;
|
|
1182
|
+
userType?: 'EXTERNAL_USER' | 'EXTERNAL_GROUP' | 'CONDUCTOR_USER' | 'CONDUCTOR_GROUP';
|
|
1382
1183
|
};
|
|
1383
1184
|
|
|
1384
|
-
declare type
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
declare type ClearAssigment = (TimeoutPolicy & {
|
|
1389
|
-
timeoutSeconds?: number;
|
|
1390
|
-
});
|
|
1391
|
-
|
|
1392
|
-
declare type Escalate = (TimeoutPolicy & {
|
|
1393
|
-
subjects?: Array<string>;
|
|
1394
|
-
timeoutSeconds?: number;
|
|
1395
|
-
} & {
|
|
1396
|
-
subjects: Array<string>;
|
|
1397
|
-
});
|
|
1185
|
+
declare type HumanTaskAssignment = {
|
|
1186
|
+
assignee?: HumanTaskUser;
|
|
1187
|
+
slaMinutes?: number;
|
|
1188
|
+
};
|
|
1398
1189
|
|
|
1399
|
-
declare type
|
|
1400
|
-
|
|
1401
|
-
|
|
1190
|
+
declare type HumanTaskTrigger = {
|
|
1191
|
+
startWorkflowRequest?: StartWorkflowRequest;
|
|
1192
|
+
triggerType?: 'ASSIGNEE_CHANGED' | 'PENDING' | 'IN_PROGRESS' | 'ASSIGNED' | 'COMPLETED' | 'TIMED_OUT';
|
|
1193
|
+
};
|
|
1402
1194
|
|
|
1403
|
-
declare type
|
|
1195
|
+
declare type UserFormTemplate = {
|
|
1196
|
+
name?: string;
|
|
1197
|
+
version?: number;
|
|
1198
|
+
};
|
|
1404
1199
|
|
|
1405
|
-
declare type
|
|
1406
|
-
|
|
1407
|
-
|
|
1200
|
+
declare type HumanTaskDefinition = {
|
|
1201
|
+
assignmentCompletionStrategy?: 'LEAVE_OPEN' | 'TERMINATE';
|
|
1202
|
+
assignments?: Array<HumanTaskAssignment>;
|
|
1203
|
+
taskTriggers?: Array<HumanTaskTrigger>;
|
|
1204
|
+
userFormTemplate?: UserFormTemplate;
|
|
1205
|
+
};
|
|
1408
1206
|
|
|
1409
1207
|
declare type HumanTaskEntry = {
|
|
1410
|
-
assignee?:
|
|
1411
|
-
|
|
1412
|
-
assignmentPolicy?: (FFAAssignment | Fixed | LeastBusyGroupMemberAssignment);
|
|
1413
|
-
claimedBy?: string;
|
|
1208
|
+
assignee?: HumanTaskUser;
|
|
1209
|
+
claimant?: HumanTaskUser;
|
|
1414
1210
|
createdBy?: string;
|
|
1415
1211
|
createdOn?: number;
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
state?: 'PENDING' | 'ASSIGNED' | 'IN_PROGRESS' | 'COMPLETED' | 'TIMED_OUT';
|
|
1421
|
-
taskId?: string;
|
|
1422
|
-
taskName?: string;
|
|
1423
|
-
taskRefName?: string;
|
|
1424
|
-
templateId?: string;
|
|
1425
|
-
timeoutPolicy?: (BackToAssigment | ClearAssigment | Escalate | Never | Terminate);
|
|
1426
|
-
workflowId?: string;
|
|
1427
|
-
workflowName?: string;
|
|
1428
|
-
};
|
|
1429
|
-
|
|
1430
|
-
declare type HTScrollableSearchResultHumanTaskEntry = {
|
|
1431
|
-
queryId?: string;
|
|
1432
|
-
results?: Array<HumanTaskEntry>;
|
|
1433
|
-
};
|
|
1434
|
-
|
|
1435
|
-
declare type HumanTaskActionLogEntry = {
|
|
1436
|
-
action?: string;
|
|
1437
|
-
actionTime?: number;
|
|
1438
|
-
cause?: string;
|
|
1439
|
-
id?: string;
|
|
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';
|
|
1440
1217
|
taskId?: string;
|
|
1441
1218
|
taskRefName?: string;
|
|
1219
|
+
updatedBy?: string;
|
|
1220
|
+
updatedOn?: number;
|
|
1442
1221
|
workflowId?: string;
|
|
1443
1222
|
workflowName?: string;
|
|
1444
1223
|
};
|
|
1445
1224
|
|
|
1446
|
-
declare type
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
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>;
|
|
1451
1237
|
};
|
|
1452
1238
|
|
|
1453
|
-
declare type
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
claimedBy?: string;
|
|
1457
|
-
id?: string;
|
|
1458
|
-
state?: 'PENDING' | 'ASSIGNED' | 'IN_PROGRESS' | 'COMPLETED' | 'TIMED_OUT';
|
|
1459
|
-
stateEnd?: number;
|
|
1460
|
-
stateStart?: number;
|
|
1461
|
-
taskId?: string;
|
|
1462
|
-
taskRefName?: string;
|
|
1463
|
-
workflowId?: string;
|
|
1464
|
-
workflowName?: string;
|
|
1239
|
+
declare type HumanTaskSearchResult = {
|
|
1240
|
+
results?: Array<HumanTaskEntry>;
|
|
1241
|
+
totalHits?: number;
|
|
1465
1242
|
};
|
|
1466
1243
|
|
|
1467
1244
|
declare type HumanTaskTemplate = {
|
|
1468
|
-
jsonSchema: Record<string, Record<string, any>>;
|
|
1469
|
-
name: string;
|
|
1470
|
-
templateUI: Record<string, Record<string, any>>;
|
|
1471
|
-
version?: number;
|
|
1472
|
-
};
|
|
1473
|
-
|
|
1474
|
-
declare type HumanTaskTemplateEntry = {
|
|
1475
1245
|
createdBy?: string;
|
|
1476
1246
|
createdOn?: number;
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
templateUI?: Record<string, Record<string, any>>;
|
|
1247
|
+
jsonSchema: Record<string, any>;
|
|
1248
|
+
name: string;
|
|
1249
|
+
templateUI: Record<string, any>;
|
|
1481
1250
|
updatedBy?: string;
|
|
1482
1251
|
updatedOn?: number;
|
|
1483
|
-
version
|
|
1484
|
-
};
|
|
1485
|
-
|
|
1486
|
-
declare type SearchResultHumanTaskEntry = {
|
|
1487
|
-
results?: Array<HumanTaskEntry>;
|
|
1488
|
-
totalHits?: number;
|
|
1252
|
+
version: number;
|
|
1489
1253
|
};
|
|
1490
1254
|
|
|
1491
1255
|
declare class HumanTaskService {
|
|
1492
1256
|
readonly httpRequest: BaseHttpRequest;
|
|
1493
1257
|
constructor(httpRequest: BaseHttpRequest);
|
|
1494
1258
|
/**
|
|
1495
|
-
*
|
|
1496
|
-
* @param
|
|
1497
|
-
* @
|
|
1498
|
-
* @param assigneeType
|
|
1499
|
-
* @param claimedBy
|
|
1500
|
-
* @param taskName
|
|
1501
|
-
* @param freeText
|
|
1502
|
-
* @param includeInputOutput
|
|
1503
|
-
* @returns SearchResultHumanTaskEntry OK
|
|
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
|
|
1504
1262
|
* @throws ApiError
|
|
1505
1263
|
*/
|
|
1506
|
-
|
|
1264
|
+
deleteTaskFromHumanTaskRecords(requestBody: Array<string>): CancelablePromise<any>;
|
|
1507
1265
|
/**
|
|
1508
|
-
*
|
|
1509
|
-
* @
|
|
1266
|
+
* If the workflow is disconnected from tasks, this API can be used to clean up
|
|
1267
|
+
* @param taskId
|
|
1268
|
+
* @returns any OK
|
|
1510
1269
|
* @throws ApiError
|
|
1511
1270
|
*/
|
|
1512
|
-
|
|
1271
|
+
deleteTaskFromHumanTaskRecords1(taskId: string): CancelablePromise<any>;
|
|
1513
1272
|
/**
|
|
1514
1273
|
* Search human tasks
|
|
1515
|
-
* @param
|
|
1516
|
-
* @
|
|
1517
|
-
* @param size
|
|
1518
|
-
* @param freeText
|
|
1519
|
-
* @param query
|
|
1520
|
-
* @param jsonQuery
|
|
1521
|
-
* @param includeInputOutput
|
|
1522
|
-
* @returns HTScrollableSearchResultHumanTaskEntry OK
|
|
1274
|
+
* @param requestBody
|
|
1275
|
+
* @returns HumanTaskSearchResult OK
|
|
1523
1276
|
* @throws ApiError
|
|
1524
1277
|
*/
|
|
1525
|
-
|
|
1278
|
+
search(requestBody: HumanTaskSearch): CancelablePromise<HumanTaskSearchResult>;
|
|
1526
1279
|
/**
|
|
1527
|
-
*
|
|
1528
|
-
* @param
|
|
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
|
|
1529
1286
|
* @returns any OK
|
|
1530
1287
|
* @throws ApiError
|
|
1531
1288
|
*/
|
|
1532
|
-
|
|
1533
|
-
/**
|
|
1534
|
-
* Get a task
|
|
1535
|
-
* @param taskId
|
|
1536
|
-
* @returns HumanTaskEntry OK
|
|
1537
|
-
* @throws ApiError
|
|
1538
|
-
*/
|
|
1539
|
-
getTask1(taskId: string): CancelablePromise<HumanTaskEntry>;
|
|
1289
|
+
updateTaskOutputByRef(workflowId: string, taskRefName: string, requestBody: Record<string, any>, complete?: boolean, iteration?: Array<number>): CancelablePromise<any>;
|
|
1540
1290
|
/**
|
|
1541
|
-
* Get
|
|
1291
|
+
* Get a task
|
|
1542
1292
|
* @param taskId
|
|
1543
|
-
* @returns
|
|
1293
|
+
* @returns HumanTaskEntry OK
|
|
1544
1294
|
* @throws ApiError
|
|
1545
1295
|
*/
|
|
1546
|
-
|
|
1296
|
+
getTask1(taskId: string): CancelablePromise<HumanTaskEntry>;
|
|
1547
1297
|
/**
|
|
1548
1298
|
* Claim a task by authenticated Conductor user
|
|
1549
1299
|
* @param taskId
|
|
1300
|
+
* @param overrideAssignment
|
|
1550
1301
|
* @returns any OK
|
|
1551
1302
|
* @throws ApiError
|
|
1552
1303
|
*/
|
|
1553
|
-
claimTask(taskId: string): CancelablePromise<
|
|
1304
|
+
claimTask(taskId: string, overrideAssignment?: boolean): CancelablePromise<HumanTaskEntry>;
|
|
1554
1305
|
/**
|
|
1555
1306
|
* Claim a task to an external user
|
|
1556
1307
|
* @param taskId
|
|
1557
1308
|
* @param userId
|
|
1309
|
+
* @param overrideAssignment
|
|
1558
1310
|
* @returns any OK
|
|
1559
1311
|
* @throws ApiError
|
|
1560
1312
|
*/
|
|
1561
|
-
assignAndClaim(taskId: string, userId: string): CancelablePromise<
|
|
1313
|
+
assignAndClaim(taskId: string, userId: string, overrideAssignment?: boolean): CancelablePromise<HumanTaskEntry>;
|
|
1562
1314
|
/**
|
|
1563
1315
|
* Release a task without completing it
|
|
1564
1316
|
* @param taskId
|
|
@@ -1566,7 +1318,7 @@ declare class HumanTaskService {
|
|
|
1566
1318
|
* @returns any OK
|
|
1567
1319
|
* @throws ApiError
|
|
1568
1320
|
*/
|
|
1569
|
-
reassignTask(taskId: string, requestBody:
|
|
1321
|
+
reassignTask(taskId: string, requestBody: Array<HumanTaskAssignment>): CancelablePromise<any>;
|
|
1570
1322
|
/**
|
|
1571
1323
|
* Release a task without completing it
|
|
1572
1324
|
* @param taskId
|
|
@@ -1575,12 +1327,13 @@ declare class HumanTaskService {
|
|
|
1575
1327
|
*/
|
|
1576
1328
|
releaseTask(taskId: string): CancelablePromise<any>;
|
|
1577
1329
|
/**
|
|
1578
|
-
*
|
|
1330
|
+
* If a task is assigned to a user, this API can be used to skip that assignment and move to the next assignee
|
|
1579
1331
|
* @param taskId
|
|
1580
|
-
* @
|
|
1332
|
+
* @param reason
|
|
1333
|
+
* @returns any OK
|
|
1581
1334
|
* @throws ApiError
|
|
1582
1335
|
*/
|
|
1583
|
-
|
|
1336
|
+
skipTask(taskId: string, reason?: string): CancelablePromise<any>;
|
|
1584
1337
|
/**
|
|
1585
1338
|
* Update task output, optionally complete
|
|
1586
1339
|
* @param taskId
|
|
@@ -1589,44 +1342,54 @@ declare class HumanTaskService {
|
|
|
1589
1342
|
* @returns any OK
|
|
1590
1343
|
* @throws ApiError
|
|
1591
1344
|
*/
|
|
1592
|
-
updateTaskOutput(taskId: string, requestBody: Record<string,
|
|
1345
|
+
updateTaskOutput(taskId: string, requestBody: Record<string, any>, complete?: boolean): CancelablePromise<any>;
|
|
1593
1346
|
/**
|
|
1594
|
-
*
|
|
1347
|
+
* List all user form templates or get templates by name, or a template by name and version
|
|
1595
1348
|
* @param name
|
|
1596
|
-
* @
|
|
1349
|
+
* @param version
|
|
1350
|
+
* @returns HumanTaskTemplate OK
|
|
1597
1351
|
* @throws ApiError
|
|
1598
1352
|
*/
|
|
1599
|
-
|
|
1353
|
+
getAllTemplates(name?: string, version?: number): CancelablePromise<Array<HumanTaskTemplate>>;
|
|
1600
1354
|
/**
|
|
1601
|
-
*
|
|
1602
|
-
* @param
|
|
1603
|
-
* @param
|
|
1604
|
-
* @returns
|
|
1355
|
+
* Save user form template
|
|
1356
|
+
* @param requestBody
|
|
1357
|
+
* @param newVersion
|
|
1358
|
+
* @returns HumanTaskTemplate OK
|
|
1605
1359
|
* @throws ApiError
|
|
1606
1360
|
*/
|
|
1607
|
-
|
|
1361
|
+
saveTemplate(requestBody: HumanTaskTemplate, newVersion?: boolean): CancelablePromise<HumanTaskTemplate>;
|
|
1608
1362
|
/**
|
|
1609
|
-
* Save
|
|
1363
|
+
* Save user form template
|
|
1610
1364
|
* @param requestBody
|
|
1611
1365
|
* @param newVersion
|
|
1612
|
-
* @returns
|
|
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
|
|
1613
1374
|
* @throws ApiError
|
|
1614
1375
|
*/
|
|
1615
|
-
|
|
1376
|
+
deleteTemplateByName(name: string): CancelablePromise<any>;
|
|
1616
1377
|
/**
|
|
1617
|
-
* Delete
|
|
1618
|
-
* @param
|
|
1378
|
+
* Delete a version of form template by name
|
|
1379
|
+
* @param name
|
|
1380
|
+
* @param version
|
|
1619
1381
|
* @returns any OK
|
|
1620
1382
|
* @throws ApiError
|
|
1621
1383
|
*/
|
|
1622
|
-
|
|
1384
|
+
deleteTemplatesByNameAndVersion(name: string, version: number): CancelablePromise<any>;
|
|
1623
1385
|
/**
|
|
1624
|
-
* Get
|
|
1625
|
-
* @param
|
|
1626
|
-
* @
|
|
1386
|
+
* Get user form template by name and version
|
|
1387
|
+
* @param name
|
|
1388
|
+
* @param version
|
|
1389
|
+
* @returns HumanTaskTemplate OK
|
|
1627
1390
|
* @throws ApiError
|
|
1628
1391
|
*/
|
|
1629
|
-
|
|
1392
|
+
getTemplateByNameAndVersion(name: string, version: number): CancelablePromise<HumanTaskTemplate>;
|
|
1630
1393
|
}
|
|
1631
1394
|
|
|
1632
1395
|
declare class HumanTaskResourceService {
|
|
@@ -1678,6 +1441,19 @@ declare class ApiError extends Error {
|
|
|
1678
1441
|
constructor(request: ApiRequestOptions, response: ApiResult, message: string);
|
|
1679
1442
|
}
|
|
1680
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
|
+
|
|
1681
1457
|
/**
|
|
1682
1458
|
* Functional interface for defining a worker implementation that processes tasks from a conductor queue.
|
|
1683
1459
|
*
|
|
@@ -1693,6 +1469,195 @@ interface ConductorWorker {
|
|
|
1693
1469
|
pollInterval?: number;
|
|
1694
1470
|
}
|
|
1695
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
|
+
|
|
1696
1661
|
declare type TaskErrorHandler = (error: Error, task?: Task) => void;
|
|
1697
1662
|
interface TaskRunnerOptions {
|
|
1698
1663
|
workerID: string;
|
|
@@ -1709,6 +1674,7 @@ interface RunnerArgs {
|
|
|
1709
1674
|
onError?: TaskErrorHandler;
|
|
1710
1675
|
concurrency?: number;
|
|
1711
1676
|
}
|
|
1677
|
+
|
|
1712
1678
|
declare const noopErrorHandler: TaskErrorHandler;
|
|
1713
1679
|
/**
|
|
1714
1680
|
* Responsible for polling and executing tasks from a queue.
|
|
@@ -1788,6 +1754,8 @@ declare class ConductorError extends Error {
|
|
|
1788
1754
|
}
|
|
1789
1755
|
declare type TaskResultStatus = NonNullable<TaskResult['status']>;
|
|
1790
1756
|
|
|
1757
|
+
declare type TaskFinderPredicate = (task: Task) => boolean;
|
|
1758
|
+
declare const completedTaskMatchingType: (taskType: string) => TaskFinderPredicate;
|
|
1791
1759
|
declare class WorkflowExecutor {
|
|
1792
1760
|
readonly _client: ConductorClient;
|
|
1793
1761
|
constructor(client: ConductorClient);
|
|
@@ -1797,7 +1765,7 @@ declare class WorkflowExecutor {
|
|
|
1797
1765
|
* @param workflow Complete workflow definition
|
|
1798
1766
|
* @returns null
|
|
1799
1767
|
*/
|
|
1800
|
-
registerWorkflow(override: boolean, workflow: WorkflowDef):
|
|
1768
|
+
registerWorkflow(override: boolean, workflow: WorkflowDef): Promise<void>;
|
|
1801
1769
|
/**
|
|
1802
1770
|
* Takes a StartWorkflowRequest. returns a Promise<string> with the workflowInstanceId of the running workflow
|
|
1803
1771
|
* @param workflowRequest
|
|
@@ -1811,6 +1779,8 @@ declare class WorkflowExecutor {
|
|
|
1811
1779
|
*/
|
|
1812
1780
|
executeWorkflow(workflowRequest: StartWorkflowRequest, name: string, version: number, requestId: string, waitUntilTaskRef?: string): Promise<WorkflowRun>;
|
|
1813
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>;
|
|
1814
1784
|
/**
|
|
1815
1785
|
* Takes an workflowInstanceId and an includeTasks and an optional retry parameter returns the whole execution status.
|
|
1816
1786
|
* If includeTasks flag is provided. Details of tasks execution will be returned as well,
|
|
@@ -1830,13 +1800,22 @@ declare class WorkflowExecutor {
|
|
|
1830
1800
|
* @param includeVariables flag to include variable
|
|
1831
1801
|
* @returns Promise<WorkflowStatus>
|
|
1832
1802
|
*/
|
|
1833
|
-
getWorkflowStatus(workflowInstanceId: string, includeOutput: boolean, includeVariables: boolean):
|
|
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>;
|
|
1834
1813
|
/**
|
|
1835
1814
|
* Pauses a running workflow
|
|
1836
1815
|
* @param workflowInstanceId current workflow execution
|
|
1837
1816
|
* @returns
|
|
1838
1817
|
*/
|
|
1839
|
-
pause(workflowInstanceId: string):
|
|
1818
|
+
pause(workflowInstanceId: string): Promise<void>;
|
|
1840
1819
|
/**
|
|
1841
1820
|
* Reruns workflowInstanceId workflow. with new parameters
|
|
1842
1821
|
*
|
|
@@ -1844,21 +1823,21 @@ declare class WorkflowExecutor {
|
|
|
1844
1823
|
* @param rerunWorkflowRequest Rerun Workflow Execution Request
|
|
1845
1824
|
* @returns
|
|
1846
1825
|
*/
|
|
1847
|
-
reRun(workflowInstanceId: string, rerunWorkflowRequest?: Partial<RerunWorkflowRequest>):
|
|
1826
|
+
reRun(workflowInstanceId: string, rerunWorkflowRequest?: Partial<RerunWorkflowRequest>): Promise<string>;
|
|
1848
1827
|
/**
|
|
1849
1828
|
* Restarts workflow with workflowInstanceId, if useLatestDefinition uses last defintion
|
|
1850
1829
|
* @param workflowInstanceId
|
|
1851
1830
|
* @param useLatestDefinitions
|
|
1852
1831
|
* @returns
|
|
1853
1832
|
*/
|
|
1854
|
-
restart(workflowInstanceId: string, useLatestDefinitions: boolean):
|
|
1833
|
+
restart(workflowInstanceId: string, useLatestDefinitions: boolean): Promise<void>;
|
|
1855
1834
|
/**
|
|
1856
1835
|
* Resumes a previously paused execution
|
|
1857
1836
|
*
|
|
1858
1837
|
* @param workflowInstanceId Running workflow workflowInstanceId
|
|
1859
1838
|
* @returns
|
|
1860
1839
|
*/
|
|
1861
|
-
resume(workflowInstanceId: string):
|
|
1840
|
+
resume(workflowInstanceId: string): Promise<void>;
|
|
1862
1841
|
/**
|
|
1863
1842
|
* Retrys workflow from last failing task
|
|
1864
1843
|
* if resumeSubworkflowTasks is true will resume tasks in spawned subworkflows
|
|
@@ -1867,7 +1846,7 @@ declare class WorkflowExecutor {
|
|
|
1867
1846
|
* @param resumeSubworkflowTasks
|
|
1868
1847
|
* @returns
|
|
1869
1848
|
*/
|
|
1870
|
-
retry(workflowInstanceId: string, resumeSubworkflowTasks: boolean):
|
|
1849
|
+
retry(workflowInstanceId: string, resumeSubworkflowTasks: boolean): Promise<void>;
|
|
1871
1850
|
/**
|
|
1872
1851
|
* Searches for existing workflows given the following querys
|
|
1873
1852
|
*
|
|
@@ -1879,7 +1858,7 @@ declare class WorkflowExecutor {
|
|
|
1879
1858
|
* @param skipCache
|
|
1880
1859
|
* @returns
|
|
1881
1860
|
*/
|
|
1882
|
-
search(start: number, size: number, query: string, freeText: string, sort?: string, skipCache?: boolean):
|
|
1861
|
+
search(start: number, size: number, query: string, freeText: string, sort?: string, skipCache?: boolean): Promise<ScrollableSearchResultWorkflowSummary>;
|
|
1883
1862
|
/**
|
|
1884
1863
|
* Skips a task of a running workflow.
|
|
1885
1864
|
* by providing a skipTaskRequest you can set the input and the output of the skipped tasks
|
|
@@ -1888,14 +1867,14 @@ declare class WorkflowExecutor {
|
|
|
1888
1867
|
* @param skipTaskRequest
|
|
1889
1868
|
* @returns
|
|
1890
1869
|
*/
|
|
1891
|
-
skipTasksFromWorkflow(workflowInstanceId: string, taskReferenceName: string, skipTaskRequest: Partial<SkipTaskRequest>):
|
|
1870
|
+
skipTasksFromWorkflow(workflowInstanceId: string, taskReferenceName: string, skipTaskRequest: Partial<SkipTaskRequest>): Promise<void>;
|
|
1892
1871
|
/**
|
|
1893
1872
|
* Takes an workflowInstanceId, and terminates a running workflow
|
|
1894
1873
|
* @param workflowInstanceId
|
|
1895
1874
|
* @param reason
|
|
1896
1875
|
* @returns
|
|
1897
1876
|
*/
|
|
1898
|
-
terminate(workflowInstanceId: string, reason: string):
|
|
1877
|
+
terminate(workflowInstanceId: string, reason: string): Promise<void>;
|
|
1899
1878
|
/**
|
|
1900
1879
|
* Takes a taskId and a workflowInstanceId. Will update the task for the corresponding taskId
|
|
1901
1880
|
* @param taskId
|
|
@@ -1904,7 +1883,7 @@ declare class WorkflowExecutor {
|
|
|
1904
1883
|
* @param taskOutput
|
|
1905
1884
|
* @returns
|
|
1906
1885
|
*/
|
|
1907
|
-
updateTask(taskId: string, workflowInstanceId: string, taskStatus: TaskResultStatus, outputData: Record<string, any>):
|
|
1886
|
+
updateTask(taskId: string, workflowInstanceId: string, taskStatus: TaskResultStatus, outputData: Record<string, any>): Promise<string>;
|
|
1908
1887
|
/**
|
|
1909
1888
|
* Updates a task by reference Name
|
|
1910
1889
|
* @param taskReferenceName
|
|
@@ -1913,7 +1892,7 @@ declare class WorkflowExecutor {
|
|
|
1913
1892
|
* @param taskOutput
|
|
1914
1893
|
* @returns
|
|
1915
1894
|
*/
|
|
1916
|
-
updateTaskByRefName(taskReferenceName: string, workflowInstanceId: string, status: TaskResultStatus, taskOutput: Record<string, any>):
|
|
1895
|
+
updateTaskByRefName(taskReferenceName: string, workflowInstanceId: string, status: TaskResultStatus, taskOutput: Record<string, any>): Promise<string>;
|
|
1917
1896
|
/**
|
|
1918
1897
|
*
|
|
1919
1898
|
* @param taskId
|
|
@@ -1922,10 +1901,15 @@ declare class WorkflowExecutor {
|
|
|
1922
1901
|
getTask(taskId: string): Promise<Task>;
|
|
1923
1902
|
}
|
|
1924
1903
|
|
|
1904
|
+
declare type PollIntervalOptions = {
|
|
1905
|
+
pollInterval: number;
|
|
1906
|
+
maxPollTimes: number;
|
|
1907
|
+
};
|
|
1925
1908
|
declare class HumanExecutor {
|
|
1926
1909
|
readonly _client: ConductorClient;
|
|
1927
1910
|
constructor(client: ConductorClient);
|
|
1928
1911
|
/**
|
|
1912
|
+
* @deprecated use search instead
|
|
1929
1913
|
* Takes a set of filter parameters. return matches of human tasks for that set of parameters
|
|
1930
1914
|
* @param state
|
|
1931
1915
|
* @param assignee
|
|
@@ -1936,7 +1920,31 @@ declare class HumanExecutor {
|
|
|
1936
1920
|
* @param includeInputOutput
|
|
1937
1921
|
* @returns
|
|
1938
1922
|
*/
|
|
1939
|
-
getTasksByFilter(state: "PENDING" | "ASSIGNED" | "IN_PROGRESS" | "COMPLETED" | "TIMED_OUT", assignee?: string, assigneeType?: "EXTERNAL_USER" | "EXTERNAL_GROUP" | "CONDUCTOR_USER" | "CONDUCTOR_GROUP", claimedBy?: string, taskName?: string,
|
|
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[]>;
|
|
1940
1948
|
/**
|
|
1941
1949
|
* Returns task for a given task id
|
|
1942
1950
|
* @param taskId
|
|
@@ -1949,13 +1957,13 @@ declare class HumanExecutor {
|
|
|
1949
1957
|
* @param assignee
|
|
1950
1958
|
* @returns
|
|
1951
1959
|
*/
|
|
1952
|
-
claimTaskAsExternalUser(taskId: string, assignee: string): Promise<
|
|
1960
|
+
claimTaskAsExternalUser(taskId: string, assignee: string): Promise<HumanTaskEntry>;
|
|
1953
1961
|
/**
|
|
1954
1962
|
* Claim task as conductor user
|
|
1955
1963
|
* @param taskId
|
|
1956
1964
|
* @returns
|
|
1957
1965
|
*/
|
|
1958
|
-
claimTaskAsConductorUser(taskId: string): Promise<
|
|
1966
|
+
claimTaskAsConductorUser(taskId: string): Promise<HumanTaskEntry>;
|
|
1959
1967
|
/**
|
|
1960
1968
|
* Claim task as conductor user
|
|
1961
1969
|
* @param taskId
|
|
@@ -1964,11 +1972,18 @@ declare class HumanExecutor {
|
|
|
1964
1972
|
*/
|
|
1965
1973
|
releaseTask(taskId: string): Promise<void>;
|
|
1966
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
|
|
1967
1982
|
* Returns a HumanTaskTemplateEntry for a given templateId
|
|
1968
1983
|
* @param templateId
|
|
1969
1984
|
* @returns
|
|
1970
1985
|
*/
|
|
1971
|
-
getTemplateById(
|
|
1986
|
+
getTemplateById(templateNameVersionOne: string): Promise<HumanTaskTemplate>;
|
|
1972
1987
|
/**
|
|
1973
1988
|
* Takes a taskId and a partial body. will update with given body
|
|
1974
1989
|
* @param taskId
|
|
@@ -2182,4 +2197,4 @@ declare type FetchFn<T = RequestInit, R extends {
|
|
|
2182
2197
|
} = Response> = (input: RequestInfo, init?: T) => Promise<R>;
|
|
2183
2198
|
declare type OrkesApiConfig = ConductorClientAPIConfig & GenerateTokenRequest;
|
|
2184
2199
|
|
|
2185
|
-
export { HealthCheckResourceService as $, ApiRequestOptions as A, BaseHttpRequest as B, ConductorHttpRequest as C, StartWorkflow as D, EventHandler as E, FetchFn as F, GenerateTokenRequest as G, StartWorkflowRequest as H, SubWorkflowParams as I, Task as J, TaskDef as K, TaskDetails as L, TaskExecLog as M, TaskResult as N, OrkesApiConfig as O, PollData as P, TaskSummary as Q, RunnerArgs as R, SaveScheduleRequest as S,
|
|
2200
|
+
export { HealthCheckResourceService as $, ApiRequestOptions as A, BaseHttpRequest as B, ConductorHttpRequest as C, StartWorkflow as D, EventHandler as E, FetchFn as F, GenerateTokenRequest as G, StartWorkflowRequest as H, SubWorkflowParams as I, Task as J, TaskDef as K, TaskDetails as L, TaskExecLog as M, TaskResult as N, OrkesApiConfig as O, PollData as P, TaskSummary as Q, RunnerArgs as R, SaveScheduleRequest as S, TaskRunner as T, WorkflowSchedule as U, WorkflowScheduleExecutionModel as V, Workflow as W, WorkflowStatus as X, WorkflowSummary as Y, WorkflowTask as Z, EventResourceService as _, ConductorClient as a, jsonJqTask as a$, MetadataResourceService as a0, SchedulerResourceService as a1, TaskResourceService as a2, TokenResourceService as a3, WorkflowBulkResourceService as a4, WorkflowResourceService as a5, HTScrollableSearchResultHumanTaskEntry as a6, Terminate as a7, TimeoutPolicy as a8, HumanTaskUser as a9, JsonJQTransformTaskDef as aA, KafkaPublishInputParameters as aB, KafkaPublishTaskDef as aC, SetVariableTaskDef as aD, SimpleTaskDef as aE, SubWorkflowTaskDef as aF, SwitchTaskDef as aG, TerminateTaskDef as aH, WaitTaskDef as aI, WorkflowDef as aJ, TaskFinderPredicate as aK, completedTaskMatchingType as aL, WorkflowExecutor as aM, ConductorError as aN, TaskResultStatus as aO, HumanExecutor as aP, doWhileTask as aQ, newLoopTask as aR, dynamicForkTask as aS, eventTask as aT, sqsEventTask as aU, conductorEventTask as aV, forkTask as aW, forkTaskJoin as aX, httpTask as aY, inlineTask as aZ, joinTask as a_, HumanTaskDefinition as aa, HumanTaskAssignment as ab, HumanTaskTrigger as ac, UserFormTemplate as ad, HumanTaskTemplate as ae, HumanTaskSearchResult as af, HumanTaskSearch as ag, HumanTaskEntry as ah, ConductorLogger as ai, ConductorLogLevel as aj, DefaultLoggerConfig as ak, DefaultLogger as al, noopLogger as am, RequestType as an, CommonTaskDef as ao, TaskType as ap, TaskDefTypes as aq, DoWhileTaskDef as ar, EventTaskDef as as, ForkJoinTaskDef as at, JoinTaskDef as au, ForkJoinDynamicDef as av, HttpInputParameters as aw, HttpTaskDef as ax, InlineTaskInputParameters as ay, InlineTaskDef as az, ConductorClientAPIConfig as b, kafkaPublishTask as b0, setVariableTask as b1, simpleTask as b2, subWorkflowTask as b3, switchTask as b4, terminateTask as b5, waitTaskDuration as b6, waitTaskUntil as b7, workflow as b8, generateSimpleTask as b9, generateDoWhileTask as ba, generateEventTask as bb, generateForkJoinTask as bc, generateJoinTask as bd, generateHTTPTask as be, generateInlineTask as bf, generateJQTransformTask as bg, generateKafkaPublishTask as bh, generateSubWorkflowTask as bi, generateSetVariableTask as bj, generateTerminateTask as bk, generateWaitTask as bl, generateSwitchTask as bm, generate as bn, taskGenMapper as bo, OpenAPIConfig as c, CancelablePromise as d, TaskManagerOptions as e, TaskManagerConfig as f, TaskManager as g, ConductorWorker as h, TaskErrorHandler as i, TaskRunnerOptions as j, ApiResult as k, OnCancel as l, ApiError as m, noopErrorHandler as n, CancelError as o, Action as p, ExternalStorageLocation as q, RerunWorkflowRequest as r, Response$1 as s, ScrollableSearchResultWorkflowSummary as t, SearchResultTask as u, SearchResultTaskSummary as v, SearchResultWorkflow as w, SearchResultWorkflowScheduleExecutionModel as x, SearchResultWorkflowSummary as y, SkipTaskRequest as z };
|