@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
|
@@ -41,16 +41,26 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
41
41
|
exports.Lists = 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 Lists {
|
|
48
48
|
constructor(_options = {}) {
|
|
49
49
|
this._options = _options;
|
|
50
50
|
}
|
|
51
51
|
/**
|
|
52
52
|
* Returns all of the lists, with the ability to filter based on a pattern.
|
|
53
|
+
*
|
|
54
|
+
* @param {Courier.GetAllListsRequest} request
|
|
55
|
+
* @param {Lists.RequestOptions} requestOptions - Request-specific configuration.
|
|
56
|
+
*
|
|
53
57
|
* @throws {@link Courier.BadRequestError}
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* await courier.lists.list({
|
|
61
|
+
* cursor: "string",
|
|
62
|
+
* pattern: "string"
|
|
63
|
+
* })
|
|
54
64
|
*/
|
|
55
65
|
list(request = {}, requestOptions) {
|
|
56
66
|
var _a, _b;
|
|
@@ -70,7 +80,9 @@ class Lists {
|
|
|
70
80
|
Authorization: yield this._getAuthorizationHeader(),
|
|
71
81
|
"X-Fern-Language": "JavaScript",
|
|
72
82
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
73
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
83
|
+
"X-Fern-SDK-Version": "v6.1.2",
|
|
84
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
85
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
74
86
|
},
|
|
75
87
|
contentType: "application/json",
|
|
76
88
|
queryParameters: _queryParams,
|
|
@@ -108,19 +120,28 @@ class Lists {
|
|
|
108
120
|
}
|
|
109
121
|
/**
|
|
110
122
|
* Returns a list based on the list ID provided.
|
|
123
|
+
*
|
|
124
|
+
* @param {string} listId - A unique identifier representing the list you wish to retrieve.
|
|
125
|
+
* @param {Lists.RequestOptions} requestOptions - Request-specific configuration.
|
|
126
|
+
*
|
|
111
127
|
* @throws {@link Courier.NotFoundError}
|
|
128
|
+
*
|
|
129
|
+
* @example
|
|
130
|
+
* await courier.lists.get("string")
|
|
112
131
|
*/
|
|
113
132
|
get(listId, requestOptions) {
|
|
114
133
|
var _a, _b;
|
|
115
134
|
return __awaiter(this, void 0, void 0, function* () {
|
|
116
135
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
117
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CourierEnvironment.Production, `/lists/${listId}`),
|
|
136
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CourierEnvironment.Production, `/lists/${encodeURIComponent(listId)}`),
|
|
118
137
|
method: "GET",
|
|
119
138
|
headers: {
|
|
120
139
|
Authorization: yield this._getAuthorizationHeader(),
|
|
121
140
|
"X-Fern-Language": "JavaScript",
|
|
122
141
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
123
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
142
|
+
"X-Fern-SDK-Version": "v6.1.2",
|
|
143
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
144
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
124
145
|
},
|
|
125
146
|
contentType: "application/json",
|
|
126
147
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -157,18 +178,55 @@ class Lists {
|
|
|
157
178
|
}
|
|
158
179
|
/**
|
|
159
180
|
* Create or replace an existing list with the supplied values.
|
|
181
|
+
*
|
|
182
|
+
* @param {string} listId - A unique identifier representing the list you wish to retrieve.
|
|
183
|
+
* @param {Courier.ListPutParams} request
|
|
184
|
+
* @param {Lists.RequestOptions} requestOptions - Request-specific configuration.
|
|
185
|
+
*
|
|
186
|
+
* @example
|
|
187
|
+
* await courier.lists.update("string", {
|
|
188
|
+
* name: "string",
|
|
189
|
+
* preferences: {
|
|
190
|
+
* categories: {
|
|
191
|
+
* "string": {
|
|
192
|
+
* status: Courier.PreferenceStatus.OptedIn,
|
|
193
|
+
* rules: [{
|
|
194
|
+
* start: "string",
|
|
195
|
+
* until: "string"
|
|
196
|
+
* }],
|
|
197
|
+
* channel_preferences: [{
|
|
198
|
+
* channel: Courier.ChannelClassification.DirectMessage
|
|
199
|
+
* }]
|
|
200
|
+
* }
|
|
201
|
+
* },
|
|
202
|
+
* notifications: {
|
|
203
|
+
* "string": {
|
|
204
|
+
* status: Courier.PreferenceStatus.OptedIn,
|
|
205
|
+
* rules: [{
|
|
206
|
+
* start: "string",
|
|
207
|
+
* until: "string"
|
|
208
|
+
* }],
|
|
209
|
+
* channel_preferences: [{
|
|
210
|
+
* channel: Courier.ChannelClassification.DirectMessage
|
|
211
|
+
* }]
|
|
212
|
+
* }
|
|
213
|
+
* }
|
|
214
|
+
* }
|
|
215
|
+
* })
|
|
160
216
|
*/
|
|
161
217
|
update(listId, request, requestOptions) {
|
|
162
218
|
var _a, _b;
|
|
163
219
|
return __awaiter(this, void 0, void 0, function* () {
|
|
164
220
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
165
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CourierEnvironment.Production, `/lists/${listId}`),
|
|
221
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CourierEnvironment.Production, `/lists/${encodeURIComponent(listId)}`),
|
|
166
222
|
method: "PUT",
|
|
167
223
|
headers: {
|
|
168
224
|
Authorization: yield this._getAuthorizationHeader(),
|
|
169
225
|
"X-Fern-Language": "JavaScript",
|
|
170
226
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
171
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
227
|
+
"X-Fern-SDK-Version": "v6.1.2",
|
|
228
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
229
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
172
230
|
},
|
|
173
231
|
contentType: "application/json",
|
|
174
232
|
body: request,
|
|
@@ -201,18 +259,26 @@ class Lists {
|
|
|
201
259
|
}
|
|
202
260
|
/**
|
|
203
261
|
* Delete a list by list ID.
|
|
262
|
+
*
|
|
263
|
+
* @param {string} listId - A unique identifier representing the list you wish to retrieve.
|
|
264
|
+
* @param {Lists.RequestOptions} requestOptions - Request-specific configuration.
|
|
265
|
+
*
|
|
266
|
+
* @example
|
|
267
|
+
* await courier.lists.delete("string")
|
|
204
268
|
*/
|
|
205
269
|
delete(listId, requestOptions) {
|
|
206
270
|
var _a, _b;
|
|
207
271
|
return __awaiter(this, void 0, void 0, function* () {
|
|
208
272
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
209
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CourierEnvironment.Production, `/lists/${listId}`),
|
|
273
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CourierEnvironment.Production, `/lists/${encodeURIComponent(listId)}`),
|
|
210
274
|
method: "DELETE",
|
|
211
275
|
headers: {
|
|
212
276
|
Authorization: yield this._getAuthorizationHeader(),
|
|
213
277
|
"X-Fern-Language": "JavaScript",
|
|
214
278
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
215
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
279
|
+
"X-Fern-SDK-Version": "v6.1.2",
|
|
280
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
281
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
216
282
|
},
|
|
217
283
|
contentType: "application/json",
|
|
218
284
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -244,18 +310,26 @@ class Lists {
|
|
|
244
310
|
}
|
|
245
311
|
/**
|
|
246
312
|
* Restore a previously deleted list.
|
|
313
|
+
*
|
|
314
|
+
* @param {string} listId - A unique identifier representing the list you wish to retrieve.
|
|
315
|
+
* @param {Lists.RequestOptions} requestOptions - Request-specific configuration.
|
|
316
|
+
*
|
|
317
|
+
* @example
|
|
318
|
+
* await courier.lists.restore("string")
|
|
247
319
|
*/
|
|
248
320
|
restore(listId, requestOptions) {
|
|
249
321
|
var _a, _b;
|
|
250
322
|
return __awaiter(this, void 0, void 0, function* () {
|
|
251
323
|
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, `/lists/${listId}/restore`),
|
|
324
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CourierEnvironment.Production, `/lists/${encodeURIComponent(listId)}/restore`),
|
|
253
325
|
method: "PUT",
|
|
254
326
|
headers: {
|
|
255
327
|
Authorization: yield this._getAuthorizationHeader(),
|
|
256
328
|
"X-Fern-Language": "JavaScript",
|
|
257
329
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
258
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
330
|
+
"X-Fern-SDK-Version": "v6.1.2",
|
|
331
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
332
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
259
333
|
},
|
|
260
334
|
contentType: "application/json",
|
|
261
335
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -287,7 +361,17 @@ class Lists {
|
|
|
287
361
|
}
|
|
288
362
|
/**
|
|
289
363
|
* Get the list's subscriptions.
|
|
364
|
+
*
|
|
365
|
+
* @param {string} listId - A unique identifier representing the list you wish to retrieve.
|
|
366
|
+
* @param {Courier.GetSubscriptionForListRequest} request
|
|
367
|
+
* @param {Lists.RequestOptions} requestOptions - Request-specific configuration.
|
|
368
|
+
*
|
|
290
369
|
* @throws {@link Courier.NotFoundError}
|
|
370
|
+
*
|
|
371
|
+
* @example
|
|
372
|
+
* await courier.lists.getSubscribers("string", {
|
|
373
|
+
* cursor: "string"
|
|
374
|
+
* })
|
|
291
375
|
*/
|
|
292
376
|
getSubscribers(listId, request = {}, requestOptions) {
|
|
293
377
|
var _a, _b;
|
|
@@ -298,13 +382,15 @@ class Lists {
|
|
|
298
382
|
_queryParams["cursor"] = cursor;
|
|
299
383
|
}
|
|
300
384
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
301
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CourierEnvironment.Production, `/lists/${listId}/subscriptions`),
|
|
385
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CourierEnvironment.Production, `/lists/${encodeURIComponent(listId)}/subscriptions`),
|
|
302
386
|
method: "GET",
|
|
303
387
|
headers: {
|
|
304
388
|
Authorization: yield this._getAuthorizationHeader(),
|
|
305
389
|
"X-Fern-Language": "JavaScript",
|
|
306
390
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
307
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
391
|
+
"X-Fern-SDK-Version": "v6.1.2",
|
|
392
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
393
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
308
394
|
},
|
|
309
395
|
contentType: "application/json",
|
|
310
396
|
queryParameters: _queryParams,
|
|
@@ -342,19 +428,59 @@ class Lists {
|
|
|
342
428
|
}
|
|
343
429
|
/**
|
|
344
430
|
* Subscribes the users to the list, overwriting existing subscriptions. If the list does not exist, it will be automatically created.
|
|
431
|
+
*
|
|
432
|
+
* @param {string} listId - A unique identifier representing the list you wish to retrieve.
|
|
433
|
+
* @param {Courier.SubscribeUsersToListRequest} request
|
|
434
|
+
* @param {Lists.RequestOptions} requestOptions - Request-specific configuration.
|
|
435
|
+
*
|
|
345
436
|
* @throws {@link Courier.BadRequestError}
|
|
437
|
+
*
|
|
438
|
+
* @example
|
|
439
|
+
* await courier.lists.updateSubscribers("string", {
|
|
440
|
+
* recipients: [{
|
|
441
|
+
* recipientId: "string",
|
|
442
|
+
* preferences: {
|
|
443
|
+
* categories: {
|
|
444
|
+
* "string": {
|
|
445
|
+
* status: Courier.PreferenceStatus.OptedIn,
|
|
446
|
+
* rules: [{
|
|
447
|
+
* start: "string",
|
|
448
|
+
* until: "string"
|
|
449
|
+
* }],
|
|
450
|
+
* channel_preferences: [{
|
|
451
|
+
* channel: Courier.ChannelClassification.DirectMessage
|
|
452
|
+
* }]
|
|
453
|
+
* }
|
|
454
|
+
* },
|
|
455
|
+
* notifications: {
|
|
456
|
+
* "string": {
|
|
457
|
+
* status: Courier.PreferenceStatus.OptedIn,
|
|
458
|
+
* rules: [{
|
|
459
|
+
* start: "string",
|
|
460
|
+
* until: "string"
|
|
461
|
+
* }],
|
|
462
|
+
* channel_preferences: [{
|
|
463
|
+
* channel: Courier.ChannelClassification.DirectMessage
|
|
464
|
+
* }]
|
|
465
|
+
* }
|
|
466
|
+
* }
|
|
467
|
+
* }
|
|
468
|
+
* }]
|
|
469
|
+
* })
|
|
346
470
|
*/
|
|
347
471
|
updateSubscribers(listId, request, requestOptions) {
|
|
348
472
|
var _a, _b;
|
|
349
473
|
return __awaiter(this, void 0, void 0, function* () {
|
|
350
474
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
351
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CourierEnvironment.Production, `/lists/${listId}/subscriptions`),
|
|
475
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CourierEnvironment.Production, `/lists/${encodeURIComponent(listId)}/subscriptions`),
|
|
352
476
|
method: "PUT",
|
|
353
477
|
headers: {
|
|
354
478
|
Authorization: yield this._getAuthorizationHeader(),
|
|
355
479
|
"X-Fern-Language": "JavaScript",
|
|
356
480
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
357
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
481
|
+
"X-Fern-SDK-Version": "v6.1.2",
|
|
482
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
483
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
358
484
|
},
|
|
359
485
|
contentType: "application/json",
|
|
360
486
|
body: request,
|
|
@@ -392,23 +518,61 @@ class Lists {
|
|
|
392
518
|
}
|
|
393
519
|
/**
|
|
394
520
|
* Subscribes additional users to the list, without modifying existing subscriptions. If the list does not exist, it will be automatically created.
|
|
521
|
+
*
|
|
522
|
+
* @param {string} listId - A unique identifier representing the list you wish to retrieve.
|
|
523
|
+
* @param {Courier.AddSubscribersToList} request
|
|
524
|
+
* @param {Lists.IdempotentRequestOptions} requestOptions - Request-specific configuration.
|
|
525
|
+
*
|
|
395
526
|
* @throws {@link Courier.BadRequestError}
|
|
527
|
+
*
|
|
528
|
+
* @example
|
|
529
|
+
* await courier.lists.addSubscribers("string", {
|
|
530
|
+
* recipients: [{
|
|
531
|
+
* recipientId: "string",
|
|
532
|
+
* preferences: {
|
|
533
|
+
* categories: {
|
|
534
|
+
* "string": {
|
|
535
|
+
* status: Courier.PreferenceStatus.OptedIn,
|
|
536
|
+
* rules: [{
|
|
537
|
+
* start: "string",
|
|
538
|
+
* until: "string"
|
|
539
|
+
* }],
|
|
540
|
+
* channel_preferences: [{
|
|
541
|
+
* channel: Courier.ChannelClassification.DirectMessage
|
|
542
|
+
* }]
|
|
543
|
+
* }
|
|
544
|
+
* },
|
|
545
|
+
* notifications: {
|
|
546
|
+
* "string": {
|
|
547
|
+
* status: Courier.PreferenceStatus.OptedIn,
|
|
548
|
+
* rules: [{
|
|
549
|
+
* start: "string",
|
|
550
|
+
* until: "string"
|
|
551
|
+
* }],
|
|
552
|
+
* channel_preferences: [{
|
|
553
|
+
* channel: Courier.ChannelClassification.DirectMessage
|
|
554
|
+
* }]
|
|
555
|
+
* }
|
|
556
|
+
* }
|
|
557
|
+
* }
|
|
558
|
+
* }]
|
|
559
|
+
* })
|
|
396
560
|
*/
|
|
397
561
|
addSubscribers(listId, request, requestOptions) {
|
|
398
562
|
var _a, _b;
|
|
399
563
|
return __awaiter(this, void 0, void 0, function* () {
|
|
400
564
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
401
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CourierEnvironment.Production, `/lists/${listId}/subscriptions`),
|
|
565
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CourierEnvironment.Production, `/lists/${encodeURIComponent(listId)}/subscriptions`),
|
|
402
566
|
method: "POST",
|
|
403
567
|
headers: {
|
|
404
568
|
Authorization: yield this._getAuthorizationHeader(),
|
|
405
569
|
"X-Fern-Language": "JavaScript",
|
|
406
570
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
407
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
571
|
+
"X-Fern-SDK-Version": "v6.1.2",
|
|
572
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
573
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
408
574
|
"Idempotency-Key": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey) != null ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey : undefined,
|
|
409
|
-
"X-Idempotency-Expiration": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry) != null
|
|
410
|
-
? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry.toString()
|
|
411
|
-
: undefined,
|
|
575
|
+
"X-Idempotency-Expiration": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry) != null ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry : undefined,
|
|
412
576
|
},
|
|
413
577
|
contentType: "application/json",
|
|
414
578
|
body: request,
|
|
@@ -446,18 +610,55 @@ class Lists {
|
|
|
446
610
|
}
|
|
447
611
|
/**
|
|
448
612
|
* Subscribe a user to an existing list (note: if the List does not exist, it will be automatically created).
|
|
613
|
+
*
|
|
614
|
+
* @param {string} listId - A unique identifier representing the list you wish to retrieve.
|
|
615
|
+
* @param {string} userId - A unique identifier representing the recipient associated with the list
|
|
616
|
+
* @param {Courier.SubscribeUserToListRequest} request
|
|
617
|
+
* @param {Lists.RequestOptions} requestOptions - Request-specific configuration.
|
|
618
|
+
*
|
|
619
|
+
* @example
|
|
620
|
+
* await courier.lists.subscribe("string", "string", {
|
|
621
|
+
* preferences: {
|
|
622
|
+
* categories: {
|
|
623
|
+
* "string": {
|
|
624
|
+
* status: Courier.PreferenceStatus.OptedIn,
|
|
625
|
+
* rules: [{
|
|
626
|
+
* start: "string",
|
|
627
|
+
* until: "string"
|
|
628
|
+
* }],
|
|
629
|
+
* channel_preferences: [{
|
|
630
|
+
* channel: Courier.ChannelClassification.DirectMessage
|
|
631
|
+
* }]
|
|
632
|
+
* }
|
|
633
|
+
* },
|
|
634
|
+
* notifications: {
|
|
635
|
+
* "string": {
|
|
636
|
+
* status: Courier.PreferenceStatus.OptedIn,
|
|
637
|
+
* rules: [{
|
|
638
|
+
* start: "string",
|
|
639
|
+
* until: "string"
|
|
640
|
+
* }],
|
|
641
|
+
* channel_preferences: [{
|
|
642
|
+
* channel: Courier.ChannelClassification.DirectMessage
|
|
643
|
+
* }]
|
|
644
|
+
* }
|
|
645
|
+
* }
|
|
646
|
+
* }
|
|
647
|
+
* })
|
|
449
648
|
*/
|
|
450
649
|
subscribe(listId, userId, request = {}, requestOptions) {
|
|
451
650
|
var _a, _b;
|
|
452
651
|
return __awaiter(this, void 0, void 0, function* () {
|
|
453
652
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
454
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CourierEnvironment.Production, `/lists/${listId}/subscriptions/${userId}`),
|
|
653
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CourierEnvironment.Production, `/lists/${encodeURIComponent(listId)}/subscriptions/${encodeURIComponent(userId)}`),
|
|
455
654
|
method: "PUT",
|
|
456
655
|
headers: {
|
|
457
656
|
Authorization: yield this._getAuthorizationHeader(),
|
|
458
657
|
"X-Fern-Language": "JavaScript",
|
|
459
658
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
460
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
659
|
+
"X-Fern-SDK-Version": "v6.1.2",
|
|
660
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
661
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
461
662
|
},
|
|
462
663
|
contentType: "application/json",
|
|
463
664
|
body: request,
|
|
@@ -490,19 +691,29 @@ class Lists {
|
|
|
490
691
|
}
|
|
491
692
|
/**
|
|
492
693
|
* Delete a subscription to a list by list ID and user ID.
|
|
694
|
+
*
|
|
695
|
+
* @param {string} listId - A unique identifier representing the list you wish to retrieve.
|
|
696
|
+
* @param {string} userId - A unique identifier representing the recipient associated with the list
|
|
697
|
+
* @param {Lists.RequestOptions} requestOptions - Request-specific configuration.
|
|
698
|
+
*
|
|
493
699
|
* @throws {@link Courier.NotFoundError}
|
|
700
|
+
*
|
|
701
|
+
* @example
|
|
702
|
+
* await courier.lists.unsubscribe("string", "string")
|
|
494
703
|
*/
|
|
495
704
|
unsubscribe(listId, userId, requestOptions) {
|
|
496
705
|
var _a, _b;
|
|
497
706
|
return __awaiter(this, void 0, void 0, function* () {
|
|
498
707
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
499
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CourierEnvironment.Production, `/lists/${listId}/subscriptions/${userId}`),
|
|
708
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CourierEnvironment.Production, `/lists/${encodeURIComponent(listId)}/subscriptions/${encodeURIComponent(userId)}`),
|
|
500
709
|
method: "DELETE",
|
|
501
710
|
headers: {
|
|
502
711
|
Authorization: yield this._getAuthorizationHeader(),
|
|
503
712
|
"X-Fern-Language": "JavaScript",
|
|
504
713
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
505
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
714
|
+
"X-Fern-SDK-Version": "v6.1.2",
|
|
715
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
716
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
506
717
|
},
|
|
507
718
|
contentType: "application/json",
|
|
508
719
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -540,7 +751,7 @@ class Lists {
|
|
|
540
751
|
_getAuthorizationHeader() {
|
|
541
752
|
var _a;
|
|
542
753
|
return __awaiter(this, void 0, void 0, function* () {
|
|
543
|
-
const bearer = (_a = (yield core.Supplier.get(this._options.authorizationToken))) !== null && _a !== void 0 ? _a : process.env["COURIER_AUTH_TOKEN"];
|
|
754
|
+
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"];
|
|
544
755
|
if (bearer == null) {
|
|
545
756
|
throw new errors.CourierError({
|
|
546
757
|
message: "Please specify COURIER_AUTH_TOKEN when instantiating the client.",
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Courier from "../../../../index";
|
|
5
|
+
/**
|
|
6
|
+
* @example
|
|
7
|
+
* {
|
|
8
|
+
* recipients: [{
|
|
9
|
+
* recipientId: "string",
|
|
10
|
+
* preferences: {
|
|
11
|
+
* categories: {
|
|
12
|
+
* "string": {
|
|
13
|
+
* status: Courier.PreferenceStatus.OptedIn,
|
|
14
|
+
* rules: [{
|
|
15
|
+
* start: "string",
|
|
16
|
+
* until: "string"
|
|
17
|
+
* }],
|
|
18
|
+
* channel_preferences: [{
|
|
19
|
+
* channel: Courier.ChannelClassification.DirectMessage
|
|
20
|
+
* }]
|
|
21
|
+
* }
|
|
22
|
+
* },
|
|
23
|
+
* notifications: {
|
|
24
|
+
* "string": {
|
|
25
|
+
* status: Courier.PreferenceStatus.OptedIn,
|
|
26
|
+
* rules: [{
|
|
27
|
+
* start: "string",
|
|
28
|
+
* until: "string"
|
|
29
|
+
* }],
|
|
30
|
+
* channel_preferences: [{
|
|
31
|
+
* channel: Courier.ChannelClassification.DirectMessage
|
|
32
|
+
* }]
|
|
33
|
+
* }
|
|
34
|
+
* }
|
|
35
|
+
* }
|
|
36
|
+
* }]
|
|
37
|
+
* }
|
|
38
|
+
*/
|
|
39
|
+
export interface AddSubscribersToList {
|
|
40
|
+
recipients: Courier.PutSubscriptionsRecipient[];
|
|
41
|
+
}
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
+
/**
|
|
5
|
+
* @example
|
|
6
|
+
* {
|
|
7
|
+
* cursor: "string",
|
|
8
|
+
* pattern: "string"
|
|
9
|
+
* }
|
|
10
|
+
*/
|
|
4
11
|
export interface GetAllListsRequest {
|
|
5
12
|
/**
|
|
6
13
|
* A unique identifier that allows for fetching the next page of lists.
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
+
/**
|
|
5
|
+
* @example
|
|
6
|
+
* {
|
|
7
|
+
* cursor: "string"
|
|
8
|
+
* }
|
|
9
|
+
*/
|
|
4
10
|
export interface GetSubscriptionForListRequest {
|
|
5
11
|
/**
|
|
6
12
|
* A unique identifier that allows for fetching the next set of list subscriptions
|
|
@@ -1,7 +1,38 @@
|
|
|
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
|
+
* preferences: {
|
|
9
|
+
* categories: {
|
|
10
|
+
* "string": {
|
|
11
|
+
* status: Courier.PreferenceStatus.OptedIn,
|
|
12
|
+
* rules: [{
|
|
13
|
+
* start: "string",
|
|
14
|
+
* until: "string"
|
|
15
|
+
* }],
|
|
16
|
+
* channel_preferences: [{
|
|
17
|
+
* channel: Courier.ChannelClassification.DirectMessage
|
|
18
|
+
* }]
|
|
19
|
+
* }
|
|
20
|
+
* },
|
|
21
|
+
* notifications: {
|
|
22
|
+
* "string": {
|
|
23
|
+
* status: Courier.PreferenceStatus.OptedIn,
|
|
24
|
+
* rules: [{
|
|
25
|
+
* start: "string",
|
|
26
|
+
* until: "string"
|
|
27
|
+
* }],
|
|
28
|
+
* channel_preferences: [{
|
|
29
|
+
* channel: Courier.ChannelClassification.DirectMessage
|
|
30
|
+
* }]
|
|
31
|
+
* }
|
|
32
|
+
* }
|
|
33
|
+
* }
|
|
34
|
+
* }
|
|
35
|
+
*/
|
|
5
36
|
export interface SubscribeUserToListRequest {
|
|
6
37
|
preferences?: Courier.RecipientPreferences;
|
|
7
38
|
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Courier from "../../../../index";
|
|
5
|
+
/**
|
|
6
|
+
* @example
|
|
7
|
+
* {
|
|
8
|
+
* recipients: [{
|
|
9
|
+
* recipientId: "string",
|
|
10
|
+
* preferences: {
|
|
11
|
+
* categories: {
|
|
12
|
+
* "string": {
|
|
13
|
+
* status: Courier.PreferenceStatus.OptedIn,
|
|
14
|
+
* rules: [{
|
|
15
|
+
* start: "string",
|
|
16
|
+
* until: "string"
|
|
17
|
+
* }],
|
|
18
|
+
* channel_preferences: [{
|
|
19
|
+
* channel: Courier.ChannelClassification.DirectMessage
|
|
20
|
+
* }]
|
|
21
|
+
* }
|
|
22
|
+
* },
|
|
23
|
+
* notifications: {
|
|
24
|
+
* "string": {
|
|
25
|
+
* status: Courier.PreferenceStatus.OptedIn,
|
|
26
|
+
* rules: [{
|
|
27
|
+
* start: "string",
|
|
28
|
+
* until: "string"
|
|
29
|
+
* }],
|
|
30
|
+
* channel_preferences: [{
|
|
31
|
+
* channel: Courier.ChannelClassification.DirectMessage
|
|
32
|
+
* }]
|
|
33
|
+
* }
|
|
34
|
+
* }
|
|
35
|
+
* }
|
|
36
|
+
* }]
|
|
37
|
+
* }
|
|
38
|
+
*/
|
|
39
|
+
export interface SubscribeUsersToListRequest {
|
|
40
|
+
recipients: Courier.PutSubscriptionsRecipient[];
|
|
41
|
+
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
export { GetAllListsRequest } from "./GetAllListsRequest";
|
|
2
|
-
export { GetSubscriptionForListRequest } from "./GetSubscriptionForListRequest";
|
|
3
|
-
export {
|
|
1
|
+
export { type GetAllListsRequest } from "./GetAllListsRequest";
|
|
2
|
+
export { type GetSubscriptionForListRequest } from "./GetSubscriptionForListRequest";
|
|
3
|
+
export { type SubscribeUsersToListRequest } from "./SubscribeUsersToListRequest";
|
|
4
|
+
export { type AddSubscribersToList } from "./AddSubscribersToList";
|
|
5
|
+
export { type SubscribeUserToListRequest } from "./SubscribeUserToListRequest";
|
|
@@ -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 ListGetSubscriptionsResponse {
|
|
6
6
|
paging: Courier.Paging;
|
|
7
7
|
items: Courier.ListSubscriptionRecipient[];
|