@trycourier/courier 6.1.0 → 6.1.2
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/README.md +5 -5
- 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 +45 -2
- package/api/resources/automations/client/Client.js +54 -11
- package/api/resources/automations/types/AccessorType.d.ts +6 -0
- package/api/resources/automations/types/AccessorType.js +5 -0
- 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/AutomationAddToBatchMaxItemsType.d.ts +4 -0
- package/api/resources/automations/types/AutomationAddToBatchMaxItemsType.js +5 -0
- package/api/resources/automations/types/AutomationAddToBatchRetain.d.ts +34 -0
- package/api/resources/automations/types/AutomationAddToBatchRetain.js +5 -0
- package/api/resources/automations/types/AutomationAddToBatchRetainType.d.ts +10 -0
- package/api/resources/automations/types/AutomationAddToBatchRetainType.js +12 -0
- package/api/resources/automations/types/AutomationAddToBatchScope.d.ts +9 -0
- package/api/resources/automations/types/AutomationAddToBatchScope.js +11 -0
- package/api/resources/automations/types/AutomationAddToBatchStep.d.ts +39 -0
- package/api/resources/automations/types/AutomationAddToBatchStep.js +5 -0
- package/api/resources/automations/types/AutomationAddToDigestStep.d.ts +16 -0
- package/api/resources/automations/types/AutomationAddToDigestStep.js +5 -0
- package/api/resources/automations/types/AutomationCancelStep.d.ts +1 -1
- package/api/resources/automations/types/AutomationDelayStep.d.ts +4 -1
- package/api/resources/automations/types/AutomationFetchDataStep.d.ts +31 -0
- package/api/resources/automations/types/AutomationFetchDataStep.js +5 -0
- package/api/resources/automations/types/AutomationFetchDataWebhook.d.ts +11 -0
- package/api/resources/automations/types/AutomationFetchDataWebhook.js +5 -0
- package/api/resources/automations/types/AutomationFetchDataWebhookMethod.d.ts +8 -0
- package/api/resources/automations/types/AutomationFetchDataWebhookMethod.js +10 -0
- 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 +2 -2
- package/api/resources/automations/types/AutomationThrottleOnThrottle.d.ts +7 -0
- package/api/resources/automations/types/AutomationThrottleOnThrottle.js +5 -0
- package/api/resources/automations/types/AutomationThrottleScope.d.ts +9 -0
- package/api/resources/automations/types/AutomationThrottleScope.js +11 -0
- package/api/resources/automations/types/AutomationThrottleStep.d.ts +31 -0
- package/api/resources/automations/types/AutomationThrottleStep.js +5 -0
- package/api/resources/automations/types/AutomationUpdateProfileStep.d.ts +1 -1
- package/api/resources/automations/types/AutomationV2SendStep.d.ts +1 -1
- package/api/resources/automations/types/index.d.ts +13 -1
- package/api/resources/automations/types/index.js +13 -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 +110 -19
- package/api/resources/messages/client/requests/GetMessageHistoryRequest.d.ts +6 -0
- package/api/resources/messages/client/requests/ListMessagesRequest.d.ts +34 -3
- 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/MessageStatus.d.ts +4 -0
- package/api/resources/messages/types/MessageStatus.js +1 -0
- 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 +8 -0
- package/api/resources/send/types/BaseMessageSendTo.js +5 -0
- 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 +2 -4
- 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 +2 -2
- package/api/resources/send/types/RecipientData.d.ts +4 -0
- package/api/resources/send/types/RecipientData.js +5 -0
- 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 +2 -4
- package/api/resources/send/types/Timeout.d.ts +1 -1
- package/api/resources/send/types/UserRecipient.d.ts +1 -1
- package/api/resources/send/types/index.d.ts +2 -0
- package/api/resources/send/types/index.js +2 -0
- 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 +31 -1
- package/api/resources/users/resources/preferences/client/Client.js +45 -9
- package/api/resources/users/resources/preferences/client/requests/UserPreferencesUpdateParams.d.ts +12 -6
- 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 +10 -0
- package/api/resources/users/resources/preferences/types/TopicPreferenceUpdate.js +5 -0
- 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/preferences/types/index.d.ts +1 -0
- package/api/resources/users/resources/preferences/types/index.js +1 -0
- 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 +64 -1
- package/api/resources/users/resources/tokens/client/Client.js +86 -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 +45 -2
- package/dist/api/resources/automations/client/Client.js +54 -11
- package/dist/api/resources/automations/types/AccessorType.d.ts +6 -0
- package/dist/api/resources/automations/types/AccessorType.js +5 -0
- 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/AutomationAddToBatchMaxItemsType.d.ts +4 -0
- package/dist/api/resources/automations/types/AutomationAddToBatchMaxItemsType.js +5 -0
- package/dist/api/resources/automations/types/AutomationAddToBatchRetain.d.ts +34 -0
- package/dist/api/resources/automations/types/AutomationAddToBatchRetain.js +5 -0
- package/dist/api/resources/automations/types/AutomationAddToBatchRetainType.d.ts +10 -0
- package/dist/api/resources/automations/types/AutomationAddToBatchRetainType.js +12 -0
- package/dist/api/resources/automations/types/AutomationAddToBatchScope.d.ts +9 -0
- package/dist/api/resources/automations/types/AutomationAddToBatchScope.js +11 -0
- package/dist/api/resources/automations/types/AutomationAddToBatchStep.d.ts +39 -0
- package/dist/api/resources/automations/types/AutomationAddToBatchStep.js +5 -0
- package/dist/api/resources/automations/types/AutomationAddToDigestStep.d.ts +16 -0
- package/dist/api/resources/automations/types/AutomationAddToDigestStep.js +5 -0
- package/dist/api/resources/automations/types/AutomationCancelStep.d.ts +1 -1
- package/dist/api/resources/automations/types/AutomationDelayStep.d.ts +4 -1
- package/dist/api/resources/automations/types/AutomationFetchDataStep.d.ts +31 -0
- package/dist/api/resources/automations/types/AutomationFetchDataStep.js +5 -0
- package/dist/api/resources/automations/types/AutomationFetchDataWebhook.d.ts +11 -0
- package/dist/api/resources/automations/types/AutomationFetchDataWebhook.js +5 -0
- package/dist/api/resources/automations/types/AutomationFetchDataWebhookMethod.d.ts +8 -0
- package/dist/api/resources/automations/types/AutomationFetchDataWebhookMethod.js +10 -0
- 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 +2 -2
- package/dist/api/resources/automations/types/AutomationThrottleOnThrottle.d.ts +7 -0
- package/dist/api/resources/automations/types/AutomationThrottleOnThrottle.js +5 -0
- package/dist/api/resources/automations/types/AutomationThrottleScope.d.ts +9 -0
- package/dist/api/resources/automations/types/AutomationThrottleScope.js +11 -0
- package/dist/api/resources/automations/types/AutomationThrottleStep.d.ts +31 -0
- package/dist/api/resources/automations/types/AutomationThrottleStep.js +5 -0
- 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/automations/types/index.d.ts +13 -1
- package/dist/api/resources/automations/types/index.js +13 -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 +110 -19
- package/dist/api/resources/messages/client/requests/GetMessageHistoryRequest.d.ts +6 -0
- package/dist/api/resources/messages/client/requests/ListMessagesRequest.d.ts +34 -3
- 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/MessageStatus.d.ts +4 -0
- package/dist/api/resources/messages/types/MessageStatus.js +1 -0
- 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 +8 -0
- package/dist/api/resources/send/types/BaseMessageSendTo.js +5 -0
- 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 +2 -4
- 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 +2 -2
- package/dist/api/resources/send/types/RecipientData.d.ts +4 -0
- package/dist/api/resources/send/types/RecipientData.js +5 -0
- 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 +2 -4
- 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/send/types/index.d.ts +2 -0
- package/dist/api/resources/send/types/index.js +2 -0
- 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 +31 -1
- package/dist/api/resources/users/resources/preferences/client/Client.js +45 -9
- package/dist/api/resources/users/resources/preferences/client/requests/UserPreferencesUpdateParams.d.ts +12 -6
- 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 +10 -0
- package/dist/api/resources/users/resources/preferences/types/TopicPreferenceUpdate.js +5 -0
- 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/preferences/types/index.d.ts +1 -0
- package/dist/api/resources/users/resources/preferences/types/index.js +1 -0
- 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 +64 -1
- package/dist/api/resources/users/resources/tokens/client/Client.js +86 -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/api/resources/automations/types/AutomationStepAction.d.ts +0 -12
- package/api/resources/automations/types/AutomationStepAction.js +0 -14
- package/dist/api/resources/automations/types/AutomationStepAction.d.ts +0 -12
- package/dist/api/resources/automations/types/AutomationStepAction.js +0 -14
- package/tests/client.test.ts +0 -11
|
@@ -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>;
|
|
@@ -41,28 +41,38 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
41
41
|
exports.Translations = 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 Translations {
|
|
48
48
|
constructor(_options = {}) {
|
|
49
49
|
this._options = _options;
|
|
50
50
|
}
|
|
51
51
|
/**
|
|
52
52
|
* Get translations by locale
|
|
53
|
+
*
|
|
54
|
+
* @param {string} domain - The domain you want to retrieve translations for. Only `default` is supported at the moment
|
|
55
|
+
* @param {string} locale - The locale you want to retrieve the translations for
|
|
56
|
+
* @param {Translations.RequestOptions} requestOptions - Request-specific configuration.
|
|
57
|
+
*
|
|
53
58
|
* @throws {@link Courier.NotFoundError}
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* await courier.translations.get("string", "string")
|
|
54
62
|
*/
|
|
55
63
|
get(domain, locale, requestOptions) {
|
|
56
64
|
var _a, _b;
|
|
57
65
|
return __awaiter(this, void 0, void 0, function* () {
|
|
58
66
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
59
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CourierEnvironment.Production, `/translations/${domain}/${locale}`),
|
|
67
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CourierEnvironment.Production, `/translations/${encodeURIComponent(domain)}/${encodeURIComponent(locale)}`),
|
|
60
68
|
method: "GET",
|
|
61
69
|
headers: {
|
|
62
70
|
Authorization: yield this._getAuthorizationHeader(),
|
|
63
71
|
"X-Fern-Language": "JavaScript",
|
|
64
72
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
65
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
73
|
+
"X-Fern-SDK-Version": "v6.1.2",
|
|
74
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
75
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
66
76
|
},
|
|
67
77
|
contentType: "application/json",
|
|
68
78
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -99,19 +109,30 @@ class Translations {
|
|
|
99
109
|
}
|
|
100
110
|
/**
|
|
101
111
|
* Update a translation
|
|
112
|
+
*
|
|
113
|
+
* @param {string} domain - The domain you want to retrieve translations for. Only `default` is supported at the moment
|
|
114
|
+
* @param {string} locale - The locale you want to retrieve the translations for
|
|
115
|
+
* @param {string} request
|
|
116
|
+
* @param {Translations.RequestOptions} requestOptions - Request-specific configuration.
|
|
117
|
+
*
|
|
102
118
|
* @throws {@link Courier.NotFoundError}
|
|
119
|
+
*
|
|
120
|
+
* @example
|
|
121
|
+
* await courier.translations.update("string", "string", "string")
|
|
103
122
|
*/
|
|
104
123
|
update(domain, locale, request, requestOptions) {
|
|
105
124
|
var _a, _b;
|
|
106
125
|
return __awaiter(this, void 0, void 0, function* () {
|
|
107
126
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
108
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CourierEnvironment.Production, `/translations/${domain}/${locale}`),
|
|
127
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CourierEnvironment.Production, `/translations/${encodeURIComponent(domain)}/${encodeURIComponent(locale)}`),
|
|
109
128
|
method: "PUT",
|
|
110
129
|
headers: {
|
|
111
130
|
Authorization: yield this._getAuthorizationHeader(),
|
|
112
131
|
"X-Fern-Language": "JavaScript",
|
|
113
132
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
114
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
133
|
+
"X-Fern-SDK-Version": "v6.1.2",
|
|
134
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
135
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
115
136
|
},
|
|
116
137
|
contentType: "application/json",
|
|
117
138
|
body: request,
|
|
@@ -150,7 +171,7 @@ class Translations {
|
|
|
150
171
|
_getAuthorizationHeader() {
|
|
151
172
|
var _a;
|
|
152
173
|
return __awaiter(this, void 0, void 0, function* () {
|
|
153
|
-
const bearer = (_a = (yield core.Supplier.get(this._options.authorizationToken))) !== null && _a !== void 0 ? _a : process.env["COURIER_AUTH_TOKEN"];
|
|
174
|
+
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"];
|
|
154
175
|
if (bearer == null) {
|
|
155
176
|
throw new errors.CourierError({
|
|
156
177
|
message: "Please specify COURIER_AUTH_TOKEN when instantiating the client.",
|
|
@@ -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 Preferences {
|
|
8
8
|
interface Options {
|
|
9
9
|
environment?: core.Supplier<environments.CourierEnvironment | string>;
|
|
@@ -20,17 +20,47 @@ export declare class Preferences {
|
|
|
20
20
|
constructor(_options?: Preferences.Options);
|
|
21
21
|
/**
|
|
22
22
|
* Fetch all user preferences.
|
|
23
|
+
*
|
|
24
|
+
* @param {string} userId - A unique identifier associated with the user whose preferences you wish to retrieve.
|
|
25
|
+
* @param {Preferences.RequestOptions} requestOptions - Request-specific configuration.
|
|
26
|
+
*
|
|
23
27
|
* @throws {@link Courier.BadRequestError}
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* await courier.users.preferences.list("string")
|
|
24
31
|
*/
|
|
25
32
|
list(userId: string, requestOptions?: Preferences.RequestOptions): Promise<Courier.users.UserPreferencesListResponse>;
|
|
26
33
|
/**
|
|
27
34
|
* Fetch user preferences for a specific subscription topic.
|
|
35
|
+
*
|
|
36
|
+
* @param {string} userId - A unique identifier associated with the user whose preferences you wish to retrieve.
|
|
37
|
+
* @param {string} topicId - A unique identifier associated with a subscription topic.
|
|
38
|
+
* @param {Preferences.RequestOptions} requestOptions - Request-specific configuration.
|
|
39
|
+
*
|
|
28
40
|
* @throws {@link Courier.NotFoundError}
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* await courier.users.preferences.get("string", "string")
|
|
29
44
|
*/
|
|
30
45
|
get(userId: string, topicId: string, requestOptions?: Preferences.RequestOptions): Promise<Courier.users.UserPreferencesGetResponse>;
|
|
31
46
|
/**
|
|
32
47
|
* Update or Create user preferences for a specific subscription topic.
|
|
48
|
+
*
|
|
49
|
+
* @param {string} userId - A unique identifier associated with the user whose preferences you wish to retrieve.
|
|
50
|
+
* @param {string} topicId - A unique identifier associated with a subscription topic.
|
|
51
|
+
* @param {Courier.users.UserPreferencesUpdateParams} request
|
|
52
|
+
* @param {Preferences.RequestOptions} requestOptions - Request-specific configuration.
|
|
53
|
+
*
|
|
33
54
|
* @throws {@link Courier.BadRequestError}
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* await courier.users.preferences.update("abc-123", "74Q4QGFBEX481DP6JRPMV751H4XT", {
|
|
58
|
+
* topic: {
|
|
59
|
+
* status: Courier.PreferenceStatus.OptedIn,
|
|
60
|
+
* has_custom_routing: true,
|
|
61
|
+
* custom_routing: [Courier.ChannelClassification.Inbox, Courier.ChannelClassification.Email]
|
|
62
|
+
* }
|
|
63
|
+
* })
|
|
34
64
|
*/
|
|
35
65
|
update(userId: string, topicId: string, request: Courier.users.UserPreferencesUpdateParams, requestOptions?: Preferences.RequestOptions): Promise<Courier.users.UserPreferencesUpdateResponse>;
|
|
36
66
|
protected _getAuthorizationHeader(): Promise<string>;
|
|
@@ -41,28 +41,37 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
41
41
|
exports.Preferences = 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 Preferences {
|
|
48
48
|
constructor(_options = {}) {
|
|
49
49
|
this._options = _options;
|
|
50
50
|
}
|
|
51
51
|
/**
|
|
52
52
|
* Fetch all user preferences.
|
|
53
|
+
*
|
|
54
|
+
* @param {string} userId - A unique identifier associated with the user whose preferences you wish to retrieve.
|
|
55
|
+
* @param {Preferences.RequestOptions} requestOptions - Request-specific configuration.
|
|
56
|
+
*
|
|
53
57
|
* @throws {@link Courier.BadRequestError}
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* await courier.users.preferences.list("string")
|
|
54
61
|
*/
|
|
55
62
|
list(userId, requestOptions) {
|
|
56
63
|
var _a, _b;
|
|
57
64
|
return __awaiter(this, void 0, void 0, function* () {
|
|
58
65
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
59
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CourierEnvironment.Production, `/users/${userId}/preferences`),
|
|
66
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CourierEnvironment.Production, `/users/${encodeURIComponent(userId)}/preferences`),
|
|
60
67
|
method: "GET",
|
|
61
68
|
headers: {
|
|
62
69
|
Authorization: yield this._getAuthorizationHeader(),
|
|
63
70
|
"X-Fern-Language": "JavaScript",
|
|
64
71
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
65
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
72
|
+
"X-Fern-SDK-Version": "v6.1.2",
|
|
73
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
74
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
66
75
|
},
|
|
67
76
|
contentType: "application/json",
|
|
68
77
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -99,19 +108,29 @@ class Preferences {
|
|
|
99
108
|
}
|
|
100
109
|
/**
|
|
101
110
|
* Fetch user preferences for a specific subscription topic.
|
|
111
|
+
*
|
|
112
|
+
* @param {string} userId - A unique identifier associated with the user whose preferences you wish to retrieve.
|
|
113
|
+
* @param {string} topicId - A unique identifier associated with a subscription topic.
|
|
114
|
+
* @param {Preferences.RequestOptions} requestOptions - Request-specific configuration.
|
|
115
|
+
*
|
|
102
116
|
* @throws {@link Courier.NotFoundError}
|
|
117
|
+
*
|
|
118
|
+
* @example
|
|
119
|
+
* await courier.users.preferences.get("string", "string")
|
|
103
120
|
*/
|
|
104
121
|
get(userId, topicId, requestOptions) {
|
|
105
122
|
var _a, _b;
|
|
106
123
|
return __awaiter(this, void 0, void 0, function* () {
|
|
107
124
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
108
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CourierEnvironment.Production, `/users/${userId}/preferences/${topicId}`),
|
|
125
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CourierEnvironment.Production, `/users/${encodeURIComponent(userId)}/preferences/${encodeURIComponent(topicId)}`),
|
|
109
126
|
method: "GET",
|
|
110
127
|
headers: {
|
|
111
128
|
Authorization: yield this._getAuthorizationHeader(),
|
|
112
129
|
"X-Fern-Language": "JavaScript",
|
|
113
130
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
114
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
131
|
+
"X-Fern-SDK-Version": "v6.1.2",
|
|
132
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
133
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
115
134
|
},
|
|
116
135
|
contentType: "application/json",
|
|
117
136
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -148,19 +167,36 @@ class Preferences {
|
|
|
148
167
|
}
|
|
149
168
|
/**
|
|
150
169
|
* Update or Create user preferences for a specific subscription topic.
|
|
170
|
+
*
|
|
171
|
+
* @param {string} userId - A unique identifier associated with the user whose preferences you wish to retrieve.
|
|
172
|
+
* @param {string} topicId - A unique identifier associated with a subscription topic.
|
|
173
|
+
* @param {Courier.users.UserPreferencesUpdateParams} request
|
|
174
|
+
* @param {Preferences.RequestOptions} requestOptions - Request-specific configuration.
|
|
175
|
+
*
|
|
151
176
|
* @throws {@link Courier.BadRequestError}
|
|
177
|
+
*
|
|
178
|
+
* @example
|
|
179
|
+
* await courier.users.preferences.update("abc-123", "74Q4QGFBEX481DP6JRPMV751H4XT", {
|
|
180
|
+
* topic: {
|
|
181
|
+
* status: Courier.PreferenceStatus.OptedIn,
|
|
182
|
+
* has_custom_routing: true,
|
|
183
|
+
* custom_routing: [Courier.ChannelClassification.Inbox, Courier.ChannelClassification.Email]
|
|
184
|
+
* }
|
|
185
|
+
* })
|
|
152
186
|
*/
|
|
153
187
|
update(userId, topicId, request, requestOptions) {
|
|
154
188
|
var _a, _b;
|
|
155
189
|
return __awaiter(this, void 0, void 0, function* () {
|
|
156
190
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
157
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CourierEnvironment.Production, `/users/${userId}/preferences/${topicId}`),
|
|
191
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CourierEnvironment.Production, `/users/${encodeURIComponent(userId)}/preferences/${encodeURIComponent(topicId)}`),
|
|
158
192
|
method: "PUT",
|
|
159
193
|
headers: {
|
|
160
194
|
Authorization: yield this._getAuthorizationHeader(),
|
|
161
195
|
"X-Fern-Language": "JavaScript",
|
|
162
196
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
163
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
197
|
+
"X-Fern-SDK-Version": "v6.1.2",
|
|
198
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
199
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
164
200
|
},
|
|
165
201
|
contentType: "application/json",
|
|
166
202
|
body: request,
|
|
@@ -199,7 +235,7 @@ class Preferences {
|
|
|
199
235
|
_getAuthorizationHeader() {
|
|
200
236
|
var _a;
|
|
201
237
|
return __awaiter(this, void 0, void 0, function* () {
|
|
202
|
-
const bearer = (_a = (yield core.Supplier.get(this._options.authorizationToken))) !== null && _a !== void 0 ? _a : process.env["COURIER_AUTH_TOKEN"];
|
|
238
|
+
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"];
|
|
203
239
|
if (bearer == null) {
|
|
204
240
|
throw new errors.CourierError({
|
|
205
241
|
message: "Please specify COURIER_AUTH_TOKEN when instantiating the client.",
|
|
@@ -1,11 +1,17 @@
|
|
|
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
|
+
* topic: {
|
|
9
|
+
* status: Courier.PreferenceStatus.OptedIn,
|
|
10
|
+
* has_custom_routing: true,
|
|
11
|
+
* custom_routing: [Courier.ChannelClassification.Inbox, Courier.ChannelClassification.Email]
|
|
12
|
+
* }
|
|
13
|
+
* }
|
|
14
|
+
*/
|
|
5
15
|
export interface UserPreferencesUpdateParams {
|
|
6
|
-
|
|
7
|
-
/** The Channels a user has chosen to receive notifications through for this topic */
|
|
8
|
-
custom_routing?: Courier.ChannelClassification[];
|
|
9
|
-
default_status: Courier.PreferenceStatus;
|
|
10
|
-
has_custom_routing?: boolean;
|
|
16
|
+
topic: Courier.users.TopicPreferenceUpdate;
|
|
11
17
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { UserPreferencesUpdateParams } from "./UserPreferencesUpdateParams";
|
|
1
|
+
export { type UserPreferencesUpdateParams } from "./UserPreferencesUpdateParams";
|
|
@@ -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 TopicPreference {
|
|
6
6
|
/** The Channels a user has chosen to receive notifications through for this topic */
|
|
7
7
|
custom_routing?: Courier.ChannelClassification[];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Courier from "../../../../../index";
|
|
5
|
+
export interface TopicPreferenceUpdate {
|
|
6
|
+
status: Courier.PreferenceStatus;
|
|
7
|
+
/** The Channels a user has chosen to receive notifications through for this topic */
|
|
8
|
+
custom_routing?: Courier.ChannelClassification[];
|
|
9
|
+
has_custom_routing?: boolean;
|
|
10
|
+
}
|
package/dist/api/resources/users/resources/preferences/types/UserPreferencesListResponse.d.ts
CHANGED
|
@@ -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 UserPreferencesListResponse {
|
|
6
6
|
paging: Courier.Paging;
|
|
7
7
|
/** The Preferences associated with the user_id. */
|
|
@@ -17,4 +17,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./UserPreferencesListResponse"), exports);
|
|
18
18
|
__exportStar(require("./UserPreferencesGetResponse"), exports);
|
|
19
19
|
__exportStar(require("./TopicPreference"), exports);
|
|
20
|
+
__exportStar(require("./TopicPreferenceUpdate"), exports);
|
|
20
21
|
__exportStar(require("./UserPreferencesUpdateResponse"), exports);
|
|
@@ -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>;
|
|
@@ -24,6 +24,24 @@ export declare class Tenants {
|
|
|
24
24
|
* A custom profile can also be supplied for each tenant.
|
|
25
25
|
* This profile will be merged with the user's main
|
|
26
26
|
* profile when sending to the user with that tenant.
|
|
27
|
+
*
|
|
28
|
+
* @param {string} userId - The user's ID. This can be any uniquely identifiable string.
|
|
29
|
+
* @param {Courier.users.AddUserToMultipleTenantsParams} request
|
|
30
|
+
* @param {Tenants.RequestOptions} requestOptions - Request-specific configuration.
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* await courier.users.tenants.addMultple("string", {
|
|
34
|
+
* tenants: [{
|
|
35
|
+
* user_id: "string",
|
|
36
|
+
* type: "user",
|
|
37
|
+
* tenant_id: "string",
|
|
38
|
+
* profile: {
|
|
39
|
+
* "string": {
|
|
40
|
+
* "key": "value"
|
|
41
|
+
* }
|
|
42
|
+
* }
|
|
43
|
+
* }]
|
|
44
|
+
* })
|
|
27
45
|
*/
|
|
28
46
|
addMultple(userId: string, request: Courier.users.AddUserToMultipleTenantsParams, requestOptions?: Tenants.RequestOptions): Promise<void>;
|
|
29
47
|
/**
|
|
@@ -32,18 +50,55 @@ export declare class Tenants {
|
|
|
32
50
|
* A custom profile can also be supplied with the tenant.
|
|
33
51
|
* This profile will be merged with the user's main profile
|
|
34
52
|
* when sending to the user with that tenant.
|
|
53
|
+
*
|
|
54
|
+
* @param {string} userId - Id of the user to be added to the supplied tenant.
|
|
55
|
+
* @param {string} tenantId - Id of the tenant the user should be added to.
|
|
56
|
+
* @param {Courier.users.AddUserToSingleTenantsParams} request
|
|
57
|
+
* @param {Tenants.RequestOptions} requestOptions - Request-specific configuration.
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* await courier.users.tenants.add("string", "string", {
|
|
61
|
+
* profile: {
|
|
62
|
+
* "string": {
|
|
63
|
+
* "key": "value"
|
|
64
|
+
* }
|
|
65
|
+
* }
|
|
66
|
+
* })
|
|
35
67
|
*/
|
|
36
|
-
add(userId: string, tenantId: string, request
|
|
68
|
+
add(userId: string, tenantId: string, request?: Courier.users.AddUserToSingleTenantsParams, requestOptions?: Tenants.RequestOptions): Promise<void>;
|
|
37
69
|
/**
|
|
38
70
|
* Removes a user from any tenants they may have been associated with.
|
|
71
|
+
*
|
|
72
|
+
* @param {string} userId - Id of the user to be removed from the supplied tenant.
|
|
73
|
+
* @param {Tenants.RequestOptions} requestOptions - Request-specific configuration.
|
|
74
|
+
*
|
|
75
|
+
* @example
|
|
76
|
+
* await courier.users.tenants.removeAll("string")
|
|
39
77
|
*/
|
|
40
78
|
removeAll(userId: string, requestOptions?: Tenants.RequestOptions): Promise<void>;
|
|
41
79
|
/**
|
|
42
80
|
* Removes a user from the supplied tenant.
|
|
81
|
+
*
|
|
82
|
+
* @param {string} userId - Id of the user to be removed from the supplied tenant.
|
|
83
|
+
* @param {string} tenantId - Id of the tenant the user should be removed from.
|
|
84
|
+
* @param {Tenants.RequestOptions} requestOptions - Request-specific configuration.
|
|
85
|
+
*
|
|
86
|
+
* @example
|
|
87
|
+
* await courier.users.tenants.remove("string", "string")
|
|
43
88
|
*/
|
|
44
89
|
remove(userId: string, tenantId: string, requestOptions?: Tenants.RequestOptions): Promise<void>;
|
|
45
90
|
/**
|
|
46
91
|
* Returns a paginated list of user tenant associations.
|
|
92
|
+
*
|
|
93
|
+
* @param {string} userId - Id of the user to retrieve all associated tenants for.
|
|
94
|
+
* @param {Courier.users.ListTenantsForUserParams} request
|
|
95
|
+
* @param {Tenants.RequestOptions} requestOptions - Request-specific configuration.
|
|
96
|
+
*
|
|
97
|
+
* @example
|
|
98
|
+
* await courier.users.tenants.list("string", {
|
|
99
|
+
* limit: 1,
|
|
100
|
+
* cursor: "string"
|
|
101
|
+
* })
|
|
47
102
|
*/
|
|
48
103
|
list(userId: string, request?: Courier.users.ListTenantsForUserParams, requestOptions?: Tenants.RequestOptions): Promise<Courier.users.ListTenantsForUserResponse>;
|
|
49
104
|
protected _getAuthorizationHeader(): Promise<string>;
|