@embedworkflow/sdk 1.1.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 (218) 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 +16 -11
  26. package/dist/api/action-types-api.js +14 -7
  27. package/dist/api/actions-api.d.ts +6 -6
  28. package/dist/api/app-connections-api.d.ts +5 -5
  29. package/dist/api/available-apps-api.d.ts +2 -2
  30. package/dist/api/data-fields-api.d.ts +46 -2
  31. package/dist/api/data-fields-api.js +68 -0
  32. package/dist/api/events-api.d.ts +1 -1
  33. package/dist/api/executions-api.d.ts +3 -3
  34. package/dist/api/installed-apps-api.d.ts +4 -4
  35. package/dist/api/payments-api.d.ts +1 -1
  36. package/dist/api/triggers-api.d.ts +14 -14
  37. package/dist/api/triggers-api.js +12 -12
  38. package/dist/api/users-api.d.ts +14 -9
  39. package/dist/api/users-api.js +14 -7
  40. package/dist/api/workflows-api.d.ts +96 -15
  41. package/dist/api/workflows-api.js +125 -8
  42. package/dist/common.d.ts +1 -1
  43. package/dist/esm/api/accounts-api.d.ts +124 -3
  44. package/dist/esm/api/accounts-api.js +181 -0
  45. package/dist/esm/api/action-types-api.d.ts +16 -11
  46. package/dist/esm/api/action-types-api.js +14 -7
  47. package/dist/esm/api/actions-api.d.ts +6 -6
  48. package/dist/esm/api/app-connections-api.d.ts +5 -5
  49. package/dist/esm/api/available-apps-api.d.ts +2 -2
  50. package/dist/esm/api/data-fields-api.d.ts +46 -2
  51. package/dist/esm/api/data-fields-api.js +69 -1
  52. package/dist/esm/api/events-api.d.ts +1 -1
  53. package/dist/esm/api/executions-api.d.ts +3 -3
  54. package/dist/esm/api/installed-apps-api.d.ts +4 -4
  55. package/dist/esm/api/payments-api.d.ts +1 -1
  56. package/dist/esm/api/triggers-api.d.ts +14 -14
  57. package/dist/esm/api/triggers-api.js +12 -12
  58. package/dist/esm/api/users-api.d.ts +14 -9
  59. package/dist/esm/api/users-api.js +14 -7
  60. package/dist/esm/api/workflows-api.d.ts +96 -15
  61. package/dist/esm/api/workflows-api.js +124 -7
  62. package/dist/esm/common.d.ts +1 -1
  63. package/dist/esm/models/catch-hook-request.d.ts +25 -0
  64. package/dist/esm/models/create-action-type-request-form-draft-inner.d.ts +6 -0
  65. package/dist/esm/models/create-action-type-request.d.ts +12 -0
  66. package/dist/esm/models/create-workflow201-response.d.ts +58 -11
  67. package/dist/esm/models/create-workflow201-response.js +4 -0
  68. package/dist/esm/models/evaluate-expression-request.d.ts +32 -0
  69. package/dist/esm/models/evaluate-expression200-response.d.ts +24 -0
  70. package/dist/esm/models/export-configuration200-response-configuration.d.ts +16 -0
  71. package/dist/esm/models/export-configuration200-response.d.ts +25 -0
  72. package/dist/esm/models/index.d.ts +9 -0
  73. package/dist/esm/models/index.js +9 -0
  74. package/dist/esm/models/list-action-types200-response-collection-inner.d.ts +58 -0
  75. package/dist/esm/models/list-action-types200-response-collection-inner.js +9 -0
  76. package/dist/esm/models/list-data-fields200-response-collection-inner.d.ts +18 -0
  77. package/dist/esm/models/list-triggers200-response-collection-inner.d.ts +18 -0
  78. package/dist/esm/models/list-users200-response-collection-inner.d.ts +6 -6
  79. package/dist/esm/models/list-workflows200-response-collection-inner.d.ts +29 -5
  80. package/dist/esm/models/retrieve-account-usage200-response.d.ts +60 -0
  81. package/dist/esm/models/retrieve-account-usage200-response.js +14 -0
  82. package/dist/esm/models/retrieve-account200-response.d.ts +19 -1
  83. package/dist/esm/models/{api-v1-action-types-post-request-icon-draft.d.ts → update-account-request-action-type-categories-inner-icon.d.ts} +10 -10
  84. package/dist/esm/models/update-account-request-action-type-categories-inner-icon.js +14 -0
  85. package/dist/esm/models/update-account-request-action-type-categories-inner.d.ts +43 -0
  86. package/dist/esm/models/update-account-request-action-type-categories-inner.js +14 -0
  87. package/dist/esm/models/update-account-request.d.ts +13 -0
  88. package/dist/esm/models/update-action-type-request.d.ts +12 -0
  89. package/dist/esm/models/update-trigger-request.d.ts +30 -0
  90. package/dist/esm/models/update-trigger-request.js +14 -0
  91. package/dist/esm/models/update-workflow-request.d.ts +7 -1
  92. package/dist/esm/models/upsert-user-request.d.ts +6 -0
  93. package/dist/models/catch-hook-request.d.ts +25 -0
  94. package/dist/models/create-action-type-request-form-draft-inner.d.ts +6 -0
  95. package/dist/models/create-action-type-request.d.ts +12 -0
  96. package/dist/models/create-workflow201-response.d.ts +58 -11
  97. package/dist/models/create-workflow201-response.js +5 -1
  98. package/dist/models/evaluate-expression-request.d.ts +32 -0
  99. package/dist/models/evaluate-expression200-response.d.ts +24 -0
  100. package/dist/models/export-configuration200-response-configuration.d.ts +16 -0
  101. package/dist/models/export-configuration200-response.d.ts +25 -0
  102. package/dist/models/index.d.ts +9 -0
  103. package/dist/models/index.js +9 -0
  104. package/dist/models/list-action-types200-response-collection-inner.d.ts +58 -0
  105. package/dist/models/list-action-types200-response-collection-inner.js +10 -1
  106. package/dist/models/list-data-fields200-response-collection-inner.d.ts +18 -0
  107. package/dist/models/list-triggers200-response-collection-inner.d.ts +18 -0
  108. package/dist/models/list-users200-response-collection-inner.d.ts +6 -6
  109. package/dist/models/list-workflows200-response-collection-inner.d.ts +29 -5
  110. package/dist/models/retrieve-account-usage200-response.d.ts +60 -0
  111. package/dist/models/retrieve-account-usage200-response.js +15 -0
  112. package/dist/models/retrieve-account200-response.d.ts +19 -1
  113. package/dist/{esm/models/retrieve-action-type404-response.d.ts → models/update-account-request-action-type-categories-inner-icon.d.ts} +12 -12
  114. package/dist/models/update-account-request-action-type-categories-inner-icon.js +15 -0
  115. package/dist/models/update-account-request-action-type-categories-inner.d.ts +43 -0
  116. package/dist/models/update-account-request-action-type-categories-inner.js +15 -0
  117. package/dist/models/update-account-request.d.ts +13 -0
  118. package/dist/models/update-action-type-request.d.ts +12 -0
  119. package/dist/models/update-trigger-request.d.ts +30 -0
  120. package/dist/models/update-trigger-request.js +15 -0
  121. package/dist/models/update-workflow-request.d.ts +7 -1
  122. package/dist/models/upsert-user-request.d.ts +6 -0
  123. package/git_push.sh +57 -0
  124. package/index.ts +111 -0
  125. package/models/catch-hook-request.ts +32 -0
  126. package/models/create-action-type-request-form-draft-inner.ts +88 -0
  127. package/{dist/models/api-v1-action-types-post-request-icon-draft.d.ts → models/create-action-type-request-icon-draft.ts} +12 -6
  128. package/{dist/models/api-v1-action-types-post-request.d.ts → models/create-action-type-request.ts} +49 -25
  129. package/{dist/models/retrieve-action-type404-response.d.ts → models/create-action-type422-response.ts} +13 -7
  130. package/{dist/esm/models/api-v1-app-connections-post-request.d.ts → models/create-app-connection-request.ts} +14 -8
  131. package/models/create-user-token-request.ts +38 -0
  132. package/models/create-user-token200-response.ts +30 -0
  133. package/models/create-workflow-request-template-draft-nodes-inner.ts +138 -0
  134. package/models/create-workflow-request-template-draft.ts +39 -0
  135. package/models/create-workflow-request.ts +75 -0
  136. package/{dist/esm/models/retrieve-workflow200-response.d.ts → models/create-workflow201-response.ts} +111 -60
  137. package/models/delete-action-type200-response.ts +30 -0
  138. package/{dist/esm/models/api-v1-action-types-post-request-form-draft-inner.js → models/delete-workflow200-response-one-of.ts} +18 -13
  139. package/models/delete-workflow200-response-one-of1.ts +30 -0
  140. package/models/delete-workflow200-response.ts +30 -0
  141. package/models/discard-workflow-draft-request.ts +36 -0
  142. package/models/evaluate-expression-request.ts +36 -0
  143. package/models/evaluate-expression200-response.ts +30 -0
  144. package/models/execute-workflow-request.ts +50 -0
  145. package/models/execute-workflow201-response.ts +126 -0
  146. package/models/export-configuration200-response-configuration.ts +23 -0
  147. package/models/export-configuration200-response.ts +33 -0
  148. package/models/import-configuration-request-schema.ts +24 -0
  149. package/models/import-configuration-request.ts +50 -0
  150. package/models/import-configuration201-response.ts +60 -0
  151. package/models/index.ts +70 -0
  152. package/models/install-app-request.ts +36 -0
  153. package/{dist/models/retrieve-installed-app200-response.d.ts → models/install-app201-response.ts} +28 -24
  154. package/models/list-action-types200-response-collection-inner.ts +325 -0
  155. package/models/list-action-types200-response-meta.ts +42 -0
  156. package/models/list-action-types200-response.ts +42 -0
  157. package/models/list-actions200-response-collection-inner.ts +150 -0
  158. package/models/list-actions200-response.ts +42 -0
  159. package/models/list-app-connections200-response-collection-inner.ts +72 -0
  160. package/models/list-app-connections200-response.ts +42 -0
  161. package/models/list-available-apps200-response-collection-inner.ts +72 -0
  162. package/models/list-available-apps200-response.ts +42 -0
  163. package/{dist/esm/models/clone-workflow201-response.js → models/list-data-fields-type-parameter.ts} +11 -5
  164. package/models/list-data-fields200-response-collection-inner.ts +108 -0
  165. package/models/list-data-fields200-response.ts +42 -0
  166. package/models/list-events200-response-collection-inner.ts +84 -0
  167. package/models/list-events200-response.ts +42 -0
  168. package/{dist/esm/models/retrieve-installed-app200-response.d.ts → models/list-installed-apps200-response-collection-inner.ts} +26 -28
  169. package/models/list-installed-apps200-response.ts +42 -0
  170. package/models/list-triggers200-response-collection-inner.ts +126 -0
  171. package/models/list-triggers200-response.ts +42 -0
  172. package/models/list-users200-response-collection-inner.ts +90 -0
  173. package/models/list-users200-response.ts +42 -0
  174. package/models/list-workflow-executions200-response.ts +42 -0
  175. package/models/list-workflow-versions200-response-collection-inner.ts +66 -0
  176. package/models/list-workflow-versions200-response.ts +42 -0
  177. package/{dist/models/retrieve-workflow200-response.d.ts → models/list-workflows200-response-collection-inner.ts} +76 -79
  178. package/models/list-workflows200-response.ts +42 -0
  179. package/models/publish-workflow-request.ts +30 -0
  180. package/models/retrieve-account-usage200-response.ts +66 -0
  181. package/models/retrieve-account200-response.ts +114 -0
  182. package/models/retrieve-available-app200-response.ts +78 -0
  183. package/models/retrieve-execution200-response.ts +138 -0
  184. package/models/retry-action-request.ts +38 -0
  185. package/models/stop-executions-request.ts +38 -0
  186. package/models/trigger-workflow-request.ts +54 -0
  187. package/models/update-account-request-action-type-categories-inner-icon.ts +42 -0
  188. package/models/update-account-request-action-type-categories-inner.ts +51 -0
  189. package/models/update-account-request-user-data-schema-inner.ts +54 -0
  190. package/models/update-account-request.ts +96 -0
  191. package/models/update-action-type-request.ts +48 -0
  192. package/models/update-installed-app-request.ts +30 -0
  193. package/models/update-trigger-request.ts +36 -0
  194. package/models/update-workflow-request.ts +93 -0
  195. package/models/upsert-user-request.ts +54 -0
  196. package/package.json +4 -6
  197. package/tsconfig.esm.json +7 -0
  198. package/tsconfig.json +18 -0
  199. package/dist/esm/models/api-v1-action-types-post-request-form-draft-inner.d.ts +0 -75
  200. package/dist/esm/models/api-v1-action-types-post-request.d.ts +0 -105
  201. package/dist/esm/models/clone-workflow201-response.d.ts +0 -183
  202. package/dist/esm/models/retrieve-workflow200-response.js +0 -17
  203. package/dist/models/api-v1-action-types-post-request-form-draft-inner.d.ts +0 -75
  204. package/dist/models/api-v1-action-types-post-request-form-draft-inner.js +0 -28
  205. package/dist/models/api-v1-app-connections-post-request.d.ts +0 -42
  206. package/dist/models/clone-workflow201-response.d.ts +0 -183
  207. package/dist/models/clone-workflow201-response.js +0 -20
  208. package/dist/models/retrieve-workflow200-response.js +0 -20
  209. /package/dist/esm/models/{api-v1-action-types-post-request-icon-draft.js → catch-hook-request.js} +0 -0
  210. /package/dist/esm/models/{api-v1-action-types-post-request.js → evaluate-expression-request.js} +0 -0
  211. /package/dist/esm/models/{api-v1-app-connections-post-request.js → evaluate-expression200-response.js} +0 -0
  212. /package/dist/esm/models/{retrieve-action-type404-response.js → export-configuration200-response-configuration.js} +0 -0
  213. /package/dist/esm/models/{retrieve-installed-app200-response.js → export-configuration200-response.js} +0 -0
  214. /package/dist/models/{api-v1-action-types-post-request-icon-draft.js → catch-hook-request.js} +0 -0
  215. /package/dist/models/{api-v1-action-types-post-request.js → evaluate-expression-request.js} +0 -0
  216. /package/dist/models/{api-v1-app-connections-post-request.js → evaluate-expression200-response.js} +0 -0
  217. /package/dist/models/{retrieve-action-type404-response.js → export-configuration200-response-configuration.js} +0 -0
  218. /package/dist/models/{retrieve-installed-app200-response.js → export-configuration200-response.js} +0 -0
