@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 CHANGED
@@ -933,6 +933,29 @@ declare type WorkflowStatus = {
933
933
  status?: 'RUNNING' | 'COMPLETED' | 'FAILED' | 'TIMED_OUT' | 'TERMINATED' | 'PAUSED';
934
934
  };
935
935
 
936
+ declare type TaskMock = {
937
+ executionTime?: number;
938
+ output: Record<string, any>;
939
+ queueWaitTime?: number;
940
+ status: "IN_PROGRESS" | "FAILED" | "FAILED_WITH_TERMINAL_ERROR" | "COMPLETED";
941
+ };
942
+
943
+ declare type WorkflowTestRequest = {
944
+ correlationId?: string;
945
+ createdBy?: string;
946
+ externalInputPayloadStoragePath?: string;
947
+ idempotencyKey?: string;
948
+ idempotencyStrategy?: "FAIL" | "RETURN_EXISTING";
949
+ input?: Record<string, Record<string, any>>;
950
+ name: string;
951
+ priority?: number;
952
+ subWorkflowTestRequest?: Record<string, WorkflowTestRequest>;
953
+ taskRefToMockOutput?: Record<string, Array<TaskMock>>;
954
+ taskToDomain?: Record<string, string>;
955
+ version?: number;
956
+ workflowDef?: WorkflowDef$1;
957
+ };
958
+
936
959
  declare class WorkflowResourceService {
937
960
  readonly httpRequest: BaseHttpRequest;
938
961
  constructor(httpRequest: BaseHttpRequest);
@@ -1149,6 +1172,13 @@ declare class WorkflowResourceService {
1149
1172
  * @throws ApiError
1150
1173
  */
1151
1174
  resetWorkflow(workflowId: string): CancelablePromise<void>;
1175
+ /**
1176
+ * Test workflow execution using mock data
1177
+ * @param requestBody
1178
+ * @returns Workflow OK
1179
+ * @throws ApiError
1180
+ */
1181
+ testWorkflow(requestBody: WorkflowTestRequest): CancelablePromise<Workflow>;
1152
1182
  }
1153
1183
 
1154
1184
  /**
@@ -1192,17 +1222,6 @@ declare type HumanTaskAssignment = {
1192
1222
  slaMinutes?: number;
1193
1223
  };
1194
1224
 
1195
- declare type HumanTaskTemplate = {
1196
- createdBy?: string;
1197
- createdOn?: number;
1198
- jsonSchema: Record<string, any>;
1199
- name: string;
1200
- templateUI: Record<string, any>;
1201
- updatedBy?: string;
1202
- updatedOn?: number;
1203
- version: number;
1204
- };
1205
-
1206
1225
  declare type HumanTaskTrigger = {
1207
1226
  startWorkflowRequest?: StartWorkflowRequest;
1208
1227
  triggerType?: 'ASSIGNEE_CHANGED' | 'PENDING' | 'IN_PROGRESS' | 'ASSIGNED' | 'COMPLETED' | 'TIMED_OUT';
@@ -1214,11 +1233,10 @@ declare type UserFormTemplate = {
1214
1233
  };
1215
1234
 
1216
1235
  declare type HumanTaskDefinition = {
1217
- assignmentCompletionStrategy?: "LEAVE_OPEN" | "TERMINATE";
1236
+ assignmentCompletionStrategy?: 'LEAVE_OPEN' | 'TERMINATE';
1218
1237
  assignments?: Array<HumanTaskAssignment>;
1219
1238
  taskTriggers?: Array<HumanTaskTrigger>;
1220
1239
  userFormTemplate?: UserFormTemplate;
1221
- fullTemplate?: HumanTaskTemplate;
1222
1240
  };
1223
1241
 
1224
1242
  declare type HumanTaskEntry = {
@@ -1251,7 +1269,6 @@ declare type HumanTaskSearch = {
1251
1269
  start?: number;
1252
1270
  states?: Array<'PENDING' | 'ASSIGNED' | 'IN_PROGRESS' | 'COMPLETED' | 'TIMED_OUT' | 'DELETED'>;
1253
1271
  taskRefNames?: Array<string>;
1254
- workflowIds?: Array<string>;
1255
1272
  workflowNames?: Array<string>;
1256
1273
  };
1257
1274
 
@@ -1260,6 +1277,17 @@ declare type HumanTaskSearchResult = {
1260
1277
  totalHits?: number;
1261
1278
  };
1262
1279
 
1280
+ declare type HumanTaskTemplate = {
1281
+ createdBy?: string;
1282
+ createdOn?: number;
1283
+ jsonSchema: Record<string, any>;
1284
+ name: string;
1285
+ templateUI: Record<string, any>;
1286
+ updatedBy?: string;
1287
+ updatedOn?: number;
1288
+ version: number;
1289
+ };
1290
+
1263
1291
  declare class HumanTaskService {
1264
1292
  readonly httpRequest: BaseHttpRequest;
1265
1293
  constructor(httpRequest: BaseHttpRequest);
@@ -1301,7 +1329,7 @@ declare class HumanTaskService {
1301
1329
  * @returns HumanTaskEntry OK
1302
1330
  * @throws ApiError
1303
1331
  */
1304
- getTask1(taskId: string, withTemplate?: boolean): CancelablePromise<HumanTaskEntry>;
1332
+ getTask1(taskId: string): CancelablePromise<HumanTaskEntry>;
1305
1333
  /**
1306
1334
  * Claim a task by authenticated Conductor user
1307
1335
  * @param taskId
@@ -1918,10 +1946,6 @@ declare type PollIntervalOptions = {
1918
1946
  pollInterval: number;
1919
1947
  maxPollTimes: number;
1920
1948
  };
1921
- declare type ClaimOptions = {
1922
- overrideAssignment: boolean;
1923
- withTemplate: boolean;
1924
- };
1925
1949
  declare class HumanExecutor {
1926
1950
  readonly _client: ConductorClient;
1927
1951
  constructor(client: ConductorClient);
@@ -1967,20 +1991,20 @@ declare class HumanExecutor {
1967
1991
  * @param taskId
1968
1992
  * @returns
1969
1993
  */
1970
- getTaskById(taskId: string, withTemplate?: boolean): Promise<HumanTaskEntry>;
1994
+ getTaskById(taskId: string): Promise<HumanTaskEntry>;
1971
1995
  /**
1972
1996
  * Assigns taskId to assignee. If the task is already assigned to another user, this will fail.
1973
1997
  * @param taskId
1974
1998
  * @param assignee
1975
1999
  * @returns
1976
2000
  */
1977
- claimTaskAsExternalUser(taskId: string, assignee: string, options?: ClaimOptions): Promise<HumanTaskEntry>;
2001
+ claimTaskAsExternalUser(taskId: string, assignee: string, options?: Record<string, boolean>): Promise<HumanTaskEntry>;
1978
2002
  /**
1979
2003
  * Claim task as conductor user
1980
2004
  * @param taskId
1981
2005
  * @returns
1982
2006
  */
1983
- claimTaskAsConductorUser(taskId: string, options?: ClaimOptions): Promise<HumanTaskEntry>;
2007
+ claimTaskAsConductorUser(taskId: string, options?: Record<string, boolean>): Promise<HumanTaskEntry>;
1984
2008
  /**
1985
2009
  * Claim task as conductor user
1986
2010
  * @param taskId
@@ -2362,6 +2386,14 @@ declare class MetadataClient {
2362
2386
  * @returns
2363
2387
  */
2364
2388
  updateTask(taskDef: TaskDef): Promise<void>;
2389
+ /**
2390
+ * Creates or updates (overwrite: true) a workflow definition
2391
+ *
2392
+ * @param workflowDef
2393
+ * @param overwrite
2394
+ * @returns
2395
+ */
2396
+ registerWorkflowDef(workflowDef: WorkflowDef$1, overwrite?: boolean): any;
2365
2397
  }
