@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
|
@@ -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 Tenants {
|
|
8
8
|
interface Options {
|
|
9
9
|
environment?: core.Supplier<environments.CourierEnvironment | string>;
|
|
@@ -19,18 +19,99 @@ export declare class Tenants {
|
|
|
19
19
|
protected readonly _options: Tenants.Options;
|
|
20
20
|
constructor(_options?: Tenants.Options);
|
|
21
21
|
/**
|
|
22
|
+
* @param {string} tenantId - A unique identifier representing the tenant to be returned.
|
|
23
|
+
* @param {Courier.TenantCreateOrReplaceParams} request
|
|
24
|
+
* @param {Tenants.RequestOptions} requestOptions - Request-specific configuration.
|
|
25
|
+
*
|
|
22
26
|
* @throws {@link Courier.BadRequestError}
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* await courier.tenants.createOrReplace("string", {
|
|
30
|
+
* name: "string",
|
|
31
|
+
* parent_tenant_id: "string",
|
|
32
|
+
* default_preferences: {
|
|
33
|
+
* items: [{}]
|
|
34
|
+
* },
|
|
35
|
+
* properties: {
|
|
36
|
+
* "string": {
|
|
37
|
+
* "key": "value"
|
|
38
|
+
* }
|
|
39
|
+
* },
|
|
40
|
+
* user_profile: {
|
|
41
|
+
* "string": {
|
|
42
|
+
* "key": "value"
|
|
43
|
+
* }
|
|
44
|
+
* },
|
|
45
|
+
* brand_id: "string"
|
|
46
|
+
* })
|
|
23
47
|
*/
|
|
24
48
|
createOrReplace(tenantId: string, request: Courier.TenantCreateOrReplaceParams, requestOptions?: Tenants.RequestOptions): Promise<Courier.Tenant>;
|
|
25
49
|
/**
|
|
50
|
+
* @param {string} tenantId - A unique identifier representing the tenant to be returned.
|
|
51
|
+
* @param {Tenants.RequestOptions} requestOptions - Request-specific configuration.
|
|
52
|
+
*
|
|
26
53
|
* @throws {@link Courier.BadRequestError}
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* await courier.tenants.get("string")
|
|
27
57
|
*/
|
|
28
58
|
get(tenantId: string, requestOptions?: Tenants.RequestOptions): Promise<Courier.Tenant>;
|
|
59
|
+
/**
|
|
60
|
+
* @param {Courier.ListTenantParams} request
|
|
61
|
+
* @param {Tenants.RequestOptions} requestOptions - Request-specific configuration.
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
* await courier.tenants.list({
|
|
65
|
+
* parent_tenant_id: "string",
|
|
66
|
+
* limit: 1,
|
|
67
|
+
* cursor: "string"
|
|
68
|
+
* })
|
|
69
|
+
*/
|
|
29
70
|
list(request?: Courier.ListTenantParams, requestOptions?: Tenants.RequestOptions): Promise<Courier.TenantListResponse>;
|
|
71
|
+
/**
|
|
72
|
+
* @param {string} tenantId - Id of the tenant to be deleted.
|
|
73
|
+
* @param {Tenants.RequestOptions} requestOptions - Request-specific configuration.
|
|
74
|
+
*
|
|
75
|
+
* @example
|
|
76
|
+
* await courier.tenants.delete("string")
|
|
77
|
+
*/
|
|
30
78
|
delete(tenantId: string, requestOptions?: Tenants.RequestOptions): Promise<void>;
|
|
31
79
|
/**
|
|
80
|
+
* @param {string} tenantId - Id of the tenant for user membership.
|
|
81
|
+
* @param {Courier.ListUsersForTenantParams} request
|
|
82
|
+
* @param {Tenants.RequestOptions} requestOptions - Request-specific configuration.
|
|
83
|
+
*
|
|
32
84
|
* @throws {@link Courier.BadRequestError}
|
|
85
|
+
*
|
|
86
|
+
* @example
|
|
87
|
+
* await courier.tenants.getUsersByTenant("string", {
|
|
88
|
+
* limit: 1,
|
|
89
|
+
* cursor: "string"
|
|
90
|
+
* })
|
|
33
91
|
*/
|
|
34
92
|
getUsersByTenant(tenantId: string, request?: Courier.ListUsersForTenantParams, requestOptions?: Tenants.RequestOptions): Promise<Courier.ListUsersForTenantResponse>;
|
|
93
|
+
/**
|
|
94
|
+
* @param {string} tenantId - Id of the tenant to update the default preferences for.
|
|
95
|
+
* @param {string} topicId - Id fo the susbcription topic you want to have a default preference for.
|
|
96
|
+
* @param {Courier.SubscriptionTopicNew} request
|
|
97
|
+
* @param {Tenants.RequestOptions} requestOptions - Request-specific configuration.
|
|
98
|
+
*
|
|
99
|
+
* @example
|
|
100
|
+
* await courier.tenants.createOrReplaceDefaultPreferencesForTopic("tenantABC", "HB529N49MD4D5PMX9WR5P4JH78NA", {
|
|
101
|
+
* status: Courier.SubscriptionTopicStatus.OptedIn,
|
|
102
|
+
* has_custom_routing: true,
|
|
103
|
+
* custom_routing: [Courier.ChannelClassification.Inbox]
|
|
104
|
+
* })
|
|
105
|
+
*/
|
|
106
|
+
createOrReplaceDefaultPreferencesForTopic(tenantId: string, topicId: string, request: Courier.SubscriptionTopicNew, requestOptions?: Tenants.RequestOptions): Promise<void>;
|
|
107
|
+
/**
|
|
108
|
+
* @param {string} tenantId - Id of the tenant to update the default preferences for.
|
|
109
|
+
* @param {string} topicId - Id fo the susbcription topic you want to have a default preference for.
|
|
110
|
+
* @param {Tenants.RequestOptions} requestOptions - Request-specific configuration.
|
|
111
|
+
*
|
|
112
|
+
* @example
|
|
113
|
+
* await courier.tenants.removeDefaultPreferencesForTopic("string", "string")
|
|
114
|
+
*/
|
|
115
|
+
removeDefaultPreferencesForTopic(tenantId: string, topicId: string, requestOptions?: Tenants.RequestOptions): Promise<void>;
|
|
35
116
|
protected _getAuthorizationHeader(): Promise<string>;
|
|
36
117
|
}
|
|
@@ -41,27 +41,53 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
41
41
|
exports.Tenants = 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 Tenants {
|
|
48
48
|
constructor(_options = {}) {
|
|
49
49
|
this._options = _options;
|
|
50
50
|
}
|
|
51
51
|
/**
|
|
52
|
+
* @param {string} tenantId - A unique identifier representing the tenant to be returned.
|
|
53
|
+
* @param {Courier.TenantCreateOrReplaceParams} request
|
|
54
|
+
* @param {Tenants.RequestOptions} requestOptions - Request-specific configuration.
|
|
55
|
+
*
|
|
52
56
|
* @throws {@link Courier.BadRequestError}
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* await courier.tenants.createOrReplace("string", {
|
|
60
|
+
* name: "string",
|
|
61
|
+
* parent_tenant_id: "string",
|
|
62
|
+
* default_preferences: {
|
|
63
|
+
* items: [{}]
|
|
64
|
+
* },
|
|
65
|
+
* properties: {
|
|
66
|
+
* "string": {
|
|
67
|
+
* "key": "value"
|
|
68
|
+
* }
|
|
69
|
+
* },
|
|
70
|
+
* user_profile: {
|
|
71
|
+
* "string": {
|
|
72
|
+
* "key": "value"
|
|
73
|
+
* }
|
|
74
|
+
* },
|
|
75
|
+
* brand_id: "string"
|
|
76
|
+
* })
|
|
53
77
|
*/
|
|
54
78
|
createOrReplace(tenantId, request, requestOptions) {
|
|
55
79
|
var _a, _b;
|
|
56
80
|
return __awaiter(this, void 0, void 0, function* () {
|
|
57
81
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
58
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CourierEnvironment.Production, `/tenants/${tenantId}`),
|
|
82
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CourierEnvironment.Production, `/tenants/${encodeURIComponent(tenantId)}`),
|
|
59
83
|
method: "PUT",
|
|
60
84
|
headers: {
|
|
61
85
|
Authorization: yield this._getAuthorizationHeader(),
|
|
62
86
|
"X-Fern-Language": "JavaScript",
|
|
63
87
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
64
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
88
|
+
"X-Fern-SDK-Version": "v6.1.3",
|
|
89
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
90
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
65
91
|
},
|
|
66
92
|
contentType: "application/json",
|
|
67
93
|
body: request,
|
|
@@ -98,19 +124,27 @@ class Tenants {
|
|
|
98
124
|
});
|
|
99
125
|
}
|
|
100
126
|
/**
|
|
127
|
+
* @param {string} tenantId - A unique identifier representing the tenant to be returned.
|
|
128
|
+
* @param {Tenants.RequestOptions} requestOptions - Request-specific configuration.
|
|
129
|
+
*
|
|
101
130
|
* @throws {@link Courier.BadRequestError}
|
|
131
|
+
*
|
|
132
|
+
* @example
|
|
133
|
+
* await courier.tenants.get("string")
|
|
102
134
|
*/
|
|
103
135
|
get(tenantId, requestOptions) {
|
|
104
136
|
var _a, _b;
|
|
105
137
|
return __awaiter(this, void 0, void 0, function* () {
|
|
106
138
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
107
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CourierEnvironment.Production, `/tenants/${tenantId}`),
|
|
139
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CourierEnvironment.Production, `/tenants/${encodeURIComponent(tenantId)}`),
|
|
108
140
|
method: "GET",
|
|
109
141
|
headers: {
|
|
110
142
|
Authorization: yield this._getAuthorizationHeader(),
|
|
111
143
|
"X-Fern-Language": "JavaScript",
|
|
112
144
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
113
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
145
|
+
"X-Fern-SDK-Version": "v6.1.3",
|
|
146
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
147
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
114
148
|
},
|
|
115
149
|
contentType: "application/json",
|
|
116
150
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -145,11 +179,25 @@ class Tenants {
|
|
|
145
179
|
}
|
|
146
180
|
});
|
|
147
181
|
}
|
|
182
|
+
/**
|
|
183
|
+
* @param {Courier.ListTenantParams} request
|
|
184
|
+
* @param {Tenants.RequestOptions} requestOptions - Request-specific configuration.
|
|
185
|
+
*
|
|
186
|
+
* @example
|
|
187
|
+
* await courier.tenants.list({
|
|
188
|
+
* parent_tenant_id: "string",
|
|
189
|
+
* limit: 1,
|
|
190
|
+
* cursor: "string"
|
|
191
|
+
* })
|
|
192
|
+
*/
|
|
148
193
|
list(request = {}, requestOptions) {
|
|
149
194
|
var _a, _b;
|
|
150
195
|
return __awaiter(this, void 0, void 0, function* () {
|
|
151
|
-
const { limit, cursor } = request;
|
|
196
|
+
const { parent_tenant_id: parentTenantId, limit, cursor } = request;
|
|
152
197
|
const _queryParams = {};
|
|
198
|
+
if (parentTenantId != null) {
|
|
199
|
+
_queryParams["parent_tenant_id"] = parentTenantId;
|
|
200
|
+
}
|
|
153
201
|
if (limit != null) {
|
|
154
202
|
_queryParams["limit"] = limit.toString();
|
|
155
203
|
}
|
|
@@ -163,7 +211,9 @@ class Tenants {
|
|
|
163
211
|
Authorization: yield this._getAuthorizationHeader(),
|
|
164
212
|
"X-Fern-Language": "JavaScript",
|
|
165
213
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
166
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
214
|
+
"X-Fern-SDK-Version": "v6.1.3",
|
|
215
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
216
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
167
217
|
},
|
|
168
218
|
contentType: "application/json",
|
|
169
219
|
queryParameters: _queryParams,
|
|
@@ -194,17 +244,26 @@ class Tenants {
|
|
|
194
244
|
}
|
|
195
245
|
});
|
|
196
246
|
}
|
|
247
|
+
/**
|
|
248
|
+
* @param {string} tenantId - Id of the tenant to be deleted.
|
|
249
|
+
* @param {Tenants.RequestOptions} requestOptions - Request-specific configuration.
|
|
250
|
+
*
|
|
251
|
+
* @example
|
|
252
|
+
* await courier.tenants.delete("string")
|
|
253
|
+
*/
|
|
197
254
|
delete(tenantId, requestOptions) {
|
|
198
255
|
var _a, _b;
|
|
199
256
|
return __awaiter(this, void 0, void 0, function* () {
|
|
200
257
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
201
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CourierEnvironment.Production, `/tenants/${tenantId}`),
|
|
258
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CourierEnvironment.Production, `/tenants/${encodeURIComponent(tenantId)}`),
|
|
202
259
|
method: "DELETE",
|
|
203
260
|
headers: {
|
|
204
261
|
Authorization: yield this._getAuthorizationHeader(),
|
|
205
262
|
"X-Fern-Language": "JavaScript",
|
|
206
263
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
207
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
264
|
+
"X-Fern-SDK-Version": "v6.1.3",
|
|
265
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
266
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
208
267
|
},
|
|
209
268
|
contentType: "application/json",
|
|
210
269
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -235,7 +294,17 @@ class Tenants {
|
|
|
235
294
|
});
|
|
236
295
|
}
|
|
237
296
|
/**
|
|
297
|
+
* @param {string} tenantId - Id of the tenant for user membership.
|
|
298
|
+
* @param {Courier.ListUsersForTenantParams} request
|
|
299
|
+
* @param {Tenants.RequestOptions} requestOptions - Request-specific configuration.
|
|
300
|
+
*
|
|
238
301
|
* @throws {@link Courier.BadRequestError}
|
|
302
|
+
*
|
|
303
|
+
* @example
|
|
304
|
+
* await courier.tenants.getUsersByTenant("string", {
|
|
305
|
+
* limit: 1,
|
|
306
|
+
* cursor: "string"
|
|
307
|
+
* })
|
|
239
308
|
*/
|
|
240
309
|
getUsersByTenant(tenantId, request = {}, requestOptions) {
|
|
241
310
|
var _a, _b;
|
|
@@ -249,13 +318,15 @@ class Tenants {
|
|
|
249
318
|
_queryParams["cursor"] = cursor;
|
|
250
319
|
}
|
|
251
320
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
252
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CourierEnvironment.Production, `/tenants/${tenantId}/users`),
|
|
321
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CourierEnvironment.Production, `/tenants/${encodeURIComponent(tenantId)}/users`),
|
|
253
322
|
method: "GET",
|
|
254
323
|
headers: {
|
|
255
324
|
Authorization: yield this._getAuthorizationHeader(),
|
|
256
325
|
"X-Fern-Language": "JavaScript",
|
|
257
326
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
258
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
327
|
+
"X-Fern-SDK-Version": "v6.1.3",
|
|
328
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
329
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
259
330
|
},
|
|
260
331
|
contentType: "application/json",
|
|
261
332
|
queryParameters: _queryParams,
|
|
@@ -291,10 +362,116 @@ class Tenants {
|
|
|
291
362
|
}
|
|
292
363
|
});
|
|
293
364
|
}
|
|
365
|
+
/**
|
|
366
|
+
* @param {string} tenantId - Id of the tenant to update the default preferences for.
|
|
367
|
+
* @param {string} topicId - Id fo the susbcription topic you want to have a default preference for.
|
|
368
|
+
* @param {Courier.SubscriptionTopicNew} request
|
|
369
|
+
* @param {Tenants.RequestOptions} requestOptions - Request-specific configuration.
|
|
370
|
+
*
|
|
371
|
+
* @example
|
|
372
|
+
* await courier.tenants.createOrReplaceDefaultPreferencesForTopic("tenantABC", "HB529N49MD4D5PMX9WR5P4JH78NA", {
|
|
373
|
+
* status: Courier.SubscriptionTopicStatus.OptedIn,
|
|
374
|
+
* has_custom_routing: true,
|
|
375
|
+
* custom_routing: [Courier.ChannelClassification.Inbox]
|
|
376
|
+
* })
|
|
377
|
+
*/
|
|
378
|
+
createOrReplaceDefaultPreferencesForTopic(tenantId, topicId, request, requestOptions) {
|
|
379
|
+
var _a, _b;
|
|
380
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
381
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
382
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CourierEnvironment.Production, `/tenants/${encodeURIComponent(tenantId)}/default_preferences/items/${encodeURIComponent(topicId)}`),
|
|
383
|
+
method: "PUT",
|
|
384
|
+
headers: {
|
|
385
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
386
|
+
"X-Fern-Language": "JavaScript",
|
|
387
|
+
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
388
|
+
"X-Fern-SDK-Version": "v6.1.3",
|
|
389
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
390
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
391
|
+
},
|
|
392
|
+
contentType: "application/json",
|
|
393
|
+
body: request,
|
|
394
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
395
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
396
|
+
});
|
|
397
|
+
if (_response.ok) {
|
|
398
|
+
return;
|
|
399
|
+
}
|
|
400
|
+
if (_response.error.reason === "status-code") {
|
|
401
|
+
throw new errors.CourierError({
|
|
402
|
+
statusCode: _response.error.statusCode,
|
|
403
|
+
body: _response.error.body,
|
|
404
|
+
});
|
|
405
|
+
}
|
|
406
|
+
switch (_response.error.reason) {
|
|
407
|
+
case "non-json":
|
|
408
|
+
throw new errors.CourierError({
|
|
409
|
+
statusCode: _response.error.statusCode,
|
|
410
|
+
body: _response.error.rawBody,
|
|
411
|
+
});
|
|
412
|
+
case "timeout":
|
|
413
|
+
throw new errors.CourierTimeoutError();
|
|
414
|
+
case "unknown":
|
|
415
|
+
throw new errors.CourierError({
|
|
416
|
+
message: _response.error.errorMessage,
|
|
417
|
+
});
|
|
418
|
+
}
|
|
419
|
+
});
|
|
420
|
+
}
|
|
421
|
+
/**
|
|
422
|
+
* @param {string} tenantId - Id of the tenant to update the default preferences for.
|
|
423
|
+
* @param {string} topicId - Id fo the susbcription topic you want to have a default preference for.
|
|
424
|
+
* @param {Tenants.RequestOptions} requestOptions - Request-specific configuration.
|
|
425
|
+
*
|
|
426
|
+
* @example
|
|
427
|
+
* await courier.tenants.removeDefaultPreferencesForTopic("string", "string")
|
|
428
|
+
*/
|
|
429
|
+
removeDefaultPreferencesForTopic(tenantId, topicId, requestOptions) {
|
|
430
|
+
var _a, _b;
|
|
431
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
432
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
433
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CourierEnvironment.Production, `/tenants/${encodeURIComponent(tenantId)}/default_preferences/items/${encodeURIComponent(topicId)}`),
|
|
434
|
+
method: "DELETE",
|
|
435
|
+
headers: {
|
|
436
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
437
|
+
"X-Fern-Language": "JavaScript",
|
|
438
|
+
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
439
|
+
"X-Fern-SDK-Version": "v6.1.3",
|
|
440
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
441
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
442
|
+
},
|
|
443
|
+
contentType: "application/json",
|
|
444
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
445
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
446
|
+
});
|
|
447
|
+
if (_response.ok) {
|
|
448
|
+
return;
|
|
449
|
+
}
|
|
450
|
+
if (_response.error.reason === "status-code") {
|
|
451
|
+
throw new errors.CourierError({
|
|
452
|
+
statusCode: _response.error.statusCode,
|
|
453
|
+
body: _response.error.body,
|
|
454
|
+
});
|
|
455
|
+
}
|
|
456
|
+
switch (_response.error.reason) {
|
|
457
|
+
case "non-json":
|
|
458
|
+
throw new errors.CourierError({
|
|
459
|
+
statusCode: _response.error.statusCode,
|
|
460
|
+
body: _response.error.rawBody,
|
|
461
|
+
});
|
|
462
|
+
case "timeout":
|
|
463
|
+
throw new errors.CourierTimeoutError();
|
|
464
|
+
case "unknown":
|
|
465
|
+
throw new errors.CourierError({
|
|
466
|
+
message: _response.error.errorMessage,
|
|
467
|
+
});
|
|
468
|
+
}
|
|
469
|
+
});
|
|
470
|
+
}
|
|
294
471
|
_getAuthorizationHeader() {
|
|
295
472
|
var _a;
|
|
296
473
|
return __awaiter(this, void 0, void 0, function* () {
|
|
297
|
-
const bearer = (_a = (yield core.Supplier.get(this._options.authorizationToken))) !== null && _a !== void 0 ? _a : process.env["COURIER_AUTH_TOKEN"];
|
|
474
|
+
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"];
|
|
298
475
|
if (bearer == null) {
|
|
299
476
|
throw new errors.CourierError({
|
|
300
477
|
message: "Please specify COURIER_AUTH_TOKEN when instantiating the client.",
|
|
@@ -1,9 +1,21 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
+
/**
|
|
5
|
+
* @example
|
|
6
|
+
* {
|
|
7
|
+
* parent_tenant_id: "string",
|
|
8
|
+
* limit: 1,
|
|
9
|
+
* cursor: "string"
|
|
10
|
+
* }
|
|
11
|
+
*/
|
|
4
12
|
export interface ListTenantParams {
|
|
5
13
|
/**
|
|
6
|
-
*
|
|
14
|
+
* Filter the list of tenants by parent_id
|
|
15
|
+
*/
|
|
16
|
+
parent_tenant_id?: string;
|
|
17
|
+
/**
|
|
18
|
+
* The number of tenants to return
|
|
7
19
|
* (defaults to 20, maximum value of 100)
|
|
8
20
|
*/
|
|
9
21
|
limit?: number;
|
|
@@ -1,7 +1,28 @@
|
|
|
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
|
+
/**
|
|
6
|
+
* @example
|
|
7
|
+
* {
|
|
8
|
+
* name: "string",
|
|
9
|
+
* parent_tenant_id: "string",
|
|
10
|
+
* default_preferences: {
|
|
11
|
+
* items: [{}]
|
|
12
|
+
* },
|
|
13
|
+
* properties: {
|
|
14
|
+
* "string": {
|
|
15
|
+
* "key": "value"
|
|
16
|
+
* }
|
|
17
|
+
* },
|
|
18
|
+
* user_profile: {
|
|
19
|
+
* "string": {
|
|
20
|
+
* "key": "value"
|
|
21
|
+
* }
|
|
22
|
+
* },
|
|
23
|
+
* brand_id: "string"
|
|
24
|
+
* }
|
|
25
|
+
*/
|
|
5
26
|
export interface TenantCreateOrReplaceParams {
|
|
6
27
|
/** Name of the tenant. */
|
|
7
28
|
name: string;
|
|
@@ -10,7 +31,7 @@ export interface TenantCreateOrReplaceParams {
|
|
|
10
31
|
/** Defines the preferences used for the tenant when the user hasn't specified their own. */
|
|
11
32
|
default_preferences?: Courier.DefaultPreferences;
|
|
12
33
|
/** Arbitrary properties accessible to a template. */
|
|
13
|
-
properties?:
|
|
34
|
+
properties?: Record<string, any>;
|
|
14
35
|
/** A user profile object merged with user profile on send. */
|
|
15
36
|
user_profile?: Record<string, any>;
|
|
16
37
|
/** Brand to be used for the account when one is not specified by the send call. */
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { TenantCreateOrReplaceParams } from "./TenantCreateOrReplaceParams";
|
|
2
|
-
export { ListTenantParams } from "./ListTenantParams";
|
|
3
|
-
export { ListUsersForTenantParams } from "./ListUsersForTenantParams";
|
|
1
|
+
export { type TenantCreateOrReplaceParams } from "./TenantCreateOrReplaceParams";
|
|
2
|
+
export { type ListTenantParams } from "./ListTenantParams";
|
|
3
|
+
export { type ListUsersForTenantParams } from "./ListUsersForTenantParams";
|
|
@@ -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 DefaultPreferences {
|
|
6
|
-
items
|
|
6
|
+
items?: Courier.SubscriptionTopic[];
|
|
7
7
|
}
|
|
@@ -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 ListUsersForTenantResponse {
|
|
6
6
|
items?: Courier.UserTenantAssociation[];
|
|
7
7
|
/** Set to true when there are more pages that can be retrieved. */
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
import * as Courier from "
|
|
5
|
-
export interface SubscriptionTopic {
|
|
4
|
+
import * as Courier from "../../../index";
|
|
5
|
+
export interface SubscriptionTopic extends Courier.SubscriptionTopicNew {
|
|
6
6
|
/** Topic ID */
|
|
7
7
|
id: string;
|
|
8
|
-
status: Courier.SubscriptionTopicStatus;
|
|
9
8
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Courier from "../../../index";
|
|
5
|
+
export interface SubscriptionTopicNew {
|
|
6
|
+
status: Courier.SubscriptionTopicStatus;
|
|
7
|
+
/** Override channel routing with custom preferences. This will override any template prefernces that are set, but a user can still customize their preferences */
|
|
8
|
+
has_custom_routing?: boolean;
|
|
9
|
+
/** The default channels to send to this tenant when has_custom_routing is enabled */
|
|
10
|
+
custom_routing?: Courier.ChannelClassification[];
|
|
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 Tenant {
|
|
6
6
|
/** Id of the tenant. */
|
|
7
7
|
id: string;
|
|
@@ -12,7 +12,7 @@ export interface Tenant {
|
|
|
12
12
|
/** Defines the preferences used for the account when the user hasn't specified their own. */
|
|
13
13
|
default_preferences?: Courier.DefaultPreferences;
|
|
14
14
|
/** Arbitrary properties accessible to a template. */
|
|
15
|
-
properties?:
|
|
15
|
+
properties?: Record<string, any>;
|
|
16
16
|
/** A user profile object merged with user profile on send. */
|
|
17
17
|
user_profile?: Record<string, any>;
|
|
18
18
|
/** Brand to be used for the account when one is not specified by the send call. */
|
|
@@ -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 TenantListResponse {
|
|
6
6
|
/** A pointer to the next page of results. Defined only when has_more is set to true. */
|
|
7
7
|
cursor?: string;
|
|
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./DefaultPreferences"), exports);
|
|
18
|
+
__exportStar(require("./SubscriptionTopicNew"), exports);
|
|
18
19
|
__exportStar(require("./SubscriptionTopic"), exports);
|
|
19
20
|
__exportStar(require("./SubscriptionTopicStatus"), exports);
|
|
20
21
|
__exportStar(require("./Tenant"), exports);
|
|
@@ -19,12 +19,29 @@ export declare class Translations {
|
|
|
19
19
|
constructor(_options?: Translations.Options);
|
|
20
20
|
/**
|
|
21
21
|
* Get translations by locale
|
|
22
|
+
*
|
|
23
|
+
* @param {string} domain - The domain you want to retrieve translations for. Only `default` is supported at the moment
|
|
24
|
+
* @param {string} locale - The locale you want to retrieve the translations for
|
|
25
|
+
* @param {Translations.RequestOptions} requestOptions - Request-specific configuration.
|
|
26
|
+
*
|
|
22
27
|
* @throws {@link Courier.NotFoundError}
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* await courier.translations.get("string", "string")
|
|
23
31
|
*/
|
|
24
32
|
get(domain: string, locale: string, requestOptions?: Translations.RequestOptions): Promise<string>;
|
|
25
33
|
/**
|
|
26
34
|
* Update a translation
|
|
35
|
+
*
|
|
36
|
+
* @param {string} domain - The domain you want to retrieve translations for. Only `default` is supported at the moment
|
|
37
|
+
* @param {string} locale - The locale you want to retrieve the translations for
|
|
38
|
+
* @param {string} request
|
|
39
|
+
* @param {Translations.RequestOptions} requestOptions - Request-specific configuration.
|
|
40
|
+
*
|
|
27
41
|
* @throws {@link Courier.NotFoundError}
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* await courier.translations.update("string", "string", "string")
|
|
28
45
|
*/
|
|
29
46
|
update(domain: string, locale: string, request: string, requestOptions?: Translations.RequestOptions): Promise<void>;
|
|
30
47
|
protected _getAuthorizationHeader(): Promise<string>;
|