@trycourier/courier 6.1.1 → 6.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Client.d.ts +31 -2
- package/Client.js +35 -6
- package/api/client/requests/SendMessageRequest.d.ts +28 -1
- package/api/client/requests/index.d.ts +1 -1
- package/api/resources/audiences/client/Client.d.ts +47 -1
- package/api/resources/audiences/client/Client.js +68 -12
- package/api/resources/audiences/client/requests/AudienceMembersListParams.d.ts +6 -0
- package/api/resources/audiences/client/requests/AudienceUpdateParams.d.ts +13 -1
- package/api/resources/audiences/client/requests/AudiencesListParams.d.ts +6 -0
- package/api/resources/audiences/client/requests/index.d.ts +3 -3
- package/api/resources/audiences/types/Audience.d.ts +1 -1
- package/api/resources/audiences/types/AudienceListResponse.d.ts +1 -1
- package/api/resources/audiences/types/AudienceMemberGetResponse.d.ts +1 -1
- package/api/resources/audiences/types/AudienceMemberListResponse.d.ts +1 -1
- package/api/resources/audiences/types/AudienceUpdateResponse.d.ts +1 -1
- package/api/resources/audiences/types/BaseFilterConfig.d.ts +1 -1
- package/api/resources/audiences/types/Filter.d.ts +1 -1
- package/api/resources/audiences/types/FilterConfig.d.ts +1 -1
- package/api/resources/audiences/types/NestedFilterConfig.d.ts +1 -1
- package/api/resources/audiences/types/Operator.d.ts +1 -1
- package/api/resources/audiences/types/SingleFilterConfig.d.ts +1 -1
- package/api/resources/auditEvents/client/Client.d.ts +15 -1
- package/api/resources/auditEvents/client/Client.js +23 -5
- package/api/resources/auditEvents/client/requests/ListAuditEventsRequest.d.ts +6 -0
- package/api/resources/auditEvents/client/requests/index.d.ts +1 -1
- package/api/resources/auditEvents/types/AuditEvent.d.ts +1 -1
- package/api/resources/auditEvents/types/ListAuditEventsResponse.d.ts +1 -1
- package/api/resources/authTokens/client/Client.d.ts +11 -2
- package/api/resources/authTokens/client/Client.js +15 -6
- package/api/resources/authTokens/client/requests/IssueTokenParams.d.ts +7 -0
- package/api/resources/authTokens/client/requests/index.d.ts +1 -1
- package/api/resources/automations/client/Client.d.ts +31 -3
- package/api/resources/automations/client/Client.js +40 -12
- package/api/resources/automations/types/Automation.d.ts +1 -1
- package/api/resources/automations/types/AutomationAdHocInvokeParams.d.ts +1 -1
- package/api/resources/automations/types/AutomationAddToBatchRetain.d.ts +1 -1
- package/api/resources/automations/types/AutomationAddToBatchStep.d.ts +1 -1
- package/api/resources/automations/types/AutomationAddToDigestStep.d.ts +1 -1
- package/api/resources/automations/types/AutomationCancelStep.d.ts +1 -1
- package/api/resources/automations/types/AutomationDelayStep.d.ts +1 -1
- package/api/resources/automations/types/AutomationFetchDataStep.d.ts +1 -1
- package/api/resources/automations/types/AutomationFetchDataWebhook.d.ts +1 -1
- package/api/resources/automations/types/AutomationInvokeParams.d.ts +1 -1
- package/api/resources/automations/types/AutomationInvokeStep.d.ts +1 -1
- package/api/resources/automations/types/AutomationInvokeTemplateParams.d.ts +1 -1
- package/api/resources/automations/types/AutomationRunContext.d.ts +1 -1
- package/api/resources/automations/types/AutomationSendListStep.d.ts +1 -1
- package/api/resources/automations/types/AutomationSendStep.d.ts +1 -1
- package/api/resources/automations/types/AutomationStepOption.d.ts +1 -1
- package/api/resources/automations/types/AutomationThrottleStep.d.ts +1 -1
- package/api/resources/automations/types/AutomationUpdateProfileStep.d.ts +1 -1
- package/api/resources/automations/types/AutomationV2SendStep.d.ts +1 -1
- package/api/resources/brands/client/Client.d.ts +57 -2
- package/api/resources/brands/client/Client.js +77 -14
- package/api/resources/brands/client/requests/BrandUpdateParameters.d.ts +21 -1
- package/api/resources/brands/client/requests/ListBrandsRequest.d.ts +6 -0
- package/api/resources/brands/client/requests/index.d.ts +2 -2
- package/api/resources/brands/types/Brand.d.ts +1 -1
- package/api/resources/brands/types/BrandGetAllResponse.d.ts +1 -1
- package/api/resources/brands/types/BrandParameters.d.ts +1 -1
- package/api/resources/brands/types/BrandSettings.d.ts +1 -1
- package/api/resources/brands/types/BrandSnippets.d.ts +1 -1
- package/api/resources/brands/types/BrandsResponse.d.ts +1 -1
- package/api/resources/bulk/client/Client.d.ts +67 -2
- package/api/resources/bulk/client/Client.js +90 -21
- package/api/resources/bulk/client/requests/BulkCreateJobParams.d.ts +24 -1
- package/api/resources/bulk/client/requests/index.d.ts +1 -1
- package/api/resources/bulk/types/BulkGetJobResponse.d.ts +1 -1
- package/api/resources/bulk/types/BulkGetJobUsersResponse.d.ts +1 -1
- package/api/resources/bulk/types/BulkIngestUsersParams.d.ts +1 -1
- package/api/resources/bulk/types/BulkIngestUsersResponse.d.ts +1 -1
- package/api/resources/bulk/types/BulkMessageUserResponse.d.ts +1 -1
- package/api/resources/bulk/types/InboundBulkContentMessage.d.ts +1 -1
- package/api/resources/bulk/types/InboundBulkMessage.d.ts +1 -1
- package/api/resources/bulk/types/InboundBulkMessageUser.d.ts +1 -1
- package/api/resources/bulk/types/InboundBulkMessageV2.d.ts +1 -1
- package/api/resources/bulk/types/InboundBulkTemplateMessage.d.ts +1 -1
- package/api/resources/bulk/types/JobDetails.d.ts +1 -1
- package/api/resources/commons/errors/AlreadyExistsError.d.ts +2 -2
- package/api/resources/commons/errors/AlreadyExistsError.js +1 -1
- package/api/resources/commons/errors/BadRequestError.d.ts +2 -2
- package/api/resources/commons/errors/BadRequestError.js +1 -1
- package/api/resources/commons/errors/ConflictError.d.ts +2 -2
- package/api/resources/commons/errors/ConflictError.js +1 -1
- package/api/resources/commons/errors/MessageNotFoundError.d.ts +2 -2
- package/api/resources/commons/errors/MessageNotFoundError.js +1 -1
- package/api/resources/commons/errors/NotFoundError.d.ts +2 -2
- package/api/resources/commons/errors/NotFoundError.js +1 -1
- package/api/resources/commons/errors/PaymentRequiredError.d.ts +2 -2
- package/api/resources/commons/errors/PaymentRequiredError.js +1 -1
- package/api/resources/commons/types/AlreadyExists.d.ts +1 -1
- package/api/resources/commons/types/BadRequest.d.ts +1 -1
- package/api/resources/commons/types/ChannelPreference.d.ts +1 -1
- package/api/resources/commons/types/Conflict.d.ts +1 -1
- package/api/resources/commons/types/MessageNotFound.d.ts +1 -1
- package/api/resources/commons/types/NotFound.d.ts +1 -1
- package/api/resources/commons/types/NotificationPreferenceDetails.d.ts +1 -1
- package/api/resources/commons/types/NotificationPreferences.d.ts +1 -1
- package/api/resources/commons/types/PaymentRequired.d.ts +1 -1
- package/api/resources/commons/types/RecipientPreferences.d.ts +1 -1
- package/api/resources/commons/types/UserTenantAssociation.d.ts +4 -3
- package/api/resources/lists/client/Client.d.ts +197 -4
- package/api/resources/lists/client/Client.js +236 -25
- package/api/resources/lists/client/requests/AddSubscribersToList.d.ts +41 -0
- package/api/resources/lists/client/requests/AddSubscribersToList.js +5 -0
- package/api/resources/lists/client/requests/GetAllListsRequest.d.ts +7 -0
- package/api/resources/lists/client/requests/GetSubscriptionForListRequest.d.ts +6 -0
- package/api/resources/lists/client/requests/SubscribeUserToListRequest.d.ts +32 -1
- package/api/resources/lists/client/requests/SubscribeUsersToListRequest.d.ts +41 -0
- package/api/resources/lists/client/requests/SubscribeUsersToListRequest.js +5 -0
- package/api/resources/lists/client/requests/index.d.ts +5 -3
- package/api/resources/lists/types/ListGetAllResponse.d.ts +1 -1
- package/api/resources/lists/types/ListGetSubscriptionsResponse.d.ts +1 -1
- package/api/resources/lists/types/ListPutParams.d.ts +1 -1
- package/api/resources/lists/types/ListSubscriptionRecipient.d.ts +1 -1
- package/api/resources/lists/types/PutSubscriptionsRecipient.d.ts +1 -1
- package/api/resources/messages/client/Client.d.ts +59 -2
- package/api/resources/messages/client/Client.js +89 -28
- package/api/resources/messages/client/requests/GetMessageHistoryRequest.d.ts +6 -0
- package/api/resources/messages/client/requests/ListMessagesRequest.d.ts +19 -8
- package/api/resources/messages/client/requests/index.d.ts +2 -2
- package/api/resources/messages/types/ListMessagesResponse.d.ts +1 -1
- package/api/resources/messages/types/MessageDetails.d.ts +1 -1
- package/api/resources/messages/types/MessageHistoryResponse.d.ts +1 -2
- package/api/resources/messages/types/RenderOutput.d.ts +1 -1
- package/api/resources/messages/types/RenderOutputResponse.d.ts +1 -1
- package/api/resources/messages/types/RenderedMessageContent.d.ts +1 -1
- package/api/resources/notifications/client/Client.d.ts +113 -1
- package/api/resources/notifications/client/Client.js +145 -17
- package/api/resources/notifications/client/requests/NotificationDraftUpdateVariationsParams.d.ts +26 -1
- package/api/resources/notifications/client/requests/NotificationListParams.d.ts +6 -0
- package/api/resources/notifications/client/requests/NotificationUpdateVariationsParams.d.ts +26 -1
- package/api/resources/notifications/client/requests/SubmissionChecksReplaceParams.d.ts +11 -1
- package/api/resources/notifications/client/requests/index.d.ts +4 -4
- package/api/resources/notifications/types/BaseCheck.d.ts +1 -1
- package/api/resources/notifications/types/Check.d.ts +1 -1
- package/api/resources/notifications/types/MessageRouting.d.ts +1 -1
- package/api/resources/notifications/types/MessageRoutingChannel.d.ts +1 -1
- package/api/resources/notifications/types/Notification.d.ts +5 -1
- package/api/resources/notifications/types/NotificationBlock.d.ts +1 -1
- package/api/resources/notifications/types/NotificationChannel.d.ts +1 -1
- package/api/resources/notifications/types/NotificationContent.d.ts +1 -1
- package/api/resources/notifications/types/NotificationGetContentResponse.d.ts +1 -1
- package/api/resources/notifications/types/NotificationListResponse.d.ts +1 -1
- package/api/resources/notifications/types/NotificationTag.d.ts +7 -0
- package/api/resources/notifications/types/NotificationTag.js +5 -0
- package/api/resources/notifications/types/NotificationTagData.d.ts +7 -0
- package/api/resources/notifications/types/NotificationTagData.js +5 -0
- package/api/resources/notifications/types/SubmissionChecksGetResponse.d.ts +1 -1
- package/api/resources/notifications/types/SubmissionChecksReplaceResponse.d.ts +1 -1
- package/api/resources/notifications/types/index.d.ts +2 -0
- package/api/resources/notifications/types/index.js +2 -0
- package/api/resources/profiles/client/Client.d.ts +71 -2
- package/api/resources/profiles/client/Client.js +102 -23
- package/api/resources/profiles/client/requests/GetListSubscriptionsRequest.d.ts +6 -0
- package/api/resources/profiles/client/requests/MergeProfileRequest.d.ts +10 -0
- package/api/resources/profiles/client/requests/ReplaceProfileRequest.d.ts +10 -0
- package/api/resources/profiles/client/requests/index.d.ts +3 -3
- package/api/resources/profiles/types/AirshipProfile.d.ts +1 -1
- package/api/resources/profiles/types/Discord.d.ts +1 -1
- package/api/resources/profiles/types/Expo.d.ts +1 -1
- package/api/resources/profiles/types/GetListSubscriptionsList.d.ts +1 -1
- package/api/resources/profiles/types/GetListSubscriptionsResponse.d.ts +1 -1
- package/api/resources/profiles/types/Intercom.d.ts +1 -1
- package/api/resources/profiles/types/MsTeams.d.ts +1 -1
- package/api/resources/profiles/types/MultipleTokens.d.ts +1 -1
- package/api/resources/profiles/types/ProfileGetResponse.d.ts +1 -1
- package/api/resources/profiles/types/SendToMsTeamsChannelId.d.ts +1 -1
- package/api/resources/profiles/types/SendToMsTeamsChannelName.d.ts +1 -1
- package/api/resources/profiles/types/SendToMsTeamsConversationId.d.ts +1 -1
- package/api/resources/profiles/types/SendToMsTeamsEmail.d.ts +1 -1
- package/api/resources/profiles/types/SendToMsTeamsUserId.d.ts +1 -1
- package/api/resources/profiles/types/SendToSlackChannel.d.ts +1 -1
- package/api/resources/profiles/types/SendToSlackEmail.d.ts +1 -1
- package/api/resources/profiles/types/SendToSlackUserId.d.ts +1 -1
- package/api/resources/profiles/types/Slack.d.ts +1 -1
- package/api/resources/profiles/types/SnoozeRule.d.ts +1 -1
- package/api/resources/profiles/types/SubscribeToListsRequest.d.ts +1 -1
- package/api/resources/profiles/types/SubscribeToListsRequestListObject.d.ts +1 -1
- package/api/resources/profiles/types/UserProfile.d.ts +1 -1
- package/api/resources/send/types/AudienceRecipient.d.ts +1 -1
- package/api/resources/send/types/BaseMessage.d.ts +1 -1
- package/api/resources/send/types/BaseMessageSendTo.d.ts +1 -1
- package/api/resources/send/types/BrandSettingsEmail.d.ts +1 -1
- package/api/resources/send/types/BrandSettingsInApp.d.ts +1 -1
- package/api/resources/send/types/BrandSettingsSocialPresence.d.ts +1 -1
- package/api/resources/send/types/BrandTemplateOverride.d.ts +1 -1
- package/api/resources/send/types/Channel.d.ts +1 -1
- package/api/resources/send/types/ChannelMetadata.d.ts +1 -1
- package/api/resources/send/types/Content.d.ts +1 -1
- package/api/resources/send/types/ContentMessage.d.ts +1 -1
- package/api/resources/send/types/ElementalActionNode.d.ts +1 -1
- package/api/resources/send/types/ElementalChannelNode.d.ts +1 -1
- package/api/resources/send/types/ElementalContent.d.ts +1 -1
- package/api/resources/send/types/ElementalDividerNode.d.ts +1 -1
- package/api/resources/send/types/ElementalGroupNode.d.ts +1 -1
- package/api/resources/send/types/ElementalImageNode.d.ts +1 -1
- package/api/resources/send/types/ElementalMetaNode.d.ts +1 -1
- package/api/resources/send/types/ElementalNode.d.ts +1 -1
- package/api/resources/send/types/ElementalQuoteNode.d.ts +1 -1
- package/api/resources/send/types/ElementalTextNode.d.ts +1 -1
- package/api/resources/send/types/EmailHeader.d.ts +1 -1
- package/api/resources/send/types/Expiry.d.ts +1 -1
- package/api/resources/send/types/IPreferences.d.ts +1 -1
- package/api/resources/send/types/IProfilePreferences.d.ts +1 -1
- package/api/resources/send/types/ListPatternRecipient.d.ts +1 -1
- package/api/resources/send/types/ListRecipient.d.ts +1 -1
- package/api/resources/send/types/Locales.d.ts +1 -1
- package/api/resources/send/types/Message.d.ts +1 -1
- package/api/resources/send/types/MessageChannelEmailOverride.d.ts +1 -1
- package/api/resources/send/types/MessageChannels.d.ts +1 -1
- package/api/resources/send/types/MessageMetadata.d.ts +1 -1
- package/api/resources/send/types/MessageProviders.d.ts +1 -1
- package/api/resources/send/types/MessageProvidersType.d.ts +1 -1
- package/api/resources/send/types/MessageRecipient.d.ts +1 -1
- package/api/resources/send/types/Metadata.d.ts +1 -1
- package/api/resources/send/types/MsTeamsRecipient.d.ts +1 -1
- package/api/resources/send/types/Preference.d.ts +1 -1
- package/api/resources/send/types/Recipient.d.ts +1 -1
- package/api/resources/send/types/Routing.d.ts +1 -1
- package/api/resources/send/types/RoutingChannel.d.ts +1 -1
- package/api/resources/send/types/RoutingStrategyChannel.d.ts +1 -1
- package/api/resources/send/types/RoutingStrategyProvider.d.ts +1 -1
- package/api/resources/send/types/SlackRecipient.d.ts +1 -1
- package/api/resources/send/types/TemplateMessage.d.ts +1 -1
- package/api/resources/send/types/Timeout.d.ts +1 -1
- package/api/resources/send/types/UserRecipient.d.ts +1 -1
- package/api/resources/templates/client/Client.d.ts +9 -1
- package/api/resources/templates/client/Client.js +13 -3
- package/api/resources/templates/client/requests/ListTemplatesRequest.d.ts +6 -0
- package/api/resources/templates/client/requests/index.d.ts +1 -1
- package/api/resources/templates/types/ListTemplatesResponse.d.ts +1 -1
- package/api/resources/templates/types/NotificationTemplates.d.ts +1 -1
- package/api/resources/templates/types/RoutingStrategy.d.ts +1 -1
- package/api/resources/templates/types/Tag.d.ts +1 -1
- package/api/resources/tenants/client/Client.d.ts +82 -1
- package/api/resources/tenants/client/Client.js +190 -13
- package/api/resources/tenants/client/requests/ListTenantParams.d.ts +13 -1
- package/api/resources/tenants/client/requests/ListUsersForTenantParams.d.ts +7 -0
- package/api/resources/tenants/client/requests/TenantCreateOrReplaceParams.d.ts +23 -2
- package/api/resources/tenants/client/requests/index.d.ts +3 -3
- package/api/resources/tenants/types/DefaultPreferences.d.ts +2 -2
- package/api/resources/tenants/types/ListUsersForTenantResponse.d.ts +1 -1
- package/api/resources/tenants/types/SubscriptionTopic.d.ts +2 -3
- package/api/resources/tenants/types/SubscriptionTopicNew.d.ts +11 -0
- package/api/resources/tenants/types/SubscriptionTopicNew.js +5 -0
- package/api/resources/tenants/types/TemplateProperty.d.ts +3 -0
- package/api/resources/tenants/types/Tenant.d.ts +2 -2
- package/api/resources/tenants/types/TenantListResponse.d.ts +1 -1
- package/api/resources/tenants/types/index.d.ts +1 -0
- package/api/resources/tenants/types/index.js +1 -0
- package/api/resources/translations/client/Client.d.ts +17 -0
- package/api/resources/translations/client/Client.js +28 -7
- package/api/resources/users/resources/preferences/client/Client.d.ts +22 -1
- package/api/resources/users/resources/preferences/client/Client.js +36 -9
- package/api/resources/users/resources/preferences/client/requests/UserPreferencesUpdateParams.d.ts +1 -1
- package/api/resources/users/resources/preferences/client/requests/index.d.ts +1 -1
- package/api/resources/users/resources/preferences/types/TopicPreference.d.ts +1 -1
- package/api/resources/users/resources/preferences/types/TopicPreferenceUpdate.d.ts +1 -1
- package/api/resources/users/resources/preferences/types/UserPreferencesGetResponse.d.ts +1 -1
- package/api/resources/users/resources/preferences/types/UserPreferencesListResponse.d.ts +1 -1
- package/api/resources/users/resources/tenants/client/Client.d.ts +57 -2
- package/api/resources/users/resources/tenants/client/Client.js +78 -13
- package/api/resources/users/resources/tenants/client/requests/AddUserToMultipleTenantsParams.d.ts +16 -1
- package/api/resources/users/resources/tenants/client/requests/AddUserToSingleTenantsParams.d.ts +11 -2
- package/api/resources/users/resources/tenants/client/requests/ListTenantsForUserParams.d.ts +7 -0
- package/api/resources/users/resources/tenants/client/requests/index.d.ts +3 -3
- package/api/resources/users/resources/tenants/types/AddUserToSingleTenantsParamsProfile.d.ts +3 -0
- package/api/resources/users/resources/tenants/types/ListTenantsForUserResponse.d.ts +1 -1
- package/api/resources/users/resources/tokens/client/Client.d.ts +73 -1
- package/api/resources/users/resources/tokens/client/Client.js +136 -13
- package/api/resources/users/resources/tokens/types/GetAllTokensResponse.d.ts +1 -1
- package/api/resources/users/resources/tokens/types/GetUserTokenResponse.d.ts +1 -1
- package/api/resources/users/resources/tokens/types/PatchUserTokenOpts.d.ts +1 -1
- package/api/resources/users/resources/tokens/types/PutUserTokenOpts.d.ts +1 -1
- package/api/resources/users/resources/tokens/types/PutUserTokensOpts.d.ts +1 -1
- package/api/resources/users/resources/tokens/types/UserToken.d.ts +1 -1
- package/core/fetcher/Fetcher.d.ts +2 -2
- package/core/fetcher/Fetcher.js +60 -6
- package/core/index.d.ts +1 -0
- package/core/index.js +1 -0
- package/core/runtime/index.d.ts +1 -0
- package/core/runtime/index.js +5 -0
- package/core/runtime/runtime.d.ts +8 -0
- package/core/runtime/runtime.js +82 -0
- package/dist/Client.d.ts +31 -2
- package/dist/Client.js +35 -6
- package/dist/api/client/requests/SendMessageRequest.d.ts +28 -1
- package/dist/api/client/requests/index.d.ts +1 -1
- package/dist/api/resources/audiences/client/Client.d.ts +47 -1
- package/dist/api/resources/audiences/client/Client.js +68 -12
- package/dist/api/resources/audiences/client/requests/AudienceMembersListParams.d.ts +6 -0
- package/dist/api/resources/audiences/client/requests/AudienceUpdateParams.d.ts +13 -1
- package/dist/api/resources/audiences/client/requests/AudiencesListParams.d.ts +6 -0
- package/dist/api/resources/audiences/client/requests/index.d.ts +3 -3
- package/dist/api/resources/audiences/types/Audience.d.ts +1 -1
- package/dist/api/resources/audiences/types/AudienceListResponse.d.ts +1 -1
- package/dist/api/resources/audiences/types/AudienceMemberGetResponse.d.ts +1 -1
- package/dist/api/resources/audiences/types/AudienceMemberListResponse.d.ts +1 -1
- package/dist/api/resources/audiences/types/AudienceUpdateResponse.d.ts +1 -1
- package/dist/api/resources/audiences/types/BaseFilterConfig.d.ts +1 -1
- package/dist/api/resources/audiences/types/Filter.d.ts +1 -1
- package/dist/api/resources/audiences/types/FilterConfig.d.ts +1 -1
- package/dist/api/resources/audiences/types/NestedFilterConfig.d.ts +1 -1
- package/dist/api/resources/audiences/types/Operator.d.ts +1 -1
- package/dist/api/resources/audiences/types/SingleFilterConfig.d.ts +1 -1
- package/dist/api/resources/auditEvents/client/Client.d.ts +15 -1
- package/dist/api/resources/auditEvents/client/Client.js +23 -5
- package/dist/api/resources/auditEvents/client/requests/ListAuditEventsRequest.d.ts +6 -0
- package/dist/api/resources/auditEvents/client/requests/index.d.ts +1 -1
- package/dist/api/resources/auditEvents/types/AuditEvent.d.ts +1 -1
- package/dist/api/resources/auditEvents/types/ListAuditEventsResponse.d.ts +1 -1
- package/dist/api/resources/authTokens/client/Client.d.ts +11 -2
- package/dist/api/resources/authTokens/client/Client.js +15 -6
- package/dist/api/resources/authTokens/client/requests/IssueTokenParams.d.ts +7 -0
- package/dist/api/resources/authTokens/client/requests/index.d.ts +1 -1
- package/dist/api/resources/automations/client/Client.d.ts +31 -3
- package/dist/api/resources/automations/client/Client.js +40 -12
- package/dist/api/resources/automations/types/Automation.d.ts +1 -1
- package/dist/api/resources/automations/types/AutomationAdHocInvokeParams.d.ts +1 -1
- package/dist/api/resources/automations/types/AutomationAddToBatchRetain.d.ts +1 -1
- package/dist/api/resources/automations/types/AutomationAddToBatchStep.d.ts +1 -1
- package/dist/api/resources/automations/types/AutomationAddToDigestStep.d.ts +1 -1
- package/dist/api/resources/automations/types/AutomationCancelStep.d.ts +1 -1
- package/dist/api/resources/automations/types/AutomationDelayStep.d.ts +1 -1
- package/dist/api/resources/automations/types/AutomationFetchDataStep.d.ts +1 -1
- package/dist/api/resources/automations/types/AutomationFetchDataWebhook.d.ts +1 -1
- package/dist/api/resources/automations/types/AutomationInvokeParams.d.ts +1 -1
- package/dist/api/resources/automations/types/AutomationInvokeStep.d.ts +1 -1
- package/dist/api/resources/automations/types/AutomationInvokeTemplateParams.d.ts +1 -1
- package/dist/api/resources/automations/types/AutomationRunContext.d.ts +1 -1
- package/dist/api/resources/automations/types/AutomationSendListStep.d.ts +1 -1
- package/dist/api/resources/automations/types/AutomationSendStep.d.ts +1 -1
- package/dist/api/resources/automations/types/AutomationStepOption.d.ts +1 -1
- package/dist/api/resources/automations/types/AutomationThrottleStep.d.ts +1 -1
- package/dist/api/resources/automations/types/AutomationUpdateProfileStep.d.ts +1 -1
- package/dist/api/resources/automations/types/AutomationV2SendStep.d.ts +1 -1
- package/dist/api/resources/brands/client/Client.d.ts +57 -2
- package/dist/api/resources/brands/client/Client.js +77 -14
- package/dist/api/resources/brands/client/requests/BrandUpdateParameters.d.ts +21 -1
- package/dist/api/resources/brands/client/requests/ListBrandsRequest.d.ts +6 -0
- package/dist/api/resources/brands/client/requests/index.d.ts +2 -2
- package/dist/api/resources/brands/types/Brand.d.ts +1 -1
- package/dist/api/resources/brands/types/BrandGetAllResponse.d.ts +1 -1
- package/dist/api/resources/brands/types/BrandParameters.d.ts +1 -1
- package/dist/api/resources/brands/types/BrandSettings.d.ts +1 -1
- package/dist/api/resources/brands/types/BrandSnippets.d.ts +1 -1
- package/dist/api/resources/brands/types/BrandsResponse.d.ts +1 -1
- package/dist/api/resources/bulk/client/Client.d.ts +67 -2
- package/dist/api/resources/bulk/client/Client.js +90 -21
- package/dist/api/resources/bulk/client/requests/BulkCreateJobParams.d.ts +24 -1
- package/dist/api/resources/bulk/client/requests/index.d.ts +1 -1
- package/dist/api/resources/bulk/types/BulkGetJobResponse.d.ts +1 -1
- package/dist/api/resources/bulk/types/BulkGetJobUsersResponse.d.ts +1 -1
- package/dist/api/resources/bulk/types/BulkIngestUsersParams.d.ts +1 -1
- package/dist/api/resources/bulk/types/BulkIngestUsersResponse.d.ts +1 -1
- package/dist/api/resources/bulk/types/BulkMessageUserResponse.d.ts +1 -1
- package/dist/api/resources/bulk/types/InboundBulkContentMessage.d.ts +1 -1
- package/dist/api/resources/bulk/types/InboundBulkMessage.d.ts +1 -1
- package/dist/api/resources/bulk/types/InboundBulkMessageUser.d.ts +1 -1
- package/dist/api/resources/bulk/types/InboundBulkMessageV2.d.ts +1 -1
- package/dist/api/resources/bulk/types/InboundBulkTemplateMessage.d.ts +1 -1
- package/dist/api/resources/bulk/types/JobDetails.d.ts +1 -1
- package/dist/api/resources/commons/errors/AlreadyExistsError.d.ts +2 -2
- package/dist/api/resources/commons/errors/AlreadyExistsError.js +1 -1
- package/dist/api/resources/commons/errors/BadRequestError.d.ts +2 -2
- package/dist/api/resources/commons/errors/BadRequestError.js +1 -1
- package/dist/api/resources/commons/errors/ConflictError.d.ts +2 -2
- package/dist/api/resources/commons/errors/ConflictError.js +1 -1
- package/dist/api/resources/commons/errors/MessageNotFoundError.d.ts +2 -2
- package/dist/api/resources/commons/errors/MessageNotFoundError.js +1 -1
- package/dist/api/resources/commons/errors/NotFoundError.d.ts +2 -2
- package/dist/api/resources/commons/errors/NotFoundError.js +1 -1
- package/dist/api/resources/commons/errors/PaymentRequiredError.d.ts +2 -2
- package/dist/api/resources/commons/errors/PaymentRequiredError.js +1 -1
- package/dist/api/resources/commons/types/AlreadyExists.d.ts +1 -1
- package/dist/api/resources/commons/types/BadRequest.d.ts +1 -1
- package/dist/api/resources/commons/types/ChannelPreference.d.ts +1 -1
- package/dist/api/resources/commons/types/Conflict.d.ts +1 -1
- package/dist/api/resources/commons/types/MessageNotFound.d.ts +1 -1
- package/dist/api/resources/commons/types/NotFound.d.ts +1 -1
- package/dist/api/resources/commons/types/NotificationPreferenceDetails.d.ts +1 -1
- package/dist/api/resources/commons/types/NotificationPreferences.d.ts +1 -1
- package/dist/api/resources/commons/types/PaymentRequired.d.ts +1 -1
- package/dist/api/resources/commons/types/RecipientPreferences.d.ts +1 -1
- package/dist/api/resources/commons/types/UserTenantAssociation.d.ts +4 -3
- package/dist/api/resources/lists/client/Client.d.ts +197 -4
- package/dist/api/resources/lists/client/Client.js +236 -25
- package/dist/api/resources/lists/client/requests/AddSubscribersToList.d.ts +41 -0
- package/dist/api/resources/lists/client/requests/AddSubscribersToList.js +5 -0
- package/dist/api/resources/lists/client/requests/GetAllListsRequest.d.ts +7 -0
- package/dist/api/resources/lists/client/requests/GetSubscriptionForListRequest.d.ts +6 -0
- package/dist/api/resources/lists/client/requests/SubscribeUserToListRequest.d.ts +32 -1
- package/dist/api/resources/lists/client/requests/SubscribeUsersToListRequest.d.ts +41 -0
- package/dist/api/resources/lists/client/requests/SubscribeUsersToListRequest.js +5 -0
- package/dist/api/resources/lists/client/requests/index.d.ts +5 -3
- package/dist/api/resources/lists/types/ListGetAllResponse.d.ts +1 -1
- package/dist/api/resources/lists/types/ListGetSubscriptionsResponse.d.ts +1 -1
- package/dist/api/resources/lists/types/ListPutParams.d.ts +1 -1
- package/dist/api/resources/lists/types/ListSubscriptionRecipient.d.ts +1 -1
- package/dist/api/resources/lists/types/PutSubscriptionsRecipient.d.ts +1 -1
- package/dist/api/resources/messages/client/Client.d.ts +59 -2
- package/dist/api/resources/messages/client/Client.js +89 -28
- package/dist/api/resources/messages/client/requests/GetMessageHistoryRequest.d.ts +6 -0
- package/dist/api/resources/messages/client/requests/ListMessagesRequest.d.ts +19 -8
- package/dist/api/resources/messages/client/requests/index.d.ts +2 -2
- package/dist/api/resources/messages/types/ListMessagesResponse.d.ts +1 -1
- package/dist/api/resources/messages/types/MessageDetails.d.ts +1 -1
- package/dist/api/resources/messages/types/MessageHistoryResponse.d.ts +1 -2
- package/dist/api/resources/messages/types/RenderOutput.d.ts +1 -1
- package/dist/api/resources/messages/types/RenderOutputResponse.d.ts +1 -1
- package/dist/api/resources/messages/types/RenderedMessageContent.d.ts +1 -1
- package/dist/api/resources/notifications/client/Client.d.ts +113 -1
- package/dist/api/resources/notifications/client/Client.js +145 -17
- package/dist/api/resources/notifications/client/requests/NotificationDraftUpdateVariationsParams.d.ts +26 -1
- package/dist/api/resources/notifications/client/requests/NotificationListParams.d.ts +6 -0
- package/dist/api/resources/notifications/client/requests/NotificationUpdateVariationsParams.d.ts +26 -1
- package/dist/api/resources/notifications/client/requests/SubmissionChecksReplaceParams.d.ts +11 -1
- package/dist/api/resources/notifications/client/requests/index.d.ts +4 -4
- package/dist/api/resources/notifications/types/BaseCheck.d.ts +1 -1
- package/dist/api/resources/notifications/types/Check.d.ts +1 -1
- package/dist/api/resources/notifications/types/MessageRouting.d.ts +1 -1
- package/dist/api/resources/notifications/types/MessageRoutingChannel.d.ts +1 -1
- package/dist/api/resources/notifications/types/Notification.d.ts +5 -1
- package/dist/api/resources/notifications/types/NotificationBlock.d.ts +1 -1
- package/dist/api/resources/notifications/types/NotificationChannel.d.ts +1 -1
- package/dist/api/resources/notifications/types/NotificationContent.d.ts +1 -1
- package/dist/api/resources/notifications/types/NotificationGetContentResponse.d.ts +1 -1
- package/dist/api/resources/notifications/types/NotificationListResponse.d.ts +1 -1
- package/dist/api/resources/notifications/types/NotificationTag.d.ts +7 -0
- package/dist/api/resources/notifications/types/NotificationTag.js +5 -0
- package/dist/api/resources/notifications/types/NotificationTagData.d.ts +7 -0
- package/dist/api/resources/notifications/types/NotificationTagData.js +5 -0
- package/dist/api/resources/notifications/types/SubmissionChecksGetResponse.d.ts +1 -1
- package/dist/api/resources/notifications/types/SubmissionChecksReplaceResponse.d.ts +1 -1
- package/dist/api/resources/notifications/types/index.d.ts +2 -0
- package/dist/api/resources/notifications/types/index.js +2 -0
- package/dist/api/resources/profiles/client/Client.d.ts +71 -2
- package/dist/api/resources/profiles/client/Client.js +102 -23
- package/dist/api/resources/profiles/client/requests/GetListSubscriptionsRequest.d.ts +6 -0
- package/dist/api/resources/profiles/client/requests/MergeProfileRequest.d.ts +10 -0
- package/dist/api/resources/profiles/client/requests/ReplaceProfileRequest.d.ts +10 -0
- package/dist/api/resources/profiles/client/requests/index.d.ts +3 -3
- package/dist/api/resources/profiles/types/AirshipProfile.d.ts +1 -1
- package/dist/api/resources/profiles/types/Discord.d.ts +1 -1
- package/dist/api/resources/profiles/types/Expo.d.ts +1 -1
- package/dist/api/resources/profiles/types/GetListSubscriptionsList.d.ts +1 -1
- package/dist/api/resources/profiles/types/GetListSubscriptionsResponse.d.ts +1 -1
- package/dist/api/resources/profiles/types/Intercom.d.ts +1 -1
- package/dist/api/resources/profiles/types/MsTeams.d.ts +1 -1
- package/dist/api/resources/profiles/types/MultipleTokens.d.ts +1 -1
- package/dist/api/resources/profiles/types/ProfileGetResponse.d.ts +1 -1
- package/dist/api/resources/profiles/types/SendToMsTeamsChannelId.d.ts +1 -1
- package/dist/api/resources/profiles/types/SendToMsTeamsChannelName.d.ts +1 -1
- package/dist/api/resources/profiles/types/SendToMsTeamsConversationId.d.ts +1 -1
- package/dist/api/resources/profiles/types/SendToMsTeamsEmail.d.ts +1 -1
- package/dist/api/resources/profiles/types/SendToMsTeamsUserId.d.ts +1 -1
- package/dist/api/resources/profiles/types/SendToSlackChannel.d.ts +1 -1
- package/dist/api/resources/profiles/types/SendToSlackEmail.d.ts +1 -1
- package/dist/api/resources/profiles/types/SendToSlackUserId.d.ts +1 -1
- package/dist/api/resources/profiles/types/Slack.d.ts +1 -1
- package/dist/api/resources/profiles/types/SnoozeRule.d.ts +1 -1
- package/dist/api/resources/profiles/types/SubscribeToListsRequest.d.ts +1 -1
- package/dist/api/resources/profiles/types/SubscribeToListsRequestListObject.d.ts +1 -1
- package/dist/api/resources/profiles/types/UserProfile.d.ts +1 -1
- package/dist/api/resources/send/types/AudienceRecipient.d.ts +1 -1
- package/dist/api/resources/send/types/BaseMessage.d.ts +1 -1
- package/dist/api/resources/send/types/BaseMessageSendTo.d.ts +1 -1
- package/dist/api/resources/send/types/BrandSettingsEmail.d.ts +1 -1
- package/dist/api/resources/send/types/BrandSettingsInApp.d.ts +1 -1
- package/dist/api/resources/send/types/BrandSettingsSocialPresence.d.ts +1 -1
- package/dist/api/resources/send/types/BrandTemplateOverride.d.ts +1 -1
- package/dist/api/resources/send/types/Channel.d.ts +1 -1
- package/dist/api/resources/send/types/ChannelMetadata.d.ts +1 -1
- package/dist/api/resources/send/types/Content.d.ts +1 -1
- package/dist/api/resources/send/types/ContentMessage.d.ts +1 -1
- package/dist/api/resources/send/types/ElementalActionNode.d.ts +1 -1
- package/dist/api/resources/send/types/ElementalChannelNode.d.ts +1 -1
- package/dist/api/resources/send/types/ElementalContent.d.ts +1 -1
- package/dist/api/resources/send/types/ElementalDividerNode.d.ts +1 -1
- package/dist/api/resources/send/types/ElementalGroupNode.d.ts +1 -1
- package/dist/api/resources/send/types/ElementalImageNode.d.ts +1 -1
- package/dist/api/resources/send/types/ElementalMetaNode.d.ts +1 -1
- package/dist/api/resources/send/types/ElementalNode.d.ts +1 -1
- package/dist/api/resources/send/types/ElementalQuoteNode.d.ts +1 -1
- package/dist/api/resources/send/types/ElementalTextNode.d.ts +1 -1
- package/dist/api/resources/send/types/EmailHeader.d.ts +1 -1
- package/dist/api/resources/send/types/Expiry.d.ts +1 -1
- package/dist/api/resources/send/types/IPreferences.d.ts +1 -1
- package/dist/api/resources/send/types/IProfilePreferences.d.ts +1 -1
- package/dist/api/resources/send/types/ListPatternRecipient.d.ts +1 -1
- package/dist/api/resources/send/types/ListRecipient.d.ts +1 -1
- package/dist/api/resources/send/types/Locales.d.ts +1 -1
- package/dist/api/resources/send/types/Message.d.ts +1 -1
- package/dist/api/resources/send/types/MessageChannelEmailOverride.d.ts +1 -1
- package/dist/api/resources/send/types/MessageChannels.d.ts +1 -1
- package/dist/api/resources/send/types/MessageMetadata.d.ts +1 -1
- package/dist/api/resources/send/types/MessageProviders.d.ts +1 -1
- package/dist/api/resources/send/types/MessageProvidersType.d.ts +1 -1
- package/dist/api/resources/send/types/MessageRecipient.d.ts +1 -1
- package/dist/api/resources/send/types/Metadata.d.ts +1 -1
- package/dist/api/resources/send/types/MsTeamsRecipient.d.ts +1 -1
- package/dist/api/resources/send/types/Preference.d.ts +1 -1
- package/dist/api/resources/send/types/Recipient.d.ts +1 -1
- package/dist/api/resources/send/types/Routing.d.ts +1 -1
- package/dist/api/resources/send/types/RoutingChannel.d.ts +1 -1
- package/dist/api/resources/send/types/RoutingStrategyChannel.d.ts +1 -1
- package/dist/api/resources/send/types/RoutingStrategyProvider.d.ts +1 -1
- package/dist/api/resources/send/types/SlackRecipient.d.ts +1 -1
- package/dist/api/resources/send/types/TemplateMessage.d.ts +1 -1
- package/dist/api/resources/send/types/Timeout.d.ts +1 -1
- package/dist/api/resources/send/types/UserRecipient.d.ts +1 -1
- package/dist/api/resources/templates/client/Client.d.ts +9 -1
- package/dist/api/resources/templates/client/Client.js +13 -3
- package/dist/api/resources/templates/client/requests/ListTemplatesRequest.d.ts +6 -0
- package/dist/api/resources/templates/client/requests/index.d.ts +1 -1
- package/dist/api/resources/templates/types/ListTemplatesResponse.d.ts +1 -1
- package/dist/api/resources/templates/types/NotificationTemplates.d.ts +1 -1
- package/dist/api/resources/templates/types/RoutingStrategy.d.ts +1 -1
- package/dist/api/resources/templates/types/Tag.d.ts +1 -1
- package/dist/api/resources/tenants/client/Client.d.ts +82 -1
- package/dist/api/resources/tenants/client/Client.js +190 -13
- package/dist/api/resources/tenants/client/requests/ListTenantParams.d.ts +13 -1
- package/dist/api/resources/tenants/client/requests/ListUsersForTenantParams.d.ts +7 -0
- package/dist/api/resources/tenants/client/requests/TenantCreateOrReplaceParams.d.ts +23 -2
- package/dist/api/resources/tenants/client/requests/index.d.ts +3 -3
- package/dist/api/resources/tenants/types/DefaultPreferences.d.ts +2 -2
- package/dist/api/resources/tenants/types/ListUsersForTenantResponse.d.ts +1 -1
- package/dist/api/resources/tenants/types/SubscriptionTopic.d.ts +2 -3
- package/dist/api/resources/tenants/types/SubscriptionTopicNew.d.ts +11 -0
- package/dist/api/resources/tenants/types/SubscriptionTopicNew.js +5 -0
- package/dist/api/resources/tenants/types/TemplateProperty.d.ts +3 -0
- package/dist/api/resources/tenants/types/Tenant.d.ts +2 -2
- package/dist/api/resources/tenants/types/TenantListResponse.d.ts +1 -1
- package/dist/api/resources/tenants/types/index.d.ts +1 -0
- package/dist/api/resources/tenants/types/index.js +1 -0
- package/dist/api/resources/translations/client/Client.d.ts +17 -0
- package/dist/api/resources/translations/client/Client.js +28 -7
- package/dist/api/resources/users/resources/preferences/client/Client.d.ts +22 -1
- package/dist/api/resources/users/resources/preferences/client/Client.js +36 -9
- package/dist/api/resources/users/resources/preferences/client/requests/UserPreferencesUpdateParams.d.ts +1 -1
- package/dist/api/resources/users/resources/preferences/client/requests/index.d.ts +1 -1
- package/dist/api/resources/users/resources/preferences/types/TopicPreference.d.ts +1 -1
- package/dist/api/resources/users/resources/preferences/types/TopicPreferenceUpdate.d.ts +1 -1
- package/dist/api/resources/users/resources/preferences/types/UserPreferencesGetResponse.d.ts +1 -1
- package/dist/api/resources/users/resources/preferences/types/UserPreferencesListResponse.d.ts +1 -1
- package/dist/api/resources/users/resources/tenants/client/Client.d.ts +57 -2
- package/dist/api/resources/users/resources/tenants/client/Client.js +78 -13
- package/dist/api/resources/users/resources/tenants/client/requests/AddUserToMultipleTenantsParams.d.ts +16 -1
- package/dist/api/resources/users/resources/tenants/client/requests/AddUserToSingleTenantsParams.d.ts +11 -2
- package/dist/api/resources/users/resources/tenants/client/requests/ListTenantsForUserParams.d.ts +7 -0
- package/dist/api/resources/users/resources/tenants/client/requests/index.d.ts +3 -3
- package/dist/api/resources/users/resources/tenants/types/AddUserToSingleTenantsParamsProfile.d.ts +3 -0
- package/dist/api/resources/users/resources/tenants/types/ListTenantsForUserResponse.d.ts +1 -1
- package/dist/api/resources/users/resources/tokens/client/Client.d.ts +73 -1
- package/dist/api/resources/users/resources/tokens/client/Client.js +136 -13
- package/dist/api/resources/users/resources/tokens/types/GetAllTokensResponse.d.ts +1 -1
- package/dist/api/resources/users/resources/tokens/types/GetUserTokenResponse.d.ts +1 -1
- package/dist/api/resources/users/resources/tokens/types/PatchUserTokenOpts.d.ts +1 -1
- package/dist/api/resources/users/resources/tokens/types/PutUserTokenOpts.d.ts +1 -1
- package/dist/api/resources/users/resources/tokens/types/PutUserTokensOpts.d.ts +1 -1
- package/dist/api/resources/users/resources/tokens/types/UserToken.d.ts +1 -1
- package/dist/core/fetcher/Fetcher.d.ts +2 -2
- package/dist/core/fetcher/Fetcher.js +60 -6
- package/dist/core/index.d.ts +1 -0
- package/dist/core/index.js +1 -0
- package/dist/core/runtime/index.d.ts +1 -0
- package/dist/core/runtime/index.js +5 -0
- package/dist/core/runtime/runtime.d.ts +8 -0
- package/dist/core/runtime/runtime.js +82 -0
- package/jest.config.js +2 -2
- package/package.json +8 -6
- package/tests/client.test.ts +0 -11
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as environments from "../../../../environments";
|
|
5
5
|
import * as core from "../../../../core";
|
|
6
|
-
import * as Courier from "
|
|
6
|
+
import * as Courier from "../../../index";
|
|
7
7
|
export declare namespace Profiles {
|
|
8
8
|
interface Options {
|
|
9
9
|
environment?: core.Supplier<environments.CourierEnvironment | string>;
|
|
@@ -16,7 +16,7 @@ export declare namespace Profiles {
|
|
|
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 Profiles {
|
|
@@ -24,12 +24,33 @@ export declare class Profiles {
|
|
|
24
24
|
constructor(_options?: Profiles.Options);
|
|
25
25
|
/**
|
|
26
26
|
* Returns the specified user profile.
|
|
27
|
+
*
|
|
28
|
+
* @param {string} userId - A unique identifier representing the user associated with the requested profile.
|
|
29
|
+
* @param {Profiles.RequestOptions} requestOptions - Request-specific configuration.
|
|
30
|
+
*
|
|
27
31
|
* @throws {@link Courier.BadRequestError}
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* await courier.profiles.get("string")
|
|
28
35
|
*/
|
|
29
36
|
get(userId: string, requestOptions?: Profiles.RequestOptions): Promise<Courier.ProfileGetResponse>;
|
|
30
37
|
/**
|
|
31
38
|
* Merge the supplied values with an existing profile or create a new profile if one doesn't already exist.
|
|
39
|
+
*
|
|
40
|
+
* @param {string} userId - A unique identifier representing the user associated with the requested profile.
|
|
41
|
+
* @param {Courier.MergeProfileRequest} request
|
|
42
|
+
* @param {Profiles.IdempotentRequestOptions} requestOptions - Request-specific configuration.
|
|
43
|
+
*
|
|
32
44
|
* @throws {@link Courier.BadRequestError}
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* await courier.profiles.create("string", {
|
|
48
|
+
* profile: {
|
|
49
|
+
* "string": {
|
|
50
|
+
* "key": "value"
|
|
51
|
+
* }
|
|
52
|
+
* }
|
|
53
|
+
* })
|
|
33
54
|
*/
|
|
34
55
|
create(userId: string, request: Courier.MergeProfileRequest, requestOptions?: Profiles.IdempotentRequestOptions): Promise<Courier.MergeProfileResponse>;
|
|
35
56
|
/**
|
|
@@ -37,27 +58,75 @@ export declare class Profiles {
|
|
|
37
58
|
* Any key-value pairs that exist in the profile but fail to be included in the `PUT` request will be
|
|
38
59
|
* removed from the profile. Remember, a `PUT` update is a full replacement of the data. For partial updates,
|
|
39
60
|
* use the [Patch](https://www.courier.com/docs/reference/profiles/patch/) request.
|
|
61
|
+
*
|
|
62
|
+
* @param {string} userId - A unique identifier representing the user associated with the requested profile.
|
|
63
|
+
* @param {Courier.ReplaceProfileRequest} request
|
|
64
|
+
* @param {Profiles.RequestOptions} requestOptions - Request-specific configuration.
|
|
65
|
+
*
|
|
40
66
|
* @throws {@link Courier.BadRequestError}
|
|
67
|
+
*
|
|
68
|
+
* @example
|
|
69
|
+
* await courier.profiles.replace("string", {
|
|
70
|
+
* profile: {
|
|
71
|
+
* "string": {
|
|
72
|
+
* "key": "value"
|
|
73
|
+
* }
|
|
74
|
+
* }
|
|
75
|
+
* })
|
|
41
76
|
*/
|
|
42
77
|
replace(userId: string, request: Courier.ReplaceProfileRequest, requestOptions?: Profiles.RequestOptions): Promise<Courier.ReplaceProfileResponse>;
|
|
43
78
|
/**
|
|
44
79
|
* Deletes the specified user profile.
|
|
80
|
+
*
|
|
81
|
+
* @param {string} userId - A unique identifier representing the user associated with the requested profile.
|
|
82
|
+
* @param {Profiles.RequestOptions} requestOptions - Request-specific configuration.
|
|
83
|
+
*
|
|
45
84
|
* @throws {@link Courier.BadRequestError}
|
|
85
|
+
*
|
|
86
|
+
* @example
|
|
87
|
+
* await courier.profiles.delete("string")
|
|
46
88
|
*/
|
|
47
89
|
delete(userId: string, requestOptions?: Profiles.RequestOptions): Promise<void>;
|
|
48
90
|
/**
|
|
49
91
|
* Returns the subscribed lists for a specified user.
|
|
92
|
+
*
|
|
93
|
+
* @param {string} userId - A unique identifier representing the user associated with the requested profile.
|
|
94
|
+
* @param {Courier.GetListSubscriptionsRequest} request
|
|
95
|
+
* @param {Profiles.RequestOptions} requestOptions - Request-specific configuration.
|
|
96
|
+
*
|
|
50
97
|
* @throws {@link Courier.BadRequestError}
|
|
98
|
+
*
|
|
99
|
+
* @example
|
|
100
|
+
* await courier.profiles.getListSubscriptions("string", {
|
|
101
|
+
* cursor: "string"
|
|
102
|
+
* })
|
|
51
103
|
*/
|
|
52
104
|
getListSubscriptions(userId: string, request?: Courier.GetListSubscriptionsRequest, requestOptions?: Profiles.RequestOptions): Promise<Courier.GetListSubscriptionsResponse>;
|
|
53
105
|
/**
|
|
54
106
|
* Subscribes the given user to one or more lists. If the list does not exist, it will be created.
|
|
107
|
+
*
|
|
108
|
+
* @param {string} userId - A unique identifier representing the user associated with the requested profile.
|
|
109
|
+
* @param {Courier.SubscribeToListsRequest} request
|
|
110
|
+
* @param {Profiles.IdempotentRequestOptions} requestOptions - Request-specific configuration.
|
|
111
|
+
*
|
|
55
112
|
* @throws {@link Courier.BadRequestError}
|
|
113
|
+
*
|
|
114
|
+
* @example
|
|
115
|
+
* await courier.profiles.subscribeToLists("string", {
|
|
116
|
+
* lists: [{}]
|
|
117
|
+
* })
|
|
56
118
|
*/
|
|
57
119
|
subscribeToLists(userId: string, request: Courier.SubscribeToListsRequest, requestOptions?: Profiles.IdempotentRequestOptions): Promise<Courier.SubscribeToListsResponse>;
|
|
58
120
|
/**
|
|
59
121
|
* Removes all list subscriptions for given user.
|
|
122
|
+
*
|
|
123
|
+
* @param {string} userId - A unique identifier representing the user associated with the requested profile.
|
|
124
|
+
* @param {Profiles.RequestOptions} requestOptions - Request-specific configuration.
|
|
125
|
+
*
|
|
60
126
|
* @throws {@link Courier.BadRequestError}
|
|
127
|
+
*
|
|
128
|
+
* @example
|
|
129
|
+
* await courier.profiles.deleteListSubscription("string")
|
|
61
130
|
*/
|
|
62
131
|
deleteListSubscription(userId: string, requestOptions?: Profiles.RequestOptions): Promise<Courier.DeleteListSubscriptionResponse>;
|
|
63
132
|
protected _getAuthorizationHeader(): Promise<string>;
|
|
@@ -41,28 +41,37 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
41
41
|
exports.Profiles = 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 Profiles {
|
|
48
48
|
constructor(_options = {}) {
|
|
49
49
|
this._options = _options;
|
|
50
50
|
}
|
|
51
51
|
/**
|
|
52
52
|
* Returns the specified user profile.
|
|
53
|
+
*
|
|
54
|
+
* @param {string} userId - A unique identifier representing the user associated with the requested profile.
|
|
55
|
+
* @param {Profiles.RequestOptions} requestOptions - Request-specific configuration.
|
|
56
|
+
*
|
|
53
57
|
* @throws {@link Courier.BadRequestError}
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* await courier.profiles.get("string")
|
|
54
61
|
*/
|
|
55
62
|
get(userId, requestOptions) {
|
|
56
63
|
var _a, _b;
|
|
57
64
|
return __awaiter(this, void 0, void 0, function* () {
|
|
58
65
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
59
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CourierEnvironment.Production, `/profiles/${userId}`),
|
|
66
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CourierEnvironment.Production, `/profiles/${encodeURIComponent(userId)}`),
|
|
60
67
|
method: "GET",
|
|
61
68
|
headers: {
|
|
62
69
|
Authorization: yield this._getAuthorizationHeader(),
|
|
63
70
|
"X-Fern-Language": "JavaScript",
|
|
64
71
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
65
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
72
|
+
"X-Fern-SDK-Version": "v6.1.3",
|
|
73
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
74
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
66
75
|
},
|
|
67
76
|
contentType: "application/json",
|
|
68
77
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -99,23 +108,37 @@ class Profiles {
|
|
|
99
108
|
}
|
|
100
109
|
/**
|
|
101
110
|
* Merge the supplied values with an existing profile or create a new profile if one doesn't already exist.
|
|
111
|
+
*
|
|
112
|
+
* @param {string} userId - A unique identifier representing the user associated with the requested profile.
|
|
113
|
+
* @param {Courier.MergeProfileRequest} request
|
|
114
|
+
* @param {Profiles.IdempotentRequestOptions} requestOptions - Request-specific configuration.
|
|
115
|
+
*
|
|
102
116
|
* @throws {@link Courier.BadRequestError}
|
|
117
|
+
*
|
|
118
|
+
* @example
|
|
119
|
+
* await courier.profiles.create("string", {
|
|
120
|
+
* profile: {
|
|
121
|
+
* "string": {
|
|
122
|
+
* "key": "value"
|
|
123
|
+
* }
|
|
124
|
+
* }
|
|
125
|
+
* })
|
|
103
126
|
*/
|
|
104
127
|
create(userId, request, requestOptions) {
|
|
105
128
|
var _a, _b;
|
|
106
129
|
return __awaiter(this, void 0, void 0, function* () {
|
|
107
130
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
108
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CourierEnvironment.Production, `/profiles/${userId}`),
|
|
131
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CourierEnvironment.Production, `/profiles/${encodeURIComponent(userId)}`),
|
|
109
132
|
method: "POST",
|
|
110
133
|
headers: {
|
|
111
134
|
Authorization: yield this._getAuthorizationHeader(),
|
|
112
135
|
"X-Fern-Language": "JavaScript",
|
|
113
136
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
114
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
137
|
+
"X-Fern-SDK-Version": "v6.1.3",
|
|
138
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
139
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
115
140
|
"Idempotency-Key": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey) != null ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey : undefined,
|
|
116
|
-
"X-Idempotency-Expiration": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry) != null
|
|
117
|
-
? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry.toString()
|
|
118
|
-
: undefined,
|
|
141
|
+
"X-Idempotency-Expiration": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry) != null ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry : undefined,
|
|
119
142
|
},
|
|
120
143
|
contentType: "application/json",
|
|
121
144
|
body: request,
|
|
@@ -156,19 +179,35 @@ class Profiles {
|
|
|
156
179
|
* Any key-value pairs that exist in the profile but fail to be included in the `PUT` request will be
|
|
157
180
|
* removed from the profile. Remember, a `PUT` update is a full replacement of the data. For partial updates,
|
|
158
181
|
* use the [Patch](https://www.courier.com/docs/reference/profiles/patch/) request.
|
|
182
|
+
*
|
|
183
|
+
* @param {string} userId - A unique identifier representing the user associated with the requested profile.
|
|
184
|
+
* @param {Courier.ReplaceProfileRequest} request
|
|
185
|
+
* @param {Profiles.RequestOptions} requestOptions - Request-specific configuration.
|
|
186
|
+
*
|
|
159
187
|
* @throws {@link Courier.BadRequestError}
|
|
188
|
+
*
|
|
189
|
+
* @example
|
|
190
|
+
* await courier.profiles.replace("string", {
|
|
191
|
+
* profile: {
|
|
192
|
+
* "string": {
|
|
193
|
+
* "key": "value"
|
|
194
|
+
* }
|
|
195
|
+
* }
|
|
196
|
+
* })
|
|
160
197
|
*/
|
|
161
198
|
replace(userId, request, requestOptions) {
|
|
162
199
|
var _a, _b;
|
|
163
200
|
return __awaiter(this, void 0, void 0, function* () {
|
|
164
201
|
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, `/profiles/${userId}`),
|
|
202
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CourierEnvironment.Production, `/profiles/${encodeURIComponent(userId)}`),
|
|
166
203
|
method: "PUT",
|
|
167
204
|
headers: {
|
|
168
205
|
Authorization: yield this._getAuthorizationHeader(),
|
|
169
206
|
"X-Fern-Language": "JavaScript",
|
|
170
207
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
171
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
208
|
+
"X-Fern-SDK-Version": "v6.1.3",
|
|
209
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
210
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
172
211
|
},
|
|
173
212
|
contentType: "application/json",
|
|
174
213
|
body: request,
|
|
@@ -206,19 +245,28 @@ class Profiles {
|
|
|
206
245
|
}
|
|
207
246
|
/**
|
|
208
247
|
* Deletes the specified user profile.
|
|
248
|
+
*
|
|
249
|
+
* @param {string} userId - A unique identifier representing the user associated with the requested profile.
|
|
250
|
+
* @param {Profiles.RequestOptions} requestOptions - Request-specific configuration.
|
|
251
|
+
*
|
|
209
252
|
* @throws {@link Courier.BadRequestError}
|
|
253
|
+
*
|
|
254
|
+
* @example
|
|
255
|
+
* await courier.profiles.delete("string")
|
|
210
256
|
*/
|
|
211
257
|
delete(userId, requestOptions) {
|
|
212
258
|
var _a, _b;
|
|
213
259
|
return __awaiter(this, void 0, void 0, function* () {
|
|
214
260
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
215
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CourierEnvironment.Production, `/profiles/${userId}`),
|
|
261
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CourierEnvironment.Production, `/profiles/${encodeURIComponent(userId)}`),
|
|
216
262
|
method: "DELETE",
|
|
217
263
|
headers: {
|
|
218
264
|
Authorization: yield this._getAuthorizationHeader(),
|
|
219
265
|
"X-Fern-Language": "JavaScript",
|
|
220
266
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
221
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
267
|
+
"X-Fern-SDK-Version": "v6.1.3",
|
|
268
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
269
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
222
270
|
},
|
|
223
271
|
contentType: "application/json",
|
|
224
272
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -255,7 +303,17 @@ class Profiles {
|
|
|
255
303
|
}
|
|
256
304
|
/**
|
|
257
305
|
* Returns the subscribed lists for a specified user.
|
|
306
|
+
*
|
|
307
|
+
* @param {string} userId - A unique identifier representing the user associated with the requested profile.
|
|
308
|
+
* @param {Courier.GetListSubscriptionsRequest} request
|
|
309
|
+
* @param {Profiles.RequestOptions} requestOptions - Request-specific configuration.
|
|
310
|
+
*
|
|
258
311
|
* @throws {@link Courier.BadRequestError}
|
|
312
|
+
*
|
|
313
|
+
* @example
|
|
314
|
+
* await courier.profiles.getListSubscriptions("string", {
|
|
315
|
+
* cursor: "string"
|
|
316
|
+
* })
|
|
259
317
|
*/
|
|
260
318
|
getListSubscriptions(userId, request = {}, requestOptions) {
|
|
261
319
|
var _a, _b;
|
|
@@ -266,13 +324,15 @@ class Profiles {
|
|
|
266
324
|
_queryParams["cursor"] = cursor;
|
|
267
325
|
}
|
|
268
326
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
269
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CourierEnvironment.Production, `/profiles/${userId}/lists`),
|
|
327
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CourierEnvironment.Production, `/profiles/${encodeURIComponent(userId)}/lists`),
|
|
270
328
|
method: "GET",
|
|
271
329
|
headers: {
|
|
272
330
|
Authorization: yield this._getAuthorizationHeader(),
|
|
273
331
|
"X-Fern-Language": "JavaScript",
|
|
274
332
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
275
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
333
|
+
"X-Fern-SDK-Version": "v6.1.3",
|
|
334
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
335
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
276
336
|
},
|
|
277
337
|
contentType: "application/json",
|
|
278
338
|
queryParameters: _queryParams,
|
|
@@ -310,23 +370,33 @@ class Profiles {
|
|
|
310
370
|
}
|
|
311
371
|
/**
|
|
312
372
|
* Subscribes the given user to one or more lists. If the list does not exist, it will be created.
|
|
373
|
+
*
|
|
374
|
+
* @param {string} userId - A unique identifier representing the user associated with the requested profile.
|
|
375
|
+
* @param {Courier.SubscribeToListsRequest} request
|
|
376
|
+
* @param {Profiles.IdempotentRequestOptions} requestOptions - Request-specific configuration.
|
|
377
|
+
*
|
|
313
378
|
* @throws {@link Courier.BadRequestError}
|
|
379
|
+
*
|
|
380
|
+
* @example
|
|
381
|
+
* await courier.profiles.subscribeToLists("string", {
|
|
382
|
+
* lists: [{}]
|
|
383
|
+
* })
|
|
314
384
|
*/
|
|
315
385
|
subscribeToLists(userId, request, requestOptions) {
|
|
316
386
|
var _a, _b;
|
|
317
387
|
return __awaiter(this, void 0, void 0, function* () {
|
|
318
388
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
319
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CourierEnvironment.Production, `/profiles/${userId}/lists`),
|
|
389
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CourierEnvironment.Production, `/profiles/${encodeURIComponent(userId)}/lists`),
|
|
320
390
|
method: "POST",
|
|
321
391
|
headers: {
|
|
322
392
|
Authorization: yield this._getAuthorizationHeader(),
|
|
323
393
|
"X-Fern-Language": "JavaScript",
|
|
324
394
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
325
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
395
|
+
"X-Fern-SDK-Version": "v6.1.3",
|
|
396
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
397
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
326
398
|
"Idempotency-Key": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey) != null ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey : undefined,
|
|
327
|
-
"X-Idempotency-Expiration": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry) != null
|
|
328
|
-
? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry.toString()
|
|
329
|
-
: undefined,
|
|
399
|
+
"X-Idempotency-Expiration": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry) != null ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry : undefined,
|
|
330
400
|
},
|
|
331
401
|
contentType: "application/json",
|
|
332
402
|
body: request,
|
|
@@ -364,19 +434,28 @@ class Profiles {
|
|
|
364
434
|
}
|
|
365
435
|
/**
|
|
366
436
|
* Removes all list subscriptions for given user.
|
|
437
|
+
*
|
|
438
|
+
* @param {string} userId - A unique identifier representing the user associated with the requested profile.
|
|
439
|
+
* @param {Profiles.RequestOptions} requestOptions - Request-specific configuration.
|
|
440
|
+
*
|
|
367
441
|
* @throws {@link Courier.BadRequestError}
|
|
442
|
+
*
|
|
443
|
+
* @example
|
|
444
|
+
* await courier.profiles.deleteListSubscription("string")
|
|
368
445
|
*/
|
|
369
446
|
deleteListSubscription(userId, requestOptions) {
|
|
370
447
|
var _a, _b;
|
|
371
448
|
return __awaiter(this, void 0, void 0, function* () {
|
|
372
449
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
373
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CourierEnvironment.Production, `/profiles/${userId}/lists`),
|
|
450
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CourierEnvironment.Production, `/profiles/${encodeURIComponent(userId)}/lists`),
|
|
374
451
|
method: "DELETE",
|
|
375
452
|
headers: {
|
|
376
453
|
Authorization: yield this._getAuthorizationHeader(),
|
|
377
454
|
"X-Fern-Language": "JavaScript",
|
|
378
455
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
379
|
-
"X-Fern-SDK-Version": "v6.1.
|
|
456
|
+
"X-Fern-SDK-Version": "v6.1.3",
|
|
457
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
458
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
380
459
|
},
|
|
381
460
|
contentType: "application/json",
|
|
382
461
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -414,7 +493,7 @@ class Profiles {
|
|
|
414
493
|
_getAuthorizationHeader() {
|
|
415
494
|
var _a;
|
|
416
495
|
return __awaiter(this, void 0, void 0, function* () {
|
|
417
|
-
const bearer = (_a = (yield core.Supplier.get(this._options.authorizationToken))) !== null && _a !== void 0 ? _a : process.env["COURIER_AUTH_TOKEN"];
|
|
496
|
+
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"];
|
|
418
497
|
if (bearer == null) {
|
|
419
498
|
throw new errors.CourierError({
|
|
420
499
|
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 GetListSubscriptionsRequest {
|
|
5
11
|
/**
|
|
6
12
|
* A unique identifier that allows for fetching the next set of message statuses.
|
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
+
/**
|
|
5
|
+
* @example
|
|
6
|
+
* {
|
|
7
|
+
* profile: {
|
|
8
|
+
* "string": {
|
|
9
|
+
* "key": "value"
|
|
10
|
+
* }
|
|
11
|
+
* }
|
|
12
|
+
* }
|
|
13
|
+
*/
|
|
4
14
|
export interface MergeProfileRequest {
|
|
5
15
|
profile: Record<string, any>;
|
|
6
16
|
}
|
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
+
/**
|
|
5
|
+
* @example
|
|
6
|
+
* {
|
|
7
|
+
* profile: {
|
|
8
|
+
* "string": {
|
|
9
|
+
* "key": "value"
|
|
10
|
+
* }
|
|
11
|
+
* }
|
|
12
|
+
* }
|
|
13
|
+
*/
|
|
4
14
|
export interface ReplaceProfileRequest {
|
|
5
15
|
profile: Record<string, any>;
|
|
6
16
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { MergeProfileRequest } from "./MergeProfileRequest";
|
|
2
|
-
export { ReplaceProfileRequest } from "./ReplaceProfileRequest";
|
|
3
|
-
export { GetListSubscriptionsRequest } from "./GetListSubscriptionsRequest";
|
|
1
|
+
export { type MergeProfileRequest } from "./MergeProfileRequest";
|
|
2
|
+
export { type ReplaceProfileRequest } from "./ReplaceProfileRequest";
|
|
3
|
+
export { type GetListSubscriptionsRequest } from "./GetListSubscriptionsRequest";
|
|
@@ -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 AirshipProfile {
|
|
6
6
|
audience: Courier.AirshipProfileAudience;
|
|
7
7
|
device_types: (Courier.DeviceType | undefined)[];
|
|
@@ -1,5 +1,5 @@
|
|
|
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 declare type MsTeams = Courier.SendToMsTeamsUserId | Courier.SendToMsTeamsEmail | Courier.SendToMsTeamsChannelId | Courier.SendToMsTeamsConversationId | Courier.SendToMsTeamsChannelName;
|
|
@@ -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 ProfileGetResponse {
|
|
6
6
|
profile: Record<string, any>;
|
|
7
7
|
preferences?: Courier.RecipientPreferences;
|
|
@@ -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 SendToMsTeamsChannelId extends Courier.MsTeamsBaseProperties {
|
|
6
6
|
channel_id: string;
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
import * as Courier from "
|
|
4
|
+
import * as Courier from "../../../index";
|
|
5
5
|
export interface SendToMsTeamsChannelName extends Courier.MsTeamsBaseProperties {
|
|
6
6
|
channel_name: string;
|
|
7
7
|
team_id: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
import * as Courier from "
|
|
4
|
+
import * as Courier from "../../../index";
|
|
5
5
|
export interface SendToMsTeamsConversationId extends Courier.MsTeamsBaseProperties {
|
|
6
6
|
conversation_id: string;
|
|
7
7
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
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 declare type Slack = Courier.SendToSlackChannel | Courier.SendToSlackEmail | Courier.SendToSlackUserId;
|