@trycourier/courier 6.0.1 → 6.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Client.d.ts +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 +6 -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/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 +2 -0
- package/api/resources/users/resources/tenants/types/index.js +18 -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/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 +6 -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/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 +2 -0
- package/dist/api/resources/users/resources/tenants/types/index.js +18 -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/ListTenantsForUserResponse.js} +0 -0
- /package/{dist/api/resources/tenants/types/CreateOrReplaceTenantRequest.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/{tenants/types/CreateOrReplaceTenantResponse.js → audiences/client/requests/AudienceMembersListParams.js} +0 -0
- /package/dist/api/resources/{userPreferences/types/UpdateSubscriptionTopicRequest.js → audiences/client/requests/AudienceUpdateParams.js} +0 -0
- /package/dist/api/resources/{userPreferences/types/UpdateSubscriptionTopicResponse.js → audiences/client/requests/AudiencesListParams.js} +0 -0
- /package/dist/api/resources/{userPreferences/types/UserPreferences.js → audiences/types/AudienceUpdateResponse.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
package/core/fetcher/Fetcher.js
CHANGED
|
@@ -13,8 +13,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.fetcher = void 0;
|
|
16
|
-
const
|
|
16
|
+
const form_data_1 = __importDefault(require("form-data"));
|
|
17
17
|
const qs_1 = __importDefault(require("qs"));
|
|
18
|
+
if (typeof window === "undefined") {
|
|
19
|
+
global.fetch = require("node-fetch");
|
|
20
|
+
}
|
|
18
21
|
const INITIAL_RETRY_DELAY = 1;
|
|
19
22
|
const MAX_RETRY_DELAY = 60;
|
|
20
23
|
const DEFAULT_MAX_RETRIES = 2;
|
|
@@ -32,60 +35,68 @@ function fetcherImpl(args) {
|
|
|
32
35
|
}
|
|
33
36
|
}
|
|
34
37
|
}
|
|
38
|
+
const url = Object.keys((_a = args.queryParameters) !== null && _a !== void 0 ? _a : {}).length > 0
|
|
39
|
+
? `${args.url}?${qs_1.default.stringify(args.queryParameters, { arrayFormat: "repeat" })}`
|
|
40
|
+
: args.url;
|
|
41
|
+
let body = undefined;
|
|
42
|
+
if (args.body instanceof form_data_1.default) {
|
|
43
|
+
// @ts-expect-error
|
|
44
|
+
body = args.body;
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
body = JSON.stringify(args.body);
|
|
48
|
+
}
|
|
35
49
|
const makeRequest = () => __awaiter(this, void 0, void 0, function* () {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
},
|
|
50
|
+
const controller = new AbortController();
|
|
51
|
+
let abortId = undefined;
|
|
52
|
+
if (args.timeoutMs != null) {
|
|
53
|
+
abortId = setTimeout(() => controller.abort(), args.timeoutMs);
|
|
54
|
+
}
|
|
55
|
+
const response = yield fetch(url, {
|
|
43
56
|
method: args.method,
|
|
44
57
|
headers,
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
timeout: args.timeoutMs,
|
|
49
|
-
transitional: {
|
|
50
|
-
clarifyTimeoutError: true,
|
|
51
|
-
},
|
|
52
|
-
withCredentials: args.withCredentials,
|
|
53
|
-
adapter: args.adapter,
|
|
54
|
-
onUploadProgress: args.onUploadProgress,
|
|
55
|
-
maxBodyLength: Infinity,
|
|
56
|
-
maxContentLength: Infinity,
|
|
57
|
-
responseType: (_d = args.responseType) !== null && _d !== void 0 ? _d : "json",
|
|
58
|
+
body,
|
|
59
|
+
signal: controller.signal,
|
|
60
|
+
credentials: args.withCredentials ? "same-origin" : undefined,
|
|
58
61
|
});
|
|
62
|
+
if (abortId != null) {
|
|
63
|
+
clearTimeout(abortId);
|
|
64
|
+
}
|
|
65
|
+
return response;
|
|
59
66
|
});
|
|
60
67
|
try {
|
|
61
68
|
let response = yield makeRequest();
|
|
62
|
-
for (let i = 0; i < ((
|
|
69
|
+
for (let i = 0; i < ((_b = args.maxRetries) !== null && _b !== void 0 ? _b : DEFAULT_MAX_RETRIES); ++i) {
|
|
63
70
|
if (response.status === 408 ||
|
|
64
71
|
response.status === 409 ||
|
|
65
72
|
response.status === 429 ||
|
|
66
73
|
response.status >= 500) {
|
|
67
74
|
const delay = Math.min(INITIAL_RETRY_DELAY * Math.pow(i, 2), MAX_RETRY_DELAY);
|
|
68
|
-
|
|
75
|
+
yield new Promise((resolve) => setTimeout(resolve, delay));
|
|
76
|
+
response = yield makeRequest();
|
|
69
77
|
}
|
|
70
78
|
else {
|
|
71
79
|
break;
|
|
72
80
|
}
|
|
73
81
|
}
|
|
74
82
|
let body;
|
|
75
|
-
if (args.responseType === "blob") {
|
|
76
|
-
body = response.
|
|
83
|
+
if (response.body != null && args.responseType === "blob") {
|
|
84
|
+
body = yield response.blob();
|
|
77
85
|
}
|
|
78
|
-
else if (response.
|
|
86
|
+
else if (response.body != null && args.responseType === "streaming") {
|
|
87
|
+
body = response.body;
|
|
88
|
+
}
|
|
89
|
+
else if (response.body != null) {
|
|
79
90
|
try {
|
|
80
|
-
body =
|
|
91
|
+
body = yield response.json();
|
|
81
92
|
}
|
|
82
|
-
catch (
|
|
93
|
+
catch (err) {
|
|
83
94
|
return {
|
|
84
95
|
ok: false,
|
|
85
96
|
error: {
|
|
86
97
|
reason: "non-json",
|
|
87
98
|
statusCode: response.status,
|
|
88
|
-
rawBody: response.
|
|
99
|
+
rawBody: yield response.text(),
|
|
89
100
|
},
|
|
90
101
|
};
|
|
91
102
|
}
|
|
@@ -94,6 +105,7 @@ function fetcherImpl(args) {
|
|
|
94
105
|
return {
|
|
95
106
|
ok: true,
|
|
96
107
|
body: body,
|
|
108
|
+
headers: response.headers,
|
|
97
109
|
};
|
|
98
110
|
}
|
|
99
111
|
else {
|
|
@@ -108,7 +120,7 @@ function fetcherImpl(args) {
|
|
|
108
120
|
}
|
|
109
121
|
}
|
|
110
122
|
catch (error) {
|
|
111
|
-
if (error.
|
|
123
|
+
if (error instanceof Error && error.name === "AbortError") {
|
|
112
124
|
return {
|
|
113
125
|
ok: false,
|
|
114
126
|
error: {
|
|
@@ -116,11 +128,20 @@ function fetcherImpl(args) {
|
|
|
116
128
|
},
|
|
117
129
|
};
|
|
118
130
|
}
|
|
131
|
+
else if (error instanceof Error) {
|
|
132
|
+
return {
|
|
133
|
+
ok: false,
|
|
134
|
+
error: {
|
|
135
|
+
reason: "unknown",
|
|
136
|
+
errorMessage: error.message,
|
|
137
|
+
},
|
|
138
|
+
};
|
|
139
|
+
}
|
|
119
140
|
return {
|
|
120
141
|
ok: false,
|
|
121
142
|
error: {
|
|
122
143
|
reason: "unknown",
|
|
123
|
-
errorMessage: error
|
|
144
|
+
errorMessage: JSON.stringify(error),
|
|
124
145
|
},
|
|
125
146
|
};
|
|
126
147
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getHeader(headers: Record<string, any>, header: string): string | undefined;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getHeader = void 0;
|
|
4
|
+
function getHeader(headers, header) {
|
|
5
|
+
for (const [headerKey, headerValue] of Object.entries(headers)) {
|
|
6
|
+
if (headerKey.toLowerCase() === header.toLowerCase()) {
|
|
7
|
+
return headerValue;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
return undefined;
|
|
11
|
+
}
|
|
12
|
+
exports.getHeader = getHeader;
|
package/core/fetcher/index.d.ts
CHANGED
package/core/fetcher/index.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Supplier = exports.fetcher = void 0;
|
|
3
|
+
exports.Supplier = exports.getHeader = exports.fetcher = void 0;
|
|
4
4
|
var Fetcher_1 = require("./Fetcher");
|
|
5
5
|
Object.defineProperty(exports, "fetcher", { enumerable: true, get: function () { return Fetcher_1.fetcher; } });
|
|
6
|
+
var getHeader_1 = require("./getHeader");
|
|
7
|
+
Object.defineProperty(exports, "getHeader", { enumerable: true, get: function () { return getHeader_1.getHeader; } });
|
|
6
8
|
var Supplier_1 = require("./Supplier");
|
|
7
9
|
Object.defineProperty(exports, "Supplier", { enumerable: true, get: function () { return Supplier_1.Supplier; } });
|
package/dist/Client.d.ts
CHANGED
|
@@ -12,16 +12,16 @@ import { Brands } from "./api/resources/brands/client/Client";
|
|
|
12
12
|
import { Bulk } from "./api/resources/bulk/client/Client";
|
|
13
13
|
import { Lists } from "./api/resources/lists/client/Client";
|
|
14
14
|
import { Messages } from "./api/resources/messages/client/Client";
|
|
15
|
+
import { Notifications } from "./api/resources/notifications/client/Client";
|
|
15
16
|
import { Profiles } from "./api/resources/profiles/client/Client";
|
|
16
17
|
import { Templates } from "./api/resources/templates/client/Client";
|
|
17
18
|
import { Tenants } from "./api/resources/tenants/client/Client";
|
|
18
|
-
import { TokenManagement } from "./api/resources/tokenManagement/client/Client";
|
|
19
19
|
import { Translations } from "./api/resources/translations/client/Client";
|
|
20
|
-
import {
|
|
20
|
+
import { Users } from "./api/resources/users/client/Client";
|
|
21
21
|
export declare namespace CourierClient {
|
|
22
22
|
interface Options {
|
|
23
23
|
environment?: core.Supplier<environments.CourierEnvironment | string>;
|
|
24
|
-
authorizationToken
|
|
24
|
+
authorizationToken?: core.Supplier<core.BearerToken | undefined>;
|
|
25
25
|
}
|
|
26
26
|
interface RequestOptions {
|
|
27
27
|
timeoutInSeconds?: number;
|
|
@@ -34,7 +34,7 @@ export declare namespace CourierClient {
|
|
|
34
34
|
}
|
|
35
35
|
export declare class CourierClient {
|
|
36
36
|
protected readonly _options: CourierClient.Options;
|
|
37
|
-
constructor(_options
|
|
37
|
+
constructor(_options?: CourierClient.Options);
|
|
38
38
|
/**
|
|
39
39
|
* Use the send API to send a message to one or more recipients.
|
|
40
40
|
*/
|
|
@@ -55,17 +55,17 @@ export declare class CourierClient {
|
|
|
55
55
|
get lists(): Lists;
|
|
56
56
|
protected _messages: Messages | undefined;
|
|
57
57
|
get messages(): Messages;
|
|
58
|
+
protected _notifications: Notifications | undefined;
|
|
59
|
+
get notifications(): Notifications;
|
|
58
60
|
protected _profiles: Profiles | undefined;
|
|
59
61
|
get profiles(): Profiles;
|
|
60
62
|
protected _templates: Templates | undefined;
|
|
61
63
|
get templates(): Templates;
|
|
62
64
|
protected _tenants: Tenants | undefined;
|
|
63
65
|
get tenants(): Tenants;
|
|
64
|
-
protected _tokenManagement: TokenManagement | undefined;
|
|
65
|
-
get tokenManagement(): TokenManagement;
|
|
66
66
|
protected _translations: Translations | undefined;
|
|
67
67
|
get translations(): Translations;
|
|
68
|
-
protected
|
|
69
|
-
get
|
|
68
|
+
protected _users: Users | undefined;
|
|
69
|
+
get users(): Users;
|
|
70
70
|
protected _getAuthorizationHeader(): Promise<string>;
|
|
71
71
|
}
|
package/dist/Client.js
CHANGED
|
@@ -51,14 +51,14 @@ const Client_5 = require("./api/resources/brands/client/Client");
|
|
|
51
51
|
const Client_6 = require("./api/resources/bulk/client/Client");
|
|
52
52
|
const Client_7 = require("./api/resources/lists/client/Client");
|
|
53
53
|
const Client_8 = require("./api/resources/messages/client/Client");
|
|
54
|
-
const Client_9 = require("./api/resources/
|
|
55
|
-
const Client_10 = require("./api/resources/
|
|
56
|
-
const Client_11 = require("./api/resources/
|
|
57
|
-
const Client_12 = require("./api/resources/
|
|
54
|
+
const Client_9 = require("./api/resources/notifications/client/Client");
|
|
55
|
+
const Client_10 = require("./api/resources/profiles/client/Client");
|
|
56
|
+
const Client_11 = require("./api/resources/templates/client/Client");
|
|
57
|
+
const Client_12 = require("./api/resources/tenants/client/Client");
|
|
58
58
|
const Client_13 = require("./api/resources/translations/client/Client");
|
|
59
|
-
const Client_14 = require("./api/resources/
|
|
59
|
+
const Client_14 = require("./api/resources/users/client/Client");
|
|
60
60
|
class CourierClient {
|
|
61
|
-
constructor(_options) {
|
|
61
|
+
constructor(_options = {}) {
|
|
62
62
|
this._options = _options;
|
|
63
63
|
}
|
|
64
64
|
/**
|
|
@@ -74,7 +74,7 @@ class CourierClient {
|
|
|
74
74
|
Authorization: yield this._getAuthorizationHeader(),
|
|
75
75
|
"X-Fern-Language": "JavaScript",
|
|
76
76
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
77
|
-
"X-Fern-SDK-Version": "
|
|
77
|
+
"X-Fern-SDK-Version": "v6.0.2",
|
|
78
78
|
"Idempotency-Key": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey) != null ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey : undefined,
|
|
79
79
|
"X-Idempotency-Expiration": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry) != null
|
|
80
80
|
? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry.toString()
|
|
@@ -141,29 +141,29 @@ class CourierClient {
|
|
|
141
141
|
var _a;
|
|
142
142
|
return ((_a = this._messages) !== null && _a !== void 0 ? _a : (this._messages = new Client_8.Messages(this._options)));
|
|
143
143
|
}
|
|
144
|
+
get notifications() {
|
|
145
|
+
var _a;
|
|
146
|
+
return ((_a = this._notifications) !== null && _a !== void 0 ? _a : (this._notifications = new Client_9.Notifications(this._options)));
|
|
147
|
+
}
|
|
144
148
|
get profiles() {
|
|
145
149
|
var _a;
|
|
146
|
-
return ((_a = this._profiles) !== null && _a !== void 0 ? _a : (this._profiles = new
|
|
150
|
+
return ((_a = this._profiles) !== null && _a !== void 0 ? _a : (this._profiles = new Client_10.Profiles(this._options)));
|
|
147
151
|
}
|
|
148
152
|
get templates() {
|
|
149
153
|
var _a;
|
|
150
|
-
return ((_a = this._templates) !== null && _a !== void 0 ? _a : (this._templates = new
|
|
154
|
+
return ((_a = this._templates) !== null && _a !== void 0 ? _a : (this._templates = new Client_11.Templates(this._options)));
|
|
151
155
|
}
|
|
152
156
|
get tenants() {
|
|
153
157
|
var _a;
|
|
154
|
-
return ((_a = this._tenants) !== null && _a !== void 0 ? _a : (this._tenants = new
|
|
155
|
-
}
|
|
156
|
-
get tokenManagement() {
|
|
157
|
-
var _a;
|
|
158
|
-
return ((_a = this._tokenManagement) !== null && _a !== void 0 ? _a : (this._tokenManagement = new Client_12.TokenManagement(this._options)));
|
|
158
|
+
return ((_a = this._tenants) !== null && _a !== void 0 ? _a : (this._tenants = new Client_12.Tenants(this._options)));
|
|
159
159
|
}
|
|
160
160
|
get translations() {
|
|
161
161
|
var _a;
|
|
162
162
|
return ((_a = this._translations) !== null && _a !== void 0 ? _a : (this._translations = new Client_13.Translations(this._options)));
|
|
163
163
|
}
|
|
164
|
-
get
|
|
164
|
+
get users() {
|
|
165
165
|
var _a;
|
|
166
|
-
return ((_a = this.
|
|
166
|
+
return ((_a = this._users) !== null && _a !== void 0 ? _a : (this._users = new Client_14.Users(this._options)));
|
|
167
167
|
}
|
|
168
168
|
_getAuthorizationHeader() {
|
|
169
169
|
var _a;
|
|
@@ -7,7 +7,7 @@ import * as Courier from "../../..";
|
|
|
7
7
|
export declare namespace Audiences {
|
|
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 Audiences {
|
|
|
16
16
|
}
|
|
17
17
|
export declare class Audiences {
|
|
18
18
|
protected readonly _options: Audiences.Options;
|
|
19
|
-
constructor(_options
|
|
19
|
+
constructor(_options?: Audiences.Options);
|
|
20
20
|
/**
|
|
21
21
|
* Returns the specified audience by id.
|
|
22
22
|
*/
|
|
@@ -24,7 +24,7 @@ export declare class Audiences {
|
|
|
24
24
|
/**
|
|
25
25
|
* Creates or updates audience.
|
|
26
26
|
*/
|
|
27
|
-
update(audienceId: string, request
|
|
27
|
+
update(audienceId: string, request?: Courier.AudienceUpdateParams, requestOptions?: Audiences.RequestOptions): Promise<Courier.AudienceUpdateResponse>;
|
|
28
28
|
/**
|
|
29
29
|
* Deletes the specified recipient Profile.
|
|
30
30
|
*/
|
|
@@ -33,11 +33,11 @@ export declare class Audiences {
|
|
|
33
33
|
* Get list of members of an audience.
|
|
34
34
|
* @throws {@link Courier.BadRequestError}
|
|
35
35
|
*/
|
|
36
|
-
listMembers(audienceId: string, request?: Courier.
|
|
36
|
+
listMembers(audienceId: string, request?: Courier.AudienceMembersListParams, requestOptions?: Audiences.RequestOptions): Promise<Courier.AudienceMemberListResponse>;
|
|
37
37
|
/**
|
|
38
38
|
* Get the audiences associated with the authorization token.
|
|
39
39
|
* @throws {@link Courier.BadRequestError}
|
|
40
40
|
*/
|
|
41
|
-
listAudiences(request?: Courier.
|
|
41
|
+
listAudiences(request?: Courier.AudiencesListParams, requestOptions?: Audiences.RequestOptions): Promise<Courier.AudienceListResponse>;
|
|
42
42
|
protected _getAuthorizationHeader(): Promise<string>;
|
|
43
43
|
}
|
|
@@ -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 Audiences {
|
|
48
|
-
constructor(_options) {
|
|
48
|
+
constructor(_options = {}) {
|
|
49
49
|
this._options = _options;
|
|
50
50
|
}
|
|
51
51
|
/**
|
|
@@ -61,7 +61,7 @@ class Audiences {
|
|
|
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.2",
|
|
65
65
|
},
|
|
66
66
|
contentType: "application/json",
|
|
67
67
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -94,7 +94,7 @@ class Audiences {
|
|
|
94
94
|
/**
|
|
95
95
|
* Creates or updates audience.
|
|
96
96
|
*/
|
|
97
|
-
update(audienceId, request, requestOptions) {
|
|
97
|
+
update(audienceId, request = {}, requestOptions) {
|
|
98
98
|
var _a;
|
|
99
99
|
return __awaiter(this, void 0, void 0, function* () {
|
|
100
100
|
const _response = yield core.fetcher({
|
|
@@ -104,7 +104,7 @@ class Audiences {
|
|
|
104
104
|
Authorization: yield this._getAuthorizationHeader(),
|
|
105
105
|
"X-Fern-Language": "JavaScript",
|
|
106
106
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
107
|
-
"X-Fern-SDK-Version": "
|
|
107
|
+
"X-Fern-SDK-Version": "v6.0.2",
|
|
108
108
|
},
|
|
109
109
|
contentType: "application/json",
|
|
110
110
|
body: request,
|
|
@@ -148,7 +148,7 @@ class Audiences {
|
|
|
148
148
|
Authorization: yield this._getAuthorizationHeader(),
|
|
149
149
|
"X-Fern-Language": "JavaScript",
|
|
150
150
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
151
|
-
"X-Fern-SDK-Version": "
|
|
151
|
+
"X-Fern-SDK-Version": "v6.0.2",
|
|
152
152
|
},
|
|
153
153
|
contentType: "application/json",
|
|
154
154
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -197,7 +197,7 @@ class Audiences {
|
|
|
197
197
|
Authorization: yield this._getAuthorizationHeader(),
|
|
198
198
|
"X-Fern-Language": "JavaScript",
|
|
199
199
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
200
|
-
"X-Fern-SDK-Version": "
|
|
200
|
+
"X-Fern-SDK-Version": "v6.0.2",
|
|
201
201
|
},
|
|
202
202
|
contentType: "application/json",
|
|
203
203
|
queryParameters: _queryParams,
|
|
@@ -252,7 +252,7 @@ class Audiences {
|
|
|
252
252
|
Authorization: yield this._getAuthorizationHeader(),
|
|
253
253
|
"X-Fern-Language": "JavaScript",
|
|
254
254
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
255
|
-
"X-Fern-SDK-Version": "
|
|
255
|
+
"X-Fern-SDK-Version": "v6.0.2",
|
|
256
256
|
},
|
|
257
257
|
contentType: "application/json",
|
|
258
258
|
queryParameters: _queryParams,
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
export interface
|
|
4
|
+
export interface AudienceMembersListParams {
|
|
5
5
|
/**
|
|
6
6
|
* A unique identifier that allows for fetching the next set of members
|
|
7
|
-
*
|
|
8
7
|
*/
|
|
9
8
|
cursor?: string;
|
|
10
9
|
}
|
|
@@ -1,10 +1,8 @@
|
|
|
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
|
|
6
|
-
/** A unique identifier representing the audience_id */
|
|
7
|
-
id?: string;
|
|
4
|
+
import * as Courier from "../../../..";
|
|
5
|
+
export interface AudienceUpdateParams {
|
|
8
6
|
/** The name of the audience */
|
|
9
7
|
name?: string;
|
|
10
8
|
/** A description of the audience */
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
export interface
|
|
4
|
+
export interface AudiencesListParams {
|
|
5
5
|
/**
|
|
6
6
|
* A unique identifier that allows for fetching the next set of audiences
|
|
7
|
-
*
|
|
8
7
|
*/
|
|
9
8
|
cursor?: string;
|
|
10
9
|
}
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
1
|
+
export { AudienceUpdateParams } from "./AudienceUpdateParams";
|
|
2
|
+
export { AudienceMembersListParams } from "./AudienceMembersListParams";
|
|
3
|
+
export { AudiencesListParams } from "./AudiencesListParams";
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export * from "./AudienceRequest";
|
|
2
1
|
export * from "./Filter";
|
|
3
2
|
export * from "./Operator";
|
|
4
3
|
export * from "./BaseFilterConfig";
|
|
@@ -12,4 +11,4 @@ export * from "./AudienceMember";
|
|
|
12
11
|
export * from "./AudienceListResponse";
|
|
13
12
|
export * from "./AudienceMemberGetResponse";
|
|
14
13
|
export * from "./AudienceMemberListResponse";
|
|
15
|
-
export * from "./
|
|
14
|
+
export * from "./AudienceUpdateResponse";
|
|
@@ -14,7 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./AudienceRequest"), exports);
|
|
18
17
|
__exportStar(require("./Filter"), exports);
|
|
19
18
|
__exportStar(require("./Operator"), exports);
|
|
20
19
|
__exportStar(require("./BaseFilterConfig"), exports);
|
|
@@ -28,4 +27,4 @@ __exportStar(require("./AudienceMember"), exports);
|
|
|
28
27
|
__exportStar(require("./AudienceListResponse"), exports);
|
|
29
28
|
__exportStar(require("./AudienceMemberGetResponse"), exports);
|
|
30
29
|
__exportStar(require("./AudienceMemberListResponse"), exports);
|
|
31
|
-
__exportStar(require("./
|
|
30
|
+
__exportStar(require("./AudienceUpdateResponse"), exports);
|
|
@@ -7,7 +7,7 @@ import * as Courier from "../../..";
|
|
|
7
7
|
export declare namespace AuditEvents {
|
|
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 AuditEvents {
|
|
|
16
16
|
}
|
|
17
17
|
export declare class AuditEvents {
|
|
18
18
|
protected readonly _options: AuditEvents.Options;
|
|
19
|
-
constructor(_options
|
|
19
|
+
constructor(_options?: AuditEvents.Options);
|
|
20
20
|
/**
|
|
21
21
|
* Fetch the list of audit events
|
|
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 AuditEvents {
|
|
47
|
-
constructor(_options) {
|
|
47
|
+
constructor(_options = {}) {
|
|
48
48
|
this._options = _options;
|
|
49
49
|
}
|
|
50
50
|
/**
|
|
@@ -65,7 +65,7 @@ class AuditEvents {
|
|
|
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.2",
|
|
69
69
|
},
|
|
70
70
|
contentType: "application/json",
|
|
71
71
|
queryParameters: _queryParams,
|
|
@@ -109,7 +109,7 @@ class AuditEvents {
|
|
|
109
109
|
Authorization: yield this._getAuthorizationHeader(),
|
|
110
110
|
"X-Fern-Language": "JavaScript",
|
|
111
111
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
112
|
-
"X-Fern-SDK-Version": "
|
|
112
|
+
"X-Fern-SDK-Version": "v6.0.2",
|
|
113
113
|
},
|
|
114
114
|
contentType: "application/json",
|
|
115
115
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -7,7 +7,7 @@ import * as Courier from "../../..";
|
|
|
7
7
|
export declare namespace AuthTokens {
|
|
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,10 +20,10 @@ export declare namespace AuthTokens {
|
|
|
20
20
|
}
|
|
21
21
|
export declare class AuthTokens {
|
|
22
22
|
protected readonly _options: AuthTokens.Options;
|
|
23
|
-
constructor(_options
|
|
23
|
+
constructor(_options?: AuthTokens.Options);
|
|
24
24
|
/**
|
|
25
25
|
* Returns a new access token.
|
|
26
26
|
*/
|
|
27
|
-
issueToken(request: Courier.
|
|
27
|
+
issueToken(request: Courier.IssueTokenParams, requestOptions?: AuthTokens.IdempotentRequestOptions): Promise<Courier.IssueTokenResponse>;
|
|
28
28
|
protected _getAuthorizationHeader(): Promise<string>;
|
|
29
29
|
}
|
|
@@ -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 AuthTokens {
|
|
47
|
-
constructor(_options) {
|
|
47
|
+
constructor(_options = {}) {
|
|
48
48
|
this._options = _options;
|
|
49
49
|
}
|
|
50
50
|
/**
|
|
@@ -60,7 +60,7 @@ class AuthTokens {
|
|
|
60
60
|
Authorization: yield this._getAuthorizationHeader(),
|
|
61
61
|
"X-Fern-Language": "JavaScript",
|
|
62
62
|
"X-Fern-SDK-Name": "@trycourier/courier",
|
|
63
|
-
"X-Fern-SDK-Version": "
|
|
63
|
+
"X-Fern-SDK-Version": "v6.0.2",
|
|
64
64
|
"Idempotency-Key": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey) != null ? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey : undefined,
|
|
65
65
|
"X-Idempotency-Expiration": (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry) != null
|
|
66
66
|
? requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyExpiry.toString()
|
|
@@ -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);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { IssueTokenParams } from "./IssueTokenParams";
|