2366
2398
 
2367
2399
  declare type FetchFn<T = RequestInit, R extends {
package/dist/index.d.ts CHANGED
@@ -933,6 +933,29 @@ declare type WorkflowStatus = {
933
933
  status?: 'RUNNING' | 'COMPLETED' | 'FAILED' | 'TIMED_OUT' | 'TERMINATED' | 'PAUSED';
934
934
  };
935
935
 
936
+ declare type TaskMock = {
937
+ executionTime?: number;
938
+ output: Record<string, any>;
939
+ queueWaitTime?: number;
940
+ status: "IN_PROGRESS" | "FAILED" | "FAILED_WITH_TERMINAL_ERROR" | "COMPLETED";
941
+ };
942
+
943
+ declare type WorkflowTestRequest = {
944
+ correlationId?: string;
945
+ createdBy?: string;
946
+ externalInputPayloadStoragePath?: string;
947
+ idempotencyKey?: string;
948
+ idempotencyStrategy?: "FAIL" | "RETURN_EXISTING";
949
+ input?: Record<string, Record<string, any>>;
950
+ name: string;
951
+ priority?: number;
952
+ subWorkflowTestRequest?: Record<string, WorkflowTestRequest>;
953
+ taskRefToMockOutput?: Record<string, Array<TaskMock>>;
954
+ taskToDomain?: Record<string, string>;
955
+ version?: number;
956
+ workflowDef?: WorkflowDef$1;
957
+ };
958
+
936
959
  declare class WorkflowResourceService {
937
960
  readonly httpRequest: BaseHttpRequest;
938
961
  constructor(httpRequest: BaseHttpRequest);
@@ -1149,6 +1172,13 @@ declare class WorkflowResourceService {
1149
1172
  * @throws ApiError
1150
1173
  */
1151
1174
  resetWorkflow(workflowId: string): CancelablePromise<void>;
1175
+ /**
1176
+ * Test workflow execution using mock data
1177
+ * @param requestBody
1178
+ * @returns Workflow OK
1179
+ * @throws ApiError
1180
+ */
1181
+ testWorkflow(requestBody: WorkflowTestRequest): CancelablePromise<Workflow>;
1152
1182
  }
1153
1183
 
1154
1184
  /**
@@ -1192,17 +1222,6 @@ declare type HumanTaskAssignment = {
1192
1222
  slaMinutes?: number;
1193
1223
  };
1194
1224
 
1195
- declare type HumanTaskTemplate = {
1196
- createdBy?: string;
1197
- createdOn?: number;
1198
- jsonSchema: Record<string, any>;
1199
- name: string;
1200
- templateUI: Record<string, any>;
1201
- updatedBy?: string;
1202
- updatedOn?: number;
1203
- version: number;
1204
- };
1205
-
1206
1225
  declare type HumanTaskTrigger = {
1207
1226
  startWorkflowRequest?: StartWorkflowRequest;
1208
1227
  triggerType?: 'ASSIGNEE_CHANGED' | 'PENDING' | 'IN_PROGRESS' | 'ASSIGNED' | 'COMPLETED' | 'TIMED_OUT';
@@ -1214,11 +1233,10 @@ declare type UserFormTemplate = {
1214
1233
  };
1215
1234
 
1216
1235
  declare type HumanTaskDefinition = {
1217
- assignmentCompletionStrategy?: "LEAVE_OPEN" | "TERMINATE";
1236
+ assignmentCompletionStrategy?: 'LEAVE_OPEN' | 'TERMINATE';
1218
1237
  assignments?: Array<HumanTaskAssignment>;
1219
1238
  taskTriggers?: Array<HumanTaskTrigger>;
1220
1239
  userFormTemplate?: UserFormTemplate;
1221
- fullTemplate?: HumanTaskTemplate;
1222
1240
  };
1223
1241
 
1224
1242
  declare type HumanTaskEntry = {
@@ -1251,7 +1269,6 @@ declare type HumanTaskSearch = {
1251
1269
  start?: number;
1252
1270
  states?: Array<'PENDING' | 'ASSIGNED' | 'IN_PROGRESS' | 'COMPLETED' | 'TIMED_OUT' | 'DELETED'>;
1253
1271
  taskRefNames?: Array<string>;
1254
- workflowIds?: Array<string>;
1255
1272
  workflowNames?: Array<string>;
1256
1273
  };
1257
1274
 
@@ -1260,6 +1277,17 @@ declare type HumanTaskSearchResult = {
1260
1277
  totalHits?: number;
1261
1278
  };
1262
1279
 
1280
+ declare type HumanTaskTemplate = {
1281
+ createdBy?: string;
1282
+ createdOn?: number;
1283
+ jsonSchema: Record<string, any>;
1284
+ name: string;
1285
+ templateUI: Record<string, any>;
1286
+ updatedBy?: string;
1287
+ updatedOn?: number;
1288
+ version: number;
1289
+ };
1290
+
1263
1291
  declare class HumanTaskService {
1264
1292
  readonly httpRequest: BaseHttpRequest;
1265
1293
  constructor(httpRequest: BaseHttpRequest);
@@ -1301,7 +1329,7 @@ declare class HumanTaskService {
1301
1329
  * @returns HumanTaskEntry OK
1302
1330
  * @throws ApiError
1303
1331
  */
1304
- getTask1(taskId: string, withTemplate?: boolean): CancelablePromise<HumanTaskEntry>;
1332
+ getTask1(taskId: string): CancelablePromise<HumanTaskEntry>;
1305
1333
  /**
1306
1334
  * Claim a task by authenticated Conductor user
1307
1335
  * @param taskId
@@ -1918,10 +1946,6 @@ declare type PollIntervalOptions = {
1918
1946
  pollInterval: number;
1919
1947
  maxPollTimes: number;
1920
1948
  };
1921
- declare type ClaimOptions = {
1922
- overrideAssignment: boolean;
1923
- withTemplate: boolean;
1924
- };
1925
1949
  declare class HumanExecutor {
1926
1950
  readonly _client: ConductorClient;
1927
1951
  constructor(client: ConductorClient);
@@ -1967,20 +1991,20 @@ declare class HumanExecutor {
1967
1991
  * @param taskId
1968
1992
  * @returns
1969
1993
  */
1970
- getTaskById(taskId: string, withTemplate?: boolean): Promise<HumanTaskEntry>;
1994
+ getTaskById(taskId: string): Promise<HumanTaskEntry>;
1971
1995
  /**
1972
1996
  * Assigns taskId to assignee. If the task is already assigned to another user, this will fail.
1973
1997
  * @param taskId
1974
1998
  * @param assignee
1975
1999
  * @returns
1976
2000
  */
1977
- claimTaskAsExternalUser(taskId: string, assignee: string, options?: ClaimOptions): Promise<HumanTaskEntry>;
2001
+ claimTaskAsExternalUser(taskId: string, assignee: string, options?: Record<string, boolean>): Promise<HumanTaskEntry>;
1978
2002
  /**
1979
2003
  * Claim task as conductor user
1980
2004
  * @param taskId
1981
2005
  * @returns
1982
2006
  */
1983
- claimTaskAsConductorUser(taskId: string, options?: ClaimOptions): Promise<HumanTaskEntry>;
2007
+ claimTaskAsConductorUser(taskId: string, options?: Record<string, boolean>): Promise<HumanTaskEntry>;
1984
2008
  /**
1985
2009
  * Claim task as conductor user
1986
2010
  * @param taskId
@@ -2362,6 +2386,14 @@ declare class MetadataClient {
2362
2386
  * @returns
2363
2387
  */
2364
2388
  updateTask(taskDef: TaskDef): Promise<void>;
2389
+ /**
2390
+ * Creates or updates (overwrite: true) a workflow definition
2391
+ *
2392
+ * @param workflowDef
2393
+ * @param overwrite
2394
+ * @returns
2395
+ */
2396
+ registerWorkflowDef(workflowDef: WorkflowDef$1, overwrite?: boolean): any;
2365
2397
  }
2366
2398
 
2367
2399
  declare type FetchFn<T = RequestInit, R extends {
package/dist/index.js CHANGED
@@ -1589,6 +1589,20 @@ var WorkflowResourceService = class {
1589
1589
  }
1590
1590
  });
