@trycourier/courier 6.1.1 → 6.1.3
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/Client.d.ts +31 -2
- package/Client.js +35 -6
- package/api/client/requests/SendMessageRequest.d.ts +28 -1
- package/api/client/requests/index.d.ts +1 -1
- package/api/resources/audiences/client/Client.d.ts +47 -1
- package/api/resources/audiences/client/Client.js +68 -12
- package/api/resources/audiences/client/requests/AudienceMembersListParams.d.ts +6 -0
- package/api/resources/audiences/client/requests/AudienceUpdateParams.d.ts +13 -1
- package/api/resources/audiences/client/requests/AudiencesListParams.d.ts +6 -0
- package/api/resources/audiences/client/requests/index.d.ts +3 -3
- package/api/resources/audiences/types/Audience.d.ts +1 -1
- package/api/resources/audiences/types/AudienceListResponse.d.ts +1 -1
- package/api/resources/audiences/types/AudienceMemberGetResponse.d.ts +1 -1
- package/api/resources/audiences/types/AudienceMemberListResponse.d.ts +1 -1
- package/api/resources/audiences/types/AudienceUpdateResponse.d.ts +1 -1
- package/api/resources/audiences/types/BaseFilterConfig.d.ts +1 -1
- package/api/resources/audiences/types/Filter.d.ts +1 -1
- package/api/resources/audiences/types/FilterConfig.d.ts +1 -1
- package/api/resources/audiences/types/NestedFilterConfig.d.ts +1 -1
- package/api/resources/audiences/types/Operator.d.ts +1 -1
- package/api/resources/audiences/types/SingleFilterConfig.d.ts +1 -1
- package/api/resources/auditEvents/client/Client.d.ts +15 -1
- package/api/resources/auditEvents/client/Client.js +23 -5
- package/api/resources/auditEvents/client/requests/ListAuditEventsRequest.d.ts +6 -0
- package/api/resources/auditEvents/client/requests/index.d.ts +1 -1
- package/api/resources/auditEvents/types/AuditEvent.d.ts +1 -1
- package/api/resources/auditEvents/types/ListAuditEventsResponse.d.ts +1 -1
- package/api/resources/authTokens/client/Client.d.ts +11 -2
- package/api/resources/authTokens/client/Client.js +15 -6
- package/api/resources/authTokens/client/requests/IssueTokenParams.d.ts +7 -0
- package/api/resources/authTokens/client/requests/index.d.ts +1 -1
- package/api/resources/automations/client/Client.d.ts +31 -3
- package/api/resources/automations/client/Client.js +40 -12
- package/api/resources/automations/types/Automation.d.ts +1 -1
- package/api/resources/automations/types/AutomationAdHocInvokeParams.d.ts +1 -1
- package/api/resources/automations/types/AutomationAddToBatchRetain.d.ts +1 -1
- package/api/resources/automations/types/AutomationAddToBatchStep.d.ts +1 -1
- package/api/resources/automations/types/AutomationAddToDigestStep.d.ts +1 -1
- package/api/resources/automations/types/AutomationCancelStep.d.ts +1 -1
- package/api/resources/automations/types/AutomationDelayStep.d.ts +1 -1
- package/api/resources/automations/types/AutomationFetchDataStep.d.ts +1 -1
- package/api/resources/automations/types/AutomationFetchDataWebhook.d.ts +1 -1
- package/api/resources/automations/types/AutomationInvokeParams.d.ts +1 -1
- package/api/resources/automations/types/AutomationInvokeStep.d.ts +1 -1
- package/api/resources/automations/types/AutomationInvokeTemplateParams.d.ts +1 -1
- package/api/resources/automations/types/AutomationRunContext.d.ts +1 -1
- package/api/resources/automations/types/AutomationSendListStep.d.ts +1 -1
- package/api/resources/automations/types/AutomationSendStep.d.ts +1 -1
- package/api/resources/automations/types/AutomationStepOption.d.ts +1 -1
- package/api/resources/automations/types/AutomationThrottleStep.d.ts +1 -1
- package/api/resources/automations/types/AutomationUpdateProfileStep.d.ts +1 -1
- package/api/resources/automations/types/AutomationV2SendStep.d.ts +1 -1
- package/api/resources/brands/client/Client.d.ts +57 -2
- package/api/resources/brands/client/Client.js +77 -14
- package/api/resources/brands/client/requests/BrandUpdateParameters.d.ts +21 -1
- package/api/resources/brands/client/requests/ListBrandsRequest.d.ts +6 -0
- package/api/resources/brands/client/requests/index.d.ts +2 -2
- package/api/resources/brands/types/Brand.d.ts +1 -1
- package/api/resources/brands/types/BrandGetAllResponse.d.ts +1 -1
- package/api/resources/brands/types/BrandParameters.d.ts +1 -1
- package/api/resources/brands/types/BrandSettings.d.ts +1 -1
- package/api/resources/brands/types/BrandSnippets.d.ts +1 -1
- package/api/resources/brands/types/BrandsResponse.d.ts +1 -1
- package/api/resources/bulk/client/Client.d.ts +67 -2
- package/api/resources/bulk/client/Client.js +90 -21
- package/api/resources/bulk/client/requests/BulkCreateJobParams.d.ts +24 -1
- package/api/resources/bulk/client/requests/index.d.ts +1 -1
- package/api/resources/bulk/types/BulkGetJobResponse.d.ts +1 -1
- package/api/resources/bulk/types/BulkGetJobUsersResponse.d.ts +1 -1
- package/api/resources/bulk/types/BulkIngestUsersParams.d.ts +1 -1
- package/api/resources/bulk/types/BulkIngestUsersResponse.d.ts +1 -1
- package/api/resources/bulk/types/BulkMessageUserResponse.d.ts +1 -1
- package/api/resources/bulk/types/InboundBulkContentMessage.d.ts +1 -1
- package/api/resources/bulk/types/InboundBulkMessage.d.ts +1 -1
- package/api/resources/bulk/types/InboundBulkMessageUser.d.ts +1 -1
- package/api/resources/bulk/types/InboundBulkMessageV2.d.ts +1 -1
- package/api/resources/bulk/types/InboundBulkTemplateMessage.d.ts +1 -1
- package/api/resources/bulk/types/JobDetails.d.ts +1 -1
- package/api/resources/commons/errors/AlreadyExistsError.d.ts +2 -2
- package/api/resources/commons/errors/AlreadyExistsError.js +1 -1
- package/api/resources/commons/errors/BadRequestError.d.ts +2 -2
- package/api/resources/commons/errors/BadRequestError.js +1 -1
- package/api/resources/commons/errors/ConflictError.d.ts +2 -2
- package/api/resources/commons/errors/ConflictError.js +1 -1
- package/api/resources/commons/errors/MessageNotFoundError.d.ts +2 -2
- package/api/resources/commons/errors/MessageNotFoundError.js +1 -1
- package/api/resources/commons/errors/NotFoundError.d.ts +2 -2
- package/api/resources/commons/errors/NotFoundError.js +1 -1
- package/api/resources/commons/errors/PaymentRequiredError.d.ts +2 -2
- package/api/resources/commons/errors/PaymentRequiredError.js +1 -1
- package/api/resources/commons/types/AlreadyExists.d.ts +1 -1
- package/api/resources/commons/types/BadRequest.d.ts +1 -1
- package/api/resources/commons/types/ChannelPreference.d.ts +1 -1
- package/api/resources/commons/types/Conflict.d.ts +1 -1
- package/api/resources/commons/types/MessageNotFound.d.ts +1 -1
- package/api/resources/commons/types/NotFound.d.ts +1 -1
- package/api/resources/commons/types/NotificationPreferenceDetails.d.ts +1 -1
- package/api/resources/commons/types/NotificationPreferences.d.ts +1 -1
- package/api/resources/commons/types/PaymentRequired.d.ts +1 -1
- package/api/resources/commons/types/RecipientPreferences.d.ts +1 -1
- package/api/resources/commons/types/UserTenantAssociation.d.ts +4 -3
- package/api/resources/lists/client/Client.d.ts +197 -4
- package/api/resources/lists/client/Client.js +236 -25
- package/api/resources/lists/client/requests/AddSubscribersToList.d.ts +41 -0
- package/api/resources/lists/client/requests/AddSubscribersToList.js +5 -0
- package/api/resources/lists/client/requests/GetAllListsRequest.d.ts +7 -0
- package/api/resources/lists/client/requests/GetSubscriptionForListRequest.d.ts +6 -0
- package/api/resources/lists/client/requests/SubscribeUserToListRequest.d.ts +32 -1
- package/api/resources/lists/client/requests/SubscribeUsersToListRequest.d.ts +41 -0
- package/api/resources/lists/client/requests/SubscribeUsersToListRequest.js +5 -0
- package/api/resources/lists/client/requests/index.d.ts +5 -3
- package/api/resources/lists/types/ListGetAllResponse.d.ts +1 -1
- package/api/resources/lists/types/ListGetSubscriptionsResponse.d.ts +1 -1
- package/api/resources/lists/types/ListPutParams.d.ts +1 -1
- package/api/resources/lists/types/ListSubscriptionRecipient.d.ts +1 -1
- package/api/resources/lists/types/PutSubscriptionsRecipient.d.ts +1 -1
- package/api/resources/messages/client/Client.d.ts +59 -2
- package/api/resources/messages/client/Client.js +89 -28
- package/api/resources/messages/client/requests/GetMessageHistoryRequest.d.ts +6 -0
- package/api/resources/messages/client/requests/ListMessagesRequest.d.ts +19 -8
- package/api/resources/messages/client/requests/index.d.ts +2 -2
- package/api/resources/messages/types/ListMessagesResponse.d.ts +1 -1
- package/api/resources/messages/types/MessageDetails.d.ts +1 -1
- package/api/resources/messages/types/MessageHistoryResponse.d.ts +1 -2
- package/api/resources/messages/types/RenderOutput.d.ts +1 -1
- package/api/resources/messages/types/RenderOutputResponse.d.ts +1 -1
- package/api/resources/messages/types/RenderedMessageContent.d.ts +1 -1
- package/api/resources/notifications/client/Client.d.ts +113 -1
- package/api/resources/notifications/client/Client.js +145 -17
- package/api/resources/notifications/client/requests/NotificationDraftUpdateVariationsParams.d.ts +26 -1
- package/api/resources/notifications/client/requests/NotificationListParams.d.ts +6 -0
- package/api/resources/notifications/client/requests/NotificationUpdateVariationsParams.d.ts +26 -1
- package/api/resources/notifications/client/requests/SubmissionChecksReplaceParams.d.ts +11 -1
- package/api/resources/notifications/client/requests/index.d.ts +4 -4
- package/api/resources/notifications/types/BaseCheck.d.ts +1 -1
- package/api/resources/notifications/types/Check.d.ts +1 -1
- package/api/resources/notifications/types/MessageRouting.d.ts +1 -1
- package/api/resources/notifications/types/MessageRoutingChannel.d.ts +1 -1
- package/api/resources/notifications/types/Notification.d.ts +5 -1
- package/api/resources/notifications/types/NotificationBlock.d.ts +1 -1
- package/api/resources/notifications/types/NotificationChannel.d.ts +1 -1
- package/api/resources/notifications/types/NotificationContent.d.ts +1 -1
- package/api/resources/notifications/types/NotificationGetContentResponse.d.ts +1 -1
- package/api/resources/notifications/types/NotificationListResponse.d.ts +1 -1
- package/api/resources/notifications/types/NotificationTag.d.ts +7 -0
- package/api/resources/notifications/types/NotificationTag.js +5 -0
- package/api/resources/notifications/types/NotificationTagData.d.ts +7 -0
- package/api/resources/notifications/types/NotificationTagData.js +5 -0
- package/api/resources/notifications/types/SubmissionChecksGetResponse.d.ts +1 -1
- package/api/resources/notifications/types/SubmissionChecksReplaceResponse.d.ts +1 -1
- package/api/resources/notifications/types/index.d.ts +2 -0
- package/api/resources/notifications/types/index.js +2 -0
- package/api/resources/profiles/client/Client.d.ts +71 -2
- package/api/resources/profiles/client/Client.js +102 -23
- package/api/resources/profiles/client/requests/GetListSubscriptionsRequest.d.ts +6 -0
- package/api/resources/profiles/client/requests/MergeProfileRequest.d.ts +10 -0
- package/api/resources/profiles/client/requests/ReplaceProfileRequest.d.ts +10 -0
- package/api/resources/profiles/client/requests/index.d.ts +3 -3
- package/api/resources/profiles/types/AirshipProfile.d.ts +1 -1
- package/api/resources/profiles/types/Discord.d.ts +1 -1
- package/api/resources/profiles/types/Expo.d.ts +1 -1
- package/api/resources/profiles/types/GetListSubscriptionsList.d.ts +1 -1
- package/api/resources/profiles/types/GetListSubscriptionsResponse.d.ts +1 -1
- package/api/resources/profiles/types/Intercom.d.ts +1 -1
- package/api/resources/profiles/types/MsTeams.d.ts +1 -1
- package/api/resources/profiles/types/MultipleTokens.d.ts +1 -1
- package/api/resources/profiles/types/ProfileGetResponse.d.ts +1 -1
- package/api/resources/profiles/types/SendToMsTeamsChannelId.d.ts +1 -1
- package/api/resources/profiles/types/SendToMsTeamsChannelName.d.ts +1 -1
- package/api/resources/profiles/types/SendToMsTeamsConversationId.d.ts +1 -1
- package/api/resources/profiles/types/SendToMsTeamsEmail.d.ts +1 -1
- package/api/resources/profiles/types/SendToMsTeamsUserId.d.ts +1 -1
- package/api/resources/profiles/types/SendToSlackChannel.d.ts +1 -1
- package/api/resources/profiles/types/SendToSlackEmail.d.ts +1 -1
- package/api/resources/profiles/types/SendToSlackUserId.d.ts +1 -1
- package/api/resources/profiles/types/Slack.d.ts +1 -1
- package/api/resources/profiles/types/SnoozeRule.d.ts +1 -1
- package/api/resources/profiles/types/SubscribeToListsRequest.d.ts +1 -1
- package/api/resources/profiles/types/SubscribeToListsRequestListObject.d.ts +1 -1
- package/api/resources/profiles/types/UserProfile.d.ts +1 -1
- package/api/resources/send/types/AudienceRecipient.d.ts +1 -1
- package/api/resources/send/types/BaseMessage.d.ts +1 -1
- package/api/resources/send/types/BaseMessageSendTo.d.ts +1 -1
- package/api/resources/send/types/BrandSettingsEmail.d.ts +1 -1
- package/api/resources/send/types/BrandSettingsInApp.d.ts +1 -1
- package/api/resources/send/types/BrandSettingsSocialPresence.d.ts +1 -1
- package/api/resources/send/types/BrandTemplateOverride.d.ts +1 -1
- package/api/resources/send/types/Channel.d.ts +1 -1
- package/api/resources/send/types/ChannelMetadata.d.ts +1 -1
- package/api/resources/send/types/Content.d.ts +1 -1
- package/api/resources/send/types/ContentMessage.d.ts +1 -1
- package/api/resources/send/types/ElementalActionNode.d.ts +1 -1
- package/api/resources/send/types/ElementalChannelNode.d.ts +1 -1
- package/api/resources/send/types/ElementalContent.d.ts +1 -1
- package/api/resources/send/types/ElementalDividerNode.d.ts +1 -1
- package/api/resources/send/types/ElementalGroupNode.d.ts +1 -1
- package/api/resources/send/types/ElementalImageNode.d.ts +1 -1
- package/api/resources/send/types/ElementalMetaNode.d.ts +1 -1
- package/api/resources/send/types/ElementalNode.d.ts +1 -1
- package/api/resources/send/types/ElementalQuoteNode.d.ts +1 -1
- package/api/resources/send/types/ElementalTextNode.d.ts +1 -1
- package/api/resources/send/types/EmailHeader.d.ts +1 -1
- package/api/resources/send/types/Expiry.d.ts +1 -1
- package/api/resources/send/types/IPreferences.d.ts +1 -1
- package/api/resources/send/types/IProfilePreferences.d.ts +1 -1
- package/api/resources/send/types/ListPatternRecipient.d.ts +1 -1
- package/api/resources/send/types/ListRecipient.d.ts +1 -1
- package/api/resources/send/types/Locales.d.ts +1 -1
- package/api/resources/send/types/Message.d.ts +1 -1
- package/api/resources/send/types/MessageChannelEmailOverride.d.ts +1 -1
- package/api/resources/send/types/MessageChannels.d.ts +1 -1
- package/api/resources/send/types/MessageMetadata.d.ts +1 -1
- package/api/resources/send/types/MessageProviders.d.ts +1 -1
- package/api/resources/send/types/MessageProvidersType.d.ts +1 -1
- package/api/resources/send/types/MessageRecipient.d.ts +1 -1
- package/api/resources/send/types/Metadata.d.ts +1 -1
- package/api/resources/send/types/MsTeamsRecipient.d.ts +1 -1
- package/api/resources/send/types/Preference.d.ts +1 -1
- package/api/resources/send/types/Recipient.d.ts +1 -1
- package/api/resources/send/types/Routing.d.ts +1 -1
- package/api/resources/send/types/RoutingChannel.d.ts +1 -1
- package/api/resources/send/types/RoutingStrategyChannel.d.ts +1 -1
- package/api/resources/send/types/RoutingStrategyProvider.d.ts +1 -1
- package/api/resources/send/types/SlackRecipient.d.ts +1 -1
- package/api/resources/send/types/TemplateMessage.d.ts +1 -1
- package/api/resources/send/types/Timeout.d.ts +1 -1
- package/api/resources/send/types/UserRecipient.d.ts +1 -1
- package/api/resources/templates/client/Client.d.ts +9 -1
- package/api/resources/templates/client/Client.js +13 -3
- package/api/resources/templates/client/requests/ListTemplatesRequest.d.ts +6 -0
- package/api/resources/templates/client/requests/index.d.ts +1 -1
- package/api/resources/templates/types/ListTemplatesResponse.d.ts +1 -1
- package/api/resources/templates/types/NotificationTemplates.d.ts +1 -1
- package/api/resources/templates/types/RoutingStrategy.d.ts +1 -1
- package/api/resources/templates/types/Tag.d.ts +1 -1
- package/api/resources/tenants/client/Client.d.ts +82 -1
- package/api/resources/tenants/client/Client.js +190 -13
- package/api/resources/tenants/client/requests/ListTenantParams.d.ts +13 -1
- package/api/resources/tenants/client/requests/ListUsersForTenantParams.d.ts +7 -0
- package/api/resources/tenants/client/requests/TenantCreateOrReplaceParams.d.ts +23 -2
- package/api/resources/tenants/client/requests/index.d.ts +3 -3
- package/api/resources/tenants/types/DefaultPreferences.d.ts +2 -2
- package/api/resources/tenants/types/ListUsersForTenantResponse.d.ts +1 -1
- package/api/resources/tenants/types/SubscriptionTopic.d.ts +2 -3
- package/api/resources/tenants/types/SubscriptionTopicNew.d.ts +11 -0
- package/api/resources/tenants/types/SubscriptionTopicNew.js +5 -0
- package/api/resources/tenants/types/TemplateProperty.d.ts +3 -0
- package/api/resources/tenants/types/Tenant.d.ts +2 -2
- package/api/resources/tenants/types/TenantListResponse.d.ts +1 -1
- package/api/resources/tenants/types/index.d.ts +1 -0
- package/api/resources/tenants/types/index.js +1 -0
- package/api/resources/translations/client/Client.d.ts +17 -0
- package/api/resources/translations/client/Client.js +28 -7
- package/api/resources/users/resources/preferences/client/Client.d.ts +22 -1
- package/api/resources/users/resources/preferences/client/Client.js +36 -9
- package/api/resources/users/resources/preferences/client/requests/UserPreferencesUpdateParams.d.ts +1 -1
- package/api/resources/users/resources/preferences/client/requests/index.d.ts +1 -1
- package/api/resources/users/resources/preferences/types/TopicPreference.d.ts +1 -1
- package/api/resources/users/resources/preferences/types/TopicPreferenceUpdate.d.ts +1 -1
- package/api/resources/users/resources/preferences/types/UserPreferencesGetResponse.d.ts +1 -1
- package/api/resources/users/resources/preferences/types/UserPreferencesListResponse.d.ts +1 -1
- package/api/resources/users/resources/tenants/client/Client.d.ts +57 -2
- package/api/resources/users/resources/tenants/client/Client.js +78 -13
- package/api/resources/users/resources/tenants/client/requests/AddUserToMultipleTenantsParams.d.ts +16 -1
- package/api/resources/users/resources/tenants/client/requests/AddUserToSingleTenantsParams.d.ts +11 -2
- package/api/resources/users/resources/tenants/client/requests/ListTenantsForUserParams.d.ts +7 -0
- package/api/resources/users/resources/tenants/client/requests/index.d.ts +3 -3
- package/api/resources/users/resources/tenants/types/AddUserToSingleTenantsParamsProfile.d.ts +3 -0
- package/api/resources/users/resources/tenants/types/ListTenantsForUserResponse.d.ts +1 -1
- package/api/resources/users/resources/tokens/client/Client.d.ts +73 -1
- package/api/resources/users/resources/tokens/client/Client.js +136 -13
- package/api/resources/users/resources/tokens/types/GetAllTokensResponse.d.ts +1 -1
- package/api/resources/users/resources/tokens/types/GetUserTokenResponse.d.ts +1 -1
- package/api/resources/users/resources/tokens/types/PatchUserTokenOpts.d.ts +1 -1
- package/api/resources/users/resources/tokens/types/PutUserTokenOpts.d.ts +1 -1
- package/api/resources/users/resources/tokens/types/PutUserTokensOpts.d.ts +1 -1
- package/api/resources/users/resources/tokens/types/UserToken.d.ts +1 -1
- package/core/fetcher/Fetcher.d.ts +2 -2
- package/core/fetcher/Fetcher.js +60 -6
- package/core/index.d.ts +1 -0
- package/core/index.js +1 -0
- package/core/runtime/index.d.ts +1 -0
- package/core/runtime/index.js +5 -0
- package/core/runtime/runtime.d.ts +8 -0
- package/core/runtime/runtime.js +82 -0
- package/dist/Client.d.ts +31 -2
- package/dist/Client.js +35 -6
- package/dist/api/client/requests/SendMessageRequest.d.ts +28 -1
- package/dist/api/client/requests/index.d.ts +1 -1
- package/dist/api/resources/audiences/client/Client.d.ts +47 -1
- package/dist/api/resources/audiences/client/Client.js +68 -12
- package/dist/api/resources/audiences/client/requests/AudienceMembersListParams.d.ts +6 -0
- package/dist/api/resources/audiences/client/requests/AudienceUpdateParams.d.ts +13 -1
- package/dist/api/resources/audiences/client/requests/AudiencesListParams.d.ts +6 -0
- package/dist/api/resources/audiences/client/requests/index.d.ts +3 -3
- package/dist/api/resources/audiences/types/Audience.d.ts +1 -1
- package/dist/api/resources/audiences/types/AudienceListResponse.d.ts +1 -1
- package/dist/api/resources/audiences/types/AudienceMemberGetResponse.d.ts +1 -1
- package/dist/api/resources/audiences/types/AudienceMemberListResponse.d.ts +1 -1
- package/dist/api/resources/audiences/types/AudienceUpdateResponse.d.ts +1 -1
- package/dist/api/resources/audiences/types/BaseFilterConfig.d.ts +1 -1
- package/dist/api/resources/audiences/types/Filter.d.ts +1 -1
- package/dist/api/resources/audiences/types/FilterConfig.d.ts +1 -1
- package/dist/api/resources/audiences/types/NestedFilterConfig.d.ts +1 -1
- package/dist/api/resources/audiences/types/Operator.d.ts +1 -1
- package/dist/api/resources/audiences/types/SingleFilterConfig.d.ts +1 -1
- package/dist/api/resources/auditEvents/client/Client.d.ts +15 -1
- package/dist/api/resources/auditEvents/client/Client.js +23 -5
- package/dist/api/resources/auditEvents/client/requests/ListAuditEventsRequest.d.ts +6 -0
- package/dist/api/resources/auditEvents/client/requests/index.d.ts +1 -1
- package/dist/api/resources/auditEvents/types/AuditEvent.d.ts +1 -1
- package/dist/api/resources/auditEvents/types/ListAuditEventsResponse.d.ts +1 -1
- package/dist/api/resources/authTokens/client/Client.d.ts +11 -2
- package/dist/api/resources/authTokens/client/Client.js +15 -6
- package/dist/api/resources/authTokens/client/requests/IssueTokenParams.d.ts +7 -0
- package/dist/api/resources/authTokens/client/requests/index.d.ts +1 -1
- package/dist/api/resources/automations/client/Client.d.ts +31 -3
- package/dist/api/resources/automations/client/Client.js +40 -12
- package/dist/api/resources/automations/types/Automation.d.ts +1 -1
- package/dist/api/resources/automations/types/AutomationAdHocInvokeParams.d.ts +1 -1
- package/dist/api/resources/automations/types/AutomationAddToBatchRetain.d.ts +1 -1
- package/dist/api/resources/automations/types/AutomationAddToBatchStep.d.ts +1 -1
- package/dist/api/resources/automations/types/AutomationAddToDigestStep.d.ts +1 -1
- package/dist/api/resources/automations/types/AutomationCancelStep.d.ts +1 -1
- package/dist/api/resources/automations/types/AutomationDelayStep.d.ts +1 -1
- package/dist/api/resources/automations/types/AutomationFetchDataStep.d.ts +1 -1
- package/dist/api/resources/automations/types/AutomationFetchDataWebhook.d.ts +1 -1
- package/dist/api/resources/automations/types/AutomationInvokeParams.d.ts +1 -1
- package/dist/api/resources/automations/types/AutomationInvokeStep.d.ts +1 -1
- package/dist/api/resources/automations/types/AutomationInvokeTemplateParams.d.ts +1 -1
- package/dist/api/resources/automations/types/AutomationRunContext.d.ts +1 -1
- package/dist/api/resources/automations/types/AutomationSendListStep.d.ts +1 -1
- package/dist/api/resources/automations/types/AutomationSendStep.d.ts +1 -1
- package/dist/api/resources/automations/types/AutomationStepOption.d.ts +1 -1
- package/dist/api/resources/automations/types/AutomationThrottleStep.d.ts +1 -1
- package/dist/api/resources/automations/types/AutomationUpdateProfileStep.d.ts +1 -1
- package/dist/api/resources/automations/types/AutomationV2SendStep.d.ts +1 -1
- package/dist/api/resources/brands/client/Client.d.ts +57 -2
- package/dist/api/resources/brands/client/Client.js +77 -14
- package/dist/api/resources/brands/client/requests/BrandUpdateParameters.d.ts +21 -1
- package/dist/api/resources/brands/client/requests/ListBrandsRequest.d.ts +6 -0
- package/dist/api/resources/brands/client/requests/index.d.ts +2 -2
- package/dist/api/resources/brands/types/Brand.d.ts +1 -1
- package/dist/api/resources/brands/types/BrandGetAllResponse.d.ts +1 -1
- package/dist/api/resources/brands/types/BrandParameters.d.ts +1 -1
- package/dist/api/resources/brands/types/BrandSettings.d.ts +1 -1
- package/dist/api/resources/brands/types/BrandSnippets.d.ts +1 -1
- package/dist/api/resources/brands/types/BrandsResponse.d.ts +1 -1
- package/dist/api/resources/bulk/client/Client.d.ts +67 -2
- package/dist/api/resources/bulk/client/Client.js +90 -21
- package/dist/api/resources/bulk/client/requests/BulkCreateJobParams.d.ts +24 -1
- package/dist/api/resources/bulk/client/requests/index.d.ts +1 -1
- package/dist/api/resources/bulk/types/BulkGetJobResponse.d.ts +1 -1
- package/dist/api/resources/bulk/types/BulkGetJobUsersResponse.d.ts +1 -1
- package/dist/api/resources/bulk/types/BulkIngestUsersParams.d.ts +1 -1
- package/dist/api/resources/bulk/types/BulkIngestUsersResponse.d.ts +1 -1
- package/dist/api/resources/bulk/types/BulkMessageUserResponse.d.ts +1 -1
- package/dist/api/resources/bulk/types/InboundBulkContentMessage.d.ts +1 -1
- package/dist/api/resources/bulk/types/InboundBulkMessage.d.ts +1 -1
- package/dist/api/resources/bulk/types/InboundBulkMessageUser.d.ts +1 -1
- package/dist/api/resources/bulk/types/InboundBulkMessageV2.d.ts +1 -1
- package/dist/api/resources/bulk/types/InboundBulkTemplateMessage.d.ts +1 -1
- package/dist/api/resources/bulk/types/JobDetails.d.ts +1 -1
- package/dist/api/resources/commons/errors/AlreadyExistsError.d.ts +2 -2
- package/dist/api/resources/commons/errors/AlreadyExistsError.js +1 -1
- package/dist/api/resources/commons/errors/BadRequestError.d.ts +2 -2
- package/dist/api/resources/commons/errors/BadRequestError.js +1 -1
- package/dist/api/resources/commons/errors/ConflictError.d.ts +2 -2
- package/dist/api/resources/commons/errors/ConflictError.js +1 -1
- package/dist/api/resources/commons/errors/MessageNotFoundError.d.ts +2 -2
- package/dist/api/resources/commons/errors/MessageNotFoundError.js +1 -1
- package/dist/api/resources/commons/errors/NotFoundError.d.ts +2 -2
- package/dist/api/resources/commons/errors/NotFoundError.js +1 -1
- package/dist/api/resources/commons/errors/PaymentRequiredError.d.ts +2 -2
- package/dist/api/resources/commons/errors/PaymentRequiredError.js +1 -1
- package/dist/api/resources/commons/types/AlreadyExists.d.ts +1 -1
- package/dist/api/resources/commons/types/BadRequest.d.ts +1 -1
- package/dist/api/resources/commons/types/ChannelPreference.d.ts +1 -1
- package/dist/api/resources/commons/types/Conflict.d.ts +1 -1
- package/dist/api/resources/commons/types/MessageNotFound.d.ts +1 -1
- package/dist/api/resources/commons/types/NotFound.d.ts +1 -1
- package/dist/api/resources/commons/types/NotificationPreferenceDetails.d.ts +1 -1
- package/dist/api/resources/commons/types/NotificationPreferences.d.ts +1 -1
- package/dist/api/resources/commons/types/PaymentRequired.d.ts +1 -1
- package/dist/api/resources/commons/types/RecipientPreferences.d.ts +1 -1
- package/dist/api/resources/commons/types/UserTenantAssociation.d.ts +4 -3
- package/dist/api/resources/lists/client/Client.d.ts +197 -4
- package/dist/api/resources/lists/client/Client.js +236 -25
- package/dist/api/resources/lists/client/requests/AddSubscribersToList.d.ts +41 -0
- package/dist/api/resources/lists/client/requests/AddSubscribersToList.js +5 -0
- package/dist/api/resources/lists/client/requests/GetAllListsRequest.d.ts +7 -0
- package/dist/api/resources/lists/client/requests/GetSubscriptionForListRequest.d.ts +6 -0
- package/dist/api/resources/lists/client/requests/SubscribeUserToListRequest.d.ts +32 -1
- package/dist/api/resources/lists/client/requests/SubscribeUsersToListRequest.d.ts +41 -0
- package/dist/api/resources/lists/client/requests/SubscribeUsersToListRequest.js +5 -0
- package/dist/api/resources/lists/client/requests/index.d.ts +5 -3
- package/dist/api/resources/lists/types/ListGetAllResponse.d.ts +1 -1
- package/dist/api/resources/lists/types/ListGetSubscriptionsResponse.d.ts +1 -1
- package/dist/api/resources/lists/types/ListPutParams.d.ts +1 -1
- package/dist/api/resources/lists/types/ListSubscriptionRecipient.d.ts +1 -1
- package/dist/api/resources/lists/types/PutSubscriptionsRecipient.d.ts +1 -1
- package/dist/api/resources/messages/client/Client.d.ts +59 -2
- package/dist/api/resources/messages/client/Client.js +89 -28
- package/dist/api/resources/messages/client/requests/GetMessageHistoryRequest.d.ts +6 -0
- package/dist/api/resources/messages/client/requests/ListMessagesRequest.d.ts +19 -8
- package/dist/api/resources/messages/client/requests/index.d.ts +2 -2
- package/dist/api/resources/messages/types/ListMessagesResponse.d.ts +1 -1
- package/dist/api/resources/messages/types/MessageDetails.d.ts +1 -1
- package/dist/api/resources/messages/types/MessageHistoryResponse.d.ts +1 -2
- package/dist/api/resources/messages/types/RenderOutput.d.ts +1 -1
- package/dist/api/resources/messages/types/RenderOutputResponse.d.ts +1 -1
- package/dist/api/resources/messages/types/RenderedMessageContent.d.ts +1 -1
- package/dist/api/resources/notifications/client/Client.d.ts +113 -1
- package/dist/api/resources/notifications/client/Client.js +145 -17
- package/dist/api/resources/notifications/client/requests/NotificationDraftUpdateVariationsParams.d.ts +26 -1
- package/dist/api/resources/notifications/client/requests/NotificationListParams.d.ts +6 -0
- package/dist/api/resources/notifications/client/requests/NotificationUpdateVariationsParams.d.ts +26 -1
- package/dist/api/resources/notifications/client/requests/SubmissionChecksReplaceParams.d.ts +11 -1
- package/dist/api/resources/notifications/client/requests/index.d.ts +4 -4
- package/dist/api/resources/notifications/types/BaseCheck.d.ts +1 -1
- package/dist/api/resources/notifications/types/Check.d.ts +1 -1
- package/dist/api/resources/notifications/types/MessageRouting.d.ts +1 -1
- package/dist/api/resources/notifications/types/MessageRoutingChannel.d.ts +1 -1
- package/dist/api/resources/notifications/types/Notification.d.ts +5 -1
- package/dist/api/resources/notifications/types/NotificationBlock.d.ts +1 -1
- package/dist/api/resources/notifications/types/NotificationChannel.d.ts +1 -1
- package/dist/api/resources/notifications/types/NotificationContent.d.ts +1 -1
- package/dist/api/resources/notifications/types/NotificationGetContentResponse.d.ts +1 -1
- package/dist/api/resources/notifications/types/NotificationListResponse.d.ts +1 -1
- package/dist/api/resources/notifications/types/NotificationTag.d.ts +7 -0
- package/dist/api/resources/notifications/types/NotificationTag.js +5 -0
- package/dist/api/resources/notifications/types/NotificationTagData.d.ts +7 -0
- package/dist/api/resources/notifications/types/NotificationTagData.js +5 -0
- package/dist/api/resources/notifications/types/SubmissionChecksGetResponse.d.ts +1 -1
- package/dist/api/resources/notifications/types/SubmissionChecksReplaceResponse.d.ts +1 -1
- package/dist/api/resources/notifications/types/index.d.ts +2 -0
- package/dist/api/resources/notifications/types/index.js +2 -0
- package/dist/api/resources/profiles/client/Client.d.ts +71 -2
- package/dist/api/resources/profiles/client/Client.js +102 -23
- package/dist/api/resources/profiles/client/requests/GetListSubscriptionsRequest.d.ts +6 -0
- package/dist/api/resources/profiles/client/requests/MergeProfileRequest.d.ts +10 -0
- package/dist/api/resources/profiles/client/requests/ReplaceProfileRequest.d.ts +10 -0
- package/dist/api/resources/profiles/client/requests/index.d.ts +3 -3
- package/dist/api/resources/profiles/types/AirshipProfile.d.ts +1 -1
- package/dist/api/resources/profiles/types/Discord.d.ts +1 -1
- package/dist/api/resources/profiles/types/Expo.d.ts +1 -1
- package/dist/api/resources/profiles/types/GetListSubscriptionsList.d.ts +1 -1
- package/dist/api/resources/profiles/types/GetListSubscriptionsResponse.d.ts +1 -1
- package/dist/api/resources/profiles/types/Intercom.d.ts +1 -1
- package/dist/api/resources/profiles/types/MsTeams.d.ts +1 -1
- package/dist/api/resources/profiles/types/MultipleTokens.d.ts +1 -1
- package/dist/api/resources/profiles/types/ProfileGetResponse.d.ts +1 -1
- package/dist/api/resources/profiles/types/SendToMsTeamsChannelId.d.ts +1 -1
- package/dist/api/resources/profiles/types/SendToMsTeamsChannelName.d.ts +1 -1
- package/dist/api/resources/profiles/types/SendToMsTeamsConversationId.d.ts +1 -1
- package/dist/api/resources/profiles/types/SendToMsTeamsEmail.d.ts +1 -1
- package/dist/api/resources/profiles/types/SendToMsTeamsUserId.d.ts +1 -1
- package/dist/api/resources/profiles/types/SendToSlackChannel.d.ts +1 -1
- package/dist/api/resources/profiles/types/SendToSlackEmail.d.ts +1 -1
- package/dist/api/resources/profiles/types/SendToSlackUserId.d.ts +1 -1
- package/dist/api/resources/profiles/types/Slack.d.ts +1 -1
- package/dist/api/resources/profiles/types/SnoozeRule.d.ts +1 -1
- package/dist/api/resources/profiles/types/SubscribeToListsRequest.d.ts +1 -1
- package/dist/api/resources/profiles/types/SubscribeToListsRequestListObject.d.ts +1 -1
- package/dist/api/resources/profiles/types/UserProfile.d.ts +1 -1
- package/dist/api/resources/send/types/AudienceRecipient.d.ts +1 -1
- package/dist/api/resources/send/types/BaseMessage.d.ts +1 -1
- package/dist/api/resources/send/types/BaseMessageSendTo.d.ts +1 -1
- package/dist/api/resources/send/types/BrandSettingsEmail.d.ts +1 -1
- package/dist/api/resources/send/types/BrandSettingsInApp.d.ts +1 -1
- package/dist/api/resources/send/types/BrandSettingsSocialPresence.d.ts +1 -1
- package/dist/api/resources/send/types/BrandTemplateOverride.d.ts +1 -1
- package/dist/api/resources/send/types/Channel.d.ts +1 -1
- package/dist/api/resources/send/types/ChannelMetadata.d.ts +1 -1
- package/dist/api/resources/send/types/Content.d.ts +1 -1
- package/dist/api/resources/send/types/ContentMessage.d.ts +1 -1
- package/dist/api/resources/send/types/ElementalActionNode.d.ts +1 -1
- package/dist/api/resources/send/types/ElementalChannelNode.d.ts +1 -1
- package/dist/api/resources/send/types/ElementalContent.d.ts +1 -1
- package/dist/api/resources/send/types/ElementalDividerNode.d.ts +1 -1
- package/dist/api/resources/send/types/ElementalGroupNode.d.ts +1 -1
- package/dist/api/resources/send/types/ElementalImageNode.d.ts +1 -1
- package/dist/api/resources/send/types/ElementalMetaNode.d.ts +1 -1
- package/dist/api/resources/send/types/ElementalNode.d.ts +1 -1
- package/dist/api/resources/send/types/ElementalQuoteNode.d.ts +1 -1
- package/dist/api/resources/send/types/ElementalTextNode.d.ts +1 -1
- package/dist/api/resources/send/types/EmailHeader.d.ts +1 -1
- package/dist/api/resources/send/types/Expiry.d.ts +1 -1
- package/dist/api/resources/send/types/IPreferences.d.ts +1 -1
- package/dist/api/resources/send/types/IProfilePreferences.d.ts +1 -1
- package/dist/api/resources/send/types/ListPatternRecipient.d.ts +1 -1
- package/dist/api/resources/send/types/ListRecipient.d.ts +1 -1
- package/dist/api/resources/send/types/Locales.d.ts +1 -1
- package/dist/api/resources/send/types/Message.d.ts +1 -1
- package/dist/api/resources/send/types/MessageChannelEmailOverride.d.ts +1 -1
- package/dist/api/resources/send/types/MessageChannels.d.ts +1 -1
- package/dist/api/resources/send/types/MessageMetadata.d.ts +1 -1
- package/dist/api/resources/send/types/MessageProviders.d.ts +1 -1
- package/dist/api/resources/send/types/MessageProvidersType.d.ts +1 -1
- package/dist/api/resources/send/types/MessageRecipient.d.ts +1 -1
- package/dist/api/resources/send/types/Metadata.d.ts +1 -1
- package/dist/api/resources/send/types/MsTeamsRecipient.d.ts +1 -1
- package/dist/api/resources/send/types/Preference.d.ts +1 -1
- package/dist/api/resources/send/types/Recipient.d.ts +1 -1
- package/dist/api/resources/send/types/Routing.d.ts +1 -1
- package/dist/api/resources/send/types/RoutingChannel.d.ts +1 -1
- package/dist/api/resources/send/types/RoutingStrategyChannel.d.ts +1 -1
- package/dist/api/resources/send/types/RoutingStrategyProvider.d.ts +1 -1
- package/dist/api/resources/send/types/SlackRecipient.d.ts +1 -1
- package/dist/api/resources/send/types/TemplateMessage.d.ts +1 -1
- package/dist/api/resources/send/types/Timeout.d.ts +1 -1
- package/dist/api/resources/send/types/UserRecipient.d.ts +1 -1
- package/dist/api/resources/templates/client/Client.d.ts +9 -1
- package/dist/api/resources/templates/client/Client.js +13 -3
- package/dist/api/resources/templates/client/requests/ListTemplatesRequest.d.ts +6 -0
- package/dist/api/resources/templates/client/requests/index.d.ts +1 -1
- package/dist/api/resources/templates/types/ListTemplatesResponse.d.ts +1 -1
- package/dist/api/resources/templates/types/NotificationTemplates.d.ts +1 -1
- package/dist/api/resources/templates/types/RoutingStrategy.d.ts +1 -1
- package/dist/api/resources/templates/types/Tag.d.ts +1 -1
- package/dist/api/resources/tenants/client/Client.d.ts +82 -1
- package/dist/api/resources/tenants/client/Client.js +190 -13
- package/dist/api/resources/tenants/client/requests/ListTenantParams.d.ts +13 -1
- package/dist/api/resources/tenants/client/requests/ListUsersForTenantParams.d.ts +7 -0
- package/dist/api/resources/tenants/client/requests/TenantCreateOrReplaceParams.d.ts +23 -2
- package/dist/api/resources/tenants/client/requests/index.d.ts +3 -3
- package/dist/api/resources/tenants/types/DefaultPreferences.d.ts +2 -2
- package/dist/api/resources/tenants/types/ListUsersForTenantResponse.d.ts +1 -1
- package/dist/api/resources/tenants/types/SubscriptionTopic.d.ts +2 -3
- package/dist/api/resources/tenants/types/SubscriptionTopicNew.d.ts +11 -0
- package/dist/api/resources/tenants/types/SubscriptionTopicNew.js +5 -0
- package/dist/api/resources/tenants/types/TemplateProperty.d.ts +3 -0
- package/dist/api/resources/tenants/types/Tenant.d.ts +2 -2
- package/dist/api/resources/tenants/types/TenantListResponse.d.ts +1 -1
- package/dist/api/resources/tenants/types/index.d.ts +1 -0
- package/dist/api/resources/tenants/types/index.js +1 -0
- package/dist/api/resources/translations/client/Client.d.ts +17 -0
- package/dist/api/resources/translations/client/Client.js +28 -7
- package/dist/api/resources/users/resources/preferences/client/Client.d.ts +22 -1
- package/dist/api/resources/users/resources/preferences/client/Client.js +36 -9
- package/dist/api/resources/users/resources/preferences/client/requests/UserPreferencesUpdateParams.d.ts +1 -1
- package/dist/api/resources/users/resources/preferences/client/requests/index.d.ts +1 -1
- package/dist/api/resources/users/resources/preferences/types/TopicPreference.d.ts +1 -1
- package/dist/api/resources/users/resources/preferences/types/TopicPreferenceUpdate.d.ts +1 -1
- package/dist/api/resources/users/resources/preferences/types/UserPreferencesGetResponse.d.ts +1 -1
- package/dist/api/resources/users/resources/preferences/types/UserPreferencesListResponse.d.ts +1 -1
- package/dist/api/resources/users/resources/tenants/client/Client.d.ts +57 -2
- package/dist/api/resources/users/resources/tenants/client/Client.js +78 -13
- package/dist/api/resources/users/resources/tenants/client/requests/AddUserToMultipleTenantsParams.d.ts +16 -1
- package/dist/api/resources/users/resources/tenants/client/requests/AddUserToSingleTenantsParams.d.ts +11 -2
- package/dist/api/resources/users/resources/tenants/client/requests/ListTenantsForUserParams.d.ts +7 -0
- package/dist/api/resources/users/resources/tenants/client/requests/index.d.ts +3 -3
- package/dist/api/resources/users/resources/tenants/types/AddUserToSingleTenantsParamsProfile.d.ts +3 -0
- package/dist/api/resources/users/resources/tenants/types/ListTenantsForUserResponse.d.ts +1 -1
- package/dist/api/resources/users/resources/tokens/client/Client.d.ts +73 -1
- package/dist/api/resources/users/resources/tokens/client/Client.js +136 -13
- package/dist/api/resources/users/resources/tokens/types/GetAllTokensResponse.d.ts +1 -1
- package/dist/api/resources/users/resources/tokens/types/GetUserTokenResponse.d.ts +1 -1
- package/dist/api/resources/users/resources/tokens/types/PatchUserTokenOpts.d.ts +1 -1
- package/dist/api/resources/users/resources/tokens/types/PutUserTokenOpts.d.ts +1 -1
- package/dist/api/resources/users/resources/tokens/types/PutUserTokensOpts.d.ts +1 -1
- package/dist/api/resources/users/resources/tokens/types/UserToken.d.ts +1 -1
- package/dist/core/fetcher/Fetcher.d.ts +2 -2
- package/dist/core/fetcher/Fetcher.js +60 -6
- package/dist/core/index.d.ts +1 -0
- package/dist/core/index.js +1 -0
- package/dist/core/runtime/index.d.ts +1 -0
- package/dist/core/runtime/index.js +5 -0
- package/dist/core/runtime/runtime.d.ts +8 -0
- package/dist/core/runtime/runtime.js +82 -0
- package/jest.config.js +2 -2
- package/package.json +8 -6
- package/tests/client.test.ts +0 -11
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
import * as Courier from "
|
|
4
|
+
import * as Courier from "../../../index";
|
|
5
5
|
export interface PutSubscriptionsRecipient {
|
|
6
6
|
recipientId: string;
|
|
7
7
|
preferences?: Courier.RecipientPreferences;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as environments from "../../../../environments";
|
|
5
5
|
import * as core from "../../../../core";
|
|
6
|
-
import * as Courier from "
|
|
6
|
+
import * as Courier from "../../../index";
|
|
7
7
|
export declare namespace Messages {
|
|
8
8
|
interface Options {
|
|
9
9
|
environment?: core.Supplier<environments.CourierEnvironment | string>;
|
|
@@ -16,7 +16,7 @@ export declare namespace Messages {
|
|
|
16
16
|
}
|
|
17
17
|
interface IdempotentRequestOptions extends RequestOptions {
|
|
18
18
|
idempotencyKey?: string | undefined;
|
|
19
|
-
idempotencyExpiry?:
|
|
19
|
+
idempotencyExpiry?: string | undefined;
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
export declare class Messages {
|
|
@@ -24,29 +24,86 @@ export declare class Messages {
|
|
|
24
24
|
constructor(_options?: Messages.Options);
|
|
25
25
|
/**
|
|
26
26
|
* Fetch the statuses of messages you've previously sent.
|
|
27
|
+
*
|
|
28
|
+
* @param {Courier.ListMessagesRequest} request
|
|
29
|
+
* @param {Messages.RequestOptions} requestOptions - Request-specific configuration.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* await courier.messages.list({
|
|
33
|
+
* archived: true,
|
|
34
|
+
* cursor: "string",
|
|
35
|
+
* event: "string",
|
|
36
|
+
* list: "string",
|
|
37
|
+
* messageId: "string",
|
|
38
|
+
* notification: "string",
|
|
39
|
+
* provider: "string",
|
|
40
|
+
* recipient: "string",
|
|
41
|
+
* status: "string",
|
|
42
|
+
* tag: "string",
|
|
43
|
+
* tags: "string",
|
|
44
|
+
* tenant_id: "string",
|
|
45
|
+
* enqueued_after: "string",
|
|
46
|
+
* traceId: "string"
|
|
47
|
+
* })
|
|
27
48
|
*/
|
|
28
49
|
list(request?: Courier.ListMessagesRequest, requestOptions?: Messages.RequestOptions): Promise<Courier.ListMessagesResponse>;
|
|
29
50
|
/**
|
|
30
51
|
* Fetch the status of a message you've previously sent.
|
|
52
|
+
*
|
|
53
|
+
* @param {string} messageId - A unique identifier associated with the message you wish to retrieve (results from a send).
|
|
54
|
+
* @param {Messages.RequestOptions} requestOptions - Request-specific configuration.
|
|
55
|
+
*
|
|
31
56
|
* @throws {@link Courier.BadRequestError}
|
|
32
57
|
* @throws {@link Courier.MessageNotFoundError}
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* await courier.messages.get("string")
|
|
33
61
|
*/
|
|
34
62
|
get(messageId: string, requestOptions?: Messages.RequestOptions): Promise<Courier.MessageDetails>;
|
|
35
63
|
/**
|
|
36
64
|
* Cancel a message that is currently in the process of being delivered. A well-formatted API call to the cancel message API will return either `200` status code for a successful cancellation or `409` status code for an unsuccessful cancellation. Both cases will include the actual message record in the response body (see details below).
|
|
65
|
+
*
|
|
66
|
+
* @param {string} messageId - A unique identifier representing the message ID
|
|
67
|
+
* @param {Messages.IdempotentRequestOptions} requestOptions - Request-specific configuration.
|
|
68
|
+
*
|
|
69
|
+
* @example
|
|
70
|
+
* await courier.messages.cancel("string")
|
|
37
71
|
*/
|
|
38
72
|
cancel(messageId: string, requestOptions?: Messages.IdempotentRequestOptions): Promise<Courier.MessageDetails>;
|
|
39
73
|
/**
|
|
40
74
|
* Fetch the array of events of a message you've previously sent.
|
|
75
|
+
*
|
|
76
|
+
* @param {string} messageId - A unique identifier representing the message ID
|
|
77
|
+
* @param {Courier.GetMessageHistoryRequest} request
|
|
78
|
+
* @param {Messages.RequestOptions} requestOptions - Request-specific configuration.
|
|
79
|
+
*
|
|
41
80
|
* @throws {@link Courier.BadRequestError}
|
|
42
81
|
* @throws {@link Courier.MessageNotFoundError}
|
|
82
|
+
*
|
|
83
|
+
* @example
|
|
84
|
+
* await courier.messages.getHistory("string", {
|
|
85
|
+
* type: "string"
|
|
86
|
+
* })
|
|
43
87
|
*/
|
|
44
88
|
getHistory(messageId: string, request?: Courier.GetMessageHistoryRequest, requestOptions?: Messages.RequestOptions): Promise<Courier.MessageHistoryResponse>;
|
|
45
89
|
/**
|
|
90
|
+
* @param {string} messageId - A unique identifier associated with the message you wish to retrieve (results from a send).
|
|
91
|
+
* @param {Messages.RequestOptions} requestOptions - Request-specific configuration.
|
|
92
|
+
*
|
|
46
93
|
* @throws {@link Courier.BadRequestError}
|
|
47
94
|
* @throws {@link Courier.MessageNotFoundError}
|
|
95
|
+
*
|
|
96
|
+
* @example
|
|
97
|
+
* await courier.messages.getContent("string")
|
|
48
98
|
*/
|
|
49
99
|
getContent(messageId: string, requestOptions?: Messages.RequestOptions): Promise<Courier.RenderOutputResponse>;
|
|
100
|
+
/**
|
|
101
|
+
* @param {string} requestId - A unique identifier representing the request ID
|
|
102
|
+
* @param {Messages.RequestOptions} requestOptions - Request-specific configuration.
|
|
103
|
+
*
|
|
104
|
+
* @example
|
|
105
|
+
* await courier.messages.archive("string")
|
|
106
|
+
*/
|
|
50
107
|
archive(requestId: string, requestOptions?: Messages.RequestOptions): Promise<void>;
|
|
51
108
|
protected _getAuthorizationHeader(): Promise<string>;
|
|
52
109
|
}
|
|
@@ -41,20 +41,41 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
41
41
|
exports.Messages = void 0;
|
|
42
42
|
const environments = __importStar(require("../../../../environments"));
|
|
43
43
|
const core = __importStar(require("../../../../core"));
|
|
44
|
-
const Courier = __importStar(require("
|
|
44
|
+
const Courier = __importStar(require("../../../index"));
|
|
45
45
|
const url_join_1 = __importDefault(require("url-join"));
|
|
46
|
-
const errors = __importStar(require("../../../../errors"));
|
|
46
|
+
const errors = __importStar(require("../../../../errors/index"));
|
|
47
47
|
class Messages {
|
|
48
48
|
constructor(_options = {}) {
|
|
49
49
|
this._options = _options;
|
|
50
50
|
}
|
|
51
51
|
/**
|
|
52
52
|
* Fetch the statuses of messages you've previously sent.
|
|
53
|
+
*
|
|
54
|
+
* @param {Courier.ListMessagesRequest} request
|
|
55
|
+
* @param {Messages.RequestOptions} requestOptions - Request-specific configuration.
|
|
56
|
+
*
|
|
57
|
+
* @example
|
|
58
|
+
* await courier.messages.list({
|
|
59
|
+
* archived: true,
|
|
60
|
+
* cursor: "string",
|
|
61
|
+
* event: "string",
|
|
62
|
+
* list: "string",
|
|
63
|
+
* messageId: "string",
|
|
64
|
+
* notification: "string",
|
|
65
|
+
* provider: "string",
|
|
66
|
+
* recipient: "string",
|
|
67
|
+
* status: "string",
|
|
68
|
+
* tag: "string",
|
|
69
|
+
* tags: "string",
|
|
70
|
+
* tenant_id: "string",
|
|
71
|
+
* enqueued_after: "string",
|
|
72
|
+
* traceId: "string"
|
|
73
|
+
* })
|
|
53
74
|
*/
|
|
54
75
|
list(request = {}, requestOptions) {
|
|
55
76
|
var _a, _b;
|
|
56
77
|
return __awaiter(this, void 0, void 0, function* () {
|
|
57
|
-
const { archived, cursor, event, list,
|
|
78
|
+
const { archived, cursor, event, list, messageId, notification, provider, recipient, status, tag, tags, tenant_id: tenantId, enqueued_after: enqueuedAfter, traceId, } = request;
|
|
58
79
|
const _queryParams = {};
|
|
59
80
|
if (archived != null) {
|
|
60
81
|
_queryParams["archived"] = archived.toString();
|
|
@@ -68,11 +89,8 @@ class Messages {
|
|
|
68
89
|
if (list != null) {
|
|
69
90
|
_queryParams["list"] = list;
|
|
70
91
|
}
|
|
71
|
-
if (
|
|
72
|
-
_queryParams["
|
|
73
|
-
}
|
|
74
|
-
if (messageId_ != null) {
|
|
75
|
-
_queryParams["messageId"] = messageId_;
|
|
92
|
+
if (messageId != null) {
|
|
93
|
+
_queryParams["messageId"] = messageId;
|
|
76
94
|
}
|
|
77
95
|
if (notification != null) {
|
|
78
96
|
_queryParams["notification"] = notification;
|
|
@@ -113,11 +131,8 @@ class Messages {
|
|
|
113
131
|
if (enqueuedAfter != null) {
|
|
114
132
|
_queryParams["enqueued_after"] = enqueuedAfter;
|
|
115
133
|
}
|
|
116
|
-
if (
|
|
117
|
-
_queryParams["
|
|
118
|
-
}
|
|
119
|
-
if (traceId_ != null) {
|
|
120
|
-
_queryParams["traceId"] = traceId_;
|
|
134
|
+
if (traceId != null) {
|
|
135
|
+
_queryParams["traceId"] = traceId;
|
|
121
136
|
}
|
|
122
137
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
123
138
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CourierEnvironment.Production, "messages"),
|
|
@@ -126,7 +141,9 @@ class Messages {
|
|
|
126
141
|
Authorization: yield this._getAuthorizationHeader(),
|
|
127
142
|
"X-Fern-Language": "JavaScript",
|
|
128
143
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
129
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
144
|
+
"X-Fern-SDK-Version": "v6.1.3",
|
|
145
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
146
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
130
147
|
},
|
|
131
148
|
contentType: "application/json",
|
|
132
149
|
queryParameters: _queryParams,
|
|
@@ -159,20 +176,29 @@ class Messages {
|
|
|
159
176
|
}
|
|
160
177
|
/**
|
|
161
178
|
* Fetch the status of a message you've previously sent.
|
|
179
|
+
*
|
|
180
|
+
* @param {string} messageId - A unique identifier associated with the message you wish to retrieve (results from a send).
|
|
181
|
+
* @param {Messages.RequestOptions} requestOptions - Request-specific configuration.
|
|
182
|
+
*
|
|
162
183
|
* @throws {@link Courier.BadRequestError}
|
|
163
184
|
* @throws {@link Courier.MessageNotFoundError}
|
|
185
|
+
*
|
|
186
|
+
* @example
|
|
187
|
+
* await courier.messages.get("string")
|
|
164
188
|
*/
|
|
165
189
|
get(messageId, requestOptions) {
|
|
166
190
|
var _a, _b;
|
|
167
191
|
return __awaiter(this, void 0, void 0, function* () {
|
|
168
192
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
169
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CourierEnvironment.Production, `messages/${messageId}`),
|
|
193
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CourierEnvironment.Production, `messages/${encodeURIComponent(messageId)}`),
|
|
170
194
|
method: "GET",
|
|
171
195
|
headers: {
|
|
172
196
|
Authorization: yield this._getAuthorizationHeader(),
|
|
173
197
|
"X-Fern-Language": "JavaScript",
|
|
174
198
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
175
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
199
|
+
"X-Fern-SDK-Version": "v6.1.3",
|
|
200
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
201
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
176
202
|
},
|
|
177
203
|
contentType: "application/json",
|
|
178
204
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -211,22 +237,28 @@ class Messages {
|
|
|
211
237
|
}
|
|
212
238
|
/**
|
|
213
239
|
* Cancel a message that is currently in the process of being delivered. A well-formatted API call to the cancel message API will return either `200` status code for a successful cancellation or `409` status code for an unsuccessful cancellation. Both cases will include the actual message record in the response body (see details below).
|
|
240
|
+
*
|
|
241
|
+
* @param {string} messageId - A unique identifier representing the message ID
|
|
242
|
+
* @param {Messages.IdempotentRequestOptions} requestOptions - Request-specific configuration.
|
|
243
|
+
*
|
|
244
|
+
* @example
|
|
245
|
+
* await courier.messages.cancel("string")
|
|
214
246
|
*/
|
|
215
247
|
cancel(messageId, requestOptions) {
|
|
216
248
|
var _a, _b;
|
|
217
249
|
return __awaiter(this, void 0, void 0, function* () {
|
|
218
250
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
219
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CourierEnvironment.Production, `messages/${messageId}/cancel`),
|
|
251
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CourierEnvironment.Production, `messages/${encodeURIComponent(messageId)}/cancel`),
|
|
220
252
|
method: "POST",
|
|
221
253
|
headers: {
|
|
222
254
|
Authorization: yield this._getAuthorizationHeader(),
|
|
223
255
|
"X-Fern-Language": "JavaScript",
|
|
224
256
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
225
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
257
|
+
"X-Fern-SDK-Version": "v6.1.3",
|
|
258
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
259
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
226
260
|
"Idempotency-Key": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey) != null ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey : undefined,
|
|
227
|
-
"X-Idempotency-Expiration": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry) != null
|
|
228
|
-
? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry.toString()
|
|
229
|
-
: undefined,
|
|
261
|
+
"X-Idempotency-Expiration": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry) != null ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry : undefined,
|
|
230
262
|
},
|
|
231
263
|
contentType: "application/json",
|
|
232
264
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -258,8 +290,18 @@ class Messages {
|
|
|
258
290
|
}
|
|
259
291
|
/**
|
|
260
292
|
* Fetch the array of events of a message you've previously sent.
|
|
293
|
+
*
|
|
294
|
+
* @param {string} messageId - A unique identifier representing the message ID
|
|
295
|
+
* @param {Courier.GetMessageHistoryRequest} request
|
|
296
|
+
* @param {Messages.RequestOptions} requestOptions - Request-specific configuration.
|
|
297
|
+
*
|
|
261
298
|
* @throws {@link Courier.BadRequestError}
|
|
262
299
|
* @throws {@link Courier.MessageNotFoundError}
|
|
300
|
+
*
|
|
301
|
+
* @example
|
|
302
|
+
* await courier.messages.getHistory("string", {
|
|
303
|
+
* type: "string"
|
|
304
|
+
* })
|
|
263
305
|
*/
|
|
264
306
|
getHistory(messageId, request = {}, requestOptions) {
|
|
265
307
|
var _a, _b;
|
|
@@ -270,13 +312,15 @@ class Messages {
|
|
|
270
312
|
_queryParams["type"] = type_;
|
|
271
313
|
}
|
|
272
314
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
273
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CourierEnvironment.Production, `messages/${messageId}/history`),
|
|
315
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CourierEnvironment.Production, `messages/${encodeURIComponent(messageId)}/history`),
|
|
274
316
|
method: "GET",
|
|
275
317
|
headers: {
|
|
276
318
|
Authorization: yield this._getAuthorizationHeader(),
|
|
277
319
|
"X-Fern-Language": "JavaScript",
|
|
278
320
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
279
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
321
|
+
"X-Fern-SDK-Version": "v6.1.3",
|
|
322
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
323
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
280
324
|
},
|
|
281
325
|
contentType: "application/json",
|
|
282
326
|
queryParameters: _queryParams,
|
|
@@ -315,20 +359,28 @@ class Messages {
|
|
|
315
359
|
});
|
|
316
360
|
}
|
|
317
361
|
/**
|
|
362
|
+
* @param {string} messageId - A unique identifier associated with the message you wish to retrieve (results from a send).
|
|
363
|
+
* @param {Messages.RequestOptions} requestOptions - Request-specific configuration.
|
|
364
|
+
*
|
|
318
365
|
* @throws {@link Courier.BadRequestError}
|
|
319
366
|
* @throws {@link Courier.MessageNotFoundError}
|
|
367
|
+
*
|
|
368
|
+
* @example
|
|
369
|
+
* await courier.messages.getContent("string")
|
|
320
370
|
*/
|
|
321
371
|
getContent(messageId, requestOptions) {
|
|
322
372
|
var _a, _b;
|
|
323
373
|
return __awaiter(this, void 0, void 0, function* () {
|
|
324
374
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
325
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CourierEnvironment.Production, `messages/${messageId}/output`),
|
|
375
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CourierEnvironment.Production, `messages/${encodeURIComponent(messageId)}/output`),
|
|
326
376
|
method: "GET",
|
|
327
377
|
headers: {
|
|
328
378
|
Authorization: yield this._getAuthorizationHeader(),
|
|
329
379
|
"X-Fern-Language": "JavaScript",
|
|
330
380
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
331
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
381
|
+
"X-Fern-SDK-Version": "v6.1.3",
|
|
382
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
383
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
332
384
|
},
|
|
333
385
|
contentType: "application/json",
|
|
334
386
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -365,17 +417,26 @@ class Messages {
|
|
|
365
417
|
}
|
|
366
418
|
});
|
|
367
419
|
}
|
|
420
|
+
/**
|
|
421
|
+
* @param {string} requestId - A unique identifier representing the request ID
|
|
422
|
+
* @param {Messages.RequestOptions} requestOptions - Request-specific configuration.
|
|
423
|
+
*
|
|
424
|
+
* @example
|
|
425
|
+
* await courier.messages.archive("string")
|
|
426
|
+
*/
|
|
368
427
|
archive(requestId, requestOptions) {
|
|
369
428
|
var _a, _b;
|
|
370
429
|
return __awaiter(this, void 0, void 0, function* () {
|
|
371
430
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
372
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CourierEnvironment.Production, `requests/${requestId}/archive`),
|
|
431
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CourierEnvironment.Production, `requests/${encodeURIComponent(requestId)}/archive`),
|
|
373
432
|
method: "PUT",
|
|
374
433
|
headers: {
|
|
375
434
|
Authorization: yield this._getAuthorizationHeader(),
|
|
376
435
|
"X-Fern-Language": "JavaScript",
|
|
377
436
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
378
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
437
|
+
"X-Fern-SDK-Version": "v6.1.3",
|
|
438
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
439
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
379
440
|
},
|
|
380
441
|
contentType: "application/json",
|
|
381
442
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -408,7 +469,7 @@ class Messages {
|
|
|
408
469
|
_getAuthorizationHeader() {
|
|
409
470
|
var _a;
|
|
410
471
|
return __awaiter(this, void 0, void 0, function* () {
|
|
411
|
-
const bearer = (_a = (yield core.Supplier.get(this._options.authorizationToken))) !== null && _a !== void 0 ? _a : process.env["COURIER_AUTH_TOKEN"];
|
|
472
|
+
const bearer = (_a = (yield core.Supplier.get(this._options.authorizationToken))) !== null && _a !== void 0 ? _a : process === null || process === void 0 ? void 0 : process.env["COURIER_AUTH_TOKEN"];
|
|
412
473
|
if (bearer == null) {
|
|
413
474
|
throw new errors.CourierError({
|
|
414
475
|
message: "Please specify COURIER_AUTH_TOKEN when instantiating the client.",
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
+
/**
|
|
5
|
+
* @example
|
|
6
|
+
* {
|
|
7
|
+
* type: "string"
|
|
8
|
+
* }
|
|
9
|
+
*/
|
|
4
10
|
export interface GetMessageHistoryRequest {
|
|
5
11
|
/**
|
|
6
12
|
* A supported Message History type that will filter the events returned.
|
|
@@ -1,6 +1,25 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
+
/**
|
|
5
|
+
* @example
|
|
6
|
+
* {
|
|
7
|
+
* archived: true,
|
|
8
|
+
* cursor: "string",
|
|
9
|
+
* event: "string",
|
|
10
|
+
* list: "string",
|
|
11
|
+
* messageId: "string",
|
|
12
|
+
* notification: "string",
|
|
13
|
+
* provider: "string",
|
|
14
|
+
* recipient: "string",
|
|
15
|
+
* status: "string",
|
|
16
|
+
* tag: "string",
|
|
17
|
+
* tags: "string",
|
|
18
|
+
* tenant_id: "string",
|
|
19
|
+
* enqueued_after: "string",
|
|
20
|
+
* traceId: "string"
|
|
21
|
+
* }
|
|
22
|
+
*/
|
|
4
23
|
export interface ListMessagesRequest {
|
|
5
24
|
/**
|
|
6
25
|
* A boolean value that indicates whether archived messages should be included in the response.
|
|
@@ -18,10 +37,6 @@ export interface ListMessagesRequest {
|
|
|
18
37
|
* A unique identifier representing the list the message was sent to.
|
|
19
38
|
*/
|
|
20
39
|
list?: string;
|
|
21
|
-
/**
|
|
22
|
-
* A unique identifier representing the message_id returned from either /send or /send/list.
|
|
23
|
-
*/
|
|
24
|
-
message_id?: string;
|
|
25
40
|
/**
|
|
26
41
|
* A unique identifier representing the message_id returned from either /send or /send/list.
|
|
27
42
|
*/
|
|
@@ -58,10 +73,6 @@ export interface ListMessagesRequest {
|
|
|
58
73
|
* The enqueued datetime of a message to filter out messages received before.
|
|
59
74
|
*/
|
|
60
75
|
enqueued_after?: string;
|
|
61
|
-
/**
|
|
62
|
-
* The unique identifier used to trace the requests
|
|
63
|
-
*/
|
|
64
|
-
trace_id?: string;
|
|
65
76
|
/**
|
|
66
77
|
* The unique identifier used to trace the requests
|
|
67
78
|
*/
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { ListMessagesRequest } from "./ListMessagesRequest";
|
|
2
|
-
export { GetMessageHistoryRequest } from "./GetMessageHistoryRequest";
|
|
1
|
+
export { type ListMessagesRequest } from "./ListMessagesRequest";
|
|
2
|
+
export { type GetMessageHistoryRequest } from "./GetMessageHistoryRequest";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
import * as Courier from "
|
|
4
|
+
import * as Courier from "../../../index";
|
|
5
5
|
export interface ListMessagesResponse {
|
|
6
6
|
/** Paging information for the result set. */
|
|
7
7
|
paging: Courier.Paging;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
import * as Courier from "
|
|
4
|
+
import * as Courier from "../../../index";
|
|
5
5
|
export interface MessageDetails {
|
|
6
6
|
/** A unique identifier associated with the message you wish to retrieve (results from a send). */
|
|
7
7
|
id: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
import * as Courier from "
|
|
4
|
+
import * as Courier from "../../../index";
|
|
5
5
|
export interface RenderOutputResponse {
|
|
6
6
|
/** An array of render output of a previously sent message. */
|
|
7
7
|
results: Courier.RenderOutput[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
import * as Courier from "
|
|
4
|
+
import * as Courier from "../../../index";
|
|
5
5
|
export interface RenderedMessageContent {
|
|
6
6
|
/** The html content of the rendered message. */
|
|
7
7
|
html: string;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as environments from "../../../../environments";
|
|
5
5
|
import * as core from "../../../../core";
|
|
6
|
-
import * as Courier from "
|
|
6
|
+
import * as Courier from "../../../index";
|
|
7
7
|
export declare namespace Notifications {
|
|
8
8
|
interface Options {
|
|
9
9
|
environment?: core.Supplier<environments.CourierEnvironment | string>;
|
|
@@ -18,13 +18,125 @@ export declare namespace Notifications {
|
|
|
18
18
|
export declare class Notifications {
|
|
19
19
|
protected readonly _options: Notifications.Options;
|
|
20
20
|
constructor(_options?: Notifications.Options);
|
|
21
|
+
/**
|
|
22
|
+
* @param {Courier.NotificationListParams} request
|
|
23
|
+
* @param {Notifications.RequestOptions} requestOptions - Request-specific configuration.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* await courier.notifications.list({
|
|
27
|
+
* cursor: "string"
|
|
28
|
+
* })
|
|
29
|
+
*/
|
|
21
30
|
list(request?: Courier.NotificationListParams, requestOptions?: Notifications.RequestOptions): Promise<Courier.NotificationListResponse>;
|
|
31
|
+
/**
|
|
32
|
+
* @param {string} id
|
|
33
|
+
* @param {Notifications.RequestOptions} requestOptions - Request-specific configuration.
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* await courier.notifications.getContent("string")
|
|
37
|
+
*/
|
|
22
38
|
getContent(id: string, requestOptions?: Notifications.RequestOptions): Promise<Courier.NotificationGetContentResponse>;
|
|
39
|
+
/**
|
|
40
|
+
* @param {string} id
|
|
41
|
+
* @param {Notifications.RequestOptions} requestOptions - Request-specific configuration.
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* await courier.notifications.getDraftContent("string")
|
|
45
|
+
*/
|
|
23
46
|
getDraftContent(id: string, requestOptions?: Notifications.RequestOptions): Promise<Courier.NotificationGetContentResponse>;
|
|
47
|
+
/**
|
|
48
|
+
* @param {string} id
|
|
49
|
+
* @param {Courier.NotificationUpdateVariationsParams} request
|
|
50
|
+
* @param {Notifications.RequestOptions} requestOptions - Request-specific configuration.
|
|
51
|
+
*
|
|
52
|
+
* @example
|
|
53
|
+
* await courier.notifications.updateVariations("string", {
|
|
54
|
+
* blocks: [{
|
|
55
|
+
* alias: "string",
|
|
56
|
+
* context: "string",
|
|
57
|
+
* id: "string",
|
|
58
|
+
* type: Courier.BlockType.Action,
|
|
59
|
+
* content: "string",
|
|
60
|
+
* locales: {
|
|
61
|
+
* "string": "string"
|
|
62
|
+
* },
|
|
63
|
+
* checksum: "string"
|
|
64
|
+
* }],
|
|
65
|
+
* channels: [{
|
|
66
|
+
* id: "string",
|
|
67
|
+
* type: "string",
|
|
68
|
+
* content: {},
|
|
69
|
+
* locales: {
|
|
70
|
+
* "string": {}
|
|
71
|
+
* },
|
|
72
|
+
* checksum: "string"
|
|
73
|
+
* }]
|
|
74
|
+
* })
|
|
75
|
+
*/
|
|
24
76
|
updateVariations(id: string, request?: Courier.NotificationUpdateVariationsParams, requestOptions?: Notifications.RequestOptions): Promise<void>;
|
|
77
|
+
/**
|
|
78
|
+
* @param {string} id
|
|
79
|
+
* @param {Courier.NotificationDraftUpdateVariationsParams} request
|
|
80
|
+
* @param {Notifications.RequestOptions} requestOptions - Request-specific configuration.
|
|
81
|
+
*
|
|
82
|
+
* @example
|
|
83
|
+
* await courier.notifications.updateDraftVariations("string", {
|
|
84
|
+
* blocks: [{
|
|
85
|
+
* alias: "string",
|
|
86
|
+
* context: "string",
|
|
87
|
+
* id: "string",
|
|
88
|
+
* type: Courier.BlockType.Action,
|
|
89
|
+
* content: "string",
|
|
90
|
+
* locales: {
|
|
91
|
+
* "string": "string"
|
|
92
|
+
* },
|
|
93
|
+
* checksum: "string"
|
|
94
|
+
* }],
|
|
95
|
+
* channels: [{
|
|
96
|
+
* id: "string",
|
|
97
|
+
* type: "string",
|
|
98
|
+
* content: {},
|
|
99
|
+
* locales: {
|
|
100
|
+
* "string": {}
|
|
101
|
+
* },
|
|
102
|
+
* checksum: "string"
|
|
103
|
+
* }]
|
|
104
|
+
* })
|
|
105
|
+
*/
|
|
25
106
|
updateDraftVariations(id: string, request?: Courier.NotificationDraftUpdateVariationsParams, requestOptions?: Notifications.RequestOptions): Promise<void>;
|
|
107
|
+
/**
|
|
108
|
+
* @param {string} id
|
|
109
|
+
* @param {string} submissionId
|
|
110
|
+
* @param {Notifications.RequestOptions} requestOptions - Request-specific configuration.
|
|
111
|
+
*
|
|
112
|
+
* @example
|
|
113
|
+
* await courier.notifications.getSubmissionChecks("string", "string")
|
|
114
|
+
*/
|
|
26
115
|
getSubmissionChecks(id: string, submissionId: string, requestOptions?: Notifications.RequestOptions): Promise<Courier.SubmissionChecksGetResponse>;
|
|
116
|
+
/**
|
|
117
|
+
* @param {string} id
|
|
118
|
+
* @param {string} submissionId
|
|
119
|
+
* @param {Courier.SubmissionChecksReplaceParams} request
|
|
120
|
+
* @param {Notifications.RequestOptions} requestOptions - Request-specific configuration.
|
|
121
|
+
*
|
|
122
|
+
* @example
|
|
123
|
+
* await courier.notifications.replaceSubmissionChecks("string", "string", {
|
|
124
|
+
* checks: [{
|
|
125
|
+
* id: "string",
|
|
126
|
+
* status: Courier.CheckStatus.Resolved,
|
|
127
|
+
* type: "custom"
|
|
128
|
+
* }]
|
|
129
|
+
* })
|
|
130
|
+
*/
|
|
27
131
|
replaceSubmissionChecks(id: string, submissionId: string, request: Courier.SubmissionChecksReplaceParams, requestOptions?: Notifications.RequestOptions): Promise<Courier.SubmissionChecksReplaceResponse>;
|
|
132
|
+
/**
|
|
133
|
+
* @param {string} id
|
|
134
|
+
* @param {string} submissionId
|
|
135
|
+
* @param {Notifications.RequestOptions} requestOptions - Request-specific configuration.
|
|
136
|
+
*
|
|
137
|
+
* @example
|
|
138
|
+
* await courier.notifications.cancelSubmission("string", "string")
|
|
139
|
+
*/
|
|
28
140
|
cancelSubmission(id: string, submissionId: string, requestOptions?: Notifications.RequestOptions): Promise<void>;
|
|
29
141
|
protected _getAuthorizationHeader(): Promise<string>;
|
|
30
142
|
}
|