@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,1352 @@
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 { CreateSubscription } from '../models';
26
+ // @ts-ignore
27
+ import type { CreateTopic } from '../models';
28
+ // @ts-ignore
29
+ import type { DeleteSubscription } from '../models';
30
+ // @ts-ignore
31
+ import type { PaginatedTopicRecord } from '../models';
32
+ // @ts-ignore
33
+ import type { PaginatedTopicSubscriptionRecord } from '../models';
34
+ // @ts-ignore
35
+ import type { TopicRecord } from '../models';
36
+ // @ts-ignore
37
+ import type { TopicSubscribers } from '../models';
38
+ // @ts-ignore
39
+ import type { TopicSubscriptionRecord } from '../models';
40
+ // @ts-ignore
41
+ import type { UpdateSubscriptionMeta } from '../models';
42
+ // @ts-ignore
43
+ import type { UpdateTopic } from '../models';
44
+ /**
45
+ * TopicsApi - axios parameter creator
46
+ */
47
+ export const TopicsApiAxiosParamCreator = function (configuration?: Configuration) {
48
+ return {
49
+ /**
50
+ *
51
+ * @summary POST /v1/topics/:topicKey/subscribers
52
+ * @param {string} key Topic key
53
+ * @param {TopicSubscribers} topicSubscribers
54
+ * @param {*} [options] Override http request option.
55
+ * @throws {RequiredError}
56
+ */
57
+ addSubscribers: async (key: string, topicSubscribers: TopicSubscribers, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
58
+ // verify required parameter 'key' is not null or undefined
59
+ assertParamExists('addSubscribers', 'key', key)
60
+ // verify required parameter 'topicSubscribers' is not null or undefined
61
+ assertParamExists('addSubscribers', 'topicSubscribers', topicSubscribers)
62
+ const localVarPath = `/v1/topics/{key}/subscribers/`
63
+ .replace(`{${"key"}}`, encodeURIComponent(String(key)));
64
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
65
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
66
+ let baseOptions;
67
+ if (configuration) {
68
+ baseOptions = configuration.baseOptions;
69
+ }
70
+
71
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
72
+ const localVarHeaderParameter = {} as any;
73
+ const localVarQueryParameter = {} as any;
74
+
75
+ // authentication bearer_auth required
76
+ // http bearer authentication required
77
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
78
+
79
+ localVarHeaderParameter['Content-Type'] = 'application/json';
80
+
81
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
82
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
83
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
84
+ localVarRequestOptions.data = serializeDataIfNeeded(topicSubscribers, localVarRequestOptions, configuration)
85
+
86
+ return {
87
+ url: toPathString(localVarUrlObj),
88
+ options: localVarRequestOptions,
89
+ };
90
+ },
91
+ /**
92
+ *
93
+ * @summary GET /v1/topics/:key/subscribers/:subscriber_id — membership check
94
+ * @param {string} key
95
+ * @param {string} subscriberId
96
+ * @param {*} [options] Override http request option.
97
+ * @throws {RequiredError}
98
+ */
99
+ checkSubscriber: async (key: string, subscriberId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
100
+ // verify required parameter 'key' is not null or undefined
101
+ assertParamExists('checkSubscriber', 'key', key)
102
+ // verify required parameter 'subscriberId' is not null or undefined
103
+ assertParamExists('checkSubscriber', 'subscriberId', subscriberId)
104
+ const localVarPath = `/v1/topics/{key}/subscribers/{subscriber_id}/`
105
+ .replace(`{${"key"}}`, encodeURIComponent(String(key)))
106
+ .replace(`{${"subscriber_id"}}`, encodeURIComponent(String(subscriberId)));
107
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
108
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
109
+ let baseOptions;
110
+ if (configuration) {
111
+ baseOptions = configuration.baseOptions;
112
+ }
113
+
114
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
115
+ const localVarHeaderParameter = {} as any;
116
+ const localVarQueryParameter = {} as any;
117
+
118
+ // authentication bearer_auth required
119
+ // http bearer authentication required
120
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
121
+
122
+
123
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
124
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
125
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
126
+
127
+ return {
128
+ url: toPathString(localVarUrlObj),
129
+ options: localVarRequestOptions,
130
+ };
131
+ },
132
+ /**
133
+ *
134
+ * @summary POST /v1/topics/:key/subscriptions — create subscriptions
135
+ * @param {string} key
136
+ * @param {CreateSubscription} createSubscription
137
+ * @param {*} [options] Override http request option.
138
+ * @throws {RequiredError}
139
+ */
140
+ createSubscriptions: async (key: string, createSubscription: CreateSubscription, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
141
+ // verify required parameter 'key' is not null or undefined
142
+ assertParamExists('createSubscriptions', 'key', key)
143
+ // verify required parameter 'createSubscription' is not null or undefined
144
+ assertParamExists('createSubscriptions', 'createSubscription', createSubscription)
145
+ const localVarPath = `/v1/topics/{key}/subscriptions/`
146
+ .replace(`{${"key"}}`, encodeURIComponent(String(key)));
147
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
148
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
149
+ let baseOptions;
150
+ if (configuration) {
151
+ baseOptions = configuration.baseOptions;
152
+ }
153
+
154
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
155
+ const localVarHeaderParameter = {} as any;
156
+ const localVarQueryParameter = {} as any;
157
+
158
+ // authentication bearer_auth required
159
+ // http bearer authentication required
160
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
161
+
162
+ localVarHeaderParameter['Content-Type'] = 'application/json';
163
+ localVarHeaderParameter['Accept'] = 'application/json';
164
+
165
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
166
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
167
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
168
+ localVarRequestOptions.data = serializeDataIfNeeded(createSubscription, localVarRequestOptions, configuration)
169
+
170
+ return {
171
+ url: toPathString(localVarUrlObj),
172
+ options: localVarRequestOptions,
173
+ };
174
+ },
175
+ /**
176
+ *
177
+ * @summary POST /v1/topics
178
+ * @param {CreateTopic} createTopic
179
+ * @param {*} [options] Override http request option.
180
+ * @throws {RequiredError}
181
+ */
182
+ createTopic: async (createTopic: CreateTopic, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
183
+ // verify required parameter 'createTopic' is not null or undefined
184
+ assertParamExists('createTopic', 'createTopic', createTopic)
185
+ const localVarPath = `/v1/topics/`;
186
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
187
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
188
+ let baseOptions;
189
+ if (configuration) {
190
+ baseOptions = configuration.baseOptions;
191
+ }
192
+
193
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
194
+ const localVarHeaderParameter = {} as any;
195
+ const localVarQueryParameter = {} as any;
196
+
197
+ // authentication bearer_auth required
198
+ // http bearer authentication required
199
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
200
+
201
+ localVarHeaderParameter['Content-Type'] = 'application/json';
202
+ localVarHeaderParameter['Accept'] = 'application/json';
203
+
204
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
205
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
206
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
207
+ localVarRequestOptions.data = serializeDataIfNeeded(createTopic, localVarRequestOptions, configuration)
208
+
209
+ return {
210
+ url: toPathString(localVarUrlObj),
211
+ options: localVarRequestOptions,
212
+ };
213
+ },
214
+ /**
215
+ *
216
+ * @summary DELETE /v1/topics/:key/subscriptions — bulk delete
217
+ * @param {string} key
218
+ * @param {DeleteSubscription} deleteSubscription
219
+ * @param {*} [options] Override http request option.
220
+ * @throws {RequiredError}
221
+ */
222
+ deleteSubscriptions: async (key: string, deleteSubscription: DeleteSubscription, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
223
+ // verify required parameter 'key' is not null or undefined
224
+ assertParamExists('deleteSubscriptions', 'key', key)
225
+ // verify required parameter 'deleteSubscription' is not null or undefined
226
+ assertParamExists('deleteSubscriptions', 'deleteSubscription', deleteSubscription)
227
+ const localVarPath = `/v1/topics/{key}/subscriptions/`
228
+ .replace(`{${"key"}}`, encodeURIComponent(String(key)));
229
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
230
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
231
+ let baseOptions;
232
+ if (configuration) {
233
+ baseOptions = configuration.baseOptions;
234
+ }
235
+
236
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
237
+ const localVarHeaderParameter = {} as any;
238
+ const localVarQueryParameter = {} as any;
239
+
240
+ // authentication bearer_auth required
241
+ // http bearer authentication required
242
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
243
+
244
+ localVarHeaderParameter['Content-Type'] = 'application/json';
245
+
246
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
247
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
248
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
249
+ localVarRequestOptions.data = serializeDataIfNeeded(deleteSubscription, localVarRequestOptions, configuration)
250
+
251
+ return {
252
+ url: toPathString(localVarUrlObj),
253
+ options: localVarRequestOptions,
254
+ };
255
+ },
256
+ /**
257
+ *
258
+ * @summary DELETE /v1/topics/:topicKey
259
+ * @param {string} key Topic key
260
+ * @param {*} [options] Override http request option.
261
+ * @throws {RequiredError}
262
+ */
263
+ deleteTopic: async (key: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
264
+ // verify required parameter 'key' is not null or undefined
265
+ assertParamExists('deleteTopic', 'key', key)
266
+ const localVarPath = `/v1/topics/{key}/`
267
+ .replace(`{${"key"}}`, encodeURIComponent(String(key)));
268
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
269
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
270
+ let baseOptions;
271
+ if (configuration) {
272
+ baseOptions = configuration.baseOptions;
273
+ }
274
+
275
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
276
+ const localVarHeaderParameter = {} as any;
277
+ const localVarQueryParameter = {} as any;
278
+
279
+ // authentication bearer_auth required
280
+ // http bearer authentication required
281
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
282
+
283
+
284
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
285
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
286
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
287
+
288
+ return {
289
+ url: toPathString(localVarUrlObj),
290
+ options: localVarRequestOptions,
291
+ };
292
+ },
293
+ /**
294
+ *
295
+ * @summary GET /v1/topics/:key/subscriptions/:id — get single subscription
296
+ * @param {string} key
297
+ * @param {string} id
298
+ * @param {*} [options] Override http request option.
299
+ * @throws {RequiredError}
300
+ */
301
+ getSubscription: async (key: string, id: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
302
+ // verify required parameter 'key' is not null or undefined
303
+ assertParamExists('getSubscription', 'key', key)
304
+ // verify required parameter 'id' is not null or undefined
305
+ assertParamExists('getSubscription', 'id', id)
306
+ const localVarPath = `/v1/topics/{key}/subscriptions/{id}/`
307
+ .replace(`{${"key"}}`, encodeURIComponent(String(key)))
308
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
309
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
310
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
311
+ let baseOptions;
312
+ if (configuration) {
313
+ baseOptions = configuration.baseOptions;
314
+ }
315
+
316
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
317
+ const localVarHeaderParameter = {} as any;
318
+ const localVarQueryParameter = {} as any;
319
+
320
+ // authentication bearer_auth required
321
+ // http bearer authentication required
322
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
323
+
324
+ localVarHeaderParameter['Accept'] = 'application/json';
325
+
326
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
327
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
328
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
329
+
330
+ return {
331
+ url: toPathString(localVarUrlObj),
332
+ options: localVarRequestOptions,
333
+ };
334
+ },
335
+ /**
336
+ *
337
+ * @summary GET /v1/topics/:topicKey
338
+ * @param {string} key Topic key
339
+ * @param {*} [options] Override http request option.
340
+ * @throws {RequiredError}
341
+ */
342
+ getTopic: async (key: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
343
+ // verify required parameter 'key' is not null or undefined
344
+ assertParamExists('getTopic', 'key', key)
345
+ const localVarPath = `/v1/topics/{key}/`
346
+ .replace(`{${"key"}}`, encodeURIComponent(String(key)));
347
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
348
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
349
+ let baseOptions;
350
+ if (configuration) {
351
+ baseOptions = configuration.baseOptions;
352
+ }
353
+
354
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
355
+ const localVarHeaderParameter = {} as any;
356
+ const localVarQueryParameter = {} as any;
357
+
358
+ // authentication bearer_auth required
359
+ // http bearer authentication required
360
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
361
+
362
+ localVarHeaderParameter['Accept'] = 'application/json';
363
+
364
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
365
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
366
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
367
+
368
+ return {
369
+ url: toPathString(localVarUrlObj),
370
+ options: localVarRequestOptions,
371
+ };
372
+ },
373
+ /**
374
+ *
375
+ * @summary GET /v1/topics/:key/subscriptions — list subscriptions
376
+ * @param {string} key
377
+ * @param {number | null} [limit] Maximum number of items to return (1–100, default: 10).
378
+ * @param {number | null} [offset] Number of items to skip before returning results (default: 0).
379
+ * @param {string | null} [q] Optional full-text search query. When present, listing is powered by Typesense full-text search.
380
+ * @param {string | null} [filterBy] Optional Typesense filter expression for narrowing results. Example: &#x60;identifier:&#x3D;acme-corp&#x60; or &#x60;name:&#x3D;General&#x60;.
381
+ * @param {*} [options] Override http request option.
382
+ * @throws {RequiredError}
383
+ */
384
+ listSubscriptions: async (key: string, limit?: number | null, offset?: number | null, q?: string | null, filterBy?: string | null, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
385
+ // verify required parameter 'key' is not null or undefined
386
+ assertParamExists('listSubscriptions', 'key', key)
387
+ const localVarPath = `/v1/topics/{key}/subscriptions/`
388
+ .replace(`{${"key"}}`, encodeURIComponent(String(key)));
389
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
390
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
391
+ let baseOptions;
392
+ if (configuration) {
393
+ baseOptions = configuration.baseOptions;
394
+ }
395
+
396
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
397
+ const localVarHeaderParameter = {} as any;
398
+ const localVarQueryParameter = {} as any;
399
+
400
+ // authentication bearer_auth required
401
+ // http bearer authentication required
402
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
403
+
404
+ if (limit !== undefined) {
405
+ localVarQueryParameter['limit'] = limit;
406
+ }
407
+
408
+ if (offset !== undefined) {
409
+ localVarQueryParameter['offset'] = offset;
410
+ }
411
+
412
+ if (q !== undefined) {
413
+ localVarQueryParameter['q'] = q;
414
+ }
415
+
416
+ if (filterBy !== undefined) {
417
+ localVarQueryParameter['filter_by'] = filterBy;
418
+ }
419
+
420
+ localVarHeaderParameter['Accept'] = 'application/json';
421
+
422
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
423
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
424
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
425
+
426
+ return {
427
+ url: toPathString(localVarUrlObj),
428
+ options: localVarRequestOptions,
429
+ };
430
+ },
431
+ /**
432
+ *
433
+ * @summary GET /v1/topics/:topicKey/subscribers
434
+ * @param {string} key Topic key
435
+ * @param {*} [options] Override http request option.
436
+ * @throws {RequiredError}
437
+ */
438
+ listTopicSubscribers: async (key: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
439
+ // verify required parameter 'key' is not null or undefined
440
+ assertParamExists('listTopicSubscribers', 'key', key)
441
+ const localVarPath = `/v1/topics/{key}/subscribers/`
442
+ .replace(`{${"key"}}`, encodeURIComponent(String(key)));
443
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
444
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
445
+ let baseOptions;
446
+ if (configuration) {
447
+ baseOptions = configuration.baseOptions;
448
+ }
449
+
450
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
451
+ const localVarHeaderParameter = {} as any;
452
+ const localVarQueryParameter = {} as any;
453
+
454
+ // authentication bearer_auth required
455
+ // http bearer authentication required
456
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
457
+
458
+ localVarHeaderParameter['Accept'] = 'application/json';
459
+
460
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
461
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
462
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
463
+
464
+ return {
465
+ url: toPathString(localVarUrlObj),
466
+ options: localVarRequestOptions,
467
+ };
468
+ },
469
+ /**
470
+ *
471
+ * @summary GET /v1/topics
472
+ * @param {number | null} [limit] Maximum number of items to return (1–100, default: 10).
473
+ * @param {number | null} [offset] Number of items to skip before returning results (default: 0).
474
+ * @param {string | null} [q] Optional full-text search query. When present, listing is powered by Typesense full-text search.
475
+ * @param {string | null} [filterBy] Optional Typesense filter expression for narrowing results. Example: &#x60;identifier:&#x3D;acme-corp&#x60; or &#x60;name:&#x3D;General&#x60;.
476
+ * @param {*} [options] Override http request option.
477
+ * @throws {RequiredError}
478
+ */
479
+ listTopics: async (limit?: number | null, offset?: number | null, q?: string | null, filterBy?: string | null, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
480
+ const localVarPath = `/v1/topics/`;
481
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
482
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
483
+ let baseOptions;
484
+ if (configuration) {
485
+ baseOptions = configuration.baseOptions;
486
+ }
487
+
488
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
489
+ const localVarHeaderParameter = {} as any;
490
+ const localVarQueryParameter = {} as any;
491
+
492
+ // authentication bearer_auth required
493
+ // http bearer authentication required
494
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
495
+
496
+ if (limit !== undefined) {
497
+ localVarQueryParameter['limit'] = limit;
498
+ }
499
+
500
+ if (offset !== undefined) {
501
+ localVarQueryParameter['offset'] = offset;
502
+ }
503
+
504
+ if (q !== undefined) {
505
+ localVarQueryParameter['q'] = q;
506
+ }
507
+
508
+ if (filterBy !== undefined) {
509
+ localVarQueryParameter['filter_by'] = filterBy;
510
+ }
511
+
512
+ localVarHeaderParameter['Accept'] = 'application/json';
513
+
514
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
515
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
516
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
517
+
518
+ return {
519
+ url: toPathString(localVarUrlObj),
520
+ options: localVarRequestOptions,
521
+ };
522
+ },
523
+ /**
524
+ *
525
+ * @summary POST /v1/topics/:topicKey/subscribers/removal
526
+ * @param {string} key Topic key
527
+ * @param {TopicSubscribers} topicSubscribers
528
+ * @param {*} [options] Override http request option.
529
+ * @throws {RequiredError}
530
+ */
531
+ removeSubscribers: async (key: string, topicSubscribers: TopicSubscribers, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
532
+ // verify required parameter 'key' is not null or undefined
533
+ assertParamExists('removeSubscribers', 'key', key)
534
+ // verify required parameter 'topicSubscribers' is not null or undefined
535
+ assertParamExists('removeSubscribers', 'topicSubscribers', topicSubscribers)
536
+ const localVarPath = `/v1/topics/{key}/subscribers/removal/`
537
+ .replace(`{${"key"}}`, encodeURIComponent(String(key)));
538
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
539
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
540
+ let baseOptions;
541
+ if (configuration) {
542
+ baseOptions = configuration.baseOptions;
543
+ }
544
+
545
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
546
+ const localVarHeaderParameter = {} as any;
547
+ const localVarQueryParameter = {} as any;
548
+
549
+ // authentication bearer_auth required
550
+ // http bearer authentication required
551
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
552
+
553
+ localVarHeaderParameter['Content-Type'] = 'application/json';
554
+
555
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
556
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
557
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
558
+ localVarRequestOptions.data = serializeDataIfNeeded(topicSubscribers, localVarRequestOptions, configuration)
559
+
560
+ return {
561
+ url: toPathString(localVarUrlObj),
562
+ options: localVarRequestOptions,
563
+ };
564
+ },
565
+ /**
566
+ *
567
+ * @summary PATCH /v1/topics/:key/subscriptions/:id — update subscription metadata
568
+ * @param {string} key
569
+ * @param {string} id
570
+ * @param {UpdateSubscriptionMeta} updateSubscriptionMeta
571
+ * @param {*} [options] Override http request option.
572
+ * @throws {RequiredError}
573
+ */
574
+ updateSubscription: async (key: string, id: string, updateSubscriptionMeta: UpdateSubscriptionMeta, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
575
+ // verify required parameter 'key' is not null or undefined
576
+ assertParamExists('updateSubscription', 'key', key)
577
+ // verify required parameter 'id' is not null or undefined
578
+ assertParamExists('updateSubscription', 'id', id)
579
+ // verify required parameter 'updateSubscriptionMeta' is not null or undefined
580
+ assertParamExists('updateSubscription', 'updateSubscriptionMeta', updateSubscriptionMeta)
581
+ const localVarPath = `/v1/topics/{key}/subscriptions/{id}/`
582
+ .replace(`{${"key"}}`, encodeURIComponent(String(key)))
583
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
584
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
585
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
586
+ let baseOptions;
587
+ if (configuration) {
588
+ baseOptions = configuration.baseOptions;
589
+ }
590
+
591
+ const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options};
592
+ const localVarHeaderParameter = {} as any;
593
+ const localVarQueryParameter = {} as any;
594
+
595
+ // authentication bearer_auth required
596
+ // http bearer authentication required
597
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
598
+
599
+ localVarHeaderParameter['Content-Type'] = 'application/json';
600
+ localVarHeaderParameter['Accept'] = 'application/json';
601
+
602
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
603
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
604
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
605
+ localVarRequestOptions.data = serializeDataIfNeeded(updateSubscriptionMeta, localVarRequestOptions, configuration)
606
+
607
+ return {
608
+ url: toPathString(localVarUrlObj),
609
+ options: localVarRequestOptions,
610
+ };
611
+ },
612
+ /**
613
+ *
614
+ * @summary PATCH /v1/topics/:topicKey
615
+ * @param {string} key Topic key
616
+ * @param {UpdateTopic} updateTopic
617
+ * @param {*} [options] Override http request option.
618
+ * @throws {RequiredError}
619
+ */
620
+ updateTopic: async (key: string, updateTopic: UpdateTopic, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
621
+ // verify required parameter 'key' is not null or undefined
622
+ assertParamExists('updateTopic', 'key', key)
623
+ // verify required parameter 'updateTopic' is not null or undefined
624
+ assertParamExists('updateTopic', 'updateTopic', updateTopic)
625
+ const localVarPath = `/v1/topics/{key}/`
626
+ .replace(`{${"key"}}`, encodeURIComponent(String(key)));
627
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
628
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
629
+ let baseOptions;
630
+ if (configuration) {
631
+ baseOptions = configuration.baseOptions;
632
+ }
633
+
634
+ const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options};
635
+ const localVarHeaderParameter = {} as any;
636
+ const localVarQueryParameter = {} as any;
637
+
638
+ // authentication bearer_auth required
639
+ // http bearer authentication required
640
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
641
+
642
+ localVarHeaderParameter['Content-Type'] = 'application/json';
643
+ localVarHeaderParameter['Accept'] = 'application/json';
644
+
645
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
646
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
647
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
648
+ localVarRequestOptions.data = serializeDataIfNeeded(updateTopic, localVarRequestOptions, configuration)
649
+
650
+ return {
651
+ url: toPathString(localVarUrlObj),
652
+ options: localVarRequestOptions,
653
+ };
654
+ },
655
+ }
656
+ };
657
+
658
+ /**
659
+ * TopicsApi - functional programming interface
660
+ */
661
+ export const TopicsApiFp = function(configuration?: Configuration) {
662
+ const localVarAxiosParamCreator = TopicsApiAxiosParamCreator(configuration)
663
+ return {
664
+ /**
665
+ *
666
+ * @summary POST /v1/topics/:topicKey/subscribers
667
+ * @param {string} key Topic key
668
+ * @param {TopicSubscribers} topicSubscribers
669
+ * @param {*} [options] Override http request option.
670
+ * @throws {RequiredError}
671
+ */
672
+ async addSubscribers(key: string, topicSubscribers: TopicSubscribers, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
673
+ const localVarAxiosArgs = await localVarAxiosParamCreator.addSubscribers(key, topicSubscribers, options);
674
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
675
+ const localVarOperationServerBasePath = operationServerMap['TopicsApi.addSubscribers']?.[localVarOperationServerIndex]?.url;
676
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
677
+ },
678
+ /**
679
+ *
680
+ * @summary GET /v1/topics/:key/subscribers/:subscriber_id — membership check
681
+ * @param {string} key
682
+ * @param {string} subscriberId
683
+ * @param {*} [options] Override http request option.
684
+ * @throws {RequiredError}
685
+ */
686
+ async checkSubscriber(key: string, subscriberId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
687
+ const localVarAxiosArgs = await localVarAxiosParamCreator.checkSubscriber(key, subscriberId, options);
688
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
689
+ const localVarOperationServerBasePath = operationServerMap['TopicsApi.checkSubscriber']?.[localVarOperationServerIndex]?.url;
690
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
691
+ },
692
+ /**
693
+ *
694
+ * @summary POST /v1/topics/:key/subscriptions — create subscriptions
695
+ * @param {string} key
696
+ * @param {CreateSubscription} createSubscription
697
+ * @param {*} [options] Override http request option.
698
+ * @throws {RequiredError}
699
+ */
700
+ async createSubscriptions(key: string, createSubscription: CreateSubscription, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<TopicSubscriptionRecord>>> {
701
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createSubscriptions(key, createSubscription, options);
702
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
703
+ const localVarOperationServerBasePath = operationServerMap['TopicsApi.createSubscriptions']?.[localVarOperationServerIndex]?.url;
704
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
705
+ },
706
+ /**
707
+ *
708
+ * @summary POST /v1/topics
709
+ * @param {CreateTopic} createTopic
710
+ * @param {*} [options] Override http request option.
711
+ * @throws {RequiredError}
712
+ */
713
+ async createTopic(createTopic: CreateTopic, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<TopicRecord>> {
714
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createTopic(createTopic, options);
715
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
716
+ const localVarOperationServerBasePath = operationServerMap['TopicsApi.createTopic']?.[localVarOperationServerIndex]?.url;
717
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
718
+ },
719
+ /**
720
+ *
721
+ * @summary DELETE /v1/topics/:key/subscriptions — bulk delete
722
+ * @param {string} key
723
+ * @param {DeleteSubscription} deleteSubscription
724
+ * @param {*} [options] Override http request option.
725
+ * @throws {RequiredError}
726
+ */
727
+ async deleteSubscriptions(key: string, deleteSubscription: DeleteSubscription, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
728
+ const localVarAxiosArgs = await localVarAxiosParamCreator.deleteSubscriptions(key, deleteSubscription, options);
729
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
730
+ const localVarOperationServerBasePath = operationServerMap['TopicsApi.deleteSubscriptions']?.[localVarOperationServerIndex]?.url;
731
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
732
+ },
733
+ /**
734
+ *
735
+ * @summary DELETE /v1/topics/:topicKey
736
+ * @param {string} key Topic key
737
+ * @param {*} [options] Override http request option.
738
+ * @throws {RequiredError}
739
+ */
740
+ async deleteTopic(key: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
741
+ const localVarAxiosArgs = await localVarAxiosParamCreator.deleteTopic(key, options);
742
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
743
+ const localVarOperationServerBasePath = operationServerMap['TopicsApi.deleteTopic']?.[localVarOperationServerIndex]?.url;
744
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
745
+ },
746
+ /**
747
+ *
748
+ * @summary GET /v1/topics/:key/subscriptions/:id — get single subscription
749
+ * @param {string} key
750
+ * @param {string} id
751
+ * @param {*} [options] Override http request option.
752
+ * @throws {RequiredError}
753
+ */
754
+ async getSubscription(key: string, id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<TopicSubscriptionRecord>> {
755
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getSubscription(key, id, options);
756
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
757
+ const localVarOperationServerBasePath = operationServerMap['TopicsApi.getSubscription']?.[localVarOperationServerIndex]?.url;
758
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
759
+ },
760
+ /**
761
+ *
762
+ * @summary GET /v1/topics/:topicKey
763
+ * @param {string} key Topic key
764
+ * @param {*} [options] Override http request option.
765
+ * @throws {RequiredError}
766
+ */
767
+ async getTopic(key: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<TopicRecord>> {
768
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getTopic(key, options);
769
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
770
+ const localVarOperationServerBasePath = operationServerMap['TopicsApi.getTopic']?.[localVarOperationServerIndex]?.url;
771
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
772
+ },
773
+ /**
774
+ *
775
+ * @summary GET /v1/topics/:key/subscriptions — list subscriptions
776
+ * @param {string} key
777
+ * @param {number | null} [limit] Maximum number of items to return (1–100, default: 10).
778
+ * @param {number | null} [offset] Number of items to skip before returning results (default: 0).
779
+ * @param {string | null} [q] Optional full-text search query. When present, listing is powered by Typesense full-text search.
780
+ * @param {string | null} [filterBy] Optional Typesense filter expression for narrowing results. Example: &#x60;identifier:&#x3D;acme-corp&#x60; or &#x60;name:&#x3D;General&#x60;.
781
+ * @param {*} [options] Override http request option.
782
+ * @throws {RequiredError}
783
+ */
784
+ async listSubscriptions(key: string, limit?: number | null, offset?: number | null, q?: string | null, filterBy?: string | null, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PaginatedTopicSubscriptionRecord>> {
785
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listSubscriptions(key, limit, offset, q, filterBy, options);
786
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
787
+ const localVarOperationServerBasePath = operationServerMap['TopicsApi.listSubscriptions']?.[localVarOperationServerIndex]?.url;
788
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
789
+ },
790
+ /**
791
+ *
792
+ * @summary GET /v1/topics/:topicKey/subscribers
793
+ * @param {string} key Topic key
794
+ * @param {*} [options] Override http request option.
795
+ * @throws {RequiredError}
796
+ */
797
+ async listTopicSubscribers(key: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<string>>> {
798
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listTopicSubscribers(key, options);
799
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
800
+ const localVarOperationServerBasePath = operationServerMap['TopicsApi.listTopicSubscribers']?.[localVarOperationServerIndex]?.url;
801
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
802
+ },
803
+ /**
804
+ *
805
+ * @summary GET /v1/topics
806
+ * @param {number | null} [limit] Maximum number of items to return (1–100, default: 10).
807
+ * @param {number | null} [offset] Number of items to skip before returning results (default: 0).
808
+ * @param {string | null} [q] Optional full-text search query. When present, listing is powered by Typesense full-text search.
809
+ * @param {string | null} [filterBy] Optional Typesense filter expression for narrowing results. Example: &#x60;identifier:&#x3D;acme-corp&#x60; or &#x60;name:&#x3D;General&#x60;.
810
+ * @param {*} [options] Override http request option.
811
+ * @throws {RequiredError}
812
+ */
813
+ async listTopics(limit?: number | null, offset?: number | null, q?: string | null, filterBy?: string | null, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PaginatedTopicRecord>> {
814
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listTopics(limit, offset, q, filterBy, options);
815
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
816
+ const localVarOperationServerBasePath = operationServerMap['TopicsApi.listTopics']?.[localVarOperationServerIndex]?.url;
817
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
818
+ },
819
+ /**
820
+ *
821
+ * @summary POST /v1/topics/:topicKey/subscribers/removal
822
+ * @param {string} key Topic key
823
+ * @param {TopicSubscribers} topicSubscribers
824
+ * @param {*} [options] Override http request option.
825
+ * @throws {RequiredError}
826
+ */
827
+ async removeSubscribers(key: string, topicSubscribers: TopicSubscribers, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
828
+ const localVarAxiosArgs = await localVarAxiosParamCreator.removeSubscribers(key, topicSubscribers, options);
829
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
830
+ const localVarOperationServerBasePath = operationServerMap['TopicsApi.removeSubscribers']?.[localVarOperationServerIndex]?.url;
831
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
832
+ },
833
+ /**
834
+ *
835
+ * @summary PATCH /v1/topics/:key/subscriptions/:id — update subscription metadata
836
+ * @param {string} key
837
+ * @param {string} id
838
+ * @param {UpdateSubscriptionMeta} updateSubscriptionMeta
839
+ * @param {*} [options] Override http request option.
840
+ * @throws {RequiredError}
841
+ */
842
+ async updateSubscription(key: string, id: string, updateSubscriptionMeta: UpdateSubscriptionMeta, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<TopicSubscriptionRecord>> {
843
+ const localVarAxiosArgs = await localVarAxiosParamCreator.updateSubscription(key, id, updateSubscriptionMeta, options);
844
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
845
+ const localVarOperationServerBasePath = operationServerMap['TopicsApi.updateSubscription']?.[localVarOperationServerIndex]?.url;
846
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
847
+ },
848
+ /**
849
+ *
850
+ * @summary PATCH /v1/topics/:topicKey
851
+ * @param {string} key Topic key
852
+ * @param {UpdateTopic} updateTopic
853
+ * @param {*} [options] Override http request option.
854
+ * @throws {RequiredError}
855
+ */
856
+ async updateTopic(key: string, updateTopic: UpdateTopic, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<TopicRecord>> {
857
+ const localVarAxiosArgs = await localVarAxiosParamCreator.updateTopic(key, updateTopic, options);
858
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
859
+ const localVarOperationServerBasePath = operationServerMap['TopicsApi.updateTopic']?.[localVarOperationServerIndex]?.url;
860
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
861
+ },
862
+ }
863
+ };
864
+
865
+ /**
866
+ * TopicsApi - factory interface
867
+ */
868
+ export const TopicsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
869
+ const localVarFp = TopicsApiFp(configuration)
870
+ return {
871
+ /**
872
+ *
873
+ * @summary POST /v1/topics/:topicKey/subscribers
874
+ * @param {string} key Topic key
875
+ * @param {TopicSubscribers} topicSubscribers
876
+ * @param {*} [options] Override http request option.
877
+ * @throws {RequiredError}
878
+ */
879
+ addSubscribers(key: string, topicSubscribers: TopicSubscribers, options?: RawAxiosRequestConfig): AxiosPromise<void> {
880
+ return localVarFp.addSubscribers(key, topicSubscribers, options).then((request) => request(axios, basePath));
881
+ },
882
+ /**
883
+ *
884
+ * @summary GET /v1/topics/:key/subscribers/:subscriber_id — membership check
885
+ * @param {string} key
886
+ * @param {string} subscriberId
887
+ * @param {*} [options] Override http request option.
888
+ * @throws {RequiredError}
889
+ */
890
+ checkSubscriber(key: string, subscriberId: string, options?: RawAxiosRequestConfig): AxiosPromise<void> {
891
+ return localVarFp.checkSubscriber(key, subscriberId, options).then((request) => request(axios, basePath));
892
+ },
893
+ /**
894
+ *
895
+ * @summary POST /v1/topics/:key/subscriptions — create subscriptions
896
+ * @param {string} key
897
+ * @param {CreateSubscription} createSubscription
898
+ * @param {*} [options] Override http request option.
899
+ * @throws {RequiredError}
900
+ */
901
+ createSubscriptions(key: string, createSubscription: CreateSubscription, options?: RawAxiosRequestConfig): AxiosPromise<Array<TopicSubscriptionRecord>> {
902
+ return localVarFp.createSubscriptions(key, createSubscription, options).then((request) => request(axios, basePath));
903
+ },
904
+ /**
905
+ *
906
+ * @summary POST /v1/topics
907
+ * @param {CreateTopic} createTopic
908
+ * @param {*} [options] Override http request option.
909
+ * @throws {RequiredError}
910
+ */
911
+ createTopic(createTopic: CreateTopic, options?: RawAxiosRequestConfig): AxiosPromise<TopicRecord> {
912
+ return localVarFp.createTopic(createTopic, options).then((request) => request(axios, basePath));
913
+ },
914
+ /**
915
+ *
916
+ * @summary DELETE /v1/topics/:key/subscriptions — bulk delete
917
+ * @param {string} key
918
+ * @param {DeleteSubscription} deleteSubscription
919
+ * @param {*} [options] Override http request option.
920
+ * @throws {RequiredError}
921
+ */
922
+ deleteSubscriptions(key: string, deleteSubscription: DeleteSubscription, options?: RawAxiosRequestConfig): AxiosPromise<void> {
923
+ return localVarFp.deleteSubscriptions(key, deleteSubscription, options).then((request) => request(axios, basePath));
924
+ },
925
+ /**
926
+ *
927
+ * @summary DELETE /v1/topics/:topicKey
928
+ * @param {string} key Topic key
929
+ * @param {*} [options] Override http request option.
930
+ * @throws {RequiredError}
931
+ */
932
+ deleteTopic(key: string, options?: RawAxiosRequestConfig): AxiosPromise<void> {
933
+ return localVarFp.deleteTopic(key, options).then((request) => request(axios, basePath));
934
+ },
935
+ /**
936
+ *
937
+ * @summary GET /v1/topics/:key/subscriptions/:id — get single subscription
938
+ * @param {string} key
939
+ * @param {string} id
940
+ * @param {*} [options] Override http request option.
941
+ * @throws {RequiredError}
942
+ */
943
+ getSubscription(key: string, id: string, options?: RawAxiosRequestConfig): AxiosPromise<TopicSubscriptionRecord> {
944
+ return localVarFp.getSubscription(key, id, options).then((request) => request(axios, basePath));
945
+ },
946
+ /**
947
+ *
948
+ * @summary GET /v1/topics/:topicKey
949
+ * @param {string} key Topic key
950
+ * @param {*} [options] Override http request option.
951
+ * @throws {RequiredError}
952
+ */
953
+ getTopic(key: string, options?: RawAxiosRequestConfig): AxiosPromise<TopicRecord> {
954
+ return localVarFp.getTopic(key, options).then((request) => request(axios, basePath));
955
+ },
956
+ /**
957
+ *
958
+ * @summary GET /v1/topics/:key/subscriptions — list subscriptions
959
+ * @param {string} key
960
+ * @param {number | null} [limit] Maximum number of items to return (1–100, default: 10).
961
+ * @param {number | null} [offset] Number of items to skip before returning results (default: 0).
962
+ * @param {string | null} [q] Optional full-text search query. When present, listing is powered by Typesense full-text search.
963
+ * @param {string | null} [filterBy] Optional Typesense filter expression for narrowing results. Example: &#x60;identifier:&#x3D;acme-corp&#x60; or &#x60;name:&#x3D;General&#x60;.
964
+ * @param {*} [options] Override http request option.
965
+ * @throws {RequiredError}
966
+ */
967
+ listSubscriptions(key: string, limit?: number | null, offset?: number | null, q?: string | null, filterBy?: string | null, options?: RawAxiosRequestConfig): AxiosPromise<PaginatedTopicSubscriptionRecord> {
968
+ return localVarFp.listSubscriptions(key, limit, offset, q, filterBy, options).then((request) => request(axios, basePath));
969
+ },
970
+ /**
971
+ *
972
+ * @summary GET /v1/topics/:topicKey/subscribers
973
+ * @param {string} key Topic key
974
+ * @param {*} [options] Override http request option.
975
+ * @throws {RequiredError}
976
+ */
977
+ listTopicSubscribers(key: string, options?: RawAxiosRequestConfig): AxiosPromise<Array<string>> {
978
+ return localVarFp.listTopicSubscribers(key, options).then((request) => request(axios, basePath));
979
+ },
980
+ /**
981
+ *
982
+ * @summary GET /v1/topics
983
+ * @param {number | null} [limit] Maximum number of items to return (1–100, default: 10).
984
+ * @param {number | null} [offset] Number of items to skip before returning results (default: 0).
985
+ * @param {string | null} [q] Optional full-text search query. When present, listing is powered by Typesense full-text search.
986
+ * @param {string | null} [filterBy] Optional Typesense filter expression for narrowing results. Example: &#x60;identifier:&#x3D;acme-corp&#x60; or &#x60;name:&#x3D;General&#x60;.
987
+ * @param {*} [options] Override http request option.
988
+ * @throws {RequiredError}
989
+ */
990
+ listTopics(limit?: number | null, offset?: number | null, q?: string | null, filterBy?: string | null, options?: RawAxiosRequestConfig): AxiosPromise<PaginatedTopicRecord> {
991
+ return localVarFp.listTopics(limit, offset, q, filterBy, options).then((request) => request(axios, basePath));
992
+ },
993
+ /**
994
+ *
995
+ * @summary POST /v1/topics/:topicKey/subscribers/removal
996
+ * @param {string} key Topic key
997
+ * @param {TopicSubscribers} topicSubscribers
998
+ * @param {*} [options] Override http request option.
999
+ * @throws {RequiredError}
1000
+ */
1001
+ removeSubscribers(key: string, topicSubscribers: TopicSubscribers, options?: RawAxiosRequestConfig): AxiosPromise<void> {
1002
+ return localVarFp.removeSubscribers(key, topicSubscribers, options).then((request) => request(axios, basePath));
1003
+ },
1004
+ /**
1005
+ *
1006
+ * @summary PATCH /v1/topics/:key/subscriptions/:id — update subscription metadata
1007
+ * @param {string} key
1008
+ * @param {string} id
1009
+ * @param {UpdateSubscriptionMeta} updateSubscriptionMeta
1010
+ * @param {*} [options] Override http request option.
1011
+ * @throws {RequiredError}
1012
+ */
1013
+ updateSubscription(key: string, id: string, updateSubscriptionMeta: UpdateSubscriptionMeta, options?: RawAxiosRequestConfig): AxiosPromise<TopicSubscriptionRecord> {
1014
+ return localVarFp.updateSubscription(key, id, updateSubscriptionMeta, options).then((request) => request(axios, basePath));
1015
+ },
1016
+ /**
1017
+ *
1018
+ * @summary PATCH /v1/topics/:topicKey
1019
+ * @param {string} key Topic key
1020
+ * @param {UpdateTopic} updateTopic
1021
+ * @param {*} [options] Override http request option.
1022
+ * @throws {RequiredError}
1023
+ */
1024
+ updateTopic(key: string, updateTopic: UpdateTopic, options?: RawAxiosRequestConfig): AxiosPromise<TopicRecord> {
1025
+ return localVarFp.updateTopic(key, updateTopic, options).then((request) => request(axios, basePath));
1026
+ },
1027
+ };
1028
+ };
1029
+
1030
+ /**
1031
+ * TopicsApi - interface
1032
+ */
1033
+ export interface TopicsApiInterface {
1034
+ /**
1035
+ *
1036
+ * @summary POST /v1/topics/:topicKey/subscribers
1037
+ * @param {string} key Topic key
1038
+ * @param {TopicSubscribers} topicSubscribers
1039
+ * @param {*} [options] Override http request option.
1040
+ * @throws {RequiredError}
1041
+ */
1042
+ addSubscribers(key: string, topicSubscribers: TopicSubscribers, options?: RawAxiosRequestConfig): AxiosPromise<void>;
1043
+
1044
+ /**
1045
+ *
1046
+ * @summary GET /v1/topics/:key/subscribers/:subscriber_id — membership check
1047
+ * @param {string} key
1048
+ * @param {string} subscriberId
1049
+ * @param {*} [options] Override http request option.
1050
+ * @throws {RequiredError}
1051
+ */
1052
+ checkSubscriber(key: string, subscriberId: string, options?: RawAxiosRequestConfig): AxiosPromise<void>;
1053
+
1054
+ /**
1055
+ *
1056
+ * @summary POST /v1/topics/:key/subscriptions — create subscriptions
1057
+ * @param {string} key
1058
+ * @param {CreateSubscription} createSubscription
1059
+ * @param {*} [options] Override http request option.
1060
+ * @throws {RequiredError}
1061
+ */
1062
+ createSubscriptions(key: string, createSubscription: CreateSubscription, options?: RawAxiosRequestConfig): AxiosPromise<Array<TopicSubscriptionRecord>>;
1063
+
1064
+ /**
1065
+ *
1066
+ * @summary POST /v1/topics
1067
+ * @param {CreateTopic} createTopic
1068
+ * @param {*} [options] Override http request option.
1069
+ * @throws {RequiredError}
1070
+ */
1071
+ createTopic(createTopic: CreateTopic, options?: RawAxiosRequestConfig): AxiosPromise<TopicRecord>;
1072
+
1073
+ /**
1074
+ *
1075
+ * @summary DELETE /v1/topics/:key/subscriptions — bulk delete
1076
+ * @param {string} key
1077
+ * @param {DeleteSubscription} deleteSubscription
1078
+ * @param {*} [options] Override http request option.
1079
+ * @throws {RequiredError}
1080
+ */
1081
+ deleteSubscriptions(key: string, deleteSubscription: DeleteSubscription, options?: RawAxiosRequestConfig): AxiosPromise<void>;
1082
+
1083
+ /**
1084
+ *
1085
+ * @summary DELETE /v1/topics/:topicKey
1086
+ * @param {string} key Topic key
1087
+ * @param {*} [options] Override http request option.
1088
+ * @throws {RequiredError}
1089
+ */
1090
+ deleteTopic(key: string, options?: RawAxiosRequestConfig): AxiosPromise<void>;
1091
+
1092
+ /**
1093
+ *
1094
+ * @summary GET /v1/topics/:key/subscriptions/:id — get single subscription
1095
+ * @param {string} key
1096
+ * @param {string} id
1097
+ * @param {*} [options] Override http request option.
1098
+ * @throws {RequiredError}
1099
+ */
1100
+ getSubscription(key: string, id: string, options?: RawAxiosRequestConfig): AxiosPromise<TopicSubscriptionRecord>;
1101
+
1102
+ /**
1103
+ *
1104
+ * @summary GET /v1/topics/:topicKey
1105
+ * @param {string} key Topic key
1106
+ * @param {*} [options] Override http request option.
1107
+ * @throws {RequiredError}
1108
+ */
1109
+ getTopic(key: string, options?: RawAxiosRequestConfig): AxiosPromise<TopicRecord>;
1110
+
1111
+ /**
1112
+ *
1113
+ * @summary GET /v1/topics/:key/subscriptions — list subscriptions
1114
+ * @param {string} key
1115
+ * @param {number | null} [limit] Maximum number of items to return (1–100, default: 10).
1116
+ * @param {number | null} [offset] Number of items to skip before returning results (default: 0).
1117
+ * @param {string | null} [q] Optional full-text search query. When present, listing is powered by Typesense full-text search.
1118
+ * @param {string | null} [filterBy] Optional Typesense filter expression for narrowing results. Example: &#x60;identifier:&#x3D;acme-corp&#x60; or &#x60;name:&#x3D;General&#x60;.
1119
+ * @param {*} [options] Override http request option.
1120
+ * @throws {RequiredError}
1121
+ */
1122
+ listSubscriptions(key: string, limit?: number | null, offset?: number | null, q?: string | null, filterBy?: string | null, options?: RawAxiosRequestConfig): AxiosPromise<PaginatedTopicSubscriptionRecord>;
1123
+
1124
+ /**
1125
+ *
1126
+ * @summary GET /v1/topics/:topicKey/subscribers
1127
+ * @param {string} key Topic key
1128
+ * @param {*} [options] Override http request option.
1129
+ * @throws {RequiredError}
1130
+ */
1131
+ listTopicSubscribers(key: string, options?: RawAxiosRequestConfig): AxiosPromise<Array<string>>;
1132
+
1133
+ /**
1134
+ *
1135
+ * @summary GET /v1/topics
1136
+ * @param {number | null} [limit] Maximum number of items to return (1–100, default: 10).
1137
+ * @param {number | null} [offset] Number of items to skip before returning results (default: 0).
1138
+ * @param {string | null} [q] Optional full-text search query. When present, listing is powered by Typesense full-text search.
1139
+ * @param {string | null} [filterBy] Optional Typesense filter expression for narrowing results. Example: &#x60;identifier:&#x3D;acme-corp&#x60; or &#x60;name:&#x3D;General&#x60;.
1140
+ * @param {*} [options] Override http request option.
1141
+ * @throws {RequiredError}
1142
+ */
1143
+ listTopics(limit?: number | null, offset?: number | null, q?: string | null, filterBy?: string | null, options?: RawAxiosRequestConfig): AxiosPromise<PaginatedTopicRecord>;
1144
+
1145
+ /**
1146
+ *
1147
+ * @summary POST /v1/topics/:topicKey/subscribers/removal
1148
+ * @param {string} key Topic key
1149
+ * @param {TopicSubscribers} topicSubscribers
1150
+ * @param {*} [options] Override http request option.
1151
+ * @throws {RequiredError}
1152
+ */
1153
+ removeSubscribers(key: string, topicSubscribers: TopicSubscribers, options?: RawAxiosRequestConfig): AxiosPromise<void>;
1154
+
1155
+ /**
1156
+ *
1157
+ * @summary PATCH /v1/topics/:key/subscriptions/:id — update subscription metadata
1158
+ * @param {string} key
1159
+ * @param {string} id
1160
+ * @param {UpdateSubscriptionMeta} updateSubscriptionMeta
1161
+ * @param {*} [options] Override http request option.
1162
+ * @throws {RequiredError}
1163
+ */
1164
+ updateSubscription(key: string, id: string, updateSubscriptionMeta: UpdateSubscriptionMeta, options?: RawAxiosRequestConfig): AxiosPromise<TopicSubscriptionRecord>;
1165
+
1166
+ /**
1167
+ *
1168
+ * @summary PATCH /v1/topics/:topicKey
1169
+ * @param {string} key Topic key
1170
+ * @param {UpdateTopic} updateTopic
1171
+ * @param {*} [options] Override http request option.
1172
+ * @throws {RequiredError}
1173
+ */
1174
+ updateTopic(key: string, updateTopic: UpdateTopic, options?: RawAxiosRequestConfig): AxiosPromise<TopicRecord>;
1175
+
1176
+ }
1177
+
1178
+ /**
1179
+ * TopicsApi - object-oriented interface
1180
+ */
1181
+ export class TopicsApi extends BaseAPI implements TopicsApiInterface {
1182
+ /**
1183
+ *
1184
+ * @summary POST /v1/topics/:topicKey/subscribers
1185
+ * @param {string} key Topic key
1186
+ * @param {TopicSubscribers} topicSubscribers
1187
+ * @param {*} [options] Override http request option.
1188
+ * @throws {RequiredError}
1189
+ */
1190
+ public addSubscribers(key: string, topicSubscribers: TopicSubscribers, options?: RawAxiosRequestConfig) {
1191
+ return TopicsApiFp(this.configuration).addSubscribers(key, topicSubscribers, options).then((request) => request(this.axios, this.basePath));
1192
+ }
1193
+
1194
+ /**
1195
+ *
1196
+ * @summary GET /v1/topics/:key/subscribers/:subscriber_id — membership check
1197
+ * @param {string} key
1198
+ * @param {string} subscriberId
1199
+ * @param {*} [options] Override http request option.
1200
+ * @throws {RequiredError}
1201
+ */
1202
+ public checkSubscriber(key: string, subscriberId: string, options?: RawAxiosRequestConfig) {
1203
+ return TopicsApiFp(this.configuration).checkSubscriber(key, subscriberId, options).then((request) => request(this.axios, this.basePath));
1204
+ }
1205
+
1206
+ /**
1207
+ *
1208
+ * @summary POST /v1/topics/:key/subscriptions — create subscriptions
1209
+ * @param {string} key
1210
+ * @param {CreateSubscription} createSubscription
1211
+ * @param {*} [options] Override http request option.
1212
+ * @throws {RequiredError}
1213
+ */
1214
+ public createSubscriptions(key: string, createSubscription: CreateSubscription, options?: RawAxiosRequestConfig) {
1215
+ return TopicsApiFp(this.configuration).createSubscriptions(key, createSubscription, options).then((request) => request(this.axios, this.basePath));
1216
+ }
1217
+
1218
+ /**
1219
+ *
1220
+ * @summary POST /v1/topics
1221
+ * @param {CreateTopic} createTopic
1222
+ * @param {*} [options] Override http request option.
1223
+ * @throws {RequiredError}
1224
+ */
1225
+ public createTopic(createTopic: CreateTopic, options?: RawAxiosRequestConfig) {
1226
+ return TopicsApiFp(this.configuration).createTopic(createTopic, options).then((request) => request(this.axios, this.basePath));
1227
+ }
1228
+
1229
+ /**
1230
+ *
1231
+ * @summary DELETE /v1/topics/:key/subscriptions — bulk delete
1232
+ * @param {string} key
1233
+ * @param {DeleteSubscription} deleteSubscription
1234
+ * @param {*} [options] Override http request option.
1235
+ * @throws {RequiredError}
1236
+ */
1237
+ public deleteSubscriptions(key: string, deleteSubscription: DeleteSubscription, options?: RawAxiosRequestConfig) {
1238
+ return TopicsApiFp(this.configuration).deleteSubscriptions(key, deleteSubscription, options).then((request) => request(this.axios, this.basePath));
1239
+ }
1240
+
1241
+ /**
1242
+ *
1243
+ * @summary DELETE /v1/topics/:topicKey
1244
+ * @param {string} key Topic key
1245
+ * @param {*} [options] Override http request option.
1246
+ * @throws {RequiredError}
1247
+ */
1248
+ public deleteTopic(key: string, options?: RawAxiosRequestConfig) {
1249
+ return TopicsApiFp(this.configuration).deleteTopic(key, options).then((request) => request(this.axios, this.basePath));
1250
+ }
1251
+
1252
+ /**
1253
+ *
1254
+ * @summary GET /v1/topics/:key/subscriptions/:id — get single subscription
1255
+ * @param {string} key
1256
+ * @param {string} id
1257
+ * @param {*} [options] Override http request option.
1258
+ * @throws {RequiredError}
1259
+ */
1260
+ public getSubscription(key: string, id: string, options?: RawAxiosRequestConfig) {
1261
+ return TopicsApiFp(this.configuration).getSubscription(key, id, options).then((request) => request(this.axios, this.basePath));
1262
+ }
1263
+
1264
+ /**
1265
+ *
1266
+ * @summary GET /v1/topics/:topicKey
1267
+ * @param {string} key Topic key
1268
+ * @param {*} [options] Override http request option.
1269
+ * @throws {RequiredError}
1270
+ */
1271
+ public getTopic(key: string, options?: RawAxiosRequestConfig) {
1272
+ return TopicsApiFp(this.configuration).getTopic(key, options).then((request) => request(this.axios, this.basePath));
1273
+ }
1274
+
1275
+ /**
1276
+ *
1277
+ * @summary GET /v1/topics/:key/subscriptions — list subscriptions
1278
+ * @param {string} key
1279
+ * @param {number | null} [limit] Maximum number of items to return (1–100, default: 10).
1280
+ * @param {number | null} [offset] Number of items to skip before returning results (default: 0).
1281
+ * @param {string | null} [q] Optional full-text search query. When present, listing is powered by Typesense full-text search.
1282
+ * @param {string | null} [filterBy] Optional Typesense filter expression for narrowing results. Example: &#x60;identifier:&#x3D;acme-corp&#x60; or &#x60;name:&#x3D;General&#x60;.
1283
+ * @param {*} [options] Override http request option.
1284
+ * @throws {RequiredError}
1285
+ */
1286
+ public listSubscriptions(key: string, limit?: number | null, offset?: number | null, q?: string | null, filterBy?: string | null, options?: RawAxiosRequestConfig) {
1287
+ return TopicsApiFp(this.configuration).listSubscriptions(key, limit, offset, q, filterBy, options).then((request) => request(this.axios, this.basePath));
1288
+ }
1289
+
1290
+ /**
1291
+ *
1292
+ * @summary GET /v1/topics/:topicKey/subscribers
1293
+ * @param {string} key Topic key
1294
+ * @param {*} [options] Override http request option.
1295
+ * @throws {RequiredError}
1296
+ */
1297
+ public listTopicSubscribers(key: string, options?: RawAxiosRequestConfig) {
1298
+ return TopicsApiFp(this.configuration).listTopicSubscribers(key, options).then((request) => request(this.axios, this.basePath));
1299
+ }
1300
+
1301
+ /**
1302
+ *
1303
+ * @summary GET /v1/topics
1304
+ * @param {number | null} [limit] Maximum number of items to return (1–100, default: 10).
1305
+ * @param {number | null} [offset] Number of items to skip before returning results (default: 0).
1306
+ * @param {string | null} [q] Optional full-text search query. When present, listing is powered by Typesense full-text search.
1307
+ * @param {string | null} [filterBy] Optional Typesense filter expression for narrowing results. Example: &#x60;identifier:&#x3D;acme-corp&#x60; or &#x60;name:&#x3D;General&#x60;.
1308
+ * @param {*} [options] Override http request option.
1309
+ * @throws {RequiredError}
1310
+ */
1311
+ public listTopics(limit?: number | null, offset?: number | null, q?: string | null, filterBy?: string | null, options?: RawAxiosRequestConfig) {
1312
+ return TopicsApiFp(this.configuration).listTopics(limit, offset, q, filterBy, options).then((request) => request(this.axios, this.basePath));
1313
+ }
1314
+
1315
+ /**
1316
+ *
1317
+ * @summary POST /v1/topics/:topicKey/subscribers/removal
1318
+ * @param {string} key Topic key
1319
+ * @param {TopicSubscribers} topicSubscribers
1320
+ * @param {*} [options] Override http request option.
1321
+ * @throws {RequiredError}
1322
+ */
1323
+ public removeSubscribers(key: string, topicSubscribers: TopicSubscribers, options?: RawAxiosRequestConfig) {
1324
+ return TopicsApiFp(this.configuration).removeSubscribers(key, topicSubscribers, options).then((request) => request(this.axios, this.basePath));
1325
+ }
1326
+
1327
+ /**
1328
+ *
1329
+ * @summary PATCH /v1/topics/:key/subscriptions/:id — update subscription metadata
1330
+ * @param {string} key
1331
+ * @param {string} id
1332
+ * @param {UpdateSubscriptionMeta} updateSubscriptionMeta
1333
+ * @param {*} [options] Override http request option.
1334
+ * @throws {RequiredError}
1335
+ */
1336
+ public updateSubscription(key: string, id: string, updateSubscriptionMeta: UpdateSubscriptionMeta, options?: RawAxiosRequestConfig) {
1337
+ return TopicsApiFp(this.configuration).updateSubscription(key, id, updateSubscriptionMeta, options).then((request) => request(this.axios, this.basePath));
1338
+ }
1339
+
1340
+ /**
1341
+ *
1342
+ * @summary PATCH /v1/topics/:topicKey
1343
+ * @param {string} key Topic key
1344
+ * @param {UpdateTopic} updateTopic
1345
+ * @param {*} [options] Override http request option.
1346
+ * @throws {RequiredError}
1347
+ */
1348
+ public updateTopic(key: string, updateTopic: UpdateTopic, options?: RawAxiosRequestConfig) {
1349
+ return TopicsApiFp(this.configuration).updateTopic(key, updateTopic, options).then((request) => request(this.axios, this.basePath));
1350
+ }
1351
+ }
1352
+