1591
1591
  }
1592
+ /**
1593
+ * Test workflow execution using mock data
1594
+ * @param requestBody
1595
+ * @returns Workflow OK
1596
+ * @throws ApiError
1597
+ */
1598
+ testWorkflow(requestBody) {
1599
+ return this.httpRequest.request({
1600
+ method: "POST",
1601
+ url: "/workflow/test",
1602
+ body: requestBody,
1603
+ mediaType: "application/json"
1604
+ });
1605
+ }
1592
1606
  };
1593
1607
 
1594
1608
  // src/common/open-api/core/ApiError.ts
@@ -1964,7 +1978,7 @@ var HumanTaskService = class {
1964
1978
  method: "DELETE",
1965
1979
  url: "/human/tasks/delete/{taskId}",
1966
1980
  path: {
1967
- taskId
1981
+ "taskId": taskId
1968
1982
  }
1969
1983
  });
1970
1984
  }
@@ -1997,10 +2011,10 @@ var HumanTaskService = class {
1997
2011
  method: "POST",
1998
2012
  url: "/human/tasks/update/taskRef",
1999
2013
  query: {
2000
- workflowId,
2001
- taskRefName,
2002
- complete,
2003
- iteration
2014
+ "workflowId": workflowId,
2015
+ "taskRefName": taskRefName,
2016
+ "complete": complete,
2017
+ "iteration": iteration
2004
2018
  },
2005
2019
  body: requestBody,
2006
2020
  mediaType: "application/json"
@@ -2012,15 +2026,12 @@ var HumanTaskService = class {
2012
2026
  * @returns HumanTaskEntry OK
2013
2027
  * @throws ApiError
2014
2028
  */
2015
- getTask1(taskId, withTemplate = false) {
2029
+ getTask1(taskId) {
2016
2030
  return this.httpRequest.request({
2017
2031
  method: "GET",
2018
2032
  url: "/human/tasks/{taskId}",
2019
2033
  path: {
2020
- taskId
2021
- },
2022
- query: {
2023
- withTemplate
2034
+ "taskId": taskId
2024
2035
  }
2025
2036
  });
2026
2037
  }
@@ -2036,11 +2047,11 @@ var HumanTaskService = class {
2036
2047
  method: "POST",
2037
2048
  url: "/human/tasks/{taskId}/claim",
2038
2049
  path: {
2039
- taskId
2050
+ "taskId": taskId
2040
2051
  },
2041
2052
  query: {
2042
- overrideAssignment,
2043
- withTemplate
2053
+ "overrideAssignment": overrideAssignment,
2054
+ "withTemplate": withTemplate
2044
2055
  }
2045
2056
  });
2046
2057
  }
@@ -2057,12 +2068,12 @@ var HumanTaskService = class {
2057
2068
  method: "POST",
2058
2069
  url: "/human/tasks/{taskId}/externalUser/{userId}",
2059
2070
  path: {
2060
- taskId,
2061
- userId
2071
+ "taskId": taskId,
2072
+ "userId": userId
2062
2073
  },
2063
2074
  query: {
2064
- overrideAssignment,
2065
- withTemplate
2075
+ "overrideAssignment": overrideAssignment,
2076
+ "withTemplate": withTemplate
2066
2077
  }
2067
2078
  });
