@io-orkes/conductor-javascript 2.1.3-alpha1 → 2.1.3
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 +52 -16
- package/dist/index.d.ts +52 -16
- package/dist/index.js +32 -20
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +32 -20
- package/dist/index.mjs.map +1 -1
- package/package.json +11 -2
package/dist/index.mjs
CHANGED
|
@@ -1484,6 +1484,20 @@ var WorkflowResourceService = class {
|
|
|
1484
1484
|
}
|
|
1485
1485
|
});
|
|
1486
1486
|
}
|
|
1487
|
+
/**
|
|
1488
|
+
* Test workflow execution using mock data
|
|
1489
|
+
* @param requestBody
|
|
1490
|
+
* @returns Workflow OK
|
|
1491
|
+
* @throws ApiError
|
|
1492
|
+
*/
|
|
1493
|
+
testWorkflow(requestBody) {
|
|
1494
|
+
return this.httpRequest.request({
|
|
1495
|
+
method: "POST",
|
|
1496
|
+
url: "/workflow/test",
|
|
1497
|
+
body: requestBody,
|
|
1498
|
+
mediaType: "application/json"
|
|
1499
|
+
});
|
|
1500
|
+
}
|
|
1487
1501
|
};
|
|
1488
1502
|
|
|
1489
1503
|
// src/common/open-api/core/ApiError.ts
|
|
@@ -1907,13 +1921,12 @@ var HumanTaskService = class {
|
|
|
1907
1921
|
* @returns HumanTaskEntry OK
|
|
1908
1922
|
* @throws ApiError
|
|
1909
1923
|
*/
|
|
1910
|
-
getTask1(taskId
|
|
1924
|
+
getTask1(taskId) {
|
|
1911
1925
|
return this.httpRequest.request({
|
|
1912
1926
|
method: "GET",
|
|
1913
1927
|
url: "/human/tasks/{taskId}",
|
|
1914
1928
|
path: {
|
|
1915
|
-
"taskId": taskId
|
|
1916
|
-
withTemplate
|
|
1929
|
+
"taskId": taskId
|
|
1917
1930
|
}
|
|
1918
1931
|
});
|
|
1919
1932
|
}
|
|
@@ -3024,10 +3037,8 @@ var HumanExecutor = class {
|
|
|
3024
3037
|
* @param taskId
|
|
3025
3038
|
* @returns
|
|
3026
3039
|
*/
|
|
3027
|
-
getTaskById(taskId
|
|
3028
|
-
return tryCatchReThrow(
|
|
3029
|
-
() => this._client.humanTask.getTask1(taskId, withTemplate)
|
|
3030
|
-
);
|
|
3040
|
+
getTaskById(taskId) {
|
|
3041
|
+
return tryCatchReThrow(() => this._client.humanTask.getTask1(taskId));
|
|
3031
3042
|
}
|
|
3032
3043
|
/**
|
|
3033
3044
|
* Assigns taskId to assignee. If the task is already assigned to another user, this will fail.
|
|
@@ -3037,12 +3048,7 @@ var HumanExecutor = class {
|
|
|
3037
3048
|
*/
|
|
3038
3049
|
async claimTaskAsExternalUser(taskId, assignee, options) {
|
|
3039
3050
|
return tryCatchReThrow(
|
|
3040
|
-
() => this._client.humanTask.assignAndClaim(
|
|
3041
|
-
taskId,
|
|
3042
|
-
assignee,
|
|
3043
|
-
options?.overrideAssignment,
|
|
3044
|
-
options?.withTemplate
|
|
3045
|
-
)
|
|
3051
|
+
() => this._client.humanTask.assignAndClaim(taskId, assignee, options?.overrideAssignment, options?.withTemplate)
|
|
3046
3052
|
);
|
|
3047
3053
|
}
|
|
3048
3054
|
/**
|
|
@@ -3051,13 +3057,7 @@ var HumanExecutor = class {
|
|
|
3051
3057
|
* @returns
|
|
3052
3058
|
*/
|
|
3053
3059
|
async claimTaskAsConductorUser(taskId, options) {
|
|
3054
|
-
return tryCatchReThrow(
|
|
3055
|
-
() => this._client.humanTask.claimTask(
|
|
3056
|
-
taskId,
|
|
3057
|
-
options?.overrideAssignment,
|
|
3058
|
-
options?.withTemplate
|
|
3059
|
-
)
|
|
3060
|
-
);
|
|
3060
|
+
return tryCatchReThrow(() => this._client.humanTask.claimTask(taskId, options?.overrideAssignment, options?.withTemplate));
|
|
3061
3061
|
}
|
|
3062
3062
|
/**
|
|
3063
3063
|
* Claim task as conductor user
|
|
@@ -3897,6 +3897,18 @@ var MetadataClient = class {
|
|
|
3897
3897
|
() => this._client.metadataResource.updateTaskDef(taskDef)
|
|
3898
3898
|
);
|
|
3899
3899
|
}
|
|
3900
|
+
/**
|
|
3901
|
+
* Creates or updates (overwrite: true) a workflow definition
|
|
3902
|
+
*
|
|
3903
|
+
* @param workflowDef
|
|
3904
|
+
* @param overwrite
|
|
3905
|
+
* @returns
|
|
3906
|
+
*/
|
|
3907
|
+
registerWorkflowDef(workflowDef, overwrite = false) {
|
|
3908
|
+
return tryCatchReThrow(
|
|
3909
|
+
() => this._client.metadataResource.create(workflowDef, overwrite)
|
|
3910
|
+
);
|
|
3911
|
+
}
|
|
3900
3912
|
};
|
|
3901
3913
|
|
|
3902
3914
|
// src/orkes/BaseOrkesConductorClient.ts
|