@@ -0,0 +1,540 @@
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 { ExportConfiguration200Response } from '../models';
26
+ // @ts-ignore
27
+ import { ImportConfiguration201Response } from '../models';
28
+ // @ts-ignore
29
+ import { ImportConfigurationRequest } from '../models';
30
+ // @ts-ignore
31
+ import { RetrieveAccount200Response } from '../models';
32
+ // @ts-ignore
33
+ import { RetrieveAccountUsage200Response } from '../models';
34
+ // @ts-ignore
35
+ import { UpdateAccountRequest } from '../models';
36
+ /**
37
+ * AccountsApi - axios parameter creator
38
+ * @export
39
+ */
40
+ export const AccountsApiAxiosParamCreator = function (configuration?: Configuration) {
41
+ return {
42
+ /**
43
+ *
44
+ * @summary Export configuration
45
+ * @param {ExportConfigurationSchemaFormatEnum} [schemaFormat]
46
+ * @param {Array<ExportConfigurationSectionsEnum>} [sections]
47
+ * @param {*} [options] Override http request option.
48
+ * @throws {RequiredError}
49
+ */
50
+ exportConfiguration: async (schemaFormat?: ExportConfigurationSchemaFormatEnum, sections?: Array<ExportConfigurationSectionsEnum>, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
51
+ const localVarPath = `/api/v1/configurations/export`;
52
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
53
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
54
+ let baseOptions;
55
+ if (configuration) {
56
+ baseOptions = configuration.baseOptions;
57
+ }
58
+
59
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
60
+ const localVarHeaderParameter = {} as any;
61
+ const localVarQueryParameter = {} as any;
62
+
63
+ // authentication bearer required
64
+ // http bearer authentication required
65
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
66
+
67
+ if (schemaFormat !== undefined) {
68
+ localVarQueryParameter['schema_format'] = schemaFormat;
69
+ }
70
+
71
+ if (sections) {
72
+ localVarQueryParameter['sections'] = sections;
73
+ }
74
+
75
+
76
+
77
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
78
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
79
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
80
+
81
+ return {
82
+ url: toPathString(localVarUrlObj),
83
+ options: localVarRequestOptions,
84
+ };
85
+ },
86
+ /**
87
+ *
88
+ * @summary Import configuration
89
+ * @param {ImportConfigurationRequest} [importConfigurationRequest]
90
+ * @param {*} [options] Override http request option.
91
+ * @throws {RequiredError}
92
+ */
93
+ importConfiguration: async (importConfigurationRequest?: ImportConfigurationRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
94
+ const localVarPath = `/api/v1/configurations/import`;
95
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
96
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
97
+ let baseOptions;
98
+ if (configuration) {
99
+ baseOptions = configuration.baseOptions;
100
+ }
101
+
102
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
103
+ const localVarHeaderParameter = {} as any;
104
+ const localVarQueryParameter = {} as any;
105
+
106
+ // authentication bearer required
107
+ // http bearer authentication required
108
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
109
+
110
+
111
+
112
+ localVarHeaderParameter['Content-Type'] = 'application/json';
113
+
114
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
115
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
116
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
117
+ localVarRequestOptions.data = serializeDataIfNeeded(importConfigurationRequest, localVarRequestOptions, configuration)
118
+
119
+ return {
120
+ url: toPathString(localVarUrlObj),
121
+ options: localVarRequestOptions,
122
+ };
123
+ },
124
+ /**
125
+ *
126
+ * @summary Retrieve account
127
+ * @param {*} [options] Override http request option.
128
+ * @throws {RequiredError}
129
+ */
130
+ retrieveAccount: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
131
+ const localVarPath = `/api/v1/account`;
132
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
133
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
134
+ let baseOptions;
135
+ if (configuration) {
136
+ baseOptions = configuration.baseOptions;
137
+ }
138
+
139
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
140
+ const localVarHeaderParameter = {} as any;
141
+ const localVarQueryParameter = {} as any;
142
+
143
+ // authentication bearer required
144
+ // http bearer authentication required
145
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
146
+
147
+
148
+
149
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
150
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
151
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
152
+
153
+ return {
154
+ url: toPathString(localVarUrlObj),
155
+ options: localVarRequestOptions,
156
+ };
157
+ },
158
+ /**
159
+ *
160
+ * @summary Retrieve account usage
161
+ * @param {string} [startTime]
162
+ * @param {string} [endTime]
163
+ * @param {string} [userKey] User key to filter usage for a specific user
164
+ * @param {*} [options] Override http request option.
165
+ * @throws {RequiredError}
166
+ */
167
+ retrieveAccountUsage: async (startTime?: string, endTime?: string, userKey?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
168
+ const localVarPath = `/api/v1/account/usage`;
169
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
170
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
171
+ let baseOptions;
172
+ if (configuration) {
173
+ baseOptions = configuration.baseOptions;
174
+ }
175
+
176
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
177
+ const localVarHeaderParameter = {} as any;
178
+ const localVarQueryParameter = {} as any;
179
+
180
+ // authentication bearer required
181
+ // http bearer authentication required
182
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
183
+
184
+ if (startTime !== undefined) {
185
+ localVarQueryParameter['start_time'] = (startTime as any instanceof Date) ?
186
+ (startTime as any).toISOString() :
187
+ startTime;
188
+ }
189
+
190
+ if (endTime !== undefined) {
191
+ localVarQueryParameter['end_time'] = (endTime as any instanceof Date) ?
192
+ (endTime as any).toISOString() :
193
+ endTime;
194
+ }
195
+
196
+ if (userKey !== undefined) {
197
+ localVarQueryParameter['user_key'] = userKey;
198
+ }
199
+
200
+
201
+
202
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
203
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
204
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
205
+
206
+ return {
207
+ url: toPathString(localVarUrlObj),
208
+ options: localVarRequestOptions,
209
+ };
210
+ },
211
+ /**
212
+ *
213
+ * @summary Update account
214
+ * @param {UpdateAccountRequest} [updateAccountRequest]
215
+ * @param {*} [options] Override http request option.
216
+ * @throws {RequiredError}
217
+ */
218
+ updateAccount: async (updateAccountRequest?: UpdateAccountRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
219
+ const localVarPath = `/api/v1/account`;
220
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
221
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
222
+ let baseOptions;
223
+ if (configuration) {
224
+ baseOptions = configuration.baseOptions;
225
+ }
226
+
227
+ const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
228
+ const localVarHeaderParameter = {} as any;
229
+ const localVarQueryParameter = {} as any;
230
+
231
+ // authentication bearer required
232
+ // http bearer authentication required
233
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
234
+
235
+
236
+
237
+ localVarHeaderParameter['Content-Type'] = 'application/json';
238
+
239
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
240
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
241
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
242
+ localVarRequestOptions.data = serializeDataIfNeeded(updateAccountRequest, localVarRequestOptions, configuration)
243
+
244
+ return {
245
+ url: toPathString(localVarUrlObj),
246
+ options: localVarRequestOptions,
247
+ };
248
+ },
249
+ }
250
+ };
251
+
252
+ /**
253
+ * AccountsApi - functional programming interface
254
+ * @export
255
+ */
256
+ export const AccountsApiFp = function(configuration?: Configuration) {
257
+ const localVarAxiosParamCreator = AccountsApiAxiosParamCreator(configuration)
258
+ return {
259
+ /**
260
+ *
261
+ * @summary Export configuration
262
+ * @param {ExportConfigurationSchemaFormatEnum} [schemaFormat]
263
+ * @param {Array<ExportConfigurationSectionsEnum>} [sections]
264
+ * @param {*} [options] Override http request option.
265
+ * @throws {RequiredError}
266
+ */
267
+ async exportConfiguration(schemaFormat?: ExportConfigurationSchemaFormatEnum, sections?: Array<ExportConfigurationSectionsEnum>, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ExportConfiguration200Response>> {
268
+ const localVarAxiosArgs = await localVarAxiosParamCreator.exportConfiguration(schemaFormat, sections, options);
269
+ const index = configuration?.serverIndex ?? 0;
270
+ const operationBasePath = operationServerMap['AccountsApi.exportConfiguration']?.[index]?.url;
271
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath);
272
+ },
273
+ /**
274
+ *
275
+ * @summary Import configuration
276
+ * @param {ImportConfigurationRequest} [importConfigurationRequest]
277
+ * @param {*} [options] Override http request option.
278
+ * @throws {RequiredError}
279
+ */
280
+ async importConfiguration(importConfigurationRequest?: ImportConfigurationRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ImportConfiguration201Response>> {
281
+ const localVarAxiosArgs = await localVarAxiosParamCreator.importConfiguration(importConfigurationRequest, options);
282
+ const index = configuration?.serverIndex ?? 0;
283
+ const operationBasePath = operationServerMap['AccountsApi.importConfiguration']?.[index]?.url;
284
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath);
285
+ },
286
+ /**
287
+ *
288
+ * @summary Retrieve account
289
+ * @param {*} [options] Override http request option.
290
+ * @throws {RequiredError}
291
+ */
292
+ async retrieveAccount(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RetrieveAccount200Response>> {
293
+ const localVarAxiosArgs = await localVarAxiosParamCreator.retrieveAccount(options);
294
+ const index = configuration?.serverIndex ?? 0;
295
+ const operationBasePath = operationServerMap['AccountsApi.retrieveAccount']?.[index]?.url;
296
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath);
297
+ },
298
+ /**
299
+ *
300
+ * @summary Retrieve account usage
301
+ * @param {string} [startTime]
302
+ * @param {string} [endTime]
303
+ * @param {string} [userKey] User key to filter usage for a specific user
304
+ * @param {*} [options] Override http request option.
305
+ * @throws {RequiredError}
306
+ */
307
+ async retrieveAccountUsage(startTime?: string, endTime?: string, userKey?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RetrieveAccountUsage200Response>> {
308
+ const localVarAxiosArgs = await localVarAxiosParamCreator.retrieveAccountUsage(startTime, endTime, userKey, options);
309
+ const index = configuration?.serverIndex ?? 0;
310
+ const operationBasePath = operationServerMap['AccountsApi.retrieveAccountUsage']?.[index]?.url;
311
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath);
312
+ },
313
+ /**
314
+ *
315
+ * @summary Update account
316
+ * @param {UpdateAccountRequest} [updateAccountRequest]
317
+ * @param {*} [options] Override http request option.
318
+ * @throws {RequiredError}
319
+ */
320
+ async updateAccount(updateAccountRequest?: UpdateAccountRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RetrieveAccount200Response>> {
321
+ const localVarAxiosArgs = await localVarAxiosParamCreator.updateAccount(updateAccountRequest, options);
322
+ const index = configuration?.serverIndex ?? 0;
323
+ const operationBasePath = operationServerMap['AccountsApi.updateAccount']?.[index]?.url;
324
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath);
325
+ },
326
+ }
327
+ };
328
+
329
+ /**
330
+ * AccountsApi - factory interface
331
+ * @export
332
+ */
333
+ export const AccountsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
334
+ const localVarFp = AccountsApiFp(configuration)
335
+ return {
336
+ /**
337
+ *
338
+ * @summary Export configuration
339
+ * @param {ExportConfigurationSchemaFormatEnum} [schemaFormat]
340
+ * @param {Array<ExportConfigurationSectionsEnum>} [sections]
341
+ * @param {*} [options] Override http request option.
342
+ * @throws {RequiredError}
343
+ */
344
+ exportConfiguration(schemaFormat?: ExportConfigurationSchemaFormatEnum, sections?: Array<ExportConfigurationSectionsEnum>, options?: any): AxiosPromise<ExportConfiguration200Response> {
345
+ return localVarFp.exportConfiguration(schemaFormat, sections, options).then((request) => request(axios, basePath));
346
+ },
347
+ /**
348
+ *
349
+ * @summary Import configuration
350
+ * @param {ImportConfigurationRequest} [importConfigurationRequest]
351
+ * @param {*} [options] Override http request option.
352
+ * @throws {RequiredError}
353
+ */
354
+ importConfiguration(importConfigurationRequest?: ImportConfigurationRequest, options?: any): AxiosPromise<ImportConfiguration201Response> {
355
+ return localVarFp.importConfiguration(importConfigurationRequest, options).then((request) => request(axios, basePath));
356
+ },
357
+ /**
358
+ *
359
+ * @summary Retrieve account
360
+ * @param {*} [options] Override http request option.
361
+ * @throws {RequiredError}
362
+ */
363
+ retrieveAccount(options?: any): AxiosPromise<RetrieveAccount200Response> {
364
+ return localVarFp.retrieveAccount(options).then((request) => request(axios, basePath));
365
+ },
366
+ /**
367
+ *
368
+ * @summary Retrieve account usage
369
+ * @param {string} [startTime]
370
+ * @param {string} [endTime]
371
+ * @param {string} [userKey] User key to filter usage for a specific user
372
+ * @param {*} [options] Override http request option.
373
+ * @throws {RequiredError}
374
+ */
375
+ retrieveAccountUsage(startTime?: string, endTime?: string, userKey?: string, options?: any): AxiosPromise<RetrieveAccountUsage200Response> {
376
+ return localVarFp.retrieveAccountUsage(startTime, endTime, userKey, options).then((request) => request(axios, basePath));
377
+ },
378
+ /**
379
+ *
380
+ * @summary Update account
381
+ * @param {UpdateAccountRequest} [updateAccountRequest]
382
+ * @param {*} [options] Override http request option.
383
+ * @throws {RequiredError}
384
+ */
385
+ updateAccount(updateAccountRequest?: UpdateAccountRequest, options?: any): AxiosPromise<RetrieveAccount200Response> {
386
+ return localVarFp.updateAccount(updateAccountRequest, options).then((request) => request(axios, basePath));
387
+ },
388
+ };
389
+ };
390
+
391
+ /**
392
+ * AccountsApi - interface
393
+ * @export
394
+ * @interface AccountsApi
395
+ */
396
+ export interface AccountsApiInterface {
397
+ /**
398
+ *
399
+ * @summary Export configuration
400
+ * @param {ExportConfigurationSchemaFormatEnum} [schemaFormat]
401
+ * @param {Array<ExportConfigurationSectionsEnum>} [sections]
402
+ * @param {*} [options] Override http request option.
403
+ * @throws {RequiredError}
404
+ * @memberof AccountsApiInterface
405
+ */
406
+ exportConfiguration(schemaFormat?: ExportConfigurationSchemaFormatEnum, sections?: Array<ExportConfigurationSectionsEnum>, options?: RawAxiosRequestConfig): AxiosPromise<ExportConfiguration200Response>;
407
+
408
+ /**
409
+ *
410
+ * @summary Import configuration
411
+ * @param {ImportConfigurationRequest} [importConfigurationRequest]
412
+ * @param {*} [options] Override http request option.
413
+ * @throws {RequiredError}
414
+ * @memberof AccountsApiInterface
415
+ */
416
+ importConfiguration(importConfigurationRequest?: ImportConfigurationRequest, options?: RawAxiosRequestConfig): AxiosPromise<ImportConfiguration201Response>;
417
+
418
+ /**
419
+ *
420
+ * @summary Retrieve account
421
+ * @param {*} [options] Override http request option.
422
+ * @throws {RequiredError}
423
+ * @memberof AccountsApiInterface
424
+ */
425
+ retrieveAccount(options?: RawAxiosRequestConfig): AxiosPromise<RetrieveAccount200Response>;
426
+
427
+ /**
428
+ *
429
+ * @summary Retrieve account usage
430
+ * @param {string} [startTime]
431
+ * @param {string} [endTime]
432
+ * @param {string} [userKey] User key to filter usage for a specific user
433
+ * @param {*} [options] Override http request option.
434
+ * @throws {RequiredError}
435
+ * @memberof AccountsApiInterface
436
+ */
437
+ retrieveAccountUsage(startTime?: string, endTime?: string, userKey?: string, options?: RawAxiosRequestConfig): AxiosPromise<RetrieveAccountUsage200Response>;
438
+
439
+ /**
440
+ *
441
+ * @summary Update account
442
+ * @param {UpdateAccountRequest} [updateAccountRequest]
443
+ * @param {*} [options] Override http request option.
444
+ * @throws {RequiredError}
445
+ * @memberof AccountsApiInterface
446
+ */
447
+ updateAccount(updateAccountRequest?: UpdateAccountRequest, options?: RawAxiosRequestConfig): AxiosPromise<RetrieveAccount200Response>;
448
+
449
+ }
450
+
451
+ /**
452
+ * AccountsApi - object-oriented interface
453
+ * @export
454
+ * @class AccountsApi
455
+ * @extends {BaseAPI}
456
+ */
457
+ export class AccountsApi extends BaseAPI implements AccountsApiInterface {
458
+ /**
459
+ *
460
+ * @summary Export configuration
461
+ * @param {ExportConfigurationSchemaFormatEnum} [schemaFormat]
462
+ * @param {Array<ExportConfigurationSectionsEnum>} [sections]
463
+ * @param {*} [options] Override http request option.
464
+ * @throws {RequiredError}
465
+ * @memberof AccountsApi
466
+ */
467
+ public exportConfiguration(schemaFormat?: ExportConfigurationSchemaFormatEnum, sections?: Array<ExportConfigurationSectionsEnum>, options?: RawAxiosRequestConfig) {
468
+ return AccountsApiFp(this.configuration).exportConfiguration(schemaFormat, sections, options).then((request) => request(this.axios, this.basePath));
469
+ }
470
+
471
+ /**
472
+ *
473
+ * @summary Import configuration
474
+ * @param {ImportConfigurationRequest} [importConfigurationRequest]
475
+ * @param {*} [options] Override http request option.
476
+ * @throws {RequiredError}
477
+ * @memberof AccountsApi
478
+ */
479
+ public importConfiguration(importConfigurationRequest?: ImportConfigurationRequest, options?: RawAxiosRequestConfig) {
480
+ return AccountsApiFp(this.configuration).importConfiguration(importConfigurationRequest, options).then((request) => request(this.axios, this.basePath));
481
+ }
482
+
483
+ /**
484
+ *
485
+ * @summary Retrieve account
486
+ * @param {*} [options] Override http request option.
487
+ * @throws {RequiredError}
488
+ * @memberof AccountsApi
489
+ */
490
+ public retrieveAccount(options?: RawAxiosRequestConfig) {
491
+ return AccountsApiFp(this.configuration).retrieveAccount(options).then((request) => request(this.axios, this.basePath));
492
+ }
493
+
494
+ /**
495
+ *
496
+ * @summary Retrieve account usage
497
+ * @param {string} [startTime]
498
+ * @param {string} [endTime]
499
+ * @param {string} [userKey] User key to filter usage for a specific user
500
+ * @param {*} [options] Override http request option.
501
+ * @throws {RequiredError}
502
+ * @memberof AccountsApi
503
+ */
504
+ public retrieveAccountUsage(startTime?: string, endTime?: string, userKey?: string, options?: RawAxiosRequestConfig) {
505
+ return AccountsApiFp(this.configuration).retrieveAccountUsage(startTime, endTime, userKey, options).then((request) => request(this.axios, this.basePath));
506
+ }
507
+
508
+ /**
509
+ *
510
+ * @summary Update account
511
+ * @param {UpdateAccountRequest} [updateAccountRequest]
512
+ * @param {*} [options] Override http request option.
513
+ * @throws {RequiredError}
514
+ * @memberof AccountsApi
515
+ */
516
+ public updateAccount(updateAccountRequest?: UpdateAccountRequest, options?: RawAxiosRequestConfig) {
517
+ return AccountsApiFp(this.configuration).updateAccount(updateAccountRequest, options).then((request) => request(this.axios, this.basePath));
518
+ }
519
+ }
520
+
521
+ /**
522
+ * @export
523
+ */
524
+ export const ExportConfigurationSchemaFormatEnum = {
525
+ Yaml: 'yaml',
526
+ Json: 'json'
527
+ } as const;
528
+ export type ExportConfigurationSchemaFormatEnum = typeof ExportConfigurationSchemaFormatEnum[keyof typeof ExportConfigurationSchemaFormatEnum];
529
+ /**
530
+ * @export
531
+ */
532
+ export const ExportConfigurationSectionsEnum = {
533
+ ActionTypes: 'action_types',
534
+ Triggers: 'triggers',
535
+ Workflows: 'workflows',
536
+ Apps: 'apps',
537
+ UserDataSchema: 'user_data_schema',
538
+ AccountDataSchema: 'account_data_schema'
539
+ } as const;
540
+ export type ExportConfigurationSectionsEnum = typeof ExportConfigurationSectionsEnum[keyof typeof ExportConfigurationSectionsEnum];