@io-orkes/conductor-javascript 0.9.1 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -414,7 +414,7 @@ declare class MetadataResourceService {
414
414
  get(name: string, version?: number, metadata?: boolean): CancelablePromise<WorkflowDef$1>;
415
415
  }
416
416
 
417
- declare type StartWorkflowRequest$1 = {
417
+ declare type StartWorkflowRequest = {
418
418
  name: string;
419
419
  version?: number;
420
420
  correlationId?: string;
@@ -431,7 +431,7 @@ declare type SaveScheduleRequest = {
431
431
  cronExpression: string;
432
432
  runCatchupScheduleInstances?: boolean;
433
433
  paused?: boolean;
434
- startWorkflowRequest?: StartWorkflowRequest$1;
434
+ startWorkflowRequest?: StartWorkflowRequest;
435
435
  createdBy?: string;
436
436
  updatedBy?: string;
437
437
  scheduleStartTime?: number;
@@ -447,7 +447,7 @@ declare type WorkflowScheduleExecutionModel = {
447
447
  workflowId?: string;
448
448
  reason?: string;
449
449
  stackTrace?: string;
450
- startWorkflowRequest?: StartWorkflowRequest$1;
450
+ startWorkflowRequest?: StartWorkflowRequest;
451
451
  state?: 'POLLED' | 'FAILED' | 'EXECUTED';
452
452
  };
453
453
 
@@ -461,7 +461,7 @@ declare type WorkflowSchedule = {
461
461
  cronExpression?: string;
462
462
  runCatchupScheduleInstances?: boolean;
463
463
  paused?: boolean;
464
- startWorkflowRequest?: StartWorkflowRequest$1;
464
+ startWorkflowRequest?: StartWorkflowRequest;
465
465
  scheduleStartTime?: number;
466
466
  scheduleEndTime?: number;
467
467
  createTime?: number;
@@ -657,7 +657,7 @@ declare type TaskExecLog = {
657
657
  createdTime?: number;
658
658
  };
659
659
 
660
- declare type TaskResult$1 = {
660
+ declare type TaskResult = {
661
661
  workflowInstanceId: string;
662
662
  taskId: string;
663
663
  reasonForIncompletion?: string;
@@ -787,7 +787,7 @@ declare class TaskResourceService {
787
787
  * @returns string OK
788
788
  * @throws ApiError
789
789
  */
790
- updateTask1(requestBody: TaskResult$1): CancelablePromise<string>;
790
+ updateTask1(requestBody: TaskResult): CancelablePromise<string>;
791
791
  /**
792
792
  * Get Task type queue sizes
793
793
  * @param taskType
@@ -878,7 +878,7 @@ declare class WorkflowBulkResourceService {
878
878
  pauseWorkflow1(requestBody: Array<string>): CancelablePromise<BulkResponse>;
879
879
  }
880
880
 
881
- declare type RerunWorkflowRequest$1 = {
881
+ declare type RerunWorkflowRequest = {
882
882
  reRunFromWorkflowId?: string;
883
883
  workflowInput?: Record<string, any>;
884
884
  reRunFromTaskId?: string;
@@ -955,11 +955,26 @@ declare type SearchResultWorkflowSummary = {
955
955
  results?: Array<WorkflowSummary>;
956
956
  };
957
957
 
958
- declare type SkipTaskRequest$1 = {
958
+ declare type SkipTaskRequest = {
959
959
  taskInput?: Record<string, any>;
960
960
  taskOutput?: Record<string, any>;
961
961
  };
962
962
 
963
+ declare type WorkflowRun = {
964
+ correlationId?: string;
965
+ createTime?: number;
966
+ createdBy?: string;
967
+ priority?: number;
968
+ requestId?: string;
969
+ status?: string;
970
+ tasks?: Array<Task>;
971
+ updateTime?: number;
972
+ workflowId?: string;
973
+ variables?: Record<string, object>;
974
+ input?: Record<string, object>;
975
+ output?: Record<string, object>;
976
+ };
977
+
963
978
  declare type WorkflowStatus = {
964
979
  workflowId?: string;
965
980
  correlationId?: string;
@@ -981,13 +996,25 @@ declare class WorkflowResourceService {
981
996
  * @throws ApiError
982
997
  */
983
998
  getRunningWorkflow(name: string, version?: number, startTime?: number, endTime?: number): CancelablePromise<Array<string>>;
999
+ /**
1000
+ * Execute a workflow synchronously
1001
+ * @param body
1002
+ * @param name
1003
+ * @param version
1004
+ * @param requestId
1005
+ * @param waitUntilTaskRef
1006
+ * @param callback
1007
+ * @returns workflowRun
1008
+ * @throws ApiError
1009
+ */
1010
+ executeWorkflow(body: StartWorkflowRequest, name: string, version: number, requestId: string, waitUntilTaskRef: string): CancelablePromise<WorkflowRun>;
984
1011
  /**
985
1012
  * Start a new workflow with StartWorkflowRequest, which allows task to be executed in a domain
986
1013
  * @param requestBody
987
1014
  * @returns string OK
988
1015
  * @throws ApiError
989
1016
  */
990
- startWorkflow(requestBody: StartWorkflowRequest$1): CancelablePromise<string>;
1017
+ startWorkflow(requestBody: StartWorkflowRequest): CancelablePromise<string>;
991
1018
  /**
992
1019
  * Starts the decision task for a workflow
993
1020
  * @param workflowId
@@ -1002,7 +1029,7 @@ declare class WorkflowResourceService {
1002
1029
  * @returns string OK
1003
1030
  * @throws ApiError
1004
1031
  */
1005
- rerun(workflowId: string, requestBody: RerunWorkflowRequest$1): CancelablePromise<string>;
1032
+ rerun(workflowId: string, requestBody: RerunWorkflowRequest): CancelablePromise<string>;
1006
1033
  /**
1007
1034
  * Search for workflows based on payload and other parameters
1008
1035
  * use sort options as sort=<field>:ASC|DESC e.g. sort=name&sort=workflowId:DESC. If order is not specified, defaults to ASC.
@@ -1030,7 +1057,7 @@ declare class WorkflowResourceService {
1030
1057
  * @returns any OK
1031
1058
  * @throws ApiError
1032
1059
  */
1033
- skipTaskFromWorkflow(workflowId: string, taskReferenceName: string, requestBody?: SkipTaskRequest$1): CancelablePromise<any>;
1060
+ skipTaskFromWorkflow(workflowId: string, taskReferenceName: string, requestBody?: SkipTaskRequest): CancelablePromise<any>;
1034
1061
  /**
1035
1062
  * Lists workflows for the given correlation id list
1036
1063
  * @param name
@@ -1174,6 +1201,281 @@ declare class WorkflowResourceService {
1174
1201
  resetWorkflow(workflowId: string): CancelablePromise<void>;
1175
1202
  }
1176
1203
 
1204
+ declare type AssignmentPolicy = {
1205
+ type: string;
1206
+ };
1207
+
1208
+ declare type FFAAssignment = AssignmentPolicy;
1209
+
1210
+ declare type Fixed = (AssignmentPolicy & {
1211
+ assignee?: string;
1212
+ assigneeType?: 'EXTERNAL_USER' | 'EXTERNAL_GROUP' | 'CONDUCTOR_USER' | 'CONDUCTOR_GROUP';
1213
+ });
1214
+
1215
+ declare type TimeoutPolicy = {
1216
+ type: string;
1217
+ };
1218
+
1219
+ declare type BackToAssigment = (TimeoutPolicy & {
1220
+ timeoutSeconds?: number;
1221
+ });
1222
+
1223
+ declare type ClearAssigment = (TimeoutPolicy & {
1224
+ timeoutSeconds?: number;
1225
+ });
1226
+
1227
+ declare type Escalate = (TimeoutPolicy & {
1228
+ subjects?: Array<string>;
1229
+ timeoutSeconds?: number;
1230
+ } & {
1231
+ subjects: Array<string>;
1232
+ });
1233
+
1234
+ declare type LeastBusyGroupMemberAssignment = (AssignmentPolicy & {
1235
+ groupId?: string;
1236
+ });
1237
+
1238
+ declare type Never = TimeoutPolicy;
1239
+
1240
+ declare type Terminate = (TimeoutPolicy & {
1241
+ timeoutSeconds?: number;
1242
+ });
1243
+
1244
+ declare type HumanTaskEntry = {
1245
+ assignee?: string;
1246
+ assigneeType?: 'EXTERNAL_USER' | 'EXTERNAL_GROUP' | 'CONDUCTOR_USER' | 'CONDUCTOR_GROUP';
1247
+ assignmentPolicy?: (FFAAssignment | Fixed | LeastBusyGroupMemberAssignment);
1248
+ claimedBy?: string;
1249
+ createdBy?: string;
1250
+ createdOn?: number;
1251
+ escalatedAt?: number;
1252
+ output?: Record<string, Record<string, any>>;
1253
+ owners?: Array<string>;
1254
+ predefinedInput?: Record<string, Record<string, any>>;
1255
+ state?: 'PENDING' | 'ASSIGNED' | 'IN_PROGRESS' | 'COMPLETED' | 'TIMED_OUT';
1256
+ taskId?: string;
1257
+ taskName?: string;
1258
+ taskRefName?: string;
1259
+ templateId?: string;
1260
+ timeoutPolicy?: (BackToAssigment | ClearAssigment | Escalate | Never | Terminate);
1261
+ workflowId?: string;
1262
+ workflowName?: string;
1263
+ };
1264
+
1265
+ declare type HTScrollableSearchResultHumanTaskEntry = {
1266
+ queryId?: string;
1267
+ results?: Array<HumanTaskEntry>;
1268
+ };
1269
+
1270
+ declare type HumanTaskActionLogEntry = {
1271
+ action?: string;
1272
+ actionTime?: number;
1273
+ cause?: string;
1274
+ id?: string;
1275
+ taskId?: string;
1276
+ taskRefName?: string;
1277
+ workflowId?: string;
1278
+ workflowName?: string;
1279
+ };
1280
+
1281
+ declare type HumanTaskLoad = {
1282
+ assignedUser?: string;
1283
+ count?: number;
1284
+ taskRefName?: string;
1285
+ workflowName?: string;
1286
+ };
1287
+
1288
+ declare type HumanTaskStateLogEntry = {
1289
+ assignee?: string;
1290
+ assigneeType?: 'EXTERNAL_USER' | 'EXTERNAL_GROUP' | 'CONDUCTOR_USER' | 'CONDUCTOR_GROUP';
1291
+ claimedBy?: string;
1292
+ id?: string;
1293
+ state?: 'PENDING' | 'ASSIGNED' | 'IN_PROGRESS' | 'COMPLETED' | 'TIMED_OUT';
1294
+ stateEnd?: number;
1295
+ stateStart?: number;
1296
+ taskId?: string;
1297
+ taskRefName?: string;
1298
+ workflowId?: string;
1299
+ workflowName?: string;
1300
+ };
1301
+
1302
+ declare type HumanTaskTemplate = {
1303
+ jsonSchema: Record<string, Record<string, any>>;
1304
+ name: string;
1305
+ templateUI: Record<string, Record<string, any>>;
1306
+ version?: number;
1307
+ };
1308
+
1309
+ declare type HumanTaskTemplateEntry = {
1310
+ createdBy?: string;
1311
+ createdOn?: number;
1312
+ id?: string;
1313
+ jsonSchema?: Record<string, Record<string, any>>;
1314
+ name?: string;
1315
+ templateUI?: Record<string, Record<string, any>>;
1316
+ updatedBy?: string;
1317
+ updatedOn?: number;
1318
+ version?: number;
1319
+ };
1320
+
1321
+ declare type SearchResultHumanTaskEntry = {
1322
+ results?: Array<HumanTaskEntry>;
1323
+ totalHits?: number;
1324
+ };
1325
+
1326
+ declare class HumanTaskService {
1327
+ readonly httpRequest: BaseHttpRequest;
1328
+ constructor(httpRequest: BaseHttpRequest);
1329
+ /**
1330
+ * List tasks by filters - task name, state, assignee, assignee type, claimed
1331
+ * @param state
1332
+ * @param assignee
1333
+ * @param assigneeType
1334
+ * @param claimedBy
1335
+ * @param taskName
1336
+ * @param freeText
1337
+ * @param includeInputOutput
1338
+ * @returns SearchResultHumanTaskEntry OK
1339
+ * @throws ApiError
1340
+ */
1341
+ getTasksByFilter(state: 'PENDING' | 'ASSIGNED' | 'IN_PROGRESS' | 'COMPLETED' | 'TIMED_OUT', assignee?: string, assigneeType?: 'EXTERNAL_USER' | 'EXTERNAL_GROUP' | 'CONDUCTOR_USER' | 'CONDUCTOR_GROUP', claimedBy?: string, taskName?: string, freeText?: string, includeInputOutput?: boolean): CancelablePromise<SearchResultHumanTaskEntry>;
1342
+ /**
1343
+ * Get task load grouped by workflow name and task ref name per user
1344
+ * @returns HumanTaskLoad OK
1345
+ * @throws ApiError
1346
+ */
1347
+ getTaskLoad(): CancelablePromise<Array<HumanTaskLoad>>;
1348
+ /**
1349
+ * Search human tasks
1350
+ * @param queryId
1351
+ * @param start
1352
+ * @param size
1353
+ * @param freeText
1354
+ * @param query
1355
+ * @param jsonQuery
1356
+ * @param includeInputOutput
1357
+ * @returns HTScrollableSearchResultHumanTaskEntry OK
1358
+ * @throws ApiError
1359
+ */
1360
+ search1(queryId?: string, start?: number, size?: number, freeText?: string, query?: string, jsonQuery?: string, includeInputOutput?: boolean): CancelablePromise<HTScrollableSearchResultHumanTaskEntry>;
1361
+ /**
1362
+ * If the workflow is disconnected from tasks, this API can be used to clean up
1363
+ * @param taskId
1364
+ * @returns any OK
1365
+ * @throws ApiError
1366
+ */
1367
+ updateTaskOutput1(taskId: string): CancelablePromise<any>;
1368
+ /**
1369
+ * Get a task
1370
+ * @param taskId
1371
+ * @returns HumanTaskEntry OK
1372
+ * @throws ApiError
1373
+ */
1374
+ getTask1(taskId: string): CancelablePromise<HumanTaskEntry>;
1375
+ /**
1376
+ * Get human task action log entries by task id
1377
+ * @param taskId
1378
+ * @returns HumanTaskActionLogEntry OK
1379
+ * @throws ApiError
1380
+ */
1381
+ getActionLogs(taskId: string): CancelablePromise<Array<HumanTaskActionLogEntry>>;
1382
+ /**
1383
+ * Claim a task by authenticated Conductor user
1384
+ * @param taskId
1385
+ * @returns any OK
1386
+ * @throws ApiError
1387
+ */
1388
+ claimTask(taskId: string): CancelablePromise<any>;
1389
+ /**
1390
+ * Claim a task to an external user
1391
+ * @param taskId
1392
+ * @param userId
1393
+ * @returns any OK
1394
+ * @throws ApiError
1395
+ */
1396
+ assignAndClaim(taskId: string, userId: string): CancelablePromise<any>;
1397
+ /**
1398
+ * Release a task without completing it
1399
+ * @param taskId
1400
+ * @param requestBody
1401
+ * @returns any OK
1402
+ * @throws ApiError
1403
+ */
1404
+ reassignTask(taskId: string, requestBody: (FFAAssignment | Fixed | LeastBusyGroupMemberAssignment)): CancelablePromise<any>;
1405
+ /**
1406
+ * Release a task without completing it
1407
+ * @param taskId
1408
+ * @returns any OK
1409
+ * @throws ApiError
1410
+ */
1411
+ releaseTask(taskId: string): CancelablePromise<any>;
1412
+ /**
1413
+ * Get human task state log entries by task id
1414
+ * @param taskId
1415
+ * @returns HumanTaskStateLogEntry OK
1416
+ * @throws ApiError
1417
+ */
1418
+ getStateLogs(taskId: string): CancelablePromise<Array<HumanTaskStateLogEntry>>;
1419
+ /**
1420
+ * Update task output, optionally complete
1421
+ * @param taskId
1422
+ * @param requestBody
1423
+ * @param complete
1424
+ * @returns any OK
1425
+ * @throws ApiError
1426
+ */
1427
+ updateTaskOutput(taskId: string, requestBody: Record<string, Record<string, any>>, complete?: boolean): CancelablePromise<any>;
1428
+ /**
1429
+ * Delete human task templates by name
1430
+ * @param name
1431
+ * @returns any OK
1432
+ * @throws ApiError
1433
+ */
1434
+ deleteTemplatesByName(name: string): CancelablePromise<any>;
1435
+ /**
1436
+ * List all human task templates or get templates by name, or a template by name and version
1437
+ * @param name
1438
+ * @param version
1439
+ * @returns HumanTaskTemplateEntry OK
1440
+ * @throws ApiError
1441
+ */
1442
+ getAllTemplates(name?: string, version?: number): CancelablePromise<Array<HumanTaskTemplateEntry>>;
1443
+ /**
1444
+ * Save human task template
1445
+ * @param requestBody
1446
+ * @param newVersion
1447
+ * @returns string OK
1448
+ * @throws ApiError
1449
+ */
1450
+ saveTemplate(requestBody: HumanTaskTemplate, newVersion?: boolean): CancelablePromise<string>;
1451
+ /**
1452
+ * Delete human task template
1453
+ * @param id
1454
+ * @returns any OK
1455
+ * @throws ApiError
1456
+ */
1457
+ deleteTemplateById(id: string): CancelablePromise<any>;
1458
+ /**
1459
+ * Get human task template by id
1460
+ * @param id
1461
+ * @returns HumanTaskTemplateEntry OK
1462
+ * @throws ApiError
1463
+ */
1464
+ getTemplateById(id: string): CancelablePromise<HumanTaskTemplateEntry>;
1465
+ }
1466
+
1467
+ declare class HumanTaskResourceService {
1468
+ readonly httpRequest: BaseHttpRequest;
1469
+ constructor(httpRequest: BaseHttpRequest);
1470
+ /**
1471
+ * Get Conductor task by id (for human tasks only)
1472
+ * @param taskId
1473
+ * @returns Task OK
1474
+ * @throws ApiError
1475
+ */
1476
+ getConductorTaskById(taskId: string): CancelablePromise<Task>;
1477
+ }
1478
+
1177
1479
  interface ConductorClientAPIConfig extends Omit<OpenAPIConfig, "BASE"> {
1178
1480
  serverUrl: string;
1179
1481
  }
@@ -1186,11 +1488,30 @@ declare class ConductorClient {
1186
1488
  readonly tokenResource: TokenResourceService;
1187
1489
  readonly workflowBulkResource: WorkflowBulkResourceService;
1188
1490
  readonly workflowResource: WorkflowResourceService;
1491
+ readonly humanTask: HumanTaskService;
1492
+ readonly humanTaskResource: HumanTaskResourceService;
1189
1493
  readonly request: BaseHttpRequest;
1190
1494
  readonly token?: string | Resolver<string>;
1191
1495
  constructor(config?: Partial<ConductorClientAPIConfig>, requestHandler?: ConductorHttpRequest);
1192
1496
  }
1193
1497
 
1498
+ declare type ApiResult = {
1499
+ readonly url: string;
1500
+ readonly ok: boolean;
1501
+ readonly status: number;
1502
+ readonly statusText: string;
1503
+ readonly body: any;
1504
+ };
1505
+
1506
+ declare class ApiError extends Error {
1507
+ readonly url: string;
1508
+ readonly status: number;
1509
+ readonly statusText: string;
1510
+ readonly body: any;
1511
+ readonly request: ApiRequestOptions;
1512
+ constructor(request: ApiRequestOptions, response: ApiResult, message: string);
1513
+ }
1514
+
1194
1515
  declare type OrkesApiConfig = ConductorClientAPIConfig & GenerateTokenRequest;
1195
1516
  /**
1196
1517
  * Takes a config with keyId and keySecret returns a promise with an instance of ConductorClient
@@ -1358,13 +1679,6 @@ interface WaitTaskDef extends CommonTaskDef {
1358
1679
  until?: string;
1359
1680
  };
1360
1681
  }
1361
- declare type U2O<U extends string> = {
1362
- [key in U]: U2O<Exclude<U, key>>;
1363
- };
1364
- declare type O2T<O extends {}> = {} extends O ? [] : {
1365
- [key in keyof O]: [key, ...O2T<O[key]>];
1366
- }[keyof O];
1367
- declare type WorkflowInputParameters<T extends string> = O2T<U2O<T>>;
1368
1682
  interface WorkflowDef extends Omit<WorkflowDef$1, "tasks" | "version" | "inputParameters"> {
1369
1683
  inputParameters: string[];
1370
1684
  version: number;
@@ -1574,7 +1888,7 @@ declare const workflow: (name: string, tasks: TaskDefTypes[]) => WorkflowDef;
1574
1888
  */
1575
1889
  interface ConductorWorker {
1576
1890
  taskDefName: string;
1577
- execute: (task: Task) => Promise<Omit<TaskResult$1, "workflowInstanceId" | "taskId">>;
1891
+ execute: (task: Task) => Promise<Omit<TaskResult, "workflowInstanceId" | "taskId">>;
1578
1892
  domain?: string;
1579
1893
  concurrency?: number;
1580
1894
  }
@@ -1601,7 +1915,13 @@ declare class TaskManager {
1601
1915
  private workers;
1602
1916
  private readonly taskManageOptions;
1603
1917
  constructor(client: ConductorClient, workers: Array<ConductorWorker>, config?: TaskManagerConfig);
1918
+ /**
1919
+ * Start polling for tasks
1920
+ */
1604
1921
  startPolling: () => void;
1922
+ /**
1923
+ * Stops polling for tasks
1924
+ */
1605
1925
  stopPolling: () => void;
1606
1926
  }
1607
1927
 
@@ -1631,45 +1951,26 @@ declare class TaskRunner {
1631
1951
  options: Required<TaskManagerOptions>;
1632
1952
  errorHandler: TaskErrorHandler;
1633
1953
  constructor({ worker, taskResource, options, logger, onError: errorHandler, }: RunnerArgs);
1954
+ /**
1955
+ * Starts polling for work
1956
+ */
1634
1957
  startPolling: () => Promise<void>;
1958
+ /**
1959
+ * Stops Polling for work
1960
+ */
1635
1961
  stopPolling: () => void;
1636
1962
  poll: () => Promise<void>;
1637
- updateTaskWithRetry: (task: Task, taskResult: TaskResult$1) => Promise<void>;
1963
+ updateTaskWithRetry: (task: Task, taskResult: TaskResult) => Promise<void>;
1638
1964
  executeTask: (task: Task) => Promise<void>;
1639
1965
  handleUnknownError: (unknownError: unknown) => void;
1640
1966
  }
1641
1967
 
1642
- interface StartWorkflowRequest<I = Record<string, any>> {
1643
- name: string;
1644
- version: number;
1645
- correlationId?: string;
1646
- input?: I;
1647
- taskToDomain?: Record<string, string>;
1648
- workflowDef?: WorkflowDef;
1649
- externalInputPayloadStoragePath?: string;
1650
- priority?: number;
1651
- }
1652
- interface RerunWorkflowRequest<I = Record<string, any>> {
1653
- workflowInput: I;
1654
- rerunFromTaskId?: string;
1655
- taskInput: Record<string, any>;
1656
- correlationId: string;
1657
- }
1658
- interface SkipTaskRequest {
1659
- taskInput: Record<string, any>;
1660
- taskOutput: Record<string, any>;
1661
- }
1662
1968
  declare class ConductorError extends Error {
1663
1969
  private _trace;
1664
1970
  private __proto__;
1665
1971
  constructor(message?: string, innerError?: Error);
1666
1972
  }
1667
- declare enum TaskResult {
1668
- IN_PROGRESS = "IN_PROGRESS",
1669
- FAILED = "FAILED",
1670
- FAILED_WITH_TERMINAL_ERROR = "FAILED_WITH_TERMINAL_ERROR",
1671
- COMPLETED = "COMPLETED"
1672
- }
1973
+ declare type TaskResultStatus = NonNullable<TaskResult['status']>;
1673
1974
 
1674
1975
  declare class WorkflowExecutor {
1675
1976
  readonly _client: ConductorClient;
@@ -1687,6 +1988,12 @@ declare class WorkflowExecutor {
1687
1988
  * @returns
1688
1989
  */
1689
1990
  startWorkflow(workflowRequest: StartWorkflowRequest): Promise<string>;
1991
+ /**
1992
+ * Execute a workflow synchronously. returns a Promise<WorkflowRun> with details of the running workflow
1993
+ * @param workflowRequest
1994
+ * @returns
1995
+ */
1996
+ executeWorkflow(workflowRequest: StartWorkflowRequest, name: string, version: number, requestId: string, waitUntilTaskRef?: string): Promise<WorkflowRun>;
1690
1997
  startWorkflows(workflowsRequest: StartWorkflowRequest[]): Promise<string>[];
1691
1998
  /**
1692
1999
  * Takes an workflowInstanceId and an includeTasks and an optional retry parameter returns the whole execution status.
@@ -1781,7 +2088,7 @@ declare class WorkflowExecutor {
1781
2088
  * @param taskOutput
1782
2089
  * @returns
1783
2090
  */
1784
- updateTask(taskId: string, workflowInstanceId: string, taskStatus: TaskResult, taskOutput: Record<string, any>): any;
2091
+ updateTask(taskId: string, workflowInstanceId: string, taskStatus: TaskResultStatus, outputData: Record<string, any>): any;
1785
2092
  /**
1786
2093
  * Updates a task by reference Name
1787
2094
  * @param taskReferenceName
@@ -1790,7 +2097,74 @@ declare class WorkflowExecutor {
1790
2097
  * @param taskOutput
1791
2098
  * @returns
1792
2099
  */
1793
- updateTaskByRefName(taskReferenceName: string, workflowInstanceId: string, status: TaskResult, taskOutput: Record<string, any>): any;
2100
+ updateTaskByRefName(taskReferenceName: string, workflowInstanceId: string, status: TaskResultStatus, taskOutput: Record<string, any>): any;
2101
+ /**
2102
+ *
2103
+ * @param taskId
2104
+ * @returns
2105
+ */
2106
+ getTask(taskId: string): Promise<Task>;
2107
+ }
2108
+
2109
+ declare class HumanExecutor {
2110
+ readonly _client: ConductorClient;
2111
+ constructor(client: ConductorClient);
2112
+ /**
2113
+ * Takes a set of filter parameters. return matches of human tasks for that set of parameters
2114
+ * @param state
2115
+ * @param assignee
2116
+ * @param assigneeType
2117
+ * @param claimedBy
2118
+ * @param taskName
2119
+ * @param freeText
2120
+ * @param includeInputOutput
2121
+ * @returns
2122
+ */
2123
+ getTasksByFilter(state: "PENDING" | "ASSIGNED" | "IN_PROGRESS" | "COMPLETED" | "TIMED_OUT", assignee?: string, assigneeType?: "EXTERNAL_USER" | "EXTERNAL_GROUP" | "CONDUCTOR_USER" | "CONDUCTOR_GROUP", claimedBy?: string, taskName?: string, freeText?: string, includeInputOutput?: boolean): Promise<HumanTaskEntry[]>;
2124
+ /**
2125
+ * Returns task for a given task id
2126
+ * @param taskId
2127
+ * @returns
2128
+ */
2129
+ getTaskById(taskId: string): Promise<HumanTaskEntry>;
2130
+ /**
2131
+ * Assigns taskId to assignee. If the task is already assigned to another user, this will fail.
2132
+ * @param taskId
2133
+ * @param assignee
2134
+ * @returns
2135
+ */
2136
+ claimTaskAsExternalUser(taskId: string, assignee: string): Promise<void>;
2137
+ /**
2138
+ * Claim task as conductor user
2139
+ * @param taskId
2140
+ * @returns
2141
+ */
2142
+ claimTaskAsConductorUser(taskId: string): Promise<void>;
2143
+ /**
2144
+ * Claim task as conductor user
2145
+ * @param taskId
2146
+ * @param assignee
2147
+ * @returns
2148
+ */
2149
+ releaseTask(taskId: string): Promise<void>;
2150
+ /**
2151
+ * Returns a HumanTaskTemplateEntry for a given templateId
2152
+ * @param templateId
2153
+ * @returns
2154
+ */
2155
+ getTemplateById(templateId: string): Promise<HumanTaskTemplateEntry>;
2156
+ /**
2157
+ * Takes a taskId and a partial body. will update with given body
2158
+ * @param taskId
2159
+ * @param requestBody
2160
+ */
2161
+ updateTaskOutput(taskId: string, requestBody: Record<string, Record<string, any>>): Promise<void>;
2162
+ /**
2163
+ * Takes a taskId and an optional partial body. will complete the task with the given body
2164
+ * @param taskId
2165
+ * @param requestBody
2166
+ */
2167
+ completeTask(taskId: string, requestBody?: Record<string, Record<string, any>>): Promise<void>;
1794
2168
  }
1795
2169
 
1796
- export { CancelError, CancelablePromise, CommonTaskDef, ConductorClient, ConductorError, ConductorHttpRequest, ConductorLogLevel, ConductorLogger, ConductorWorker, DefaultLogger, DefaultLoggerConfig, DoWhileTaskDef, EventTaskDef, ForkJoinDynamicDef, ForkJoinTaskDef, HttpInputParameters, HttpTaskDef, InlineTaskDef, InlineTaskInputParameters, JoinTaskDef, JsonJQTransformTaskDef, KafkaPublishInputParameters, KafkaPublishTaskDef, OnCancel, OpenAPIConfig, OrkesApiConfig, RequestType, RerunWorkflowRequest, RunnerArgs, SetVariableTaskDef, SimpleTaskDef, SkipTaskRequest, StartWorkflowRequest, SubWorkflowTaskDef, SwitchTaskDef, TaskDefTypes, TaskErrorHandler, TaskManager, TaskManagerConfig, TaskManagerOptions, TaskResult, TaskRunner, TaskType, TerminateTaskDef, WaitTaskDef, WorkflowDef, WorkflowExecutor, WorkflowInputParameters, conductorEventTask, doWhileTask, dynamicForkTask, eventTask, forkTask, forkTaskJoin, generate, generateDoWhileTask, generateEventTask, generateForkJoinTask, generateHTTPTask, generateInlineTask, generateJQTransformTask, generateJoinTask, generateKafkaPublishTask, generateSetVariableTask, generateSimpleTask, generateSubWorkflowTask, generateSwitchTask, generateTerminateTask, generateWaitTask, httpTask, inlineTask, joinTask, jsonJqTask, kafkaPublishTask, newLoopTask, noopErrorHandler, orkesConductorClient, setVariableTask, simpleTask, sqsEventTask, subWorkflowTask, switchTask, taskGenMapper, terminateTask, waitTaskDuration, waitTaskUntil, workflow };
2170
+ export { Action, ApiError, AssignmentPolicy, BackToAssigment, BaseHttpRequest, CancelError, CancelablePromise, ClearAssigment, CommonTaskDef, ConductorClient, ConductorError, ConductorHttpRequest, ConductorLogLevel, ConductorLogger, ConductorWorker, DefaultLogger, DefaultLoggerConfig, DoWhileTaskDef, Escalate, EventHandler, EventResourceService, EventTaskDef, ExternalStorageLocation, FFAAssignment, Fixed, ForkJoinDynamicDef, ForkJoinTaskDef, GenerateTokenRequest, HTScrollableSearchResultHumanTaskEntry, HealthCheckResourceService, HttpInputParameters, HttpTaskDef, HumanExecutor, HumanTaskActionLogEntry, HumanTaskEntry, HumanTaskLoad, HumanTaskStateLogEntry, HumanTaskTemplate, HumanTaskTemplateEntry, InlineTaskDef, InlineTaskInputParameters, JoinTaskDef, JsonJQTransformTaskDef, KafkaPublishInputParameters, KafkaPublishTaskDef, LeastBusyGroupMemberAssignment, MetadataResourceService, Never, OnCancel, OpenAPIConfig, OrkesApiConfig, PollData, RequestType, RerunWorkflowRequest, Response, RunnerArgs, SaveScheduleRequest, SchedulerResourceService, ScrollableSearchResultWorkflowSummary, SearchResultHumanTaskEntry, SearchResultTask, SearchResultTaskSummary, SearchResultWorkflow, SearchResultWorkflowScheduleExecutionModel, SearchResultWorkflowSummary, SetVariableTaskDef, SimpleTaskDef, SkipTaskRequest, StartWorkflow, StartWorkflowRequest, SubWorkflowParams, SubWorkflowTaskDef, SwitchTaskDef, Task, TaskDef, TaskDefTypes, TaskDetails, TaskErrorHandler, TaskExecLog, TaskManager, TaskManagerConfig, TaskManagerOptions, TaskResourceService, TaskResult, TaskResultStatus, TaskRunner, TaskSummary, TaskType, Terminate, TerminateTaskDef, TimeoutPolicy, TokenResourceService, WaitTaskDef, Workflow, WorkflowBulkResourceService, WorkflowDef, WorkflowExecutor, WorkflowResourceService, WorkflowSchedule, WorkflowScheduleExecutionModel, WorkflowStatus, WorkflowSummary, WorkflowTask, conductorEventTask, doWhileTask, dynamicForkTask, eventTask, forkTask, forkTaskJoin, generate, generateDoWhileTask, generateEventTask, generateForkJoinTask, generateHTTPTask, generateInlineTask, generateJQTransformTask, generateJoinTask, generateKafkaPublishTask, generateSetVariableTask, generateSimpleTask, generateSubWorkflowTask, generateSwitchTask, generateTerminateTask, generateWaitTask, httpTask, inlineTask, joinTask, jsonJqTask, kafkaPublishTask, newLoopTask, noopErrorHandler, orkesConductorClient, setVariableTask, simpleTask, sqsEventTask, subWorkflowTask, switchTask, taskGenMapper, terminateTask, waitTaskDuration, waitTaskUntil, workflow };