@trycourier/courier 6.0.1 → 6.0.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 +8 -8
- package/Client.js +16 -16
- package/README.md +112 -110
- package/api/resources/audiences/client/Client.d.ts +5 -5
- package/api/resources/audiences/client/Client.js +7 -7
- package/api/resources/audiences/client/requests/{ListAudienceMembersRequest.d.ts → AudienceMembersListParams.d.ts} +1 -2
- package/{dist/api/resources/audiences/types/AudienceRequest.d.ts → api/resources/audiences/client/requests/AudienceUpdateParams.d.ts} +2 -4
- package/api/resources/audiences/client/requests/{ListAudiencesRequest.d.ts → AudiencesListParams.d.ts} +1 -2
- package/api/resources/audiences/client/requests/index.d.ts +3 -2
- package/api/resources/audiences/types/{AudiencePutResponse.d.ts → AudienceUpdateResponse.d.ts} +1 -1
- package/api/resources/audiences/types/BaseFilterConfig.d.ts +1 -4
- package/api/resources/audiences/types/index.d.ts +1 -2
- package/api/resources/audiences/types/index.js +1 -2
- package/api/resources/auditEvents/client/Client.d.ts +2 -2
- package/api/resources/auditEvents/client/Client.js +3 -3
- package/api/resources/auditEvents/client/requests/ListAuditEventsRequest.d.ts +0 -1
- package/api/resources/authTokens/client/Client.d.ts +3 -3
- package/api/resources/authTokens/client/Client.js +2 -2
- package/api/resources/authTokens/client/index.d.ts +1 -1
- package/api/resources/authTokens/client/index.js +15 -0
- package/api/resources/authTokens/{types/AuthIssueTokenParameters.d.ts → client/requests/IssueTokenParams.d.ts} +2 -2
- package/api/resources/authTokens/client/requests/index.d.ts +1 -0
- package/api/resources/authTokens/types/{AuthIssueTokenResponse.d.ts → IssueTokenResponse.d.ts} +1 -1
- package/api/resources/authTokens/types/index.d.ts +1 -2
- package/api/resources/authTokens/types/index.js +1 -2
- package/api/resources/automations/client/Client.d.ts +3 -3
- package/api/resources/automations/client/Client.js +6 -5
- package/api/resources/brands/client/Client.d.ts +6 -2
- package/api/resources/brands/client/Client.js +49 -5
- package/api/resources/brands/{types/BrandPutParameters.d.ts → client/requests/BrandUpdateParameters.d.ts} +3 -4
- package/api/resources/brands/client/requests/index.d.ts +1 -0
- package/api/resources/brands/types/index.d.ts +0 -1
- package/api/resources/brands/types/index.js +0 -1
- package/api/resources/bulk/client/Client.d.ts +4 -4
- package/api/resources/bulk/client/Client.js +8 -9
- package/api/resources/bulk/client/index.d.ts +1 -1
- package/api/resources/bulk/client/index.js +15 -0
- package/{dist/api/resources/bulk/types → api/resources/bulk/client/requests}/BulkCreateJobParams.d.ts +1 -1
- package/api/resources/bulk/client/requests/index.d.ts +1 -0
- package/api/resources/bulk/types/BulkIngestUsersParams.d.ts +0 -1
- package/api/resources/bulk/types/InboundBulkContentMessage.d.ts +15 -0
- package/api/resources/bulk/types/InboundBulkMessage.d.ts +2 -2
- package/api/resources/bulk/types/InboundBulkMessageV1.d.ts +23 -0
- package/api/resources/bulk/types/InboundBulkMessageV2.d.ts +16 -0
- package/api/resources/bulk/types/InboundBulkTemplateMessage.d.ts +11 -0
- package/api/resources/bulk/types/index.d.ts +4 -4
- package/api/resources/bulk/types/index.js +4 -4
- package/api/resources/index.d.ts +7 -4
- package/api/resources/index.js +8 -5
- package/api/resources/lists/client/Client.d.ts +14 -6
- package/api/resources/lists/client/Client.js +99 -13
- package/api/resources/lists/client/requests/GetAllListsRequest.d.ts +0 -1
- package/api/resources/lists/client/requests/GetListRequest.d.ts +0 -1
- package/api/resources/lists/client/requests/SubscribeUserToListRequest.d.ts +0 -2
- package/api/resources/messages/client/Client.d.ts +2 -2
- package/api/resources/messages/client/Client.js +8 -8
- package/api/resources/messages/client/requests/ListMessagesRequest.d.ts +1 -1
- package/api/resources/notifications/client/Client.d.ts +29 -0
- package/api/resources/notifications/client/Client.js +392 -0
- package/api/resources/notifications/client/index.d.ts +1 -0
- package/api/resources/notifications/client/index.js +17 -0
- package/api/resources/notifications/client/requests/NotificationDraftUpdateVariationsParams.d.ts +8 -0
- package/api/resources/{bulk/types/BulkRunJobParams.d.ts → notifications/client/requests/NotificationListParams.d.ts} +2 -2
- package/api/resources/notifications/client/requests/NotificationUpdateVariationsParams.d.ts +8 -0
- package/api/resources/notifications/client/requests/SubmissionChecksReplaceParams.d.ts +7 -0
- package/api/resources/notifications/client/requests/index.d.ts +4 -0
- package/api/resources/notifications/types/BaseCheck.d.ts +9 -0
- package/api/resources/notifications/types/BlockType.d.ts +15 -0
- package/api/resources/notifications/types/BlockType.js +17 -0
- package/api/resources/{tokenManagement/types/PatchUserTokenOpts.d.ts → notifications/types/Check.d.ts} +2 -2
- package/api/resources/notifications/types/CheckStatus.d.ts +9 -0
- package/api/resources/notifications/types/CheckStatus.js +11 -0
- package/api/resources/notifications/types/MessageRouting.d.ts +8 -0
- package/api/resources/notifications/types/MessageRoutingChannel.d.ts +5 -0
- package/api/resources/notifications/types/MessageRoutingMethod.d.ts +8 -0
- package/api/resources/notifications/types/MessageRoutingMethod.js +10 -0
- package/api/resources/notifications/types/Notification.d.ts +9 -0
- package/api/resources/notifications/types/NotificationBlock.d.ts +13 -0
- package/api/resources/notifications/types/NotificationChannel.d.ts +11 -0
- package/api/resources/notifications/types/NotificationChannelContent.d.ts +7 -0
- package/api/resources/notifications/types/NotificationContent.d.ts +5 -0
- package/api/resources/notifications/types/NotificationContentHierarchy.d.ts +7 -0
- package/api/resources/notifications/types/NotificationGetContentResponse.d.ts +9 -0
- package/api/resources/notifications/types/NotificationListResponse.d.ts +8 -0
- package/api/resources/notifications/types/SubmissionChecksGetResponse.d.ts +7 -0
- package/api/resources/notifications/types/SubmissionChecksReplaceResponse.d.ts +7 -0
- package/api/resources/notifications/types/index.d.ts +17 -0
- package/api/resources/notifications/types/index.js +33 -0
- package/api/resources/profiles/client/Client.d.ts +2 -3
- package/api/resources/profiles/client/Client.js +8 -9
- package/api/resources/send/types/BaseMessage.d.ts +1 -8
- package/api/resources/send/types/Channel.d.ts +0 -4
- package/api/resources/send/types/ContentMessage.d.ts +2 -2
- package/api/resources/send/types/ElementalChannelNode.d.ts +0 -4
- package/api/resources/send/types/ElementalMetaNode.d.ts +0 -1
- package/api/resources/send/types/ElementalTextNode.d.ts +0 -1
- package/api/resources/send/types/MessageContext.d.ts +0 -1
- package/api/resources/send/types/MessageProvidersType.d.ts +0 -1
- package/api/resources/send/types/Routing.d.ts +0 -2
- package/api/resources/send/types/TemplateMessage.d.ts +2 -1
- package/api/resources/send/types/UserRecipient.d.ts +0 -1
- package/api/resources/templates/client/Client.d.ts +2 -2
- package/api/resources/templates/client/Client.js +2 -2
- package/api/resources/tenants/client/Client.d.ts +9 -3
- package/api/resources/tenants/client/Client.js +130 -2
- package/api/resources/tenants/client/index.d.ts +1 -1
- package/api/resources/tenants/client/index.js +15 -0
- package/{dist/api/resources/tenants/types/CreateOrReplaceTenantRequest.d.ts → api/resources/tenants/client/requests/TenantCreateOrReplaceParams.d.ts} +7 -7
- package/api/resources/tenants/client/requests/index.d.ts +1 -0
- package/api/resources/tenants/types/{CreateOrReplaceTenantResponse.d.ts → Tenant.d.ts} +3 -3
- package/api/resources/tenants/types/TenantListResponse.d.ts +21 -0
- package/api/resources/tenants/types/index.d.ts +2 -2
- package/api/resources/tenants/types/index.js +2 -2
- package/api/resources/translations/client/Client.d.ts +2 -2
- package/api/resources/translations/client/Client.js +3 -3
- package/api/resources/users/client/Client.d.ts +28 -0
- package/api/resources/users/client/Client.js +27 -0
- package/api/resources/users/client/index.js +2 -0
- package/api/resources/users/index.d.ts +2 -0
- package/api/resources/users/index.js +18 -0
- package/api/resources/users/resources/index.d.ts +8 -0
- package/api/resources/users/resources/index.js +37 -0
- package/api/resources/users/resources/preferences/client/Client.d.ts +36 -0
- package/api/resources/{userPreferences → users/resources/preferences}/client/Client.js +14 -14
- package/api/resources/users/resources/preferences/client/index.d.ts +1 -0
- package/api/resources/users/resources/preferences/client/index.js +17 -0
- package/api/resources/{userPreferences/types/UpdateSubscriptionTopicRequest.d.ts → users/resources/preferences/client/requests/UserPreferencesUpdateParams.d.ts} +3 -3
- package/api/resources/users/resources/preferences/client/requests/index.d.ts +1 -0
- package/api/resources/users/resources/preferences/client/requests/index.js +2 -0
- package/api/resources/{userPreferences → users/resources/preferences}/types/TopicPreference.d.ts +1 -1
- package/api/resources/users/resources/preferences/types/UserPreferencesGetResponse.d.ts +7 -0
- package/api/resources/{userPreferences/types/UserPreferences.d.ts → users/resources/preferences/types/UserPreferencesListResponse.d.ts} +3 -3
- package/{dist/api/resources/userPreferences/types/UpdateSubscriptionTopicResponse.d.ts → api/resources/users/resources/preferences/types/UserPreferencesUpdateResponse.d.ts} +1 -1
- package/api/resources/users/resources/preferences/types/index.d.ts +4 -0
- package/{dist/api/resources/userPreferences → api/resources/users/resources/preferences}/types/index.js +3 -3
- package/api/resources/users/resources/tenants/client/Client.d.ts +45 -0
- package/api/resources/users/resources/tenants/client/Client.js +254 -0
- package/api/resources/users/resources/tenants/client/index.d.ts +1 -0
- package/api/resources/users/resources/tenants/client/index.js +17 -0
- package/api/resources/users/resources/tenants/client/requests/AddUserToMultipleTenantsParams.d.ts +7 -0
- package/api/resources/users/resources/tenants/client/requests/AddUserToSingleTenantsParams.d.ts +7 -0
- package/api/resources/users/resources/tenants/client/requests/ListTenantsForUserParams.d.ts +14 -0
- package/api/resources/users/resources/tenants/client/requests/index.d.ts +3 -0
- package/api/resources/users/resources/tenants/client/requests/index.js +2 -0
- package/api/resources/users/resources/tenants/types/AddUserToSingleTenantsParamsProfile.d.ts +14 -0
- package/api/resources/users/resources/tenants/types/ListTenantsForUserResponse.d.ts +23 -0
- package/api/resources/users/resources/tenants/types/UserTenantAssociation.d.ts +8 -0
- package/api/resources/users/resources/tenants/types/index.d.ts +3 -0
- package/api/resources/users/resources/tenants/types/index.js +19 -0
- package/api/resources/users/resources/tokens/client/Client.d.ts +46 -0
- package/api/resources/{tokenManagement → users/resources/tokens}/client/Client.js +14 -14
- package/api/resources/users/resources/tokens/client/index.js +2 -0
- package/api/resources/{tokenManagement → users/resources/tokens}/types/GetAllTokensResponse.d.ts +2 -2
- package/api/resources/users/resources/tokens/types/GetUserTokenResponse.d.ts +9 -0
- package/api/resources/users/resources/tokens/types/PatchUserTokenOpts.d.ts +7 -0
- package/{dist/api/resources/tokenManagement → api/resources/users/resources/tokens}/types/PutUserTokenOpts.d.ts +2 -2
- package/api/resources/{tokenManagement → users/resources/tokens}/types/PutUserTokensOpts.d.ts +2 -2
- package/{dist/api/resources/tokenManagement → api/resources/users/resources/tokens}/types/UserToken.d.ts +5 -5
- package/api/types/SendMessageResponse.d.ts +0 -1
- package/core/fetcher/APIResponse.d.ts +1 -0
- package/core/fetcher/Fetcher.d.ts +1 -4
- package/core/fetcher/Fetcher.js +52 -31
- package/core/fetcher/getHeader.d.ts +1 -0
- package/core/fetcher/getHeader.js +12 -0
- package/core/fetcher/index.d.ts +1 -0
- package/core/fetcher/index.js +3 -1
- package/dist/Client.d.ts +8 -8
- package/dist/Client.js +16 -16
- package/dist/api/resources/audiences/client/Client.d.ts +5 -5
- package/dist/api/resources/audiences/client/Client.js +7 -7
- package/dist/api/resources/audiences/client/requests/{ListAudienceMembersRequest.d.ts → AudienceMembersListParams.d.ts} +1 -2
- package/{api/resources/audiences/types/AudienceRequest.d.ts → dist/api/resources/audiences/client/requests/AudienceUpdateParams.d.ts} +2 -4
- package/dist/api/resources/audiences/client/requests/{ListAudiencesRequest.d.ts → AudiencesListParams.d.ts} +1 -2
- package/dist/api/resources/audiences/client/requests/index.d.ts +3 -2
- package/dist/api/resources/audiences/types/{AudiencePutResponse.d.ts → AudienceUpdateResponse.d.ts} +1 -1
- package/dist/api/resources/audiences/types/AudienceUpdateResponse.js +5 -0
- package/dist/api/resources/audiences/types/BaseFilterConfig.d.ts +1 -4
- package/dist/api/resources/audiences/types/index.d.ts +1 -2
- package/dist/api/resources/audiences/types/index.js +1 -2
- package/dist/api/resources/auditEvents/client/Client.d.ts +2 -2
- package/dist/api/resources/auditEvents/client/Client.js +3 -3
- package/dist/api/resources/auditEvents/client/requests/ListAuditEventsRequest.d.ts +0 -1
- package/dist/api/resources/authTokens/client/Client.d.ts +3 -3
- package/dist/api/resources/authTokens/client/Client.js +2 -2
- package/dist/api/resources/authTokens/client/index.d.ts +1 -1
- package/dist/api/resources/authTokens/client/index.js +15 -0
- package/dist/api/resources/authTokens/{types/AuthIssueTokenParameters.d.ts → client/requests/IssueTokenParams.d.ts} +2 -2
- package/dist/api/resources/authTokens/client/requests/IssueTokenParams.js +5 -0
- package/dist/api/resources/authTokens/client/requests/index.d.ts +1 -0
- package/dist/api/resources/authTokens/client/requests/index.js +2 -0
- package/dist/api/resources/authTokens/types/{AuthIssueTokenResponse.d.ts → IssueTokenResponse.d.ts} +1 -1
- package/dist/api/resources/authTokens/types/IssueTokenResponse.js +5 -0
- package/dist/api/resources/authTokens/types/index.d.ts +1 -2
- package/dist/api/resources/authTokens/types/index.js +1 -2
- package/dist/api/resources/automations/client/Client.d.ts +3 -3
- package/dist/api/resources/automations/client/Client.js +6 -5
- package/dist/api/resources/brands/client/Client.d.ts +6 -2
- package/dist/api/resources/brands/client/Client.js +49 -5
- package/dist/api/resources/brands/{types/BrandPutParameters.d.ts → client/requests/BrandUpdateParameters.d.ts} +3 -4
- package/dist/api/resources/brands/client/requests/BrandUpdateParameters.js +5 -0
- package/dist/api/resources/brands/client/requests/index.d.ts +1 -0
- package/dist/api/resources/brands/types/index.d.ts +0 -1
- package/dist/api/resources/brands/types/index.js +0 -1
- package/dist/api/resources/bulk/client/Client.d.ts +4 -4
- package/dist/api/resources/bulk/client/Client.js +8 -9
- package/dist/api/resources/bulk/client/index.d.ts +1 -1
- package/dist/api/resources/bulk/client/index.js +15 -0
- package/{api/resources/bulk/types → dist/api/resources/bulk/client/requests}/BulkCreateJobParams.d.ts +1 -1
- package/dist/api/resources/bulk/client/requests/BulkCreateJobParams.js +5 -0
- package/dist/api/resources/bulk/client/requests/index.d.ts +1 -0
- package/dist/api/resources/bulk/client/requests/index.js +2 -0
- package/dist/api/resources/bulk/types/BulkIngestUsersParams.d.ts +0 -1
- package/dist/api/resources/bulk/types/InboundBulkContentMessage.d.ts +15 -0
- package/dist/api/resources/bulk/types/InboundBulkContentMessage.js +5 -0
- package/dist/api/resources/bulk/types/InboundBulkMessage.d.ts +2 -2
- package/dist/api/resources/bulk/types/InboundBulkMessageV1.d.ts +23 -0
- package/dist/api/resources/bulk/types/InboundBulkMessageV1.js +5 -0
- package/dist/api/resources/bulk/types/InboundBulkMessageV2.d.ts +16 -0
- package/dist/api/resources/bulk/types/InboundBulkMessageV2.js +5 -0
- package/dist/api/resources/bulk/types/InboundBulkTemplateMessage.d.ts +11 -0
- package/dist/api/resources/bulk/types/InboundBulkTemplateMessage.js +5 -0
- package/dist/api/resources/bulk/types/index.d.ts +4 -4
- package/dist/api/resources/bulk/types/index.js +4 -4
- package/dist/api/resources/index.d.ts +7 -4
- package/dist/api/resources/index.js +8 -5
- package/dist/api/resources/lists/client/Client.d.ts +14 -6
- package/dist/api/resources/lists/client/Client.js +99 -13
- package/dist/api/resources/lists/client/requests/GetAllListsRequest.d.ts +0 -1
- package/dist/api/resources/lists/client/requests/GetListRequest.d.ts +0 -1
- package/dist/api/resources/lists/client/requests/SubscribeUserToListRequest.d.ts +0 -2
- package/dist/api/resources/messages/client/Client.d.ts +2 -2
- package/dist/api/resources/messages/client/Client.js +8 -8
- package/dist/api/resources/messages/client/requests/ListMessagesRequest.d.ts +1 -1
- package/dist/api/resources/notifications/client/Client.d.ts +29 -0
- package/dist/api/resources/notifications/client/Client.js +392 -0
- package/dist/api/resources/notifications/client/index.d.ts +1 -0
- package/dist/api/resources/notifications/client/index.js +17 -0
- package/dist/api/resources/notifications/client/requests/NotificationDraftUpdateVariationsParams.d.ts +8 -0
- package/dist/api/resources/notifications/client/requests/NotificationDraftUpdateVariationsParams.js +5 -0
- package/dist/api/resources/notifications/client/requests/NotificationListParams.d.ts +6 -0
- package/dist/api/resources/notifications/client/requests/NotificationListParams.js +5 -0
- package/dist/api/resources/notifications/client/requests/NotificationUpdateVariationsParams.d.ts +8 -0
- package/dist/api/resources/notifications/client/requests/NotificationUpdateVariationsParams.js +5 -0
- package/dist/api/resources/notifications/client/requests/SubmissionChecksReplaceParams.d.ts +7 -0
- package/dist/api/resources/notifications/client/requests/SubmissionChecksReplaceParams.js +5 -0
- package/dist/api/resources/notifications/client/requests/index.d.ts +4 -0
- package/dist/api/resources/notifications/client/requests/index.js +2 -0
- package/dist/api/resources/notifications/index.d.ts +2 -0
- package/dist/api/resources/notifications/index.js +18 -0
- package/dist/api/resources/notifications/types/BaseCheck.d.ts +9 -0
- package/dist/api/resources/notifications/types/BaseCheck.js +5 -0
- package/dist/api/resources/notifications/types/BlockType.d.ts +15 -0
- package/dist/api/resources/notifications/types/BlockType.js +17 -0
- package/dist/api/resources/{tokenManagement/types/PatchUserTokenOpts.d.ts → notifications/types/Check.d.ts} +2 -2
- package/dist/api/resources/notifications/types/Check.js +5 -0
- package/dist/api/resources/notifications/types/CheckStatus.d.ts +9 -0
- package/dist/api/resources/notifications/types/CheckStatus.js +11 -0
- package/dist/api/resources/notifications/types/MessageRouting.d.ts +8 -0
- package/dist/api/resources/notifications/types/MessageRouting.js +5 -0
- package/dist/api/resources/notifications/types/MessageRoutingChannel.d.ts +5 -0
- package/dist/api/resources/notifications/types/MessageRoutingChannel.js +5 -0
- package/dist/api/resources/notifications/types/MessageRoutingMethod.d.ts +8 -0
- package/dist/api/resources/notifications/types/MessageRoutingMethod.js +10 -0
- package/dist/api/resources/notifications/types/Notification.d.ts +9 -0
- package/dist/api/resources/notifications/types/Notification.js +5 -0
- package/dist/api/resources/notifications/types/NotificationBlock.d.ts +13 -0
- package/dist/api/resources/notifications/types/NotificationBlock.js +5 -0
- package/dist/api/resources/notifications/types/NotificationChannel.d.ts +11 -0
- package/dist/api/resources/notifications/types/NotificationChannel.js +5 -0
- package/dist/api/resources/notifications/types/NotificationChannelContent.d.ts +7 -0
- package/dist/api/resources/notifications/types/NotificationChannelContent.js +5 -0
- package/dist/api/resources/notifications/types/NotificationContent.d.ts +5 -0
- package/dist/api/resources/notifications/types/NotificationContent.js +5 -0
- package/dist/api/resources/notifications/types/NotificationContentHierarchy.d.ts +7 -0
- package/dist/api/resources/notifications/types/NotificationContentHierarchy.js +5 -0
- package/dist/api/resources/notifications/types/NotificationGetContentResponse.d.ts +9 -0
- package/dist/api/resources/notifications/types/NotificationGetContentResponse.js +5 -0
- package/dist/api/resources/notifications/types/NotificationListResponse.d.ts +8 -0
- package/dist/api/resources/notifications/types/NotificationListResponse.js +5 -0
- package/dist/api/resources/notifications/types/SubmissionChecksGetResponse.d.ts +7 -0
- package/dist/api/resources/notifications/types/SubmissionChecksGetResponse.js +5 -0
- package/dist/api/resources/notifications/types/SubmissionChecksReplaceResponse.d.ts +7 -0
- package/dist/api/resources/notifications/types/SubmissionChecksReplaceResponse.js +5 -0
- package/dist/api/resources/notifications/types/index.d.ts +17 -0
- package/dist/api/resources/notifications/types/index.js +33 -0
- package/dist/api/resources/profiles/client/Client.d.ts +2 -3
- package/dist/api/resources/profiles/client/Client.js +8 -9
- package/dist/api/resources/send/types/BaseMessage.d.ts +1 -8
- package/dist/api/resources/send/types/Channel.d.ts +0 -4
- package/dist/api/resources/send/types/ContentMessage.d.ts +2 -2
- package/dist/api/resources/send/types/ElementalChannelNode.d.ts +0 -4
- package/dist/api/resources/send/types/ElementalMetaNode.d.ts +0 -1
- package/dist/api/resources/send/types/ElementalTextNode.d.ts +0 -1
- package/dist/api/resources/send/types/MessageContext.d.ts +0 -1
- package/dist/api/resources/send/types/MessageProvidersType.d.ts +0 -1
- package/dist/api/resources/send/types/Routing.d.ts +0 -2
- package/dist/api/resources/send/types/TemplateMessage.d.ts +2 -1
- package/dist/api/resources/send/types/UserRecipient.d.ts +0 -1
- package/dist/api/resources/templates/client/Client.d.ts +2 -2
- package/dist/api/resources/templates/client/Client.js +2 -2
- package/dist/api/resources/tenants/client/Client.d.ts +9 -3
- package/dist/api/resources/tenants/client/Client.js +130 -2
- package/dist/api/resources/tenants/client/index.d.ts +1 -1
- package/dist/api/resources/tenants/client/index.js +15 -0
- package/{api/resources/tenants/types/CreateOrReplaceTenantRequest.d.ts → dist/api/resources/tenants/client/requests/TenantCreateOrReplaceParams.d.ts} +7 -7
- package/dist/api/resources/tenants/client/requests/TenantCreateOrReplaceParams.js +5 -0
- package/dist/api/resources/tenants/client/requests/index.d.ts +1 -0
- package/dist/api/resources/tenants/client/requests/index.js +2 -0
- package/dist/api/resources/tenants/types/{CreateOrReplaceTenantResponse.d.ts → Tenant.d.ts} +3 -3
- package/dist/api/resources/tenants/types/Tenant.js +5 -0
- package/dist/api/resources/tenants/types/TenantListResponse.d.ts +21 -0
- package/dist/api/resources/tenants/types/TenantListResponse.js +5 -0
- package/dist/api/resources/tenants/types/index.d.ts +2 -2
- package/dist/api/resources/tenants/types/index.js +2 -2
- package/dist/api/resources/translations/client/Client.d.ts +2 -2
- package/dist/api/resources/translations/client/Client.js +3 -3
- package/dist/api/resources/users/client/Client.d.ts +28 -0
- package/dist/api/resources/users/client/Client.js +27 -0
- package/dist/api/resources/users/client/index.js +2 -0
- package/dist/api/resources/users/index.d.ts +2 -0
- package/dist/api/resources/users/index.js +18 -0
- package/dist/api/resources/users/resources/index.d.ts +8 -0
- package/dist/api/resources/users/resources/index.js +37 -0
- package/dist/api/resources/users/resources/preferences/client/Client.d.ts +36 -0
- package/dist/api/resources/{userPreferences → users/resources/preferences}/client/Client.js +14 -14
- package/dist/api/resources/users/resources/preferences/client/index.d.ts +1 -0
- package/dist/api/resources/users/resources/preferences/client/index.js +17 -0
- package/dist/api/resources/{userPreferences/types/UpdateSubscriptionTopicRequest.d.ts → users/resources/preferences/client/requests/UserPreferencesUpdateParams.d.ts} +3 -3
- package/dist/api/resources/users/resources/preferences/client/requests/UserPreferencesUpdateParams.js +5 -0
- package/dist/api/resources/users/resources/preferences/client/requests/index.d.ts +1 -0
- package/dist/api/resources/users/resources/preferences/client/requests/index.js +2 -0
- package/dist/api/resources/users/resources/preferences/index.d.ts +2 -0
- package/dist/api/resources/users/resources/preferences/index.js +18 -0
- package/dist/api/resources/{userPreferences → users/resources/preferences}/types/TopicPreference.d.ts +1 -1
- package/dist/api/resources/users/resources/preferences/types/TopicPreference.js +5 -0
- package/dist/api/resources/users/resources/preferences/types/UserPreferencesGetResponse.d.ts +7 -0
- package/dist/api/resources/users/resources/preferences/types/UserPreferencesGetResponse.js +5 -0
- package/dist/api/resources/{userPreferences/types/UserPreferences.d.ts → users/resources/preferences/types/UserPreferencesListResponse.d.ts} +3 -3
- package/dist/api/resources/users/resources/preferences/types/UserPreferencesListResponse.js +5 -0
- package/{api/resources/userPreferences/types/UpdateSubscriptionTopicResponse.d.ts → dist/api/resources/users/resources/preferences/types/UserPreferencesUpdateResponse.d.ts} +1 -1
- package/dist/api/resources/users/resources/preferences/types/UserPreferencesUpdateResponse.js +5 -0
- package/dist/api/resources/users/resources/preferences/types/index.d.ts +4 -0
- package/{api/resources/userPreferences → dist/api/resources/users/resources/preferences}/types/index.js +3 -3
- package/dist/api/resources/users/resources/tenants/client/Client.d.ts +45 -0
- package/dist/api/resources/users/resources/tenants/client/Client.js +254 -0
- package/dist/api/resources/users/resources/tenants/client/index.d.ts +1 -0
- package/dist/api/resources/users/resources/tenants/client/index.js +17 -0
- package/dist/api/resources/users/resources/tenants/client/requests/AddUserToMultipleTenantsParams.d.ts +7 -0
- package/dist/api/resources/users/resources/tenants/client/requests/AddUserToMultipleTenantsParams.js +5 -0
- package/dist/api/resources/users/resources/tenants/client/requests/AddUserToSingleTenantsParams.d.ts +7 -0
- package/dist/api/resources/users/resources/tenants/client/requests/AddUserToSingleTenantsParams.js +5 -0
- package/dist/api/resources/users/resources/tenants/client/requests/ListTenantsForUserParams.d.ts +14 -0
- package/dist/api/resources/users/resources/tenants/client/requests/ListTenantsForUserParams.js +5 -0
- package/dist/api/resources/users/resources/tenants/client/requests/index.d.ts +3 -0
- package/dist/api/resources/users/resources/tenants/client/requests/index.js +2 -0
- package/dist/api/resources/users/resources/tenants/index.d.ts +2 -0
- package/dist/api/resources/users/resources/tenants/index.js +18 -0
- package/dist/api/resources/users/resources/tenants/types/AddUserToSingleTenantsParamsProfile.d.ts +14 -0
- package/dist/api/resources/users/resources/tenants/types/AddUserToSingleTenantsParamsProfile.js +5 -0
- package/dist/api/resources/users/resources/tenants/types/ListTenantsForUserResponse.d.ts +23 -0
- package/dist/api/resources/users/resources/tenants/types/ListTenantsForUserResponse.js +5 -0
- package/dist/api/resources/users/resources/tenants/types/UserTenantAssociation.d.ts +8 -0
- package/dist/api/resources/users/resources/tenants/types/UserTenantAssociation.js +5 -0
- package/dist/api/resources/users/resources/tenants/types/index.d.ts +3 -0
- package/dist/api/resources/users/resources/tenants/types/index.js +19 -0
- package/dist/api/resources/users/resources/tokens/client/Client.d.ts +46 -0
- package/dist/api/resources/{tokenManagement → users/resources/tokens}/client/Client.js +14 -14
- package/dist/api/resources/users/resources/tokens/client/index.js +2 -0
- package/dist/api/resources/users/resources/tokens/index.d.ts +2 -0
- package/dist/api/resources/users/resources/tokens/index.js +18 -0
- package/dist/api/resources/users/resources/tokens/types/DeleteUserTokenOpts.js +5 -0
- package/dist/api/resources/users/resources/tokens/types/Device.js +5 -0
- package/dist/api/resources/users/resources/tokens/types/ExpiryDate.js +5 -0
- package/dist/api/resources/{tokenManagement → users/resources/tokens}/types/GetAllTokensResponse.d.ts +2 -2
- package/dist/api/resources/users/resources/tokens/types/GetAllTokensResponse.js +5 -0
- package/dist/api/resources/users/resources/tokens/types/GetUserTokenOpts.js +5 -0
- package/dist/api/resources/users/resources/tokens/types/GetUserTokenResponse.d.ts +9 -0
- package/dist/api/resources/users/resources/tokens/types/GetUserTokenResponse.js +5 -0
- package/dist/api/resources/users/resources/tokens/types/GetUserTokensOpts.js +5 -0
- package/dist/api/resources/users/resources/tokens/types/PatchOperation.js +5 -0
- package/dist/api/resources/users/resources/tokens/types/PatchUserTokenOpts.d.ts +7 -0
- package/dist/api/resources/users/resources/tokens/types/PatchUserTokenOpts.js +5 -0
- package/{api/resources/tokenManagement → dist/api/resources/users/resources/tokens}/types/PutUserTokenOpts.d.ts +2 -2
- package/dist/api/resources/users/resources/tokens/types/PutUserTokenOpts.js +5 -0
- package/dist/api/resources/{tokenManagement → users/resources/tokens}/types/PutUserTokensOpts.d.ts +2 -2
- package/dist/api/resources/users/resources/tokens/types/PutUserTokensOpts.js +5 -0
- package/dist/api/resources/users/resources/tokens/types/Tracking.js +5 -0
- package/{api/resources/tokenManagement → dist/api/resources/users/resources/tokens}/types/UserToken.d.ts +5 -5
- package/dist/api/resources/users/resources/tokens/types/UserToken.js +5 -0
- package/dist/api/types/SendMessageResponse.d.ts +0 -1
- package/dist/core/fetcher/APIResponse.d.ts +1 -0
- package/dist/core/fetcher/Fetcher.d.ts +1 -4
- package/dist/core/fetcher/Fetcher.js +52 -31
- package/dist/core/fetcher/getHeader.d.ts +1 -0
- package/dist/core/fetcher/getHeader.js +12 -0
- package/dist/core/fetcher/index.d.ts +1 -0
- package/dist/core/fetcher/index.js +3 -1
- package/package.json +6 -4
- package/api/resources/bulk/types/InboundBulkMessageApiV1.d.ts +0 -13
- package/api/resources/bulk/types/InboundBulkMessageApiV2.d.ts +0 -4
- package/api/resources/tokenManagement/client/Client.d.ts +0 -46
- package/api/resources/tokenManagement/types/GetUserTokenResponse.d.ts +0 -9
- package/api/resources/userPreferences/client/Client.d.ts +0 -36
- package/api/resources/userPreferences/types/index.d.ts +0 -4
- package/dist/api/resources/bulk/types/BulkRunJobParams.d.ts +0 -6
- package/dist/api/resources/bulk/types/InboundBulkMessageApiV1.d.ts +0 -13
- package/dist/api/resources/bulk/types/InboundBulkMessageApiV2.d.ts +0 -4
- package/dist/api/resources/tokenManagement/client/Client.d.ts +0 -46
- package/dist/api/resources/tokenManagement/types/GetUserTokenResponse.d.ts +0 -9
- package/dist/api/resources/userPreferences/client/Client.d.ts +0 -36
- package/dist/api/resources/userPreferences/types/index.d.ts +0 -4
- /package/api/resources/audiences/client/requests/{ListAudienceMembersRequest.js → AudienceMembersListParams.js} +0 -0
- /package/api/resources/audiences/client/requests/{ListAudiencesRequest.js → AudienceUpdateParams.js} +0 -0
- /package/api/resources/audiences/{types/AudiencePutResponse.js → client/requests/AudiencesListParams.js} +0 -0
- /package/api/resources/audiences/types/{AudienceRequest.js → AudienceUpdateResponse.js} +0 -0
- /package/api/resources/authTokens/{types/AuthIssueTokenParameters.js → client/requests/IssueTokenParams.js} +0 -0
- /package/api/resources/{tokenManagement/client → authTokens/client/requests}/index.js +0 -0
- /package/api/resources/authTokens/types/{AuthIssueTokenResponse.js → IssueTokenResponse.js} +0 -0
- /package/api/resources/brands/{types/BrandPutParameters.js → client/requests/BrandUpdateParameters.js} +0 -0
- /package/api/resources/bulk/{types → client/requests}/BulkCreateJobParams.js +0 -0
- /package/api/resources/{userPreferences/client → bulk/client/requests}/index.js +0 -0
- /package/api/resources/bulk/types/{BulkRunJobParams.js → InboundBulkContentMessage.js} +0 -0
- /package/api/resources/bulk/types/{InboundBulkMessageApiV1.js → InboundBulkMessageV1.js} +0 -0
- /package/api/resources/bulk/types/{InboundBulkMessageApiV2.js → InboundBulkMessageV2.js} +0 -0
- /package/api/resources/{tenants/types/CreateOrReplaceTenantRequest.js → bulk/types/InboundBulkTemplateMessage.js} +0 -0
- /package/api/resources/{tenants/types/CreateOrReplaceTenantResponse.js → notifications/client/requests/NotificationDraftUpdateVariationsParams.js} +0 -0
- /package/api/resources/{tokenManagement/types/DeleteUserTokenOpts.js → notifications/client/requests/NotificationListParams.js} +0 -0
- /package/api/resources/{tokenManagement/types/Device.js → notifications/client/requests/NotificationUpdateVariationsParams.js} +0 -0
- /package/api/resources/{tokenManagement/types/ExpiryDate.js → notifications/client/requests/SubmissionChecksReplaceParams.js} +0 -0
- /package/{dist/api/resources/tokenManagement/client → api/resources/notifications/client/requests}/index.js +0 -0
- /package/api/resources/{tokenManagement → notifications}/index.d.ts +0 -0
- /package/api/resources/{tokenManagement → notifications}/index.js +0 -0
- /package/api/resources/{tokenManagement/types/GetAllTokensResponse.js → notifications/types/BaseCheck.js} +0 -0
- /package/api/resources/{tokenManagement/types/GetUserTokenOpts.js → notifications/types/Check.js} +0 -0
- /package/api/resources/{tokenManagement/types/GetUserTokenResponse.js → notifications/types/MessageRouting.js} +0 -0
- /package/api/resources/{tokenManagement/types/GetUserTokensOpts.js → notifications/types/MessageRoutingChannel.js} +0 -0
- /package/api/resources/{tokenManagement/types/PatchOperation.js → notifications/types/Notification.js} +0 -0
- /package/api/resources/{tokenManagement/types/PatchUserTokenOpts.js → notifications/types/NotificationBlock.js} +0 -0
- /package/api/resources/{tokenManagement/types/PutUserTokenOpts.js → notifications/types/NotificationChannel.js} +0 -0
- /package/api/resources/{tokenManagement/types/PutUserTokensOpts.js → notifications/types/NotificationChannelContent.js} +0 -0
- /package/api/resources/{tokenManagement/types/Tracking.js → notifications/types/NotificationContent.js} +0 -0
- /package/api/resources/{tokenManagement/types/UserToken.js → notifications/types/NotificationContentHierarchy.js} +0 -0
- /package/api/resources/{userPreferences/types/TopicPreference.js → notifications/types/NotificationGetContentResponse.js} +0 -0
- /package/api/resources/{userPreferences/types/UpdateSubscriptionTopicRequest.js → notifications/types/NotificationListResponse.js} +0 -0
- /package/api/resources/{userPreferences/types/UpdateSubscriptionTopicResponse.js → notifications/types/SubmissionChecksGetResponse.js} +0 -0
- /package/api/resources/{userPreferences/types/UserPreferences.js → notifications/types/SubmissionChecksReplaceResponse.js} +0 -0
- /package/{dist/api/resources/audiences/client/requests/ListAudienceMembersRequest.js → api/resources/tenants/client/requests/TenantCreateOrReplaceParams.js} +0 -0
- /package/{dist/api/resources/userPreferences/client → api/resources/tenants/client/requests}/index.js +0 -0
- /package/{dist/api/resources/audiences/client/requests/ListAudiencesRequest.js → api/resources/tenants/types/Tenant.js} +0 -0
- /package/{dist/api/resources/audiences/types/AudiencePutResponse.js → api/resources/tenants/types/TenantListResponse.js} +0 -0
- /package/api/resources/{tokenManagement → users}/client/index.d.ts +0 -0
- /package/{dist/api/resources/audiences/types/AudienceRequest.js → api/resources/users/resources/preferences/client/requests/UserPreferencesUpdateParams.js} +0 -0
- /package/api/resources/{userPreferences → users/resources/preferences}/index.d.ts +0 -0
- /package/api/resources/{userPreferences → users/resources/preferences}/index.js +0 -0
- /package/{dist/api/resources/userPreferences → api/resources/users/resources/preferences}/types/TopicPreference.js +0 -0
- /package/{dist/api/resources/authTokens/types/AuthIssueTokenParameters.js → api/resources/users/resources/preferences/types/UserPreferencesGetResponse.js} +0 -0
- /package/{dist/api/resources/authTokens/types/AuthIssueTokenResponse.js → api/resources/users/resources/preferences/types/UserPreferencesListResponse.js} +0 -0
- /package/{dist/api/resources/brands/types/BrandPutParameters.js → api/resources/users/resources/preferences/types/UserPreferencesUpdateResponse.js} +0 -0
- /package/{dist/api/resources/bulk/types/BulkCreateJobParams.js → api/resources/users/resources/tenants/client/requests/AddUserToMultipleTenantsParams.js} +0 -0
- /package/{dist/api/resources/bulk/types/BulkRunJobParams.js → api/resources/users/resources/tenants/client/requests/AddUserToSingleTenantsParams.js} +0 -0
- /package/{dist/api/resources/bulk/types/InboundBulkMessageApiV1.js → api/resources/users/resources/tenants/client/requests/ListTenantsForUserParams.js} +0 -0
- /package/{dist/api/resources/tokenManagement → api/resources/users/resources/tenants}/index.d.ts +0 -0
- /package/{dist/api/resources/tokenManagement → api/resources/users/resources/tenants}/index.js +0 -0
- /package/{dist/api/resources/bulk/types/InboundBulkMessageApiV2.js → api/resources/users/resources/tenants/types/AddUserToSingleTenantsParamsProfile.js} +0 -0
- /package/{dist/api/resources/tenants/types/CreateOrReplaceTenantRequest.js → api/resources/users/resources/tenants/types/ListTenantsForUserResponse.js} +0 -0
- /package/{dist/api/resources/tenants/types/CreateOrReplaceTenantResponse.js → api/resources/users/resources/tenants/types/UserTenantAssociation.js} +0 -0
- /package/api/resources/{userPreferences → users/resources/tokens}/client/index.d.ts +0 -0
- /package/{dist/api/resources/userPreferences → api/resources/users/resources/tokens}/index.d.ts +0 -0
- /package/{dist/api/resources/userPreferences → api/resources/users/resources/tokens}/index.js +0 -0
- /package/api/resources/{tokenManagement → users/resources/tokens}/types/DeleteUserTokenOpts.d.ts +0 -0
- /package/{dist/api/resources/tokenManagement → api/resources/users/resources/tokens}/types/DeleteUserTokenOpts.js +0 -0
- /package/api/resources/{tokenManagement → users/resources/tokens}/types/Device.d.ts +0 -0
- /package/{dist/api/resources/tokenManagement → api/resources/users/resources/tokens}/types/Device.js +0 -0
- /package/api/resources/{tokenManagement → users/resources/tokens}/types/ExpiryDate.d.ts +0 -0
- /package/{dist/api/resources/tokenManagement → api/resources/users/resources/tokens}/types/ExpiryDate.js +0 -0
- /package/{dist/api/resources/tokenManagement → api/resources/users/resources/tokens}/types/GetAllTokensResponse.js +0 -0
- /package/api/resources/{tokenManagement → users/resources/tokens}/types/GetUserTokenOpts.d.ts +0 -0
- /package/{dist/api/resources/tokenManagement → api/resources/users/resources/tokens}/types/GetUserTokenOpts.js +0 -0
- /package/{dist/api/resources/tokenManagement → api/resources/users/resources/tokens}/types/GetUserTokenResponse.js +0 -0
- /package/api/resources/{tokenManagement → users/resources/tokens}/types/GetUserTokensOpts.d.ts +0 -0
- /package/{dist/api/resources/tokenManagement → api/resources/users/resources/tokens}/types/GetUserTokensOpts.js +0 -0
- /package/api/resources/{tokenManagement → users/resources/tokens}/types/PatchOp.d.ts +0 -0
- /package/api/resources/{tokenManagement → users/resources/tokens}/types/PatchOp.js +0 -0
- /package/api/resources/{tokenManagement → users/resources/tokens}/types/PatchOperation.d.ts +0 -0
- /package/{dist/api/resources/tokenManagement → api/resources/users/resources/tokens}/types/PatchOperation.js +0 -0
- /package/{dist/api/resources/tokenManagement → api/resources/users/resources/tokens}/types/PatchUserTokenOpts.js +0 -0
- /package/api/resources/{tokenManagement → users/resources/tokens}/types/ProviderKey.d.ts +0 -0
- /package/api/resources/{tokenManagement → users/resources/tokens}/types/ProviderKey.js +0 -0
- /package/{dist/api/resources/tokenManagement → api/resources/users/resources/tokens}/types/PutUserTokenOpts.js +0 -0
- /package/{dist/api/resources/tokenManagement → api/resources/users/resources/tokens}/types/PutUserTokensOpts.js +0 -0
- /package/api/resources/{tokenManagement → users/resources/tokens}/types/TokenStatus.d.ts +0 -0
- /package/api/resources/{tokenManagement → users/resources/tokens}/types/TokenStatus.js +0 -0
- /package/api/resources/{tokenManagement → users/resources/tokens}/types/Tracking.d.ts +0 -0
- /package/{dist/api/resources/tokenManagement → api/resources/users/resources/tokens}/types/Tracking.js +0 -0
- /package/{dist/api/resources/tokenManagement → api/resources/users/resources/tokens}/types/UserToken.js +0 -0
- /package/api/resources/{tokenManagement → users/resources/tokens}/types/index.d.ts +0 -0
- /package/api/resources/{tokenManagement → users/resources/tokens}/types/index.js +0 -0
- /package/dist/api/resources/{userPreferences/types/UpdateSubscriptionTopicRequest.js → audiences/client/requests/AudienceMembersListParams.js} +0 -0
- /package/dist/api/resources/{userPreferences/types/UpdateSubscriptionTopicResponse.js → audiences/client/requests/AudienceUpdateParams.js} +0 -0
- /package/dist/api/resources/{userPreferences/types/UserPreferences.js → audiences/client/requests/AudiencesListParams.js} +0 -0
- /package/dist/api/resources/{tokenManagement → users}/client/index.d.ts +0 -0
- /package/dist/api/resources/{userPreferences → users/resources/tokens}/client/index.d.ts +0 -0
- /package/dist/api/resources/{tokenManagement → users/resources/tokens}/types/DeleteUserTokenOpts.d.ts +0 -0
- /package/dist/api/resources/{tokenManagement → users/resources/tokens}/types/Device.d.ts +0 -0
- /package/dist/api/resources/{tokenManagement → users/resources/tokens}/types/ExpiryDate.d.ts +0 -0
- /package/dist/api/resources/{tokenManagement → users/resources/tokens}/types/GetUserTokenOpts.d.ts +0 -0
- /package/dist/api/resources/{tokenManagement → users/resources/tokens}/types/GetUserTokensOpts.d.ts +0 -0
- /package/dist/api/resources/{tokenManagement → users/resources/tokens}/types/PatchOp.d.ts +0 -0
- /package/dist/api/resources/{tokenManagement → users/resources/tokens}/types/PatchOp.js +0 -0
- /package/dist/api/resources/{tokenManagement → users/resources/tokens}/types/PatchOperation.d.ts +0 -0
- /package/dist/api/resources/{tokenManagement → users/resources/tokens}/types/ProviderKey.d.ts +0 -0
- /package/dist/api/resources/{tokenManagement → users/resources/tokens}/types/ProviderKey.js +0 -0
- /package/dist/api/resources/{tokenManagement → users/resources/tokens}/types/TokenStatus.d.ts +0 -0
- /package/dist/api/resources/{tokenManagement → users/resources/tokens}/types/TokenStatus.js +0 -0
- /package/dist/api/resources/{tokenManagement → users/resources/tokens}/types/Tracking.d.ts +0 -0
- /package/dist/api/resources/{tokenManagement → users/resources/tokens}/types/index.d.ts +0 -0
- /package/dist/api/resources/{tokenManagement → users/resources/tokens}/types/index.js +0 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export * from "./NotificationListResponse";
|
|
2
|
+
export * from "./NotificationGetContentResponse";
|
|
3
|
+
export * from "./Notification";
|
|
4
|
+
export * from "./MessageRouting";
|
|
5
|
+
export * from "./MessageRoutingMethod";
|
|
6
|
+
export * from "./MessageRoutingChannel";
|
|
7
|
+
export * from "./NotificationBlock";
|
|
8
|
+
export * from "./NotificationContent";
|
|
9
|
+
export * from "./NotificationContentHierarchy";
|
|
10
|
+
export * from "./BlockType";
|
|
11
|
+
export * from "./NotificationChannel";
|
|
12
|
+
export * from "./NotificationChannelContent";
|
|
13
|
+
export * from "./BaseCheck";
|
|
14
|
+
export * from "./Check";
|
|
15
|
+
export * from "./CheckStatus";
|
|
16
|
+
export * from "./SubmissionChecksGetResponse";
|
|
17
|
+
export * from "./SubmissionChecksReplaceResponse";
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./NotificationListResponse"), exports);
|
|
18
|
+
__exportStar(require("./NotificationGetContentResponse"), exports);
|
|
19
|
+
__exportStar(require("./Notification"), exports);
|
|
20
|
+
__exportStar(require("./MessageRouting"), exports);
|
|
21
|
+
__exportStar(require("./MessageRoutingMethod"), exports);
|
|
22
|
+
__exportStar(require("./MessageRoutingChannel"), exports);
|
|
23
|
+
__exportStar(require("./NotificationBlock"), exports);
|
|
24
|
+
__exportStar(require("./NotificationContent"), exports);
|
|
25
|
+
__exportStar(require("./NotificationContentHierarchy"), exports);
|
|
26
|
+
__exportStar(require("./BlockType"), exports);
|
|
27
|
+
__exportStar(require("./NotificationChannel"), exports);
|
|
28
|
+
__exportStar(require("./NotificationChannelContent"), exports);
|
|
29
|
+
__exportStar(require("./BaseCheck"), exports);
|
|
30
|
+
__exportStar(require("./Check"), exports);
|
|
31
|
+
__exportStar(require("./CheckStatus"), exports);
|
|
32
|
+
__exportStar(require("./SubmissionChecksGetResponse"), exports);
|
|
33
|
+
__exportStar(require("./SubmissionChecksReplaceResponse"), exports);
|
|
@@ -7,7 +7,7 @@ import * as Courier from "../../..";
|
|
|
7
7
|
export declare namespace Profiles {
|
|
8
8
|
interface Options {
|
|
9
9
|
environment?: core.Supplier<environments.CourierEnvironment | string>;
|
|
10
|
-
authorizationToken
|
|
10
|
+
authorizationToken?: core.Supplier<core.BearerToken | undefined>;
|
|
11
11
|
}
|
|
12
12
|
interface RequestOptions {
|
|
13
13
|
timeoutInSeconds?: number;
|
|
@@ -20,7 +20,7 @@ export declare namespace Profiles {
|
|
|
20
20
|
}
|
|
21
21
|
export declare class Profiles {
|
|
22
22
|
protected readonly _options: Profiles.Options;
|
|
23
|
-
constructor(_options
|
|
23
|
+
constructor(_options?: Profiles.Options);
|
|
24
24
|
/**
|
|
25
25
|
* Returns the specified user profile.
|
|
26
26
|
* @throws {@link Courier.BadRequestError}
|
|
@@ -36,7 +36,6 @@ export declare class Profiles {
|
|
|
36
36
|
* Any key-value pairs that exist in the profile but fail to be included in the `PUT` request will be
|
|
37
37
|
* removed from the profile. Remember, a `PUT` update is a full replacement of the data. For partial updates,
|
|
38
38
|
* use the [Patch](https://www.courier.com/docs/reference/profiles/patch/) request.
|
|
39
|
-
*
|
|
40
39
|
* @throws {@link Courier.BadRequestError}
|
|
41
40
|
*/
|
|
42
41
|
replace(userId: string, request: Courier.ReplaceProfileRequest, requestOptions?: Profiles.RequestOptions): Promise<Courier.ReplaceProfileResponse>;
|
|
@@ -45,7 +45,7 @@ const Courier = __importStar(require("../../.."));
|
|
|
45
45
|
const url_join_1 = __importDefault(require("url-join"));
|
|
46
46
|
const errors = __importStar(require("../../../../errors"));
|
|
47
47
|
class Profiles {
|
|
48
|
-
constructor(_options) {
|
|
48
|
+
constructor(_options = {}) {
|
|
49
49
|
this._options = _options;
|
|
50
50
|
}
|
|
51
51
|
/**
|
|
@@ -62,7 +62,7 @@ class Profiles {
|
|
|
62
62
|
Authorization: yield this._getAuthorizationHeader(),
|
|
63
63
|
"X-Fern-Language": "JavaScript",
|
|
64
64
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
65
|
-
"X-Fern-SDK-Version": "
|
|
65
|
+
"X-Fern-SDK-Version": "v6.0.3",
|
|
66
66
|
},
|
|
67
67
|
contentType: "application/json",
|
|
68
68
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -111,7 +111,7 @@ class Profiles {
|
|
|
111
111
|
Authorization: yield this._getAuthorizationHeader(),
|
|
112
112
|
"X-Fern-Language": "JavaScript",
|
|
113
113
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
114
|
-
"X-Fern-SDK-Version": "
|
|
114
|
+
"X-Fern-SDK-Version": "v6.0.3",
|
|
115
115
|
"Idempotency-Key": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey) != null ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey : undefined,
|
|
116
116
|
"X-Idempotency-Expiration": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry) != null
|
|
117
117
|
? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry.toString()
|
|
@@ -156,7 +156,6 @@ class Profiles {
|
|
|
156
156
|
* Any key-value pairs that exist in the profile but fail to be included in the `PUT` request will be
|
|
157
157
|
* removed from the profile. Remember, a `PUT` update is a full replacement of the data. For partial updates,
|
|
158
158
|
* use the [Patch](https://www.courier.com/docs/reference/profiles/patch/) request.
|
|
159
|
-
*
|
|
160
159
|
* @throws {@link Courier.BadRequestError}
|
|
161
160
|
*/
|
|
162
161
|
replace(userId, request, requestOptions) {
|
|
@@ -169,7 +168,7 @@ class Profiles {
|
|
|
169
168
|
Authorization: yield this._getAuthorizationHeader(),
|
|
170
169
|
"X-Fern-Language": "JavaScript",
|
|
171
170
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
172
|
-
"X-Fern-SDK-Version": "
|
|
171
|
+
"X-Fern-SDK-Version": "v6.0.3",
|
|
173
172
|
},
|
|
174
173
|
contentType: "application/json",
|
|
175
174
|
body: request,
|
|
@@ -219,7 +218,7 @@ class Profiles {
|
|
|
219
218
|
Authorization: yield this._getAuthorizationHeader(),
|
|
220
219
|
"X-Fern-Language": "JavaScript",
|
|
221
220
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
222
|
-
"X-Fern-SDK-Version": "
|
|
221
|
+
"X-Fern-SDK-Version": "v6.0.3",
|
|
223
222
|
},
|
|
224
223
|
contentType: "application/json",
|
|
225
224
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -273,7 +272,7 @@ class Profiles {
|
|
|
273
272
|
Authorization: yield this._getAuthorizationHeader(),
|
|
274
273
|
"X-Fern-Language": "JavaScript",
|
|
275
274
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
276
|
-
"X-Fern-SDK-Version": "
|
|
275
|
+
"X-Fern-SDK-Version": "v6.0.3",
|
|
277
276
|
},
|
|
278
277
|
contentType: "application/json",
|
|
279
278
|
queryParameters: _queryParams,
|
|
@@ -323,7 +322,7 @@ class Profiles {
|
|
|
323
322
|
Authorization: yield this._getAuthorizationHeader(),
|
|
324
323
|
"X-Fern-Language": "JavaScript",
|
|
325
324
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
326
|
-
"X-Fern-SDK-Version": "
|
|
325
|
+
"X-Fern-SDK-Version": "v6.0.3",
|
|
327
326
|
"Idempotency-Key": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey) != null ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey : undefined,
|
|
328
327
|
"X-Idempotency-Expiration": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry) != null
|
|
329
328
|
? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry.toString()
|
|
@@ -377,7 +376,7 @@ class Profiles {
|
|
|
377
376
|
Authorization: yield this._getAuthorizationHeader(),
|
|
378
377
|
"X-Fern-Language": "JavaScript",
|
|
379
378
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
380
|
-
"X-Fern-SDK-Version": "
|
|
379
|
+
"X-Fern-SDK-Version": "v6.0.3",
|
|
381
380
|
},
|
|
382
381
|
contentType: "application/json",
|
|
383
382
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -3,19 +3,13 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as Courier from "../../..";
|
|
5
5
|
export interface BaseMessage {
|
|
6
|
-
/** The recipient or a list of recipients of the message */
|
|
7
|
-
to: Courier.MessageRecipient;
|
|
8
6
|
/**
|
|
9
7
|
* An arbitrary object that includes any data you want to pass to the message.
|
|
10
8
|
* The data will populate the corresponding template or elements variables.
|
|
11
|
-
*
|
|
12
9
|
*/
|
|
13
10
|
data?: Courier.MessageData;
|
|
14
11
|
brand_id?: string;
|
|
15
|
-
/**
|
|
16
|
-
* "Define run-time configuration for one or more channels. If you don't specify channels, the default configuration for each channel will be used. Valid ChannelId's are: email, sms, push, inbox, direct_message, banner, and webhook."
|
|
17
|
-
*
|
|
18
|
-
*/
|
|
12
|
+
/** "Define run-time configuration for one or more channels. If you don't specify channels, the default configuration for each channel will be used. Valid ChannelId's are: email, sms, push, inbox, direct_message, banner, and webhook." */
|
|
19
13
|
channels?: Courier.MessageChannels;
|
|
20
14
|
/** Context to load with this recipient. Will override any context set on message.context. */
|
|
21
15
|
context?: Courier.MessageContext;
|
|
@@ -31,7 +25,6 @@ export interface BaseMessage {
|
|
|
31
25
|
/**
|
|
32
26
|
* "Expiry allows you to set an absolute or relative time in which a message expires.
|
|
33
27
|
* Note: This is only valid for the Courier Inbox channel as of 12-08-2022."
|
|
34
|
-
*
|
|
35
28
|
*/
|
|
36
29
|
expiry?: Courier.Expiry;
|
|
37
30
|
}
|
|
@@ -6,27 +6,23 @@ export interface Channel {
|
|
|
6
6
|
/**
|
|
7
7
|
* Id of the brand that should be used for rendering the message.
|
|
8
8
|
* If not specified, the brand configured as default brand will be used.
|
|
9
|
-
*
|
|
10
9
|
*/
|
|
11
10
|
brand_id?: string;
|
|
12
11
|
/**
|
|
13
12
|
* A list of providers enabled for this channel. Courier will select
|
|
14
13
|
* one provider to send through unless routing_method is set to all.
|
|
15
|
-
*
|
|
16
14
|
*/
|
|
17
15
|
providers?: string[];
|
|
18
16
|
/**
|
|
19
17
|
* The method for selecting the providers to send the message with.
|
|
20
18
|
* Single will send to one of the available providers for this channel,
|
|
21
19
|
* all will send the message through all channels. Defaults to `single`.
|
|
22
|
-
*
|
|
23
20
|
*/
|
|
24
21
|
routing_method?: Courier.RoutingMethod;
|
|
25
22
|
/**
|
|
26
23
|
* A JavaScript conditional expression to determine if the message should
|
|
27
24
|
* be sent through the channel. Has access to the data and profile object.
|
|
28
25
|
* For example, `data.name === profile.name`
|
|
29
|
-
*
|
|
30
26
|
*/
|
|
31
27
|
if?: string;
|
|
32
28
|
timeouts?: Courier.Timeouts;
|
|
@@ -5,13 +5,13 @@ import * as Courier from "../../..";
|
|
|
5
5
|
/**
|
|
6
6
|
* The message property has the following primary top-level properties. They define the destination and content of the message.
|
|
7
7
|
* Additional advanced configuration fields [are defined below](https://www.courier.com/docs/reference/send/message/#other-message-properties).
|
|
8
|
-
*
|
|
9
8
|
*/
|
|
10
9
|
export interface ContentMessage extends Courier.BaseMessage {
|
|
11
10
|
/**
|
|
12
11
|
* Describes the content of the message in a way that will work for email, push,
|
|
13
12
|
* chat, or any channel. Either this or template must be specified.
|
|
14
|
-
*
|
|
15
13
|
*/
|
|
16
14
|
content: Courier.Content;
|
|
15
|
+
/** The recipient or a list of recipients of the message */
|
|
16
|
+
to: Courier.MessageRecipient;
|
|
17
17
|
}
|
|
@@ -11,25 +11,21 @@ import * as Courier from "../../..";
|
|
|
11
11
|
* Note: As an alternative, most elements support a `channel` property. Which allows you to selectively
|
|
12
12
|
* display an individual element on a per channel basis. See the
|
|
13
13
|
* [control flow docs](https://www.courier.com/docs/platform/content/elemental/control-flow/) for more details.
|
|
14
|
-
*
|
|
15
14
|
*/
|
|
16
15
|
export interface ElementalChannelNode extends Courier.ElementalBaseNode {
|
|
17
16
|
/**
|
|
18
17
|
* The channel the contents of this element should be applied to. Can be `email`,
|
|
19
18
|
* `push`, `direct_message`, `sms` or a provider such as slack
|
|
20
|
-
*
|
|
21
19
|
*/
|
|
22
20
|
channel: string;
|
|
23
21
|
/**
|
|
24
22
|
* An array of elements to apply to the channel. If `raw` has not been
|
|
25
23
|
* specified, `elements` is `required`.
|
|
26
|
-
*
|
|
27
24
|
*/
|
|
28
25
|
elements?: Courier.ElementalNode[];
|
|
29
26
|
/**
|
|
30
27
|
* Raw data to apply to the channel. If `elements` has not been
|
|
31
28
|
* specified, `raw` is `required`.
|
|
32
|
-
*
|
|
33
29
|
*/
|
|
34
30
|
raw?: Record<string, any>;
|
|
35
31
|
}
|
|
@@ -6,7 +6,6 @@ import * as Courier from "../../..";
|
|
|
6
6
|
* The meta element contains information describing the notification that may
|
|
7
7
|
* be used by a particular channel or provider. One important field is the title
|
|
8
8
|
* field which will be used as the title for channels that support it.
|
|
9
|
-
*
|
|
10
9
|
*/
|
|
11
10
|
export interface ElementalMetaNode extends Courier.ElementalBaseNode {
|
|
12
11
|
/** The title to be displayed by supported channels. For example, the email subject. */
|
|
@@ -5,7 +5,6 @@ export interface MessageContext {
|
|
|
5
5
|
/**
|
|
6
6
|
* An id of a tenant, see [tenants api docs](https://www.courier.com/docs/reference/tenants/).
|
|
7
7
|
* Will load brand, default preferences and any other base context data associated with this tenant.
|
|
8
|
-
*
|
|
9
8
|
*/
|
|
10
9
|
tenant_id?: string;
|
|
11
10
|
}
|
|
@@ -9,7 +9,6 @@ export interface MessageProvidersType {
|
|
|
9
9
|
* A JavaScript conditional expression to determine if the message should be sent
|
|
10
10
|
* through the channel. Has access to the data and profile object. For example,
|
|
11
11
|
* `data.name === profile.name`
|
|
12
|
-
*
|
|
13
12
|
*/
|
|
14
13
|
if?: string;
|
|
15
14
|
timeouts?: number;
|
|
@@ -6,7 +6,6 @@ import * as Courier from "../../..";
|
|
|
6
6
|
* Allows you to customize which channel(s) Courier will potentially deliver the message.
|
|
7
7
|
* If no routing key is specified, Courier will use the default routing configuration or
|
|
8
8
|
* routing defined by the template.
|
|
9
|
-
*
|
|
10
9
|
*/
|
|
11
10
|
export interface Routing {
|
|
12
11
|
method: Courier.RoutingMethod;
|
|
@@ -14,7 +13,6 @@ export interface Routing {
|
|
|
14
13
|
* A list of channels or providers to send the message through. Can also recursively define
|
|
15
14
|
* sub-routing methods, which can be useful for defining advanced push notification
|
|
16
15
|
* delivery strategies.
|
|
17
|
-
*
|
|
18
16
|
*/
|
|
19
17
|
channels: Courier.RoutingChannel[];
|
|
20
18
|
}
|
|
@@ -6,7 +6,8 @@ export interface TemplateMessage extends Courier.BaseMessage {
|
|
|
6
6
|
/**
|
|
7
7
|
* The id of the notification template to be rendered and sent to the recipient(s).
|
|
8
8
|
* This field or the content field must be supplied.
|
|
9
|
-
*
|
|
10
9
|
*/
|
|
11
10
|
template: string;
|
|
11
|
+
/** The recipient or a list of recipients of the message */
|
|
12
|
+
to: Courier.MessageRecipient;
|
|
12
13
|
}
|
|
@@ -17,7 +17,6 @@ export interface UserRecipient extends Courier.UserRecipientType {
|
|
|
17
17
|
/**
|
|
18
18
|
* An id of a tenant, [see tenants api docs](https://www.courier.com/docs/reference/tenants).
|
|
19
19
|
* Will load brand, default preferences and any other base context data associated with this tenant.
|
|
20
|
-
*
|
|
21
20
|
*/
|
|
22
21
|
tenant_id?: string;
|
|
23
22
|
}
|
|
@@ -7,7 +7,7 @@ import * as Courier from "../../..";
|
|
|
7
7
|
export declare namespace Templates {
|
|
8
8
|
interface Options {
|
|
9
9
|
environment?: core.Supplier<environments.CourierEnvironment | string>;
|
|
10
|
-
authorizationToken
|
|
10
|
+
authorizationToken?: core.Supplier<core.BearerToken | undefined>;
|
|
11
11
|
}
|
|
12
12
|
interface RequestOptions {
|
|
13
13
|
timeoutInSeconds?: number;
|
|
@@ -16,7 +16,7 @@ export declare namespace Templates {
|
|
|
16
16
|
}
|
|
17
17
|
export declare class Templates {
|
|
18
18
|
protected readonly _options: Templates.Options;
|
|
19
|
-
constructor(_options
|
|
19
|
+
constructor(_options?: Templates.Options);
|
|
20
20
|
/**
|
|
21
21
|
* Returns a list of notification templates
|
|
22
22
|
*/
|
|
@@ -44,7 +44,7 @@ const core = __importStar(require("../../../../core"));
|
|
|
44
44
|
const url_join_1 = __importDefault(require("url-join"));
|
|
45
45
|
const errors = __importStar(require("../../../../errors"));
|
|
46
46
|
class Templates {
|
|
47
|
-
constructor(_options) {
|
|
47
|
+
constructor(_options = {}) {
|
|
48
48
|
this._options = _options;
|
|
49
49
|
}
|
|
50
50
|
/**
|
|
@@ -65,7 +65,7 @@ class Templates {
|
|
|
65
65
|
Authorization: yield this._getAuthorizationHeader(),
|
|
66
66
|
"X-Fern-Language": "JavaScript",
|
|
67
67
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
68
|
-
"X-Fern-SDK-Version": "
|
|
68
|
+
"X-Fern-SDK-Version": "v6.0.3",
|
|
69
69
|
},
|
|
70
70
|
contentType: "application/json",
|
|
71
71
|
queryParameters: _queryParams,
|
|
@@ -7,7 +7,7 @@ import * as Courier from "../../..";
|
|
|
7
7
|
export declare namespace Tenants {
|
|
8
8
|
interface Options {
|
|
9
9
|
environment?: core.Supplier<environments.CourierEnvironment | string>;
|
|
10
|
-
authorizationToken
|
|
10
|
+
authorizationToken?: core.Supplier<core.BearerToken | undefined>;
|
|
11
11
|
}
|
|
12
12
|
interface RequestOptions {
|
|
13
13
|
timeoutInSeconds?: number;
|
|
@@ -16,10 +16,16 @@ export declare namespace Tenants {
|
|
|
16
16
|
}
|
|
17
17
|
export declare class Tenants {
|
|
18
18
|
protected readonly _options: Tenants.Options;
|
|
19
|
-
constructor(_options
|
|
19
|
+
constructor(_options?: Tenants.Options);
|
|
20
20
|
/**
|
|
21
21
|
* @throws {@link Courier.BadRequestError}
|
|
22
22
|
*/
|
|
23
|
-
createOrReplace(tenantId: string, request: Courier.
|
|
23
|
+
createOrReplace(tenantId: string, request: Courier.TenantCreateOrReplaceParams, requestOptions?: Tenants.RequestOptions): Promise<Courier.Tenant>;
|
|
24
|
+
/**
|
|
25
|
+
* @throws {@link Courier.BadRequestError}
|
|
26
|
+
*/
|
|
27
|
+
get(tenantId: string, requestOptions?: Tenants.RequestOptions): Promise<Courier.Tenant>;
|
|
28
|
+
list(requestOptions?: Tenants.RequestOptions): Promise<Courier.TenantListResponse>;
|
|
29
|
+
delete(tenantId: string, requestOptions?: Tenants.RequestOptions): Promise<void>;
|
|
24
30
|
protected _getAuthorizationHeader(): Promise<string>;
|
|
25
31
|
}
|
|
@@ -45,7 +45,7 @@ const Courier = __importStar(require("../../.."));
|
|
|
45
45
|
const url_join_1 = __importDefault(require("url-join"));
|
|
46
46
|
const errors = __importStar(require("../../../../errors"));
|
|
47
47
|
class Tenants {
|
|
48
|
-
constructor(_options) {
|
|
48
|
+
constructor(_options = {}) {
|
|
49
49
|
this._options = _options;
|
|
50
50
|
}
|
|
51
51
|
/**
|
|
@@ -61,7 +61,7 @@ class Tenants {
|
|
|
61
61
|
Authorization: yield this._getAuthorizationHeader(),
|
|
62
62
|
"X-Fern-Language": "JavaScript",
|
|
63
63
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
64
|
-
"X-Fern-SDK-Version": "
|
|
64
|
+
"X-Fern-SDK-Version": "v6.0.3",
|
|
65
65
|
},
|
|
66
66
|
contentType: "application/json",
|
|
67
67
|
body: request,
|
|
@@ -97,6 +97,134 @@ class Tenants {
|
|
|
97
97
|
}
|
|
98
98
|
});
|
|
99
99
|
}
|
|
100
|
+
/**
|
|
101
|
+
* @throws {@link Courier.BadRequestError}
|
|
102
|
+
*/
|
|
103
|
+
get(tenantId, requestOptions) {
|
|
104
|
+
var _a;
|
|
105
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
106
|
+
const _response = yield core.fetcher({
|
|
107
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.CourierEnvironment.Production, `/tenants/${tenantId}`),
|
|
108
|
+
method: "GET",
|
|
109
|
+
headers: {
|
|
110
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
111
|
+
"X-Fern-Language": "JavaScript",
|
|
112
|
+
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
113
|
+
"X-Fern-SDK-Version": "v6.0.3",
|
|
114
|
+
},
|
|
115
|
+
contentType: "application/json",
|
|
116
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
117
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
118
|
+
});
|
|
119
|
+
if (_response.ok) {
|
|
120
|
+
return _response.body;
|
|
121
|
+
}
|
|
122
|
+
if (_response.error.reason === "status-code") {
|
|
123
|
+
switch (_response.error.statusCode) {
|
|
124
|
+
case 400:
|
|
125
|
+
throw new Courier.BadRequestError(_response.error.body);
|
|
126
|
+
default:
|
|
127
|
+
throw new errors.CourierError({
|
|
128
|
+
statusCode: _response.error.statusCode,
|
|
129
|
+
body: _response.error.body,
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
switch (_response.error.reason) {
|
|
134
|
+
case "non-json":
|
|
135
|
+
throw new errors.CourierError({
|
|
136
|
+
statusCode: _response.error.statusCode,
|
|
137
|
+
body: _response.error.rawBody,
|
|
138
|
+
});
|
|
139
|
+
case "timeout":
|
|
140
|
+
throw new errors.CourierTimeoutError();
|
|
141
|
+
case "unknown":
|
|
142
|
+
throw new errors.CourierError({
|
|
143
|
+
message: _response.error.errorMessage,
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
list(requestOptions) {
|
|
149
|
+
var _a;
|
|
150
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
151
|
+
const _response = yield core.fetcher({
|
|
152
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.CourierEnvironment.Production, "/tenants"),
|
|
153
|
+
method: "GET",
|
|
154
|
+
headers: {
|
|
155
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
156
|
+
"X-Fern-Language": "JavaScript",
|
|
157
|
+
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
158
|
+
"X-Fern-SDK-Version": "v6.0.3",
|
|
159
|
+
},
|
|
160
|
+
contentType: "application/json",
|
|
161
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
162
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
163
|
+
});
|
|
164
|
+
if (_response.ok) {
|
|
165
|
+
return _response.body;
|
|
166
|
+
}
|
|
167
|
+
if (_response.error.reason === "status-code") {
|
|
168
|
+
throw new errors.CourierError({
|
|
169
|
+
statusCode: _response.error.statusCode,
|
|
170
|
+
body: _response.error.body,
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
switch (_response.error.reason) {
|
|
174
|
+
case "non-json":
|
|
175
|
+
throw new errors.CourierError({
|
|
176
|
+
statusCode: _response.error.statusCode,
|
|
177
|
+
body: _response.error.rawBody,
|
|
178
|
+
});
|
|
179
|
+
case "timeout":
|
|
180
|
+
throw new errors.CourierTimeoutError();
|
|
181
|
+
case "unknown":
|
|
182
|
+
throw new errors.CourierError({
|
|
183
|
+
message: _response.error.errorMessage,
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
delete(tenantId, requestOptions) {
|
|
189
|
+
var _a;
|
|
190
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
191
|
+
const _response = yield core.fetcher({
|
|
192
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.CourierEnvironment.Production, `/tenants/${tenantId}`),
|
|
193
|
+
method: "DELETE",
|
|
194
|
+
headers: {
|
|
195
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
196
|
+
"X-Fern-Language": "JavaScript",
|
|
197
|
+
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
198
|
+
"X-Fern-SDK-Version": "v6.0.3",
|
|
199
|
+
},
|
|
200
|
+
contentType: "application/json",
|
|
201
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
202
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
203
|
+
});
|
|
204
|
+
if (_response.ok) {
|
|
205
|
+
return;
|
|
206
|
+
}
|
|
207
|
+
if (_response.error.reason === "status-code") {
|
|
208
|
+
throw new errors.CourierError({
|
|
209
|
+
statusCode: _response.error.statusCode,
|
|
210
|
+
body: _response.error.body,
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
switch (_response.error.reason) {
|
|
214
|
+
case "non-json":
|
|
215
|
+
throw new errors.CourierError({
|
|
216
|
+
statusCode: _response.error.statusCode,
|
|
217
|
+
body: _response.error.rawBody,
|
|
218
|
+
});
|
|
219
|
+
case "timeout":
|
|
220
|
+
throw new errors.CourierTimeoutError();
|
|
221
|
+
case "unknown":
|
|
222
|
+
throw new errors.CourierError({
|
|
223
|
+
message: _response.error.errorMessage,
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
});
|
|
227
|
+
}
|
|
100
228
|
_getAuthorizationHeader() {
|
|
101
229
|
var _a;
|
|
102
230
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from "./requests";
|
|
@@ -1,2 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
2
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./requests"), exports);
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
import * as Courier from "
|
|
5
|
-
export interface
|
|
4
|
+
import * as Courier from "../../../..";
|
|
5
|
+
export interface TenantCreateOrReplaceParams {
|
|
6
6
|
/** Name of the tenant. */
|
|
7
7
|
name: string;
|
|
8
8
|
/** Tenant's parent id (if any). */
|
|
9
|
-
parent_tenant_id
|
|
9
|
+
parent_tenant_id?: string;
|
|
10
10
|
/** Defines the preferences used for the tenant when the user hasn't specified their own. */
|
|
11
|
-
default_preferences
|
|
11
|
+
default_preferences?: Courier.DefaultPreferences;
|
|
12
12
|
/** Arbitrary properties accessible to a template. */
|
|
13
|
-
properties
|
|
13
|
+
properties?: (Courier.TemplateProperty | undefined)[];
|
|
14
14
|
/** A user profile object merged with user profile on send. */
|
|
15
|
-
user_profile?: any
|
|
15
|
+
user_profile?: Record<string, any>;
|
|
16
16
|
/** Brand to be used for the account when one is not specified by the send call. */
|
|
17
|
-
brand_id
|
|
17
|
+
brand_id?: string;
|
|
18
18
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { TenantCreateOrReplaceParams } from "./TenantCreateOrReplaceParams";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
import * as Courier from "../../..";
|
|
5
|
-
export interface
|
|
5
|
+
export interface Tenant {
|
|
6
6
|
/** Id of the tenant. */
|
|
7
7
|
id: string;
|
|
8
8
|
/** Name of the tenant. */
|
|
@@ -14,7 +14,7 @@ export interface CreateOrReplaceTenantResponse {
|
|
|
14
14
|
/** Arbitrary properties accessible to a template. */
|
|
15
15
|
properties?: Courier.TemplateProperty | undefined;
|
|
16
16
|
/** A user profile object merged with user profile on send. */
|
|
17
|
-
user_profile?: any
|
|
17
|
+
user_profile?: Record<string, any>;
|
|
18
18
|
/** Brand to be used for the account when one is not specified by the send call. */
|
|
19
|
-
brand_id
|
|
19
|
+
brand_id?: string;
|
|
20
20
|
}
|