@enbbox/api 1.0.0 → 1.0.1

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 (376) 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/docs/ActionBody.md +21 -0
  33. package/docs/ActionRecord.md +25 -0
  34. package/docs/ActionType.md +17 -0
  35. package/docs/ActivityApi.md +412 -0
  36. package/docs/ActivityChartPoint.md +31 -0
  37. package/docs/ActivityRecord.md +39 -0
  38. package/docs/ActivityRequestRecord.md +31 -0
  39. package/docs/ActivityStats.md +31 -0
  40. package/docs/ActorType.md +15 -0
  41. package/docs/ApiKeyCreated.md +27 -0
  42. package/docs/ApiKeyInfo.md +27 -0
  43. package/docs/AutoConfigureResult.md +21 -0
  44. package/docs/BillingApi.md +375 -0
  45. package/docs/BillingInterval.md +11 -0
  46. package/docs/Branding.md +31 -0
  47. package/docs/BroadcastTrigger.md +27 -0
  48. package/docs/BulkCreateSubscribers.md +21 -0
  49. package/docs/BulkPreferenceItem.md +24 -0
  50. package/docs/BulkPreferences.md +21 -0
  51. package/docs/BulkResult.md +22 -0
  52. package/docs/BulkTrigger.md +21 -0
  53. package/docs/ChannelConnectionRecord.md +31 -0
  54. package/docs/ChannelConnectionsApi.md +276 -0
  55. package/docs/ChannelEndpointRecord.md +33 -0
  56. package/docs/ChannelEndpointsApi.md +276 -0
  57. package/docs/ChannelPreferences.md +29 -0
  58. package/docs/ChannelType.md +17 -0
  59. package/docs/ChartQuery.md +21 -0
  60. package/docs/ChatOauth.md +21 -0
  61. package/docs/ChatOauthRequest.md +22 -0
  62. package/docs/CheckoutSession.md +23 -0
  63. package/docs/ContextRecord.md +29 -0
  64. package/docs/ContextsApi.md +285 -0
  65. package/docs/CreateChannelConnection.md +27 -0
  66. package/docs/CreateChannelEndpoint.md +29 -0
  67. package/docs/CreateCheckout.md +23 -0
  68. package/docs/CreateContext.md +25 -0
  69. package/docs/CreateIntegration.md +31 -0
  70. package/docs/CreateLayout.md +31 -0
  71. package/docs/CreateNotificationGroup.md +21 -0
  72. package/docs/CreateProject.md +21 -0
  73. package/docs/CreateSubscriber.md +37 -0
  74. package/docs/CreateSubscription.md +21 -0
  75. package/docs/CreateTopic.md +23 -0
  76. package/docs/CreateWebhook.md +23 -0
  77. package/docs/CreateWorkflow.md +35 -0
  78. package/docs/CtaType.md +9 -0
  79. package/docs/CursorMeta.md +27 -0
  80. package/docs/CursorPaginatedFeedItem.md +23 -0
  81. package/docs/CursorPaginatedFeedItemDataInner.md +37 -0
  82. package/docs/CursorPaginatedMessageRecord.md +23 -0
  83. package/docs/CursorPaginatedMessageRecordDataInner.md +41 -0
  84. package/docs/CursorPagination.md +25 -0
  85. package/docs/DeleteSubscription.md +20 -0
  86. package/docs/DeliveryAck.md +21 -0
  87. package/docs/DeliveryStatusWebhook.md +27 -0
  88. package/docs/DnsSettings.md +23 -0
  89. package/docs/EngagementStatsResponse.md +27 -0
  90. package/docs/EntitlementItem.md +25 -0
  91. package/docs/Entitlements.md +21 -0
  92. package/docs/ErrorDetail.md +27 -0
  93. package/docs/EventsApi.md +214 -0
  94. package/docs/EventsUsage.md +23 -0
  95. package/docs/FeatureFlagsApi.md +51 -0
  96. package/docs/FeedItem.md +37 -0
  97. package/docs/FeedQuery.md +31 -0
  98. package/docs/HealthApi.md +140 -0
  99. package/docs/InboundParseApi.md +59 -0
  100. package/docs/InboxApi.md +673 -0
  101. package/docs/InboxNotification.md +41 -0
  102. package/docs/InboxPreference.md +23 -0
  103. package/docs/InboxQuery.md +27 -0
  104. package/docs/InitSessionRequest.md +23 -0
  105. package/docs/InitSessionResponse.md +23 -0
  106. package/docs/IntegrationRecord.md +35 -0
  107. package/docs/IntegrationsApi.md +475 -0
  108. package/docs/InviteMember.md +23 -0
  109. package/docs/InviteMemberBody.md +23 -0
  110. package/docs/JobLog.md +33 -0
  111. package/docs/LayoutPreview.md +21 -0
  112. package/docs/LayoutPreviewResult.md +21 -0
  113. package/docs/LayoutRecord.md +31 -0
  114. package/docs/LayoutUsageItem.md +23 -0
  115. package/docs/LayoutsApi.md +484 -0
  116. package/docs/MarkAll.md +21 -0
  117. package/docs/MarkMessages.md +23 -0
  118. package/docs/MarkResult.md +21 -0
  119. package/docs/MemberRecord.md +27 -0
  120. package/docs/MemberRole.md +15 -0
  121. package/docs/MemberStatus.md +13 -0
  122. package/docs/MessageQuery.md +31 -0
  123. package/docs/MessageRecord.md +41 -0
  124. package/docs/MessagesApi.md +175 -0
  125. package/docs/MetricsApi.md +51 -0
  126. package/docs/NotificationCount.md +25 -0
  127. package/docs/NotificationGroupRecord.md +23 -0
  128. package/docs/NotificationGroupsApi.md +209 -0
  129. package/docs/NotificationLog.md +33 -0
  130. package/docs/NotificationQuery.md +25 -0
  131. package/docs/NotificationsApi.md +166 -0
  132. package/docs/OffsetMeta.md +27 -0
  133. package/docs/OffsetPagination.md +27 -0
  134. package/docs/OnlineStatus.md +21 -0
  135. package/docs/PaginatedChannelConnectionRecord.md +23 -0
  136. package/docs/PaginatedChannelConnectionRecordDataInner.md +31 -0
  137. package/docs/PaginatedChannelEndpointRecord.md +23 -0
  138. package/docs/PaginatedChannelEndpointRecordDataInner.md +33 -0
  139. package/docs/PaginatedContextRecord.md +23 -0
  140. package/docs/PaginatedContextRecordDataInner.md +29 -0
  141. package/docs/PaginatedIntegrationRecord.md +23 -0
  142. package/docs/PaginatedIntegrationRecordDataInner.md +35 -0
  143. package/docs/PaginatedLayoutRecord.md +23 -0
  144. package/docs/PaginatedLayoutRecordDataInner.md +31 -0
  145. package/docs/PaginatedSubscriberRecord.md +23 -0
  146. package/docs/PaginatedSubscriberRecordDataInner.md +41 -0
  147. package/docs/PaginatedTopicRecord.md +23 -0
  148. package/docs/PaginatedTopicRecordDataInner.md +24 -0
  149. package/docs/PaginatedTopicSubscriptionRecord.md +23 -0
  150. package/docs/PaginatedTopicSubscriptionRecordDataInner.md +29 -0
  151. package/docs/PaginatedWorkflowRecord.md +23 -0
  152. package/docs/PaginatedWorkflowRecordDataInner.md +37 -0
  153. package/docs/PaginationQuery.md +25 -0
  154. package/docs/PatchCredentials.md +27 -0
  155. package/docs/Plan.md +17 -0
  156. package/docs/PlanLimitsResponse.md +33 -0
  157. package/docs/PortalUrl.md +21 -0
  158. package/docs/PreferenceChannels.md +29 -0
  159. package/docs/PreferenceRecord.md +27 -0
  160. package/docs/PreferencesApi.md +171 -0
  161. package/docs/PreviewResult.md +20 -0
  162. package/docs/PriceInfo.md +27 -0
  163. package/docs/Prices.md +21 -0
  164. package/docs/ProjectRecord.md +27 -0
  165. package/docs/ProjectsApi.md +638 -0
  166. package/docs/SetCredentials.md +27 -0
  167. package/docs/StepPreview.md +21 -0
  168. package/docs/StepRecord.md +29 -0
  169. package/docs/StepType.md +27 -0
  170. package/docs/SubscriberCredential.md +27 -0
  171. package/docs/SubscriberPayload.md +37 -0
  172. package/docs/SubscriberRecord.md +41 -0
  173. package/docs/SubscribersApi.md +887 -0
  174. package/docs/Subscription.md +39 -0
  175. package/docs/SyncWorkflow.md +21 -0
  176. package/docs/SystemAvatarIcon.md +19 -0
  177. package/docs/TopicRecord.md +24 -0
  178. package/docs/TopicSubscribers.md +21 -0
  179. package/docs/TopicSubscription.md +23 -0
  180. package/docs/TopicSubscriptionRecord.md +29 -0
  181. package/docs/TopicsApi.md +777 -0
  182. package/docs/TranslationsApi.md +258 -0
  183. package/docs/TrialInfo.md +27 -0
  184. package/docs/TriggerEvent.md +31 -0
  185. package/docs/TriggerRecipients.md +39 -0
  186. package/docs/TriggerRecipientsOneOf.md +21 -0
  187. package/docs/TriggerResult.md +25 -0
  188. package/docs/TriggerStatus.md +21 -0
  189. package/docs/UnseenCount.md +21 -0
  190. package/docs/UpdateChannelConnection.md +21 -0
  191. package/docs/UpdateChannelEndpoint.md +23 -0
  192. package/docs/UpdateContext.md +21 -0
  193. package/docs/UpdateInboxPreferences.md +29 -0
  194. package/docs/UpdateIntegration.md +27 -0
  195. package/docs/UpdateLayout.md +27 -0
  196. package/docs/UpdateNotificationGroup.md +21 -0
  197. package/docs/UpdatePreference.md +23 -0
  198. package/docs/UpdateProject.md +23 -0
  199. package/docs/UpdateSubscriber.md +35 -0
  200. package/docs/UpdateSubscriptionMeta.md +21 -0
  201. package/docs/UpdateTopic.md +21 -0
  202. package/docs/UpdateWorkflow.md +31 -0
  203. package/docs/Usage.md +35 -0
  204. package/docs/WebhookRecord.md +31 -0
  205. package/docs/WebhooksApi.md +212 -0
  206. package/docs/WidgetSettings.md +21 -0
  207. package/docs/WorkflowRecord.md +37 -0
  208. package/docs/WorkflowRunRecord.md +31 -0
  209. package/docs/WorkflowStatsResponse.md +27 -0
  210. package/docs/WorkflowStatus.md +21 -0
  211. package/docs/WorkflowStepCreate.md +31 -0
  212. package/docs/WorkflowsApi.md +550 -0
  213. package/git_push.sh +57 -0
  214. package/index.ts +18 -0
  215. package/models/action-body.ts +26 -0
  216. package/models/action-record.ts +28 -0
  217. package/models/action-type.ts +32 -0
  218. package/models/activity-chart-point.ts +46 -0
  219. package/models/activity-record.ts +62 -0
  220. package/models/activity-request-record.ts +46 -0
  221. package/models/activity-stats.ts +46 -0
  222. package/models/actor-type.ts +31 -0
  223. package/models/api-key-created.ts +38 -0
  224. package/models/api-key-info.ts +38 -0
  225. package/models/auto-configure-result.ts +23 -0
  226. package/models/billing-interval.ts +29 -0
  227. package/models/branding.ts +46 -0
  228. package/models/broadcast-trigger.ts +29 -0
  229. package/models/bulk-create-subscribers.ts +26 -0
  230. package/models/bulk-preference-item.ts +25 -0
  231. package/models/bulk-preferences.ts +26 -0
  232. package/models/bulk-result.ts +24 -0
  233. package/models/bulk-trigger.ts +29 -0
  234. package/models/channel-connection-record.ts +43 -0
  235. package/models/channel-endpoint-record.ts +47 -0
  236. package/models/channel-preferences.ts +27 -0
  237. package/models/channel-type.ts +32 -0
  238. package/models/chart-query.ts +26 -0
  239. package/models/chat-oauth-request.ts +21 -0
  240. package/models/chat-oauth.ts +23 -0
  241. package/models/checkout-session.ts +35 -0
  242. package/models/context-record.ts +42 -0
  243. package/models/create-channel-connection.ts +35 -0
  244. package/models/create-channel-endpoint.ts +39 -0
  245. package/models/create-checkout.ts +35 -0
  246. package/models/create-context.ts +34 -0
  247. package/models/create-integration.ts +51 -0
  248. package/models/create-layout.ts +34 -0
  249. package/models/create-notification-group.ts +26 -0
  250. package/models/create-project.ts +26 -0
  251. package/models/create-subscriber.ts +58 -0
  252. package/models/create-subscription.ts +23 -0
  253. package/models/create-topic.ts +30 -0
  254. package/models/create-webhook.ts +30 -0
  255. package/models/create-workflow.ts +60 -0
  256. package/models/cta-type.ts +28 -0
  257. package/models/cursor-meta.ts +38 -0
  258. package/models/cursor-paginated-feed-item-data-inner.ts +40 -0
  259. package/models/cursor-paginated-feed-item.ts +36 -0
  260. package/models/cursor-paginated-message-record-data-inner.ts +45 -0
  261. package/models/cursor-paginated-message-record.ts +36 -0
  262. package/models/cursor-pagination.ts +34 -0
  263. package/models/delete-subscription.ts +20 -0
  264. package/models/delivery-ack.ts +23 -0
  265. package/models/delivery-status-webhook.ts +29 -0
  266. package/models/dns-settings.ts +30 -0
  267. package/models/engagement-stats-response.ts +38 -0
  268. package/models/entitlement-item.ts +34 -0
  269. package/models/entitlements.ts +26 -0
  270. package/models/error-detail.ts +38 -0
  271. package/models/events-usage.ts +30 -0
  272. package/models/feed-item.ts +40 -0
  273. package/models/feed-query.ts +28 -0
  274. package/models/inbox-notification.ts +39 -0
  275. package/models/inbox-preference.ts +27 -0
  276. package/models/inbox-query.ts +26 -0
  277. package/models/index.ts +158 -0
  278. package/models/init-session-request.ts +30 -0
  279. package/models/init-session-response.ts +30 -0
  280. package/models/integration-record.ts +59 -0
  281. package/models/invite-member-body.ts +30 -0
  282. package/models/invite-member.ts +30 -0
  283. package/models/job-log.ts +47 -0
  284. package/models/layout-preview-result.ts +23 -0
  285. package/models/layout-preview.ts +23 -0
  286. package/models/layout-record.ts +37 -0
  287. package/models/layout-usage-item.ts +24 -0
  288. package/models/mark-all.ts +23 -0
  289. package/models/mark-messages.ts +24 -0
  290. package/models/mark-result.ts +23 -0
  291. package/models/member-record.ts +38 -0
  292. package/models/member-role.ts +31 -0
  293. package/models/member-status.ts +30 -0
  294. package/models/message-query.ts +46 -0
  295. package/models/message-record.ts +45 -0
  296. package/models/notification-count.ts +25 -0
  297. package/models/notification-group-record.ts +30 -0
  298. package/models/notification-log.ts +41 -0
  299. package/models/notification-query.ts +34 -0
  300. package/models/offset-meta.ts +38 -0
  301. package/models/offset-pagination.ts +38 -0
  302. package/models/online-status.ts +23 -0
  303. package/models/paginated-channel-connection-record-data-inner.ts +43 -0
  304. package/models/paginated-channel-connection-record.ts +36 -0
  305. package/models/paginated-channel-endpoint-record-data-inner.ts +47 -0
  306. package/models/paginated-channel-endpoint-record.ts +36 -0
  307. package/models/paginated-context-record-data-inner.ts +42 -0
  308. package/models/paginated-context-record.ts +36 -0
  309. package/models/paginated-integration-record-data-inner.ts +59 -0
  310. package/models/paginated-integration-record.ts +36 -0
  311. package/models/paginated-layout-record-data-inner.ts +37 -0
  312. package/models/paginated-layout-record.ts +36 -0
  313. package/models/paginated-subscriber-record-data-inner.ts +69 -0
  314. package/models/paginated-subscriber-record.ts +36 -0
  315. package/models/paginated-topic-record-data-inner.ts +28 -0
  316. package/models/paginated-topic-record.ts +36 -0
  317. package/models/paginated-topic-subscription-record-data-inner.ts +39 -0
  318. package/models/paginated-topic-subscription-record.ts +36 -0
  319. package/models/paginated-workflow-record-data-inner.ts +58 -0
  320. package/models/paginated-workflow-record.ts +36 -0
  321. package/models/pagination-query.ts +34 -0
  322. package/models/patch-credentials.ts +29 -0
  323. package/models/plan-limits-response.ts +55 -0
  324. package/models/plan.ts +32 -0
  325. package/models/portal-url.ts +26 -0
  326. package/models/preference-channels.ts +27 -0
  327. package/models/preference-record.ts +32 -0
  328. package/models/preview-result.ts +20 -0
  329. package/models/price-info.ts +38 -0
  330. package/models/prices.ts +26 -0
  331. package/models/project-record.ts +46 -0
  332. package/models/set-credentials.ts +29 -0
  333. package/models/step-preview.ts +23 -0
  334. package/models/step-record.ts +36 -0
  335. package/models/step-type.ts +37 -0
  336. package/models/subscriber-credential.ts +26 -0
  337. package/models/subscriber-payload.ts +24 -0
  338. package/models/subscriber-record.ts +69 -0
  339. package/models/subscription.ts +73 -0
  340. package/models/sync-workflow.ts +26 -0
  341. package/models/system-avatar-icon.ts +33 -0
  342. package/models/topic-record.ts +28 -0
  343. package/models/topic-subscribers.ts +23 -0
  344. package/models/topic-subscription-record.ts +39 -0
  345. package/models/topic-subscription.ts +27 -0
  346. package/models/trial-info.ts +38 -0
  347. package/models/trigger-event.ts +49 -0
  348. package/models/trigger-recipients-one-of.ts +23 -0
  349. package/models/trigger-recipients.ts +29 -0
  350. package/models/trigger-result.ts +39 -0
  351. package/models/trigger-status.ts +34 -0
  352. package/models/unseen-count.ts +23 -0
  353. package/models/update-channel-connection.ts +23 -0
  354. package/models/update-channel-endpoint.ts +27 -0
  355. package/models/update-context.ts +26 -0
  356. package/models/update-inbox-preferences.ts +27 -0
  357. package/models/update-integration.ts +38 -0
  358. package/models/update-layout.ts +29 -0
  359. package/models/update-notification-group.ts +26 -0
  360. package/models/update-preference.ts +27 -0
  361. package/models/update-project.ts +33 -0
  362. package/models/update-subscriber.ts +54 -0
  363. package/models/update-subscription-meta.ts +23 -0
  364. package/models/update-topic.ts +26 -0
  365. package/models/update-workflow.ts +52 -0
  366. package/models/usage.ts +59 -0
  367. package/models/webhook-record.ts +46 -0
  368. package/models/widget-settings.ts +26 -0
  369. package/models/workflow-record.ts +58 -0
  370. package/models/workflow-run-record.ts +46 -0
  371. package/models/workflow-stats-response.ts +38 -0
  372. package/models/workflow-status.ts +26 -0
  373. package/models/workflow-step-create.ts +51 -0
  374. package/package.json +9 -33
  375. package/tsconfig.esm.json +7 -0
  376. package/tsconfig.json +18 -0
