@io-orkes/conductor-javascript 2.1.3-alpha2 → 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 +54 -22
- package/dist/index.d.ts +54 -22
- package/dist/index.js +59 -49
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +59 -49
- 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
|
|
@@ -1859,7 +1873,7 @@ var HumanTaskService = class {
|
|
|
1859
1873
|
method: "DELETE",
|
|
1860
1874
|
url: "/human/tasks/delete/{taskId}",
|
|
1861
1875
|
path: {
|
|
1862
|
-
taskId
|
|
1876
|
+
"taskId": taskId
|
|
1863
1877
|
}
|
|
1864
1878
|
});
|
|
1865
1879
|
}
|
|
@@ -1892,10 +1906,10 @@ var HumanTaskService = class {
|
|
|
1892
1906
|
method: "POST",
|
|
1893
1907
|
url: "/human/tasks/update/taskRef",
|
|
1894
1908
|
query: {
|
|
1895
|
-
workflowId,
|
|
1896
|
-
taskRefName,
|
|
1897
|
-
complete,
|
|
1898
|
-
iteration
|
|
1909
|
+
"workflowId": workflowId,
|
|
1910
|
+
"taskRefName": taskRefName,
|
|
1911
|
+
"complete": complete,
|
|
1912
|
+
"iteration": iteration
|
|
1899
1913
|
},
|
|
1900
1914
|
body: requestBody,
|
|
1901
1915
|
mediaType: "application/json"
|
|
@@ -1907,15 +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
|
|
1916
|
-
},
|
|
1917
|
-
query: {
|
|
1918
|
-
withTemplate
|
|
1929
|
+
"taskId": taskId
|
|
1919
1930
|
}
|
|
1920
1931
|
});
|
|
1921
1932
|
}
|
|
@@ -1931,11 +1942,11 @@ var HumanTaskService = class {
|
|
|
1931
1942
|
method: "POST",
|
|
1932
1943
|
url: "/human/tasks/{taskId}/claim",
|
|
1933
1944
|
path: {
|
|
1934
|
-
taskId
|
|
1945
|
+
"taskId": taskId
|
|
1935
1946
|
},
|
|
1936
1947
|
query: {
|
|
1937
|
-
overrideAssignment,
|
|
1938
|
-
withTemplate
|
|
1948
|
+
"overrideAssignment": overrideAssignment,
|
|
1949
|
+
"withTemplate": withTemplate
|
|
1939
1950
|
}
|
|
1940
1951
|
});
|
|
1941
1952
|
}
|
|
@@ -1952,12 +1963,12 @@ var HumanTaskService = class {
|
|
|
1952
1963
|
method: "POST",
|
|
1953
1964
|
url: "/human/tasks/{taskId}/externalUser/{userId}",
|
|
1954
1965
|
path: {
|
|
1955
|
-
taskId,
|
|
1956
|
-
userId
|
|
1966
|
+
"taskId": taskId,
|
|
1967
|
+
"userId": userId
|
|
1957
1968
|
},
|
|
1958
1969
|
query: {
|
|
1959
|
-
overrideAssignment,
|
|
1960
|
-
withTemplate
|
|
1970
|
+
"overrideAssignment": overrideAssignment,
|
|
1971
|
+
"withTemplate": withTemplate
|
|
1961
1972
|
}
|
|
1962
1973
|
});
|
|
1963
1974
|
}
|
|
@@ -1973,7 +1984,7 @@ var HumanTaskService = class {
|
|
|
1973
1984
|
method: "POST",
|
|
1974
1985
|
url: "/human/tasks/{taskId}/reassign",
|
|
1975
1986
|
path: {
|
|
1976
|
-
taskId
|
|
1987
|
+
"taskId": taskId
|
|
1977
1988
|
},
|
|
1978
1989
|
body: requestBody,
|
|
1979
1990
|
mediaType: "application/json"
|
|
@@ -1990,7 +2001,7 @@ var HumanTaskService = class {
|
|
|
1990
2001
|
method: "POST",
|
|
1991
2002
|
url: "/human/tasks/{taskId}/release",
|
|
1992
2003
|
path: {
|
|
1993
|
-
taskId
|
|
2004
|
+
"taskId": taskId
|
|
1994
2005
|
}
|
|
1995
2006
|
});
|
|
1996
2007
|
}
|
|
@@ -2006,10 +2017,10 @@ var HumanTaskService = class {
|
|
|
2006
2017
|
method: "POST",
|
|
2007
2018
|
url: "/human/tasks/{taskId}/skip",
|
|
2008
2019
|
path: {
|
|
2009
|
-
taskId
|
|
2020
|
+
"taskId": taskId
|
|
2010
2021
|
},
|
|
2011
2022
|
query: {
|
|
2012
|
-
reason
|
|
2023
|
+
"reason": reason
|
|
2013
2024
|
}
|
|
2014
2025
|
});
|
|
2015
2026
|
}
|
|
@@ -2026,10 +2037,10 @@ var HumanTaskService = class {
|
|
|
2026
2037
|
method: "POST",
|
|
2027
2038
|
url: "/human/tasks/{taskId}/update",
|
|
2028
2039
|
path: {
|
|
2029
|
-
taskId
|
|
2040
|
+
"taskId": taskId
|
|
2030
2041
|
},
|
|
2031
2042
|
query: {
|
|
2032
|
-
complete
|
|
2043
|
+
"complete": complete
|
|
2033
2044
|
},
|
|
2034
2045
|
body: requestBody,
|
|
2035
2046
|
mediaType: "application/json"
|
|
@@ -2047,8 +2058,8 @@ var HumanTaskService = class {
|
|
|
2047
2058
|
method: "GET",
|
|
2048
2059
|
url: "/human/template",
|
|
2049
2060
|
query: {
|
|
2050
|
-
name,
|
|
2051
|
-
version
|
|
2061
|
+
"name": name,
|
|
2062
|
+
"version": version
|
|
2052
2063
|
}
|
|
2053
2064
|
});
|
|
2054
2065
|
}
|
|
@@ -2064,7 +2075,7 @@ var HumanTaskService = class {
|
|
|
2064
2075
|
method: "POST",
|
|
2065
2076
|
url: "/human/template",
|
|
2066
2077
|
query: {
|
|
2067
|
-
newVersion
|
|
2078
|
+
"newVersion": newVersion
|
|
2068
2079
|
},
|
|
2069
2080
|
body: requestBody,
|
|
2070
2081
|
mediaType: "application/json"
|
|
@@ -2082,7 +2093,7 @@ var HumanTaskService = class {
|
|
|
2082
2093
|
method: "POST",
|
|
2083
2094
|
url: "/human/template/bulk",
|
|
2084
2095
|
query: {
|
|
2085
|
-
newVersion
|
|
2096
|
+
"newVersion": newVersion
|
|
2086
2097
|
},
|
|
2087
2098
|
body: requestBody,
|
|
2088
2099
|
mediaType: "application/json"
|
|
@@ -2099,7 +2110,7 @@ var HumanTaskService = class {
|
|
|
2099
2110
|
method: "DELETE",
|
|
2100
2111
|
url: "/human/template/{name}",
|
|
2101
2112
|
path: {
|
|
2102
|
-
name
|
|
2113
|
+
"name": name
|
|
2103
2114
|
}
|
|
2104
2115
|
});
|
|
2105
2116
|
}
|
|
@@ -2115,8 +2126,8 @@ var HumanTaskService = class {
|
|
|
2115
2126
|
method: "DELETE",
|
|
2116
2127
|
url: "/human/template/{name}/{version}",
|
|
2117
2128
|
path: {
|
|
2118
|
-
name,
|
|
2119
|
-
version
|
|
2129
|
+
"name": name,
|
|
2130
|
+
"version": version
|
|
2120
2131
|
}
|
|
2121
2132
|
});
|
|
2122
2133
|
}
|
|
@@ -2132,8 +2143,8 @@ var HumanTaskService = class {
|
|
|
2132
2143
|
method: "GET",
|
|
2133
2144
|
url: "/human/template/{name}/{version}",
|
|
2134
2145
|
path: {
|
|
2135
|
-
name,
|
|
2136
|
-
version
|
|
2146
|
+
"name": name,
|
|
2147
|
+
"version": version
|
|
2137
2148
|
}
|
|
2138
2149
|
});
|
|
2139
2150
|
}
|
|
@@ -3026,10 +3037,8 @@ var HumanExecutor = class {
|
|
|
3026
3037
|
* @param taskId
|
|
3027
3038
|
* @returns
|
|
3028
3039
|
*/
|
|
3029
|
-
getTaskById(taskId
|
|
3030
|
-
return tryCatchReThrow(
|
|
3031
|
-
() => this._client.humanTask.getTask1(taskId, withTemplate)
|
|
3032
|
-
);
|
|
3040
|
+
getTaskById(taskId) {
|
|
3041
|
+
return tryCatchReThrow(() => this._client.humanTask.getTask1(taskId));
|
|
3033
3042
|
}
|
|
3034
3043
|
/**
|
|
3035
3044
|
* Assigns taskId to assignee. If the task is already assigned to another user, this will fail.
|
|
@@ -3039,12 +3048,7 @@ var HumanExecutor = class {
|
|
|
3039
3048
|
*/
|
|
3040
3049
|
async claimTaskAsExternalUser(taskId, assignee, options) {
|
|
3041
3050
|
return tryCatchReThrow(
|
|
3042
|
-
() => this._client.humanTask.assignAndClaim(
|
|
3043
|
-
taskId,
|
|
3044
|
-
assignee,
|
|
3045
|
-
options?.overrideAssignment,
|
|
3046
|
-
options?.withTemplate
|
|
3047
|
-
)
|
|
3051
|
+
() => this._client.humanTask.assignAndClaim(taskId, assignee, options?.overrideAssignment, options?.withTemplate)
|
|
3048
3052
|
);
|
|
3049
3053
|
}
|
|
3050
3054
|
/**
|
|
@@ -3053,13 +3057,7 @@ var HumanExecutor = class {
|
|
|
3053
3057
|
* @returns
|
|
3054
3058
|
*/
|
|
3055
3059
|
async claimTaskAsConductorUser(taskId, options) {
|
|
3056
|
-
return tryCatchReThrow(
|
|
3057
|
-
() => this._client.humanTask.claimTask(
|
|
3058
|
-
taskId,
|
|
3059
|
-
options?.overrideAssignment,
|
|
3060
|
-
options?.withTemplate
|
|
3061
|
-
)
|
|
3062
|
-
);
|
|
3060
|
+
return tryCatchReThrow(() => this._client.humanTask.claimTask(taskId, options?.overrideAssignment, options?.withTemplate));
|
|
3063
3061
|
}
|
|
3064
3062
|
/**
|
|
3065
3063
|
* Claim task as conductor user
|
|
@@ -3899,6 +3897,18 @@ var MetadataClient = class {
|
|
|
3899
3897
|
() => this._client.metadataResource.updateTaskDef(taskDef)
|
|
3900
3898
|
);
|
|
3901
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
|
+
}
|
|
3902
3912
|
};
|
|
3903
3913
|
|
|
3904
3914
|
// src/orkes/BaseOrkesConductorClient.ts
|