@notificationapi/node 0.0.2-alpha.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.
- package/README.md +66 -0
- package/dist/generated/src/apis/AccountApi.d.ts +94 -0
- package/dist/generated/src/apis/AccountApi.js +217 -0
- package/dist/generated/src/apis/ComponentsApi.d.ts +168 -0
- package/dist/generated/src/apis/ComponentsApi.js +386 -0
- package/dist/generated/src/apis/DefaultApi.d.ts +50 -0
- package/dist/generated/src/apis/DefaultApi.js +112 -0
- package/dist/generated/src/apis/DomainsApi.d.ts +94 -0
- package/dist/generated/src/apis/DomainsApi.js +216 -0
- package/dist/generated/src/apis/EditorApi.d.ts +50 -0
- package/dist/generated/src/apis/EditorApi.js +112 -0
- package/dist/generated/src/apis/EnvironmentsApi.d.ts +96 -0
- package/dist/generated/src/apis/EnvironmentsApi.js +221 -0
- package/dist/generated/src/apis/HealthApi.d.ts +46 -0
- package/dist/generated/src/apis/HealthApi.js +79 -0
- package/dist/generated/src/apis/InsightsApi.d.ts +50 -0
- package/dist/generated/src/apis/InsightsApi.js +112 -0
- package/dist/generated/src/apis/KeysApi.d.ts +94 -0
- package/dist/generated/src/apis/KeysApi.js +216 -0
- package/dist/generated/src/apis/LogsApi.d.ts +138 -0
- package/dist/generated/src/apis/LogsApi.js +320 -0
- package/dist/generated/src/apis/SenderApi.d.ts +98 -0
- package/dist/generated/src/apis/SenderApi.js +221 -0
- package/dist/generated/src/apis/TemplatesApi.d.ts +196 -0
- package/dist/generated/src/apis/TemplatesApi.js +461 -0
- package/dist/generated/src/apis/TypesApi.d.ts +144 -0
- package/dist/generated/src/apis/TypesApi.js +332 -0
- package/dist/generated/src/apis/UserApi.d.ts +240 -0
- package/dist/generated/src/apis/UserApi.js +549 -0
- package/dist/generated/src/apis/UsersApi.d.ts +102 -0
- package/dist/generated/src/apis/UsersApi.js +231 -0
- package/dist/generated/src/apis/index.d.ts +15 -0
- package/dist/generated/src/apis/index.js +33 -0
- package/dist/generated/src/index.d.ts +3 -0
- package/dist/generated/src/index.js +21 -0
- package/dist/generated/src/models/AccountGetResponse.d.ts +86 -0
- package/dist/generated/src/models/AccountGetResponse.js +93 -0
- package/dist/generated/src/models/BeeTokenV2.d.ts +38 -0
- package/dist/generated/src/models/BeeTokenV2.js +54 -0
- package/dist/generated/src/models/BillingPostRequestBody.d.ts +44 -0
- package/dist/generated/src/models/BillingPostRequestBody.js +58 -0
- package/dist/generated/src/models/BillingPostResponseBody.d.ts +98 -0
- package/dist/generated/src/models/BillingPostResponseBody.js +95 -0
- package/dist/generated/src/models/CreateAccountRequestBody.d.ts +32 -0
- package/dist/generated/src/models/CreateAccountRequestBody.js +50 -0
- package/dist/generated/src/models/CreateAccountResponse.d.ts +38 -0
- package/dist/generated/src/models/CreateAccountResponse.js +54 -0
- package/dist/generated/src/models/CreateKeyRequest.d.ts +52 -0
- package/dist/generated/src/models/CreateKeyRequest.js +66 -0
- package/dist/generated/src/models/CreateKeyResponse.d.ts +70 -0
- package/dist/generated/src/models/CreateKeyResponse.js +78 -0
- package/dist/generated/src/models/DeleteKeyResponse.d.ts +32 -0
- package/dist/generated/src/models/DeleteKeyResponse.js +50 -0
- package/dist/generated/src/models/DeleteTemplateResponse.d.ts +32 -0
- package/dist/generated/src/models/DeleteTemplateResponse.js +50 -0
- package/dist/generated/src/models/DeleteUserResponse.d.ts +32 -0
- package/dist/generated/src/models/DeleteUserResponse.js +50 -0
- package/dist/generated/src/models/EmailAuthTokenPostRequest.d.ts +32 -0
- package/dist/generated/src/models/EmailAuthTokenPostRequest.js +48 -0
- package/dist/generated/src/models/EmailComponentPatchRequest.d.ts +50 -0
- package/dist/generated/src/models/EmailComponentPatchRequest.js +54 -0
- package/dist/generated/src/models/EmailComponentPostRequest.d.ts +56 -0
- package/dist/generated/src/models/EmailComponentPostRequest.js +60 -0
- package/dist/generated/src/models/EmailComponentResponse.d.ts +94 -0
- package/dist/generated/src/models/EmailComponentResponse.js +96 -0
- package/dist/generated/src/models/EmailComponentResponseReferencedByInner.d.ts +57 -0
- package/dist/generated/src/models/EmailComponentResponseReferencedByInner.js +73 -0
- package/dist/generated/src/models/Environment.d.ts +69 -0
- package/dist/generated/src/models/Environment.js +81 -0
- package/dist/generated/src/models/EnvironmentCreateRequest.d.ts +32 -0
- package/dist/generated/src/models/EnvironmentCreateRequest.js +50 -0
- package/dist/generated/src/models/EnvironmentPatchRequest.d.ts +63 -0
- package/dist/generated/src/models/EnvironmentPatchRequest.js +69 -0
- package/dist/generated/src/models/GetAccountMetadataResponse.d.ts +33 -0
- package/dist/generated/src/models/GetAccountMetadataResponse.js +52 -0
- package/dist/generated/src/models/GetAccountMetadataResponseUserAccountMetadata.d.ts +44 -0
- package/dist/generated/src/models/GetAccountMetadataResponseUserAccountMetadata.js +60 -0
- package/dist/generated/src/models/GetEmailComponentsResponseInner.d.ts +94 -0
- package/dist/generated/src/models/GetEmailComponentsResponseInner.js +96 -0
- package/dist/generated/src/models/GetEnvironmentsResponseInner.d.ts +69 -0
- package/dist/generated/src/models/GetEnvironmentsResponseInner.js +81 -0
- package/dist/generated/src/models/GetInappNotificationsResponse.d.ts +33 -0
- package/dist/generated/src/models/GetInappNotificationsResponse.js +51 -0
- package/dist/generated/src/models/GetInappNotificationsResponseNotificationsInner.d.ts +139 -0
- package/dist/generated/src/models/GetInappNotificationsResponseNotificationsInner.js +103 -0
- package/dist/generated/src/models/GetInappNotificationsResponseNotificationsInnerDeliveryOptions.d.ts +54 -0
- package/dist/generated/src/models/GetInappNotificationsResponseNotificationsInnerDeliveryOptions.js +71 -0
- package/dist/generated/src/models/GetInappNotificationsResponseNotificationsInnerDeliveryOptionsInstant.d.ts +50 -0
- package/dist/generated/src/models/GetInappNotificationsResponseNotificationsInnerDeliveryOptionsInstant.js +56 -0
- package/dist/generated/src/models/GetInappNotificationsResponseNotificationsInnerDeliveryOptionsOff.d.ts +32 -0
- package/dist/generated/src/models/GetInappNotificationsResponseNotificationsInnerDeliveryOptionsOff.js +50 -0
- package/dist/generated/src/models/GetInappNotificationsResponseNotificationsInnerRepliesInner.d.ts +38 -0
- package/dist/generated/src/models/GetInappNotificationsResponseNotificationsInnerRepliesInner.js +54 -0
- package/dist/generated/src/models/GetInappNotificationsResponseNotificationsInnerTemplate.d.ts +77 -0
- package/dist/generated/src/models/GetInappNotificationsResponseNotificationsInnerTemplate.js +83 -0
- package/dist/generated/src/models/GetInappNotificationsResponseNotificationsInnerTemplateAnyOf.d.ts +77 -0
- package/dist/generated/src/models/GetInappNotificationsResponseNotificationsInnerTemplateAnyOf.js +83 -0
- package/dist/generated/src/models/GetKeysResponse.d.ts +33 -0
- package/dist/generated/src/models/GetKeysResponse.js +51 -0
- package/dist/generated/src/models/GetKeysResponseKeysInner.d.ts +88 -0
- package/dist/generated/src/models/GetKeysResponseKeysInner.js +88 -0
- package/dist/generated/src/models/GetMetricsResponseInner.d.ts +73 -0
- package/dist/generated/src/models/GetMetricsResponseInner.js +75 -0
- package/dist/generated/src/models/GetMetricsResponseInnerMessagesInner.d.ts +38 -0
- package/dist/generated/src/models/GetMetricsResponseInnerMessagesInner.js +50 -0
- package/dist/generated/src/models/GetNotificationsResponseInner.d.ts +103 -0
- package/dist/generated/src/models/GetNotificationsResponseInner.js +105 -0
- package/dist/generated/src/models/GetNotificationsResponseInnerDeduplication.d.ts +32 -0
- package/dist/generated/src/models/GetNotificationsResponseInnerDeduplication.js +50 -0
- package/dist/generated/src/models/GetNotificationsResponseInnerOptions.d.ts +70 -0
- package/dist/generated/src/models/GetNotificationsResponseInnerOptions.js +76 -0
- package/dist/generated/src/models/GetNotificationsResponseInnerOptionsEMAIL.d.ts +84 -0
- package/dist/generated/src/models/GetNotificationsResponseInnerOptionsEMAIL.js +93 -0
- package/dist/generated/src/models/GetNotificationsResponseInnerOptionsEMAILDaily.d.ts +38 -0
- package/dist/generated/src/models/GetNotificationsResponseInnerOptionsEMAILDaily.js +52 -0
- package/dist/generated/src/models/GetNotificationsResponseInnerOptionsEMAILMonthly.d.ts +52 -0
- package/dist/generated/src/models/GetNotificationsResponseInnerOptionsEMAILMonthly.js +64 -0
- package/dist/generated/src/models/GetNotificationsResponseInnerOptionsEMAILWeekly.d.ts +44 -0
- package/dist/generated/src/models/GetNotificationsResponseInnerOptionsEMAILWeekly.js +54 -0
- package/dist/generated/src/models/GetNotificationsResponseInnerTemplatesInner.d.ts +51 -0
- package/dist/generated/src/models/GetNotificationsResponseInnerTemplatesInner.js +69 -0
- package/dist/generated/src/models/GetNotificationsResponseInnerThrottling.d.ts +76 -0
- package/dist/generated/src/models/GetNotificationsResponseInnerThrottling.js +89 -0
- package/dist/generated/src/models/GetSendersResponseInner.d.ts +109 -0
- package/dist/generated/src/models/GetSendersResponseInner.js +111 -0
- package/dist/generated/src/models/GetTemplatesResponse.d.ts +77 -0
- package/dist/generated/src/models/GetTemplatesResponse.js +83 -0
- package/dist/generated/src/models/GetUsersResponse.d.ts +45 -0
- package/dist/generated/src/models/GetUsersResponse.js +57 -0
- package/dist/generated/src/models/GetUsersResponseUsersInner.d.ts +107 -0
- package/dist/generated/src/models/GetUsersResponseUsersInner.js +88 -0
- package/dist/generated/src/models/GetUsersResponseUsersInnerEmailSuppressionStatus.d.ts +46 -0
- package/dist/generated/src/models/GetUsersResponseUsersInnerEmailSuppressionStatus.js +64 -0
- package/dist/generated/src/models/GetUsersResponseUsersInnerPushTokensInner.d.ts +59 -0
- package/dist/generated/src/models/GetUsersResponseUsersInnerPushTokensInner.js +71 -0
- package/dist/generated/src/models/GetUsersResponseUsersInnerPushTokensInnerDevice.d.ts +62 -0
- package/dist/generated/src/models/GetUsersResponseUsersInnerPushTokensInnerDevice.js +60 -0
- package/dist/generated/src/models/GetUsersResponseUsersInnerSlackToken.d.ts +138 -0
- package/dist/generated/src/models/GetUsersResponseUsersInnerSlackToken.js +100 -0
- package/dist/generated/src/models/GetUsersResponseUsersInnerSlackTokenAuthedUser.d.ts +62 -0
- package/dist/generated/src/models/GetUsersResponseUsersInnerSlackTokenAuthedUser.js +58 -0
- package/dist/generated/src/models/GetUsersResponseUsersInnerSlackTokenEnterprise.d.ts +38 -0
- package/dist/generated/src/models/GetUsersResponseUsersInnerSlackTokenEnterprise.js +50 -0
- package/dist/generated/src/models/GetUsersResponseUsersInnerSlackTokenIncomingWebhook.d.ts +50 -0
- package/dist/generated/src/models/GetUsersResponseUsersInnerSlackTokenIncomingWebhook.js +54 -0
- package/dist/generated/src/models/GetUsersResponseUsersInnerSlackTokenResponseMetadata.d.ts +62 -0
- package/dist/generated/src/models/GetUsersResponseUsersInnerSlackTokenResponseMetadata.js +58 -0
- package/dist/generated/src/models/GetUsersResponseUsersInnerWebPushTokensInner.d.ts +33 -0
- package/dist/generated/src/models/GetUsersResponseUsersInnerWebPushTokensInner.js +51 -0
- package/dist/generated/src/models/GetUsersResponseUsersInnerWebPushTokensInnerSub.d.ts +39 -0
- package/dist/generated/src/models/GetUsersResponseUsersInnerWebPushTokensInnerSub.js +55 -0
- package/dist/generated/src/models/GetUsersResponseUsersInnerWebPushTokensInnerSubKeys.d.ts +38 -0
- package/dist/generated/src/models/GetUsersResponseUsersInnerWebPushTokensInnerSubKeys.js +54 -0
- package/dist/generated/src/models/InAppNotificationPatchRequest.d.ts +75 -0
- package/dist/generated/src/models/InAppNotificationPatchRequest.js +71 -0
- package/dist/generated/src/models/InAppNotificationUnreadClearRequest.d.ts +38 -0
- package/dist/generated/src/models/InAppNotificationUnreadClearRequest.js +50 -0
- package/dist/generated/src/models/InappUnreadCountResponse.d.ts +32 -0
- package/dist/generated/src/models/InappUnreadCountResponse.js +50 -0
- package/dist/generated/src/models/InboundRequestBody.d.ts +26 -0
- package/dist/generated/src/models/InboundRequestBody.js +38 -0
- package/dist/generated/src/models/InboundResponseBody.d.ts +48 -0
- package/dist/generated/src/models/InboundResponseBody.js +66 -0
- package/dist/generated/src/models/InboundResponseBodyResultsInner.d.ts +59 -0
- package/dist/generated/src/models/InboundResponseBodyResultsInner.js +78 -0
- package/dist/generated/src/models/IngishtsPostRequest.d.ts +78 -0
- package/dist/generated/src/models/IngishtsPostRequest.js +81 -0
- package/dist/generated/src/models/IngishtsPostRequestLabelOptions.d.ts +32 -0
- package/dist/generated/src/models/IngishtsPostRequestLabelOptions.js +48 -0
- package/dist/generated/src/models/IngishtsPostRequestMetricDataQueriesInner.d.ts +69 -0
- package/dist/generated/src/models/IngishtsPostRequestMetricDataQueriesInner.js +63 -0
- package/dist/generated/src/models/IngishtsPostRequestMetricDataQueriesInnerMetricStat.d.ts +84 -0
- package/dist/generated/src/models/IngishtsPostRequestMetricDataQueriesInnerMetricStat.js +92 -0
- package/dist/generated/src/models/IngishtsPostRequestMetricDataQueriesInnerMetricStatMetric.d.ts +45 -0
- package/dist/generated/src/models/IngishtsPostRequestMetricDataQueriesInnerMetricStatMetric.js +57 -0
- package/dist/generated/src/models/IngishtsPostRequestMetricDataQueriesInnerMetricStatMetricDimensionsInner.d.ts +38 -0
- package/dist/generated/src/models/IngishtsPostRequestMetricDataQueriesInnerMetricStatMetricDimensionsInner.js +50 -0
- package/dist/generated/src/models/IntercomWebhook.d.ts +64 -0
- package/dist/generated/src/models/IntercomWebhook.js +76 -0
- package/dist/generated/src/models/IntercomWebhookData.d.ts +33 -0
- package/dist/generated/src/models/IntercomWebhookData.js +51 -0
- package/dist/generated/src/models/IntercomWebhookDataItem.d.ts +130 -0
- package/dist/generated/src/models/IntercomWebhookDataItem.js +122 -0
- package/dist/generated/src/models/IntercomWebhookDataItemAnyOf.d.ts +130 -0
- package/dist/generated/src/models/IntercomWebhookDataItemAnyOf.js +122 -0
- package/dist/generated/src/models/IntercomWebhookDataItemAnyOfContacts.d.ts +46 -0
- package/dist/generated/src/models/IntercomWebhookDataItemAnyOfContacts.js +64 -0
- package/dist/generated/src/models/IntercomWebhookDataItemAnyOfContactsContactsInner.d.ts +44 -0
- package/dist/generated/src/models/IntercomWebhookDataItemAnyOfContactsContactsInner.js +56 -0
- package/dist/generated/src/models/IntercomWebhookDataItemAnyOfSource.d.ts +63 -0
- package/dist/generated/src/models/IntercomWebhookDataItemAnyOfSource.js +67 -0
- package/dist/generated/src/models/IntercomWebhookDataItemAnyOfSourceAuthor.d.ts +50 -0
- package/dist/generated/src/models/IntercomWebhookDataItemAnyOfSourceAuthor.js +58 -0
- package/dist/generated/src/models/LogQueryPostBody.d.ts +75 -0
- package/dist/generated/src/models/LogQueryPostBody.js +75 -0
- package/dist/generated/src/models/LogsBulkRequest.d.ts +32 -0
- package/dist/generated/src/models/LogsBulkRequest.js +50 -0
- package/dist/generated/src/models/LogsGetResponse.d.ts +33 -0
- package/dist/generated/src/models/LogsGetResponse.js +51 -0
- package/dist/generated/src/models/LogsGetResponseLogsInner.d.ts +1076 -0
- package/dist/generated/src/models/LogsGetResponseLogsInner.js +747 -0
- package/dist/generated/src/models/LogsQueryResponse.d.ts +32 -0
- package/dist/generated/src/models/LogsQueryResponse.js +50 -0
- package/dist/generated/src/models/LogsQueryResultResponse.d.ts +51 -0
- package/dist/generated/src/models/LogsQueryResultResponse.js +61 -0
- package/dist/generated/src/models/LogsRetentionResponse.d.ts +32 -0
- package/dist/generated/src/models/LogsRetentionResponse.js +50 -0
- package/dist/generated/src/models/LogsTailResponse.d.ts +33 -0
- package/dist/generated/src/models/LogsTailResponse.js +51 -0
- package/dist/generated/src/models/MessageResponse.d.ts +32 -0
- package/dist/generated/src/models/MessageResponse.js +50 -0
- package/dist/generated/src/models/Notification.d.ts +103 -0
- package/dist/generated/src/models/Notification.js +105 -0
- package/dist/generated/src/models/NotificationCreateRequest.d.ts +51 -0
- package/dist/generated/src/models/NotificationCreateRequest.js +63 -0
- package/dist/generated/src/models/NotificationPatchRequest.d.ts +84 -0
- package/dist/generated/src/models/NotificationPatchRequest.js +84 -0
- package/dist/generated/src/models/PostEmailTestRequest.d.ts +68 -0
- package/dist/generated/src/models/PostEmailTestRequest.js +72 -0
- package/dist/generated/src/models/PostEmailTestResponse.d.ts +38 -0
- package/dist/generated/src/models/PostEmailTestResponse.js +52 -0
- package/dist/generated/src/models/PostSendersRequestBody.d.ts +32 -0
- package/dist/generated/src/models/PostSendersRequestBody.js +50 -0
- package/dist/generated/src/models/PostUserRequest.d.ts +82 -0
- package/dist/generated/src/models/PostUserRequest.js +75 -0
- package/dist/generated/src/models/SenderPostBody.d.ts +173 -0
- package/dist/generated/src/models/SenderPostBody.js +127 -0
- package/dist/generated/src/models/SenderPostBodyEmail.d.ts +56 -0
- package/dist/generated/src/models/SenderPostBodyEmail.js +60 -0
- package/dist/generated/src/models/SenderPostBodyInapp.d.ts +44 -0
- package/dist/generated/src/models/SenderPostBodyInapp.js +54 -0
- package/dist/generated/src/models/SenderPostBodyMobilePush.d.ts +38 -0
- package/dist/generated/src/models/SenderPostBodyMobilePush.js +54 -0
- package/dist/generated/src/models/SenderPostBodyOptions.d.ts +47 -0
- package/dist/generated/src/models/SenderPostBodyOptions.js +61 -0
- package/dist/generated/src/models/SenderPostBodyOptionsApn.d.ts +68 -0
- package/dist/generated/src/models/SenderPostBodyOptionsApn.js +60 -0
- package/dist/generated/src/models/SenderPostBodyOptionsEmail.d.ts +69 -0
- package/dist/generated/src/models/SenderPostBodyOptionsEmail.js +65 -0
- package/dist/generated/src/models/SenderPostBodyOptionsEmailAttachmentsInner.d.ts +50 -0
- package/dist/generated/src/models/SenderPostBodyOptionsEmailAttachmentsInner.js +60 -0
- package/dist/generated/src/models/SenderPostBodyOptionsEmailAttachmentsInnerAnyOf.d.ts +38 -0
- package/dist/generated/src/models/SenderPostBodyOptionsEmailAttachmentsInnerAnyOf.js +54 -0
- package/dist/generated/src/models/SenderPostBodyOptionsEmailAttachmentsInnerAnyOf1.d.ts +44 -0
- package/dist/generated/src/models/SenderPostBodyOptionsEmailAttachmentsInnerAnyOf1.js +56 -0
- package/dist/generated/src/models/SenderPostBodyOptionsFcm.d.ts +33 -0
- package/dist/generated/src/models/SenderPostBodyOptionsFcm.js +51 -0
- package/dist/generated/src/models/SenderPostBodyOptionsFcmAndroid.d.ts +58 -0
- package/dist/generated/src/models/SenderPostBodyOptionsFcmAndroid.js +66 -0
- package/dist/generated/src/models/SenderPostBodySlack.d.ts +109 -0
- package/dist/generated/src/models/SenderPostBodySlack.js +85 -0
- package/dist/generated/src/models/SenderPostBodySlackMetadata.d.ts +48 -0
- package/dist/generated/src/models/SenderPostBodySlackMetadata.js +57 -0
- package/dist/generated/src/models/SenderPostBodySlackMetadataEntitiesInner.d.ts +59 -0
- package/dist/generated/src/models/SenderPostBodySlackMetadataEntitiesInner.js +65 -0
- package/dist/generated/src/models/SenderPostBodySlackMetadataEntitiesInnerExternalRef.d.ts +38 -0
- package/dist/generated/src/models/SenderPostBodySlackMetadataEntitiesInnerExternalRef.js +52 -0
- package/dist/generated/src/models/SenderPostBodySms.d.ts +39 -0
- package/dist/generated/src/models/SenderPostBodySms.js +53 -0
- package/dist/generated/src/models/SenderPostBodySmsAutoReply.d.ts +32 -0
- package/dist/generated/src/models/SenderPostBodySmsAutoReply.js +50 -0
- package/dist/generated/src/models/SenderPostBodyTo.d.ts +107 -0
- package/dist/generated/src/models/SenderPostBodyTo.js +86 -0
- package/dist/generated/src/models/SenderPostBodyWebPush.d.ts +50 -0
- package/dist/generated/src/models/SenderPostBodyWebPush.js +58 -0
- package/dist/generated/src/models/SenderPostResponse.d.ts +38 -0
- package/dist/generated/src/models/SenderPostResponse.js +54 -0
- package/dist/generated/src/models/SetDefaultTemplateRequest.d.ts +49 -0
- package/dist/generated/src/models/SetDefaultTemplateRequest.js +67 -0
- package/dist/generated/src/models/SlackOauthRequest.d.ts +38 -0
- package/dist/generated/src/models/SlackOauthRequest.js +54 -0
- package/dist/generated/src/models/SuccessResponse.d.ts +32 -0
- package/dist/generated/src/models/SuccessResponse.js +50 -0
- package/dist/generated/src/models/Template.d.ts +77 -0
- package/dist/generated/src/models/Template.js +83 -0
- package/dist/generated/src/models/TemplatePatchRequest.d.ts +94 -0
- package/dist/generated/src/models/TemplatePatchRequest.js +74 -0
- package/dist/generated/src/models/TemplatePatchRequestAnyOf.d.ts +62 -0
- package/dist/generated/src/models/TemplatePatchRequestAnyOf.js +58 -0
- package/dist/generated/src/models/TemplatePatchRequestAnyOf1.d.ts +58 -0
- package/dist/generated/src/models/TemplatePatchRequestAnyOf1.js +62 -0
- package/dist/generated/src/models/TemplatePatchRequestAnyOf1Batch.d.ts +44 -0
- package/dist/generated/src/models/TemplatePatchRequestAnyOf1Batch.js +58 -0
- package/dist/generated/src/models/TemplatePatchRequestAnyOf1Instant.d.ts +44 -0
- package/dist/generated/src/models/TemplatePatchRequestAnyOf1Instant.js +54 -0
- package/dist/generated/src/models/TemplatePostRequest.d.ts +33 -0
- package/dist/generated/src/models/TemplatePostRequest.js +52 -0
- package/dist/generated/src/models/User.d.ts +107 -0
- package/dist/generated/src/models/User.js +88 -0
- package/dist/generated/src/models/UserSuppressionDeleteResponse.d.ts +33 -0
- package/dist/generated/src/models/UserSuppressionDeleteResponse.js +51 -0
- package/dist/generated/src/models/WebhookResponse.d.ts +45 -0
- package/dist/generated/src/models/WebhookResponse.js +56 -0
- package/dist/generated/src/models/index.d.ts +129 -0
- package/dist/generated/src/models/index.js +147 -0
- package/dist/generated/src/runtime.d.ts +184 -0
- package/dist/generated/src/runtime.js +344 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +22 -0
- package/dist/src/client.d.ts +111 -0
- package/dist/src/client.js +141 -0
- package/dist/src/index.d.ts +49 -0
- package/dist/src/index.js +68 -0
- package/dist/src/testing.d.ts +77 -0
- package/dist/src/testing.js +123 -0
- package/package.json +55 -0
|
@@ -0,0 +1,461 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* NotificationAPI
|
|
6
|
+
* Internal API for notification delivery and management
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
16
|
+
if (k2 === undefined) k2 = k;
|
|
17
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
18
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
19
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
20
|
+
}
|
|
21
|
+
Object.defineProperty(o, k2, desc);
|
|
22
|
+
}) : (function(o, m, k, k2) {
|
|
23
|
+
if (k2 === undefined) k2 = k;
|
|
24
|
+
o[k2] = m[k];
|
|
25
|
+
}));
|
|
26
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
27
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
28
|
+
}) : function(o, v) {
|
|
29
|
+
o["default"] = v;
|
|
30
|
+
});
|
|
31
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
32
|
+
var ownKeys = function(o) {
|
|
33
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
34
|
+
var ar = [];
|
|
35
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
36
|
+
return ar;
|
|
37
|
+
};
|
|
38
|
+
return ownKeys(o);
|
|
39
|
+
};
|
|
40
|
+
return function (mod) {
|
|
41
|
+
if (mod && mod.__esModule) return mod;
|
|
42
|
+
var result = {};
|
|
43
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
44
|
+
__setModuleDefault(result, mod);
|
|
45
|
+
return result;
|
|
46
|
+
};
|
|
47
|
+
})();
|
|
48
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
49
|
+
exports.TemplatesApi = void 0;
|
|
50
|
+
const runtime = __importStar(require("../runtime"));
|
|
51
|
+
const index_1 = require("../models/index");
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
*/
|
|
55
|
+
class TemplatesApi extends runtime.BaseAPI {
|
|
56
|
+
/**
|
|
57
|
+
* Create a new template for a notification
|
|
58
|
+
*/
|
|
59
|
+
async createTemplateRaw(requestParameters, initOverrides) {
|
|
60
|
+
if (requestParameters['notificationId'] == null) {
|
|
61
|
+
throw new runtime.RequiredError('notificationId', 'Required parameter "notificationId" was null or undefined when calling createTemplate().');
|
|
62
|
+
}
|
|
63
|
+
if (requestParameters['channel'] == null) {
|
|
64
|
+
throw new runtime.RequiredError('channel', 'Required parameter "channel" was null or undefined when calling createTemplate().');
|
|
65
|
+
}
|
|
66
|
+
if (requestParameters['templatePostRequest'] == null) {
|
|
67
|
+
throw new runtime.RequiredError('templatePostRequest', 'Required parameter "templatePostRequest" was null or undefined when calling createTemplate().');
|
|
68
|
+
}
|
|
69
|
+
const queryParameters = {};
|
|
70
|
+
const headerParameters = {};
|
|
71
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
72
|
+
if (this.configuration &&
|
|
73
|
+
(this.configuration.username !== undefined ||
|
|
74
|
+
this.configuration.password !== undefined)) {
|
|
75
|
+
headerParameters['Authorization'] =
|
|
76
|
+
'Basic ' +
|
|
77
|
+
btoa(this.configuration.username + ':' + this.configuration.password);
|
|
78
|
+
}
|
|
79
|
+
if (this.configuration &&
|
|
80
|
+
(this.configuration.username !== undefined ||
|
|
81
|
+
this.configuration.password !== undefined)) {
|
|
82
|
+
headerParameters['Authorization'] =
|
|
83
|
+
'Basic ' +
|
|
84
|
+
btoa(this.configuration.username + ':' + this.configuration.password);
|
|
85
|
+
}
|
|
86
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
87
|
+
const token = this.configuration.accessToken;
|
|
88
|
+
const tokenString = await token('apiKey', []);
|
|
89
|
+
if (tokenString) {
|
|
90
|
+
headerParameters['Authorization'] = `Bearer ${tokenString}`;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
if (this.configuration &&
|
|
94
|
+
(this.configuration.username !== undefined ||
|
|
95
|
+
this.configuration.password !== undefined)) {
|
|
96
|
+
headerParameters['Authorization'] =
|
|
97
|
+
'Basic ' +
|
|
98
|
+
btoa(this.configuration.username + ':' + this.configuration.password);
|
|
99
|
+
}
|
|
100
|
+
let urlPath = `/notifications/{notificationId}/{channel}/templates`;
|
|
101
|
+
urlPath = urlPath.replace(`{${'notificationId'}}`, encodeURIComponent(String(requestParameters['notificationId'])));
|
|
102
|
+
urlPath = urlPath.replace(`{${'channel'}}`, encodeURIComponent(String(requestParameters['channel'])));
|
|
103
|
+
const response = await this.request({
|
|
104
|
+
path: urlPath,
|
|
105
|
+
method: 'POST',
|
|
106
|
+
headers: headerParameters,
|
|
107
|
+
query: queryParameters,
|
|
108
|
+
body: (0, index_1.TemplatePostRequestToJSON)(requestParameters['templatePostRequest'])
|
|
109
|
+
}, initOverrides);
|
|
110
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.TemplateFromJSON)(jsonValue));
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Create a new template for a notification
|
|
114
|
+
*/
|
|
115
|
+
async createTemplate(notificationId, channel, templatePostRequest, initOverrides) {
|
|
116
|
+
const response = await this.createTemplateRaw({
|
|
117
|
+
notificationId: notificationId,
|
|
118
|
+
channel: channel,
|
|
119
|
+
templatePostRequest: templatePostRequest
|
|
120
|
+
}, initOverrides);
|
|
121
|
+
return await response.value();
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Delete a template
|
|
125
|
+
*/
|
|
126
|
+
async deleteTemplateRaw(requestParameters, initOverrides) {
|
|
127
|
+
if (requestParameters['notificationId'] == null) {
|
|
128
|
+
throw new runtime.RequiredError('notificationId', 'Required parameter "notificationId" was null or undefined when calling deleteTemplate().');
|
|
129
|
+
}
|
|
130
|
+
if (requestParameters['channel'] == null) {
|
|
131
|
+
throw new runtime.RequiredError('channel', 'Required parameter "channel" was null or undefined when calling deleteTemplate().');
|
|
132
|
+
}
|
|
133
|
+
if (requestParameters['templateId'] == null) {
|
|
134
|
+
throw new runtime.RequiredError('templateId', 'Required parameter "templateId" was null or undefined when calling deleteTemplate().');
|
|
135
|
+
}
|
|
136
|
+
const queryParameters = {};
|
|
137
|
+
const headerParameters = {};
|
|
138
|
+
if (this.configuration &&
|
|
139
|
+
(this.configuration.username !== undefined ||
|
|
140
|
+
this.configuration.password !== undefined)) {
|
|
141
|
+
headerParameters['Authorization'] =
|
|
142
|
+
'Basic ' +
|
|
143
|
+
btoa(this.configuration.username + ':' + this.configuration.password);
|
|
144
|
+
}
|
|
145
|
+
if (this.configuration &&
|
|
146
|
+
(this.configuration.username !== undefined ||
|
|
147
|
+
this.configuration.password !== undefined)) {
|
|
148
|
+
headerParameters['Authorization'] =
|
|
149
|
+
'Basic ' +
|
|
150
|
+
btoa(this.configuration.username + ':' + this.configuration.password);
|
|
151
|
+
}
|
|
152
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
153
|
+
const token = this.configuration.accessToken;
|
|
154
|
+
const tokenString = await token('apiKey', []);
|
|
155
|
+
if (tokenString) {
|
|
156
|
+
headerParameters['Authorization'] = `Bearer ${tokenString}`;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
if (this.configuration &&
|
|
160
|
+
(this.configuration.username !== undefined ||
|
|
161
|
+
this.configuration.password !== undefined)) {
|
|
162
|
+
headerParameters['Authorization'] =
|
|
163
|
+
'Basic ' +
|
|
164
|
+
btoa(this.configuration.username + ':' + this.configuration.password);
|
|
165
|
+
}
|
|
166
|
+
let urlPath = `/notifications/{notificationId}/{channel}/templates/{templateId}`;
|
|
167
|
+
urlPath = urlPath.replace(`{${'notificationId'}}`, encodeURIComponent(String(requestParameters['notificationId'])));
|
|
168
|
+
urlPath = urlPath.replace(`{${'channel'}}`, encodeURIComponent(String(requestParameters['channel'])));
|
|
169
|
+
urlPath = urlPath.replace(`{${'templateId'}}`, encodeURIComponent(String(requestParameters['templateId'])));
|
|
170
|
+
const response = await this.request({
|
|
171
|
+
path: urlPath,
|
|
172
|
+
method: 'DELETE',
|
|
173
|
+
headers: headerParameters,
|
|
174
|
+
query: queryParameters
|
|
175
|
+
}, initOverrides);
|
|
176
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.DeleteTemplateResponseFromJSON)(jsonValue));
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Delete a template
|
|
180
|
+
*/
|
|
181
|
+
async deleteTemplate(notificationId, channel, templateId, initOverrides) {
|
|
182
|
+
const response = await this.deleteTemplateRaw({
|
|
183
|
+
notificationId: notificationId,
|
|
184
|
+
channel: channel,
|
|
185
|
+
templateId: templateId
|
|
186
|
+
}, initOverrides);
|
|
187
|
+
return await response.value();
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* Initiate AI-powered template migration from complex to simple HTML
|
|
191
|
+
*/
|
|
192
|
+
async initiateMigrationRaw(requestParameters, initOverrides) {
|
|
193
|
+
if (requestParameters['notificationId'] == null) {
|
|
194
|
+
throw new runtime.RequiredError('notificationId', 'Required parameter "notificationId" was null or undefined when calling initiateMigration().');
|
|
195
|
+
}
|
|
196
|
+
if (requestParameters['channel'] == null) {
|
|
197
|
+
throw new runtime.RequiredError('channel', 'Required parameter "channel" was null or undefined when calling initiateMigration().');
|
|
198
|
+
}
|
|
199
|
+
if (requestParameters['templateId'] == null) {
|
|
200
|
+
throw new runtime.RequiredError('templateId', 'Required parameter "templateId" was null or undefined when calling initiateMigration().');
|
|
201
|
+
}
|
|
202
|
+
const queryParameters = {};
|
|
203
|
+
const headerParameters = {};
|
|
204
|
+
if (this.configuration &&
|
|
205
|
+
(this.configuration.username !== undefined ||
|
|
206
|
+
this.configuration.password !== undefined)) {
|
|
207
|
+
headerParameters['Authorization'] =
|
|
208
|
+
'Basic ' +
|
|
209
|
+
btoa(this.configuration.username + ':' + this.configuration.password);
|
|
210
|
+
}
|
|
211
|
+
if (this.configuration &&
|
|
212
|
+
(this.configuration.username !== undefined ||
|
|
213
|
+
this.configuration.password !== undefined)) {
|
|
214
|
+
headerParameters['Authorization'] =
|
|
215
|
+
'Basic ' +
|
|
216
|
+
btoa(this.configuration.username + ':' + this.configuration.password);
|
|
217
|
+
}
|
|
218
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
219
|
+
const token = this.configuration.accessToken;
|
|
220
|
+
const tokenString = await token('apiKey', []);
|
|
221
|
+
if (tokenString) {
|
|
222
|
+
headerParameters['Authorization'] = `Bearer ${tokenString}`;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
if (this.configuration &&
|
|
226
|
+
(this.configuration.username !== undefined ||
|
|
227
|
+
this.configuration.password !== undefined)) {
|
|
228
|
+
headerParameters['Authorization'] =
|
|
229
|
+
'Basic ' +
|
|
230
|
+
btoa(this.configuration.username + ':' + this.configuration.password);
|
|
231
|
+
}
|
|
232
|
+
let urlPath = `/notifications/{notificationId}/{channel}/templates/{templateId}/migrate`;
|
|
233
|
+
urlPath = urlPath.replace(`{${'notificationId'}}`, encodeURIComponent(String(requestParameters['notificationId'])));
|
|
234
|
+
urlPath = urlPath.replace(`{${'channel'}}`, encodeURIComponent(String(requestParameters['channel'])));
|
|
235
|
+
urlPath = urlPath.replace(`{${'templateId'}}`, encodeURIComponent(String(requestParameters['templateId'])));
|
|
236
|
+
const response = await this.request({
|
|
237
|
+
path: urlPath,
|
|
238
|
+
method: 'POST',
|
|
239
|
+
headers: headerParameters,
|
|
240
|
+
query: queryParameters
|
|
241
|
+
}, initOverrides);
|
|
242
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.TemplateFromJSON)(jsonValue));
|
|
243
|
+
}
|
|
244
|
+
/**
|
|
245
|
+
* Initiate AI-powered template migration from complex to simple HTML
|
|
246
|
+
*/
|
|
247
|
+
async initiateMigration(notificationId, channel, templateId, initOverrides) {
|
|
248
|
+
const response = await this.initiateMigrationRaw({
|
|
249
|
+
notificationId: notificationId,
|
|
250
|
+
channel: channel,
|
|
251
|
+
templateId: templateId
|
|
252
|
+
}, initOverrides);
|
|
253
|
+
return await response.value();
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* Get template(s) for a notification
|
|
257
|
+
*/
|
|
258
|
+
async listTemplatesRaw(requestParameters, initOverrides) {
|
|
259
|
+
if (requestParameters['notificationId'] == null) {
|
|
260
|
+
throw new runtime.RequiredError('notificationId', 'Required parameter "notificationId" was null or undefined when calling listTemplates().');
|
|
261
|
+
}
|
|
262
|
+
if (requestParameters['channel'] == null) {
|
|
263
|
+
throw new runtime.RequiredError('channel', 'Required parameter "channel" was null or undefined when calling listTemplates().');
|
|
264
|
+
}
|
|
265
|
+
if (requestParameters['templateId'] == null) {
|
|
266
|
+
throw new runtime.RequiredError('templateId', 'Required parameter "templateId" was null or undefined when calling listTemplates().');
|
|
267
|
+
}
|
|
268
|
+
const queryParameters = {};
|
|
269
|
+
const headerParameters = {};
|
|
270
|
+
if (this.configuration &&
|
|
271
|
+
(this.configuration.username !== undefined ||
|
|
272
|
+
this.configuration.password !== undefined)) {
|
|
273
|
+
headerParameters['Authorization'] =
|
|
274
|
+
'Basic ' +
|
|
275
|
+
btoa(this.configuration.username + ':' + this.configuration.password);
|
|
276
|
+
}
|
|
277
|
+
if (this.configuration &&
|
|
278
|
+
(this.configuration.username !== undefined ||
|
|
279
|
+
this.configuration.password !== undefined)) {
|
|
280
|
+
headerParameters['Authorization'] =
|
|
281
|
+
'Basic ' +
|
|
282
|
+
btoa(this.configuration.username + ':' + this.configuration.password);
|
|
283
|
+
}
|
|
284
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
285
|
+
const token = this.configuration.accessToken;
|
|
286
|
+
const tokenString = await token('apiKey', []);
|
|
287
|
+
if (tokenString) {
|
|
288
|
+
headerParameters['Authorization'] = `Bearer ${tokenString}`;
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
if (this.configuration &&
|
|
292
|
+
(this.configuration.username !== undefined ||
|
|
293
|
+
this.configuration.password !== undefined)) {
|
|
294
|
+
headerParameters['Authorization'] =
|
|
295
|
+
'Basic ' +
|
|
296
|
+
btoa(this.configuration.username + ':' + this.configuration.password);
|
|
297
|
+
}
|
|
298
|
+
let urlPath = `/notifications/{notificationId}/{channel}/templates/{templateId}`;
|
|
299
|
+
urlPath = urlPath.replace(`{${'notificationId'}}`, encodeURIComponent(String(requestParameters['notificationId'])));
|
|
300
|
+
urlPath = urlPath.replace(`{${'channel'}}`, encodeURIComponent(String(requestParameters['channel'])));
|
|
301
|
+
urlPath = urlPath.replace(`{${'templateId'}}`, encodeURIComponent(String(requestParameters['templateId'])));
|
|
302
|
+
const response = await this.request({
|
|
303
|
+
path: urlPath,
|
|
304
|
+
method: 'GET',
|
|
305
|
+
headers: headerParameters,
|
|
306
|
+
query: queryParameters
|
|
307
|
+
}, initOverrides);
|
|
308
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetTemplatesResponseFromJSON)(jsonValue));
|
|
309
|
+
}
|
|
310
|
+
/**
|
|
311
|
+
* Get template(s) for a notification
|
|
312
|
+
*/
|
|
313
|
+
async listTemplates(notificationId, channel, templateId, initOverrides) {
|
|
314
|
+
const response = await this.listTemplatesRaw({
|
|
315
|
+
notificationId: notificationId,
|
|
316
|
+
channel: channel,
|
|
317
|
+
templateId: templateId
|
|
318
|
+
}, initOverrides);
|
|
319
|
+
return await response.value();
|
|
320
|
+
}
|
|
321
|
+
/**
|
|
322
|
+
* Set a template as default for specific delivery modes
|
|
323
|
+
*/
|
|
324
|
+
async setDefaultTemplateRaw(requestParameters, initOverrides) {
|
|
325
|
+
if (requestParameters['notificationId'] == null) {
|
|
326
|
+
throw new runtime.RequiredError('notificationId', 'Required parameter "notificationId" was null or undefined when calling setDefaultTemplate().');
|
|
327
|
+
}
|
|
328
|
+
if (requestParameters['channel'] == null) {
|
|
329
|
+
throw new runtime.RequiredError('channel', 'Required parameter "channel" was null or undefined when calling setDefaultTemplate().');
|
|
330
|
+
}
|
|
331
|
+
if (requestParameters['setDefaultTemplateRequest'] == null) {
|
|
332
|
+
throw new runtime.RequiredError('setDefaultTemplateRequest', 'Required parameter "setDefaultTemplateRequest" was null or undefined when calling setDefaultTemplate().');
|
|
333
|
+
}
|
|
334
|
+
const queryParameters = {};
|
|
335
|
+
const headerParameters = {};
|
|
336
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
337
|
+
if (this.configuration &&
|
|
338
|
+
(this.configuration.username !== undefined ||
|
|
339
|
+
this.configuration.password !== undefined)) {
|
|
340
|
+
headerParameters['Authorization'] =
|
|
341
|
+
'Basic ' +
|
|
342
|
+
btoa(this.configuration.username + ':' + this.configuration.password);
|
|
343
|
+
}
|
|
344
|
+
if (this.configuration &&
|
|
345
|
+
(this.configuration.username !== undefined ||
|
|
346
|
+
this.configuration.password !== undefined)) {
|
|
347
|
+
headerParameters['Authorization'] =
|
|
348
|
+
'Basic ' +
|
|
349
|
+
btoa(this.configuration.username + ':' + this.configuration.password);
|
|
350
|
+
}
|
|
351
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
352
|
+
const token = this.configuration.accessToken;
|
|
353
|
+
const tokenString = await token('apiKey', []);
|
|
354
|
+
if (tokenString) {
|
|
355
|
+
headerParameters['Authorization'] = `Bearer ${tokenString}`;
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
if (this.configuration &&
|
|
359
|
+
(this.configuration.username !== undefined ||
|
|
360
|
+
this.configuration.password !== undefined)) {
|
|
361
|
+
headerParameters['Authorization'] =
|
|
362
|
+
'Basic ' +
|
|
363
|
+
btoa(this.configuration.username + ':' + this.configuration.password);
|
|
364
|
+
}
|
|
365
|
+
let urlPath = `/notifications/{notificationId}/{channel}/templates/default`;
|
|
366
|
+
urlPath = urlPath.replace(`{${'notificationId'}}`, encodeURIComponent(String(requestParameters['notificationId'])));
|
|
367
|
+
urlPath = urlPath.replace(`{${'channel'}}`, encodeURIComponent(String(requestParameters['channel'])));
|
|
368
|
+
const response = await this.request({
|
|
369
|
+
path: urlPath,
|
|
370
|
+
method: 'PATCH',
|
|
371
|
+
headers: headerParameters,
|
|
372
|
+
query: queryParameters,
|
|
373
|
+
body: (0, index_1.SetDefaultTemplateRequestToJSON)(requestParameters['setDefaultTemplateRequest'])
|
|
374
|
+
}, initOverrides);
|
|
375
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.TemplateFromJSON)(jsonValue));
|
|
376
|
+
}
|
|
377
|
+
/**
|
|
378
|
+
* Set a template as default for specific delivery modes
|
|
379
|
+
*/
|
|
380
|
+
async setDefaultTemplate(notificationId, channel, setDefaultTemplateRequest, initOverrides) {
|
|
381
|
+
const response = await this.setDefaultTemplateRaw({
|
|
382
|
+
notificationId: notificationId,
|
|
383
|
+
channel: channel,
|
|
384
|
+
setDefaultTemplateRequest: setDefaultTemplateRequest
|
|
385
|
+
}, initOverrides);
|
|
386
|
+
return await response.value();
|
|
387
|
+
}
|
|
388
|
+
/**
|
|
389
|
+
* Update a template\'s properties
|
|
390
|
+
*/
|
|
391
|
+
async updateTemplateRaw(requestParameters, initOverrides) {
|
|
392
|
+
if (requestParameters['notificationId'] == null) {
|
|
393
|
+
throw new runtime.RequiredError('notificationId', 'Required parameter "notificationId" was null or undefined when calling updateTemplate().');
|
|
394
|
+
}
|
|
395
|
+
if (requestParameters['channel'] == null) {
|
|
396
|
+
throw new runtime.RequiredError('channel', 'Required parameter "channel" was null or undefined when calling updateTemplate().');
|
|
397
|
+
}
|
|
398
|
+
if (requestParameters['templateId'] == null) {
|
|
399
|
+
throw new runtime.RequiredError('templateId', 'Required parameter "templateId" was null or undefined when calling updateTemplate().');
|
|
400
|
+
}
|
|
401
|
+
if (requestParameters['templatePatchRequest'] == null) {
|
|
402
|
+
throw new runtime.RequiredError('templatePatchRequest', 'Required parameter "templatePatchRequest" was null or undefined when calling updateTemplate().');
|
|
403
|
+
}
|
|
404
|
+
const queryParameters = {};
|
|
405
|
+
const headerParameters = {};
|
|
406
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
407
|
+
if (this.configuration &&
|
|
408
|
+
(this.configuration.username !== undefined ||
|
|
409
|
+
this.configuration.password !== undefined)) {
|
|
410
|
+
headerParameters['Authorization'] =
|
|
411
|
+
'Basic ' +
|
|
412
|
+
btoa(this.configuration.username + ':' + this.configuration.password);
|
|
413
|
+
}
|
|
414
|
+
if (this.configuration &&
|
|
415
|
+
(this.configuration.username !== undefined ||
|
|
416
|
+
this.configuration.password !== undefined)) {
|
|
417
|
+
headerParameters['Authorization'] =
|
|
418
|
+
'Basic ' +
|
|
419
|
+
btoa(this.configuration.username + ':' + this.configuration.password);
|
|
420
|
+
}
|
|
421
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
422
|
+
const token = this.configuration.accessToken;
|
|
423
|
+
const tokenString = await token('apiKey', []);
|
|
424
|
+
if (tokenString) {
|
|
425
|
+
headerParameters['Authorization'] = `Bearer ${tokenString}`;
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
if (this.configuration &&
|
|
429
|
+
(this.configuration.username !== undefined ||
|
|
430
|
+
this.configuration.password !== undefined)) {
|
|
431
|
+
headerParameters['Authorization'] =
|
|
432
|
+
'Basic ' +
|
|
433
|
+
btoa(this.configuration.username + ':' + this.configuration.password);
|
|
434
|
+
}
|
|
435
|
+
let urlPath = `/notifications/{notificationId}/{channel}/templates/{templateId}`;
|
|
436
|
+
urlPath = urlPath.replace(`{${'notificationId'}}`, encodeURIComponent(String(requestParameters['notificationId'])));
|
|
437
|
+
urlPath = urlPath.replace(`{${'channel'}}`, encodeURIComponent(String(requestParameters['channel'])));
|
|
438
|
+
urlPath = urlPath.replace(`{${'templateId'}}`, encodeURIComponent(String(requestParameters['templateId'])));
|
|
439
|
+
const response = await this.request({
|
|
440
|
+
path: urlPath,
|
|
441
|
+
method: 'PATCH',
|
|
442
|
+
headers: headerParameters,
|
|
443
|
+
query: queryParameters,
|
|
444
|
+
body: (0, index_1.TemplatePatchRequestToJSON)(requestParameters['templatePatchRequest'])
|
|
445
|
+
}, initOverrides);
|
|
446
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.TemplateFromJSON)(jsonValue));
|
|
447
|
+
}
|
|
448
|
+
/**
|
|
449
|
+
* Update a template\'s properties
|
|
450
|
+
*/
|
|
451
|
+
async updateTemplate(notificationId, channel, templateId, templatePatchRequest, initOverrides) {
|
|
452
|
+
const response = await this.updateTemplateRaw({
|
|
453
|
+
notificationId: notificationId,
|
|
454
|
+
channel: channel,
|
|
455
|
+
templateId: templateId,
|
|
456
|
+
templatePatchRequest: templatePatchRequest
|
|
457
|
+
}, initOverrides);
|
|
458
|
+
return await response.value();
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
exports.TemplatesApi = TemplatesApi;
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* NotificationAPI
|
|
3
|
+
* Internal API for notification delivery and management
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import * as runtime from '../runtime';
|
|
13
|
+
import type { GetNotificationsResponseInner, Notification, NotificationCreateRequest, NotificationPatchRequest, SuccessResponse } from '../models/index';
|
|
14
|
+
export interface CreateNotificationTypeRequest {
|
|
15
|
+
notificationCreateRequest: NotificationCreateRequest;
|
|
16
|
+
}
|
|
17
|
+
export interface DeleteNotificationTypeRequest {
|
|
18
|
+
notificationId: string;
|
|
19
|
+
}
|
|
20
|
+
export interface GetNotificationTypeRequest {
|
|
21
|
+
notificationId: string;
|
|
22
|
+
}
|
|
23
|
+
export interface UpdateNotificationTypeRequest {
|
|
24
|
+
notificationId: string;
|
|
25
|
+
notificationPatchRequest: NotificationPatchRequest;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* TypesApi - interface
|
|
29
|
+
*
|
|
30
|
+
* @export
|
|
31
|
+
* @interface TypesApiInterface
|
|
32
|
+
*/
|
|
33
|
+
export interface TypesApiInterface {
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @summary Create a new notification
|
|
37
|
+
* @param {NotificationCreateRequest} notificationCreateRequest
|
|
38
|
+
* @param {*} [options] Override http request option.
|
|
39
|
+
* @throws {RequiredError}
|
|
40
|
+
* @memberof TypesApiInterface
|
|
41
|
+
*/
|
|
42
|
+
createNotificationTypeRaw(requestParameters: CreateNotificationTypeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Notification>>;
|
|
43
|
+
/**
|
|
44
|
+
* Create a new notification
|
|
45
|
+
*/
|
|
46
|
+
createNotificationType(notificationCreateRequest: NotificationCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Notification>;
|
|
47
|
+
/**
|
|
48
|
+
*
|
|
49
|
+
* @summary Delete a notification
|
|
50
|
+
* @param {string} notificationId The notification ID
|
|
51
|
+
* @param {*} [options] Override http request option.
|
|
52
|
+
* @throws {RequiredError}
|
|
53
|
+
* @memberof TypesApiInterface
|
|
54
|
+
*/
|
|
55
|
+
deleteNotificationTypeRaw(requestParameters: DeleteNotificationTypeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SuccessResponse>>;
|
|
56
|
+
/**
|
|
57
|
+
* Delete a notification
|
|
58
|
+
*/
|
|
59
|
+
deleteNotificationType(notificationId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SuccessResponse>;
|
|
60
|
+
/**
|
|
61
|
+
*
|
|
62
|
+
* @summary Get a specific notification by ID
|
|
63
|
+
* @param {string} notificationId The notification ID
|
|
64
|
+
* @param {*} [options] Override http request option.
|
|
65
|
+
* @throws {RequiredError}
|
|
66
|
+
* @memberof TypesApiInterface
|
|
67
|
+
*/
|
|
68
|
+
getNotificationTypeRaw(requestParameters: GetNotificationTypeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<GetNotificationsResponseInner>>>;
|
|
69
|
+
/**
|
|
70
|
+
* Get a specific notification by ID
|
|
71
|
+
*/
|
|
72
|
+
getNotificationType(notificationId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<GetNotificationsResponseInner>>;
|
|
73
|
+
/**
|
|
74
|
+
*
|
|
75
|
+
* @summary Get all notifications for an account with their templates
|
|
76
|
+
* @param {*} [options] Override http request option.
|
|
77
|
+
* @throws {RequiredError}
|
|
78
|
+
* @memberof TypesApiInterface
|
|
79
|
+
*/
|
|
80
|
+
listNotificationTypesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<GetNotificationsResponseInner>>>;
|
|
81
|
+
/**
|
|
82
|
+
* Get all notifications for an account with their templates
|
|
83
|
+
*/
|
|
84
|
+
listNotificationTypes(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<GetNotificationsResponseInner>>;
|
|
85
|
+
/**
|
|
86
|
+
*
|
|
87
|
+
* @summary Update a notification\'s settings
|
|
88
|
+
* @param {string} notificationId The notification ID
|
|
89
|
+
* @param {NotificationPatchRequest} notificationPatchRequest
|
|
90
|
+
* @param {*} [options] Override http request option.
|
|
91
|
+
* @throws {RequiredError}
|
|
92
|
+
* @memberof TypesApiInterface
|
|
93
|
+
*/
|
|
94
|
+
updateNotificationTypeRaw(requestParameters: UpdateNotificationTypeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Notification>>;
|
|
95
|
+
/**
|
|
96
|
+
* Update a notification\'s settings
|
|
97
|
+
*/
|
|
98
|
+
updateNotificationType(notificationId: string, notificationPatchRequest: NotificationPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Notification>;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
*
|
|
102
|
+
*/
|
|
103
|
+
export declare class TypesApi extends runtime.BaseAPI implements TypesApiInterface {
|
|
104
|
+
/**
|
|
105
|
+
* Create a new notification
|
|
106
|
+
*/
|
|
107
|
+
createNotificationTypeRaw(requestParameters: CreateNotificationTypeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Notification>>;
|
|
108
|
+
/**
|
|
109
|
+
* Create a new notification
|
|
110
|
+
*/
|
|
111
|
+
createNotificationType(notificationCreateRequest: NotificationCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Notification>;
|
|
112
|
+
/**
|
|
113
|
+
* Delete a notification
|
|
114
|
+
*/
|
|
115
|
+
deleteNotificationTypeRaw(requestParameters: DeleteNotificationTypeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SuccessResponse>>;
|
|
116
|
+
/**
|
|
117
|
+
* Delete a notification
|
|
118
|
+
*/
|
|
119
|
+
deleteNotificationType(notificationId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SuccessResponse>;
|
|
120
|
+
/**
|
|
121
|
+
* Get a specific notification by ID
|
|
122
|
+
*/
|
|
123
|
+
getNotificationTypeRaw(requestParameters: GetNotificationTypeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<GetNotificationsResponseInner>>>;
|
|
124
|
+
/**
|
|
125
|
+
* Get a specific notification by ID
|
|
126
|
+
*/
|
|
127
|
+
getNotificationType(notificationId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<GetNotificationsResponseInner>>;
|
|
128
|
+
/**
|
|
129
|
+
* Get all notifications for an account with their templates
|
|
130
|
+
*/
|
|
131
|
+
listNotificationTypesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<GetNotificationsResponseInner>>>;
|
|
132
|
+
/**
|
|
133
|
+
* Get all notifications for an account with their templates
|
|
134
|
+
*/
|
|
135
|
+
listNotificationTypes(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<GetNotificationsResponseInner>>;
|
|
136
|
+
/**
|
|
137
|
+
* Update a notification\'s settings
|
|
138
|
+
*/
|
|
139
|
+
updateNotificationTypeRaw(requestParameters: UpdateNotificationTypeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Notification>>;
|
|
140
|
+
/**
|
|
141
|
+
* Update a notification\'s settings
|
|
142
|
+
*/
|
|
143
|
+
updateNotificationType(notificationId: string, notificationPatchRequest: NotificationPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Notification>;
|
|
144
|
+
}
|