2068
2079
  }
@@ -2078,7 +2089,7 @@ var HumanTaskService = class {
2078
2089
  method: "POST",
2079
2090
  url: "/human/tasks/{taskId}/reassign",
2080
2091
  path: {
2081
- taskId
2092
+ "taskId": taskId
2082
2093
  },
2083
2094
  body: requestBody,
2084
2095
  mediaType: "application/json"
@@ -2095,7 +2106,7 @@ var HumanTaskService = class {
2095
2106
  method: "POST",
2096
2107
  url: "/human/tasks/{taskId}/release",
2097
2108
  path: {
2098
- taskId
2109
+ "taskId": taskId
2099
2110
  }
2100
2111
  });
2101
2112
  }
@@ -2111,10 +2122,10 @@ var HumanTaskService = class {
2111
2122
  method: "POST",
2112
2123
  url: "/human/tasks/{taskId}/skip",
2113
2124
  path: {
2114
- taskId
2125
+ "taskId": taskId
2115
2126
  },
2116
2127
  query: {
2117
- reason
2128
+ "reason": reason
2118
2129
  }
2119
2130
  });
2120
2131
  }
@@ -2131,10 +2142,10 @@ var HumanTaskService = class {
2131
2142
  method: "POST",
2132
2143
  url: "/human/tasks/{taskId}/update",
2133
2144
  path: {
2134
- taskId
2145
+ "taskId": taskId
2135
2146
  },
2136
2147
  query: {
2137
- complete
2148
+ "complete": complete
2138
2149
  },
2139
2150
  body: requestBody,
2140
2151
  mediaType: "application/json"
@@ -2152,8 +2163,8 @@ var HumanTaskService = class {
2152
2163
  method: "GET",
2153
2164
  url: "/human/template",
2154
2165
  query: {
2155
- name,
2156
- version
2166
+ "name": name,
2167
+ "version": version
2157
2168
  }
2158
2169
  });
