@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
|
@@ -42,13 +42,21 @@ exports.AuditEvents = void 0;
|
|
|
42
42
|
const environments = __importStar(require("../../../../environments"));
|
|
43
43
|
const core = __importStar(require("../../../../core"));
|
|
44
44
|
const url_join_1 = __importDefault(require("url-join"));
|
|
45
|
-
const errors = __importStar(require("../../../../errors"));
|
|
45
|
+
const errors = __importStar(require("../../../../errors/index"));
|
|
46
46
|
class AuditEvents {
|
|
47
47
|
constructor(_options = {}) {
|
|
48
48
|
this._options = _options;
|
|
49
49
|
}
|
|
50
50
|
/**
|
|
51
51
|
* Fetch the list of audit events
|
|
52
|
+
*
|
|
53
|
+
* @param {Courier.ListAuditEventsRequest} request
|
|
54
|
+
* @param {AuditEvents.RequestOptions} requestOptions - Request-specific configuration.
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* await courier.auditEvents.list({
|
|
58
|
+
* cursor: "string"
|
|
59
|
+
* })
|
|
52
60
|
*/
|
|
53
61
|
list(request = {}, requestOptions) {
|
|
54
62
|
var _a, _b;
|
|
@@ -65,7 +73,9 @@ class AuditEvents {
|
|
|
65
73
|
Authorization: yield this._getAuthorizationHeader(),
|
|
66
74
|
"X-Fern-Language": "JavaScript",
|
|
67
75
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
68
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
76
|
+
"X-Fern-SDK-Version": "v6.1.2",
|
|
77
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
78
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
69
79
|
},
|
|
70
80
|
contentType: "application/json",
|
|
71
81
|
queryParameters: _queryParams,
|
|
@@ -98,18 +108,26 @@ class AuditEvents {
|
|
|
98
108
|
}
|
|
99
109
|
/**
|
|
100
110
|
* Fetch a specific audit event by ID.
|
|
111
|
+
*
|
|
112
|
+
* @param {string} auditEventId - A unique identifier associated with the audit event you wish to retrieve
|
|
113
|
+
* @param {AuditEvents.RequestOptions} requestOptions - Request-specific configuration.
|
|
114
|
+
*
|
|
115
|
+
* @example
|
|
116
|
+
* await courier.auditEvents.get("string")
|
|
101
117
|
*/
|
|
102
118
|
get(auditEventId, requestOptions) {
|
|
103
119
|
var _a, _b;
|
|
104
120
|
return __awaiter(this, void 0, void 0, function* () {
|
|
105
121
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
106
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CourierEnvironment.Production, `/audit-events/${auditEventId}`),
|
|
122
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CourierEnvironment.Production, `/audit-events/${encodeURIComponent(auditEventId)}`),
|
|
107
123
|
method: "GET",
|
|
108
124
|
headers: {
|
|
109
125
|
Authorization: yield this._getAuthorizationHeader(),
|
|
110
126
|
"X-Fern-Language": "JavaScript",
|
|
111
127
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
112
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
128
|
+
"X-Fern-SDK-Version": "v6.1.2",
|
|
129
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
130
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
113
131
|
},
|
|
114
132
|
contentType: "application/json",
|
|
115
133
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -142,7 +160,7 @@ class AuditEvents {
|
|
|
142
160
|
_getAuthorizationHeader() {
|
|
143
161
|
var _a;
|
|
144
162
|
return __awaiter(this, void 0, void 0, function* () {
|
|
145
|
-
const bearer = (_a = (yield core.Supplier.get(this._options.authorizationToken))) !== null && _a !== void 0 ? _a : process.env["COURIER_AUTH_TOKEN"];
|
|
163
|
+
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"];
|
|
146
164
|
if (bearer == null) {
|
|
147
165
|
throw new errors.CourierError({
|
|
148
166
|
message: "Please specify COURIER_AUTH_TOKEN when instantiating the client.",
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
+
/**
|
|
5
|
+
* @example
|
|
6
|
+
* {
|
|
7
|
+
* cursor: "string"
|
|
8
|
+
* }
|
|
9
|
+
*/
|
|
4
10
|
export interface ListAuditEventsRequest {
|
|
5
11
|
/**
|
|
6
12
|
* A unique identifier that allows for fetching the next set of audit events.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { ListAuditEventsRequest } from "./ListAuditEventsRequest";
|
|
1
|
+
export { type ListAuditEventsRequest } from "./ListAuditEventsRequest";
|
|
@@ -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 AuthTokens {
|
|
8
8
|
interface Options {
|
|
9
9
|
environment?: core.Supplier<environments.CourierEnvironment | string>;
|
|
@@ -16,7 +16,7 @@ export declare namespace AuthTokens {
|
|
|
16
16
|
}
|
|
17
17
|
interface IdempotentRequestOptions extends RequestOptions {
|
|
18
18
|
idempotencyKey?: string | undefined;
|
|
19
|
-
idempotencyExpiry?:
|
|
19
|
+
idempotencyExpiry?: string | undefined;
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
export declare class AuthTokens {
|
|
@@ -24,6 +24,15 @@ export declare class AuthTokens {
|
|
|
24
24
|
constructor(_options?: AuthTokens.Options);
|
|
25
25
|
/**
|
|
26
26
|
* Returns a new access token.
|
|
27
|
+
*
|
|
28
|
+
* @param {Courier.IssueTokenParams} request
|
|
29
|
+
* @param {AuthTokens.IdempotentRequestOptions} requestOptions - Request-specific configuration.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* await courier.authTokens.issueToken({
|
|
33
|
+
* scope: "string",
|
|
34
|
+
* expires_in: "string"
|
|
35
|
+
* })
|
|
27
36
|
*/
|
|
28
37
|
issueToken(request: Courier.IssueTokenParams, requestOptions?: AuthTokens.IdempotentRequestOptions): Promise<Courier.IssueTokenResponse>;
|
|
29
38
|
protected _getAuthorizationHeader(): Promise<string>;
|
|
@@ -42,13 +42,22 @@ exports.AuthTokens = void 0;
|
|
|
42
42
|
const environments = __importStar(require("../../../../environments"));
|
|
43
43
|
const core = __importStar(require("../../../../core"));
|
|
44
44
|
const url_join_1 = __importDefault(require("url-join"));
|
|
45
|
-
const errors = __importStar(require("../../../../errors"));
|
|
45
|
+
const errors = __importStar(require("../../../../errors/index"));
|
|
46
46
|
class AuthTokens {
|
|
47
47
|
constructor(_options = {}) {
|
|
48
48
|
this._options = _options;
|
|
49
49
|
}
|
|
50
50
|
/**
|
|
51
51
|
* Returns a new access token.
|
|
52
|
+
*
|
|
53
|
+
* @param {Courier.IssueTokenParams} request
|
|
54
|
+
* @param {AuthTokens.IdempotentRequestOptions} requestOptions - Request-specific configuration.
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* await courier.authTokens.issueToken({
|
|
58
|
+
* scope: "string",
|
|
59
|
+
* expires_in: "string"
|
|
60
|
+
* })
|
|
52
61
|
*/
|
|
53
62
|
issueToken(request, requestOptions) {
|
|
54
63
|
var _a, _b;
|
|
@@ -60,11 +69,11 @@ class AuthTokens {
|
|
|
60
69
|
Authorization: yield this._getAuthorizationHeader(),
|
|
61
70
|
"X-Fern-Language": "JavaScript",
|
|
62
71
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
63
|
-
"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,
|
|
64
75
|
"Idempotency-Key": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey) != null ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey : undefined,
|
|
65
|
-
"X-Idempotency-Expiration": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry) != null
|
|
66
|
-
? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry.toString()
|
|
67
|
-
: undefined,
|
|
76
|
+
"X-Idempotency-Expiration": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry) != null ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry : undefined,
|
|
68
77
|
},
|
|
69
78
|
contentType: "application/json",
|
|
70
79
|
body: request,
|
|
@@ -98,7 +107,7 @@ class AuthTokens {
|
|
|
98
107
|
_getAuthorizationHeader() {
|
|
99
108
|
var _a;
|
|
100
109
|
return __awaiter(this, void 0, void 0, function* () {
|
|
101
|
-
const bearer = (_a = (yield core.Supplier.get(this._options.authorizationToken))) !== null && _a !== void 0 ? _a : process.env["COURIER_AUTH_TOKEN"];
|
|
110
|
+
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"];
|
|
102
111
|
if (bearer == null) {
|
|
103
112
|
throw new errors.CourierError({
|
|
104
113
|
message: "Please specify COURIER_AUTH_TOKEN when instantiating the client.",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { IssueTokenParams } from "./IssueTokenParams";
|
|
1
|
+
export { type IssueTokenParams } from "./IssueTokenParams";
|
|
@@ -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 Automations {
|
|
8
8
|
interface Options {
|
|
9
9
|
environment?: core.Supplier<environments.CourierEnvironment | string>;
|
|
@@ -16,7 +16,7 @@ export declare namespace Automations {
|
|
|
16
16
|
}
|
|
17
17
|
interface IdempotentRequestOptions extends RequestOptions {
|
|
18
18
|
idempotencyKey?: string | undefined;
|
|
19
|
-
idempotencyExpiry?:
|
|
19
|
+
idempotencyExpiry?: string | undefined;
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
export declare class Automations {
|
|
@@ -24,10 +24,53 @@ export declare class Automations {
|
|
|
24
24
|
constructor(_options?: Automations.Options);
|
|
25
25
|
/**
|
|
26
26
|
* Invoke an automation run from an automation template.
|
|
27
|
+
*
|
|
28
|
+
* @param {string} templateId - A unique identifier representing the automation template to be invoked. This could be the Automation Template ID or the Automation Template Alias.
|
|
29
|
+
* @param {Courier.AutomationInvokeParams} request
|
|
30
|
+
* @param {Automations.IdempotentRequestOptions} requestOptions - Request-specific configuration.
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* await courier.automations.invokeAutomationTemplate("string", {
|
|
34
|
+
* brand: "string",
|
|
35
|
+
* data: {
|
|
36
|
+
* "string": {
|
|
37
|
+
* "key": "value"
|
|
38
|
+
* }
|
|
39
|
+
* },
|
|
40
|
+
* profile: {
|
|
41
|
+
* "key": "value"
|
|
42
|
+
* },
|
|
43
|
+
* recipient: "string",
|
|
44
|
+
* template: "string"
|
|
45
|
+
* })
|
|
27
46
|
*/
|
|
28
47
|
invokeAutomationTemplate(templateId: string, request: Courier.AutomationInvokeParams, requestOptions?: Automations.IdempotentRequestOptions): Promise<Courier.AutomationInvokeResponse>;
|
|
29
48
|
/**
|
|
30
49
|
* Invoke an ad hoc automation run. This endpoint accepts a JSON payload with a series of automation steps. For information about what steps are available, checkout the ad hoc automation guide [here](https://www.courier.com/docs/automations/steps/).
|
|
50
|
+
*
|
|
51
|
+
* @param {Courier.AutomationAdHocInvokeParams} request
|
|
52
|
+
* @param {Automations.IdempotentRequestOptions} requestOptions - Request-specific configuration.
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* await courier.automations.invokeAdHocAutomation({
|
|
56
|
+
* data: {
|
|
57
|
+
* "name": "Foo"
|
|
58
|
+
* },
|
|
59
|
+
* profile: {
|
|
60
|
+
* "tenant_id": "abc-123"
|
|
61
|
+
* },
|
|
62
|
+
* recipient: "user-yes",
|
|
63
|
+
* automation: {
|
|
64
|
+
* cancelation_token: "delay-send--user-yes--abc-123",
|
|
65
|
+
* steps: [{
|
|
66
|
+
* action: "delay",
|
|
67
|
+
* until: "20240408T080910.123"
|
|
68
|
+
* }, {
|
|
69
|
+
* action: "send",
|
|
70
|
+
* template: "64TP5HKPFTM8VTK1Y75SJDQX9JK0"
|
|
71
|
+
* }]
|
|
72
|
+
* }
|
|
73
|
+
* })
|
|
31
74
|
*/
|
|
32
75
|
invokeAdHocAutomation(request: Courier.AutomationAdHocInvokeParams, requestOptions?: Automations.IdempotentRequestOptions): Promise<Courier.AutomationInvokeResponse>;
|
|
33
76
|
protected _getAuthorizationHeader(): Promise<string>;
|
|
@@ -42,29 +42,48 @@ exports.Automations = void 0;
|
|
|
42
42
|
const environments = __importStar(require("../../../../environments"));
|
|
43
43
|
const core = __importStar(require("../../../../core"));
|
|
44
44
|
const url_join_1 = __importDefault(require("url-join"));
|
|
45
|
-
const errors = __importStar(require("../../../../errors"));
|
|
45
|
+
const errors = __importStar(require("../../../../errors/index"));
|
|
46
46
|
class Automations {
|
|
47
47
|
constructor(_options = {}) {
|
|
48
48
|
this._options = _options;
|
|
49
49
|
}
|
|
50
50
|
/**
|
|
51
51
|
* Invoke an automation run from an automation template.
|
|
52
|
+
*
|
|
53
|
+
* @param {string} templateId - A unique identifier representing the automation template to be invoked. This could be the Automation Template ID or the Automation Template Alias.
|
|
54
|
+
* @param {Courier.AutomationInvokeParams} request
|
|
55
|
+
* @param {Automations.IdempotentRequestOptions} requestOptions - Request-specific configuration.
|
|
56
|
+
*
|
|
57
|
+
* @example
|
|
58
|
+
* await courier.automations.invokeAutomationTemplate("string", {
|
|
59
|
+
* brand: "string",
|
|
60
|
+
* data: {
|
|
61
|
+
* "string": {
|
|
62
|
+
* "key": "value"
|
|
63
|
+
* }
|
|
64
|
+
* },
|
|
65
|
+
* profile: {
|
|
66
|
+
* "key": "value"
|
|
67
|
+
* },
|
|
68
|
+
* recipient: "string",
|
|
69
|
+
* template: "string"
|
|
70
|
+
* })
|
|
52
71
|
*/
|
|
53
72
|
invokeAutomationTemplate(templateId, request, requestOptions) {
|
|
54
73
|
var _a, _b;
|
|
55
74
|
return __awaiter(this, void 0, void 0, function* () {
|
|
56
75
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
57
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CourierEnvironment.Production, `/automations/${templateId}/invoke`),
|
|
76
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CourierEnvironment.Production, `/automations/${encodeURIComponent(templateId)}/invoke`),
|
|
58
77
|
method: "POST",
|
|
59
78
|
headers: {
|
|
60
79
|
Authorization: yield this._getAuthorizationHeader(),
|
|
61
80
|
"X-Fern-Language": "JavaScript",
|
|
62
81
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
63
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
82
|
+
"X-Fern-SDK-Version": "v6.1.2",
|
|
83
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
84
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
64
85
|
"Idempotency-Key": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey) != null ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey : undefined,
|
|
65
|
-
"X-Idempotency-Expiration": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry) != null
|
|
66
|
-
? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry.toString()
|
|
67
|
-
: undefined,
|
|
86
|
+
"X-Idempotency-Expiration": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry) != null ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry : undefined,
|
|
68
87
|
},
|
|
69
88
|
contentType: "application/json",
|
|
70
89
|
body: request,
|
|
@@ -97,6 +116,30 @@ class Automations {
|
|
|
97
116
|
}
|
|
98
117
|
/**
|
|
99
118
|
* Invoke an ad hoc automation run. This endpoint accepts a JSON payload with a series of automation steps. For information about what steps are available, checkout the ad hoc automation guide [here](https://www.courier.com/docs/automations/steps/).
|
|
119
|
+
*
|
|
120
|
+
* @param {Courier.AutomationAdHocInvokeParams} request
|
|
121
|
+
* @param {Automations.IdempotentRequestOptions} requestOptions - Request-specific configuration.
|
|
122
|
+
*
|
|
123
|
+
* @example
|
|
124
|
+
* await courier.automations.invokeAdHocAutomation({
|
|
125
|
+
* data: {
|
|
126
|
+
* "name": "Foo"
|
|
127
|
+
* },
|
|
128
|
+
* profile: {
|
|
129
|
+
* "tenant_id": "abc-123"
|
|
130
|
+
* },
|
|
131
|
+
* recipient: "user-yes",
|
|
132
|
+
* automation: {
|
|
133
|
+
* cancelation_token: "delay-send--user-yes--abc-123",
|
|
134
|
+
* steps: [{
|
|
135
|
+
* action: "delay",
|
|
136
|
+
* until: "20240408T080910.123"
|
|
137
|
+
* }, {
|
|
138
|
+
* action: "send",
|
|
139
|
+
* template: "64TP5HKPFTM8VTK1Y75SJDQX9JK0"
|
|
140
|
+
* }]
|
|
141
|
+
* }
|
|
142
|
+
* })
|
|
100
143
|
*/
|
|
101
144
|
invokeAdHocAutomation(request, requestOptions) {
|
|
102
145
|
var _a, _b;
|
|
@@ -108,11 +151,11 @@ class Automations {
|
|
|
108
151
|
Authorization: yield this._getAuthorizationHeader(),
|
|
109
152
|
"X-Fern-Language": "JavaScript",
|
|
110
153
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
111
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
154
|
+
"X-Fern-SDK-Version": "v6.1.2",
|
|
155
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
156
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
112
157
|
"Idempotency-Key": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey) != null ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey : undefined,
|
|
113
|
-
"X-Idempotency-Expiration": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry) != null
|
|
114
|
-
? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry.toString()
|
|
115
|
-
: undefined,
|
|
158
|
+
"X-Idempotency-Expiration": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry) != null ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry : undefined,
|
|
116
159
|
},
|
|
117
160
|
contentType: "application/json",
|
|
118
161
|
body: request,
|
|
@@ -146,7 +189,7 @@ class Automations {
|
|
|
146
189
|
_getAuthorizationHeader() {
|
|
147
190
|
var _a;
|
|
148
191
|
return __awaiter(this, void 0, void 0, function* () {
|
|
149
|
-
const bearer = (_a = (yield core.Supplier.get(this._options.authorizationToken))) !== null && _a !== void 0 ? _a : process.env["COURIER_AUTH_TOKEN"];
|
|
192
|
+
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"];
|
|
150
193
|
if (bearer == null) {
|
|
151
194
|
throw new errors.CourierError({
|
|
152
195
|
message: "Please specify COURIER_AUTH_TOKEN when instantiating the client.",
|
|
@@ -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 AutomationAdHocInvokeParams extends Courier.AutomationInvokeParams {
|
|
6
6
|
automation: Courier.Automation;
|
|
7
7
|
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Courier from "../../../index";
|
|
5
|
+
/**
|
|
6
|
+
* Defines what items should be retained and passed along to the next steps when the batch is released
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* {
|
|
10
|
+
* type: Courier.AutomationAddToBatchRetainType.Highest,
|
|
11
|
+
* count: 10,
|
|
12
|
+
* sort_key: "refs.data.my_custom_scoring"
|
|
13
|
+
* }
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* {
|
|
17
|
+
* type: Courier.AutomationAddToBatchRetainType.Last,
|
|
18
|
+
* count: 10
|
|
19
|
+
* }
|
|
20
|
+
*/
|
|
21
|
+
export interface AutomationAddToBatchRetain {
|
|
22
|
+
/**
|
|
23
|
+
* Keep N number of notifications based on the type. First/Last N based on notification received.
|
|
24
|
+
* highest/lowest based on a scoring key providing in the data accessed by sort_key
|
|
25
|
+
*/
|
|
26
|
+
type: Courier.AutomationAddToBatchRetainType;
|
|
27
|
+
/**
|
|
28
|
+
* The number of records to keep in batch. Default is 10 and only configurable by requesting from support.
|
|
29
|
+
* When configurable minimum is 2 and maximum is 100.
|
|
30
|
+
*/
|
|
31
|
+
count: number;
|
|
32
|
+
/** Defines the data value data[sort_key] that is used to sort the stored items. Required when type is set to highest or lowest. */
|
|
33
|
+
sort_key?: string;
|
|
34
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
export declare type AutomationAddToBatchRetainType = "first" | "last" | "highest" | "lowest";
|
|
5
|
+
export declare const AutomationAddToBatchRetainType: {
|
|
6
|
+
readonly First: "first";
|
|
7
|
+
readonly Last: "last";
|
|
8
|
+
readonly Highest: "highest";
|
|
9
|
+
readonly Lowest: "lowest";
|
|
10
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.AutomationAddToBatchRetainType = void 0;
|
|
7
|
+
exports.AutomationAddToBatchRetainType = {
|
|
8
|
+
First: "first",
|
|
9
|
+
Last: "last",
|
|
10
|
+
Highest: "highest",
|
|
11
|
+
Lowest: "lowest",
|
|
12
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
export declare type AutomationAddToBatchScope = "user" | "global" | "dynamic";
|
|
5
|
+
export declare const AutomationAddToBatchScope: {
|
|
6
|
+
readonly User: "user";
|
|
7
|
+
readonly Global: "global";
|
|
8
|
+
readonly Dynamic: "dynamic";
|
|
9
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.AutomationAddToBatchScope = void 0;
|
|
7
|
+
exports.AutomationAddToBatchScope = {
|
|
8
|
+
User: "user",
|
|
9
|
+
Global: "global",
|
|
10
|
+
Dynamic: "dynamic",
|
|
11
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
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
|
+
* action: "add-to-batch",
|
|
9
|
+
* wait_period: "PT5M",
|
|
10
|
+
* max_wait_period: "PT1H",
|
|
11
|
+
* retain: {
|
|
12
|
+
* type: Courier.AutomationAddToBatchRetainType.Highest,
|
|
13
|
+
* count: 10,
|
|
14
|
+
* sort_key: "refs.data.my_custom_scoring"
|
|
15
|
+
* },
|
|
16
|
+
* scope: Courier.AutomationAddToBatchScope.User,
|
|
17
|
+
* category_key: "refs.data.status"
|
|
18
|
+
* }
|
|
19
|
+
*/
|
|
20
|
+
export interface AutomationAddToBatchStep extends Courier.AutomationStep {
|
|
21
|
+
action: "add-to-batch";
|
|
22
|
+
/** Defines the period of inactivity before the batch is released. Specified as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations) */
|
|
23
|
+
wait_period: string;
|
|
24
|
+
/** Defines the maximum wait time before the batch should be released. Must be less than wait period. Maximum of 60 days. Specified as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations) */
|
|
25
|
+
max_wait_period: string;
|
|
26
|
+
/** If specified, the batch will release as soon as this number is reached */
|
|
27
|
+
max_items?: Courier.AutomationAddToBatchMaxItemsType;
|
|
28
|
+
retain: Courier.AutomationAddToBatchRetain;
|
|
29
|
+
/**
|
|
30
|
+
* Determine the scope of the batching. If user, chosen in this order: recipient, profile.user_id, data.user_id, data.userId.
|
|
31
|
+
* If dynamic, then specify where the batch_key or a reference to the batch_key
|
|
32
|
+
*/
|
|
33
|
+
scope?: Courier.AutomationAddToBatchScope;
|
|
34
|
+
/** If using scope=dynamic, provide the key or a reference (e.g., refs.data.batch_key) */
|
|
35
|
+
batch_key?: string;
|
|
36
|
+
batch_id?: string;
|
|
37
|
+
/** Defines the field of the data object the batch is set to when complete. Defaults to `batch` */
|
|
38
|
+
category_key?: string;
|
|
39
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
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
|
+
* action: "add-to-digest",
|
|
9
|
+
* subscription_topic_id: "RAJE97CMT04KDJJ88ZDS2TP1690S"
|
|
10
|
+
* }
|
|
11
|
+
*/
|
|
12
|
+
export interface AutomationAddToDigestStep extends Courier.AutomationStep {
|
|
13
|
+
action: "add-to-digest";
|
|
14
|
+
/** The subscription topic that has digests enabled */
|
|
15
|
+
subscription_topic_id: string;
|
|
16
|
+
}
|
|
@@ -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 AutomationCancelStep extends Courier.AutomationStep {
|
|
6
6
|
action: "cancel";
|
|
7
7
|
cancelation_token?: string;
|
|
@@ -1,8 +1,11 @@
|
|
|
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 AutomationDelayStep extends Courier.AutomationStep {
|
|
6
6
|
action: "delay";
|
|
7
|
+
/** The [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations) string for how long to delay for */
|
|
8
|
+
duration?: string;
|
|
9
|
+
/** The ISO 8601 timestamp for when the delay should end */
|
|
7
10
|
until?: string;
|
|
8
11
|
}
|