@enbbox/api 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +375 -0
- package/.openapi-generator/VERSION +1 -0
- package/.openapi-generator-ignore +23 -0
- package/README.md +2 -2
- package/api/activity-api.ts +756 -0
- package/api/billing-api.ts +673 -0
- package/api/channel-connections-api.ts +510 -0
- package/api/channel-endpoints-api.ts +510 -0
- package/api/contexts-api.ts +534 -0
- package/api/events-api.ts +394 -0
- package/api/feature-flags-api.ts +132 -0
- package/api/health-api.ts +264 -0
- package/api/inbound-parse-api.ts +137 -0
- package/api/inbox-api.ts +1151 -0
- package/api/integrations-api.ts +833 -0
- package/api/layouts-api.ts +849 -0
- package/api/messages-api.ts +349 -0
- package/api/metrics-api.ts +128 -0
- package/api/notification-groups-api.ts +391 -0
- package/api/notifications-api.ts +326 -0
- package/api/preferences-api.ts +333 -0
- package/api/projects-api.ts +1075 -0
- package/api/subscribers-api.ts +1542 -0
- package/api/topics-api.ts +1352 -0
- package/api/translations-api.ts +462 -0
- package/api/webhooks-api.ts +397 -0
- package/api/workflows-api.ts +970 -0
- package/api.ts +40 -0
- package/base.ts +62 -0
- package/common.ts +127 -0
- package/configuration.ts +121 -0
- package/dist/esm/models/init-session-response.d.ts +4 -0
- package/dist/models/init-session-response.d.ts +4 -0
- package/docs/ActionBody.md +21 -0
- package/docs/ActionRecord.md +25 -0
- package/docs/ActionType.md +17 -0
- package/docs/ActivityApi.md +412 -0
- package/docs/ActivityChartPoint.md +31 -0
- package/docs/ActivityRecord.md +39 -0
- package/docs/ActivityRequestRecord.md +31 -0
- package/docs/ActivityStats.md +31 -0
- package/docs/ActorType.md +15 -0
- package/docs/ApiKeyCreated.md +27 -0
- package/docs/ApiKeyInfo.md +27 -0
- package/docs/AutoConfigureResult.md +21 -0
- package/docs/BillingApi.md +375 -0
- package/docs/BillingInterval.md +11 -0
- package/docs/Branding.md +31 -0
- package/docs/BroadcastTrigger.md +27 -0
- package/docs/BulkCreateSubscribers.md +21 -0
- package/docs/BulkPreferenceItem.md +24 -0
- package/docs/BulkPreferences.md +21 -0
- package/docs/BulkResult.md +22 -0
- package/docs/BulkTrigger.md +21 -0
- package/docs/ChannelConnectionRecord.md +31 -0
- package/docs/ChannelConnectionsApi.md +276 -0
- package/docs/ChannelEndpointRecord.md +33 -0
- package/docs/ChannelEndpointsApi.md +276 -0
- package/docs/ChannelPreferences.md +29 -0
- package/docs/ChannelType.md +17 -0
- package/docs/ChartQuery.md +21 -0
- package/docs/ChatOauth.md +21 -0
- package/docs/ChatOauthRequest.md +22 -0
- package/docs/CheckoutSession.md +23 -0
- package/docs/ContextRecord.md +29 -0
- package/docs/ContextsApi.md +285 -0
- package/docs/CreateChannelConnection.md +27 -0
- package/docs/CreateChannelEndpoint.md +29 -0
- package/docs/CreateCheckout.md +23 -0
- package/docs/CreateContext.md +25 -0
- package/docs/CreateIntegration.md +31 -0
- package/docs/CreateLayout.md +31 -0
- package/docs/CreateNotificationGroup.md +21 -0
- package/docs/CreateProject.md +21 -0
- package/docs/CreateSubscriber.md +37 -0
- package/docs/CreateSubscription.md +21 -0
- package/docs/CreateTopic.md +23 -0
- package/docs/CreateWebhook.md +23 -0
- package/docs/CreateWorkflow.md +35 -0
- package/docs/CtaType.md +9 -0
- package/docs/CursorMeta.md +27 -0
- package/docs/CursorPaginatedFeedItem.md +23 -0
- package/docs/CursorPaginatedFeedItemDataInner.md +37 -0
- package/docs/CursorPaginatedMessageRecord.md +23 -0
- package/docs/CursorPaginatedMessageRecordDataInner.md +41 -0
- package/docs/CursorPagination.md +25 -0
- package/docs/DeleteSubscription.md +20 -0
- package/docs/DeliveryAck.md +21 -0
- package/docs/DeliveryStatusWebhook.md +27 -0
- package/docs/DnsSettings.md +23 -0
- package/docs/EngagementStatsResponse.md +27 -0
- package/docs/EntitlementItem.md +25 -0
- package/docs/Entitlements.md +21 -0
- package/docs/ErrorDetail.md +27 -0
- package/docs/EventsApi.md +214 -0
- package/docs/EventsUsage.md +23 -0
- package/docs/FeatureFlagsApi.md +51 -0
- package/docs/FeedItem.md +37 -0
- package/docs/FeedQuery.md +31 -0
- package/docs/HealthApi.md +140 -0
- package/docs/InboundParseApi.md +59 -0
- package/docs/InboxApi.md +673 -0
- package/docs/InboxNotification.md +41 -0
- package/docs/InboxPreference.md +23 -0
- package/docs/InboxQuery.md +27 -0
- package/docs/InitSessionRequest.md +23 -0
- package/docs/InitSessionResponse.md +25 -0
- package/docs/IntegrationRecord.md +35 -0
- package/docs/IntegrationsApi.md +475 -0
- package/docs/InviteMember.md +23 -0
- package/docs/InviteMemberBody.md +23 -0
- package/docs/JobLog.md +33 -0
- package/docs/LayoutPreview.md +21 -0
- package/docs/LayoutPreviewResult.md +21 -0
- package/docs/LayoutRecord.md +31 -0
- package/docs/LayoutUsageItem.md +23 -0
- package/docs/LayoutsApi.md +484 -0
- package/docs/MarkAll.md +21 -0
- package/docs/MarkMessages.md +23 -0
- package/docs/MarkResult.md +21 -0
- package/docs/MemberRecord.md +27 -0
- package/docs/MemberRole.md +15 -0
- package/docs/MemberStatus.md +13 -0
- package/docs/MessageQuery.md +31 -0
- package/docs/MessageRecord.md +41 -0
- package/docs/MessagesApi.md +175 -0
- package/docs/MetricsApi.md +51 -0
- package/docs/NotificationCount.md +25 -0
- package/docs/NotificationGroupRecord.md +23 -0
- package/docs/NotificationGroupsApi.md +209 -0
- package/docs/NotificationLog.md +33 -0
- package/docs/NotificationQuery.md +25 -0
- package/docs/NotificationsApi.md +166 -0
- package/docs/OffsetMeta.md +27 -0
- package/docs/OffsetPagination.md +27 -0
- package/docs/OnlineStatus.md +21 -0
- package/docs/PaginatedChannelConnectionRecord.md +23 -0
- package/docs/PaginatedChannelConnectionRecordDataInner.md +31 -0
- package/docs/PaginatedChannelEndpointRecord.md +23 -0
- package/docs/PaginatedChannelEndpointRecordDataInner.md +33 -0
- package/docs/PaginatedContextRecord.md +23 -0
- package/docs/PaginatedContextRecordDataInner.md +29 -0
- package/docs/PaginatedIntegrationRecord.md +23 -0
- package/docs/PaginatedIntegrationRecordDataInner.md +35 -0
- package/docs/PaginatedLayoutRecord.md +23 -0
- package/docs/PaginatedLayoutRecordDataInner.md +31 -0
- package/docs/PaginatedSubscriberRecord.md +23 -0
- package/docs/PaginatedSubscriberRecordDataInner.md +41 -0
- package/docs/PaginatedTopicRecord.md +23 -0
- package/docs/PaginatedTopicRecordDataInner.md +24 -0
- package/docs/PaginatedTopicSubscriptionRecord.md +23 -0
- package/docs/PaginatedTopicSubscriptionRecordDataInner.md +29 -0
- package/docs/PaginatedWorkflowRecord.md +23 -0
- package/docs/PaginatedWorkflowRecordDataInner.md +37 -0
- package/docs/PaginationQuery.md +25 -0
- package/docs/PatchCredentials.md +27 -0
- package/docs/Plan.md +17 -0
- package/docs/PlanLimitsResponse.md +33 -0
- package/docs/PortalUrl.md +21 -0
- package/docs/PreferenceChannels.md +29 -0
- package/docs/PreferenceRecord.md +27 -0
- package/docs/PreferencesApi.md +171 -0
- package/docs/PreviewResult.md +20 -0
- package/docs/PriceInfo.md +27 -0
- package/docs/Prices.md +21 -0
- package/docs/ProjectRecord.md +27 -0
- package/docs/ProjectsApi.md +638 -0
- package/docs/SetCredentials.md +27 -0
- package/docs/StepPreview.md +21 -0
- package/docs/StepRecord.md +29 -0
- package/docs/StepType.md +27 -0
- package/docs/SubscriberCredential.md +27 -0
- package/docs/SubscriberPayload.md +37 -0
- package/docs/SubscriberRecord.md +41 -0
- package/docs/SubscribersApi.md +887 -0
- package/docs/Subscription.md +39 -0
- package/docs/SyncWorkflow.md +21 -0
- package/docs/SystemAvatarIcon.md +19 -0
- package/docs/TopicRecord.md +24 -0
- package/docs/TopicSubscribers.md +21 -0
- package/docs/TopicSubscription.md +23 -0
- package/docs/TopicSubscriptionRecord.md +29 -0
- package/docs/TopicsApi.md +777 -0
- package/docs/TranslationsApi.md +258 -0
- package/docs/TrialInfo.md +27 -0
- package/docs/TriggerEvent.md +31 -0
- package/docs/TriggerRecipients.md +39 -0
- package/docs/TriggerRecipientsOneOf.md +21 -0
- package/docs/TriggerResult.md +25 -0
- package/docs/TriggerStatus.md +21 -0
- package/docs/UnseenCount.md +21 -0
- package/docs/UpdateChannelConnection.md +21 -0
- package/docs/UpdateChannelEndpoint.md +23 -0
- package/docs/UpdateContext.md +21 -0
- package/docs/UpdateInboxPreferences.md +29 -0
- package/docs/UpdateIntegration.md +27 -0
- package/docs/UpdateLayout.md +27 -0
- package/docs/UpdateNotificationGroup.md +21 -0
- package/docs/UpdatePreference.md +23 -0
- package/docs/UpdateProject.md +23 -0
- package/docs/UpdateSubscriber.md +35 -0
- package/docs/UpdateSubscriptionMeta.md +21 -0
- package/docs/UpdateTopic.md +21 -0
- package/docs/UpdateWorkflow.md +31 -0
- package/docs/Usage.md +35 -0
- package/docs/WebhookRecord.md +31 -0
- package/docs/WebhooksApi.md +212 -0
- package/docs/WidgetSettings.md +21 -0
- package/docs/WorkflowRecord.md +37 -0
- package/docs/WorkflowRunRecord.md +31 -0
- package/docs/WorkflowStatsResponse.md +27 -0
- package/docs/WorkflowStatus.md +21 -0
- package/docs/WorkflowStepCreate.md +31 -0
- package/docs/WorkflowsApi.md +550 -0
- package/git_push.sh +57 -0
- package/index.ts +18 -0
- package/models/action-body.ts +26 -0
- package/models/action-record.ts +28 -0
- package/models/action-type.ts +32 -0
- package/models/activity-chart-point.ts +46 -0
- package/models/activity-record.ts +62 -0
- package/models/activity-request-record.ts +46 -0
- package/models/activity-stats.ts +46 -0
- package/models/actor-type.ts +31 -0
- package/models/api-key-created.ts +38 -0
- package/models/api-key-info.ts +38 -0
- package/models/auto-configure-result.ts +23 -0
- package/models/billing-interval.ts +29 -0
- package/models/branding.ts +46 -0
- package/models/broadcast-trigger.ts +29 -0
- package/models/bulk-create-subscribers.ts +26 -0
- package/models/bulk-preference-item.ts +25 -0
- package/models/bulk-preferences.ts +26 -0
- package/models/bulk-result.ts +24 -0
- package/models/bulk-trigger.ts +29 -0
- package/models/channel-connection-record.ts +43 -0
- package/models/channel-endpoint-record.ts +47 -0
- package/models/channel-preferences.ts +27 -0
- package/models/channel-type.ts +32 -0
- package/models/chart-query.ts +26 -0
- package/models/chat-oauth-request.ts +21 -0
- package/models/chat-oauth.ts +23 -0
- package/models/checkout-session.ts +35 -0
- package/models/context-record.ts +42 -0
- package/models/create-channel-connection.ts +35 -0
- package/models/create-channel-endpoint.ts +39 -0
- package/models/create-checkout.ts +35 -0
- package/models/create-context.ts +34 -0
- package/models/create-integration.ts +51 -0
- package/models/create-layout.ts +34 -0
- package/models/create-notification-group.ts +26 -0
- package/models/create-project.ts +26 -0
- package/models/create-subscriber.ts +58 -0
- package/models/create-subscription.ts +23 -0
- package/models/create-topic.ts +30 -0
- package/models/create-webhook.ts +30 -0
- package/models/create-workflow.ts +60 -0
- package/models/cta-type.ts +28 -0
- package/models/cursor-meta.ts +38 -0
- package/models/cursor-paginated-feed-item-data-inner.ts +40 -0
- package/models/cursor-paginated-feed-item.ts +36 -0
- package/models/cursor-paginated-message-record-data-inner.ts +45 -0
- package/models/cursor-paginated-message-record.ts +36 -0
- package/models/cursor-pagination.ts +34 -0
- package/models/delete-subscription.ts +20 -0
- package/models/delivery-ack.ts +23 -0
- package/models/delivery-status-webhook.ts +29 -0
- package/models/dns-settings.ts +30 -0
- package/models/engagement-stats-response.ts +38 -0
- package/models/entitlement-item.ts +34 -0
- package/models/entitlements.ts +26 -0
- package/models/error-detail.ts +38 -0
- package/models/events-usage.ts +30 -0
- package/models/feed-item.ts +40 -0
- package/models/feed-query.ts +28 -0
- package/models/inbox-notification.ts +39 -0
- package/models/inbox-preference.ts +27 -0
- package/models/inbox-query.ts +26 -0
- package/models/index.ts +158 -0
- package/models/init-session-request.ts +30 -0
- package/models/init-session-response.ts +34 -0
- package/models/integration-record.ts +59 -0
- package/models/invite-member-body.ts +30 -0
- package/models/invite-member.ts +30 -0
- package/models/job-log.ts +47 -0
- package/models/layout-preview-result.ts +23 -0
- package/models/layout-preview.ts +23 -0
- package/models/layout-record.ts +37 -0
- package/models/layout-usage-item.ts +24 -0
- package/models/mark-all.ts +23 -0
- package/models/mark-messages.ts +24 -0
- package/models/mark-result.ts +23 -0
- package/models/member-record.ts +38 -0
- package/models/member-role.ts +31 -0
- package/models/member-status.ts +30 -0
- package/models/message-query.ts +46 -0
- package/models/message-record.ts +45 -0
- package/models/notification-count.ts +25 -0
- package/models/notification-group-record.ts +30 -0
- package/models/notification-log.ts +41 -0
- package/models/notification-query.ts +34 -0
- package/models/offset-meta.ts +38 -0
- package/models/offset-pagination.ts +38 -0
- package/models/online-status.ts +23 -0
- package/models/paginated-channel-connection-record-data-inner.ts +43 -0
- package/models/paginated-channel-connection-record.ts +36 -0
- package/models/paginated-channel-endpoint-record-data-inner.ts +47 -0
- package/models/paginated-channel-endpoint-record.ts +36 -0
- package/models/paginated-context-record-data-inner.ts +42 -0
- package/models/paginated-context-record.ts +36 -0
- package/models/paginated-integration-record-data-inner.ts +59 -0
- package/models/paginated-integration-record.ts +36 -0
- package/models/paginated-layout-record-data-inner.ts +37 -0
- package/models/paginated-layout-record.ts +36 -0
- package/models/paginated-subscriber-record-data-inner.ts +69 -0
- package/models/paginated-subscriber-record.ts +36 -0
- package/models/paginated-topic-record-data-inner.ts +28 -0
- package/models/paginated-topic-record.ts +36 -0
- package/models/paginated-topic-subscription-record-data-inner.ts +39 -0
- package/models/paginated-topic-subscription-record.ts +36 -0
- package/models/paginated-workflow-record-data-inner.ts +58 -0
- package/models/paginated-workflow-record.ts +36 -0
- package/models/pagination-query.ts +34 -0
- package/models/patch-credentials.ts +29 -0
- package/models/plan-limits-response.ts +55 -0
- package/models/plan.ts +32 -0
- package/models/portal-url.ts +26 -0
- package/models/preference-channels.ts +27 -0
- package/models/preference-record.ts +32 -0
- package/models/preview-result.ts +20 -0
- package/models/price-info.ts +38 -0
- package/models/prices.ts +26 -0
- package/models/project-record.ts +46 -0
- package/models/set-credentials.ts +29 -0
- package/models/step-preview.ts +23 -0
- package/models/step-record.ts +36 -0
- package/models/step-type.ts +37 -0
- package/models/subscriber-credential.ts +26 -0
- package/models/subscriber-payload.ts +24 -0
- package/models/subscriber-record.ts +69 -0
- package/models/subscription.ts +73 -0
- package/models/sync-workflow.ts +26 -0
- package/models/system-avatar-icon.ts +33 -0
- package/models/topic-record.ts +28 -0
- package/models/topic-subscribers.ts +23 -0
- package/models/topic-subscription-record.ts +39 -0
- package/models/topic-subscription.ts +27 -0
- package/models/trial-info.ts +38 -0
- package/models/trigger-event.ts +49 -0
- package/models/trigger-recipients-one-of.ts +23 -0
- package/models/trigger-recipients.ts +29 -0
- package/models/trigger-result.ts +39 -0
- package/models/trigger-status.ts +34 -0
- package/models/unseen-count.ts +23 -0
- package/models/update-channel-connection.ts +23 -0
- package/models/update-channel-endpoint.ts +27 -0
- package/models/update-context.ts +26 -0
- package/models/update-inbox-preferences.ts +27 -0
- package/models/update-integration.ts +38 -0
- package/models/update-layout.ts +29 -0
- package/models/update-notification-group.ts +26 -0
- package/models/update-preference.ts +27 -0
- package/models/update-project.ts +33 -0
- package/models/update-subscriber.ts +54 -0
- package/models/update-subscription-meta.ts +23 -0
- package/models/update-topic.ts +26 -0
- package/models/update-workflow.ts +52 -0
- package/models/usage.ts +59 -0
- package/models/webhook-record.ts +46 -0
- package/models/widget-settings.ts +26 -0
- package/models/workflow-record.ts +58 -0
- package/models/workflow-run-record.ts +46 -0
- package/models/workflow-stats-response.ts +38 -0
- package/models/workflow-status.ts +26 -0
- package/models/workflow-step-create.ts +51 -0
- package/package.json +9 -33
- package/tsconfig.esm.json +7 -0
- package/tsconfig.json +18 -0
package/api.ts
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
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
|
+
|
|
17
|
+
export * from './api/activity-api';
|
|
18
|
+
export * from './api/billing-api';
|
|
19
|
+
export * from './api/channel-connections-api';
|
|
20
|
+
export * from './api/channel-endpoints-api';
|
|
21
|
+
export * from './api/contexts-api';
|
|
22
|
+
export * from './api/events-api';
|
|
23
|
+
export * from './api/feature-flags-api';
|
|
24
|
+
export * from './api/health-api';
|
|
25
|
+
export * from './api/inbound-parse-api';
|
|
26
|
+
export * from './api/inbox-api';
|
|
27
|
+
export * from './api/integrations-api';
|
|
28
|
+
export * from './api/layouts-api';
|
|
29
|
+
export * from './api/messages-api';
|
|
30
|
+
export * from './api/metrics-api';
|
|
31
|
+
export * from './api/notification-groups-api';
|
|
32
|
+
export * from './api/notifications-api';
|
|
33
|
+
export * from './api/preferences-api';
|
|
34
|
+
export * from './api/projects-api';
|
|
35
|
+
export * from './api/subscribers-api';
|
|
36
|
+
export * from './api/topics-api';
|
|
37
|
+
export * from './api/translations-api';
|
|
38
|
+
export * from './api/webhooks-api';
|
|
39
|
+
export * from './api/workflows-api';
|
|
40
|
+
|
package/base.ts
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
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
|
+
// Some imports not used depending on template conditions
|
|
18
|
+
// @ts-ignore
|
|
19
|
+
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
|
|
20
|
+
import globalAxios from 'axios';
|
|
21
|
+
|
|
22
|
+
export const BASE_PATH = "http://localhost".replace(/\/+$/, "");
|
|
23
|
+
|
|
24
|
+
export const COLLECTION_FORMATS = {
|
|
25
|
+
csv: ",",
|
|
26
|
+
ssv: " ",
|
|
27
|
+
tsv: "\t",
|
|
28
|
+
pipes: "|",
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export interface RequestArgs {
|
|
32
|
+
url: string;
|
|
33
|
+
options: RawAxiosRequestConfig;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export class BaseAPI {
|
|
37
|
+
protected configuration: Configuration | undefined;
|
|
38
|
+
|
|
39
|
+
constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) {
|
|
40
|
+
if (configuration) {
|
|
41
|
+
this.configuration = configuration;
|
|
42
|
+
this.basePath = configuration.basePath ?? basePath;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export class RequiredError extends Error {
|
|
48
|
+
constructor(public field: string, msg?: string) {
|
|
49
|
+
super(msg);
|
|
50
|
+
this.name = "RequiredError"
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
interface ServerMap {
|
|
55
|
+
[key: string]: {
|
|
56
|
+
url: string,
|
|
57
|
+
description: string,
|
|
58
|
+
}[];
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export const operationServerMap: ServerMap = {
|
|
62
|
+
}
|
package/common.ts
ADDED
|
@@ -0,0 +1,127 @@
|
|
|
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
|
+
import type { Configuration } from "./configuration";
|
|
16
|
+
import type { RequestArgs } from "./base";
|
|
17
|
+
import type { AxiosInstance, AxiosResponse } from 'axios';
|
|
18
|
+
import { RequiredError } from "./base";
|
|
19
|
+
|
|
20
|
+
export const DUMMY_BASE_URL = 'https://example.com'
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @throws {RequiredError}
|
|
25
|
+
*/
|
|
26
|
+
export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) {
|
|
27
|
+
if (paramValue === null || paramValue === undefined) {
|
|
28
|
+
throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) {
|
|
33
|
+
if (configuration && configuration.apiKey) {
|
|
34
|
+
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
35
|
+
? await configuration.apiKey(keyParamName)
|
|
36
|
+
: await configuration.apiKey;
|
|
37
|
+
object[keyParamName] = localVarApiKeyValue;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export const setBasicAuthToObject = function (object: any, configuration?: Configuration) {
|
|
42
|
+
if (configuration && (configuration.username || configuration.password)) {
|
|
43
|
+
object["auth"] = { username: configuration.username, password: configuration.password };
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) {
|
|
48
|
+
if (configuration && configuration.accessToken) {
|
|
49
|
+
const accessToken = typeof configuration.accessToken === 'function'
|
|
50
|
+
? await configuration.accessToken()
|
|
51
|
+
: await configuration.accessToken;
|
|
52
|
+
object["Authorization"] = "Bearer " + accessToken;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) {
|
|
57
|
+
if (configuration && configuration.accessToken) {
|
|
58
|
+
const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
|
|
59
|
+
? await configuration.accessToken(name, scopes)
|
|
60
|
+
: await configuration.accessToken;
|
|
61
|
+
object["Authorization"] = "Bearer " + localVarAccessTokenValue;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void {
|
|
67
|
+
if (parameter == null) return;
|
|
68
|
+
if (typeof parameter === "object") {
|
|
69
|
+
if (Array.isArray(parameter) || parameter instanceof Set) {
|
|
70
|
+
(parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
|
|
71
|
+
}
|
|
72
|
+
else {
|
|
73
|
+
Object.keys(parameter).forEach(currentKey =>
|
|
74
|
+
setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`)
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
if (urlSearchParams.has(key)) {
|
|
80
|
+
urlSearchParams.append(key, parameter);
|
|
81
|
+
}
|
|
82
|
+
else {
|
|
83
|
+
urlSearchParams.set(key, parameter);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export const setSearchParams = function (url: URL, ...objects: any[]) {
|
|
89
|
+
const searchParams = new URLSearchParams(url.search);
|
|
90
|
+
setFlattenedQueryParams(searchParams, objects);
|
|
91
|
+
url.search = searchParams.toString();
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* JSON serialization helper function which replaces instances of unserializable types with serializable ones.
|
|
96
|
+
* This function will run for every key-value pair encountered by JSON.stringify while traversing an object.
|
|
97
|
+
* Converting a set to a string will return an empty object, so an intermediate conversion to an array is required.
|
|
98
|
+
*/
|
|
99
|
+
// @ts-ignore
|
|
100
|
+
export const replaceWithSerializableTypeIfNeeded = function(key: string, value: any) {
|
|
101
|
+
if (value instanceof Set) {
|
|
102
|
+
return Array.from(value);
|
|
103
|
+
} else {
|
|
104
|
+
return value;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) {
|
|
109
|
+
const nonString = typeof value !== 'string';
|
|
110
|
+
const needsSerialization = nonString && configuration && configuration.isJsonMime
|
|
111
|
+
? configuration.isJsonMime(requestOptions.headers['Content-Type'])
|
|
112
|
+
: nonString;
|
|
113
|
+
return needsSerialization
|
|
114
|
+
? JSON.stringify(value !== undefined ? value : {}, replaceWithSerializableTypeIfNeeded)
|
|
115
|
+
: (value || "");
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export const toPathString = function (url: URL) {
|
|
119
|
+
return url.pathname + url.search + url.hash
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) {
|
|
123
|
+
return <T = unknown, R = AxiosResponse<T>>(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
124
|
+
const axiosRequestArgs = {...axiosArgs.options, url: (axios.defaults.baseURL ? '' : configuration?.basePath ?? basePath) + axiosArgs.url};
|
|
125
|
+
return axios.request<T, R>(axiosRequestArgs);
|
|
126
|
+
};
|
|
127
|
+
}
|
package/configuration.ts
ADDED
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/**
|
|
3
|
+
* enbbox API
|
|
4
|
+
* Notification infrastructure API — open-source alternative to Novu/Courier
|
|
5
|
+
*
|
|
6
|
+
* The version of the OpenAPI document: 0.1.0
|
|
7
|
+
*
|
|
8
|
+
*
|
|
9
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
10
|
+
* https://openapi-generator.tech
|
|
11
|
+
* Do not edit the class manually.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
interface AWSv4Configuration {
|
|
15
|
+
options?: {
|
|
16
|
+
region?: string
|
|
17
|
+
service?: string
|
|
18
|
+
}
|
|
19
|
+
credentials?: {
|
|
20
|
+
accessKeyId?: string
|
|
21
|
+
secretAccessKey?: string,
|
|
22
|
+
sessionToken?: string
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface ConfigurationParameters {
|
|
27
|
+
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
|
|
28
|
+
username?: string;
|
|
29
|
+
password?: string;
|
|
30
|
+
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
|
|
31
|
+
awsv4?: AWSv4Configuration;
|
|
32
|
+
basePath?: string;
|
|
33
|
+
serverIndex?: number;
|
|
34
|
+
baseOptions?: any;
|
|
35
|
+
formDataCtor?: new () => any;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export class Configuration {
|
|
39
|
+
/**
|
|
40
|
+
* parameter for apiKey security
|
|
41
|
+
* @param name security name
|
|
42
|
+
*/
|
|
43
|
+
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
|
|
44
|
+
/**
|
|
45
|
+
* parameter for basic security
|
|
46
|
+
*/
|
|
47
|
+
username?: string;
|
|
48
|
+
/**
|
|
49
|
+
* parameter for basic security
|
|
50
|
+
*/
|
|
51
|
+
password?: string;
|
|
52
|
+
/**
|
|
53
|
+
* parameter for oauth2 security
|
|
54
|
+
* @param name security name
|
|
55
|
+
* @param scopes oauth2 scope
|
|
56
|
+
*/
|
|
57
|
+
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
|
|
58
|
+
/**
|
|
59
|
+
* parameter for aws4 signature security
|
|
60
|
+
* @param {Object} AWS4Signature - AWS4 Signature security
|
|
61
|
+
* @param {string} options.region - aws region
|
|
62
|
+
* @param {string} options.service - name of the service.
|
|
63
|
+
* @param {string} credentials.accessKeyId - aws access key id
|
|
64
|
+
* @param {string} credentials.secretAccessKey - aws access key
|
|
65
|
+
* @param {string} credentials.sessionToken - aws session token
|
|
66
|
+
* @memberof Configuration
|
|
67
|
+
*/
|
|
68
|
+
awsv4?: AWSv4Configuration;
|
|
69
|
+
/**
|
|
70
|
+
* override base path
|
|
71
|
+
*/
|
|
72
|
+
basePath?: string;
|
|
73
|
+
/**
|
|
74
|
+
* override server index
|
|
75
|
+
*/
|
|
76
|
+
serverIndex?: number;
|
|
77
|
+
/**
|
|
78
|
+
* base options for axios calls
|
|
79
|
+
*/
|
|
80
|
+
baseOptions?: any;
|
|
81
|
+
/**
|
|
82
|
+
* The FormData constructor that will be used to create multipart form data
|
|
83
|
+
* requests. You can inject this here so that execution environments that
|
|
84
|
+
* do not support the FormData class can still run the generated client.
|
|
85
|
+
*
|
|
86
|
+
* @type {new () => FormData}
|
|
87
|
+
*/
|
|
88
|
+
formDataCtor?: new () => any;
|
|
89
|
+
|
|
90
|
+
constructor(param: ConfigurationParameters = {}) {
|
|
91
|
+
this.apiKey = param.apiKey;
|
|
92
|
+
this.username = param.username;
|
|
93
|
+
this.password = param.password;
|
|
94
|
+
this.accessToken = param.accessToken;
|
|
95
|
+
this.awsv4 = param.awsv4;
|
|
96
|
+
this.basePath = param.basePath;
|
|
97
|
+
this.serverIndex = param.serverIndex;
|
|
98
|
+
this.baseOptions = {
|
|
99
|
+
...param.baseOptions,
|
|
100
|
+
headers: {
|
|
101
|
+
...param.baseOptions?.headers,
|
|
102
|
+
},
|
|
103
|
+
};
|
|
104
|
+
this.formDataCtor = param.formDataCtor;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Check if the given MIME is a JSON MIME.
|
|
109
|
+
* JSON MIME examples:
|
|
110
|
+
* application/json
|
|
111
|
+
* application/json; charset=UTF8
|
|
112
|
+
* APPLICATION/JSON
|
|
113
|
+
* application/vnd.company+json
|
|
114
|
+
* @param mime - MIME (Multipurpose Internet Mail Extensions)
|
|
115
|
+
* @return True if the given MIME is JSON, false otherwise.
|
|
116
|
+
*/
|
|
117
|
+
public isJsonMime(mime: string): boolean {
|
|
118
|
+
const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i');
|
|
119
|
+
return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
|
|
120
|
+
}
|
|
121
|
+
}
|
|
@@ -13,6 +13,10 @@
|
|
|
13
13
|
* Subscriber session token and initial counts.
|
|
14
14
|
*/
|
|
15
15
|
export interface InitSessionResponse {
|
|
16
|
+
/**
|
|
17
|
+
* Whether the project\'s plan allows removing Enbbox branding. `true` for Pro+ plans, `false` for Free.
|
|
18
|
+
*/
|
|
19
|
+
'remove_branding': boolean;
|
|
16
20
|
/**
|
|
17
21
|
* Short-lived JWT for authenticating subsequent inbox requests.
|
|
18
22
|
*/
|
|
@@ -13,6 +13,10 @@
|
|
|
13
13
|
* Subscriber session token and initial counts.
|
|
14
14
|
*/
|
|
15
15
|
export interface InitSessionResponse {
|
|
16
|
+
/**
|
|
17
|
+
* Whether the project\'s plan allows removing Enbbox branding. `true` for Pro+ plans, `false` for Free.
|
|
18
|
+
*/
|
|
19
|
+
'remove_branding': boolean;
|
|
16
20
|
/**
|
|
17
21
|
* Short-lived JWT for authenticating subsequent inbox requests.
|
|
18
22
|
*/
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# ActionBody
|
|
2
|
+
|
|
3
|
+
Request body for performing an inbox action (CTA button click).
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**data** | **object** | Action result data (e.g. button click payload). | [optional] [default to undefined]
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { ActionBody } from '@enbbox/api';
|
|
15
|
+
|
|
16
|
+
const instance: ActionBody = {
|
|
17
|
+
data,
|
|
18
|
+
};
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# ActionRecord
|
|
2
|
+
|
|
3
|
+
An action (CTA button) attached to an inbox notification.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**action_type** | **string** | | [default to undefined]
|
|
10
|
+
**message_id** | **string** | | [default to undefined]
|
|
11
|
+
**status** | **string** | Current status. | [default to undefined]
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import { ActionRecord } from '@enbbox/api';
|
|
17
|
+
|
|
18
|
+
const instance: ActionRecord = {
|
|
19
|
+
action_type,
|
|
20
|
+
message_id,
|
|
21
|
+
status,
|
|
22
|
+
};
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# ActionType
|
|
2
|
+
|
|
3
|
+
Action step types (non-channel workflow steps).
|
|
4
|
+
|
|
5
|
+
## Enum
|
|
6
|
+
|
|
7
|
+
* `Trigger` (value: `'trigger'`)
|
|
8
|
+
|
|
9
|
+
* `Digest` (value: `'digest'`)
|
|
10
|
+
|
|
11
|
+
* `Delay` (value: `'delay'`)
|
|
12
|
+
|
|
13
|
+
* `Throttle` (value: `'throttle'`)
|
|
14
|
+
|
|
15
|
+
* `Custom` (value: `'custom'`)
|
|
16
|
+
|
|
17
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|