@embedworkflow/sdk 1.0.0 → 1.2.0

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.
Files changed (243) hide show
  1. package/.github/workflows/push-tag.yaml +34 -0
  2. package/.openapi-generator/FILES +87 -0
  3. package/.openapi-generator/VERSION +1 -0
  4. package/.openapi-generator-ignore +23 -0
  5. package/README.md +2 -2
  6. package/api/accounts-api.ts +540 -0
  7. package/api/action-types-api.ts +697 -0
  8. package/api/actions-api.ts +786 -0
  9. package/api/app-connections-api.ts +556 -0
  10. package/api/available-apps-api.ts +239 -0
  11. package/api/data-fields-api.ts +404 -0
  12. package/api/events-api.ts +172 -0
  13. package/api/executions-api.ts +361 -0
  14. package/api/installed-apps-api.ts +410 -0
  15. package/api/payments-api.ts +172 -0
  16. package/api/triggers-api.ts +437 -0
  17. package/api/users-api.ts +531 -0
  18. package/api/workflows-api.ts +1302 -0
  19. package/api.ts +30 -0
  20. package/base.ts +86 -0
  21. package/common.ts +150 -0
  22. package/configuration.ts +110 -0
  23. package/dist/api/accounts-api.d.ts +124 -3
  24. package/dist/api/accounts-api.js +182 -1
  25. package/dist/api/action-types-api.d.ts +43 -36
  26. package/dist/api/action-types-api.js +27 -20
  27. package/dist/api/actions-api.d.ts +6 -6
  28. package/dist/api/app-connections-api.d.ts +28 -27
  29. package/dist/api/app-connections-api.js +25 -25
  30. package/dist/api/available-apps-api.d.ts +2 -2
  31. package/dist/api/data-fields-api.d.ts +46 -2
  32. package/dist/api/data-fields-api.js +68 -0
  33. package/dist/api/events-api.d.ts +1 -1
  34. package/dist/api/executions-api.d.ts +3 -3
  35. package/dist/api/installed-apps-api.d.ts +14 -14
  36. package/dist/api/payments-api.d.ts +1 -1
  37. package/dist/api/triggers-api.d.ts +22 -20
  38. package/dist/api/triggers-api.js +12 -12
  39. package/dist/api/users-api.d.ts +24 -18
  40. package/dist/api/users-api.js +14 -7
  41. package/dist/api/workflows-api.d.ts +114 -32
  42. package/dist/api/workflows-api.js +125 -8
  43. package/dist/common.d.ts +1 -1
  44. package/dist/esm/api/accounts-api.d.ts +124 -3
  45. package/dist/esm/api/accounts-api.js +181 -0
  46. package/dist/esm/api/action-types-api.d.ts +43 -36
  47. package/dist/esm/api/action-types-api.js +27 -20
  48. package/dist/esm/api/actions-api.d.ts +6 -6
  49. package/dist/esm/api/app-connections-api.d.ts +28 -27
  50. package/dist/esm/api/app-connections-api.js +25 -25
  51. package/dist/esm/api/available-apps-api.d.ts +2 -2
  52. package/dist/esm/api/data-fields-api.d.ts +46 -2
  53. package/dist/esm/api/data-fields-api.js +69 -1
  54. package/dist/esm/api/events-api.d.ts +1 -1
  55. package/dist/esm/api/executions-api.d.ts +3 -3
  56. package/dist/esm/api/installed-apps-api.d.ts +14 -14
  57. package/dist/esm/api/payments-api.d.ts +1 -1
  58. package/dist/esm/api/triggers-api.d.ts +22 -20
  59. package/dist/esm/api/triggers-api.js +12 -12
  60. package/dist/esm/api/users-api.d.ts +24 -18
  61. package/dist/esm/api/users-api.js +14 -7
  62. package/dist/esm/api/workflows-api.d.ts +114 -32
  63. package/dist/esm/api/workflows-api.js +124 -7
  64. package/dist/esm/common.d.ts +1 -1
  65. package/dist/esm/models/catch-hook-request.d.ts +25 -0
  66. package/dist/esm/models/{api-v1-action-types-post-request-form-draft-inner.d.ts → create-action-type-request-form-draft-inner.d.ts} +18 -12
  67. package/dist/esm/models/{api-v1-action-types-post-request-form-draft-inner.js → create-action-type-request-form-draft-inner.js} +1 -1
  68. package/dist/esm/models/{api-v1-action-types-post-request-icon-draft.d.ts → create-action-type-request-icon-draft.d.ts} +5 -5
  69. package/dist/{models/api-v1-action-types-post-request.d.ts → esm/models/create-action-type-request.d.ts} +34 -22
  70. package/dist/{models/retrieve-action-type404-response.d.ts → esm/models/create-action-type422-response.d.ts} +5 -5
  71. package/dist/esm/models/{api-v1-app-connections-post-request.d.ts → create-app-connection-request.d.ts} +6 -6
  72. package/dist/esm/models/create-workflow201-response.d.ts +262 -0
  73. package/dist/{models/clone-workflow201-response.js → esm/models/create-workflow201-response.js} +5 -4
  74. package/dist/esm/models/delete-action-type200-response.d.ts +24 -0
  75. package/dist/esm/models/delete-action-type200-response.js +14 -0
  76. package/dist/esm/models/evaluate-expression-request.d.ts +32 -0
  77. package/dist/esm/models/evaluate-expression-request.js +14 -0
  78. package/dist/esm/models/evaluate-expression200-response.d.ts +24 -0
  79. package/dist/esm/models/evaluate-expression200-response.js +14 -0
  80. package/dist/esm/models/export-configuration200-response-configuration.d.ts +16 -0
  81. package/dist/esm/models/export-configuration200-response-configuration.js +14 -0
  82. package/dist/esm/models/export-configuration200-response.d.ts +25 -0
  83. package/dist/esm/models/export-configuration200-response.js +14 -0
  84. package/dist/esm/models/import-configuration201-response.d.ts +6 -0
  85. package/dist/esm/models/index.d.ts +19 -8
  86. package/dist/esm/models/index.js +19 -8
  87. package/dist/{models/retrieve-installed-app200-response.d.ts → esm/models/install-app201-response.d.ts} +19 -19
  88. package/dist/esm/models/install-app201-response.js +14 -0
  89. package/dist/esm/models/list-action-types200-response-collection-inner.d.ts +58 -0
  90. package/dist/esm/models/list-action-types200-response-collection-inner.js +9 -0
  91. package/dist/esm/models/list-data-fields200-response-collection-inner.d.ts +18 -0
  92. package/dist/esm/models/list-triggers200-response-collection-inner.d.ts +18 -0
  93. package/dist/esm/models/list-users200-response-collection-inner.d.ts +6 -6
  94. package/dist/{models/retrieve-workflow200-response.d.ts → esm/models/list-workflows200-response-collection-inner.d.ts} +60 -68
  95. package/dist/esm/models/{retrieve-workflow200-response.js → list-workflows200-response-collection-inner.js} +1 -1
  96. package/dist/esm/models/list-workflows200-response.d.ts +32 -0
  97. package/dist/esm/models/list-workflows200-response.js +14 -0
  98. package/dist/esm/models/retrieve-account-usage200-response.d.ts +60 -0
  99. package/dist/esm/models/retrieve-account-usage200-response.js +14 -0
  100. package/dist/esm/models/retrieve-account200-response.d.ts +19 -1
  101. package/dist/esm/models/update-account-request-action-type-categories-inner-icon.d.ts +36 -0
  102. package/dist/esm/models/update-account-request-action-type-categories-inner-icon.js +14 -0
  103. package/dist/esm/models/update-account-request-action-type-categories-inner.d.ts +43 -0
  104. package/dist/esm/models/update-account-request-action-type-categories-inner.js +14 -0
  105. package/dist/esm/models/update-account-request.d.ts +13 -0
  106. package/dist/esm/models/update-action-type-request.d.ts +12 -0
  107. package/dist/esm/models/update-trigger-request.d.ts +30 -0
  108. package/dist/esm/models/update-trigger-request.js +14 -0
  109. package/dist/esm/models/update-workflow-request.d.ts +7 -1
  110. package/dist/esm/models/upsert-user-request.d.ts +6 -0
  111. package/dist/models/catch-hook-request.d.ts +25 -0
  112. package/dist/models/{api-v1-action-types-post-request-form-draft-inner.d.ts → create-action-type-request-form-draft-inner.d.ts} +18 -12
  113. package/dist/models/{api-v1-action-types-post-request-form-draft-inner.js → create-action-type-request-form-draft-inner.js} +2 -2
  114. package/dist/models/{api-v1-action-types-post-request-icon-draft.d.ts → create-action-type-request-icon-draft.d.ts} +5 -5
  115. package/dist/{esm/models/api-v1-action-types-post-request.d.ts → models/create-action-type-request.d.ts} +34 -22
  116. package/dist/{esm/models/retrieve-action-type404-response.d.ts → models/create-action-type422-response.d.ts} +5 -5
  117. package/dist/models/{api-v1-app-connections-post-request.d.ts → create-app-connection-request.d.ts} +6 -6
  118. package/dist/models/create-workflow201-response.d.ts +262 -0
  119. package/dist/models/create-workflow201-response.js +24 -0
  120. package/dist/models/delete-action-type200-response.d.ts +24 -0
  121. package/dist/models/delete-action-type200-response.js +15 -0
  122. package/dist/models/evaluate-expression-request.d.ts +32 -0
  123. package/dist/models/evaluate-expression-request.js +15 -0
  124. package/dist/models/evaluate-expression200-response.d.ts +24 -0
  125. package/dist/models/evaluate-expression200-response.js +15 -0
  126. package/dist/models/export-configuration200-response-configuration.d.ts +16 -0
  127. package/dist/models/export-configuration200-response-configuration.js +15 -0
  128. package/dist/models/export-configuration200-response.d.ts +25 -0
  129. package/dist/models/export-configuration200-response.js +15 -0
  130. package/dist/models/import-configuration201-response.d.ts +6 -0
  131. package/dist/models/index.d.ts +19 -8
  132. package/dist/models/index.js +19 -8
  133. package/dist/{esm/models/retrieve-installed-app200-response.d.ts → models/install-app201-response.d.ts} +19 -19
  134. package/dist/models/install-app201-response.js +15 -0
  135. package/dist/models/list-action-types200-response-collection-inner.d.ts +58 -0
  136. package/dist/models/list-action-types200-response-collection-inner.js +10 -1
  137. package/dist/models/list-data-fields200-response-collection-inner.d.ts +18 -0
  138. package/dist/models/list-triggers200-response-collection-inner.d.ts +18 -0
  139. package/dist/models/list-users200-response-collection-inner.d.ts +6 -6
  140. package/dist/{esm/models/retrieve-workflow200-response.d.ts → models/list-workflows200-response-collection-inner.d.ts} +60 -68
  141. package/dist/models/{retrieve-workflow200-response.js → list-workflows200-response-collection-inner.js} +2 -2
  142. package/dist/models/list-workflows200-response.d.ts +32 -0
  143. package/dist/models/list-workflows200-response.js +15 -0
  144. package/dist/models/retrieve-account-usage200-response.d.ts +60 -0
  145. package/dist/models/retrieve-account-usage200-response.js +15 -0
  146. package/dist/models/retrieve-account200-response.d.ts +19 -1
  147. package/dist/models/update-account-request-action-type-categories-inner-icon.d.ts +36 -0
  148. package/dist/models/update-account-request-action-type-categories-inner-icon.js +15 -0
  149. package/dist/models/update-account-request-action-type-categories-inner.d.ts +43 -0
  150. package/dist/models/update-account-request-action-type-categories-inner.js +15 -0
  151. package/dist/models/update-account-request.d.ts +13 -0
  152. package/dist/models/update-action-type-request.d.ts +12 -0
  153. package/dist/models/update-trigger-request.d.ts +30 -0
  154. package/dist/models/update-trigger-request.js +15 -0
  155. package/dist/models/update-workflow-request.d.ts +7 -1
  156. package/dist/models/upsert-user-request.d.ts +6 -0
  157. package/git_push.sh +57 -0
  158. package/index.ts +111 -0
  159. package/models/catch-hook-request.ts +32 -0
  160. package/models/create-action-type-request-form-draft-inner.ts +88 -0
  161. package/models/create-action-type-request-icon-draft.ts +42 -0
  162. package/models/create-action-type-request.ts +129 -0
  163. package/models/create-action-type422-response.ts +42 -0
  164. package/models/create-app-connection-request.ts +48 -0
  165. package/models/create-user-token-request.ts +38 -0
  166. package/models/create-user-token200-response.ts +30 -0
  167. package/models/create-workflow-request-template-draft-nodes-inner.ts +138 -0
  168. package/models/create-workflow-request-template-draft.ts +39 -0
  169. package/models/create-workflow-request.ts +75 -0
  170. package/models/create-workflow201-response.ts +266 -0
  171. package/models/delete-action-type200-response.ts +30 -0
  172. package/models/delete-workflow200-response-one-of.ts +30 -0
  173. package/models/delete-workflow200-response-one-of1.ts +30 -0
  174. package/models/delete-workflow200-response.ts +30 -0
  175. package/models/discard-workflow-draft-request.ts +36 -0
  176. package/models/evaluate-expression-request.ts +36 -0
  177. package/models/evaluate-expression200-response.ts +30 -0
  178. package/models/execute-workflow-request.ts +50 -0
  179. package/models/execute-workflow201-response.ts +126 -0
  180. package/models/export-configuration200-response-configuration.ts +23 -0
  181. package/models/export-configuration200-response.ts +33 -0
  182. package/models/import-configuration-request-schema.ts +24 -0
  183. package/models/import-configuration-request.ts +50 -0
  184. package/models/import-configuration201-response.ts +60 -0
  185. package/models/index.ts +70 -0
  186. package/models/install-app-request.ts +36 -0
  187. package/models/install-app201-response.ts +126 -0
  188. package/models/list-action-types200-response-collection-inner.ts +325 -0
  189. package/models/list-action-types200-response-meta.ts +42 -0
  190. package/models/list-action-types200-response.ts +42 -0
  191. package/models/list-actions200-response-collection-inner.ts +150 -0
  192. package/models/list-actions200-response.ts +42 -0
  193. package/models/list-app-connections200-response-collection-inner.ts +72 -0
  194. package/models/list-app-connections200-response.ts +42 -0
  195. package/models/list-available-apps200-response-collection-inner.ts +72 -0
  196. package/models/list-available-apps200-response.ts +42 -0
  197. package/{dist/esm/models/clone-workflow201-response.js → models/list-data-fields-type-parameter.ts} +11 -5
  198. package/models/list-data-fields200-response-collection-inner.ts +108 -0
  199. package/models/list-data-fields200-response.ts +42 -0
  200. package/models/list-events200-response-collection-inner.ts +84 -0
  201. package/models/list-events200-response.ts +42 -0
  202. package/models/list-installed-apps200-response-collection-inner.ts +120 -0
  203. package/models/list-installed-apps200-response.ts +42 -0
  204. package/models/list-triggers200-response-collection-inner.ts +126 -0
  205. package/models/list-triggers200-response.ts +42 -0
  206. package/models/list-users200-response-collection-inner.ts +90 -0
  207. package/models/list-users200-response.ts +42 -0
  208. package/models/list-workflow-executions200-response.ts +42 -0
  209. package/models/list-workflow-versions200-response-collection-inner.ts +66 -0
  210. package/models/list-workflow-versions200-response.ts +42 -0
  211. package/{dist/esm/models/clone-workflow201-response.d.ts → models/list-workflows200-response-collection-inner.ts} +76 -47
  212. package/models/list-workflows200-response.ts +42 -0
  213. package/models/publish-workflow-request.ts +30 -0
  214. package/models/retrieve-account-usage200-response.ts +66 -0
  215. package/models/retrieve-account200-response.ts +114 -0
  216. package/models/retrieve-available-app200-response.ts +78 -0
  217. package/models/retrieve-execution200-response.ts +138 -0
  218. package/models/retry-action-request.ts +38 -0
  219. package/models/stop-executions-request.ts +38 -0
  220. package/models/trigger-workflow-request.ts +54 -0
  221. package/models/update-account-request-action-type-categories-inner-icon.ts +42 -0
  222. package/models/update-account-request-action-type-categories-inner.ts +51 -0
  223. package/models/update-account-request-user-data-schema-inner.ts +54 -0
  224. package/models/update-account-request.ts +96 -0
  225. package/models/update-action-type-request.ts +48 -0
  226. package/models/update-installed-app-request.ts +30 -0
  227. package/models/update-trigger-request.ts +36 -0
  228. package/models/update-workflow-request.ts +93 -0
  229. package/models/upsert-user-request.ts +54 -0
  230. package/package.json +4 -6
  231. package/tsconfig.esm.json +7 -0
  232. package/tsconfig.json +18 -0
  233. package/dist/models/clone-workflow201-response.d.ts +0 -183
  234. /package/dist/esm/models/{api-v1-action-types-post-request-icon-draft.js → catch-hook-request.js} +0 -0
  235. /package/dist/esm/models/{api-v1-action-types-post-request.js → create-action-type-request-icon-draft.js} +0 -0
  236. /package/dist/esm/models/{api-v1-app-connections-post-request.js → create-action-type-request.js} +0 -0
  237. /package/dist/esm/models/{retrieve-action-type404-response.js → create-action-type422-response.js} +0 -0
  238. /package/dist/esm/models/{retrieve-installed-app200-response.js → create-app-connection-request.js} +0 -0
  239. /package/dist/models/{api-v1-action-types-post-request-icon-draft.js → catch-hook-request.js} +0 -0
  240. /package/dist/models/{api-v1-action-types-post-request.js → create-action-type-request-icon-draft.js} +0 -0
  241. /package/dist/models/{api-v1-app-connections-post-request.js → create-action-type-request.js} +0 -0
  242. /package/dist/models/{retrieve-action-type404-response.js → create-action-type422-response.js} +0 -0
  243. /package/dist/models/{retrieve-installed-app200-response.js → create-app-connection-request.js} +0 -0
