@enbbox/api 1.0.0 → 1.1.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 (378) hide show
  1. package/.openapi-generator/FILES +375 -0
  2. package/.openapi-generator/VERSION +1 -0
  3. package/.openapi-generator-ignore +23 -0
  4. package/README.md +2 -2
  5. package/api/activity-api.ts +756 -0
  6. package/api/billing-api.ts +673 -0
  7. package/api/channel-connections-api.ts +510 -0
  8. package/api/channel-endpoints-api.ts +510 -0
  9. package/api/contexts-api.ts +534 -0
  10. package/api/events-api.ts +394 -0
  11. package/api/feature-flags-api.ts +132 -0
  12. package/api/health-api.ts +264 -0
  13. package/api/inbound-parse-api.ts +137 -0
  14. package/api/inbox-api.ts +1151 -0
  15. package/api/integrations-api.ts +833 -0
  16. package/api/layouts-api.ts +849 -0
  17. package/api/messages-api.ts +349 -0
  18. package/api/metrics-api.ts +128 -0
  19. package/api/notification-groups-api.ts +391 -0
  20. package/api/notifications-api.ts +326 -0
  21. package/api/preferences-api.ts +333 -0
  22. package/api/projects-api.ts +1075 -0
  23. package/api/subscribers-api.ts +1542 -0
  24. package/api/topics-api.ts +1352 -0
  25. package/api/translations-api.ts +462 -0
  26. package/api/webhooks-api.ts +397 -0
  27. package/api/workflows-api.ts +970 -0
  28. package/api.ts +40 -0
  29. package/base.ts +62 -0
  30. package/common.ts +127 -0
  31. package/configuration.ts +121 -0
  32. package/dist/esm/models/init-session-response.d.ts +4 -0
  33. package/dist/models/init-session-response.d.ts +4 -0
  34. package/docs/ActionBody.md +21 -0
  35. package/docs/ActionRecord.md +25 -0
  36. package/docs/ActionType.md +17 -0
  37. package/docs/ActivityApi.md +412 -0
  38. package/docs/ActivityChartPoint.md +31 -0
  39. package/docs/ActivityRecord.md +39 -0
  40. package/docs/ActivityRequestRecord.md +31 -0
  41. package/docs/ActivityStats.md +31 -0
  42. package/docs/ActorType.md +15 -0
  43. package/docs/ApiKeyCreated.md +27 -0
  44. package/docs/ApiKeyInfo.md +27 -0
  45. package/docs/AutoConfigureResult.md +21 -0
  46. package/docs/BillingApi.md +375 -0
  47. package/docs/BillingInterval.md +11 -0
  48. package/docs/Branding.md +31 -0
  49. package/docs/BroadcastTrigger.md +27 -0
  50. package/docs/BulkCreateSubscribers.md +21 -0
  51. package/docs/BulkPreferenceItem.md +24 -0
  52. package/docs/BulkPreferences.md +21 -0
  53. package/docs/BulkResult.md +22 -0
  54. package/docs/BulkTrigger.md +21 -0
  55. package/docs/ChannelConnectionRecord.md +31 -0
  56. package/docs/ChannelConnectionsApi.md +276 -0
  57. package/docs/ChannelEndpointRecord.md +33 -0
  58. package/docs/ChannelEndpointsApi.md +276 -0
  59. package/docs/ChannelPreferences.md +29 -0
  60. package/docs/ChannelType.md +17 -0
  61. package/docs/ChartQuery.md +21 -0
  62. package/docs/ChatOauth.md +21 -0
  63. package/docs/ChatOauthRequest.md +22 -0
  64. package/docs/CheckoutSession.md +23 -0
  65. package/docs/ContextRecord.md +29 -0
  66. package/docs/ContextsApi.md +285 -0
  67. package/docs/CreateChannelConnection.md +27 -0
  68. package/docs/CreateChannelEndpoint.md +29 -0
  69. package/docs/CreateCheckout.md +23 -0
  70. package/docs/CreateContext.md +25 -0
  71. package/docs/CreateIntegration.md +31 -0
  72. package/docs/CreateLayout.md +31 -0
  73. package/docs/CreateNotificationGroup.md +21 -0
  74. package/docs/CreateProject.md +21 -0
  75. package/docs/CreateSubscriber.md +37 -0
  76. package/docs/CreateSubscription.md +21 -0
  77. package/docs/CreateTopic.md +23 -0
  78. package/docs/CreateWebhook.md +23 -0
  79. package/docs/CreateWorkflow.md +35 -0
  80. package/docs/CtaType.md +9 -0
  81. package/docs/CursorMeta.md +27 -0
  82. package/docs/CursorPaginatedFeedItem.md +23 -0
  83. package/docs/CursorPaginatedFeedItemDataInner.md +37 -0
  84. package/docs/CursorPaginatedMessageRecord.md +23 -0
  85. package/docs/CursorPaginatedMessageRecordDataInner.md +41 -0
  86. package/docs/CursorPagination.md +25 -0
  87. package/docs/DeleteSubscription.md +20 -0
  88. package/docs/DeliveryAck.md +21 -0
  89. package/docs/DeliveryStatusWebhook.md +27 -0
  90. package/docs/DnsSettings.md +23 -0
  91. package/docs/EngagementStatsResponse.md +27 -0
  92. package/docs/EntitlementItem.md +25 -0
  93. package/docs/Entitlements.md +21 -0
  94. package/docs/ErrorDetail.md +27 -0
  95. package/docs/EventsApi.md +214 -0
  96. package/docs/EventsUsage.md +23 -0
  97. package/docs/FeatureFlagsApi.md +51 -0
  98. package/docs/FeedItem.md +37 -0
  99. package/docs/FeedQuery.md +31 -0
  100. package/docs/HealthApi.md +140 -0
  101. package/docs/InboundParseApi.md +59 -0
  102. package/docs/InboxApi.md +673 -0
  103. package/docs/InboxNotification.md +41 -0
  104. package/docs/InboxPreference.md +23 -0
  105. package/docs/InboxQuery.md +27 -0
  106. package/docs/InitSessionRequest.md +23 -0
  107. package/docs/InitSessionResponse.md +25 -0
  108. package/docs/IntegrationRecord.md +35 -0
  109. package/docs/IntegrationsApi.md +475 -0
  110. package/docs/InviteMember.md +23 -0
  111. package/docs/InviteMemberBody.md +23 -0
  112. package/docs/JobLog.md +33 -0
  113. package/docs/LayoutPreview.md +21 -0
  114. package/docs/LayoutPreviewResult.md +21 -0
  115. package/docs/LayoutRecord.md +31 -0
  116. package/docs/LayoutUsageItem.md +23 -0
  117. package/docs/LayoutsApi.md +484 -0
  118. package/docs/MarkAll.md +21 -0
  119. package/docs/MarkMessages.md +23 -0
  120. package/docs/MarkResult.md +21 -0
  121. package/docs/MemberRecord.md +27 -0
  122. package/docs/MemberRole.md +15 -0
  123. package/docs/MemberStatus.md +13 -0
  124. package/docs/MessageQuery.md +31 -0
  125. package/docs/MessageRecord.md +41 -0
  126. package/docs/MessagesApi.md +175 -0
  127. package/docs/MetricsApi.md +51 -0
  128. package/docs/NotificationCount.md +25 -0
  129. package/docs/NotificationGroupRecord.md +23 -0
  130. package/docs/NotificationGroupsApi.md +209 -0
  131. package/docs/NotificationLog.md +33 -0
  132. package/docs/NotificationQuery.md +25 -0
  133. package/docs/NotificationsApi.md +166 -0
  134. package/docs/OffsetMeta.md +27 -0
  135. package/docs/OffsetPagination.md +27 -0
  136. package/docs/OnlineStatus.md +21 -0
  137. package/docs/PaginatedChannelConnectionRecord.md +23 -0
  138. package/docs/PaginatedChannelConnectionRecordDataInner.md +31 -0
  139. package/docs/PaginatedChannelEndpointRecord.md +23 -0
  140. package/docs/PaginatedChannelEndpointRecordDataInner.md +33 -0
  141. package/docs/PaginatedContextRecord.md +23 -0
  142. package/docs/PaginatedContextRecordDataInner.md +29 -0
  143. package/docs/PaginatedIntegrationRecord.md +23 -0
  144. package/docs/PaginatedIntegrationRecordDataInner.md +35 -0
  145. package/docs/PaginatedLayoutRecord.md +23 -0
  146. package/docs/PaginatedLayoutRecordDataInner.md +31 -0
  147. package/docs/PaginatedSubscriberRecord.md +23 -0
  148. package/docs/PaginatedSubscriberRecordDataInner.md +41 -0
  149. package/docs/PaginatedTopicRecord.md +23 -0
  150. package/docs/PaginatedTopicRecordDataInner.md +24 -0
  151. package/docs/PaginatedTopicSubscriptionRecord.md +23 -0
  152. package/docs/PaginatedTopicSubscriptionRecordDataInner.md +29 -0
  153. package/docs/PaginatedWorkflowRecord.md +23 -0
  154. package/docs/PaginatedWorkflowRecordDataInner.md +37 -0
  155. package/docs/PaginationQuery.md +25 -0
  156. package/docs/PatchCredentials.md +27 -0
  157. package/docs/Plan.md +17 -0
  158. package/docs/PlanLimitsResponse.md +33 -0
  159. package/docs/PortalUrl.md +21 -0
  160. package/docs/PreferenceChannels.md +29 -0
  161. package/docs/PreferenceRecord.md +27 -0
  162. package/docs/PreferencesApi.md +171 -0
  163. package/docs/PreviewResult.md +20 -0
  164. package/docs/PriceInfo.md +27 -0
  165. package/docs/Prices.md +21 -0
  166. package/docs/ProjectRecord.md +27 -0
  167. package/docs/ProjectsApi.md +638 -0
  168. package/docs/SetCredentials.md +27 -0
  169. package/docs/StepPreview.md +21 -0
  170. package/docs/StepRecord.md +29 -0
  171. package/docs/StepType.md +27 -0
  172. package/docs/SubscriberCredential.md +27 -0
  173. package/docs/SubscriberPayload.md +37 -0
  174. package/docs/SubscriberRecord.md +41 -0
  175. package/docs/SubscribersApi.md +887 -0
  176. package/docs/Subscription.md +39 -0
  177. package/docs/SyncWorkflow.md +21 -0
  178. package/docs/SystemAvatarIcon.md +19 -0
  179. package/docs/TopicRecord.md +24 -0
  180. package/docs/TopicSubscribers.md +21 -0
  181. package/docs/TopicSubscription.md +23 -0
  182. package/docs/TopicSubscriptionRecord.md +29 -0
  183. package/docs/TopicsApi.md +777 -0
  184. package/docs/TranslationsApi.md +258 -0
  185. package/docs/TrialInfo.md +27 -0
  186. package/docs/TriggerEvent.md +31 -0
  187. package/docs/TriggerRecipients.md +39 -0
  188. package/docs/TriggerRecipientsOneOf.md +21 -0
  189. package/docs/TriggerResult.md +25 -0
  190. package/docs/TriggerStatus.md +21 -0
  191. package/docs/UnseenCount.md +21 -0
  192. package/docs/UpdateChannelConnection.md +21 -0
  193. package/docs/UpdateChannelEndpoint.md +23 -0
  194. package/docs/UpdateContext.md +21 -0
  195. package/docs/UpdateInboxPreferences.md +29 -0
  196. package/docs/UpdateIntegration.md +27 -0
  197. package/docs/UpdateLayout.md +27 -0
  198. package/docs/UpdateNotificationGroup.md +21 -0
  199. package/docs/UpdatePreference.md +23 -0
  200. package/docs/UpdateProject.md +23 -0
  201. package/docs/UpdateSubscriber.md +35 -0
  202. package/docs/UpdateSubscriptionMeta.md +21 -0
  203. package/docs/UpdateTopic.md +21 -0
  204. package/docs/UpdateWorkflow.md +31 -0
  205. package/docs/Usage.md +35 -0
  206. package/docs/WebhookRecord.md +31 -0
  207. package/docs/WebhooksApi.md +212 -0
  208. package/docs/WidgetSettings.md +21 -0
  209. package/docs/WorkflowRecord.md +37 -0
  210. package/docs/WorkflowRunRecord.md +31 -0
  211. package/docs/WorkflowStatsResponse.md +27 -0
  212. package/docs/WorkflowStatus.md +21 -0
  213. package/docs/WorkflowStepCreate.md +31 -0
  214. package/docs/WorkflowsApi.md +550 -0
  215. package/git_push.sh +57 -0
  216. package/index.ts +18 -0
  217. package/models/action-body.ts +26 -0
  218. package/models/action-record.ts +28 -0
  219. package/models/action-type.ts +32 -0
  220. package/models/activity-chart-point.ts +46 -0
  221. package/models/activity-record.ts +62 -0
  222. package/models/activity-request-record.ts +46 -0
  223. package/models/activity-stats.ts +46 -0
  224. package/models/actor-type.ts +31 -0
  225. package/models/api-key-created.ts +38 -0
  226. package/models/api-key-info.ts +38 -0
  227. package/models/auto-configure-result.ts +23 -0
  228. package/models/billing-interval.ts +29 -0
  229. package/models/branding.ts +46 -0
  230. package/models/broadcast-trigger.ts +29 -0
  231. package/models/bulk-create-subscribers.ts +26 -0
  232. package/models/bulk-preference-item.ts +25 -0
  233. package/models/bulk-preferences.ts +26 -0
  234. package/models/bulk-result.ts +24 -0
  235. package/models/bulk-trigger.ts +29 -0
  236. package/models/channel-connection-record.ts +43 -0
  237. package/models/channel-endpoint-record.ts +47 -0
  238. package/models/channel-preferences.ts +27 -0
  239. package/models/channel-type.ts +32 -0
  240. package/models/chart-query.ts +26 -0
  241. package/models/chat-oauth-request.ts +21 -0
  242. package/models/chat-oauth.ts +23 -0
  243. package/models/checkout-session.ts +35 -0
  244. package/models/context-record.ts +42 -0
  245. package/models/create-channel-connection.ts +35 -0
  246. package/models/create-channel-endpoint.ts +39 -0
  247. package/models/create-checkout.ts +35 -0
  248. package/models/create-context.ts +34 -0
  249. package/models/create-integration.ts +51 -0
  250. package/models/create-layout.ts +34 -0
  251. package/models/create-notification-group.ts +26 -0
  252. package/models/create-project.ts +26 -0
  253. package/models/create-subscriber.ts +58 -0
  254. package/models/create-subscription.ts +23 -0
  255. package/models/create-topic.ts +30 -0
  256. package/models/create-webhook.ts +30 -0
  257. package/models/create-workflow.ts +60 -0
  258. package/models/cta-type.ts +28 -0
  259. package/models/cursor-meta.ts +38 -0
  260. package/models/cursor-paginated-feed-item-data-inner.ts +40 -0
  261. package/models/cursor-paginated-feed-item.ts +36 -0
  262. package/models/cursor-paginated-message-record-data-inner.ts +45 -0
  263. package/models/cursor-paginated-message-record.ts +36 -0
  264. package/models/cursor-pagination.ts +34 -0
  265. package/models/delete-subscription.ts +20 -0
  266. package/models/delivery-ack.ts +23 -0
  267. package/models/delivery-status-webhook.ts +29 -0
  268. package/models/dns-settings.ts +30 -0
  269. package/models/engagement-stats-response.ts +38 -0
  270. package/models/entitlement-item.ts +34 -0
  271. package/models/entitlements.ts +26 -0
  272. package/models/error-detail.ts +38 -0
  273. package/models/events-usage.ts +30 -0
  274. package/models/feed-item.ts +40 -0
  275. package/models/feed-query.ts +28 -0
  276. package/models/inbox-notification.ts +39 -0
  277. package/models/inbox-preference.ts +27 -0
  278. package/models/inbox-query.ts +26 -0
  279. package/models/index.ts +158 -0
  280. package/models/init-session-request.ts +30 -0
  281. package/models/init-session-response.ts +34 -0
  282. package/models/integration-record.ts +59 -0
  283. package/models/invite-member-body.ts +30 -0
  284. package/models/invite-member.ts +30 -0
  285. package/models/job-log.ts +47 -0
  286. package/models/layout-preview-result.ts +23 -0
  287. package/models/layout-preview.ts +23 -0
  288. package/models/layout-record.ts +37 -0
  289. package/models/layout-usage-item.ts +24 -0
  290. package/models/mark-all.ts +23 -0
  291. package/models/mark-messages.ts +24 -0
  292. package/models/mark-result.ts +23 -0
  293. package/models/member-record.ts +38 -0
  294. package/models/member-role.ts +31 -0
  295. package/models/member-status.ts +30 -0
  296. package/models/message-query.ts +46 -0
  297. package/models/message-record.ts +45 -0
  298. package/models/notification-count.ts +25 -0
  299. package/models/notification-group-record.ts +30 -0
  300. package/models/notification-log.ts +41 -0
  301. package/models/notification-query.ts +34 -0
  302. package/models/offset-meta.ts +38 -0
  303. package/models/offset-pagination.ts +38 -0
  304. package/models/online-status.ts +23 -0
  305. package/models/paginated-channel-connection-record-data-inner.ts +43 -0
  306. package/models/paginated-channel-connection-record.ts +36 -0
  307. package/models/paginated-channel-endpoint-record-data-inner.ts +47 -0
  308. package/models/paginated-channel-endpoint-record.ts +36 -0
  309. package/models/paginated-context-record-data-inner.ts +42 -0
  310. package/models/paginated-context-record.ts +36 -0
  311. package/models/paginated-integration-record-data-inner.ts +59 -0
  312. package/models/paginated-integration-record.ts +36 -0
  313. package/models/paginated-layout-record-data-inner.ts +37 -0
  314. package/models/paginated-layout-record.ts +36 -0
  315. package/models/paginated-subscriber-record-data-inner.ts +69 -0
  316. package/models/paginated-subscriber-record.ts +36 -0
  317. package/models/paginated-topic-record-data-inner.ts +28 -0
  318. package/models/paginated-topic-record.ts +36 -0
  319. package/models/paginated-topic-subscription-record-data-inner.ts +39 -0
  320. package/models/paginated-topic-subscription-record.ts +36 -0
  321. package/models/paginated-workflow-record-data-inner.ts +58 -0
  322. package/models/paginated-workflow-record.ts +36 -0
  323. package/models/pagination-query.ts +34 -0
  324. package/models/patch-credentials.ts +29 -0
  325. package/models/plan-limits-response.ts +55 -0
  326. package/models/plan.ts +32 -0
  327. package/models/portal-url.ts +26 -0
  328. package/models/preference-channels.ts +27 -0
  329. package/models/preference-record.ts +32 -0
  330. package/models/preview-result.ts +20 -0
  331. package/models/price-info.ts +38 -0
  332. package/models/prices.ts +26 -0
  333. package/models/project-record.ts +46 -0
  334. package/models/set-credentials.ts +29 -0
  335. package/models/step-preview.ts +23 -0
  336. package/models/step-record.ts +36 -0
  337. package/models/step-type.ts +37 -0
  338. package/models/subscriber-credential.ts +26 -0
  339. package/models/subscriber-payload.ts +24 -0
  340. package/models/subscriber-record.ts +69 -0
  341. package/models/subscription.ts +73 -0
  342. package/models/sync-workflow.ts +26 -0
  343. package/models/system-avatar-icon.ts +33 -0
  344. package/models/topic-record.ts +28 -0
  345. package/models/topic-subscribers.ts +23 -0
  346. package/models/topic-subscription-record.ts +39 -0
  347. package/models/topic-subscription.ts +27 -0
  348. package/models/trial-info.ts +38 -0
  349. package/models/trigger-event.ts +49 -0
  350. package/models/trigger-recipients-one-of.ts +23 -0
  351. package/models/trigger-recipients.ts +29 -0
  352. package/models/trigger-result.ts +39 -0
  353. package/models/trigger-status.ts +34 -0
  354. package/models/unseen-count.ts +23 -0
  355. package/models/update-channel-connection.ts +23 -0
  356. package/models/update-channel-endpoint.ts +27 -0
  357. package/models/update-context.ts +26 -0
  358. package/models/update-inbox-preferences.ts +27 -0
  359. package/models/update-integration.ts +38 -0
  360. package/models/update-layout.ts +29 -0
  361. package/models/update-notification-group.ts +26 -0
  362. package/models/update-preference.ts +27 -0
  363. package/models/update-project.ts +33 -0
  364. package/models/update-subscriber.ts +54 -0
  365. package/models/update-subscription-meta.ts +23 -0
  366. package/models/update-topic.ts +26 -0
  367. package/models/update-workflow.ts +52 -0
  368. package/models/usage.ts +59 -0
  369. package/models/webhook-record.ts +46 -0
  370. package/models/widget-settings.ts +26 -0
  371. package/models/workflow-record.ts +58 -0
  372. package/models/workflow-run-record.ts +46 -0
  373. package/models/workflow-stats-response.ts +38 -0
  374. package/models/workflow-status.ts +26 -0
  375. package/models/workflow-step-create.ts +51 -0
  376. package/package.json +9 -33
  377. package/tsconfig.esm.json +7 -0
  378. package/tsconfig.json +18 -0
