rcs-js 2.0.0-rc.9 → 2.0.1-rc.1
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/dist/cjs/Client.d.ts +5 -2
- package/dist/cjs/Client.js +16 -11
- package/dist/cjs/api/errors/NotFoundError.d.ts +1 -2
- package/dist/cjs/api/resources/brands/client/Client.d.ts +19 -17
- package/dist/cjs/api/resources/brands/client/Client.js +25 -19
- package/dist/cjs/api/resources/brands/client/requests/BrandsGetRequest.d.ts +1 -1
- package/dist/cjs/api/resources/brands/client/requests/UpsertBrandParams.d.ts +9 -6
- package/dist/cjs/api/resources/campaigns/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/campaigns/client/Client.js +1 -1
- package/dist/cjs/api/resources/campaigns/resources/dlc/client/Client.d.ts +21 -20
- package/dist/cjs/api/resources/campaigns/resources/dlc/client/Client.js +17 -16
- package/dist/cjs/api/resources/campaigns/resources/dlc/client/requests/UpsertDlcCampaignParams.d.ts +8 -8
- package/dist/cjs/api/resources/campaigns/resources/rcs/client/Client.d.ts +16 -13
- package/dist/cjs/api/resources/campaigns/resources/rcs/client/Client.js +14 -9
- package/dist/cjs/api/resources/campaigns/resources/rcs/client/requests/UpsertRcsCampaignParams.d.ts +9 -7
- package/dist/cjs/api/resources/campaigns/resources/rcs/types/RcsAutofillResponse.d.ts +1 -1
- package/dist/cjs/api/resources/campaigns/resources/tollFree/client/Client.d.ts +15 -15
- package/dist/cjs/api/resources/campaigns/resources/tollFree/client/Client.js +11 -11
- package/dist/cjs/api/resources/campaigns/resources/tollFree/client/requests/UpsertTollFreeCampaignParams.d.ts +7 -7
- package/dist/cjs/api/resources/campaigns/resources/tollFree/types/TollFreeAutofillResponse.d.ts +1 -1
- package/dist/cjs/api/resources/contacts/client/Client.d.ts +7 -5
- package/dist/cjs/api/resources/contacts/client/Client.js +11 -9
- package/dist/cjs/api/resources/contacts/client/requests/ContactsGetRequest.d.ts +5 -3
- package/dist/cjs/api/resources/contacts/client/requests/UpdateContactParams.d.ts +3 -3
- package/dist/cjs/api/resources/conversations/client/Client.d.ts +25 -8
- package/dist/cjs/api/resources/conversations/client/Client.js +101 -9
- package/dist/cjs/api/resources/conversations/client/requests/ConversationsListMessagesRequest.d.ts +36 -0
- package/dist/cjs/api/resources/conversations/client/requests/ListConversationsParams.d.ts +11 -6
- package/dist/cjs/api/resources/conversations/client/requests/UpdateConversationParams.d.ts +3 -3
- package/dist/cjs/api/resources/conversations/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/conversations/index.d.ts +1 -0
- package/dist/cjs/api/resources/conversations/index.js +1 -0
- package/dist/cjs/api/resources/conversations/types/ConversationsListMessagesRequestDirection.d.ts +8 -0
- package/dist/cjs/api/resources/conversations/types/ConversationsListMessagesRequestDirection.js +10 -0
- package/dist/cjs/api/resources/conversations/types/ConversationsListMessagesRequestSortOrder.d.ts +8 -0
- package/dist/cjs/api/resources/conversations/types/ConversationsListMessagesRequestSortOrder.js +10 -0
- package/dist/cjs/api/resources/conversations/types/ConversationsListMessagesRequestStatus.d.ts +13 -0
- package/dist/cjs/api/resources/conversations/types/ConversationsListMessagesRequestStatus.js +15 -0
- package/dist/cjs/api/resources/conversations/types/ConversationsListMessagesRequestType.d.ts +9 -0
- package/dist/cjs/api/resources/conversations/types/ConversationsListMessagesRequestType.js +11 -0
- package/dist/cjs/api/resources/conversations/types/index.d.ts +4 -0
- package/dist/cjs/api/resources/conversations/types/index.js +20 -0
- package/dist/cjs/api/resources/index.d.ts +4 -1
- package/dist/cjs/api/resources/index.js +5 -2
- package/dist/cjs/api/resources/messages/client/Client.d.ts +10 -7
- package/dist/cjs/api/resources/messages/client/Client.js +13 -4
- package/dist/cjs/api/resources/messages/client/requests/ReactMessageParams.d.ts +4 -4
- package/dist/cjs/api/resources/messages/resources/mms/client/Client.d.ts +4 -3
- package/dist/cjs/api/resources/messages/resources/mms/client/Client.js +4 -1
- package/dist/cjs/api/resources/messages/resources/rcs/client/Client.d.ts +6 -5
- package/dist/cjs/api/resources/messages/resources/rcs/client/Client.js +5 -2
- package/dist/cjs/api/resources/messages/resources/sms/client/Client.d.ts +4 -3
- package/dist/cjs/api/resources/messages/resources/sms/client/Client.js +4 -1
- package/dist/cjs/api/resources/phoneNumbers/client/Client.d.ts +3 -3
- package/dist/cjs/api/resources/phoneNumbers/client/Client.js +1 -1
- package/dist/cjs/api/resources/phoneNumbers/resources/campaign/client/Client.d.ts +7 -5
- package/dist/cjs/api/resources/phoneNumbers/resources/campaign/client/Client.js +9 -3
- package/dist/cjs/api/resources/phoneNumbers/resources/campaign/client/requests/AttachCampaignParams.d.ts +12 -3
- package/dist/cjs/api/resources/phoneNumbers/resources/webhook/client/Client.d.ts +11 -9
- package/dist/cjs/api/resources/phoneNumbers/resources/webhook/client/Client.js +10 -6
- package/dist/cjs/api/resources/rcs/client/Client.d.ts +121 -0
- package/dist/cjs/api/resources/rcs/client/Client.js +320 -0
- package/dist/cjs/api/resources/rcs/client/index.d.ts +2 -0
- package/dist/cjs/api/resources/rcs/client/index.js +17 -0
- package/dist/cjs/api/resources/rcs/client/requests/RcsCapabilitiesQuery.d.ts +13 -0
- package/dist/cjs/api/resources/rcs/client/requests/RcsLinkRequest.d.ts +22 -0
- package/dist/cjs/api/resources/rcs/client/requests/RcsWhitelistRequest.d.ts +16 -0
- package/dist/cjs/api/resources/rcs/client/requests/RcsWhitelistRequest.js +5 -0
- package/dist/cjs/api/resources/rcs/client/requests/index.d.ts +3 -0
- package/dist/cjs/api/resources/rcs/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/rcs/index.d.ts +1 -0
- package/dist/cjs/api/resources/rcs/index.js +17 -0
- package/dist/cjs/api/resources/status/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/status/client/Client.js +1 -1
- package/dist/cjs/api/resources/status/resources/get/client/Client.d.ts +16 -16
- package/dist/cjs/api/resources/status/resources/get/client/Client.js +10 -10
- package/dist/cjs/api/resources/tools/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/tools/client/Client.js +1 -1
- package/dist/cjs/api/resources/tools/resources/contactCard/client/Client.d.ts +7 -7
- package/dist/cjs/api/resources/tools/resources/contactCard/client/Client.js +5 -5
- package/dist/cjs/api/resources/tools/resources/contactCard/client/requests/GetVcardParams.d.ts +3 -3
- package/dist/cjs/api/resources/tools/resources/contactCard/client/requests/UpsertVcardParams.d.ts +1 -1
- package/dist/cjs/api/resources/tools/resources/file/client/Client.d.ts +24 -3
- package/dist/cjs/api/resources/tools/resources/file/client/Client.js +75 -1
- package/dist/cjs/api/resources/tools/resources/file/client/requests/RefreshFileParams.d.ts +13 -0
- package/dist/cjs/api/resources/tools/resources/file/client/requests/RefreshFileParams.js +5 -0
- package/dist/cjs/api/resources/tools/resources/file/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/tools/resources/url/client/Client.d.ts +4 -4
- package/dist/cjs/api/resources/tools/resources/url/client/Client.js +2 -2
- package/dist/cjs/api/resources/webhooks/client/Client.d.ts +3 -3
- package/dist/cjs/api/resources/webhooks/client/Client.js +1 -1
- package/dist/cjs/api/types/AdvancedPhoneInformation.d.ts +9 -9
- package/dist/cjs/api/types/AttachWebhookParams.d.ts +3 -3
- package/dist/cjs/api/types/AttachedPhoneNumberResult.d.ts +2 -2
- package/dist/cjs/api/types/AutofillCampaignParams.d.ts +7 -2
- package/dist/cjs/api/types/AutofillDlcCampaignResponse.d.ts +15 -15
- package/dist/cjs/api/types/BrandStatus.d.ts +2 -2
- package/dist/cjs/api/types/ButtonClicked.d.ts +11 -0
- package/dist/cjs/api/types/ButtonClicked.js +5 -0
- package/dist/cjs/api/types/ButtonClickedData.d.ts +58 -0
- package/dist/cjs/api/types/ButtonClickedData.js +16 -0
- package/dist/cjs/api/types/CampaignQuery.d.ts +6 -1
- package/dist/cjs/api/types/ConfiguredWebhook.d.ts +2 -2
- package/dist/cjs/api/types/Contact.d.ts +2 -2
- package/dist/cjs/api/types/ContactId.d.ts +2 -2
- package/dist/cjs/api/types/Conversation.d.ts +9 -9
- package/dist/cjs/api/types/CreateUrlOptions.d.ts +1 -1
- package/dist/cjs/api/types/DetachedPhoneNumberResult.d.ts +2 -2
- package/dist/cjs/api/types/DetachedWebhookInfo.d.ts +2 -2
- package/dist/cjs/api/types/DlcCampaignStatus.d.ts +4 -4
- package/dist/cjs/api/types/DlcCampaignWithExtendedBrandAndStatus.d.ts +15 -12
- package/dist/cjs/api/types/EnhancedContactItem.d.ts +1 -1
- package/dist/cjs/api/types/ExtendedBrand.d.ts +14 -7
- package/dist/cjs/api/types/ExtendedBrandWithVetting.d.ts +2 -2
- package/dist/cjs/api/types/ExtendedRcsCampaign.d.ts +14 -13
- package/dist/cjs/api/types/GetConversationParams.d.ts +1 -1
- package/dist/cjs/api/types/LinkClickEvent.d.ts +0 -4
- package/dist/cjs/api/types/Message.d.ts +6 -6
- package/dist/cjs/api/types/MessageContent.d.ts +2 -2
- package/dist/cjs/api/types/MessageEvent.d.ts +62 -0
- package/dist/cjs/api/types/MessageEvent.js +13 -0
- package/dist/cjs/api/types/MessageList.d.ts +15 -0
- package/dist/cjs/api/types/MessageList.js +5 -0
- package/dist/cjs/api/types/MessageWithReaction.d.ts +27 -0
- package/dist/cjs/api/types/MessageWithReaction.js +13 -0
- package/dist/cjs/api/types/NotFoundErrorBody.d.ts +6 -0
- package/dist/cjs/api/types/NotFoundErrorBody.js +5 -0
- package/dist/cjs/api/types/ProfileStatusEnum.d.ts +7 -4
- package/dist/cjs/api/types/RcsBase.d.ts +2 -0
- package/dist/cjs/api/types/RcsButtonCall.d.ts +2 -0
- package/dist/cjs/api/types/RcsButtonOpenUrl.d.ts +2 -0
- package/dist/cjs/api/types/RcsButtonRequestUserLocation.d.ts +2 -0
- package/dist/cjs/api/types/RcsButtonScheduleEvent.d.ts +2 -0
- package/dist/cjs/api/types/RcsButtonSendLocation.d.ts +2 -0
- package/dist/cjs/api/types/RcsButtonTrigger.d.ts +2 -2
- package/dist/cjs/api/types/RcsCampaign.d.ts +5 -5
- package/dist/cjs/api/types/RcsCampaignStatus.d.ts +2 -2
- package/dist/cjs/api/types/RcsCapabilitiesResult.d.ts +8 -0
- package/dist/cjs/api/types/RcsCapabilitiesResult.js +5 -0
- package/dist/cjs/api/types/RcsCapability.d.ts +36 -0
- package/dist/cjs/api/types/RcsCapability.js +5 -0
- package/dist/cjs/api/types/RcsLinkResult.d.ts +13 -0
- package/dist/cjs/api/types/RcsLinkResult.js +5 -0
- package/dist/cjs/api/types/RcsValidateContent.d.ts +1 -0
- package/dist/cjs/api/types/RcsWhitelistResponse.d.ts +10 -0
- package/dist/cjs/api/types/RcsWhitelistResponse.js +5 -0
- package/dist/cjs/api/types/ReactionResult.d.ts +4 -4
- package/dist/cjs/api/types/RefreshedFile.d.ts +9 -0
- package/dist/cjs/api/types/RefreshedFile.js +5 -0
- package/dist/cjs/api/types/{Rcs.d.ts → RichMessage.d.ts} +1 -1
- package/dist/cjs/api/types/RichMessage.js +5 -0
- package/dist/cjs/api/types/ScheduledMessaage.d.ts +2 -2
- package/dist/cjs/api/types/SentMmsDetails.d.ts +2 -2
- package/dist/cjs/api/types/SentRcsDetails.d.ts +2 -2
- package/dist/cjs/api/types/SentSmsDetails.d.ts +2 -2
- package/dist/cjs/api/types/ShortenedUrl.d.ts +1 -1
- package/dist/cjs/api/types/TollFreeCampaign.d.ts +2 -2
- package/dist/cjs/api/types/TollFreeCampaignStatus.d.ts +2 -2
- package/dist/cjs/api/types/TollFreeCampaignWithExtendedBrandAndStatus.d.ts +0 -1
- package/dist/cjs/api/types/UpdatedContactId.d.ts +2 -2
- package/dist/cjs/api/types/UploadResults.d.ts +1 -1
- package/dist/cjs/api/types/UserEvent.d.ts +27 -0
- package/dist/cjs/api/types/UserEvent.js +5 -0
- package/dist/cjs/api/types/VCardData.d.ts +1 -1
- package/dist/cjs/api/types/ValidateCampaignParams.d.ts +7 -2
- package/dist/cjs/api/types/Vcard.d.ts +2 -2
- package/dist/cjs/api/types/VcardResource.d.ts +2 -2
- package/dist/cjs/api/types/WebhookEventEnum.d.ts +1 -0
- package/dist/cjs/api/types/Webhooks.d.ts +2 -2
- package/dist/cjs/api/types/index.d.ts +13 -3
- package/dist/cjs/api/types/index.js +13 -3
- package/dist/cjs/index.d.ts +1 -1
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/wrapper/PinnacleClient.d.ts +9 -0
- package/dist/cjs/wrapper/PinnacleClient.js +17 -0
- package/dist/cjs/wrapper/messages/Client.d.ts +13 -0
- package/dist/cjs/wrapper/messages/Client.js +49 -0
- package/dist/cjs/wrapper/tools/Client.d.ts +6 -0
- package/dist/cjs/wrapper/tools/Client.js +12 -0
- package/dist/cjs/wrapper/tools/FileUploader.d.ts +15 -0
- package/dist/cjs/wrapper/tools/FileUploader.js +162 -0
- package/dist/esm/Client.d.mts +5 -2
- package/dist/esm/Client.mjs +8 -3
- package/dist/esm/api/errors/NotFoundError.d.mts +1 -2
- package/dist/esm/api/resources/brands/client/Client.d.mts +19 -17
- package/dist/esm/api/resources/brands/client/Client.mjs +25 -19
- package/dist/esm/api/resources/brands/client/requests/BrandsGetRequest.d.mts +1 -1
- package/dist/esm/api/resources/brands/client/requests/UpsertBrandParams.d.mts +9 -6
- package/dist/esm/api/resources/campaigns/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/campaigns/client/Client.mjs +1 -1
- package/dist/esm/api/resources/campaigns/resources/dlc/client/Client.d.mts +21 -20
- package/dist/esm/api/resources/campaigns/resources/dlc/client/Client.mjs +17 -16
- package/dist/esm/api/resources/campaigns/resources/dlc/client/requests/UpsertDlcCampaignParams.d.mts +8 -8
- package/dist/esm/api/resources/campaigns/resources/rcs/client/Client.d.mts +16 -13
- package/dist/esm/api/resources/campaigns/resources/rcs/client/Client.mjs +14 -9
- package/dist/esm/api/resources/campaigns/resources/rcs/client/requests/UpsertRcsCampaignParams.d.mts +9 -7
- package/dist/esm/api/resources/campaigns/resources/rcs/types/RcsAutofillResponse.d.mts +1 -1
- package/dist/esm/api/resources/campaigns/resources/tollFree/client/Client.d.mts +15 -15
- package/dist/esm/api/resources/campaigns/resources/tollFree/client/Client.mjs +11 -11
- package/dist/esm/api/resources/campaigns/resources/tollFree/client/requests/UpsertTollFreeCampaignParams.d.mts +7 -7
- package/dist/esm/api/resources/campaigns/resources/tollFree/types/TollFreeAutofillResponse.d.mts +1 -1
- package/dist/esm/api/resources/contacts/client/Client.d.mts +7 -5
- package/dist/esm/api/resources/contacts/client/Client.mjs +11 -9
- package/dist/esm/api/resources/contacts/client/requests/ContactsGetRequest.d.mts +5 -3
- package/dist/esm/api/resources/contacts/client/requests/UpdateContactParams.d.mts +3 -3
- package/dist/esm/api/resources/conversations/client/Client.d.mts +25 -8
- package/dist/esm/api/resources/conversations/client/Client.mjs +101 -9
- package/dist/esm/api/resources/conversations/client/requests/ConversationsListMessagesRequest.d.mts +36 -0
- package/dist/esm/api/resources/conversations/client/requests/ListConversationsParams.d.mts +11 -6
- package/dist/esm/api/resources/conversations/client/requests/UpdateConversationParams.d.mts +3 -3
- package/dist/esm/api/resources/conversations/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/conversations/index.d.mts +1 -0
- package/dist/esm/api/resources/conversations/index.mjs +1 -0
- package/dist/esm/api/resources/conversations/types/ConversationsListMessagesRequestDirection.d.mts +8 -0
- package/dist/esm/api/resources/conversations/types/ConversationsListMessagesRequestDirection.mjs +7 -0
- package/dist/esm/api/resources/conversations/types/ConversationsListMessagesRequestSortOrder.d.mts +8 -0
- package/dist/esm/api/resources/conversations/types/ConversationsListMessagesRequestSortOrder.mjs +7 -0
- package/dist/esm/api/resources/conversations/types/ConversationsListMessagesRequestStatus.d.mts +13 -0
- package/dist/esm/api/resources/conversations/types/ConversationsListMessagesRequestStatus.mjs +12 -0
- package/dist/esm/api/resources/conversations/types/ConversationsListMessagesRequestType.d.mts +9 -0
- package/dist/esm/api/resources/conversations/types/ConversationsListMessagesRequestType.mjs +8 -0
- package/dist/esm/api/resources/conversations/types/index.d.mts +4 -0
- package/dist/esm/api/resources/conversations/types/index.mjs +4 -0
- package/dist/esm/api/resources/index.d.mts +4 -1
- package/dist/esm/api/resources/index.mjs +4 -1
- package/dist/esm/api/resources/messages/client/Client.d.mts +10 -7
- package/dist/esm/api/resources/messages/client/Client.mjs +13 -4
- package/dist/esm/api/resources/messages/client/requests/ReactMessageParams.d.mts +4 -4
- package/dist/esm/api/resources/messages/resources/mms/client/Client.d.mts +4 -3
- package/dist/esm/api/resources/messages/resources/mms/client/Client.mjs +4 -1
- package/dist/esm/api/resources/messages/resources/rcs/client/Client.d.mts +6 -5
- package/dist/esm/api/resources/messages/resources/rcs/client/Client.mjs +5 -2
- package/dist/esm/api/resources/messages/resources/sms/client/Client.d.mts +4 -3
- package/dist/esm/api/resources/messages/resources/sms/client/Client.mjs +4 -1
- package/dist/esm/api/resources/phoneNumbers/client/Client.d.mts +3 -3
- package/dist/esm/api/resources/phoneNumbers/client/Client.mjs +1 -1
- package/dist/esm/api/resources/phoneNumbers/resources/campaign/client/Client.d.mts +7 -5
- package/dist/esm/api/resources/phoneNumbers/resources/campaign/client/Client.mjs +9 -3
- package/dist/esm/api/resources/phoneNumbers/resources/campaign/client/requests/AttachCampaignParams.d.mts +12 -3
- package/dist/esm/api/resources/phoneNumbers/resources/webhook/client/Client.d.mts +11 -9
- package/dist/esm/api/resources/phoneNumbers/resources/webhook/client/Client.mjs +10 -6
- package/dist/esm/api/resources/rcs/client/Client.d.mts +121 -0
- package/dist/esm/api/resources/rcs/client/Client.mjs +283 -0
- package/dist/esm/api/resources/rcs/client/index.d.mts +2 -0
- package/dist/esm/api/resources/rcs/client/index.mjs +1 -0
- package/dist/esm/api/resources/rcs/client/requests/RcsCapabilitiesQuery.d.mts +13 -0
- package/dist/esm/api/resources/rcs/client/requests/RcsLinkRequest.d.mts +22 -0
- package/dist/esm/api/resources/rcs/client/requests/RcsWhitelistRequest.d.mts +16 -0
- package/dist/esm/api/resources/rcs/client/requests/RcsWhitelistRequest.mjs +4 -0
- package/dist/esm/api/resources/rcs/client/requests/index.d.mts +3 -0
- package/dist/esm/api/resources/rcs/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/rcs/index.d.mts +1 -0
- package/dist/esm/api/resources/rcs/index.mjs +1 -0
- package/dist/esm/api/resources/status/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/status/client/Client.mjs +1 -1
- package/dist/esm/api/resources/status/resources/get/client/Client.d.mts +16 -16
- package/dist/esm/api/resources/status/resources/get/client/Client.mjs +10 -10
- package/dist/esm/api/resources/tools/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/tools/client/Client.mjs +1 -1
- package/dist/esm/api/resources/tools/resources/contactCard/client/Client.d.mts +7 -7
- package/dist/esm/api/resources/tools/resources/contactCard/client/Client.mjs +5 -5
- package/dist/esm/api/resources/tools/resources/contactCard/client/requests/GetVcardParams.d.mts +3 -3
- package/dist/esm/api/resources/tools/resources/contactCard/client/requests/UpsertVcardParams.d.mts +1 -1
- package/dist/esm/api/resources/tools/resources/file/client/Client.d.mts +24 -3
- package/dist/esm/api/resources/tools/resources/file/client/Client.mjs +75 -1
- package/dist/esm/api/resources/tools/resources/file/client/requests/RefreshFileParams.d.mts +13 -0
- package/dist/esm/api/resources/tools/resources/file/client/requests/RefreshFileParams.mjs +4 -0
- package/dist/esm/api/resources/tools/resources/file/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/tools/resources/url/client/Client.d.mts +4 -4
- package/dist/esm/api/resources/tools/resources/url/client/Client.mjs +2 -2
- package/dist/esm/api/resources/webhooks/client/Client.d.mts +3 -3
- package/dist/esm/api/resources/webhooks/client/Client.mjs +1 -1
- package/dist/esm/api/types/AdvancedPhoneInformation.d.mts +9 -9
- package/dist/esm/api/types/AttachWebhookParams.d.mts +3 -3
- package/dist/esm/api/types/AttachedPhoneNumberResult.d.mts +2 -2
- package/dist/esm/api/types/AutofillCampaignParams.d.mts +7 -2
- package/dist/esm/api/types/AutofillDlcCampaignResponse.d.mts +15 -15
- package/dist/esm/api/types/BrandStatus.d.mts +2 -2
- package/dist/esm/api/types/ButtonClicked.d.mts +11 -0
- package/dist/esm/api/types/ButtonClicked.mjs +4 -0
- package/dist/esm/api/types/ButtonClickedData.d.mts +58 -0
- package/dist/esm/api/types/ButtonClickedData.mjs +13 -0
- package/dist/esm/api/types/CampaignQuery.d.mts +6 -1
- package/dist/esm/api/types/ConfiguredWebhook.d.mts +2 -2
- package/dist/esm/api/types/Contact.d.mts +2 -2
- package/dist/esm/api/types/ContactId.d.mts +2 -2
- package/dist/esm/api/types/Conversation.d.mts +9 -9
- package/dist/esm/api/types/CreateUrlOptions.d.mts +1 -1
- package/dist/esm/api/types/DetachedPhoneNumberResult.d.mts +2 -2
- package/dist/esm/api/types/DetachedWebhookInfo.d.mts +2 -2
- package/dist/esm/api/types/DlcCampaignStatus.d.mts +4 -4
- package/dist/esm/api/types/DlcCampaignWithExtendedBrandAndStatus.d.mts +15 -12
- package/dist/esm/api/types/EnhancedContactItem.d.mts +1 -1
- package/dist/esm/api/types/ExtendedBrand.d.mts +14 -7
- package/dist/esm/api/types/ExtendedBrandWithVetting.d.mts +2 -2
- package/dist/esm/api/types/ExtendedRcsCampaign.d.mts +14 -13
- package/dist/esm/api/types/GetConversationParams.d.mts +1 -1
- package/dist/esm/api/types/LinkClickEvent.d.mts +0 -4
- package/dist/esm/api/types/Message.d.mts +6 -6
- package/dist/esm/api/types/MessageContent.d.mts +2 -2
- package/dist/esm/api/types/MessageEvent.d.mts +62 -0
- package/dist/esm/api/types/MessageEvent.mjs +10 -0
- package/dist/esm/api/types/MessageList.d.mts +15 -0
- package/dist/esm/api/types/MessageList.mjs +4 -0
- package/dist/esm/api/types/MessageWithReaction.d.mts +27 -0
- package/dist/esm/api/types/MessageWithReaction.mjs +10 -0
- package/dist/esm/api/types/NotFoundErrorBody.d.mts +6 -0
- package/dist/esm/api/types/NotFoundErrorBody.mjs +4 -0
- package/dist/esm/api/types/ProfileStatusEnum.d.mts +7 -4
- package/dist/esm/api/types/RcsBase.d.mts +2 -0
- package/dist/esm/api/types/RcsButtonCall.d.mts +2 -0
- package/dist/esm/api/types/RcsButtonOpenUrl.d.mts +2 -0
- package/dist/esm/api/types/RcsButtonRequestUserLocation.d.mts +2 -0
- package/dist/esm/api/types/RcsButtonScheduleEvent.d.mts +2 -0
- package/dist/esm/api/types/RcsButtonSendLocation.d.mts +2 -0
- package/dist/esm/api/types/RcsButtonTrigger.d.mts +2 -2
- package/dist/esm/api/types/RcsCampaign.d.mts +5 -5
- package/dist/esm/api/types/RcsCampaignStatus.d.mts +2 -2
- package/dist/esm/api/types/RcsCapabilitiesResult.d.mts +8 -0
- package/dist/esm/api/types/RcsCapabilitiesResult.mjs +4 -0
- package/dist/esm/api/types/RcsCapability.d.mts +36 -0
- package/dist/esm/api/types/RcsCapability.mjs +4 -0
- package/dist/esm/api/types/RcsLinkResult.d.mts +13 -0
- package/dist/esm/api/types/RcsLinkResult.mjs +4 -0
- package/dist/esm/api/types/RcsValidateContent.d.mts +1 -0
- package/dist/esm/api/types/RcsWhitelistResponse.d.mts +10 -0
- package/dist/esm/api/types/RcsWhitelistResponse.mjs +4 -0
- package/dist/esm/api/types/ReactionResult.d.mts +4 -4
- package/dist/esm/api/types/RefreshedFile.d.mts +9 -0
- package/dist/esm/api/types/RefreshedFile.mjs +4 -0
- package/dist/esm/api/types/{Rcs.d.mts → RichMessage.d.mts} +1 -1
- package/dist/esm/api/types/RichMessage.mjs +4 -0
- package/dist/esm/api/types/ScheduledMessaage.d.mts +2 -2
- package/dist/esm/api/types/SentMmsDetails.d.mts +2 -2
- package/dist/esm/api/types/SentRcsDetails.d.mts +2 -2
- package/dist/esm/api/types/SentSmsDetails.d.mts +2 -2
- package/dist/esm/api/types/ShortenedUrl.d.mts +1 -1
- package/dist/esm/api/types/TollFreeCampaign.d.mts +2 -2
- package/dist/esm/api/types/TollFreeCampaignStatus.d.mts +2 -2
- package/dist/esm/api/types/TollFreeCampaignWithExtendedBrandAndStatus.d.mts +0 -1
- package/dist/esm/api/types/UpdatedContactId.d.mts +2 -2
- package/dist/esm/api/types/UploadResults.d.mts +1 -1
- package/dist/esm/api/types/UserEvent.d.mts +27 -0
- package/dist/esm/api/types/UserEvent.mjs +4 -0
- package/dist/esm/api/types/VCardData.d.mts +1 -1
- package/dist/esm/api/types/ValidateCampaignParams.d.mts +7 -2
- package/dist/esm/api/types/Vcard.d.mts +2 -2
- package/dist/esm/api/types/VcardResource.d.mts +2 -2
- package/dist/esm/api/types/WebhookEventEnum.d.mts +1 -0
- package/dist/esm/api/types/Webhooks.d.mts +2 -2
- package/dist/esm/api/types/index.d.mts +13 -3
- package/dist/esm/api/types/index.mjs +13 -3
- package/dist/esm/index.d.mts +1 -1
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/dist/esm/wrapper/PinnacleClient.d.mts +9 -0
- package/dist/esm/wrapper/PinnacleClient.mjs +13 -0
- package/dist/esm/wrapper/messages/Client.d.mts +13 -0
- package/dist/esm/wrapper/messages/Client.mjs +45 -0
- package/dist/esm/wrapper/tools/Client.d.mts +6 -0
- package/dist/esm/wrapper/tools/Client.mjs +8 -0
- package/dist/esm/wrapper/tools/FileUploader.d.mts +15 -0
- package/dist/esm/wrapper/tools/FileUploader.mjs +125 -0
- package/package.json +7 -3
- package/reference.md +459 -76
- package/dist/cjs/api/types/ClickAction.d.ts +0 -28
- package/dist/cjs/api/types/InboundButton.d.ts +0 -11
- package/dist/esm/api/types/ClickAction.d.mts +0 -28
- package/dist/esm/api/types/InboundButton.d.mts +0 -11
- /package/dist/cjs/api/{types/ClickAction.js → resources/conversations/client/requests/ConversationsListMessagesRequest.js} +0 -0
- /package/dist/cjs/api/{types/InboundButton.js → resources/rcs/client/requests/RcsCapabilitiesQuery.js} +0 -0
- /package/dist/cjs/api/{types/Rcs.js → resources/rcs/client/requests/RcsLinkRequest.js} +0 -0
- /package/dist/esm/api/{types/ClickAction.mjs → resources/conversations/client/requests/ConversationsListMessagesRequest.mjs} +0 -0
- /package/dist/esm/api/{types/InboundButton.mjs → resources/rcs/client/requests/RcsCapabilitiesQuery.mjs} +0 -0
- /package/dist/esm/api/{types/Rcs.mjs → resources/rcs/client/requests/RcsLinkRequest.mjs} +0 -0
|
@@ -12,7 +12,7 @@ export declare namespace Messages {
|
|
|
12
12
|
environment?: core.Supplier<environments.PinnacleEnvironment | string>;
|
|
13
13
|
/** Specify a custom URL to connect the client to. */
|
|
14
14
|
baseUrl?: core.Supplier<string>;
|
|
15
|
-
apiKey
|
|
15
|
+
apiKey?: core.Supplier<string | undefined>;
|
|
16
16
|
/** Additional headers to include in requests. */
|
|
17
17
|
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
18
18
|
}
|
|
@@ -34,14 +34,14 @@ export declare class Messages {
|
|
|
34
34
|
protected _sms: Sms | undefined;
|
|
35
35
|
protected _mms: Mms | undefined;
|
|
36
36
|
protected _rcs: Rcs | undefined;
|
|
37
|
-
constructor(_options
|
|
37
|
+
constructor(_options?: Messages.Options);
|
|
38
38
|
get sms(): Sms;
|
|
39
39
|
get mms(): Mms;
|
|
40
40
|
get rcs(): Rcs;
|
|
41
41
|
/**
|
|
42
42
|
* Retrieve a previously sent message.
|
|
43
43
|
*
|
|
44
|
-
* @param {
|
|
44
|
+
* @param {string} id - Unique identifier of the message. This identifier is a string that always begins with the prefix `msg_`, for example: `msg_1234567890`.
|
|
45
45
|
* @param {Messages.RequestOptions} requestOptions - Request-specific configuration.
|
|
46
46
|
*
|
|
47
47
|
* @throws {@link Pinnacle.BadRequestError}
|
|
@@ -50,9 +50,9 @@ export declare class Messages {
|
|
|
50
50
|
* @throws {@link Pinnacle.InternalServerError}
|
|
51
51
|
*
|
|
52
52
|
* @example
|
|
53
|
-
* await client.messages.get(
|
|
53
|
+
* await client.messages.get("msg_1234567890")
|
|
54
54
|
*/
|
|
55
|
-
get(id:
|
|
55
|
+
get(id: string, requestOptions?: Messages.RequestOptions): core.HttpResponsePromise<Pinnacle.Message>;
|
|
56
56
|
private __get;
|
|
57
57
|
/**
|
|
58
58
|
* Add or remove an emoji reaction to a previously sent message.
|
|
@@ -62,11 +62,14 @@ export declare class Messages {
|
|
|
62
62
|
*
|
|
63
63
|
* @throws {@link Pinnacle.BadRequestError}
|
|
64
64
|
* @throws {@link Pinnacle.UnauthorizedError}
|
|
65
|
+
* @throws {@link Pinnacle.PaymentRequiredError}
|
|
65
66
|
* @throws {@link Pinnacle.NotFoundError}
|
|
67
|
+
* @throws {@link Pinnacle.InternalServerError}
|
|
68
|
+
* @throws {@link Pinnacle.NotImplementedError}
|
|
66
69
|
*
|
|
67
70
|
* @example
|
|
68
71
|
* await client.messages.react({
|
|
69
|
-
* messageId:
|
|
72
|
+
* messageId: "msg_1234567890",
|
|
70
73
|
* options: {
|
|
71
74
|
* force: true
|
|
72
75
|
* },
|
|
@@ -76,6 +79,6 @@ export declare class Messages {
|
|
|
76
79
|
react(request: Pinnacle.ReactMessageParams, requestOptions?: Messages.RequestOptions): core.HttpResponsePromise<Pinnacle.ReactionResult>;
|
|
77
80
|
private __react;
|
|
78
81
|
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
79
|
-
"PINNACLE-API-KEY": string;
|
|
82
|
+
"PINNACLE-API-KEY": string | undefined;
|
|
80
83
|
}>;
|
|
81
84
|
}
|
|
@@ -55,7 +55,7 @@ const Client_js_1 = require("../resources/sms/client/Client.js");
|
|
|
55
55
|
const Client_js_2 = require("../resources/mms/client/Client.js");
|
|
56
56
|
const Client_js_3 = require("../resources/rcs/client/Client.js");
|
|
57
57
|
class Messages {
|
|
58
|
-
constructor(_options) {
|
|
58
|
+
constructor(_options = {}) {
|
|
59
59
|
this._options = _options;
|
|
60
60
|
}
|
|
61
61
|
get sms() {
|
|
@@ -73,7 +73,7 @@ class Messages {
|
|
|
73
73
|
/**
|
|
74
74
|
* Retrieve a previously sent message.
|
|
75
75
|
*
|
|
76
|
-
* @param {
|
|
76
|
+
* @param {string} id - Unique identifier of the message. This identifier is a string that always begins with the prefix `msg_`, for example: `msg_1234567890`.
|
|
77
77
|
* @param {Messages.RequestOptions} requestOptions - Request-specific configuration.
|
|
78
78
|
*
|
|
79
79
|
* @throws {@link Pinnacle.BadRequestError}
|
|
@@ -82,7 +82,7 @@ class Messages {
|
|
|
82
82
|
* @throws {@link Pinnacle.InternalServerError}
|
|
83
83
|
*
|
|
84
84
|
* @example
|
|
85
|
-
* await client.messages.get(
|
|
85
|
+
* await client.messages.get("msg_1234567890")
|
|
86
86
|
*/
|
|
87
87
|
get(id, requestOptions) {
|
|
88
88
|
return core.HttpResponsePromise.fromPromise(this.__get(id, requestOptions));
|
|
@@ -146,11 +146,14 @@ class Messages {
|
|
|
146
146
|
*
|
|
147
147
|
* @throws {@link Pinnacle.BadRequestError}
|
|
148
148
|
* @throws {@link Pinnacle.UnauthorizedError}
|
|
149
|
+
* @throws {@link Pinnacle.PaymentRequiredError}
|
|
149
150
|
* @throws {@link Pinnacle.NotFoundError}
|
|
151
|
+
* @throws {@link Pinnacle.InternalServerError}
|
|
152
|
+
* @throws {@link Pinnacle.NotImplementedError}
|
|
150
153
|
*
|
|
151
154
|
* @example
|
|
152
155
|
* await client.messages.react({
|
|
153
|
-
* messageId:
|
|
156
|
+
* messageId: "msg_1234567890",
|
|
154
157
|
* options: {
|
|
155
158
|
* force: true
|
|
156
159
|
* },
|
|
@@ -185,8 +188,14 @@ class Messages {
|
|
|
185
188
|
throw new Pinnacle.BadRequestError(_response.error.body, _response.rawResponse);
|
|
186
189
|
case 401:
|
|
187
190
|
throw new Pinnacle.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
191
|
+
case 402:
|
|
192
|
+
throw new Pinnacle.PaymentRequiredError(_response.error.body, _response.rawResponse);
|
|
188
193
|
case 404:
|
|
189
194
|
throw new Pinnacle.NotFoundError(_response.error.body, _response.rawResponse);
|
|
195
|
+
case 500:
|
|
196
|
+
throw new Pinnacle.InternalServerError(_response.error.body, _response.rawResponse);
|
|
197
|
+
case 501:
|
|
198
|
+
throw new Pinnacle.NotImplementedError(_response.error.body, _response.rawResponse);
|
|
190
199
|
default:
|
|
191
200
|
throw new errors.PinnacleError({
|
|
192
201
|
statusCode: _response.error.statusCode,
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
/**
|
|
5
5
|
* @example
|
|
6
6
|
* {
|
|
7
|
-
* messageId:
|
|
7
|
+
* messageId: "msg_1234567890",
|
|
8
8
|
* options: {
|
|
9
9
|
* force: true
|
|
10
10
|
* },
|
|
@@ -12,15 +12,15 @@
|
|
|
12
12
|
* }
|
|
13
13
|
*/
|
|
14
14
|
export interface ReactMessageParams {
|
|
15
|
-
/** Unique identifier of the message. */
|
|
16
|
-
messageId:
|
|
15
|
+
/** Unique identifier of the message. This identifier is a string that always begins with the prefix `msg_`, for example: `msg_1234567890`. */
|
|
16
|
+
messageId: string;
|
|
17
17
|
options?: ReactMessageParams.Options;
|
|
18
18
|
/**
|
|
19
19
|
* Unicode emoji to add. <br>
|
|
20
20
|
*
|
|
21
21
|
* Use `null` to remove existing reaction.
|
|
22
22
|
*/
|
|
23
|
-
reaction
|
|
23
|
+
reaction: string | null;
|
|
24
24
|
}
|
|
25
25
|
export declare namespace ReactMessageParams {
|
|
26
26
|
interface Options {
|
|
@@ -9,7 +9,7 @@ export declare namespace Mms {
|
|
|
9
9
|
environment?: core.Supplier<environments.PinnacleEnvironment | string>;
|
|
10
10
|
/** Specify a custom URL to connect the client to. */
|
|
11
11
|
baseUrl?: core.Supplier<string>;
|
|
12
|
-
apiKey
|
|
12
|
+
apiKey?: core.Supplier<string | undefined>;
|
|
13
13
|
/** Additional headers to include in requests. */
|
|
14
14
|
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
15
15
|
}
|
|
@@ -28,7 +28,7 @@ export declare namespace Mms {
|
|
|
28
28
|
}
|
|
29
29
|
export declare class Mms {
|
|
30
30
|
protected readonly _options: Mms.Options;
|
|
31
|
-
constructor(_options
|
|
31
|
+
constructor(_options?: Mms.Options);
|
|
32
32
|
/**
|
|
33
33
|
* Send a MMS immediately or schedule it for future delivery.
|
|
34
34
|
*
|
|
@@ -40,6 +40,7 @@ export declare class Mms {
|
|
|
40
40
|
* @throws {@link Pinnacle.PaymentRequiredError}
|
|
41
41
|
* @throws {@link Pinnacle.NotFoundError}
|
|
42
42
|
* @throws {@link Pinnacle.InternalServerError}
|
|
43
|
+
* @throws {@link Pinnacle.NotImplementedError}
|
|
43
44
|
*
|
|
44
45
|
* @example
|
|
45
46
|
* await client.messages.mms.send({
|
|
@@ -74,6 +75,6 @@ export declare class Mms {
|
|
|
74
75
|
validate(request: Pinnacle.MmsContent, requestOptions?: Mms.RequestOptions): core.HttpResponsePromise<Pinnacle.MmsValidationResult>;
|
|
75
76
|
private __validate;
|
|
76
77
|
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
77
|
-
"PINNACLE-API-KEY": string;
|
|
78
|
+
"PINNACLE-API-KEY": string | undefined;
|
|
78
79
|
}>;
|
|
79
80
|
}
|
|
@@ -52,7 +52,7 @@ const Pinnacle = __importStar(require("../../../../../index.js"));
|
|
|
52
52
|
const headers_js_1 = require("../../../../../../core/headers.js");
|
|
53
53
|
const errors = __importStar(require("../../../../../../errors/index.js"));
|
|
54
54
|
class Mms {
|
|
55
|
-
constructor(_options) {
|
|
55
|
+
constructor(_options = {}) {
|
|
56
56
|
this._options = _options;
|
|
57
57
|
}
|
|
58
58
|
/**
|
|
@@ -66,6 +66,7 @@ class Mms {
|
|
|
66
66
|
* @throws {@link Pinnacle.PaymentRequiredError}
|
|
67
67
|
* @throws {@link Pinnacle.NotFoundError}
|
|
68
68
|
* @throws {@link Pinnacle.InternalServerError}
|
|
69
|
+
* @throws {@link Pinnacle.NotImplementedError}
|
|
69
70
|
*
|
|
70
71
|
* @example
|
|
71
72
|
* await client.messages.mms.send({
|
|
@@ -113,6 +114,8 @@ class Mms {
|
|
|
113
114
|
throw new Pinnacle.NotFoundError(_response.error.body, _response.rawResponse);
|
|
114
115
|
case 500:
|
|
115
116
|
throw new Pinnacle.InternalServerError(_response.error.body, _response.rawResponse);
|
|
117
|
+
case 501:
|
|
118
|
+
throw new Pinnacle.NotImplementedError(_response.error.body, _response.rawResponse);
|
|
116
119
|
default:
|
|
117
120
|
throw new errors.PinnacleError({
|
|
118
121
|
statusCode: _response.error.statusCode,
|
|
@@ -9,7 +9,7 @@ export declare namespace Rcs {
|
|
|
9
9
|
environment?: core.Supplier<environments.PinnacleEnvironment | string>;
|
|
10
10
|
/** Specify a custom URL to connect the client to. */
|
|
11
11
|
baseUrl?: core.Supplier<string>;
|
|
12
|
-
apiKey
|
|
12
|
+
apiKey?: core.Supplier<string | undefined>;
|
|
13
13
|
/** Additional headers to include in requests. */
|
|
14
14
|
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
15
15
|
}
|
|
@@ -28,13 +28,13 @@ export declare namespace Rcs {
|
|
|
28
28
|
}
|
|
29
29
|
export declare class Rcs {
|
|
30
30
|
protected readonly _options: Rcs.Options;
|
|
31
|
-
constructor(_options
|
|
31
|
+
constructor(_options?: Rcs.Options);
|
|
32
32
|
/**
|
|
33
33
|
* Send a RCS message immediately or schedule it for future delivery. <br>
|
|
34
34
|
*
|
|
35
35
|
* Requires an active RCS agent and recipient devices that support RCS Business Messaging.
|
|
36
36
|
*
|
|
37
|
-
* @param {Pinnacle.
|
|
37
|
+
* @param {Pinnacle.RichMessage} request
|
|
38
38
|
* @param {Rcs.RequestOptions} requestOptions - Request-specific configuration.
|
|
39
39
|
*
|
|
40
40
|
* @throws {@link Pinnacle.BadRequestError}
|
|
@@ -42,6 +42,7 @@ export declare class Rcs {
|
|
|
42
42
|
* @throws {@link Pinnacle.PaymentRequiredError}
|
|
43
43
|
* @throws {@link Pinnacle.NotFoundError}
|
|
44
44
|
* @throws {@link Pinnacle.InternalServerError}
|
|
45
|
+
* @throws {@link Pinnacle.NotImplementedError}
|
|
45
46
|
*
|
|
46
47
|
* @example
|
|
47
48
|
* await client.messages.rcs.send({
|
|
@@ -55,7 +56,7 @@ export declare class Rcs {
|
|
|
55
56
|
* to: "to"
|
|
56
57
|
* })
|
|
57
58
|
*/
|
|
58
|
-
send(request: Pinnacle.
|
|
59
|
+
send(request: Pinnacle.RichMessage, requestOptions?: Rcs.RequestOptions): core.HttpResponsePromise<Pinnacle.messages.RcsSendResponse>;
|
|
59
60
|
private __send;
|
|
60
61
|
/**
|
|
61
62
|
* Validate RCS message content without sending it.
|
|
@@ -80,6 +81,6 @@ export declare class Rcs {
|
|
|
80
81
|
validate(request: Pinnacle.RcsValidateContent, requestOptions?: Rcs.RequestOptions): core.HttpResponsePromise<Pinnacle.RcsValidationResult>;
|
|
81
82
|
private __validate;
|
|
82
83
|
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
83
|
-
"PINNACLE-API-KEY": string;
|
|
84
|
+
"PINNACLE-API-KEY": string | undefined;
|
|
84
85
|
}>;
|
|
85
86
|
}
|
|
@@ -52,7 +52,7 @@ const Pinnacle = __importStar(require("../../../../../index.js"));
|
|
|
52
52
|
const headers_js_1 = require("../../../../../../core/headers.js");
|
|
53
53
|
const errors = __importStar(require("../../../../../../errors/index.js"));
|
|
54
54
|
class Rcs {
|
|
55
|
-
constructor(_options) {
|
|
55
|
+
constructor(_options = {}) {
|
|
56
56
|
this._options = _options;
|
|
57
57
|
}
|
|
58
58
|
/**
|
|
@@ -60,7 +60,7 @@ class Rcs {
|
|
|
60
60
|
*
|
|
61
61
|
* Requires an active RCS agent and recipient devices that support RCS Business Messaging.
|
|
62
62
|
*
|
|
63
|
-
* @param {Pinnacle.
|
|
63
|
+
* @param {Pinnacle.RichMessage} request
|
|
64
64
|
* @param {Rcs.RequestOptions} requestOptions - Request-specific configuration.
|
|
65
65
|
*
|
|
66
66
|
* @throws {@link Pinnacle.BadRequestError}
|
|
@@ -68,6 +68,7 @@ class Rcs {
|
|
|
68
68
|
* @throws {@link Pinnacle.PaymentRequiredError}
|
|
69
69
|
* @throws {@link Pinnacle.NotFoundError}
|
|
70
70
|
* @throws {@link Pinnacle.InternalServerError}
|
|
71
|
+
* @throws {@link Pinnacle.NotImplementedError}
|
|
71
72
|
*
|
|
72
73
|
* @example
|
|
73
74
|
* await client.messages.rcs.send({
|
|
@@ -115,6 +116,8 @@ class Rcs {
|
|
|
115
116
|
throw new Pinnacle.NotFoundError(_response.error.body, _response.rawResponse);
|
|
116
117
|
case 500:
|
|
117
118
|
throw new Pinnacle.InternalServerError(_response.error.body, _response.rawResponse);
|
|
119
|
+
case 501:
|
|
120
|
+
throw new Pinnacle.NotImplementedError(_response.error.body, _response.rawResponse);
|
|
118
121
|
default:
|
|
119
122
|
throw new errors.PinnacleError({
|
|
120
123
|
statusCode: _response.error.statusCode,
|
|
@@ -9,7 +9,7 @@ export declare namespace Sms {
|
|
|
9
9
|
environment?: core.Supplier<environments.PinnacleEnvironment | string>;
|
|
10
10
|
/** Specify a custom URL to connect the client to. */
|
|
11
11
|
baseUrl?: core.Supplier<string>;
|
|
12
|
-
apiKey
|
|
12
|
+
apiKey?: core.Supplier<string | undefined>;
|
|
13
13
|
/** Additional headers to include in requests. */
|
|
14
14
|
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
15
15
|
}
|
|
@@ -28,7 +28,7 @@ export declare namespace Sms {
|
|
|
28
28
|
}
|
|
29
29
|
export declare class Sms {
|
|
30
30
|
protected readonly _options: Sms.Options;
|
|
31
|
-
constructor(_options
|
|
31
|
+
constructor(_options?: Sms.Options);
|
|
32
32
|
/**
|
|
33
33
|
* Send a SMS message immediately or schedule it for future delivery.
|
|
34
34
|
*
|
|
@@ -40,6 +40,7 @@ export declare class Sms {
|
|
|
40
40
|
* @throws {@link Pinnacle.PaymentRequiredError}
|
|
41
41
|
* @throws {@link Pinnacle.NotFoundError}
|
|
42
42
|
* @throws {@link Pinnacle.InternalServerError}
|
|
43
|
+
* @throws {@link Pinnacle.NotImplementedError}
|
|
43
44
|
*
|
|
44
45
|
* @example
|
|
45
46
|
* await client.messages.sms.send({
|
|
@@ -68,6 +69,6 @@ export declare class Sms {
|
|
|
68
69
|
validate(request: Pinnacle.SmsContent, requestOptions?: Sms.RequestOptions): core.HttpResponsePromise<Pinnacle.SmsValidationResult>;
|
|
69
70
|
private __validate;
|
|
70
71
|
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
71
|
-
"PINNACLE-API-KEY": string;
|
|
72
|
+
"PINNACLE-API-KEY": string | undefined;
|
|
72
73
|
}>;
|
|
73
74
|
}
|
|
@@ -52,7 +52,7 @@ const Pinnacle = __importStar(require("../../../../../index.js"));
|
|
|
52
52
|
const headers_js_1 = require("../../../../../../core/headers.js");
|
|
53
53
|
const errors = __importStar(require("../../../../../../errors/index.js"));
|
|
54
54
|
class Sms {
|
|
55
|
-
constructor(_options) {
|
|
55
|
+
constructor(_options = {}) {
|
|
56
56
|
this._options = _options;
|
|
57
57
|
}
|
|
58
58
|
/**
|
|
@@ -66,6 +66,7 @@ class Sms {
|
|
|
66
66
|
* @throws {@link Pinnacle.PaymentRequiredError}
|
|
67
67
|
* @throws {@link Pinnacle.NotFoundError}
|
|
68
68
|
* @throws {@link Pinnacle.InternalServerError}
|
|
69
|
+
* @throws {@link Pinnacle.NotImplementedError}
|
|
69
70
|
*
|
|
70
71
|
* @example
|
|
71
72
|
* await client.messages.sms.send({
|
|
@@ -108,6 +109,8 @@ class Sms {
|
|
|
108
109
|
throw new Pinnacle.NotFoundError(_response.error.body, _response.rawResponse);
|
|
109
110
|
case 500:
|
|
110
111
|
throw new Pinnacle.InternalServerError(_response.error.body, _response.rawResponse);
|
|
112
|
+
case 501:
|
|
113
|
+
throw new Pinnacle.NotImplementedError(_response.error.body, _response.rawResponse);
|
|
111
114
|
default:
|
|
112
115
|
throw new errors.PinnacleError({
|
|
113
116
|
statusCode: _response.error.statusCode,
|
|
@@ -11,7 +11,7 @@ export declare namespace PhoneNumbers {
|
|
|
11
11
|
environment?: core.Supplier<environments.PinnacleEnvironment | string>;
|
|
12
12
|
/** Specify a custom URL to connect the client to. */
|
|
13
13
|
baseUrl?: core.Supplier<string>;
|
|
14
|
-
apiKey
|
|
14
|
+
apiKey?: core.Supplier<string | undefined>;
|
|
15
15
|
/** Additional headers to include in requests. */
|
|
16
16
|
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
17
17
|
}
|
|
@@ -32,7 +32,7 @@ export declare class PhoneNumbers {
|
|
|
32
32
|
protected readonly _options: PhoneNumbers.Options;
|
|
33
33
|
protected _webhook: Webhook | undefined;
|
|
34
34
|
protected _campaign: Campaign | undefined;
|
|
35
|
-
constructor(_options
|
|
35
|
+
constructor(_options?: PhoneNumbers.Options);
|
|
36
36
|
get webhook(): Webhook;
|
|
37
37
|
get campaign(): Campaign;
|
|
38
38
|
/**
|
|
@@ -112,6 +112,6 @@ export declare class PhoneNumbers {
|
|
|
112
112
|
get(request: Pinnacle.RetrievePhoneNumberDetailsParams, requestOptions?: PhoneNumbers.RequestOptions): core.HttpResponsePromise<Pinnacle.PhoneNumbersGetResponse>;
|
|
113
113
|
private __get;
|
|
114
114
|
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
115
|
-
"PINNACLE-API-KEY": string;
|
|
115
|
+
"PINNACLE-API-KEY": string | undefined;
|
|
116
116
|
}>;
|
|
117
117
|
}
|
|
@@ -54,7 +54,7 @@ const errors = __importStar(require("../../../../errors/index.js"));
|
|
|
54
54
|
const Client_js_1 = require("../resources/webhook/client/Client.js");
|
|
55
55
|
const Client_js_2 = require("../resources/campaign/client/Client.js");
|
|
56
56
|
class PhoneNumbers {
|
|
57
|
-
constructor(_options) {
|
|
57
|
+
constructor(_options = {}) {
|
|
58
58
|
this._options = _options;
|
|
59
59
|
}
|
|
60
60
|
get webhook() {
|
|
@@ -9,7 +9,7 @@ export declare namespace Campaign {
|
|
|
9
9
|
environment?: core.Supplier<environments.PinnacleEnvironment | string>;
|
|
10
10
|
/** Specify a custom URL to connect the client to. */
|
|
11
11
|
baseUrl?: core.Supplier<string>;
|
|
12
|
-
apiKey
|
|
12
|
+
apiKey?: core.Supplier<string | undefined>;
|
|
13
13
|
/** Additional headers to include in requests. */
|
|
14
14
|
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
15
15
|
}
|
|
@@ -28,9 +28,9 @@ export declare namespace Campaign {
|
|
|
28
28
|
}
|
|
29
29
|
export declare class Campaign {
|
|
30
30
|
protected readonly _options: Campaign.Options;
|
|
31
|
-
constructor(_options
|
|
31
|
+
constructor(_options?: Campaign.Options);
|
|
32
32
|
/**
|
|
33
|
-
* Link a phone number to a specific campaign.
|
|
33
|
+
* Link a phone number to a specific campaign. Phone numbers must be linked to a campaign to send messages.
|
|
34
34
|
*
|
|
35
35
|
* @param {Pinnacle.phoneNumbers.AttachCampaignParams} request
|
|
36
36
|
* @param {Campaign.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -39,12 +39,13 @@ export declare class Campaign {
|
|
|
39
39
|
* @throws {@link Pinnacle.UnauthorizedError}
|
|
40
40
|
* @throws {@link Pinnacle.NotFoundError}
|
|
41
41
|
* @throws {@link Pinnacle.InternalServerError}
|
|
42
|
+
* @throws {@link Pinnacle.NotImplementedError}
|
|
42
43
|
*
|
|
43
44
|
* @example
|
|
44
45
|
* await client.phoneNumbers.campaign.attach({
|
|
45
46
|
* phones: ["+14155550123", "+14155559876", "+14155550111"],
|
|
46
47
|
* campaignType: "TOLL_FREE",
|
|
47
|
-
* campaignId:
|
|
48
|
+
* campaignId: "tf_1234567890"
|
|
48
49
|
* })
|
|
49
50
|
*/
|
|
50
51
|
attach(request: Pinnacle.phoneNumbers.AttachCampaignParams, requestOptions?: Campaign.RequestOptions): core.HttpResponsePromise<Pinnacle.AttachedPhoneNumberResult>;
|
|
@@ -59,6 +60,7 @@ export declare class Campaign {
|
|
|
59
60
|
* @throws {@link Pinnacle.UnauthorizedError}
|
|
60
61
|
* @throws {@link Pinnacle.NotFoundError}
|
|
61
62
|
* @throws {@link Pinnacle.InternalServerError}
|
|
63
|
+
* @throws {@link Pinnacle.NotImplementedError}
|
|
62
64
|
*
|
|
63
65
|
* @example
|
|
64
66
|
* await client.phoneNumbers.campaign.detach({
|
|
@@ -68,6 +70,6 @@ export declare class Campaign {
|
|
|
68
70
|
detach(request: Pinnacle.phoneNumbers.DetachCampaignParams, requestOptions?: Campaign.RequestOptions): core.HttpResponsePromise<Pinnacle.DetachedPhoneNumberResult>;
|
|
69
71
|
private __detach;
|
|
70
72
|
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
71
|
-
"PINNACLE-API-KEY": string;
|
|
73
|
+
"PINNACLE-API-KEY": string | undefined;
|
|
72
74
|
}>;
|
|
73
75
|
}
|
|
@@ -52,11 +52,11 @@ const Pinnacle = __importStar(require("../../../../../index.js"));
|
|
|
52
52
|
const headers_js_1 = require("../../../../../../core/headers.js");
|
|
53
53
|
const errors = __importStar(require("../../../../../../errors/index.js"));
|
|
54
54
|
class Campaign {
|
|
55
|
-
constructor(_options) {
|
|
55
|
+
constructor(_options = {}) {
|
|
56
56
|
this._options = _options;
|
|
57
57
|
}
|
|
58
58
|
/**
|
|
59
|
-
* Link a phone number to a specific campaign.
|
|
59
|
+
* Link a phone number to a specific campaign. Phone numbers must be linked to a campaign to send messages.
|
|
60
60
|
*
|
|
61
61
|
* @param {Pinnacle.phoneNumbers.AttachCampaignParams} request
|
|
62
62
|
* @param {Campaign.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -65,12 +65,13 @@ class Campaign {
|
|
|
65
65
|
* @throws {@link Pinnacle.UnauthorizedError}
|
|
66
66
|
* @throws {@link Pinnacle.NotFoundError}
|
|
67
67
|
* @throws {@link Pinnacle.InternalServerError}
|
|
68
|
+
* @throws {@link Pinnacle.NotImplementedError}
|
|
68
69
|
*
|
|
69
70
|
* @example
|
|
70
71
|
* await client.phoneNumbers.campaign.attach({
|
|
71
72
|
* phones: ["+14155550123", "+14155559876", "+14155550111"],
|
|
72
73
|
* campaignType: "TOLL_FREE",
|
|
73
|
-
* campaignId:
|
|
74
|
+
* campaignId: "tf_1234567890"
|
|
74
75
|
* })
|
|
75
76
|
*/
|
|
76
77
|
attach(request, requestOptions) {
|
|
@@ -105,6 +106,8 @@ class Campaign {
|
|
|
105
106
|
throw new Pinnacle.NotFoundError(_response.error.body, _response.rawResponse);
|
|
106
107
|
case 500:
|
|
107
108
|
throw new Pinnacle.InternalServerError(_response.error.body, _response.rawResponse);
|
|
109
|
+
case 501:
|
|
110
|
+
throw new Pinnacle.NotImplementedError(_response.error.body, _response.rawResponse);
|
|
108
111
|
default:
|
|
109
112
|
throw new errors.PinnacleError({
|
|
110
113
|
statusCode: _response.error.statusCode,
|
|
@@ -140,6 +143,7 @@ class Campaign {
|
|
|
140
143
|
* @throws {@link Pinnacle.UnauthorizedError}
|
|
141
144
|
* @throws {@link Pinnacle.NotFoundError}
|
|
142
145
|
* @throws {@link Pinnacle.InternalServerError}
|
|
146
|
+
* @throws {@link Pinnacle.NotImplementedError}
|
|
143
147
|
*
|
|
144
148
|
* @example
|
|
145
149
|
* await client.phoneNumbers.campaign.detach({
|
|
@@ -178,6 +182,8 @@ class Campaign {
|
|
|
178
182
|
throw new Pinnacle.NotFoundError(_response.error.body, _response.rawResponse);
|
|
179
183
|
case 500:
|
|
180
184
|
throw new Pinnacle.InternalServerError(_response.error.body, _response.rawResponse);
|
|
185
|
+
case 501:
|
|
186
|
+
throw new Pinnacle.NotImplementedError(_response.error.body, _response.rawResponse);
|
|
181
187
|
default:
|
|
182
188
|
throw new errors.PinnacleError({
|
|
183
189
|
statusCode: _response.error.statusCode,
|
|
@@ -7,13 +7,22 @@ import * as Pinnacle from "../../../../../../index.js";
|
|
|
7
7
|
* {
|
|
8
8
|
* phones: ["+14155550123", "+14155559876", "+14155550111"],
|
|
9
9
|
* campaignType: "TOLL_FREE",
|
|
10
|
-
* campaignId:
|
|
10
|
+
* campaignId: "tf_1234567890"
|
|
11
11
|
* }
|
|
12
12
|
*/
|
|
13
13
|
export interface AttachCampaignParams {
|
|
14
14
|
/** List of phone number (E.164 format). */
|
|
15
15
|
phones: string[];
|
|
16
16
|
campaignType: Pinnacle.MessagingProfileEnum;
|
|
17
|
-
/**
|
|
18
|
-
|
|
17
|
+
/**
|
|
18
|
+
* Unique identifier for the campaign. <br>
|
|
19
|
+
*
|
|
20
|
+
* - **TOLL_FREE** campaigns:
|
|
21
|
+
* - Must begin with the prefix `tf_`
|
|
22
|
+
* - Example: `tf_1234567890`
|
|
23
|
+
* - **10DLC** campaigns:
|
|
24
|
+
* - Must begin with the prefix `dlc_`
|
|
25
|
+
* - Example: `dlc_1234567890`
|
|
26
|
+
*/
|
|
27
|
+
campaignId: string;
|
|
19
28
|
}
|
|
@@ -9,7 +9,7 @@ export declare namespace Webhook {
|
|
|
9
9
|
environment?: core.Supplier<environments.PinnacleEnvironment | string>;
|
|
10
10
|
/** Specify a custom URL to connect the client to. */
|
|
11
11
|
baseUrl?: core.Supplier<string>;
|
|
12
|
-
apiKey
|
|
12
|
+
apiKey?: core.Supplier<string | undefined>;
|
|
13
13
|
/** Additional headers to include in requests. */
|
|
14
14
|
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
15
15
|
}
|
|
@@ -28,13 +28,13 @@ export declare namespace Webhook {
|
|
|
28
28
|
}
|
|
29
29
|
export declare class Webhook {
|
|
30
30
|
protected readonly _options: Webhook.Options;
|
|
31
|
-
constructor(_options
|
|
31
|
+
constructor(_options?: Webhook.Options);
|
|
32
32
|
/**
|
|
33
33
|
* Connect a webhook to your phone number to receive real-time notifications for incoming messages, delivery status updates, and other communication events.
|
|
34
34
|
*
|
|
35
35
|
* @param {string} phone - The phone number you want to attach the webhook to in E.164 format. Make sure it is url encoded (i.e. replace the leading + with %2B). <br>
|
|
36
36
|
*
|
|
37
|
-
* Must be a phone number that you own and have already [purchased](./buy) through the API.
|
|
37
|
+
* Must be a phone number that you own and have already [purchased](./buy) through the API. A phone number can have multiple webhooks attached to it.
|
|
38
38
|
* @param {Pinnacle.AttachWebhookParams} request
|
|
39
39
|
* @param {Webhook.RequestOptions} requestOptions - Request-specific configuration.
|
|
40
40
|
*
|
|
@@ -46,7 +46,8 @@ export declare class Webhook {
|
|
|
46
46
|
*
|
|
47
47
|
* @example
|
|
48
48
|
* await client.phoneNumbers.webhook.attach("%2B14155551234", {
|
|
49
|
-
* webhookId:
|
|
49
|
+
* webhookId: "wh_1234567890",
|
|
50
|
+
* event: "MESSAGE.STATUS"
|
|
50
51
|
* })
|
|
51
52
|
*/
|
|
52
53
|
attach(phone: string, request: Pinnacle.AttachWebhookParams, requestOptions?: Webhook.RequestOptions): core.HttpResponsePromise<Pinnacle.ConfiguredWebhook>;
|
|
@@ -59,22 +60,23 @@ export declare class Webhook {
|
|
|
59
60
|
* @param {string} phone - The phone number you want to attach the webhook to in E.164 format. Make sure it is url encoded (i.e. replace the leading + with %2B). <br>
|
|
60
61
|
*
|
|
61
62
|
* Must be a phone number that you own and currently has the specified webhook attached.
|
|
62
|
-
* @param {
|
|
63
|
+
* @param {string} webhookId - The unique identifier of the webhook you want to detach from the phone number. <br>
|
|
63
64
|
*
|
|
64
|
-
* This must be a valid webhook ID that is currently attached to the specified phone number.
|
|
65
|
+
* This must be a valid webhook ID that is currently attached to the specified phone number. This identifier is a string that always begins with the prefix `wh_`, for example: `wh_1234567890`.
|
|
65
66
|
* @param {Webhook.RequestOptions} requestOptions - Request-specific configuration.
|
|
66
67
|
*
|
|
67
68
|
* @throws {@link Pinnacle.BadRequestError}
|
|
68
69
|
* @throws {@link Pinnacle.UnauthorizedError}
|
|
69
70
|
* @throws {@link Pinnacle.NotFoundError}
|
|
70
71
|
* @throws {@link Pinnacle.InternalServerError}
|
|
72
|
+
* @throws {@link Pinnacle.NotImplementedError}
|
|
71
73
|
*
|
|
72
74
|
* @example
|
|
73
|
-
* await client.phoneNumbers.webhook.detach("+14155551234",
|
|
75
|
+
* await client.phoneNumbers.webhook.detach("+14155551234", "wh_1234567890")
|
|
74
76
|
*/
|
|
75
|
-
detach(phone: string, webhookId:
|
|
77
|
+
detach(phone: string, webhookId: string, requestOptions?: Webhook.RequestOptions): core.HttpResponsePromise<Pinnacle.DetachedWebhookInfo>;
|
|
76
78
|
private __detach;
|
|
77
79
|
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
78
|
-
"PINNACLE-API-KEY": string;
|
|
80
|
+
"PINNACLE-API-KEY": string | undefined;
|
|
79
81
|
}>;
|
|
80
82
|
}
|
|
@@ -52,7 +52,7 @@ const Pinnacle = __importStar(require("../../../../../index.js"));
|
|
|
52
52
|
const headers_js_1 = require("../../../../../../core/headers.js");
|
|
53
53
|
const errors = __importStar(require("../../../../../../errors/index.js"));
|
|
54
54
|
class Webhook {
|
|
55
|
-
constructor(_options) {
|
|
55
|
+
constructor(_options = {}) {
|
|
56
56
|
this._options = _options;
|
|
57
57
|
}
|
|
58
58
|
/**
|
|
@@ -60,7 +60,7 @@ class Webhook {
|
|
|
60
60
|
*
|
|
61
61
|
* @param {string} phone - The phone number you want to attach the webhook to in E.164 format. Make sure it is url encoded (i.e. replace the leading + with %2B). <br>
|
|
62
62
|
*
|
|
63
|
-
* Must be a phone number that you own and have already [purchased](./buy) through the API.
|
|
63
|
+
* Must be a phone number that you own and have already [purchased](./buy) through the API. A phone number can have multiple webhooks attached to it.
|
|
64
64
|
* @param {Pinnacle.AttachWebhookParams} request
|
|
65
65
|
* @param {Webhook.RequestOptions} requestOptions - Request-specific configuration.
|
|
66
66
|
*
|
|
@@ -72,7 +72,8 @@ class Webhook {
|
|
|
72
72
|
*
|
|
73
73
|
* @example
|
|
74
74
|
* await client.phoneNumbers.webhook.attach("%2B14155551234", {
|
|
75
|
-
* webhookId:
|
|
75
|
+
* webhookId: "wh_1234567890",
|
|
76
|
+
* event: "MESSAGE.STATUS"
|
|
76
77
|
* })
|
|
77
78
|
*/
|
|
78
79
|
attach(phone, request, requestOptions) {
|
|
@@ -142,18 +143,19 @@ class Webhook {
|
|
|
142
143
|
* @param {string} phone - The phone number you want to attach the webhook to in E.164 format. Make sure it is url encoded (i.e. replace the leading + with %2B). <br>
|
|
143
144
|
*
|
|
144
145
|
* Must be a phone number that you own and currently has the specified webhook attached.
|
|
145
|
-
* @param {
|
|
146
|
+
* @param {string} webhookId - The unique identifier of the webhook you want to detach from the phone number. <br>
|
|
146
147
|
*
|
|
147
|
-
* This must be a valid webhook ID that is currently attached to the specified phone number.
|
|
148
|
+
* This must be a valid webhook ID that is currently attached to the specified phone number. This identifier is a string that always begins with the prefix `wh_`, for example: `wh_1234567890`.
|
|
148
149
|
* @param {Webhook.RequestOptions} requestOptions - Request-specific configuration.
|
|
149
150
|
*
|
|
150
151
|
* @throws {@link Pinnacle.BadRequestError}
|
|
151
152
|
* @throws {@link Pinnacle.UnauthorizedError}
|
|
152
153
|
* @throws {@link Pinnacle.NotFoundError}
|
|
153
154
|
* @throws {@link Pinnacle.InternalServerError}
|
|
155
|
+
* @throws {@link Pinnacle.NotImplementedError}
|
|
154
156
|
*
|
|
155
157
|
* @example
|
|
156
|
-
* await client.phoneNumbers.webhook.detach("+14155551234",
|
|
158
|
+
* await client.phoneNumbers.webhook.detach("+14155551234", "wh_1234567890")
|
|
157
159
|
*/
|
|
158
160
|
detach(phone, webhookId, requestOptions) {
|
|
159
161
|
return core.HttpResponsePromise.fromPromise(this.__detach(phone, webhookId, requestOptions));
|
|
@@ -184,6 +186,8 @@ class Webhook {
|
|
|
184
186
|
throw new Pinnacle.NotFoundError(_response.error.body, _response.rawResponse);
|
|
185
187
|
case 500:
|
|
186
188
|
throw new Pinnacle.InternalServerError(_response.error.body, _response.rawResponse);
|
|
189
|
+
case 501:
|
|
190
|
+
throw new Pinnacle.NotImplementedError(_response.error.body, _response.rawResponse);
|
|
187
191
|
default:
|
|
188
192
|
throw new errors.PinnacleError({
|
|
189
193
|
statusCode: _response.error.statusCode,
|