2159
2170
  }
@@ -2169,7 +2180,7 @@ var HumanTaskService = class {
2169
2180
  method: "POST",
2170
2181
  url: "/human/template",
2171
2182
  query: {
2172
- newVersion
2183
+ "newVersion": newVersion
2173
2184
  },
2174
2185
  body: requestBody,
2175
2186
  mediaType: "application/json"
@@ -2187,7 +2198,7 @@ var HumanTaskService = class {
2187
2198
  method: "POST",
2188
2199
  url: "/human/template/bulk",
2189
2200
  query: {
2190
- newVersion
2201
+ "newVersion": newVersion
2191
2202
  },
2192
2203
  body: requestBody,
2193
2204
  mediaType: "application/json"
@@ -2204,7 +2215,7 @@ var HumanTaskService = class {
2204
2215
  method: "DELETE",
2205
2216
  url: "/human/template/{name}",
2206
2217
  path: {
2207
- name
2218
+ "name": name
2208
2219
  }
2209
2220
  });
2210
2221
  }
@@ -2220,8 +2231,8 @@ var HumanTaskService = class {
2220
2231
  method: "DELETE",
2221
2232
  url: "/human/template/{name}/{version}",
2222
2233
  path: {
2223
- name,
2224
- version
2234
+ "name": name,
2235
+ "version": version
2225
2236
  }
2226
2237
  });