@@ -0,0 +1,1302 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * API V1
5
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
+ *
7
+ * The version of the OpenAPI document: v1
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+ import type { Configuration } from '../configuration';
17
+ import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
18
+ import globalAxios from 'axios';
19
+ // Some imports not used depending on template conditions
20
+ // @ts-ignore
21
+ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
22
+ // @ts-ignore
23
+ import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base';
24
+ // @ts-ignore
25
+ import { CatchHookRequest } from '../models';
26
+ // @ts-ignore
27
+ import { CreateActionType422Response } from '../models';
28
+ // @ts-ignore
29
+ import { CreateWorkflow201Response } from '../models';
30
+ // @ts-ignore
31
+ import { CreateWorkflowRequest } from '../models';
32
+ // @ts-ignore
33
+ import { DeleteWorkflow200Response } from '../models';
34
+ // @ts-ignore
35
+ import { DiscardWorkflowDraftRequest } from '../models';
36
+ // @ts-ignore
37
+ import { ExecuteWorkflow201Response } from '../models';
38
+ // @ts-ignore
39
+ import { ExecuteWorkflowRequest } from '../models';
40
+ // @ts-ignore
41
+ import { ListWorkflowVersions200Response } from '../models';
42
+ // @ts-ignore
43
+ import { ListWorkflows200Response } from '../models';
44
+ // @ts-ignore
45
+ import { ListWorkflows200ResponseCollectionInner } from '../models';
46
+ // @ts-ignore
47
+ import { PublishWorkflowRequest } from '../models';
48
+ // @ts-ignore
49
+ import { TriggerWorkflowRequest } from '../models';
50
+ // @ts-ignore
51
+ import { UpdateWorkflowRequest } from '../models';
52
+ /**
53
+ * WorkflowsApi - axios parameter creator
54
+ * @export
55
+ */
56
+ export const WorkflowsApiAxiosParamCreator = function (configuration?: Configuration) {
57
+ return {
58
+ /**
59
+ *
60
+ * @summary Catch hook
61
+ * @param {string} hookId The trigger\'s hook id used for third party webhooks
62
+ * @param {CatchHookRequest} [catchHookRequest]
63
+ * @param {*} [options] Override http request option.
64
+ * @throws {RequiredError}
65
+ */
66
+ catchHook: async (hookId: string, catchHookRequest?: CatchHookRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
67
+ // verify required parameter 'hookId' is not null or undefined
68
+ assertParamExists('catchHook', 'hookId', hookId)
69
+ const localVarPath = `/api/v1/hooks/{hook_id}/catch`
70
+ .replace(`{${"hook_id"}}`, encodeURIComponent(String(hookId)));
71
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
72
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
73
+ let baseOptions;
74
+ if (configuration) {
75
+ baseOptions = configuration.baseOptions;
76
+ }
77
+
78
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
79
+ const localVarHeaderParameter = {} as any;
80
+ const localVarQueryParameter = {} as any;
81
+
82
+ // authentication bearer required
83
+ // http bearer authentication required
84
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
85
+
86
+
87
+
88
+ localVarHeaderParameter['Content-Type'] = 'application/json';
89
+
90
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
91
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
92
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
93
+ localVarRequestOptions.data = serializeDataIfNeeded(catchHookRequest, localVarRequestOptions, configuration)
94
+
95
+ return {
96
+ url: toPathString(localVarUrlObj),
97
+ options: localVarRequestOptions,
98
+ };
99
+ },
100
+ /**
101
+ *
102
+ * @summary Clone workflow
103
+ * @param {string} id System-generated unique identifier
104
+ * @param {DiscardWorkflowDraftRequest} [discardWorkflowDraftRequest]
105
+ * @param {*} [options] Override http request option.
106
+ * @throws {RequiredError}
107
+ */
108
+ cloneWorkflow: async (id: string, discardWorkflowDraftRequest?: DiscardWorkflowDraftRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
109
+ // verify required parameter 'id' is not null or undefined
110
+ assertParamExists('cloneWorkflow', 'id', id)
111
+ const localVarPath = `/api/v1/workflows/{id}/clone`
112
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
113
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
114
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
115
+ let baseOptions;
116
+ if (configuration) {
117
+ baseOptions = configuration.baseOptions;
118
+ }
119
+
120
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
121
+ const localVarHeaderParameter = {} as any;
122
+ const localVarQueryParameter = {} as any;
123
+
124
+ // authentication bearer required
125
+ // http bearer authentication required
126
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
127
+
128
+
129
+
130
+ localVarHeaderParameter['Content-Type'] = 'application/json';
131
+
132
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
133
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
134
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
135
+ localVarRequestOptions.data = serializeDataIfNeeded(discardWorkflowDraftRequest, localVarRequestOptions, configuration)
136
+
137
+ return {
138
+ url: toPathString(localVarUrlObj),
139
+ options: localVarRequestOptions,
140
+ };
141
+ },
142
+ /**
143
+ *
144
+ * @summary Create workflow
145
+ * @param {CreateWorkflowRequest} [createWorkflowRequest]
146
+ * @param {*} [options] Override http request option.
147
+ * @throws {RequiredError}
148
+ */
149
+ createWorkflow: async (createWorkflowRequest?: CreateWorkflowRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
150
+ const localVarPath = `/api/v1/workflows`;
151
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
152
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
153
+ let baseOptions;
154
+ if (configuration) {
155
+ baseOptions = configuration.baseOptions;
156
+ }
157
+
158
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
159
+ const localVarHeaderParameter = {} as any;
160
+ const localVarQueryParameter = {} as any;
161
+
162
+ // authentication bearer required
163
+ // http bearer authentication required
164
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
165
+
166
+
167
+
168
+ localVarHeaderParameter['Content-Type'] = 'application/json';
169
+
170
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
171
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
172
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
173
+ localVarRequestOptions.data = serializeDataIfNeeded(createWorkflowRequest, localVarRequestOptions, configuration)
174
+
175
+ return {
176
+ url: toPathString(localVarUrlObj),
177
+ options: localVarRequestOptions,
178
+ };
179
+ },
180
+ /**
181
+ *
182
+ * @summary Delete workflow
183
+ * @param {string} id System-generated unique identifier
184
+ * @param {string} [idType] Type of identifier used in the URL
185
+ * @param {string} [userKey] Unique user identifier
186
+ * @param {*} [options] Override http request option.
187
+ * @throws {RequiredError}
188
+ */
189
+ deleteWorkflow: async (id: string, idType?: string, userKey?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
190
+ // verify required parameter 'id' is not null or undefined
191
+ assertParamExists('deleteWorkflow', 'id', id)
192
+ const localVarPath = `/api/v1/workflows/{id}`
193
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
194
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
195
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
196
+ let baseOptions;
197
+ if (configuration) {
198
+ baseOptions = configuration.baseOptions;
199
+ }
200
+
201
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
202
+ const localVarHeaderParameter = {} as any;
203
+ const localVarQueryParameter = {} as any;
204
+
205
+ // authentication bearer required
206
+ // http bearer authentication required
207
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
208
+
209
+ if (idType !== undefined) {
210
+ localVarQueryParameter['id_type'] = idType;
211
+ }
212
+
213
+ if (userKey !== undefined) {
214
+ localVarQueryParameter['user_key'] = userKey;
215
+ }
216
+
217
+
218
+
219
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
220
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
221
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
222
+
223
+ return {
224
+ url: toPathString(localVarUrlObj),
225
+ options: localVarRequestOptions,
226
+ };
227
+ },
228
+ /**
229
+ *
230
+ * @summary Discard workflow draft
231
+ * @param {string} id System-generated unique identifier
232
+ * @param {DiscardWorkflowDraftRequest} [discardWorkflowDraftRequest]
233
+ * @param {*} [options] Override http request option.
234
+ * @throws {RequiredError}
235
+ */
236
+ discardWorkflowDraft: async (id: string, discardWorkflowDraftRequest?: DiscardWorkflowDraftRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
237
+ // verify required parameter 'id' is not null or undefined
238
+ assertParamExists('discardWorkflowDraft', 'id', id)
239
+ const localVarPath = `/api/v1/workflows/{id}/discard_draft`
240
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
241
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
242
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
243
+ let baseOptions;
244
+ if (configuration) {
245
+ baseOptions = configuration.baseOptions;
246
+ }
247
+
248
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
249
+ const localVarHeaderParameter = {} as any;
250
+ const localVarQueryParameter = {} as any;
251
+
252
+ // authentication bearer required
253
+ // http bearer authentication required
254
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
255
+
256
+
257
+
258
+ localVarHeaderParameter['Content-Type'] = 'application/json';
259
+
260
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
261
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
262
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
263
+ localVarRequestOptions.data = serializeDataIfNeeded(discardWorkflowDraftRequest, localVarRequestOptions, configuration)
264
+
265
+ return {
266
+ url: toPathString(localVarUrlObj),
267
+ options: localVarRequestOptions,
268
+ };
269
+ },
270
+ /**
271
+ *
272
+ * @summary Execute workflow
273
+ * @param {string} id System-generated unique identifier
274
+ * @param {ExecuteWorkflowRequest} [executeWorkflowRequest]
275
+ * @param {*} [options] Override http request option.
276
+ * @throws {RequiredError}
277
+ */
278
+ executeWorkflow: async (id: string, executeWorkflowRequest?: ExecuteWorkflowRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
279
+ // verify required parameter 'id' is not null or undefined
280
+ assertParamExists('executeWorkflow', 'id', id)
281
+ const localVarPath = `/api/v1/workflows/{id}/execute`
282
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
283
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
284
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
285
+ let baseOptions;
286
+ if (configuration) {
287
+ baseOptions = configuration.baseOptions;
288
+ }
289
+
290
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
291
+ const localVarHeaderParameter = {} as any;
292
+ const localVarQueryParameter = {} as any;
293
+
294
+ // authentication bearer required
295
+ // http bearer authentication required
296
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
297
+
298
+
299
+
300
+ localVarHeaderParameter['Content-Type'] = 'application/json';
301
+
302
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
303
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
304
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
305
+ localVarRequestOptions.data = serializeDataIfNeeded(executeWorkflowRequest, localVarRequestOptions, configuration)
306
+
307
+ return {
308
+ url: toPathString(localVarUrlObj),
309
+ options: localVarRequestOptions,
310
+ };
311
+ },
312
+ /**
313
+ *
314
+ * @summary List workflow versions
315
+ * @param {string} workflowId Filter results by workflow id
316
+ * @param {string} [startingAfter] Cursor for pagination - return results after this ID
317
+ * @param {string} [endingBefore] Cursor for pagination - return results before this ID
318
+ * @param {number} [limit] Number of items to return (max 100)
319
+ * @param {string} [userKey] Unique user identifier
320
+ * @param {*} [options] Override http request option.
321
+ * @throws {RequiredError}
322
+ */
323
+ listWorkflowVersions: async (workflowId: string, startingAfter?: string, endingBefore?: string, limit?: number, userKey?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
324
+ // verify required parameter 'workflowId' is not null or undefined
325
+ assertParamExists('listWorkflowVersions', 'workflowId', workflowId)
326
+ const localVarPath = `/api/v1/workflows/{workflow_id}/versions`
327
+ .replace(`{${"workflow_id"}}`, encodeURIComponent(String(workflowId)));
328
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
329
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
330
+ let baseOptions;
331
+ if (configuration) {
332
+ baseOptions = configuration.baseOptions;
333
+ }
334
+
335
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
336
+ const localVarHeaderParameter = {} as any;
337
+ const localVarQueryParameter = {} as any;
338
+
339
+ // authentication bearer required
340
+ // http bearer authentication required
341
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
342
+
343
+ if (startingAfter !== undefined) {
344
+ localVarQueryParameter['starting_after'] = startingAfter;
345
+ }
346
+
347
+ if (endingBefore !== undefined) {
348
+ localVarQueryParameter['ending_before'] = endingBefore;
349
+ }
350
+
351
+ if (limit !== undefined) {
352
+ localVarQueryParameter['limit'] = limit;
353
+ }
354
+
355
+ if (userKey !== undefined) {
356
+ localVarQueryParameter['user_key'] = userKey;
357
+ }
358
+
359
+
360
+
361
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
362
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
363
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
364
+
365
+ return {
366
+ url: toPathString(localVarUrlObj),
367
+ options: localVarRequestOptions,
368
+ };
369
+ },
370
+ /**
371
+ *
372
+ * @summary List workflows
373
+ * @param {string} [startingAfter] Cursor for pagination - return results after this ID
374
+ * @param {string} [endingBefore] Cursor for pagination - return results before this ID
375
+ * @param {number} [limit] Number of items to return (max 100)
376
+ * @param {Array<string>} [expand] Expand related objects
377
+ * @param {string} [userKey] Unique user identifier
378
+ * @param {boolean} [isTemplate] Filter workflows by is_template value
379
+ * @param {boolean} [on] Filter workflows by on value
380
+ * @param {string} [orderBy] Field to order results by
381
+ * @param {ListWorkflowsOrderDirectionEnum} [orderDirection]
382
+ * @param {*} [options] Override http request option.
383
+ * @throws {RequiredError}
384
+ */
385
+ listWorkflows: async (startingAfter?: string, endingBefore?: string, limit?: number, expand?: Array<string>, userKey?: string, isTemplate?: boolean, on?: boolean, orderBy?: string, orderDirection?: ListWorkflowsOrderDirectionEnum, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
386
+ const localVarPath = `/api/v1/workflows`;
387
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
388
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
389
+ let baseOptions;
390
+ if (configuration) {
391
+ baseOptions = configuration.baseOptions;
392
+ }
393
+
394
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
395
+ const localVarHeaderParameter = {} as any;
396
+ const localVarQueryParameter = {} as any;
397
+
398
+ // authentication bearer required
399
+ // http bearer authentication required
400
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
401
+
402
+ if (startingAfter !== undefined) {
403
+ localVarQueryParameter['starting_after'] = startingAfter;
404
+ }
405
+
406
+ if (endingBefore !== undefined) {
407
+ localVarQueryParameter['ending_before'] = endingBefore;
408
+ }
409
+
410
+ if (limit !== undefined) {
411
+ localVarQueryParameter['limit'] = limit;
412
+ }
413
+
414
+ if (expand) {
415
+ localVarQueryParameter['expand'] = expand;
416
+ }
417
+
418
+ if (userKey !== undefined) {
419
+ localVarQueryParameter['user_key'] = userKey;
420
+ }
421
+
422
+ if (isTemplate !== undefined) {
423
+ localVarQueryParameter['is_template'] = isTemplate;
424
+ }
425
+
426
+ if (on !== undefined) {
427
+ localVarQueryParameter['on'] = on;
428
+ }
429
+
430
+ if (orderBy !== undefined) {
431
+ localVarQueryParameter['order_by'] = orderBy;
432
+ }
433
+
434
+ if (orderDirection !== undefined) {
435
+ localVarQueryParameter['order_direction'] = orderDirection;
436
+ }
437
+
438
+
439
+
440
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
441
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
442
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
443
+
444
+ return {
445
+ url: toPathString(localVarUrlObj),
446
+ options: localVarRequestOptions,
447
+ };
448
+ },
449
+ /**
450
+ *
451
+ * @summary Publish workflow
452
+ * @param {string} id System-generated unique identifier
453
+ * @param {PublishWorkflowRequest} [publishWorkflowRequest]
454
+ * @param {*} [options] Override http request option.
455
+ * @throws {RequiredError}
456
+ */
457
+ publishWorkflow: async (id: string, publishWorkflowRequest?: PublishWorkflowRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
458
+ // verify required parameter 'id' is not null or undefined
459
+ assertParamExists('publishWorkflow', 'id', id)
460
+ const localVarPath = `/api/v1/workflows/{id}/publish`
461
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
462
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
463
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
464
+ let baseOptions;
465
+ if (configuration) {
466
+ baseOptions = configuration.baseOptions;
467
+ }
468
+
469
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
470
+ const localVarHeaderParameter = {} as any;
471
+ const localVarQueryParameter = {} as any;
472
+
473
+ // authentication bearer required
474
+ // http bearer authentication required
475
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
476
+
477
+
478
+
479
+ localVarHeaderParameter['Content-Type'] = 'application/json';
480
+
481
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
482
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
483
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
484
+ localVarRequestOptions.data = serializeDataIfNeeded(publishWorkflowRequest, localVarRequestOptions, configuration)
485
+
486
+ return {
487
+ url: toPathString(localVarUrlObj),
488
+ options: localVarRequestOptions,
489
+ };
490
+ },
491
+ /**
492
+ *
493
+ * @summary Retrieve workflow
494
+ * @param {string} id System-generated unique identifier
495
+ * @param {string} [idType] Type of identifier used in the URL
496
+ * @param {string} [userKey] Unique user identifier
497
+ * @param {Array<string>} [expand] Expand related objects
498
+ * @param {*} [options] Override http request option.
499
+ * @throws {RequiredError}
500
+ */
501
+ retrieveWorkflow: async (id: string, idType?: string, userKey?: string, expand?: Array<string>, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
502
+ // verify required parameter 'id' is not null or undefined
503
+ assertParamExists('retrieveWorkflow', 'id', id)
504
+ const localVarPath = `/api/v1/workflows/{id}`
505
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
506
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
507
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
508
+ let baseOptions;
509
+ if (configuration) {
510
+ baseOptions = configuration.baseOptions;
511
+ }
512
+
513
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
514
+ const localVarHeaderParameter = {} as any;
515
+ const localVarQueryParameter = {} as any;
516
+
517
+ // authentication bearer required
518
+ // http bearer authentication required
519
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
520
+
521
+ if (idType !== undefined) {
522
+ localVarQueryParameter['id_type'] = idType;
523
+ }
524
+
525
+ if (userKey !== undefined) {
526
+ localVarQueryParameter['user_key'] = userKey;
527
+ }
528
+
529
+ if (expand) {
530
+ localVarQueryParameter['expand'] = expand;
531
+ }
532
+
533
+
534
+
535
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
536
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
537
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
538
+
539
+ return {
540
+ url: toPathString(localVarUrlObj),
541
+ options: localVarRequestOptions,
542
+ };
543
+ },
544
+ /**
545
+ *
546
+ * @summary Trigger workflow
547
+ * @param {TriggerWorkflowRequest} [triggerWorkflowRequest]
548
+ * @param {*} [options] Override http request option.
549
+ * @throws {RequiredError}
550
+ */
551
+ triggerWorkflow: async (triggerWorkflowRequest?: TriggerWorkflowRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
552
+ const localVarPath = `/api/v1/trigger`;
553
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
554
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
555
+ let baseOptions;
556
+ if (configuration) {
557
+ baseOptions = configuration.baseOptions;
558
+ }
559
+
560
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
561
+ const localVarHeaderParameter = {} as any;
562
+ const localVarQueryParameter = {} as any;
563
+
564
+ // authentication bearer required
565
+ // http bearer authentication required
566
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
567
+
568
+
569
+
570
+ localVarHeaderParameter['Content-Type'] = 'application/json';
571
+
572
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
573
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
574
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
575
+ localVarRequestOptions.data = serializeDataIfNeeded(triggerWorkflowRequest, localVarRequestOptions, configuration)
576
+
577
+ return {
578
+ url: toPathString(localVarUrlObj),
579
+ options: localVarRequestOptions,
580
+ };
581
+ },
582
+ /**
583
+ *
584
+ * @summary Update workflow
585
+ * @param {string} id System-generated unique identifier
586
+ * @param {UpdateWorkflowRequest} [updateWorkflowRequest]
587
+ * @param {*} [options] Override http request option.
588
+ * @throws {RequiredError}
589
+ */
590
+ updateWorkflow: async (id: string, updateWorkflowRequest?: UpdateWorkflowRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
591
+ // verify required parameter 'id' is not null or undefined
592
+ assertParamExists('updateWorkflow', 'id', id)
593
+ const localVarPath = `/api/v1/workflows/{id}`
594
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
595
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
596
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
597
+ let baseOptions;
598
+ if (configuration) {
599
+ baseOptions = configuration.baseOptions;
600
+ }
601
+
602
+ const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
603
+ const localVarHeaderParameter = {} as any;
604
+ const localVarQueryParameter = {} as any;
605
+
606
+ // authentication bearer required
607
+ // http bearer authentication required
608
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
609
+
610
+
611
+
612
+ localVarHeaderParameter['Content-Type'] = 'application/json';
613
+
614
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
615
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
616
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
617
+ localVarRequestOptions.data = serializeDataIfNeeded(updateWorkflowRequest, localVarRequestOptions, configuration)
618
+
619
+ return {
620
+ url: toPathString(localVarUrlObj),
621
+ options: localVarRequestOptions,
622
+ };
623
+ },
624
+ }
625
+ };
626
+
627
+ /**
628
+ * WorkflowsApi - functional programming interface
629
+ * @export
630
+ */
631
+ export const WorkflowsApiFp = function(configuration?: Configuration) {
632
+ const localVarAxiosParamCreator = WorkflowsApiAxiosParamCreator(configuration)
633
+ return {
634
+ /**
635
+ *
636
+ * @summary Catch hook
637
+ * @param {string} hookId The trigger\&#39;s hook id used for third party webhooks
638
+ * @param {CatchHookRequest} [catchHookRequest]
639
+ * @param {*} [options] Override http request option.
640
+ * @throws {RequiredError}
641
+ */
642
+ async catchHook(hookId: string, catchHookRequest?: CatchHookRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>> {
643
+ const localVarAxiosArgs = await localVarAxiosParamCreator.catchHook(hookId, catchHookRequest, options);
644
+ const index = configuration?.serverIndex ?? 0;
645
+ const operationBasePath = operationServerMap['WorkflowsApi.catchHook']?.[index]?.url;
646
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath);
647
+ },
648
+ /**
649
+ *
650
+ * @summary Clone workflow
651
+ * @param {string} id System-generated unique identifier
652
+ * @param {DiscardWorkflowDraftRequest} [discardWorkflowDraftRequest]
653
+ * @param {*} [options] Override http request option.
654
+ * @throws {RequiredError}
655
+ */
656
+ async cloneWorkflow(id: string, discardWorkflowDraftRequest?: DiscardWorkflowDraftRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListWorkflows200ResponseCollectionInner>> {
657
+ const localVarAxiosArgs = await localVarAxiosParamCreator.cloneWorkflow(id, discardWorkflowDraftRequest, options);
658
+ const index = configuration?.serverIndex ?? 0;
659
+ const operationBasePath = operationServerMap['WorkflowsApi.cloneWorkflow']?.[index]?.url;
660
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath);
661
+ },
662
+ /**
663
+ *
664
+ * @summary Create workflow
665
+ * @param {CreateWorkflowRequest} [createWorkflowRequest]
666
+ * @param {*} [options] Override http request option.
667
+ * @throws {RequiredError}
668
+ */
669
+ async createWorkflow(createWorkflowRequest?: CreateWorkflowRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateWorkflow201Response>> {
670
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createWorkflow(createWorkflowRequest, options);
671
+ const index = configuration?.serverIndex ?? 0;
672
+ const operationBasePath = operationServerMap['WorkflowsApi.createWorkflow']?.[index]?.url;
673
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath);
674
+ },
675
+ /**
676
+ *
677
+ * @summary Delete workflow
678
+ * @param {string} id System-generated unique identifier
679
+ * @param {string} [idType] Type of identifier used in the URL
680
+ * @param {string} [userKey] Unique user identifier
681
+ * @param {*} [options] Override http request option.
682
+ * @throws {RequiredError}
683
+ */
684
+ async deleteWorkflow(id: string, idType?: string, userKey?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DeleteWorkflow200Response>> {
685
+ const localVarAxiosArgs = await localVarAxiosParamCreator.deleteWorkflow(id, idType, userKey, options);
686
+ const index = configuration?.serverIndex ?? 0;
687
+ const operationBasePath = operationServerMap['WorkflowsApi.deleteWorkflow']?.[index]?.url;
688
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath);
689
+ },
690
+ /**
691
+ *
692
+ * @summary Discard workflow draft
693
+ * @param {string} id System-generated unique identifier
694
+ * @param {DiscardWorkflowDraftRequest} [discardWorkflowDraftRequest]
695
+ * @param {*} [options] Override http request option.
696
+ * @throws {RequiredError}
697
+ */
698
+ async discardWorkflowDraft(id: string, discardWorkflowDraftRequest?: DiscardWorkflowDraftRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateWorkflow201Response>> {
699
+ const localVarAxiosArgs = await localVarAxiosParamCreator.discardWorkflowDraft(id, discardWorkflowDraftRequest, options);
700
+ const index = configuration?.serverIndex ?? 0;
701
+ const operationBasePath = operationServerMap['WorkflowsApi.discardWorkflowDraft']?.[index]?.url;
702
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath);
703
+ },
704
+ /**
705
+ *
706
+ * @summary Execute workflow
707
+ * @param {string} id System-generated unique identifier
708
+ * @param {ExecuteWorkflowRequest} [executeWorkflowRequest]
709
+ * @param {*} [options] Override http request option.
710
+ * @throws {RequiredError}
711
+ */
712
+ async executeWorkflow(id: string, executeWorkflowRequest?: ExecuteWorkflowRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ExecuteWorkflow201Response>> {
713
+ const localVarAxiosArgs = await localVarAxiosParamCreator.executeWorkflow(id, executeWorkflowRequest, options);
714
+ const index = configuration?.serverIndex ?? 0;
715
+ const operationBasePath = operationServerMap['WorkflowsApi.executeWorkflow']?.[index]?.url;
716
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath);
717
+ },
718
+ /**
719
+ *
720
+ * @summary List workflow versions
721
+ * @param {string} workflowId Filter results by workflow id
722
+ * @param {string} [startingAfter] Cursor for pagination - return results after this ID
723
+ * @param {string} [endingBefore] Cursor for pagination - return results before this ID
724
+ * @param {number} [limit] Number of items to return (max 100)
725
+ * @param {string} [userKey] Unique user identifier
726
+ * @param {*} [options] Override http request option.
727
+ * @throws {RequiredError}
728
+ */
729
+ async listWorkflowVersions(workflowId: string, startingAfter?: string, endingBefore?: string, limit?: number, userKey?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListWorkflowVersions200Response>> {
730
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listWorkflowVersions(workflowId, startingAfter, endingBefore, limit, userKey, options);
731
+ const index = configuration?.serverIndex ?? 0;
732
+ const operationBasePath = operationServerMap['WorkflowsApi.listWorkflowVersions']?.[index]?.url;
733
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath);
734
+ },
735
+ /**
736
+ *
737
+ * @summary List workflows
738
+ * @param {string} [startingAfter] Cursor for pagination - return results after this ID
739
+ * @param {string} [endingBefore] Cursor for pagination - return results before this ID
740
+ * @param {number} [limit] Number of items to return (max 100)
741
+ * @param {Array<string>} [expand] Expand related objects
742
+ * @param {string} [userKey] Unique user identifier
743
+ * @param {boolean} [isTemplate] Filter workflows by is_template value
744
+ * @param {boolean} [on] Filter workflows by on value
745
+ * @param {string} [orderBy] Field to order results by
746
+ * @param {ListWorkflowsOrderDirectionEnum} [orderDirection]
747
+ * @param {*} [options] Override http request option.
748
+ * @throws {RequiredError}
749
+ */
750
+ async listWorkflows(startingAfter?: string, endingBefore?: string, limit?: number, expand?: Array<string>, userKey?: string, isTemplate?: boolean, on?: boolean, orderBy?: string, orderDirection?: ListWorkflowsOrderDirectionEnum, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListWorkflows200Response>> {
751
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listWorkflows(startingAfter, endingBefore, limit, expand, userKey, isTemplate, on, orderBy, orderDirection, options);
752
+ const index = configuration?.serverIndex ?? 0;
753
+ const operationBasePath = operationServerMap['WorkflowsApi.listWorkflows']?.[index]?.url;
754
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath);
755
+ },
756
+ /**
757
+ *
758
+ * @summary Publish workflow
759
+ * @param {string} id System-generated unique identifier
760
+ * @param {PublishWorkflowRequest} [publishWorkflowRequest]
761
+ * @param {*} [options] Override http request option.
762
+ * @throws {RequiredError}
763
+ */
764
+ async publishWorkflow(id: string, publishWorkflowRequest?: PublishWorkflowRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateWorkflow201Response>> {
765
+ const localVarAxiosArgs = await localVarAxiosParamCreator.publishWorkflow(id, publishWorkflowRequest, options);
766
+ const index = configuration?.serverIndex ?? 0;
767
+ const operationBasePath = operationServerMap['WorkflowsApi.publishWorkflow']?.[index]?.url;
768
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath);
769
+ },
770
+ /**
771
+ *
772
+ * @summary Retrieve workflow
773
+ * @param {string} id System-generated unique identifier
774
+ * @param {string} [idType] Type of identifier used in the URL
775
+ * @param {string} [userKey] Unique user identifier
776
+ * @param {Array<string>} [expand] Expand related objects
777
+ * @param {*} [options] Override http request option.
778
+ * @throws {RequiredError}
779
+ */
780
+ async retrieveWorkflow(id: string, idType?: string, userKey?: string, expand?: Array<string>, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateWorkflow201Response>> {
781
+ const localVarAxiosArgs = await localVarAxiosParamCreator.retrieveWorkflow(id, idType, userKey, expand, options);
782
+ const index = configuration?.serverIndex ?? 0;
783
+ const operationBasePath = operationServerMap['WorkflowsApi.retrieveWorkflow']?.[index]?.url;
784
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath);
785
+ },
786
+ /**
787
+ *
788
+ * @summary Trigger workflow
789
+ * @param {TriggerWorkflowRequest} [triggerWorkflowRequest]
790
+ * @param {*} [options] Override http request option.
791
+ * @throws {RequiredError}
792
+ */
793
+ async triggerWorkflow(triggerWorkflowRequest?: TriggerWorkflowRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>> {
794
+ const localVarAxiosArgs = await localVarAxiosParamCreator.triggerWorkflow(triggerWorkflowRequest, options);
795
+ const index = configuration?.serverIndex ?? 0;
796
+ const operationBasePath = operationServerMap['WorkflowsApi.triggerWorkflow']?.[index]?.url;
797
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath);
798
+ },
799
+ /**
800
+ *
801
+ * @summary Update workflow
802
+ * @param {string} id System-generated unique identifier
803
+ * @param {UpdateWorkflowRequest} [updateWorkflowRequest]
804
+ * @param {*} [options] Override http request option.
805
+ * @throws {RequiredError}
806
+ */
807
+ async updateWorkflow(id: string, updateWorkflowRequest?: UpdateWorkflowRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
808
+ const localVarAxiosArgs = await localVarAxiosParamCreator.updateWorkflow(id, updateWorkflowRequest, options);
809
+ const index = configuration?.serverIndex ?? 0;
810
+ const operationBasePath = operationServerMap['WorkflowsApi.updateWorkflow']?.[index]?.url;
811
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath);
812
+ },
813
+ }
814
+ };
815
+
816
+ /**
817
+ * WorkflowsApi - factory interface
818
+ * @export
819
+ */
820
+ export const WorkflowsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
821
+ const localVarFp = WorkflowsApiFp(configuration)
822
+ return {
823
+ /**
824
+ *
825
+ * @summary Catch hook
826
+ * @param {string} hookId The trigger\&#39;s hook id used for third party webhooks
827
+ * @param {CatchHookRequest} [catchHookRequest]
828
+ * @param {*} [options] Override http request option.
829
+ * @throws {RequiredError}
830
+ */
831
+ catchHook(hookId: string, catchHookRequest?: CatchHookRequest, options?: any): AxiosPromise<object> {
832
+ return localVarFp.catchHook(hookId, catchHookRequest, options).then((request) => request(axios, basePath));
833
+ },
834
+ /**
835
+ *
836
+ * @summary Clone workflow
837
+ * @param {string} id System-generated unique identifier
838
+ * @param {DiscardWorkflowDraftRequest} [discardWorkflowDraftRequest]
839
+ * @param {*} [options] Override http request option.
840
+ * @throws {RequiredError}
841
+ */
842
+ cloneWorkflow(id: string, discardWorkflowDraftRequest?: DiscardWorkflowDraftRequest, options?: any): AxiosPromise<ListWorkflows200ResponseCollectionInner> {
843
+ return localVarFp.cloneWorkflow(id, discardWorkflowDraftRequest, options).then((request) => request(axios, basePath));
844
+ },
845
+ /**
846
+ *
847
+ * @summary Create workflow
848
+ * @param {CreateWorkflowRequest} [createWorkflowRequest]
849
+ * @param {*} [options] Override http request option.
850
+ * @throws {RequiredError}
851
+ */
852
+ createWorkflow(createWorkflowRequest?: CreateWorkflowRequest, options?: any): AxiosPromise<CreateWorkflow201Response> {
853
+ return localVarFp.createWorkflow(createWorkflowRequest, options).then((request) => request(axios, basePath));
854
+ },
855
+ /**
856
+ *
857
+ * @summary Delete workflow
858
+ * @param {string} id System-generated unique identifier
859
+ * @param {string} [idType] Type of identifier used in the URL
860
+ * @param {string} [userKey] Unique user identifier
861
+ * @param {*} [options] Override http request option.
862
+ * @throws {RequiredError}
863
+ */
864
+ deleteWorkflow(id: string, idType?: string, userKey?: string, options?: any): AxiosPromise<DeleteWorkflow200Response> {
865
+ return localVarFp.deleteWorkflow(id, idType, userKey, options).then((request) => request(axios, basePath));
866
+ },
867
+ /**
868
+ *
869
+ * @summary Discard workflow draft
870
+ * @param {string} id System-generated unique identifier
871
+ * @param {DiscardWorkflowDraftRequest} [discardWorkflowDraftRequest]
872
+ * @param {*} [options] Override http request option.
873
+ * @throws {RequiredError}
874
+ */
875
+ discardWorkflowDraft(id: string, discardWorkflowDraftRequest?: DiscardWorkflowDraftRequest, options?: any): AxiosPromise<CreateWorkflow201Response> {
876
+ return localVarFp.discardWorkflowDraft(id, discardWorkflowDraftRequest, options).then((request) => request(axios, basePath));
877
+ },
878
+ /**
879
+ *
880
+ * @summary Execute workflow
881
+ * @param {string} id System-generated unique identifier
882
+ * @param {ExecuteWorkflowRequest} [executeWorkflowRequest]
883
+ * @param {*} [options] Override http request option.
884
+ * @throws {RequiredError}
885
+ */
886
+ executeWorkflow(id: string, executeWorkflowRequest?: ExecuteWorkflowRequest, options?: any): AxiosPromise<ExecuteWorkflow201Response> {
887
+ return localVarFp.executeWorkflow(id, executeWorkflowRequest, options).then((request) => request(axios, basePath));
888
+ },
889
+ /**
890
+ *
891
+ * @summary List workflow versions
892
+ * @param {string} workflowId Filter results by workflow id
893
+ * @param {string} [startingAfter] Cursor for pagination - return results after this ID
894
+ * @param {string} [endingBefore] Cursor for pagination - return results before this ID
895
+ * @param {number} [limit] Number of items to return (max 100)
896
+ * @param {string} [userKey] Unique user identifier
897
+ * @param {*} [options] Override http request option.
898
+ * @throws {RequiredError}
899
+ */
900
+ listWorkflowVersions(workflowId: string, startingAfter?: string, endingBefore?: string, limit?: number, userKey?: string, options?: any): AxiosPromise<ListWorkflowVersions200Response> {
901
+ return localVarFp.listWorkflowVersions(workflowId, startingAfter, endingBefore, limit, userKey, options).then((request) => request(axios, basePath));
902
+ },
903
+ /**
904
+ *
905
+ * @summary List workflows
906
+ * @param {string} [startingAfter] Cursor for pagination - return results after this ID
907
+ * @param {string} [endingBefore] Cursor for pagination - return results before this ID
908
+ * @param {number} [limit] Number of items to return (max 100)
909
+ * @param {Array<string>} [expand] Expand related objects
910
+ * @param {string} [userKey] Unique user identifier
911
+ * @param {boolean} [isTemplate] Filter workflows by is_template value
912
+ * @param {boolean} [on] Filter workflows by on value
913
+ * @param {string} [orderBy] Field to order results by
914
+ * @param {ListWorkflowsOrderDirectionEnum} [orderDirection]
915
+ * @param {*} [options] Override http request option.
916
+ * @throws {RequiredError}
917
+ */
918
+ listWorkflows(startingAfter?: string, endingBefore?: string, limit?: number, expand?: Array<string>, userKey?: string, isTemplate?: boolean, on?: boolean, orderBy?: string, orderDirection?: ListWorkflowsOrderDirectionEnum, options?: any): AxiosPromise<ListWorkflows200Response> {
919
+ return localVarFp.listWorkflows(startingAfter, endingBefore, limit, expand, userKey, isTemplate, on, orderBy, orderDirection, options).then((request) => request(axios, basePath));
920
+ },
921
+ /**
922
+ *
923
+ * @summary Publish workflow
924
+ * @param {string} id System-generated unique identifier
925
+ * @param {PublishWorkflowRequest} [publishWorkflowRequest]
926
+ * @param {*} [options] Override http request option.
927
+ * @throws {RequiredError}
928
+ */
929
+ publishWorkflow(id: string, publishWorkflowRequest?: PublishWorkflowRequest, options?: any): AxiosPromise<CreateWorkflow201Response> {
930
+ return localVarFp.publishWorkflow(id, publishWorkflowRequest, options).then((request) => request(axios, basePath));
931
+ },
932
+ /**
933
+ *
934
+ * @summary Retrieve workflow
935
+ * @param {string} id System-generated unique identifier
936
+ * @param {string} [idType] Type of identifier used in the URL
937
+ * @param {string} [userKey] Unique user identifier
938
+ * @param {Array<string>} [expand] Expand related objects
939
+ * @param {*} [options] Override http request option.
940
+ * @throws {RequiredError}
941
+ */
942
+ retrieveWorkflow(id: string, idType?: string, userKey?: string, expand?: Array<string>, options?: any): AxiosPromise<CreateWorkflow201Response> {
943
+ return localVarFp.retrieveWorkflow(id, idType, userKey, expand, options).then((request) => request(axios, basePath));
944
+ },
945
+ /**
946
+ *
947
+ * @summary Trigger workflow
948
+ * @param {TriggerWorkflowRequest} [triggerWorkflowRequest]
949
+ * @param {*} [options] Override http request option.
950
+ * @throws {RequiredError}
951
+ */
952
+ triggerWorkflow(triggerWorkflowRequest?: TriggerWorkflowRequest, options?: any): AxiosPromise<object> {
953
+ return localVarFp.triggerWorkflow(triggerWorkflowRequest, options).then((request) => request(axios, basePath));
954
+ },
955
+ /**
956
+ *
957
+ * @summary Update workflow
958
+ * @param {string} id System-generated unique identifier
959
+ * @param {UpdateWorkflowRequest} [updateWorkflowRequest]
960
+ * @param {*} [options] Override http request option.
961
+ * @throws {RequiredError}
962
+ */
963
+ updateWorkflow(id: string, updateWorkflowRequest?: UpdateWorkflowRequest, options?: any): AxiosPromise<void> {
964
+ return localVarFp.updateWorkflow(id, updateWorkflowRequest, options).then((request) => request(axios, basePath));
965
+ },
966
+ };
967
+ };
968
+
969
+ /**
970
+ * WorkflowsApi - interface
971
+ * @export
972
+ * @interface WorkflowsApi
973
+ */
974
+ export interface WorkflowsApiInterface {
975
+ /**
976
+ *
977
+ * @summary Catch hook
978
+ * @param {string} hookId The trigger\&#39;s hook id used for third party webhooks
979
+ * @param {CatchHookRequest} [catchHookRequest]
980
+ * @param {*} [options] Override http request option.
981
+ * @throws {RequiredError}
982
+ * @memberof WorkflowsApiInterface
983
+ */
984
+ catchHook(hookId: string, catchHookRequest?: CatchHookRequest, options?: RawAxiosRequestConfig): AxiosPromise<object>;
985
+
986
+ /**
987
+ *
988
+ * @summary Clone workflow
989
+ * @param {string} id System-generated unique identifier
990
+ * @param {DiscardWorkflowDraftRequest} [discardWorkflowDraftRequest]
991
+ * @param {*} [options] Override http request option.
992
+ * @throws {RequiredError}
993
+ * @memberof WorkflowsApiInterface
994
+ */
995
+ cloneWorkflow(id: string, discardWorkflowDraftRequest?: DiscardWorkflowDraftRequest, options?: RawAxiosRequestConfig): AxiosPromise<ListWorkflows200ResponseCollectionInner>;
996
+
997
+ /**
998
+ *
999
+ * @summary Create workflow
1000
+ * @param {CreateWorkflowRequest} [createWorkflowRequest]
1001
+ * @param {*} [options] Override http request option.
1002
+ * @throws {RequiredError}
1003
+ * @memberof WorkflowsApiInterface
1004
+ */
1005
+ createWorkflow(createWorkflowRequest?: CreateWorkflowRequest, options?: RawAxiosRequestConfig): AxiosPromise<CreateWorkflow201Response>;
1006
+
1007
+ /**
1008
+ *
1009
+ * @summary Delete workflow
1010
+ * @param {string} id System-generated unique identifier
1011
+ * @param {string} [idType] Type of identifier used in the URL
1012
+ * @param {string} [userKey] Unique user identifier
1013
+ * @param {*} [options] Override http request option.
1014
+ * @throws {RequiredError}
1015
+ * @memberof WorkflowsApiInterface
1016
+ */
1017
+ deleteWorkflow(id: string, idType?: string, userKey?: string, options?: RawAxiosRequestConfig): AxiosPromise<DeleteWorkflow200Response>;
1018
+
1019
+ /**
1020
+ *
1021
+ * @summary Discard workflow draft
1022
+ * @param {string} id System-generated unique identifier
1023
+ * @param {DiscardWorkflowDraftRequest} [discardWorkflowDraftRequest]
1024
+ * @param {*} [options] Override http request option.
1025
+ * @throws {RequiredError}
1026
+ * @memberof WorkflowsApiInterface
1027
+ */
1028
+ discardWorkflowDraft(id: string, discardWorkflowDraftRequest?: DiscardWorkflowDraftRequest, options?: RawAxiosRequestConfig): AxiosPromise<CreateWorkflow201Response>;
1029
+
1030
+ /**
1031
+ *
1032
+ * @summary Execute workflow
1033
+ * @param {string} id System-generated unique identifier
1034
+ * @param {ExecuteWorkflowRequest} [executeWorkflowRequest]
1035
+ * @param {*} [options] Override http request option.
1036
+ * @throws {RequiredError}
1037
+ * @memberof WorkflowsApiInterface
1038
+ */
1039
+ executeWorkflow(id: string, executeWorkflowRequest?: ExecuteWorkflowRequest, options?: RawAxiosRequestConfig): AxiosPromise<ExecuteWorkflow201Response>;
1040
+
1041
+ /**
1042
+ *
1043
+ * @summary List workflow versions
1044
+ * @param {string} workflowId Filter results by workflow id
1045
+ * @param {string} [startingAfter] Cursor for pagination - return results after this ID
1046
+ * @param {string} [endingBefore] Cursor for pagination - return results before this ID
1047
+ * @param {number} [limit] Number of items to return (max 100)
1048
+ * @param {string} [userKey] Unique user identifier
1049
+ * @param {*} [options] Override http request option.
1050
+ * @throws {RequiredError}
1051
+ * @memberof WorkflowsApiInterface
1052
+ */
1053
+ listWorkflowVersions(workflowId: string, startingAfter?: string, endingBefore?: string, limit?: number, userKey?: string, options?: RawAxiosRequestConfig): AxiosPromise<ListWorkflowVersions200Response>;
1054
+
1055
+ /**
1056
+ *
1057
+ * @summary List workflows
1058
+ * @param {string} [startingAfter] Cursor for pagination - return results after this ID
1059
+ * @param {string} [endingBefore] Cursor for pagination - return results before this ID
1060
+ * @param {number} [limit] Number of items to return (max 100)
1061
+ * @param {Array<string>} [expand] Expand related objects
1062
+ * @param {string} [userKey] Unique user identifier
1063
+ * @param {boolean} [isTemplate] Filter workflows by is_template value
1064
+ * @param {boolean} [on] Filter workflows by on value
1065
+ * @param {string} [orderBy] Field to order results by
1066
+ * @param {ListWorkflowsOrderDirectionEnum} [orderDirection]
1067
+ * @param {*} [options] Override http request option.
1068
+ * @throws {RequiredError}
1069
+ * @memberof WorkflowsApiInterface
1070
+ */
1071
+ listWorkflows(startingAfter?: string, endingBefore?: string, limit?: number, expand?: Array<string>, userKey?: string, isTemplate?: boolean, on?: boolean, orderBy?: string, orderDirection?: ListWorkflowsOrderDirectionEnum, options?: RawAxiosRequestConfig): AxiosPromise<ListWorkflows200Response>;
1072
+
1073
+ /**
1074
+ *
1075
+ * @summary Publish workflow
1076
+ * @param {string} id System-generated unique identifier
1077
+ * @param {PublishWorkflowRequest} [publishWorkflowRequest]
1078
+ * @param {*} [options] Override http request option.
1079
+ * @throws {RequiredError}
1080
+ * @memberof WorkflowsApiInterface
1081
+ */
1082
+ publishWorkflow(id: string, publishWorkflowRequest?: PublishWorkflowRequest, options?: RawAxiosRequestConfig): AxiosPromise<CreateWorkflow201Response>;
1083
+
1084
+ /**
1085
+ *
1086
+ * @summary Retrieve workflow
1087
+ * @param {string} id System-generated unique identifier
1088
+ * @param {string} [idType] Type of identifier used in the URL
1089
+ * @param {string} [userKey] Unique user identifier
1090
+ * @param {Array<string>} [expand] Expand related objects
1091
+ * @param {*} [options] Override http request option.
1092
+ * @throws {RequiredError}
1093
+ * @memberof WorkflowsApiInterface
1094
+ */
1095
+ retrieveWorkflow(id: string, idType?: string, userKey?: string, expand?: Array<string>, options?: RawAxiosRequestConfig): AxiosPromise<CreateWorkflow201Response>;
1096
+
1097
+ /**
1098
+ *
1099
+ * @summary Trigger workflow
1100
+ * @param {TriggerWorkflowRequest} [triggerWorkflowRequest]
1101
+ * @param {*} [options] Override http request option.
1102
+ * @throws {RequiredError}
1103
+ * @memberof WorkflowsApiInterface
1104
+ */
1105
+ triggerWorkflow(triggerWorkflowRequest?: TriggerWorkflowRequest, options?: RawAxiosRequestConfig): AxiosPromise<object>;
1106
+
1107
+ /**
1108
+ *
1109
+ * @summary Update workflow
1110
+ * @param {string} id System-generated unique identifier
1111
+ * @param {UpdateWorkflowRequest} [updateWorkflowRequest]
1112
+ * @param {*} [options] Override http request option.
1113
+ * @throws {RequiredError}
1114
+ * @memberof WorkflowsApiInterface
1115
+ */
1116
+ updateWorkflow(id: string, updateWorkflowRequest?: UpdateWorkflowRequest, options?: RawAxiosRequestConfig): AxiosPromise<void>;
1117
+
1118
+ }
1119
+
1120
+ /**
1121
+ * WorkflowsApi - object-oriented interface
1122
+ * @export
1123
+ * @class WorkflowsApi
1124
+ * @extends {BaseAPI}
1125
+ */
1126
+ export class WorkflowsApi extends BaseAPI implements WorkflowsApiInterface {
1127
+ /**
1128
+ *
1129
+ * @summary Catch hook
1130
+ * @param {string} hookId The trigger\&#39;s hook id used for third party webhooks
1131
+ * @param {CatchHookRequest} [catchHookRequest]
1132
+ * @param {*} [options] Override http request option.
1133
+ * @throws {RequiredError}
1134
+ * @memberof WorkflowsApi
1135
+ */
1136
+ public catchHook(hookId: string, catchHookRequest?: CatchHookRequest, options?: RawAxiosRequestConfig) {
1137
+ return WorkflowsApiFp(this.configuration).catchHook(hookId, catchHookRequest, options).then((request) => request(this.axios, this.basePath));
1138
+ }
1139
+
1140
+ /**
1141
+ *
1142
+ * @summary Clone workflow
1143
+ * @param {string} id System-generated unique identifier
1144
+ * @param {DiscardWorkflowDraftRequest} [discardWorkflowDraftRequest]
1145
+ * @param {*} [options] Override http request option.
1146
+ * @throws {RequiredError}
1147
+ * @memberof WorkflowsApi
1148
+ */
1149
+ public cloneWorkflow(id: string, discardWorkflowDraftRequest?: DiscardWorkflowDraftRequest, options?: RawAxiosRequestConfig) {
1150
+ return WorkflowsApiFp(this.configuration).cloneWorkflow(id, discardWorkflowDraftRequest, options).then((request) => request(this.axios, this.basePath));
1151
+ }
1152
+
1153
+ /**
1154
+ *
1155
+ * @summary Create workflow
1156
+ * @param {CreateWorkflowRequest} [createWorkflowRequest]
1157
+ * @param {*} [options] Override http request option.
1158
+ * @throws {RequiredError}
1159
+ * @memberof WorkflowsApi
1160
+ */
1161
+ public createWorkflow(createWorkflowRequest?: CreateWorkflowRequest, options?: RawAxiosRequestConfig) {
1162
+ return WorkflowsApiFp(this.configuration).createWorkflow(createWorkflowRequest, options).then((request) => request(this.axios, this.basePath));
1163
+ }
1164
+
1165
+ /**
1166
+ *
1167
+ * @summary Delete workflow
1168
+ * @param {string} id System-generated unique identifier
1169
+ * @param {string} [idType] Type of identifier used in the URL
1170
+ * @param {string} [userKey] Unique user identifier
1171
+ * @param {*} [options] Override http request option.
1172
+ * @throws {RequiredError}
1173
+ * @memberof WorkflowsApi
1174
+ */
1175
+ public deleteWorkflow(id: string, idType?: string, userKey?: string, options?: RawAxiosRequestConfig) {
1176
+ return WorkflowsApiFp(this.configuration).deleteWorkflow(id, idType, userKey, options).then((request) => request(this.axios, this.basePath));
1177
+ }
1178
+
1179
+ /**
1180
+ *
1181
+ * @summary Discard workflow draft
1182
+ * @param {string} id System-generated unique identifier
1183
+ * @param {DiscardWorkflowDraftRequest} [discardWorkflowDraftRequest]
1184
+ * @param {*} [options] Override http request option.
1185
+ * @throws {RequiredError}
1186
+ * @memberof WorkflowsApi
1187
+ */
1188
+ public discardWorkflowDraft(id: string, discardWorkflowDraftRequest?: DiscardWorkflowDraftRequest, options?: RawAxiosRequestConfig) {
1189
+ return WorkflowsApiFp(this.configuration).discardWorkflowDraft(id, discardWorkflowDraftRequest, options).then((request) => request(this.axios, this.basePath));
1190
+ }
1191
+
1192
+ /**
1193
+ *
1194
+ * @summary Execute workflow
1195
+ * @param {string} id System-generated unique identifier
1196
+ * @param {ExecuteWorkflowRequest} [executeWorkflowRequest]
1197
+ * @param {*} [options] Override http request option.
1198
+ * @throws {RequiredError}
1199
+ * @memberof WorkflowsApi
1200
+ */
1201
+ public executeWorkflow(id: string, executeWorkflowRequest?: ExecuteWorkflowRequest, options?: RawAxiosRequestConfig) {
1202
+ return WorkflowsApiFp(this.configuration).executeWorkflow(id, executeWorkflowRequest, options).then((request) => request(this.axios, this.basePath));
1203
+ }
1204
+
1205
+ /**
1206
+ *
1207
+ * @summary List workflow versions
1208
+ * @param {string} workflowId Filter results by workflow id
1209
+ * @param {string} [startingAfter] Cursor for pagination - return results after this ID
1210
+ * @param {string} [endingBefore] Cursor for pagination - return results before this ID
1211
+ * @param {number} [limit] Number of items to return (max 100)
1212
+ * @param {string} [userKey] Unique user identifier
1213
+ * @param {*} [options] Override http request option.
1214
+ * @throws {RequiredError}
1215
+ * @memberof WorkflowsApi
1216
+ */
1217
+ public listWorkflowVersions(workflowId: string, startingAfter?: string, endingBefore?: string, limit?: number, userKey?: string, options?: RawAxiosRequestConfig) {
1218
+ return WorkflowsApiFp(this.configuration).listWorkflowVersions(workflowId, startingAfter, endingBefore, limit, userKey, options).then((request) => request(this.axios, this.basePath));
1219
+ }
1220
+
1221
+ /**
1222
+ *
1223
+ * @summary List workflows
1224
+ * @param {string} [startingAfter] Cursor for pagination - return results after this ID
1225
+ * @param {string} [endingBefore] Cursor for pagination - return results before this ID
1226
+ * @param {number} [limit] Number of items to return (max 100)
1227
+ * @param {Array<string>} [expand] Expand related objects
1228
+ * @param {string} [userKey] Unique user identifier
1229
+ * @param {boolean} [isTemplate] Filter workflows by is_template value
1230
+ * @param {boolean} [on] Filter workflows by on value
1231
+ * @param {string} [orderBy] Field to order results by
1232
+ * @param {ListWorkflowsOrderDirectionEnum} [orderDirection]
1233
+ * @param {*} [options] Override http request option.
1234
+ * @throws {RequiredError}
1235
+ * @memberof WorkflowsApi
1236
+ */
1237
+ public listWorkflows(startingAfter?: string, endingBefore?: string, limit?: number, expand?: Array<string>, userKey?: string, isTemplate?: boolean, on?: boolean, orderBy?: string, orderDirection?: ListWorkflowsOrderDirectionEnum, options?: RawAxiosRequestConfig) {
1238
+ return WorkflowsApiFp(this.configuration).listWorkflows(startingAfter, endingBefore, limit, expand, userKey, isTemplate, on, orderBy, orderDirection, options).then((request) => request(this.axios, this.basePath));
1239
+ }
1240
+
1241
+ /**
1242
+ *
1243
+ * @summary Publish workflow
1244
+ * @param {string} id System-generated unique identifier
1245
+ * @param {PublishWorkflowRequest} [publishWorkflowRequest]
1246
+ * @param {*} [options] Override http request option.
1247
+ * @throws {RequiredError}
1248
+ * @memberof WorkflowsApi
1249
+ */
1250
+ public publishWorkflow(id: string, publishWorkflowRequest?: PublishWorkflowRequest, options?: RawAxiosRequestConfig) {
1251
+ return WorkflowsApiFp(this.configuration).publishWorkflow(id, publishWorkflowRequest, options).then((request) => request(this.axios, this.basePath));
1252
+ }
1253
+
1254
+ /**
1255
+ *
1256
+ * @summary Retrieve workflow
1257
+ * @param {string} id System-generated unique identifier
1258
+ * @param {string} [idType] Type of identifier used in the URL
1259
+ * @param {string} [userKey] Unique user identifier
1260
+ * @param {Array<string>} [expand] Expand related objects
1261
+ * @param {*} [options] Override http request option.
1262
+ * @throws {RequiredError}
1263
+ * @memberof WorkflowsApi
1264
+ */
1265
+ public retrieveWorkflow(id: string, idType?: string, userKey?: string, expand?: Array<string>, options?: RawAxiosRequestConfig) {
1266
+ return WorkflowsApiFp(this.configuration).retrieveWorkflow(id, idType, userKey, expand, options).then((request) => request(this.axios, this.basePath));
1267
+ }
1268
+
1269
+ /**
1270
+ *
1271
+ * @summary Trigger workflow
1272
+ * @param {TriggerWorkflowRequest} [triggerWorkflowRequest]
1273
+ * @param {*} [options] Override http request option.
1274
+ * @throws {RequiredError}
1275
+ * @memberof WorkflowsApi
1276
+ */
1277
+ public triggerWorkflow(triggerWorkflowRequest?: TriggerWorkflowRequest, options?: RawAxiosRequestConfig) {
1278
+ return WorkflowsApiFp(this.configuration).triggerWorkflow(triggerWorkflowRequest, options).then((request) => request(this.axios, this.basePath));
1279
+ }
1280
+
1281
+ /**
1282
+ *
1283
+ * @summary Update workflow
1284
+ * @param {string} id System-generated unique identifier
1285
+ * @param {UpdateWorkflowRequest} [updateWorkflowRequest]
1286
+ * @param {*} [options] Override http request option.
1287
+ * @throws {RequiredError}
1288
+ * @memberof WorkflowsApi
1289
+ */
1290
+ public updateWorkflow(id: string, updateWorkflowRequest?: UpdateWorkflowRequest, options?: RawAxiosRequestConfig) {
1291
+ return WorkflowsApiFp(this.configuration).updateWorkflow(id, updateWorkflowRequest, options).then((request) => request(this.axios, this.basePath));
1292
+ }
1293
+ }
1294
+
1295
+ /**
1296
+ * @export
1297
+ */
1298
+ export const ListWorkflowsOrderDirectionEnum = {
1299
+ Asc: 'asc',
1300
+ Desc: 'desc'
1301
+ } as const;
1302
+ export type ListWorkflowsOrderDirectionEnum = typeof ListWorkflowsOrderDirectionEnum[keyof typeof ListWorkflowsOrderDirectionEnum];