@@ -0,0 +1,1542 @@
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 { BulkCreateSubscribers } from '../models';
26
+ // @ts-ignore
27
+ import type { BulkPreferences } from '../models';
28
+ // @ts-ignore
29
+ import type { BulkResult } from '../models';
30
+ // @ts-ignore
31
+ import type { CreateSubscriber } from '../models';
32
+ // @ts-ignore
33
+ import type { CursorPaginatedFeedItem } from '../models';
34
+ // @ts-ignore
35
+ import type { ErrorDetail } from '../models';
36
+ // @ts-ignore
37
+ import type { MarkAll } from '../models';
38
+ // @ts-ignore
39
+ import type { MarkMessages } from '../models';
40
+ // @ts-ignore
41
+ import type { MarkResult } from '../models';
42
+ // @ts-ignore
43
+ import type { OnlineStatus } from '../models';
44
+ // @ts-ignore
45
+ import type { PaginatedSubscriberRecord } from '../models';
46
+ // @ts-ignore
47
+ import type { PatchCredentials } from '../models';
48
+ // @ts-ignore
49
+ import type { SetCredentials } from '../models';
50
+ // @ts-ignore
51
+ import type { SubscriberRecord } from '../models';
52
+ // @ts-ignore
53
+ import type { TopicSubscription } from '../models';
54
+ // @ts-ignore
55
+ import type { UnseenCount } from '../models';
56
+ // @ts-ignore
57
+ import type { UpdateSubscriber } from '../models';
58
+ /**
59
+ * SubscribersApi - axios parameter creator
60
+ */
61
+ export const SubscribersApiAxiosParamCreator = function (configuration?: Configuration) {
62
+ return {
63
+ /**
64
+ *
65
+ * @summary POST /v1/subscribers/bulk — create multiple subscribers at once
66
+ * @param {BulkCreateSubscribers} bulkCreateSubscribers
67
+ * @param {*} [options] Override http request option.
68
+ * @throws {RequiredError}
69
+ */
70
+ bulkCreate: async (bulkCreateSubscribers: BulkCreateSubscribers, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
71
+ // verify required parameter 'bulkCreateSubscribers' is not null or undefined
72
+ assertParamExists('bulkCreate', 'bulkCreateSubscribers', bulkCreateSubscribers)
73
+ const localVarPath = `/v1/subscribers/bulk/`;
74
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
75
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
76
+ let baseOptions;
77
+ if (configuration) {
78
+ baseOptions = configuration.baseOptions;
79
+ }
80
+
81
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
82
+ const localVarHeaderParameter = {} as any;
83
+ const localVarQueryParameter = {} as any;
84
+
85
+ // authentication bearer_auth required
86
+ // http bearer authentication required
87
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
88
+
89
+ localVarHeaderParameter['Content-Type'] = 'application/json';
90
+ localVarHeaderParameter['Accept'] = 'application/json';
91
+
92
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
93
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
94
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
95
+ localVarRequestOptions.data = serializeDataIfNeeded(bulkCreateSubscribers, localVarRequestOptions, configuration)
96
+
97
+ return {
98
+ url: toPathString(localVarUrlObj),
99
+ options: localVarRequestOptions,
100
+ };
101
+ },
102
+ /**
103
+ *
104
+ * @summary PATCH /v1/subscribers/:id/preferences/bulk — update multiple workflow preferences at once
105
+ * @param {string} id Subscriber ID
106
+ * @param {BulkPreferences} bulkPreferences
107
+ * @param {*} [options] Override http request option.
108
+ * @throws {RequiredError}
109
+ */
110
+ bulkUpdatePreferences: async (id: string, bulkPreferences: BulkPreferences, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
111
+ // verify required parameter 'id' is not null or undefined
112
+ assertParamExists('bulkUpdatePreferences', 'id', id)
113
+ // verify required parameter 'bulkPreferences' is not null or undefined
114
+ assertParamExists('bulkUpdatePreferences', 'bulkPreferences', bulkPreferences)
115
+ const localVarPath = `/v1/subscribers/{id}/preferences/bulk/`
116
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
117
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
118
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
119
+ let baseOptions;
120
+ if (configuration) {
121
+ baseOptions = configuration.baseOptions;
122
+ }
123
+
124
+ const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options};
125
+ const localVarHeaderParameter = {} as any;
126
+ const localVarQueryParameter = {} as any;
127
+
128
+ // authentication bearer_auth required
129
+ // http bearer authentication required
130
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
131
+
132
+ localVarHeaderParameter['Content-Type'] = 'application/json';
133
+
134
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
135
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
136
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
137
+ localVarRequestOptions.data = serializeDataIfNeeded(bulkPreferences, localVarRequestOptions, configuration)
138
+
139
+ return {
140
+ url: toPathString(localVarUrlObj),
141
+ options: localVarRequestOptions,
142
+ };
143
+ },
144
+ /**
145
+ *
146
+ * @summary POST /v1/subscribers
147
+ * @param {CreateSubscriber} createSubscriber
148
+ * @param {*} [options] Override http request option.
149
+ * @throws {RequiredError}
150
+ */
151
+ createSubscriber: async (createSubscriber: CreateSubscriber, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
152
+ // verify required parameter 'createSubscriber' is not null or undefined
153
+ assertParamExists('createSubscriber', 'createSubscriber', createSubscriber)
154
+ const localVarPath = `/v1/subscribers/`;
155
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
156
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
157
+ let baseOptions;
158
+ if (configuration) {
159
+ baseOptions = configuration.baseOptions;
160
+ }
161
+
162
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
163
+ const localVarHeaderParameter = {} as any;
164
+ const localVarQueryParameter = {} as any;
165
+
166
+ // authentication bearer_auth required
167
+ // http bearer authentication required
168
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
169
+
170
+ localVarHeaderParameter['Content-Type'] = 'application/json';
171
+ localVarHeaderParameter['Accept'] = 'application/json';
172
+
173
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
174
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
175
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
176
+ localVarRequestOptions.data = serializeDataIfNeeded(createSubscriber, localVarRequestOptions, configuration)
177
+
178
+ return {
179
+ url: toPathString(localVarUrlObj),
180
+ options: localVarRequestOptions,
181
+ };
182
+ },
183
+ /**
184
+ *
185
+ * @summary DELETE /v1/subscribers/:id/credentials/:provider_id — remove creds for a provider
186
+ * @param {string} id Subscriber ID
187
+ * @param {string} providerId Provider ID
188
+ * @param {*} [options] Override http request option.
189
+ * @throws {RequiredError}
190
+ */
191
+ deleteCredentials: async (id: string, providerId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
192
+ // verify required parameter 'id' is not null or undefined
193
+ assertParamExists('deleteCredentials', 'id', id)
194
+ // verify required parameter 'providerId' is not null or undefined
195
+ assertParamExists('deleteCredentials', 'providerId', providerId)
196
+ const localVarPath = `/v1/subscribers/{id}/credentials/{provider_id}/`
197
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)))
198
+ .replace(`{${"provider_id"}}`, encodeURIComponent(String(providerId)));
199
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
200
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
201
+ let baseOptions;
202
+ if (configuration) {
203
+ baseOptions = configuration.baseOptions;
204
+ }
205
+
206
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
207
+ const localVarHeaderParameter = {} as any;
208
+ const localVarQueryParameter = {} as any;
209
+
210
+ // authentication bearer_auth required
211
+ // http bearer authentication required
212
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
213
+
214
+
215
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
216
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
217
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
218
+
219
+ return {
220
+ url: toPathString(localVarUrlObj),
221
+ options: localVarRequestOptions,
222
+ };
223
+ },
224
+ /**
225
+ *
226
+ * @summary DELETE /v1/subscribers/:subscriber_id
227
+ * @param {string} id Subscriber ID
228
+ * @param {*} [options] Override http request option.
229
+ * @throws {RequiredError}
230
+ */
231
+ deleteSubscriber: async (id: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
232
+ // verify required parameter 'id' is not null or undefined
233
+ assertParamExists('deleteSubscriber', 'id', id)
234
+ const localVarPath = `/v1/subscribers/{id}/`
235
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
236
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
237
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
238
+ let baseOptions;
239
+ if (configuration) {
240
+ baseOptions = configuration.baseOptions;
241
+ }
242
+
243
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
244
+ const localVarHeaderParameter = {} as any;
245
+ const localVarQueryParameter = {} as any;
246
+
247
+ // authentication bearer_auth required
248
+ // http bearer authentication required
249
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
250
+
251
+
252
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
253
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
254
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
255
+
256
+ return {
257
+ url: toPathString(localVarUrlObj),
258
+ options: localVarRequestOptions,
259
+ };
260
+ },
261
+ /**
262
+ *
263
+ * @summary GET /v1/subscribers/:subscriber_id
264
+ * @param {string} id Subscriber ID
265
+ * @param {*} [options] Override http request option.
266
+ * @throws {RequiredError}
267
+ */
268
+ getSubscriber: async (id: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
269
+ // verify required parameter 'id' is not null or undefined
270
+ assertParamExists('getSubscriber', 'id', id)
271
+ const localVarPath = `/v1/subscribers/{id}/`
272
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
273
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
274
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
275
+ let baseOptions;
276
+ if (configuration) {
277
+ baseOptions = configuration.baseOptions;
278
+ }
279
+
280
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
281
+ const localVarHeaderParameter = {} as any;
282
+ const localVarQueryParameter = {} as any;
283
+
284
+ // authentication bearer_auth required
285
+ // http bearer authentication required
286
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
287
+
288
+ localVarHeaderParameter['Accept'] = 'application/json';
289
+
290
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
291
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
292
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
293
+
294
+ return {
295
+ url: toPathString(localVarUrlObj),
296
+ options: localVarRequestOptions,
297
+ };
298
+ },
299
+ /**
300
+ *
301
+ * @summary GET /v1/subscribers/:id/subscriptions — list topic subscriptions for a subscriber
302
+ * @param {string} id Subscriber ID
303
+ * @param {*} [options] Override http request option.
304
+ * @throws {RequiredError}
305
+ */
306
+ listSubscriberSubscriptions: async (id: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
307
+ // verify required parameter 'id' is not null or undefined
308
+ assertParamExists('listSubscriberSubscriptions', 'id', id)
309
+ const localVarPath = `/v1/subscribers/{id}/subscriptions/`
310
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
311
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
312
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
313
+ let baseOptions;
314
+ if (configuration) {
315
+ baseOptions = configuration.baseOptions;
316
+ }
317
+
318
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
319
+ const localVarHeaderParameter = {} as any;
320
+ const localVarQueryParameter = {} as any;
321
+
322
+ // authentication bearer_auth required
323
+ // http bearer authentication required
324
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
325
+
326
+ localVarHeaderParameter['Accept'] = 'application/json';
327
+
328
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
329
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
330
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
331
+
332
+ return {
333
+ url: toPathString(localVarUrlObj),
334
+ options: localVarRequestOptions,
335
+ };
336
+ },
337
+ /**
338
+ * Lists subscribers for the current project. When the optional `q` query parameter is provided, the list is powered by Typesense full-text search (searching across email, name, phone, subscriber_id). Without `q`, a standard paginated listing from the primary store is returned.
339
+ * @summary GET /v1/subscribers
340
+ * @param {number | null} [limit] Maximum number of items to return (1–100, default 10).
341
+ * @param {number | null} [offset] Number of items to skip (default 0).
342
+ * @param {string | null} [q] Optional full-text search query (e.g., an email, name, or phone number). When present, search is powered by Typesense.
343
+ * @param {string | null} [filterBy] Optional filter expression for narrowing results. Example: &#x60;is_online:&#x3D;true&#x60; or &#x60;locale:&#x3D;en-US&#x60;.
344
+ * @param {*} [options] Override http request option.
345
+ * @throws {RequiredError}
346
+ */
347
+ listSubscribers: async (limit?: number | null, offset?: number | null, q?: string | null, filterBy?: string | null, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
348
+ const localVarPath = `/v1/subscribers/`;
349
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
350
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
351
+ let baseOptions;
352
+ if (configuration) {
353
+ baseOptions = configuration.baseOptions;
354
+ }
355
+
356
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
357
+ const localVarHeaderParameter = {} as any;
358
+ const localVarQueryParameter = {} as any;
359
+
360
+ // authentication bearer_auth required
361
+ // http bearer authentication required
362
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
363
+
364
+ if (limit !== undefined) {
365
+ localVarQueryParameter['limit'] = limit;
366
+ }
367
+
368
+ if (offset !== undefined) {
369
+ localVarQueryParameter['offset'] = offset;
370
+ }
371
+
372
+ if (q !== undefined) {
373
+ localVarQueryParameter['q'] = q;
374
+ }
375
+
376
+ if (filterBy !== undefined) {
377
+ localVarQueryParameter['filter_by'] = filterBy;
378
+ }
379
+
380
+ localVarHeaderParameter['Accept'] = 'application/json';
381
+
382
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
383
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
384
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
385
+
386
+ return {
387
+ url: toPathString(localVarUrlObj),
388
+ options: localVarRequestOptions,
389
+ };
390
+ },
391
+ /**
392
+ *
393
+ * @summary POST /v1/subscribers/:id/messages/mark-all — mark all messages
394
+ * @param {string} id Subscriber ID
395
+ * @param {MarkAll} markAll
396
+ * @param {*} [options] Override http request option.
397
+ * @throws {RequiredError}
398
+ */
399
+ markAllMessages: async (id: string, markAll: MarkAll, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
400
+ // verify required parameter 'id' is not null or undefined
401
+ assertParamExists('markAllMessages', 'id', id)
402
+ // verify required parameter 'markAll' is not null or undefined
403
+ assertParamExists('markAllMessages', 'markAll', markAll)
404
+ const localVarPath = `/v1/subscribers/{id}/messages/mark-all/`
405
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
406
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
407
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
408
+ let baseOptions;
409
+ if (configuration) {
410
+ baseOptions = configuration.baseOptions;
411
+ }
412
+
413
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
414
+ const localVarHeaderParameter = {} as any;
415
+ const localVarQueryParameter = {} as any;
416
+
417
+ // authentication bearer_auth required
418
+ // http bearer authentication required
419
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
420
+
421
+ localVarHeaderParameter['Content-Type'] = 'application/json';
422
+ localVarHeaderParameter['Accept'] = 'application/json';
423
+
424
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
425
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
426
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
427
+ localVarRequestOptions.data = serializeDataIfNeeded(markAll, localVarRequestOptions, configuration)
428
+
429
+ return {
430
+ url: toPathString(localVarUrlObj),
431
+ options: localVarRequestOptions,
432
+ };
433
+ },
434
+ /**
435
+ *
436
+ * @summary POST /v1/subscribers/:id/messages/mark-as — mark messages as read/seen/unseen
437
+ * @param {string} id Subscriber ID
438
+ * @param {MarkMessages} markMessages
439
+ * @param {*} [options] Override http request option.
440
+ * @throws {RequiredError}
441
+ */
442
+ markMessages: async (id: string, markMessages: MarkMessages, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
443
+ // verify required parameter 'id' is not null or undefined
444
+ assertParamExists('markMessages', 'id', id)
445
+ // verify required parameter 'markMessages' is not null or undefined
446
+ assertParamExists('markMessages', 'markMessages', markMessages)
447
+ const localVarPath = `/v1/subscribers/{id}/messages/mark-as/`
448
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
449
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
450
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
451
+ let baseOptions;
452
+ if (configuration) {
453
+ baseOptions = configuration.baseOptions;
454
+ }
455
+
456
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
457
+ const localVarHeaderParameter = {} as any;
458
+ const localVarQueryParameter = {} as any;
459
+
460
+ // authentication bearer_auth required
461
+ // http bearer authentication required
462
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
463
+
464
+ localVarHeaderParameter['Content-Type'] = 'application/json';
465
+ localVarHeaderParameter['Accept'] = 'application/json';
466
+
467
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
468
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
469
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
470
+ localVarRequestOptions.data = serializeDataIfNeeded(markMessages, localVarRequestOptions, configuration)
471
+
472
+ return {
473
+ url: toPathString(localVarUrlObj),
474
+ options: localVarRequestOptions,
475
+ };
476
+ },
477
+ /**
478
+ *
479
+ * @summary PUT /v1/subscribers/:id/credentials — replace all creds for a provider
480
+ * @param {string} id Subscriber ID
481
+ * @param {SetCredentials} setCredentials
482
+ * @param {*} [options] Override http request option.
483
+ * @throws {RequiredError}
484
+ */
485
+ setCredentials: async (id: string, setCredentials: SetCredentials, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
486
+ // verify required parameter 'id' is not null or undefined
487
+ assertParamExists('setCredentials', 'id', id)
488
+ // verify required parameter 'setCredentials' is not null or undefined
489
+ assertParamExists('setCredentials', 'setCredentials', setCredentials)
490
+ const localVarPath = `/v1/subscribers/{id}/credentials/`
491
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
492
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
493
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
494
+ let baseOptions;
495
+ if (configuration) {
496
+ baseOptions = configuration.baseOptions;
497
+ }
498
+
499
+ const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
500
+ const localVarHeaderParameter = {} as any;
501
+ const localVarQueryParameter = {} as any;
502
+
503
+ // authentication bearer_auth required
504
+ // http bearer authentication required
505
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
506
+
507
+ localVarHeaderParameter['Content-Type'] = 'application/json';
508
+ localVarHeaderParameter['Accept'] = 'application/json';
509
+
510
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
511
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
512
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
513
+ localVarRequestOptions.data = serializeDataIfNeeded(setCredentials, localVarRequestOptions, configuration)
514
+
515
+ return {
516
+ url: toPathString(localVarUrlObj),
517
+ options: localVarRequestOptions,
518
+ };
519
+ },
520
+ /**
521
+ *
522
+ * @summary GET /v1/subscribers/:id/notifications/feed — cursor-paginated message list
523
+ * @param {string} id Subscriber ID
524
+ * @param {number | null} [limit]
525
+ * @param {string | null} [after]
526
+ * @param {string | null} [before]
527
+ * @param {string | null} [channel]
528
+ * @param {boolean | null} [read]
529
+ * @param {boolean | null} [seen]
530
+ * @param {*} [options] Override http request option.
531
+ * @throws {RequiredError}
532
+ */
533
+ subscriberFeed: async (id: string, limit?: number | null, after?: string | null, before?: string | null, channel?: string | null, read?: boolean | null, seen?: boolean | null, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
534
+ // verify required parameter 'id' is not null or undefined
535
+ assertParamExists('subscriberFeed', 'id', id)
536
+ const localVarPath = `/v1/subscribers/{id}/notifications/feed/`
537
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
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: 'GET', ...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
+ if (limit !== undefined) {
554
+ localVarQueryParameter['limit'] = limit;
555
+ }
556
+
557
+ if (after !== undefined) {
558
+ localVarQueryParameter['after'] = after;
559
+ }
560
+
561
+ if (before !== undefined) {
562
+ localVarQueryParameter['before'] = before;
563
+ }
564
+
565
+ if (channel !== undefined) {
566
+ localVarQueryParameter['channel'] = channel;
567
+ }
568
+
569
+ if (read !== undefined) {
570
+ localVarQueryParameter['read'] = read;
571
+ }
572
+
573
+ if (seen !== undefined) {
574
+ localVarQueryParameter['seen'] = seen;
575
+ }
576
+
577
+ localVarHeaderParameter['Accept'] = 'application/json';
578
+
579
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
580
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
581
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
582
+
583
+ return {
584
+ url: toPathString(localVarUrlObj),
585
+ options: localVarRequestOptions,
586
+ };
587
+ },
588
+ /**
589
+ *
590
+ * @summary GET /v1/subscribers/:id/notifications/unseen — unseen count
591
+ * @param {string} id Subscriber ID
592
+ * @param {*} [options] Override http request option.
593
+ * @throws {RequiredError}
594
+ */
595
+ unseenCount: async (id: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
596
+ // verify required parameter 'id' is not null or undefined
597
+ assertParamExists('unseenCount', 'id', id)
598
+ const localVarPath = `/v1/subscribers/{id}/notifications/unseen/`
599
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
600
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
601
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
602
+ let baseOptions;
603
+ if (configuration) {
604
+ baseOptions = configuration.baseOptions;
605
+ }
606
+
607
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
608
+ const localVarHeaderParameter = {} as any;
609
+ const localVarQueryParameter = {} as any;
610
+
611
+ // authentication bearer_auth required
612
+ // http bearer authentication required
613
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
614
+
615
+ localVarHeaderParameter['Accept'] = 'application/json';
616
+
617
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
618
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
619
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
620
+
621
+ return {
622
+ url: toPathString(localVarUrlObj),
623
+ options: localVarRequestOptions,
624
+ };
625
+ },
626
+ /**
627
+ *
628
+ * @summary PATCH /v1/subscribers/:id/online-status — set online/offline
629
+ * @param {string} id Subscriber ID
630
+ * @param {OnlineStatus} onlineStatus
631
+ * @param {*} [options] Override http request option.
632
+ * @throws {RequiredError}
633
+ */
634
+ updateOnlineStatus: async (id: string, onlineStatus: OnlineStatus, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
635
+ // verify required parameter 'id' is not null or undefined
636
+ assertParamExists('updateOnlineStatus', 'id', id)
637
+ // verify required parameter 'onlineStatus' is not null or undefined
638
+ assertParamExists('updateOnlineStatus', 'onlineStatus', onlineStatus)
639
+ const localVarPath = `/v1/subscribers/{id}/online-status/`
640
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
641
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
642
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
643
+ let baseOptions;
644
+ if (configuration) {
645
+ baseOptions = configuration.baseOptions;
646
+ }
647
+
648
+ const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options};
649
+ const localVarHeaderParameter = {} as any;
650
+ const localVarQueryParameter = {} as any;
651
+
652
+ // authentication bearer_auth required
653
+ // http bearer authentication required
654
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
655
+
656
+ localVarHeaderParameter['Content-Type'] = 'application/json';
657
+ localVarHeaderParameter['Accept'] = 'application/json';
658
+
659
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
660
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
661
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
662
+ localVarRequestOptions.data = serializeDataIfNeeded(onlineStatus, localVarRequestOptions, configuration)
663
+
664
+ return {
665
+ url: toPathString(localVarUrlObj),
666
+ options: localVarRequestOptions,
667
+ };
668
+ },
669
+ /**
670
+ *
671
+ * @summary PATCH /v1/subscribers/:subscriber_id
672
+ * @param {string} id Subscriber ID
673
+ * @param {UpdateSubscriber} updateSubscriber
674
+ * @param {*} [options] Override http request option.
675
+ * @throws {RequiredError}
676
+ */
677
+ updateSubscriber: async (id: string, updateSubscriber: UpdateSubscriber, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
678
+ // verify required parameter 'id' is not null or undefined
679
+ assertParamExists('updateSubscriber', 'id', id)
680
+ // verify required parameter 'updateSubscriber' is not null or undefined
681
+ assertParamExists('updateSubscriber', 'updateSubscriber', updateSubscriber)
682
+ const localVarPath = `/v1/subscribers/{id}/`
683
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
684
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
685
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
686
+ let baseOptions;
687
+ if (configuration) {
688
+ baseOptions = configuration.baseOptions;
689
+ }
690
+
691
+ const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options};
692
+ const localVarHeaderParameter = {} as any;
693
+ const localVarQueryParameter = {} as any;
694
+
695
+ // authentication bearer_auth required
696
+ // http bearer authentication required
697
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
698
+
699
+ localVarHeaderParameter['Content-Type'] = 'application/json';
700
+ localVarHeaderParameter['Accept'] = 'application/json';
701
+
702
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
703
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
704
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
705
+ localVarRequestOptions.data = serializeDataIfNeeded(updateSubscriber, localVarRequestOptions, configuration)
706
+
707
+ return {
708
+ url: toPathString(localVarUrlObj),
709
+ options: localVarRequestOptions,
710
+ };
711
+ },
712
+ /**
713
+ *
714
+ * @summary PATCH /v1/subscribers/:id/credentials — upsert/merge creds for a provider
715
+ * @param {string} id Subscriber ID
716
+ * @param {PatchCredentials} patchCredentials
717
+ * @param {*} [options] Override http request option.
718
+ * @throws {RequiredError}
719
+ */
720
+ upsertCredentials: async (id: string, patchCredentials: PatchCredentials, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
721
+ // verify required parameter 'id' is not null or undefined
722
+ assertParamExists('upsertCredentials', 'id', id)
723
+ // verify required parameter 'patchCredentials' is not null or undefined
724
+ assertParamExists('upsertCredentials', 'patchCredentials', patchCredentials)
725
+ const localVarPath = `/v1/subscribers/{id}/credentials/`
726
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
727
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
728
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
729
+ let baseOptions;
730
+ if (configuration) {
731
+ baseOptions = configuration.baseOptions;
732
+ }
733
+
734
+ const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options};
735
+ const localVarHeaderParameter = {} as any;
736
+ const localVarQueryParameter = {} as any;
737
+
738
+ // authentication bearer_auth required
739
+ // http bearer authentication required
740
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
741
+
742
+ localVarHeaderParameter['Content-Type'] = 'application/json';
743
+ localVarHeaderParameter['Accept'] = 'application/json';
744
+
745
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
746
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
747
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
748
+ localVarRequestOptions.data = serializeDataIfNeeded(patchCredentials, localVarRequestOptions, configuration)
749
+
750
+ return {
751
+ url: toPathString(localVarUrlObj),
752
+ options: localVarRequestOptions,
753
+ };
754
+ },
755
+ }
756
+ };
757
+
758
+ /**
759
+ * SubscribersApi - functional programming interface
760
+ */
761
+ export const SubscribersApiFp = function(configuration?: Configuration) {
762
+ const localVarAxiosParamCreator = SubscribersApiAxiosParamCreator(configuration)
763
+ return {
764
+ /**
765
+ *
766
+ * @summary POST /v1/subscribers/bulk — create multiple subscribers at once
767
+ * @param {BulkCreateSubscribers} bulkCreateSubscribers
768
+ * @param {*} [options] Override http request option.
769
+ * @throws {RequiredError}
770
+ */
771
+ async bulkCreate(bulkCreateSubscribers: BulkCreateSubscribers, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<BulkResult>> {
772
+ const localVarAxiosArgs = await localVarAxiosParamCreator.bulkCreate(bulkCreateSubscribers, options);
773
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
774
+ const localVarOperationServerBasePath = operationServerMap['SubscribersApi.bulkCreate']?.[localVarOperationServerIndex]?.url;
775
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
776
+ },
777
+ /**
778
+ *
779
+ * @summary PATCH /v1/subscribers/:id/preferences/bulk — update multiple workflow preferences at once
780
+ * @param {string} id Subscriber ID
781
+ * @param {BulkPreferences} bulkPreferences
782
+ * @param {*} [options] Override http request option.
783
+ * @throws {RequiredError}
784
+ */
785
+ async bulkUpdatePreferences(id: string, bulkPreferences: BulkPreferences, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
786
+ const localVarAxiosArgs = await localVarAxiosParamCreator.bulkUpdatePreferences(id, bulkPreferences, options);
787
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
788
+ const localVarOperationServerBasePath = operationServerMap['SubscribersApi.bulkUpdatePreferences']?.[localVarOperationServerIndex]?.url;
789
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
790
+ },
791
+ /**
792
+ *
793
+ * @summary POST /v1/subscribers
794
+ * @param {CreateSubscriber} createSubscriber
795
+ * @param {*} [options] Override http request option.
796
+ * @throws {RequiredError}
797
+ */
798
+ async createSubscriber(createSubscriber: CreateSubscriber, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SubscriberRecord>> {
799
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createSubscriber(createSubscriber, options);
800
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
801
+ const localVarOperationServerBasePath = operationServerMap['SubscribersApi.createSubscriber']?.[localVarOperationServerIndex]?.url;
802
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
803
+ },
804
+ /**
805
+ *
806
+ * @summary DELETE /v1/subscribers/:id/credentials/:provider_id — remove creds for a provider
807
+ * @param {string} id Subscriber ID
808
+ * @param {string} providerId Provider ID
809
+ * @param {*} [options] Override http request option.
810
+ * @throws {RequiredError}
811
+ */
812
+ async deleteCredentials(id: string, providerId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
813
+ const localVarAxiosArgs = await localVarAxiosParamCreator.deleteCredentials(id, providerId, options);
814
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
815
+ const localVarOperationServerBasePath = operationServerMap['SubscribersApi.deleteCredentials']?.[localVarOperationServerIndex]?.url;
816
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
817
+ },
818
+ /**
819
+ *
820
+ * @summary DELETE /v1/subscribers/:subscriber_id
821
+ * @param {string} id Subscriber ID
822
+ * @param {*} [options] Override http request option.
823
+ * @throws {RequiredError}
824
+ */
825
+ async deleteSubscriber(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
826
+ const localVarAxiosArgs = await localVarAxiosParamCreator.deleteSubscriber(id, options);
827
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
828
+ const localVarOperationServerBasePath = operationServerMap['SubscribersApi.deleteSubscriber']?.[localVarOperationServerIndex]?.url;
829
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
830
+ },
831
+ /**
832
+ *
833
+ * @summary GET /v1/subscribers/:subscriber_id
834
+ * @param {string} id Subscriber ID
835
+ * @param {*} [options] Override http request option.
836
+ * @throws {RequiredError}
837
+ */
838
+ async getSubscriber(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SubscriberRecord>> {
839
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getSubscriber(id, options);
840
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
841
+ const localVarOperationServerBasePath = operationServerMap['SubscribersApi.getSubscriber']?.[localVarOperationServerIndex]?.url;
842
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
843
+ },
844
+ /**
845
+ *
846
+ * @summary GET /v1/subscribers/:id/subscriptions — list topic subscriptions for a subscriber
847
+ * @param {string} id Subscriber ID
848
+ * @param {*} [options] Override http request option.
849
+ * @throws {RequiredError}
850
+ */
851
+ async listSubscriberSubscriptions(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<TopicSubscription>>> {
852
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listSubscriberSubscriptions(id, options);
853
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
854
+ const localVarOperationServerBasePath = operationServerMap['SubscribersApi.listSubscriberSubscriptions']?.[localVarOperationServerIndex]?.url;
855
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
856
+ },
857
+ /**
858
+ * Lists subscribers for the current project. When the optional `q` query parameter is provided, the list is powered by Typesense full-text search (searching across email, name, phone, subscriber_id). Without `q`, a standard paginated listing from the primary store is returned.
859
+ * @summary GET /v1/subscribers
860
+ * @param {number | null} [limit] Maximum number of items to return (1–100, default 10).
861
+ * @param {number | null} [offset] Number of items to skip (default 0).
862
+ * @param {string | null} [q] Optional full-text search query (e.g., an email, name, or phone number). When present, search is powered by Typesense.
863
+ * @param {string | null} [filterBy] Optional filter expression for narrowing results. Example: &#x60;is_online:&#x3D;true&#x60; or &#x60;locale:&#x3D;en-US&#x60;.
864
+ * @param {*} [options] Override http request option.
865
+ * @throws {RequiredError}
866
+ */
867
+ async listSubscribers(limit?: number | null, offset?: number | null, q?: string | null, filterBy?: string | null, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PaginatedSubscriberRecord>> {
868
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listSubscribers(limit, offset, q, filterBy, options);
869
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
870
+ const localVarOperationServerBasePath = operationServerMap['SubscribersApi.listSubscribers']?.[localVarOperationServerIndex]?.url;
871
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
872
+ },
873
+ /**
874
+ *
875
+ * @summary POST /v1/subscribers/:id/messages/mark-all — mark all messages
876
+ * @param {string} id Subscriber ID
877
+ * @param {MarkAll} markAll
878
+ * @param {*} [options] Override http request option.
879
+ * @throws {RequiredError}
880
+ */
881
+ async markAllMessages(id: string, markAll: MarkAll, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<MarkResult>> {
882
+ const localVarAxiosArgs = await localVarAxiosParamCreator.markAllMessages(id, markAll, options);
883
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
884
+ const localVarOperationServerBasePath = operationServerMap['SubscribersApi.markAllMessages']?.[localVarOperationServerIndex]?.url;
885
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
886
+ },
887
+ /**
888
+ *
889
+ * @summary POST /v1/subscribers/:id/messages/mark-as — mark messages as read/seen/unseen
890
+ * @param {string} id Subscriber ID
891
+ * @param {MarkMessages} markMessages
892
+ * @param {*} [options] Override http request option.
893
+ * @throws {RequiredError}
894
+ */
895
+ async markMessages(id: string, markMessages: MarkMessages, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<MarkResult>> {
896
+ const localVarAxiosArgs = await localVarAxiosParamCreator.markMessages(id, markMessages, options);
897
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
898
+ const localVarOperationServerBasePath = operationServerMap['SubscribersApi.markMessages']?.[localVarOperationServerIndex]?.url;
899
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
900
+ },
901
+ /**
902
+ *
903
+ * @summary PUT /v1/subscribers/:id/credentials — replace all creds for a provider
904
+ * @param {string} id Subscriber ID
905
+ * @param {SetCredentials} setCredentials
906
+ * @param {*} [options] Override http request option.
907
+ * @throws {RequiredError}
908
+ */
909
+ async setCredentials(id: string, setCredentials: SetCredentials, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SubscriberRecord>> {
910
+ const localVarAxiosArgs = await localVarAxiosParamCreator.setCredentials(id, setCredentials, options);
911
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
912
+ const localVarOperationServerBasePath = operationServerMap['SubscribersApi.setCredentials']?.[localVarOperationServerIndex]?.url;
913
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
914
+ },
915
+ /**
916
+ *
917
+ * @summary GET /v1/subscribers/:id/notifications/feed — cursor-paginated message list
918
+ * @param {string} id Subscriber ID
919
+ * @param {number | null} [limit]
920
+ * @param {string | null} [after]
921
+ * @param {string | null} [before]
922
+ * @param {string | null} [channel]
923
+ * @param {boolean | null} [read]
924
+ * @param {boolean | null} [seen]
925
+ * @param {*} [options] Override http request option.
926
+ * @throws {RequiredError}
927
+ */
928
+ async subscriberFeed(id: string, limit?: number | null, after?: string | null, before?: string | null, channel?: string | null, read?: boolean | null, seen?: boolean | null, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CursorPaginatedFeedItem>> {
929
+ const localVarAxiosArgs = await localVarAxiosParamCreator.subscriberFeed(id, limit, after, before, channel, read, seen, options);
930
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
931
+ const localVarOperationServerBasePath = operationServerMap['SubscribersApi.subscriberFeed']?.[localVarOperationServerIndex]?.url;
932
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
933
+ },
934
+ /**
935
+ *
936
+ * @summary GET /v1/subscribers/:id/notifications/unseen — unseen count
937
+ * @param {string} id Subscriber ID
938
+ * @param {*} [options] Override http request option.
939
+ * @throws {RequiredError}
940
+ */
941
+ async unseenCount(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UnseenCount>> {
942
+ const localVarAxiosArgs = await localVarAxiosParamCreator.unseenCount(id, options);
943
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
944
+ const localVarOperationServerBasePath = operationServerMap['SubscribersApi.unseenCount']?.[localVarOperationServerIndex]?.url;
945
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
946
+ },
947
+ /**
948
+ *
949
+ * @summary PATCH /v1/subscribers/:id/online-status — set online/offline
950
+ * @param {string} id Subscriber ID
951
+ * @param {OnlineStatus} onlineStatus
952
+ * @param {*} [options] Override http request option.
953
+ * @throws {RequiredError}
954
+ */
955
+ async updateOnlineStatus(id: string, onlineStatus: OnlineStatus, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SubscriberRecord>> {
956
+ const localVarAxiosArgs = await localVarAxiosParamCreator.updateOnlineStatus(id, onlineStatus, options);
957
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
958
+ const localVarOperationServerBasePath = operationServerMap['SubscribersApi.updateOnlineStatus']?.[localVarOperationServerIndex]?.url;
959
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
960
+ },
961
+ /**
962
+ *
963
+ * @summary PATCH /v1/subscribers/:subscriber_id
964
+ * @param {string} id Subscriber ID
965
+ * @param {UpdateSubscriber} updateSubscriber
966
+ * @param {*} [options] Override http request option.
967
+ * @throws {RequiredError}
968
+ */
969
+ async updateSubscriber(id: string, updateSubscriber: UpdateSubscriber, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SubscriberRecord>> {
970
+ const localVarAxiosArgs = await localVarAxiosParamCreator.updateSubscriber(id, updateSubscriber, options);
971
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
972
+ const localVarOperationServerBasePath = operationServerMap['SubscribersApi.updateSubscriber']?.[localVarOperationServerIndex]?.url;
973
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
974
+ },
975
+ /**
976
+ *
977
+ * @summary PATCH /v1/subscribers/:id/credentials — upsert/merge creds for a provider
978
+ * @param {string} id Subscriber ID
979
+ * @param {PatchCredentials} patchCredentials
980
+ * @param {*} [options] Override http request option.
981
+ * @throws {RequiredError}
982
+ */
983
+ async upsertCredentials(id: string, patchCredentials: PatchCredentials, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SubscriberRecord>> {
984
+ const localVarAxiosArgs = await localVarAxiosParamCreator.upsertCredentials(id, patchCredentials, options);
985
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
986
+ const localVarOperationServerBasePath = operationServerMap['SubscribersApi.upsertCredentials']?.[localVarOperationServerIndex]?.url;
987
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
988
+ },
989
+ }
990
+ };
991
+
992
+ /**
993
+ * SubscribersApi - factory interface
994
+ */
995
+ export const SubscribersApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
996
+ const localVarFp = SubscribersApiFp(configuration)
997
+ return {
998
+ /**
999
+ *
1000
+ * @summary POST /v1/subscribers/bulk — create multiple subscribers at once
1001
+ * @param {BulkCreateSubscribers} bulkCreateSubscribers
1002
+ * @param {*} [options] Override http request option.
1003
+ * @throws {RequiredError}
1004
+ */
1005
+ bulkCreate(bulkCreateSubscribers: BulkCreateSubscribers, options?: RawAxiosRequestConfig): AxiosPromise<BulkResult> {
1006
+ return localVarFp.bulkCreate(bulkCreateSubscribers, options).then((request) => request(axios, basePath));
1007
+ },
1008
+ /**
1009
+ *
1010
+ * @summary PATCH /v1/subscribers/:id/preferences/bulk — update multiple workflow preferences at once
1011
+ * @param {string} id Subscriber ID
1012
+ * @param {BulkPreferences} bulkPreferences
1013
+ * @param {*} [options] Override http request option.
1014
+ * @throws {RequiredError}
1015
+ */
1016
+ bulkUpdatePreferences(id: string, bulkPreferences: BulkPreferences, options?: RawAxiosRequestConfig): AxiosPromise<void> {
1017
+ return localVarFp.bulkUpdatePreferences(id, bulkPreferences, options).then((request) => request(axios, basePath));
1018
+ },
1019
+ /**
1020
+ *
1021
+ * @summary POST /v1/subscribers
1022
+ * @param {CreateSubscriber} createSubscriber
1023
+ * @param {*} [options] Override http request option.
1024
+ * @throws {RequiredError}
1025
+ */
1026
+ createSubscriber(createSubscriber: CreateSubscriber, options?: RawAxiosRequestConfig): AxiosPromise<SubscriberRecord> {
1027
+ return localVarFp.createSubscriber(createSubscriber, options).then((request) => request(axios, basePath));
1028
+ },
1029
+ /**
1030
+ *
1031
+ * @summary DELETE /v1/subscribers/:id/credentials/:provider_id — remove creds for a provider
1032
+ * @param {string} id Subscriber ID
1033
+ * @param {string} providerId Provider ID
1034
+ * @param {*} [options] Override http request option.
1035
+ * @throws {RequiredError}
1036
+ */
1037
+ deleteCredentials(id: string, providerId: string, options?: RawAxiosRequestConfig): AxiosPromise<void> {
1038
+ return localVarFp.deleteCredentials(id, providerId, options).then((request) => request(axios, basePath));
1039
+ },
1040
+ /**
1041
+ *
1042
+ * @summary DELETE /v1/subscribers/:subscriber_id
1043
+ * @param {string} id Subscriber ID
1044
+ * @param {*} [options] Override http request option.
1045
+ * @throws {RequiredError}
1046
+ */
1047
+ deleteSubscriber(id: string, options?: RawAxiosRequestConfig): AxiosPromise<void> {
1048
+ return localVarFp.deleteSubscriber(id, options).then((request) => request(axios, basePath));
1049
+ },
1050
+ /**
1051
+ *
1052
+ * @summary GET /v1/subscribers/:subscriber_id
1053
+ * @param {string} id Subscriber ID
1054
+ * @param {*} [options] Override http request option.
1055
+ * @throws {RequiredError}
1056
+ */
1057
+ getSubscriber(id: string, options?: RawAxiosRequestConfig): AxiosPromise<SubscriberRecord> {
1058
+ return localVarFp.getSubscriber(id, options).then((request) => request(axios, basePath));
1059
+ },
1060
+ /**
1061
+ *
1062
+ * @summary GET /v1/subscribers/:id/subscriptions — list topic subscriptions for a subscriber
1063
+ * @param {string} id Subscriber ID
1064
+ * @param {*} [options] Override http request option.
1065
+ * @throws {RequiredError}
1066
+ */
1067
+ listSubscriberSubscriptions(id: string, options?: RawAxiosRequestConfig): AxiosPromise<Array<TopicSubscription>> {
1068
+ return localVarFp.listSubscriberSubscriptions(id, options).then((request) => request(axios, basePath));
1069
+ },
1070
+ /**
1071
+ * Lists subscribers for the current project. When the optional `q` query parameter is provided, the list is powered by Typesense full-text search (searching across email, name, phone, subscriber_id). Without `q`, a standard paginated listing from the primary store is returned.
1072
+ * @summary GET /v1/subscribers
1073
+ * @param {number | null} [limit] Maximum number of items to return (1–100, default 10).
1074
+ * @param {number | null} [offset] Number of items to skip (default 0).
1075
+ * @param {string | null} [q] Optional full-text search query (e.g., an email, name, or phone number). When present, search is powered by Typesense.
1076
+ * @param {string | null} [filterBy] Optional filter expression for narrowing results. Example: &#x60;is_online:&#x3D;true&#x60; or &#x60;locale:&#x3D;en-US&#x60;.
1077
+ * @param {*} [options] Override http request option.
1078
+ * @throws {RequiredError}
1079
+ */
1080
+ listSubscribers(limit?: number | null, offset?: number | null, q?: string | null, filterBy?: string | null, options?: RawAxiosRequestConfig): AxiosPromise<PaginatedSubscriberRecord> {
1081
+ return localVarFp.listSubscribers(limit, offset, q, filterBy, options).then((request) => request(axios, basePath));
1082
+ },
1083
+ /**
1084
+ *
1085
+ * @summary POST /v1/subscribers/:id/messages/mark-all — mark all messages
1086
+ * @param {string} id Subscriber ID
1087
+ * @param {MarkAll} markAll
1088
+ * @param {*} [options] Override http request option.
1089
+ * @throws {RequiredError}
1090
+ */
1091
+ markAllMessages(id: string, markAll: MarkAll, options?: RawAxiosRequestConfig): AxiosPromise<MarkResult> {
1092
+ return localVarFp.markAllMessages(id, markAll, options).then((request) => request(axios, basePath));
1093
+ },
1094
+ /**
1095
+ *
1096
+ * @summary POST /v1/subscribers/:id/messages/mark-as — mark messages as read/seen/unseen
1097
+ * @param {string} id Subscriber ID
1098
+ * @param {MarkMessages} markMessages
1099
+ * @param {*} [options] Override http request option.
1100
+ * @throws {RequiredError}
1101
+ */
1102
+ markMessages(id: string, markMessages: MarkMessages, options?: RawAxiosRequestConfig): AxiosPromise<MarkResult> {
1103
+ return localVarFp.markMessages(id, markMessages, options).then((request) => request(axios, basePath));
1104
+ },
1105
+ /**
1106
+ *
1107
+ * @summary PUT /v1/subscribers/:id/credentials — replace all creds for a provider
1108
+ * @param {string} id Subscriber ID
1109
+ * @param {SetCredentials} setCredentials
1110
+ * @param {*} [options] Override http request option.
1111
+ * @throws {RequiredError}
1112
+ */
1113
+ setCredentials(id: string, setCredentials: SetCredentials, options?: RawAxiosRequestConfig): AxiosPromise<SubscriberRecord> {
1114
+ return localVarFp.setCredentials(id, setCredentials, options).then((request) => request(axios, basePath));
1115
+ },
1116
+ /**
1117
+ *
1118
+ * @summary GET /v1/subscribers/:id/notifications/feed — cursor-paginated message list
1119
+ * @param {string} id Subscriber ID
1120
+ * @param {number | null} [limit]
1121
+ * @param {string | null} [after]
1122
+ * @param {string | null} [before]
1123
+ * @param {string | null} [channel]
1124
+ * @param {boolean | null} [read]
1125
+ * @param {boolean | null} [seen]
1126
+ * @param {*} [options] Override http request option.
1127
+ * @throws {RequiredError}
1128
+ */
1129
+ subscriberFeed(id: string, limit?: number | null, after?: string | null, before?: string | null, channel?: string | null, read?: boolean | null, seen?: boolean | null, options?: RawAxiosRequestConfig): AxiosPromise<CursorPaginatedFeedItem> {
1130
+ return localVarFp.subscriberFeed(id, limit, after, before, channel, read, seen, options).then((request) => request(axios, basePath));
1131
+ },
1132
+ /**
1133
+ *
1134
+ * @summary GET /v1/subscribers/:id/notifications/unseen — unseen count
1135
+ * @param {string} id Subscriber ID
1136
+ * @param {*} [options] Override http request option.
1137
+ * @throws {RequiredError}
1138
+ */
1139
+ unseenCount(id: string, options?: RawAxiosRequestConfig): AxiosPromise<UnseenCount> {
1140
+ return localVarFp.unseenCount(id, options).then((request) => request(axios, basePath));
1141
+ },
1142
+ /**
1143
+ *
1144
+ * @summary PATCH /v1/subscribers/:id/online-status — set online/offline
1145
+ * @param {string} id Subscriber ID
1146
+ * @param {OnlineStatus} onlineStatus
1147
+ * @param {*} [options] Override http request option.
1148
+ * @throws {RequiredError}
1149
+ */
1150
+ updateOnlineStatus(id: string, onlineStatus: OnlineStatus, options?: RawAxiosRequestConfig): AxiosPromise<SubscriberRecord> {
1151
+ return localVarFp.updateOnlineStatus(id, onlineStatus, options).then((request) => request(axios, basePath));
1152
+ },
1153
+ /**
1154
+ *
1155
+ * @summary PATCH /v1/subscribers/:subscriber_id
1156
+ * @param {string} id Subscriber ID
1157
+ * @param {UpdateSubscriber} updateSubscriber
1158
+ * @param {*} [options] Override http request option.
1159
+ * @throws {RequiredError}
1160
+ */
1161
+ updateSubscriber(id: string, updateSubscriber: UpdateSubscriber, options?: RawAxiosRequestConfig): AxiosPromise<SubscriberRecord> {
1162
+ return localVarFp.updateSubscriber(id, updateSubscriber, options).then((request) => request(axios, basePath));
1163
+ },
1164
+ /**
1165
+ *
1166
+ * @summary PATCH /v1/subscribers/:id/credentials — upsert/merge creds for a provider
1167
+ * @param {string} id Subscriber ID
1168
+ * @param {PatchCredentials} patchCredentials
1169
+ * @param {*} [options] Override http request option.
1170
+ * @throws {RequiredError}
1171
+ */
1172
+ upsertCredentials(id: string, patchCredentials: PatchCredentials, options?: RawAxiosRequestConfig): AxiosPromise<SubscriberRecord> {
1173
+ return localVarFp.upsertCredentials(id, patchCredentials, options).then((request) => request(axios, basePath));
1174
+ },
1175
+ };
1176
+ };
1177
+
1178
+ /**
1179
+ * SubscribersApi - interface
1180
+ */
1181
+ export interface SubscribersApiInterface {
1182
+ /**
1183
+ *
1184
+ * @summary POST /v1/subscribers/bulk — create multiple subscribers at once
1185
+ * @param {BulkCreateSubscribers} bulkCreateSubscribers
1186
+ * @param {*} [options] Override http request option.
1187
+ * @throws {RequiredError}
1188
+ */
1189
+ bulkCreate(bulkCreateSubscribers: BulkCreateSubscribers, options?: RawAxiosRequestConfig): AxiosPromise<BulkResult>;
1190
+
1191
+ /**
1192
+ *
1193
+ * @summary PATCH /v1/subscribers/:id/preferences/bulk — update multiple workflow preferences at once
1194
+ * @param {string} id Subscriber ID
1195
+ * @param {BulkPreferences} bulkPreferences
1196
+ * @param {*} [options] Override http request option.
1197
+ * @throws {RequiredError}
1198
+ */
1199
+ bulkUpdatePreferences(id: string, bulkPreferences: BulkPreferences, options?: RawAxiosRequestConfig): AxiosPromise<void>;
1200
+
1201
+ /**
1202
+ *
1203
+ * @summary POST /v1/subscribers
1204
+ * @param {CreateSubscriber} createSubscriber
1205
+ * @param {*} [options] Override http request option.
1206
+ * @throws {RequiredError}
1207
+ */
1208
+ createSubscriber(createSubscriber: CreateSubscriber, options?: RawAxiosRequestConfig): AxiosPromise<SubscriberRecord>;
1209
+
1210
+ /**
1211
+ *
1212
+ * @summary DELETE /v1/subscribers/:id/credentials/:provider_id — remove creds for a provider
1213
+ * @param {string} id Subscriber ID
1214
+ * @param {string} providerId Provider ID
1215
+ * @param {*} [options] Override http request option.
1216
+ * @throws {RequiredError}
1217
+ */
1218
+ deleteCredentials(id: string, providerId: string, options?: RawAxiosRequestConfig): AxiosPromise<void>;
1219
+
1220
+ /**
1221
+ *
1222
+ * @summary DELETE /v1/subscribers/:subscriber_id
1223
+ * @param {string} id Subscriber ID
1224
+ * @param {*} [options] Override http request option.
1225
+ * @throws {RequiredError}
1226
+ */
1227
+ deleteSubscriber(id: string, options?: RawAxiosRequestConfig): AxiosPromise<void>;
1228
+
1229
+ /**
1230
+ *
1231
+ * @summary GET /v1/subscribers/:subscriber_id
1232
+ * @param {string} id Subscriber ID
1233
+ * @param {*} [options] Override http request option.
1234
+ * @throws {RequiredError}
1235
+ */
1236
+ getSubscriber(id: string, options?: RawAxiosRequestConfig): AxiosPromise<SubscriberRecord>;
1237
+
1238
+ /**
1239
+ *
1240
+ * @summary GET /v1/subscribers/:id/subscriptions — list topic subscriptions for a subscriber
1241
+ * @param {string} id Subscriber ID
1242
+ * @param {*} [options] Override http request option.
1243
+ * @throws {RequiredError}
1244
+ */
1245
+ listSubscriberSubscriptions(id: string, options?: RawAxiosRequestConfig): AxiosPromise<Array<TopicSubscription>>;
1246
+
1247
+ /**
1248
+ * Lists subscribers for the current project. When the optional `q` query parameter is provided, the list is powered by Typesense full-text search (searching across email, name, phone, subscriber_id). Without `q`, a standard paginated listing from the primary store is returned.
1249
+ * @summary GET /v1/subscribers
1250
+ * @param {number | null} [limit] Maximum number of items to return (1–100, default 10).
1251
+ * @param {number | null} [offset] Number of items to skip (default 0).
1252
+ * @param {string | null} [q] Optional full-text search query (e.g., an email, name, or phone number). When present, search is powered by Typesense.
1253
+ * @param {string | null} [filterBy] Optional filter expression for narrowing results. Example: &#x60;is_online:&#x3D;true&#x60; or &#x60;locale:&#x3D;en-US&#x60;.
1254
+ * @param {*} [options] Override http request option.
1255
+ * @throws {RequiredError}
1256
+ */
1257
+ listSubscribers(limit?: number | null, offset?: number | null, q?: string | null, filterBy?: string | null, options?: RawAxiosRequestConfig): AxiosPromise<PaginatedSubscriberRecord>;
1258
+
1259
+ /**
1260
+ *
1261
+ * @summary POST /v1/subscribers/:id/messages/mark-all — mark all messages
1262
+ * @param {string} id Subscriber ID
1263
+ * @param {MarkAll} markAll
1264
+ * @param {*} [options] Override http request option.
1265
+ * @throws {RequiredError}
1266
+ */
1267
+ markAllMessages(id: string, markAll: MarkAll, options?: RawAxiosRequestConfig): AxiosPromise<MarkResult>;
1268
+
1269
+ /**
1270
+ *
1271
+ * @summary POST /v1/subscribers/:id/messages/mark-as — mark messages as read/seen/unseen
1272
+ * @param {string} id Subscriber ID
1273
+ * @param {MarkMessages} markMessages
1274
+ * @param {*} [options] Override http request option.
1275
+ * @throws {RequiredError}
1276
+ */
1277
+ markMessages(id: string, markMessages: MarkMessages, options?: RawAxiosRequestConfig): AxiosPromise<MarkResult>;
1278
+
1279
+ /**
1280
+ *
1281
+ * @summary PUT /v1/subscribers/:id/credentials — replace all creds for a provider
1282
+ * @param {string} id Subscriber ID
1283
+ * @param {SetCredentials} setCredentials
1284
+ * @param {*} [options] Override http request option.
1285
+ * @throws {RequiredError}
1286
+ */
1287
+ setCredentials(id: string, setCredentials: SetCredentials, options?: RawAxiosRequestConfig): AxiosPromise<SubscriberRecord>;
1288
+
1289
+ /**
1290
+ *
1291
+ * @summary GET /v1/subscribers/:id/notifications/feed — cursor-paginated message list
1292
+ * @param {string} id Subscriber ID
1293
+ * @param {number | null} [limit]
1294
+ * @param {string | null} [after]
1295
+ * @param {string | null} [before]
1296
+ * @param {string | null} [channel]
1297
+ * @param {boolean | null} [read]
1298
+ * @param {boolean | null} [seen]
1299
+ * @param {*} [options] Override http request option.
1300
+ * @throws {RequiredError}
1301
+ */
1302
+ subscriberFeed(id: string, limit?: number | null, after?: string | null, before?: string | null, channel?: string | null, read?: boolean | null, seen?: boolean | null, options?: RawAxiosRequestConfig): AxiosPromise<CursorPaginatedFeedItem>;
1303
+
1304
+ /**
1305
+ *
1306
+ * @summary GET /v1/subscribers/:id/notifications/unseen — unseen count
1307
+ * @param {string} id Subscriber ID
1308
+ * @param {*} [options] Override http request option.
1309
+ * @throws {RequiredError}
1310
+ */
1311
+ unseenCount(id: string, options?: RawAxiosRequestConfig): AxiosPromise<UnseenCount>;
1312
+
1313
+ /**
1314
+ *
1315
+ * @summary PATCH /v1/subscribers/:id/online-status — set online/offline
1316
+ * @param {string} id Subscriber ID
1317
+ * @param {OnlineStatus} onlineStatus
1318
+ * @param {*} [options] Override http request option.
1319
+ * @throws {RequiredError}
1320
+ */
1321
+ updateOnlineStatus(id: string, onlineStatus: OnlineStatus, options?: RawAxiosRequestConfig): AxiosPromise<SubscriberRecord>;
1322
+
1323
+ /**
1324
+ *
1325
+ * @summary PATCH /v1/subscribers/:subscriber_id
1326
+ * @param {string} id Subscriber ID
1327
+ * @param {UpdateSubscriber} updateSubscriber
1328
+ * @param {*} [options] Override http request option.
1329
+ * @throws {RequiredError}
1330
+ */
1331
+ updateSubscriber(id: string, updateSubscriber: UpdateSubscriber, options?: RawAxiosRequestConfig): AxiosPromise<SubscriberRecord>;
1332
+
1333
+ /**
1334
+ *
1335
+ * @summary PATCH /v1/subscribers/:id/credentials — upsert/merge creds for a provider
1336
+ * @param {string} id Subscriber ID
1337
+ * @param {PatchCredentials} patchCredentials
1338
+ * @param {*} [options] Override http request option.
1339
+ * @throws {RequiredError}
1340
+ */
1341
+ upsertCredentials(id: string, patchCredentials: PatchCredentials, options?: RawAxiosRequestConfig): AxiosPromise<SubscriberRecord>;
1342
+
1343
+ }
1344
+
1345
+ /**
1346
+ * SubscribersApi - object-oriented interface
1347
+ */
1348
+ export class SubscribersApi extends BaseAPI implements SubscribersApiInterface {
1349
+ /**
1350
+ *
1351
+ * @summary POST /v1/subscribers/bulk — create multiple subscribers at once
1352
+ * @param {BulkCreateSubscribers} bulkCreateSubscribers
1353
+ * @param {*} [options] Override http request option.
1354
+ * @throws {RequiredError}
1355
+ */
1356
+ public bulkCreate(bulkCreateSubscribers: BulkCreateSubscribers, options?: RawAxiosRequestConfig) {
1357
+ return SubscribersApiFp(this.configuration).bulkCreate(bulkCreateSubscribers, options).then((request) => request(this.axios, this.basePath));
1358
+ }
1359
+
1360
+ /**
1361
+ *
1362
+ * @summary PATCH /v1/subscribers/:id/preferences/bulk — update multiple workflow preferences at once
1363
+ * @param {string} id Subscriber ID
1364
+ * @param {BulkPreferences} bulkPreferences
1365
+ * @param {*} [options] Override http request option.
1366
+ * @throws {RequiredError}
1367
+ */
1368
+ public bulkUpdatePreferences(id: string, bulkPreferences: BulkPreferences, options?: RawAxiosRequestConfig) {
1369
+ return SubscribersApiFp(this.configuration).bulkUpdatePreferences(id, bulkPreferences, options).then((request) => request(this.axios, this.basePath));
1370
+ }
1371
+
1372
+ /**
1373
+ *
1374
+ * @summary POST /v1/subscribers
1375
+ * @param {CreateSubscriber} createSubscriber
1376
+ * @param {*} [options] Override http request option.
1377
+ * @throws {RequiredError}
1378
+ */
1379
+ public createSubscriber(createSubscriber: CreateSubscriber, options?: RawAxiosRequestConfig) {
1380
+ return SubscribersApiFp(this.configuration).createSubscriber(createSubscriber, options).then((request) => request(this.axios, this.basePath));
1381
+ }
1382
+
1383
+ /**
1384
+ *
1385
+ * @summary DELETE /v1/subscribers/:id/credentials/:provider_id — remove creds for a provider
1386
+ * @param {string} id Subscriber ID
1387
+ * @param {string} providerId Provider ID
1388
+ * @param {*} [options] Override http request option.
1389
+ * @throws {RequiredError}
1390
+ */
1391
+ public deleteCredentials(id: string, providerId: string, options?: RawAxiosRequestConfig) {
1392
+ return SubscribersApiFp(this.configuration).deleteCredentials(id, providerId, options).then((request) => request(this.axios, this.basePath));
1393
+ }
1394
+
1395
+ /**
1396
+ *
1397
+ * @summary DELETE /v1/subscribers/:subscriber_id
1398
+ * @param {string} id Subscriber ID
1399
+ * @param {*} [options] Override http request option.
1400
+ * @throws {RequiredError}
1401
+ */
1402
+ public deleteSubscriber(id: string, options?: RawAxiosRequestConfig) {
1403
+ return SubscribersApiFp(this.configuration).deleteSubscriber(id, options).then((request) => request(this.axios, this.basePath));
1404
+ }
1405
+
1406
+ /**
1407
+ *
1408
+ * @summary GET /v1/subscribers/:subscriber_id
1409
+ * @param {string} id Subscriber ID
1410
+ * @param {*} [options] Override http request option.
1411
+ * @throws {RequiredError}
1412
+ */
1413
+ public getSubscriber(id: string, options?: RawAxiosRequestConfig) {
1414
+ return SubscribersApiFp(this.configuration).getSubscriber(id, options).then((request) => request(this.axios, this.basePath));
1415
+ }
1416
+
1417
+ /**
1418
+ *
1419
+ * @summary GET /v1/subscribers/:id/subscriptions — list topic subscriptions for a subscriber
1420
+ * @param {string} id Subscriber ID
1421
+ * @param {*} [options] Override http request option.
1422
+ * @throws {RequiredError}
1423
+ */
1424
+ public listSubscriberSubscriptions(id: string, options?: RawAxiosRequestConfig) {
1425
+ return SubscribersApiFp(this.configuration).listSubscriberSubscriptions(id, options).then((request) => request(this.axios, this.basePath));
1426
+ }
1427
+
1428
+ /**
1429
+ * Lists subscribers for the current project. When the optional `q` query parameter is provided, the list is powered by Typesense full-text search (searching across email, name, phone, subscriber_id). Without `q`, a standard paginated listing from the primary store is returned.
1430
+ * @summary GET /v1/subscribers
1431
+ * @param {number | null} [limit] Maximum number of items to return (1–100, default 10).
1432
+ * @param {number | null} [offset] Number of items to skip (default 0).
1433
+ * @param {string | null} [q] Optional full-text search query (e.g., an email, name, or phone number). When present, search is powered by Typesense.
1434
+ * @param {string | null} [filterBy] Optional filter expression for narrowing results. Example: &#x60;is_online:&#x3D;true&#x60; or &#x60;locale:&#x3D;en-US&#x60;.
1435
+ * @param {*} [options] Override http request option.
1436
+ * @throws {RequiredError}
1437
+ */
1438
+ public listSubscribers(limit?: number | null, offset?: number | null, q?: string | null, filterBy?: string | null, options?: RawAxiosRequestConfig) {
1439
+ return SubscribersApiFp(this.configuration).listSubscribers(limit, offset, q, filterBy, options).then((request) => request(this.axios, this.basePath));
1440
+ }
1441
+
1442
+ /**
1443
+ *
1444
+ * @summary POST /v1/subscribers/:id/messages/mark-all — mark all messages
1445
+ * @param {string} id Subscriber ID
1446
+ * @param {MarkAll} markAll
1447
+ * @param {*} [options] Override http request option.
1448
+ * @throws {RequiredError}
1449
+ */
1450
+ public markAllMessages(id: string, markAll: MarkAll, options?: RawAxiosRequestConfig) {
1451
+ return SubscribersApiFp(this.configuration).markAllMessages(id, markAll, options).then((request) => request(this.axios, this.basePath));
1452
+ }
1453
+
1454
+ /**
1455
+ *
1456
+ * @summary POST /v1/subscribers/:id/messages/mark-as — mark messages as read/seen/unseen
1457
+ * @param {string} id Subscriber ID
1458
+ * @param {MarkMessages} markMessages
1459
+ * @param {*} [options] Override http request option.
1460
+ * @throws {RequiredError}
1461
+ */
1462
+ public markMessages(id: string, markMessages: MarkMessages, options?: RawAxiosRequestConfig) {
1463
+ return SubscribersApiFp(this.configuration).markMessages(id, markMessages, options).then((request) => request(this.axios, this.basePath));
1464
+ }
1465
+
1466
+ /**
1467
+ *
1468
+ * @summary PUT /v1/subscribers/:id/credentials — replace all creds for a provider
1469
+ * @param {string} id Subscriber ID
1470
+ * @param {SetCredentials} setCredentials
1471
+ * @param {*} [options] Override http request option.
1472
+ * @throws {RequiredError}
1473
+ */
1474
+ public setCredentials(id: string, setCredentials: SetCredentials, options?: RawAxiosRequestConfig) {
1475
+ return SubscribersApiFp(this.configuration).setCredentials(id, setCredentials, options).then((request) => request(this.axios, this.basePath));
1476
+ }
1477
+
1478
+ /**
1479
+ *
1480
+ * @summary GET /v1/subscribers/:id/notifications/feed — cursor-paginated message list
1481
+ * @param {string} id Subscriber ID
1482
+ * @param {number | null} [limit]
1483
+ * @param {string | null} [after]
1484
+ * @param {string | null} [before]
1485
+ * @param {string | null} [channel]
1486
+ * @param {boolean | null} [read]
1487
+ * @param {boolean | null} [seen]
1488
+ * @param {*} [options] Override http request option.
1489
+ * @throws {RequiredError}
1490
+ */
1491
+ public subscriberFeed(id: string, limit?: number | null, after?: string | null, before?: string | null, channel?: string | null, read?: boolean | null, seen?: boolean | null, options?: RawAxiosRequestConfig) {
1492
+ return SubscribersApiFp(this.configuration).subscriberFeed(id, limit, after, before, channel, read, seen, options).then((request) => request(this.axios, this.basePath));
1493
+ }
1494
+
1495
+ /**
1496
+ *
1497
+ * @summary GET /v1/subscribers/:id/notifications/unseen — unseen count
1498
+ * @param {string} id Subscriber ID
1499
+ * @param {*} [options] Override http request option.
1500
+ * @throws {RequiredError}
1501
+ */
1502
+ public unseenCount(id: string, options?: RawAxiosRequestConfig) {
1503
+ return SubscribersApiFp(this.configuration).unseenCount(id, options).then((request) => request(this.axios, this.basePath));
1504
+ }
1505
+
1506
+ /**
1507
+ *
1508
+ * @summary PATCH /v1/subscribers/:id/online-status — set online/offline
1509
+ * @param {string} id Subscriber ID
1510
+ * @param {OnlineStatus} onlineStatus
1511
+ * @param {*} [options] Override http request option.
1512
+ * @throws {RequiredError}
1513
+ */
1514
+ public updateOnlineStatus(id: string, onlineStatus: OnlineStatus, options?: RawAxiosRequestConfig) {
1515
+ return SubscribersApiFp(this.configuration).updateOnlineStatus(id, onlineStatus, options).then((request) => request(this.axios, this.basePath));
1516
+ }
1517
+
1518
+ /**
1519
+ *
1520
+ * @summary PATCH /v1/subscribers/:subscriber_id
1521
+ * @param {string} id Subscriber ID
1522
+ * @param {UpdateSubscriber} updateSubscriber
1523
+ * @param {*} [options] Override http request option.
1524
+ * @throws {RequiredError}
1525
+ */
1526
+ public updateSubscriber(id: string, updateSubscriber: UpdateSubscriber, options?: RawAxiosRequestConfig) {
1527
+ return SubscribersApiFp(this.configuration).updateSubscriber(id, updateSubscriber, options).then((request) => request(this.axios, this.basePath));
1528
+ }
1529
+
1530
+ /**
1531
+ *
1532
+ * @summary PATCH /v1/subscribers/:id/credentials — upsert/merge creds for a provider
1533
+ * @param {string} id Subscriber ID
1534
+ * @param {PatchCredentials} patchCredentials
1535
+ * @param {*} [options] Override http request option.
1536
+ * @throws {RequiredError}
1537
+ */
1538
+ public upsertCredentials(id: string, patchCredentials: PatchCredentials, options?: RawAxiosRequestConfig) {
1539
+ return SubscribersApiFp(this.configuration).upsertCredentials(id, patchCredentials, options).then((request) => request(this.axios, this.basePath));
1540
+ }
1541
+ }
1542
+