2227
2238
  }
@@ -2237,8 +2248,8 @@ var HumanTaskService = class {
2237
2248
  method: "GET",
2238
2249
  url: "/human/template/{name}/{version}",
2239
2250
  path: {
2240
- name,
2241
- version
2251
+ "name": name,
2252
+ "version": version
2242
2253
  }
2243
2254
  });
2244
2255
  }
@@ -3131,10 +3142,8 @@ var HumanExecutor = class {
3131
3142
  * @param taskId
3132
3143
  * @returns
3133
3144
  */
3134
- getTaskById(taskId, withTemplate = false) {
3135
- return tryCatchReThrow(
3136
- () => this._client.humanTask.getTask1(taskId, withTemplate)
3137
- );
3145
+ getTaskById(taskId) {
3146
+ return tryCatchReThrow(() => this._client.humanTask.getTask1(taskId));
3138
3147
  }
3139
3148
  /**
3140
3149
  * Assigns taskId to assignee. If the task is already assigned to another user, this will fail.
@@ -3144,12 +3153,7 @@ var HumanExecutor = class {
3144
3153
  */
3145
3154
  async claimTaskAsExternalUser(taskId, assignee, options) {
3146
3155
  return tryCatchReThrow(
3147
- () => this._client.humanTask.assignAndClaim(
3148
- taskId,
3149
- assignee,
3150
- options?.overrideAssignment,
3151
- options?.withTemplate
3152
- )
3156
+ () => this._client.humanTask.assignAndClaim(taskId, assignee, options?.overrideAssignment, options?.withTemplate)
3153
3157
  );
3154
3158
  }
3155
3159
  /**
@@ -3158,13 +3162,7 @@ var HumanExecutor = class {
3158
3162
  * @returns
3159
3163
  */
3160
3164
  async claimTaskAsConductorUser(taskId, options) {
3161
- return tryCatchReThrow(
3162
- () => this._client.humanTask.claimTask(
3163
- taskId,
3164
- options?.overrideAssignment,
3165
- options?.withTemplate
3166
- )
3167
- );
3165
+ return tryCatchReThrow(() => this._client.humanTask.claimTask(taskId, options?.overrideAssignment, options?.withTemplate));
3168
3166
  }
3169
3167
  /**
3170
3168
  * Claim task as conductor user
@@ -4004,6 +4002,18 @@ var MetadataClient = class {
4004
4002
  () => this._client.metadataResource.updateTaskDef(taskDef)
4005
4003
  );
4006
4004
  }
4005
+ /**
4006
+ * Creates or updates (overwrite: true) a workflow definition
4007
+ *
4008
+ * @param workflowDef
4009
+ * @param overwrite
4010
+ * @returns
4011
+ */
4012
+ registerWorkflowDef(workflowDef, overwrite = false) {
4013
+ return tryCatchReThrow(
4014
+ () => this._client.metadataResource.create(workflowDef, overwrite)
4015
+ );
4016
+ }
4007
4017
  };
4008
4018
 
4009
4019
  // src/orkes/BaseOrkesConductorClient.ts