@@ -0,0 +1,970 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * enbbox API
5
+ * Notification infrastructure API — open-source alternative to Novu/Courier
6
+ *
7
+ * The version of the OpenAPI document: 0.1.0
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, replaceWithSerializableTypeIfNeeded } from '../common';
22
+ // @ts-ignore
23
+ import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base';
24
+ // @ts-ignore
25
+ import type { CreateWorkflow } from '../models';
26
+ // @ts-ignore
27
+ import type { ErrorDetail } from '../models';
28
+ // @ts-ignore
29
+ import type { PaginatedWorkflowRecord } from '../models';
30
+ // @ts-ignore
31
+ import type { PreviewResult } from '../models';
32
+ // @ts-ignore
33
+ import type { StepPreview } from '../models';
34
+ // @ts-ignore
35
+ import type { StepRecord } from '../models';
36
+ // @ts-ignore
37
+ import type { SyncWorkflow } from '../models';
38
+ // @ts-ignore
39
+ import type { UpdateWorkflow } from '../models';
40
+ // @ts-ignore
41
+ import type { WorkflowRecord } from '../models';
42
+ // @ts-ignore
43
+ import type { WorkflowStatus } from '../models';
44
+ /**
45
+ * WorkflowsApi - axios parameter creator
46
+ */
47
+ export const WorkflowsApiAxiosParamCreator = function (configuration?: Configuration) {
48
+ return {
49
+ /**
50
+ *
51
+ * @summary POST /v1/workflows
52
+ * @param {CreateWorkflow} createWorkflow
53
+ * @param {*} [options] Override http request option.
54
+ * @throws {RequiredError}
55
+ */
56
+ createWorkflow: async (createWorkflow: CreateWorkflow, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
57
+ // verify required parameter 'createWorkflow' is not null or undefined
58
+ assertParamExists('createWorkflow', 'createWorkflow', createWorkflow)
59
+ const localVarPath = `/v1/workflows/`;
60
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
61
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
62
+ let baseOptions;
63
+ if (configuration) {
64
+ baseOptions = configuration.baseOptions;
65
+ }
66
+
67
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
68
+ const localVarHeaderParameter = {} as any;
69
+ const localVarQueryParameter = {} as any;
70
+
71
+ // authentication bearer_auth required
72
+ // http bearer authentication required
73
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
74
+
75
+ localVarHeaderParameter['Content-Type'] = 'application/json';
76
+ localVarHeaderParameter['Accept'] = 'application/json';
77
+
78
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
79
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
80
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
81
+ localVarRequestOptions.data = serializeDataIfNeeded(createWorkflow, localVarRequestOptions, configuration)
82
+
83
+ return {
84
+ url: toPathString(localVarUrlObj),
85
+ options: localVarRequestOptions,
86
+ };
87
+ },
88
+ /**
89
+ *
90
+ * @summary DELETE /v1/workflows/:id
91
+ * @param {string} id Workflow ID
92
+ * @param {*} [options] Override http request option.
93
+ * @throws {RequiredError}
94
+ */
95
+ deleteWorkflow: async (id: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
96
+ // verify required parameter 'id' is not null or undefined
97
+ assertParamExists('deleteWorkflow', 'id', id)
98
+ const localVarPath = `/v1/workflows/{id}/`
99
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
100
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
101
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
102
+ let baseOptions;
103
+ if (configuration) {
104
+ baseOptions = configuration.baseOptions;
105
+ }
106
+
107
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
108
+ const localVarHeaderParameter = {} as any;
109
+ const localVarQueryParameter = {} as any;
110
+
111
+ // authentication bearer_auth required
112
+ // http bearer authentication required
113
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
114
+
115
+
116
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
117
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
118
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
119
+
120
+ return {
121
+ url: toPathString(localVarUrlObj),
122
+ options: localVarRequestOptions,
123
+ };
124
+ },
125
+ /**
126
+ *
127
+ * @summary POST /v1/workflows/:id/duplicate — clone workflow
128
+ * @param {string} id
129
+ * @param {*} [options] Override http request option.
130
+ * @throws {RequiredError}
131
+ */
132
+ duplicateWorkflow: async (id: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
133
+ // verify required parameter 'id' is not null or undefined
134
+ assertParamExists('duplicateWorkflow', 'id', id)
135
+ const localVarPath = `/v1/workflows/{id}/duplicate/`
136
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
137
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
138
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
139
+ let baseOptions;
140
+ if (configuration) {
141
+ baseOptions = configuration.baseOptions;
142
+ }
143
+
144
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
145
+ const localVarHeaderParameter = {} as any;
146
+ const localVarQueryParameter = {} as any;
147
+
148
+ // authentication bearer_auth required
149
+ // http bearer authentication required
150
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
151
+
152
+ localVarHeaderParameter['Accept'] = 'application/json';
153
+
154
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
155
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
156
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
157
+
158
+ return {
159
+ url: toPathString(localVarUrlObj),
160
+ options: localVarRequestOptions,
161
+ };
162
+ },
163
+ /**
164
+ *
165
+ * @summary GET /v1/workflows/:id/steps/:step_id — get step details
166
+ * @param {string} id
167
+ * @param {string} stepId
168
+ * @param {*} [options] Override http request option.
169
+ * @throws {RequiredError}
170
+ */
171
+ getStep: async (id: string, stepId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
172
+ // verify required parameter 'id' is not null or undefined
173
+ assertParamExists('getStep', 'id', id)
174
+ // verify required parameter 'stepId' is not null or undefined
175
+ assertParamExists('getStep', 'stepId', stepId)
176
+ const localVarPath = `/v1/workflows/{id}/steps/{step_id}/`
177
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)))
178
+ .replace(`{${"step_id"}}`, encodeURIComponent(String(stepId)));
179
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
180
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
181
+ let baseOptions;
182
+ if (configuration) {
183
+ baseOptions = configuration.baseOptions;
184
+ }
185
+
186
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
187
+ const localVarHeaderParameter = {} as any;
188
+ const localVarQueryParameter = {} as any;
189
+
190
+ // authentication bearer_auth required
191
+ // http bearer authentication required
192
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
193
+
194
+ localVarHeaderParameter['Accept'] = 'application/json';
195
+
196
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
197
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
198
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
199
+
200
+ return {
201
+ url: toPathString(localVarUrlObj),
202
+ options: localVarRequestOptions,
203
+ };
204
+ },
205
+ /**
206
+ *
207
+ * @summary GET /v1/workflows/:id
208
+ * @param {string} id Workflow ID
209
+ * @param {*} [options] Override http request option.
210
+ * @throws {RequiredError}
211
+ */
212
+ getWorkflow: async (id: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
213
+ // verify required parameter 'id' is not null or undefined
214
+ assertParamExists('getWorkflow', 'id', id)
215
+ const localVarPath = `/v1/workflows/{id}/`
216
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
217
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
218
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
219
+ let baseOptions;
220
+ if (configuration) {
221
+ baseOptions = configuration.baseOptions;
222
+ }
223
+
224
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
225
+ const localVarHeaderParameter = {} as any;
226
+ const localVarQueryParameter = {} as any;
227
+
228
+ // authentication bearer_auth required
229
+ // http bearer authentication required
230
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
231
+
232
+ localVarHeaderParameter['Accept'] = 'application/json';
233
+
234
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
235
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
236
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
237
+
238
+ return {
239
+ url: toPathString(localVarUrlObj),
240
+ options: localVarRequestOptions,
241
+ };
242
+ },
243
+ /**
244
+ *
245
+ * @summary GET /v1/workflows
246
+ * @param {number | null} [limit] Maximum number of items to return (1–100, default: 10).
247
+ * @param {number | null} [offset] Number of items to skip before returning results (default: 0).
248
+ * @param {string | null} [q] Optional full-text search query. When present, listing is powered by Typesense full-text search.
249
+ * @param {string | null} [filterBy] Optional Typesense filter expression for narrowing results. Example: &#x60;identifier:&#x3D;acme-corp&#x60; or &#x60;name:&#x3D;General&#x60;.
250
+ * @param {*} [options] Override http request option.
251
+ * @throws {RequiredError}
252
+ */
253
+ listWorkflows: async (limit?: number | null, offset?: number | null, q?: string | null, filterBy?: string | null, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
254
+ const localVarPath = `/v1/workflows/`;
255
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
256
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
257
+ let baseOptions;
258
+ if (configuration) {
259
+ baseOptions = configuration.baseOptions;
260
+ }
261
+
262
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
263
+ const localVarHeaderParameter = {} as any;
264
+ const localVarQueryParameter = {} as any;
265
+
266
+ // authentication bearer_auth required
267
+ // http bearer authentication required
268
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
269
+
270
+ if (limit !== undefined) {
271
+ localVarQueryParameter['limit'] = limit;
272
+ }
273
+
274
+ if (offset !== undefined) {
275
+ localVarQueryParameter['offset'] = offset;
276
+ }
277
+
278
+ if (q !== undefined) {
279
+ localVarQueryParameter['q'] = q;
280
+ }
281
+
282
+ if (filterBy !== undefined) {
283
+ localVarQueryParameter['filter_by'] = filterBy;
284
+ }
285
+
286
+ localVarHeaderParameter['Accept'] = 'application/json';
287
+
288
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
289
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
290
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
291
+
292
+ return {
293
+ url: toPathString(localVarUrlObj),
294
+ options: localVarRequestOptions,
295
+ };
296
+ },
297
+ /**
298
+ *
299
+ * @summary POST /v1/workflows/:id/step/:step_id/preview — render step template
300
+ * @param {string} id
301
+ * @param {string} stepId
302
+ * @param {StepPreview} stepPreview
303
+ * @param {*} [options] Override http request option.
304
+ * @throws {RequiredError}
305
+ */
306
+ stepPreview: async (id: string, stepId: string, stepPreview: StepPreview, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
307
+ // verify required parameter 'id' is not null or undefined
308
+ assertParamExists('stepPreview', 'id', id)
309
+ // verify required parameter 'stepId' is not null or undefined
310
+ assertParamExists('stepPreview', 'stepId', stepId)
311
+ // verify required parameter 'stepPreview' is not null or undefined
312
+ assertParamExists('stepPreview', 'stepPreview', stepPreview)
313
+ const localVarPath = `/v1/workflows/{id}/step/{step_id}/preview/`
314
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)))
315
+ .replace(`{${"step_id"}}`, encodeURIComponent(String(stepId)));
316
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
317
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
318
+ let baseOptions;
319
+ if (configuration) {
320
+ baseOptions = configuration.baseOptions;
321
+ }
322
+
323
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
324
+ const localVarHeaderParameter = {} as any;
325
+ const localVarQueryParameter = {} as any;
326
+
327
+ // authentication bearer_auth required
328
+ // http bearer authentication required
329
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
330
+
331
+ localVarHeaderParameter['Content-Type'] = 'application/json';
332
+ localVarHeaderParameter['Accept'] = 'application/json';
333
+
334
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
335
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
336
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
337
+ localVarRequestOptions.data = serializeDataIfNeeded(stepPreview, localVarRequestOptions, configuration)
338
+
339
+ return {
340
+ url: toPathString(localVarUrlObj),
341
+ options: localVarRequestOptions,
342
+ };
343
+ },
344
+ /**
345
+ *
346
+ * @summary PUT /v1/workflows/:id/sync — sync from code-first workflow definition
347
+ * @param {string} id
348
+ * @param {SyncWorkflow} syncWorkflow
349
+ * @param {*} [options] Override http request option.
350
+ * @throws {RequiredError}
351
+ */
352
+ syncWorkflow: async (id: string, syncWorkflow: SyncWorkflow, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
353
+ // verify required parameter 'id' is not null or undefined
354
+ assertParamExists('syncWorkflow', 'id', id)
355
+ // verify required parameter 'syncWorkflow' is not null or undefined
356
+ assertParamExists('syncWorkflow', 'syncWorkflow', syncWorkflow)
357
+ const localVarPath = `/v1/workflows/{id}/sync/`
358
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
359
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
360
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
361
+ let baseOptions;
362
+ if (configuration) {
363
+ baseOptions = configuration.baseOptions;
364
+ }
365
+
366
+ const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
367
+ const localVarHeaderParameter = {} as any;
368
+ const localVarQueryParameter = {} as any;
369
+
370
+ // authentication bearer_auth required
371
+ // http bearer authentication required
372
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
373
+
374
+ localVarHeaderParameter['Content-Type'] = 'application/json';
375
+ localVarHeaderParameter['Accept'] = 'application/json';
376
+
377
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
378
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
379
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
380
+ localVarRequestOptions.data = serializeDataIfNeeded(syncWorkflow, localVarRequestOptions, configuration)
381
+
382
+ return {
383
+ url: toPathString(localVarUrlObj),
384
+ options: localVarRequestOptions,
385
+ };
386
+ },
387
+ /**
388
+ *
389
+ * @summary PUT /v1/workflows/:id
390
+ * @param {string} id Workflow ID
391
+ * @param {UpdateWorkflow} updateWorkflow
392
+ * @param {*} [options] Override http request option.
393
+ * @throws {RequiredError}
394
+ */
395
+ updateWorkflow: async (id: string, updateWorkflow: UpdateWorkflow, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
396
+ // verify required parameter 'id' is not null or undefined
397
+ assertParamExists('updateWorkflow', 'id', id)
398
+ // verify required parameter 'updateWorkflow' is not null or undefined
399
+ assertParamExists('updateWorkflow', 'updateWorkflow', updateWorkflow)
400
+ const localVarPath = `/v1/workflows/{id}/`
401
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
402
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
403
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
404
+ let baseOptions;
405
+ if (configuration) {
406
+ baseOptions = configuration.baseOptions;
407
+ }
408
+
409
+ const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
410
+ const localVarHeaderParameter = {} as any;
411
+ const localVarQueryParameter = {} as any;
412
+
413
+ // authentication bearer_auth required
414
+ // http bearer authentication required
415
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
416
+
417
+ localVarHeaderParameter['Content-Type'] = 'application/json';
418
+ localVarHeaderParameter['Accept'] = 'application/json';
419
+
420
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
421
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
422
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
423
+ localVarRequestOptions.data = serializeDataIfNeeded(updateWorkflow, localVarRequestOptions, configuration)
424
+
425
+ return {
426
+ url: toPathString(localVarUrlObj),
427
+ options: localVarRequestOptions,
428
+ };
429
+ },
430
+ /**
431
+ *
432
+ * @summary PUT /v1/workflows/:id/status
433
+ * @param {string} id Workflow ID
434
+ * @param {WorkflowStatus} workflowStatus
435
+ * @param {*} [options] Override http request option.
436
+ * @throws {RequiredError}
437
+ */
438
+ updateWorkflowStatus: async (id: string, workflowStatus: WorkflowStatus, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
439
+ // verify required parameter 'id' is not null or undefined
440
+ assertParamExists('updateWorkflowStatus', 'id', id)
441
+ // verify required parameter 'workflowStatus' is not null or undefined
442
+ assertParamExists('updateWorkflowStatus', 'workflowStatus', workflowStatus)
443
+ const localVarPath = `/v1/workflows/{id}/status/`
444
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
445
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
446
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
447
+ let baseOptions;
448
+ if (configuration) {
449
+ baseOptions = configuration.baseOptions;
450
+ }
451
+
452
+ const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
453
+ const localVarHeaderParameter = {} as any;
454
+ const localVarQueryParameter = {} as any;
455
+
456
+ // authentication bearer_auth required
457
+ // http bearer authentication required
458
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
459
+
460
+ localVarHeaderParameter['Content-Type'] = 'application/json';
461
+ localVarHeaderParameter['Accept'] = 'application/json';
462
+
463
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
464
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
465
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
466
+ localVarRequestOptions.data = serializeDataIfNeeded(workflowStatus, localVarRequestOptions, configuration)
467
+
468
+ return {
469
+ url: toPathString(localVarUrlObj),
470
+ options: localVarRequestOptions,
471
+ };
472
+ },
473
+ }
474
+ };
475
+
476
+ /**
477
+ * WorkflowsApi - functional programming interface
478
+ */
479
+ export const WorkflowsApiFp = function(configuration?: Configuration) {
480
+ const localVarAxiosParamCreator = WorkflowsApiAxiosParamCreator(configuration)
481
+ return {
482
+ /**
483
+ *
484
+ * @summary POST /v1/workflows
485
+ * @param {CreateWorkflow} createWorkflow
486
+ * @param {*} [options] Override http request option.
487
+ * @throws {RequiredError}
488
+ */
489
+ async createWorkflow(createWorkflow: CreateWorkflow, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<WorkflowRecord>> {
490
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createWorkflow(createWorkflow, options);
491
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
492
+ const localVarOperationServerBasePath = operationServerMap['WorkflowsApi.createWorkflow']?.[localVarOperationServerIndex]?.url;
493
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
494
+ },
495
+ /**
496
+ *
497
+ * @summary DELETE /v1/workflows/:id
498
+ * @param {string} id Workflow ID
499
+ * @param {*} [options] Override http request option.
500
+ * @throws {RequiredError}
501
+ */
502
+ async deleteWorkflow(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
503
+ const localVarAxiosArgs = await localVarAxiosParamCreator.deleteWorkflow(id, options);
504
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
505
+ const localVarOperationServerBasePath = operationServerMap['WorkflowsApi.deleteWorkflow']?.[localVarOperationServerIndex]?.url;
506
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
507
+ },
508
+ /**
509
+ *
510
+ * @summary POST /v1/workflows/:id/duplicate — clone workflow
511
+ * @param {string} id
512
+ * @param {*} [options] Override http request option.
513
+ * @throws {RequiredError}
514
+ */
515
+ async duplicateWorkflow(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<WorkflowRecord>> {
516
+ const localVarAxiosArgs = await localVarAxiosParamCreator.duplicateWorkflow(id, options);
517
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
518
+ const localVarOperationServerBasePath = operationServerMap['WorkflowsApi.duplicateWorkflow']?.[localVarOperationServerIndex]?.url;
519
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
520
+ },
521
+ /**
522
+ *
523
+ * @summary GET /v1/workflows/:id/steps/:step_id — get step details
524
+ * @param {string} id
525
+ * @param {string} stepId
526
+ * @param {*} [options] Override http request option.
527
+ * @throws {RequiredError}
528
+ */
529
+ async getStep(id: string, stepId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<StepRecord>> {
530
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getStep(id, stepId, options);
531
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
532
+ const localVarOperationServerBasePath = operationServerMap['WorkflowsApi.getStep']?.[localVarOperationServerIndex]?.url;
533
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
534
+ },
535
+ /**
536
+ *
537
+ * @summary GET /v1/workflows/:id
538
+ * @param {string} id Workflow ID
539
+ * @param {*} [options] Override http request option.
540
+ * @throws {RequiredError}
541
+ */
542
+ async getWorkflow(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<WorkflowRecord>> {
543
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getWorkflow(id, options);
544
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
545
+ const localVarOperationServerBasePath = operationServerMap['WorkflowsApi.getWorkflow']?.[localVarOperationServerIndex]?.url;
546
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
547
+ },
548
+ /**
549
+ *
550
+ * @summary GET /v1/workflows
551
+ * @param {number | null} [limit] Maximum number of items to return (1–100, default: 10).
552
+ * @param {number | null} [offset] Number of items to skip before returning results (default: 0).
553
+ * @param {string | null} [q] Optional full-text search query. When present, listing is powered by Typesense full-text search.
554
+ * @param {string | null} [filterBy] Optional Typesense filter expression for narrowing results. Example: &#x60;identifier:&#x3D;acme-corp&#x60; or &#x60;name:&#x3D;General&#x60;.
555
+ * @param {*} [options] Override http request option.
556
+ * @throws {RequiredError}
557
+ */
558
+ async listWorkflows(limit?: number | null, offset?: number | null, q?: string | null, filterBy?: string | null, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PaginatedWorkflowRecord>> {
559
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listWorkflows(limit, offset, q, filterBy, options);
560
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
561
+ const localVarOperationServerBasePath = operationServerMap['WorkflowsApi.listWorkflows']?.[localVarOperationServerIndex]?.url;
562
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
563
+ },
564
+ /**
565
+ *
566
+ * @summary POST /v1/workflows/:id/step/:step_id/preview — render step template
567
+ * @param {string} id
568
+ * @param {string} stepId
569
+ * @param {StepPreview} stepPreview
570
+ * @param {*} [options] Override http request option.
571
+ * @throws {RequiredError}
572
+ */
573
+ async stepPreview(id: string, stepId: string, stepPreview: StepPreview, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PreviewResult>> {
574
+ const localVarAxiosArgs = await localVarAxiosParamCreator.stepPreview(id, stepId, stepPreview, options);
575
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
576
+ const localVarOperationServerBasePath = operationServerMap['WorkflowsApi.stepPreview']?.[localVarOperationServerIndex]?.url;
577
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
578
+ },
579
+ /**
580
+ *
581
+ * @summary PUT /v1/workflows/:id/sync — sync from code-first workflow definition
582
+ * @param {string} id
583
+ * @param {SyncWorkflow} syncWorkflow
584
+ * @param {*} [options] Override http request option.
585
+ * @throws {RequiredError}
586
+ */
587
+ async syncWorkflow(id: string, syncWorkflow: SyncWorkflow, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<WorkflowRecord>> {
588
+ const localVarAxiosArgs = await localVarAxiosParamCreator.syncWorkflow(id, syncWorkflow, options);
589
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
590
+ const localVarOperationServerBasePath = operationServerMap['WorkflowsApi.syncWorkflow']?.[localVarOperationServerIndex]?.url;
591
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
592
+ },
593
+ /**
594
+ *
595
+ * @summary PUT /v1/workflows/:id
596
+ * @param {string} id Workflow ID
597
+ * @param {UpdateWorkflow} updateWorkflow
598
+ * @param {*} [options] Override http request option.
599
+ * @throws {RequiredError}
600
+ */
601
+ async updateWorkflow(id: string, updateWorkflow: UpdateWorkflow, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<WorkflowRecord>> {
602
+ const localVarAxiosArgs = await localVarAxiosParamCreator.updateWorkflow(id, updateWorkflow, options);
603
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
604
+ const localVarOperationServerBasePath = operationServerMap['WorkflowsApi.updateWorkflow']?.[localVarOperationServerIndex]?.url;
605
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
606
+ },
607
+ /**
608
+ *
609
+ * @summary PUT /v1/workflows/:id/status
610
+ * @param {string} id Workflow ID
611
+ * @param {WorkflowStatus} workflowStatus
612
+ * @param {*} [options] Override http request option.
613
+ * @throws {RequiredError}
614
+ */
615
+ async updateWorkflowStatus(id: string, workflowStatus: WorkflowStatus, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<WorkflowRecord>> {
616
+ const localVarAxiosArgs = await localVarAxiosParamCreator.updateWorkflowStatus(id, workflowStatus, options);
617
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
618
+ const localVarOperationServerBasePath = operationServerMap['WorkflowsApi.updateWorkflowStatus']?.[localVarOperationServerIndex]?.url;
619
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
620
+ },
621
+ }
622
+ };
623
+
624
+ /**
625
+ * WorkflowsApi - factory interface
626
+ */
627
+ export const WorkflowsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
628
+ const localVarFp = WorkflowsApiFp(configuration)
629
+ return {
630
+ /**
631
+ *
632
+ * @summary POST /v1/workflows
633
+ * @param {CreateWorkflow} createWorkflow
634
+ * @param {*} [options] Override http request option.
635
+ * @throws {RequiredError}
636
+ */
637
+ createWorkflow(createWorkflow: CreateWorkflow, options?: RawAxiosRequestConfig): AxiosPromise<WorkflowRecord> {
638
+ return localVarFp.createWorkflow(createWorkflow, options).then((request) => request(axios, basePath));
639
+ },
640
+ /**
641
+ *
642
+ * @summary DELETE /v1/workflows/:id
643
+ * @param {string} id Workflow ID
644
+ * @param {*} [options] Override http request option.
645
+ * @throws {RequiredError}
646
+ */
647
+ deleteWorkflow(id: string, options?: RawAxiosRequestConfig): AxiosPromise<void> {
648
+ return localVarFp.deleteWorkflow(id, options).then((request) => request(axios, basePath));
649
+ },
650
+ /**
651
+ *
652
+ * @summary POST /v1/workflows/:id/duplicate — clone workflow
653
+ * @param {string} id
654
+ * @param {*} [options] Override http request option.
655
+ * @throws {RequiredError}
656
+ */
657
+ duplicateWorkflow(id: string, options?: RawAxiosRequestConfig): AxiosPromise<WorkflowRecord> {
658
+ return localVarFp.duplicateWorkflow(id, options).then((request) => request(axios, basePath));
659
+ },
660
+ /**
661
+ *
662
+ * @summary GET /v1/workflows/:id/steps/:step_id — get step details
663
+ * @param {string} id
664
+ * @param {string} stepId
665
+ * @param {*} [options] Override http request option.
666
+ * @throws {RequiredError}
667
+ */
668
+ getStep(id: string, stepId: string, options?: RawAxiosRequestConfig): AxiosPromise<StepRecord> {
669
+ return localVarFp.getStep(id, stepId, options).then((request) => request(axios, basePath));
670
+ },
671
+ /**
672
+ *
673
+ * @summary GET /v1/workflows/:id
674
+ * @param {string} id Workflow ID
675
+ * @param {*} [options] Override http request option.
676
+ * @throws {RequiredError}
677
+ */
678
+ getWorkflow(id: string, options?: RawAxiosRequestConfig): AxiosPromise<WorkflowRecord> {
679
+ return localVarFp.getWorkflow(id, options).then((request) => request(axios, basePath));
680
+ },
681
+ /**
682
+ *
683
+ * @summary GET /v1/workflows
684
+ * @param {number | null} [limit] Maximum number of items to return (1–100, default: 10).
685
+ * @param {number | null} [offset] Number of items to skip before returning results (default: 0).
686
+ * @param {string | null} [q] Optional full-text search query. When present, listing is powered by Typesense full-text search.
687
+ * @param {string | null} [filterBy] Optional Typesense filter expression for narrowing results. Example: &#x60;identifier:&#x3D;acme-corp&#x60; or &#x60;name:&#x3D;General&#x60;.
688
+ * @param {*} [options] Override http request option.
689
+ * @throws {RequiredError}
690
+ */
691
+ listWorkflows(limit?: number | null, offset?: number | null, q?: string | null, filterBy?: string | null, options?: RawAxiosRequestConfig): AxiosPromise<PaginatedWorkflowRecord> {
692
+ return localVarFp.listWorkflows(limit, offset, q, filterBy, options).then((request) => request(axios, basePath));
693
+ },
694
+ /**
695
+ *
696
+ * @summary POST /v1/workflows/:id/step/:step_id/preview — render step template
697
+ * @param {string} id
698
+ * @param {string} stepId
699
+ * @param {StepPreview} stepPreview
700
+ * @param {*} [options] Override http request option.
701
+ * @throws {RequiredError}
702
+ */
703
+ stepPreview(id: string, stepId: string, stepPreview: StepPreview, options?: RawAxiosRequestConfig): AxiosPromise<PreviewResult> {
704
+ return localVarFp.stepPreview(id, stepId, stepPreview, options).then((request) => request(axios, basePath));
705
+ },
706
+ /**
707
+ *
708
+ * @summary PUT /v1/workflows/:id/sync — sync from code-first workflow definition
709
+ * @param {string} id
710
+ * @param {SyncWorkflow} syncWorkflow
711
+ * @param {*} [options] Override http request option.
712
+ * @throws {RequiredError}
713
+ */
714
+ syncWorkflow(id: string, syncWorkflow: SyncWorkflow, options?: RawAxiosRequestConfig): AxiosPromise<WorkflowRecord> {
715
+ return localVarFp.syncWorkflow(id, syncWorkflow, options).then((request) => request(axios, basePath));
716
+ },
717
+ /**
718
+ *
719
+ * @summary PUT /v1/workflows/:id
720
+ * @param {string} id Workflow ID
721
+ * @param {UpdateWorkflow} updateWorkflow
722
+ * @param {*} [options] Override http request option.
723
+ * @throws {RequiredError}
724
+ */
725
+ updateWorkflow(id: string, updateWorkflow: UpdateWorkflow, options?: RawAxiosRequestConfig): AxiosPromise<WorkflowRecord> {
726
+ return localVarFp.updateWorkflow(id, updateWorkflow, options).then((request) => request(axios, basePath));
727
+ },
728
+ /**
729
+ *
730
+ * @summary PUT /v1/workflows/:id/status
731
+ * @param {string} id Workflow ID
732
+ * @param {WorkflowStatus} workflowStatus
733
+ * @param {*} [options] Override http request option.
734
+ * @throws {RequiredError}
735
+ */
736
+ updateWorkflowStatus(id: string, workflowStatus: WorkflowStatus, options?: RawAxiosRequestConfig): AxiosPromise<WorkflowRecord> {
737
+ return localVarFp.updateWorkflowStatus(id, workflowStatus, options).then((request) => request(axios, basePath));
738
+ },
739
+ };
740
+ };
741
+
742
+ /**
743
+ * WorkflowsApi - interface
744
+ */
745
+ export interface WorkflowsApiInterface {
746
+ /**
747
+ *
748
+ * @summary POST /v1/workflows
749
+ * @param {CreateWorkflow} createWorkflow
750
+ * @param {*} [options] Override http request option.
751
+ * @throws {RequiredError}
752
+ */
753
+ createWorkflow(createWorkflow: CreateWorkflow, options?: RawAxiosRequestConfig): AxiosPromise<WorkflowRecord>;
754
+
755
+ /**
756
+ *
757
+ * @summary DELETE /v1/workflows/:id
758
+ * @param {string} id Workflow ID
759
+ * @param {*} [options] Override http request option.
760
+ * @throws {RequiredError}
761
+ */
762
+ deleteWorkflow(id: string, options?: RawAxiosRequestConfig): AxiosPromise<void>;
763
+
764
+ /**
765
+ *
766
+ * @summary POST /v1/workflows/:id/duplicate — clone workflow
767
+ * @param {string} id
768
+ * @param {*} [options] Override http request option.
769
+ * @throws {RequiredError}
770
+ */
771
+ duplicateWorkflow(id: string, options?: RawAxiosRequestConfig): AxiosPromise<WorkflowRecord>;
772
+
773
+ /**
774
+ *
775
+ * @summary GET /v1/workflows/:id/steps/:step_id — get step details
776
+ * @param {string} id
777
+ * @param {string} stepId
778
+ * @param {*} [options] Override http request option.
779
+ * @throws {RequiredError}
780
+ */
781
+ getStep(id: string, stepId: string, options?: RawAxiosRequestConfig): AxiosPromise<StepRecord>;
782
+
783
+ /**
784
+ *
785
+ * @summary GET /v1/workflows/:id
786
+ * @param {string} id Workflow ID
787
+ * @param {*} [options] Override http request option.
788
+ * @throws {RequiredError}
789
+ */
790
+ getWorkflow(id: string, options?: RawAxiosRequestConfig): AxiosPromise<WorkflowRecord>;
791
+
792
+ /**
793
+ *
794
+ * @summary GET /v1/workflows
795
+ * @param {number | null} [limit] Maximum number of items to return (1–100, default: 10).
796
+ * @param {number | null} [offset] Number of items to skip before returning results (default: 0).
797
+ * @param {string | null} [q] Optional full-text search query. When present, listing is powered by Typesense full-text search.
798
+ * @param {string | null} [filterBy] Optional Typesense filter expression for narrowing results. Example: &#x60;identifier:&#x3D;acme-corp&#x60; or &#x60;name:&#x3D;General&#x60;.
799
+ * @param {*} [options] Override http request option.
800
+ * @throws {RequiredError}
801
+ */
802
+ listWorkflows(limit?: number | null, offset?: number | null, q?: string | null, filterBy?: string | null, options?: RawAxiosRequestConfig): AxiosPromise<PaginatedWorkflowRecord>;
803
+
804
+ /**
805
+ *
806
+ * @summary POST /v1/workflows/:id/step/:step_id/preview — render step template
807
+ * @param {string} id
808
+ * @param {string} stepId
809
+ * @param {StepPreview} stepPreview
810
+ * @param {*} [options] Override http request option.
811
+ * @throws {RequiredError}
812
+ */
813
+ stepPreview(id: string, stepId: string, stepPreview: StepPreview, options?: RawAxiosRequestConfig): AxiosPromise<PreviewResult>;
814
+
815
+ /**
816
+ *
817
+ * @summary PUT /v1/workflows/:id/sync — sync from code-first workflow definition
818
+ * @param {string} id
819
+ * @param {SyncWorkflow} syncWorkflow
820
+ * @param {*} [options] Override http request option.
821
+ * @throws {RequiredError}
822
+ */
823
+ syncWorkflow(id: string, syncWorkflow: SyncWorkflow, options?: RawAxiosRequestConfig): AxiosPromise<WorkflowRecord>;
824
+
825
+ /**
826
+ *
827
+ * @summary PUT /v1/workflows/:id
828
+ * @param {string} id Workflow ID
829
+ * @param {UpdateWorkflow} updateWorkflow
830
+ * @param {*} [options] Override http request option.
831
+ * @throws {RequiredError}
832
+ */
833
+ updateWorkflow(id: string, updateWorkflow: UpdateWorkflow, options?: RawAxiosRequestConfig): AxiosPromise<WorkflowRecord>;
834
+
835
+ /**
836
+ *
837
+ * @summary PUT /v1/workflows/:id/status
838
+ * @param {string} id Workflow ID
839
+ * @param {WorkflowStatus} workflowStatus
840
+ * @param {*} [options] Override http request option.
841
+ * @throws {RequiredError}
842
+ */
843
+ updateWorkflowStatus(id: string, workflowStatus: WorkflowStatus, options?: RawAxiosRequestConfig): AxiosPromise<WorkflowRecord>;
844
+
845
+ }
846
+
847
+ /**
848
+ * WorkflowsApi - object-oriented interface
849
+ */
850
+ export class WorkflowsApi extends BaseAPI implements WorkflowsApiInterface {
851
+ /**
852
+ *
853
+ * @summary POST /v1/workflows
854
+ * @param {CreateWorkflow} createWorkflow
855
+ * @param {*} [options] Override http request option.
856
+ * @throws {RequiredError}
857
+ */
858
+ public createWorkflow(createWorkflow: CreateWorkflow, options?: RawAxiosRequestConfig) {
859
+ return WorkflowsApiFp(this.configuration).createWorkflow(createWorkflow, options).then((request) => request(this.axios, this.basePath));
860
+ }
861
+
862
+ /**
863
+ *
864
+ * @summary DELETE /v1/workflows/:id
865
+ * @param {string} id Workflow ID
866
+ * @param {*} [options] Override http request option.
867
+ * @throws {RequiredError}
868
+ */
869
+ public deleteWorkflow(id: string, options?: RawAxiosRequestConfig) {
870
+ return WorkflowsApiFp(this.configuration).deleteWorkflow(id, options).then((request) => request(this.axios, this.basePath));
871
+ }
872
+
873
+ /**
874
+ *
875
+ * @summary POST /v1/workflows/:id/duplicate — clone workflow
876
+ * @param {string} id
877
+ * @param {*} [options] Override http request option.
878
+ * @throws {RequiredError}
879
+ */
880
+ public duplicateWorkflow(id: string, options?: RawAxiosRequestConfig) {
881
+ return WorkflowsApiFp(this.configuration).duplicateWorkflow(id, options).then((request) => request(this.axios, this.basePath));
882
+ }
883
+
884
+ /**
885
+ *
886
+ * @summary GET /v1/workflows/:id/steps/:step_id — get step details
887
+ * @param {string} id
888
+ * @param {string} stepId
889
+ * @param {*} [options] Override http request option.
890
+ * @throws {RequiredError}
891
+ */
892
+ public getStep(id: string, stepId: string, options?: RawAxiosRequestConfig) {
893
+ return WorkflowsApiFp(this.configuration).getStep(id, stepId, options).then((request) => request(this.axios, this.basePath));
894
+ }
895
+
896
+ /**
897
+ *
898
+ * @summary GET /v1/workflows/:id
899
+ * @param {string} id Workflow ID
900
+ * @param {*} [options] Override http request option.
901
+ * @throws {RequiredError}
902
+ */
903
+ public getWorkflow(id: string, options?: RawAxiosRequestConfig) {
904
+ return WorkflowsApiFp(this.configuration).getWorkflow(id, options).then((request) => request(this.axios, this.basePath));
905
+ }
906
+
907
+ /**
908
+ *
909
+ * @summary GET /v1/workflows
910
+ * @param {number | null} [limit] Maximum number of items to return (1–100, default: 10).
911
+ * @param {number | null} [offset] Number of items to skip before returning results (default: 0).
912
+ * @param {string | null} [q] Optional full-text search query. When present, listing is powered by Typesense full-text search.
913
+ * @param {string | null} [filterBy] Optional Typesense filter expression for narrowing results. Example: &#x60;identifier:&#x3D;acme-corp&#x60; or &#x60;name:&#x3D;General&#x60;.
914
+ * @param {*} [options] Override http request option.
915
+ * @throws {RequiredError}
916
+ */
917
+ public listWorkflows(limit?: number | null, offset?: number | null, q?: string | null, filterBy?: string | null, options?: RawAxiosRequestConfig) {
918
+ return WorkflowsApiFp(this.configuration).listWorkflows(limit, offset, q, filterBy, options).then((request) => request(this.axios, this.basePath));
919
+ }
920
+
921
+ /**
922
+ *
923
+ * @summary POST /v1/workflows/:id/step/:step_id/preview — render step template
924
+ * @param {string} id
925
+ * @param {string} stepId
926
+ * @param {StepPreview} stepPreview
927
+ * @param {*} [options] Override http request option.
928
+ * @throws {RequiredError}
929
+ */
930
+ public stepPreview(id: string, stepId: string, stepPreview: StepPreview, options?: RawAxiosRequestConfig) {
931
+ return WorkflowsApiFp(this.configuration).stepPreview(id, stepId, stepPreview, options).then((request) => request(this.axios, this.basePath));
932
+ }
933
+
934
+ /**
935
+ *
936
+ * @summary PUT /v1/workflows/:id/sync — sync from code-first workflow definition
937
+ * @param {string} id
938
+ * @param {SyncWorkflow} syncWorkflow
939
+ * @param {*} [options] Override http request option.
940
+ * @throws {RequiredError}
941
+ */
942
+ public syncWorkflow(id: string, syncWorkflow: SyncWorkflow, options?: RawAxiosRequestConfig) {
943
+ return WorkflowsApiFp(this.configuration).syncWorkflow(id, syncWorkflow, options).then((request) => request(this.axios, this.basePath));
944
+ }
945
+
946
+ /**
947
+ *
948
+ * @summary PUT /v1/workflows/:id
949
+ * @param {string} id Workflow ID
950
+ * @param {UpdateWorkflow} updateWorkflow
951
+ * @param {*} [options] Override http request option.
952
+ * @throws {RequiredError}
953
+ */
954
+ public updateWorkflow(id: string, updateWorkflow: UpdateWorkflow, options?: RawAxiosRequestConfig) {
955
+ return WorkflowsApiFp(this.configuration).updateWorkflow(id, updateWorkflow, options).then((request) => request(this.axios, this.basePath));
956
+ }
957
+
958
+ /**
959
+ *
960
+ * @summary PUT /v1/workflows/:id/status
961
+ * @param {string} id Workflow ID
962
+ * @param {WorkflowStatus} workflowStatus
963
+ * @param {*} [options] Override http request option.
964
+ * @throws {RequiredError}
965
+ */
966
+ public updateWorkflowStatus(id: string, workflowStatus: WorkflowStatus, options?: RawAxiosRequestConfig) {
967
+ return WorkflowsApiFp(this.configuration).updateWorkflowStatus(id, workflowStatus, options).then((request) => request(this.axios, this.basePath));
968
+ }
969
+ }
970
+