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
|
@@ -8,8 +8,8 @@ import * as Pinnacle from "../index.mjs";
|
|
|
8
8
|
export interface RcsCampaignStatus {
|
|
9
9
|
/** List of errors that occured. */
|
|
10
10
|
errors: string[];
|
|
11
|
-
/**
|
|
12
|
-
id:
|
|
11
|
+
/** The unique identifier of the RCS campaign. This identifier is a string that always begins with the prefix `rcs_`, for example: `rcs_1234567890`. */
|
|
12
|
+
id: string;
|
|
13
13
|
/**
|
|
14
14
|
* Current review status of the RCS campaign. <br>
|
|
15
15
|
*
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Pinnacle from "../index.mjs";
|
|
5
|
+
/**
|
|
6
|
+
* Response containing RCS capabilities for requested phone numbers
|
|
7
|
+
*/
|
|
8
|
+
export type RcsCapabilitiesResult = Record<string, Pinnacle.RcsCapability | null>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* RCS capabilities for a phone number
|
|
6
|
+
*/
|
|
7
|
+
export interface RcsCapability {
|
|
8
|
+
cards: RcsCapability.Cards;
|
|
9
|
+
/** Supported button action types inside the rich cards or quick replies. Each key is a button action type that defines a specific button type in the Pinnacle API. */
|
|
10
|
+
actions: RcsCapability.Actions;
|
|
11
|
+
}
|
|
12
|
+
export declare namespace RcsCapability {
|
|
13
|
+
interface Cards {
|
|
14
|
+
/** Whether the phone number supports standalone rich cards (`cards.length == 1`) */
|
|
15
|
+
standalone: boolean;
|
|
16
|
+
/** Whether the phone number supports carousel rich cards */
|
|
17
|
+
carousel: boolean;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Supported button action types inside the rich cards or quick replies. Each key is a button action type that defines a specific button type in the Pinnacle API.
|
|
21
|
+
*/
|
|
22
|
+
interface Actions {
|
|
23
|
+
/** Buttons that open URLs are supported */
|
|
24
|
+
openUrl: boolean;
|
|
25
|
+
/** Buttons that make phone calls are supported */
|
|
26
|
+
call: boolean;
|
|
27
|
+
/** Buttons that trigger actions are supported */
|
|
28
|
+
trigger: boolean;
|
|
29
|
+
/** Buttons that request user location are supported */
|
|
30
|
+
requestUserLocation: boolean;
|
|
31
|
+
/** Buttons are supported */
|
|
32
|
+
scheduleEvent: boolean;
|
|
33
|
+
/** Buttons that send location are supported */
|
|
34
|
+
sendLocation: boolean;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Response containing the generated RCS service id and/or url. You can always create a link with the service id that is returned.
|
|
6
|
+
* To create a link follow the format: sms://{PHONE_NUMBER}?service_id={SERVICE_ID}&body={URL_ENCODED_BODY}
|
|
7
|
+
*/
|
|
8
|
+
export interface RcsLinkResult {
|
|
9
|
+
/** The generated RCS link URL. If no phone number is provided, no url will be generated. */
|
|
10
|
+
url?: string;
|
|
11
|
+
/** The service ID used for the link */
|
|
12
|
+
serviceId: string;
|
|
13
|
+
}
|
|
@@ -12,6 +12,7 @@ Pinnacle.RcsTextContent
|
|
|
12
12
|
* See [supported media types](https://app.pinnacle.sh/supported-file-types?type=RCS-MEDIA). */
|
|
13
13
|
| {
|
|
14
14
|
media: string;
|
|
15
|
+
quickReplies: Pinnacle.RichButton[];
|
|
15
16
|
}
|
|
16
17
|
/**
|
|
17
18
|
* Message containing cards, each with its own title, subtitle, and/or buttons. Quick replies can also be added. <br>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Response indicating success of whitelisting operation
|
|
6
|
+
*/
|
|
7
|
+
export interface RcsWhitelistResponse {
|
|
8
|
+
/** Whether the whitelisting operation was successful */
|
|
9
|
+
success: boolean;
|
|
10
|
+
}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
export interface ReactionResult {
|
|
5
|
-
/**
|
|
6
|
-
messageId:
|
|
7
|
-
/** Unique identifier
|
|
8
|
-
reactionMessageId:
|
|
5
|
+
/** Unique identifier of the message. This identifier is a string that always begins with the prefix `msg_`, for example: `msg_1234567890`. */
|
|
6
|
+
messageId: string;
|
|
7
|
+
/** Unique identifier of the message with the reaction. This identifier is a string that always begins with the prefix `msg_`, for example: `msg_1234567890`. */
|
|
8
|
+
reactionMessageId: string;
|
|
9
9
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
export interface RefreshedFile {
|
|
5
|
+
/** The original file URI that was provided in the request. */
|
|
6
|
+
original: string;
|
|
7
|
+
/** The new refreshed presigned URL that expires in one hour. */
|
|
8
|
+
refreshed: string;
|
|
9
|
+
}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
export interface ScheduledMessaage {
|
|
5
|
-
/** Unique identifier for the scheduled send. */
|
|
6
|
-
scheduleId:
|
|
5
|
+
/** Unique identifier for the scheduled send. This identifier is a string that always begins with the prefix `msg_sched_`, for example: `msg_sched_1234567890`. */
|
|
6
|
+
scheduleId: string;
|
|
7
7
|
/** Configuration for the scheduled message. */
|
|
8
8
|
config: ScheduledMessaage.Config;
|
|
9
9
|
}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
export interface SentMmsDetails {
|
|
5
|
-
/** Array of unique identifiers for the sent MMS messages. */
|
|
6
|
-
messageIds:
|
|
5
|
+
/** Array of unique identifiers for the sent MMS messages. This identifiers are strings that always begin with the prefix `msg_`, for example: `msg_1234567890`. */
|
|
6
|
+
messageIds: string[];
|
|
7
7
|
/** Total number of segments used across the message. */
|
|
8
8
|
segments: number;
|
|
9
9
|
/** Total cost of sending the message. */
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
export interface SentRcsDetails {
|
|
5
|
-
/** Unique identifier for the sent
|
|
6
|
-
|
|
5
|
+
/** Unique identifier for the sent RCS message. This identifier is a string that always begins with the prefix `msg_`, for example: `msg_1234567890`. */
|
|
6
|
+
messageId: string;
|
|
7
7
|
/** Total number of segments used across the message. */
|
|
8
8
|
segments: number;
|
|
9
9
|
/** Total cost of sending the message. */
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
export interface SentSmsDetails {
|
|
5
|
-
/** Unique identifier for the sent message. */
|
|
6
|
-
messageId:
|
|
5
|
+
/** Unique identifier for the sent message. This identifier is a string that always begins with the prefix `msg_`, for example: `msg_1234567890`. */
|
|
6
|
+
messageId: string;
|
|
7
7
|
/** Details about how the message was segmented for sending. */
|
|
8
8
|
segments: SentSmsDetails.Segments;
|
|
9
9
|
/** Total cost of sending the message. */
|
|
@@ -11,6 +11,6 @@ export declare namespace ShortenedUrl {
|
|
|
11
11
|
/** Destination URL that your shortened link redirects to. */
|
|
12
12
|
to: string;
|
|
13
13
|
/** Expiration date for your shortened link in ISO 8601 format, or null if it's permanent. */
|
|
14
|
-
expiresAt
|
|
14
|
+
expiresAt: string | null;
|
|
15
15
|
}
|
|
16
16
|
}
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as Pinnacle from "../index.mjs";
|
|
5
5
|
export interface TollFreeCampaign {
|
|
6
|
-
/** Unique identifier for the campaign. */
|
|
7
|
-
campaignId?:
|
|
6
|
+
/** Unique identifier for the campaign. Must begin with the prefix `tf_`. */
|
|
7
|
+
campaignId?: string;
|
|
8
8
|
monthlyVolume?: Pinnacle.MessageVolumeEnum;
|
|
9
9
|
/** Display name of the campaign. */
|
|
10
10
|
name?: string;
|
|
@@ -12,8 +12,8 @@ export interface TollFreeCampaignStatus {
|
|
|
12
12
|
* These errors may request additional information or point out erroneous and/or missing fields.
|
|
13
13
|
*/
|
|
14
14
|
error?: string;
|
|
15
|
-
/**
|
|
16
|
-
id:
|
|
15
|
+
/** The unique identifier of the toll-free campaign. This identifier is a string that always begins with the prefix `tf_`, for example: `tf_1234567890`. */
|
|
16
|
+
id: string;
|
|
17
17
|
/**
|
|
18
18
|
* Status of phone numbers that are being attached to this campaign. <br>
|
|
19
19
|
*
|
|
@@ -11,7 +11,6 @@ export interface TollFreeCampaignWithExtendedBrandAndStatus extends Pinnacle.Tol
|
|
|
11
11
|
* `INCOMPLETE`: Has not been submitted.<br>
|
|
12
12
|
* `PENDING`: Currently being reviewed.<br>
|
|
13
13
|
* `VERIFIED`: Verified and good to go.<br>
|
|
14
|
-
* `UNVERIFIED`: No longer verified due to an update in the brand details.<br>
|
|
15
14
|
* `VETTED`: Brand has been vetted by an external provider and has received vetting scores.
|
|
16
15
|
*/
|
|
17
16
|
status: Pinnacle.ProfileStatusEnum;
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
export interface UpdatedContactId {
|
|
5
|
-
/** Unique ID of the updated contact. */
|
|
6
|
-
id:
|
|
5
|
+
/** Unique ID of the updated contact. This identifier is a string that always begins with the prefix `co_`, for example: `co_1234567890`. */
|
|
6
|
+
id: string;
|
|
7
7
|
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Represents an event triggered by a user such as when they start typing.
|
|
6
|
+
*/
|
|
7
|
+
export interface UserEvent {
|
|
8
|
+
/** Type of user event. */
|
|
9
|
+
type: "USER.TYPING";
|
|
10
|
+
/** Timestamp when the user event started in ISO 8601 format. */
|
|
11
|
+
startedAt: string;
|
|
12
|
+
/** Conversation metadata containing the conversation ID, sender, and recipient information. */
|
|
13
|
+
conversation: UserEvent.Conversation;
|
|
14
|
+
}
|
|
15
|
+
export declare namespace UserEvent {
|
|
16
|
+
/**
|
|
17
|
+
* Conversation metadata containing the conversation ID, sender, and recipient information.
|
|
18
|
+
*/
|
|
19
|
+
interface Conversation {
|
|
20
|
+
/** Unique identifier for the conversation. To get more conversation details, use the [POST /conversations/get](/api-reference/conversations/get) endpoint. */
|
|
21
|
+
id: number;
|
|
22
|
+
/** Phone number of the user who triggered the event. */
|
|
23
|
+
from: string;
|
|
24
|
+
/** Agent ID that the user is interacting with. */
|
|
25
|
+
to: string;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -4,6 +4,11 @@
|
|
|
4
4
|
export interface ValidateCampaignParams {
|
|
5
5
|
/** Any additional information you want to provide. */
|
|
6
6
|
additionalInfo?: string;
|
|
7
|
-
/**
|
|
8
|
-
|
|
7
|
+
/**
|
|
8
|
+
* Unique identifier for the campaign.
|
|
9
|
+
* - When validating 10DLC campaigns, it must begin with the prefix `dlc_` (e.g., `dlc_1234567890`)
|
|
10
|
+
* - When validating toll-free campaigns, it must begin with the prefix `tf_` (e.g., `tf_1234567890`)
|
|
11
|
+
* - When validating RCS campaigns, it must begin with the prefix `rcs_` (e.g., `rcs_1234567890`)
|
|
12
|
+
*/
|
|
13
|
+
campaignId: string;
|
|
9
14
|
}
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as Pinnacle from "../index.mjs";
|
|
5
5
|
export interface Vcard {
|
|
6
|
-
/**
|
|
7
|
-
id?:
|
|
6
|
+
/** The unique identifier of the contact. This identifier is a string that always begins with the prefix `cc_`, for example: `cc_1234567890`. */
|
|
7
|
+
id?: string;
|
|
8
8
|
/** Full display name for the vCard. */
|
|
9
9
|
formattedName?: string;
|
|
10
10
|
/** Structured name components. */
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
export interface VcardResource {
|
|
5
|
-
/**
|
|
6
|
-
id?:
|
|
5
|
+
/** The unique identifier of the contact. This identifier is a string that always begins with the prefix `cc_`, for example: `cc_1234567890`. */
|
|
6
|
+
id?: string;
|
|
7
7
|
/**
|
|
8
8
|
* Presigned download url to download vCard data. <br>
|
|
9
9
|
*
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
/**
|
|
5
5
|
* Types of events that can trigger webhook notifications for phone numbers.
|
|
6
6
|
* Subscribe to specific events to receive real-time updates about your phone number activity.
|
|
7
|
+
* Use `null` to listen to all events.
|
|
7
8
|
*/
|
|
8
9
|
export type WebhookEventEnum = "MESSAGE.STATUS" | "MESSAGE.RECEIVED";
|
|
9
10
|
export declare const WebhookEventEnum: {
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
export interface Webhooks {
|
|
8
8
|
/** URL where webhook events are delivered. */
|
|
9
9
|
endpoint: string;
|
|
10
|
-
/**
|
|
11
|
-
id:
|
|
10
|
+
/** The unique identifier of the webhook. This identifier is a string that always begins with the prefix `wh_`, for example: `wh_1234567890`. */
|
|
11
|
+
id: string;
|
|
12
12
|
/** Name of the webhook. */
|
|
13
13
|
name: string;
|
|
14
14
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export * from "./BadRequestErrorBody.mjs";
|
|
2
|
+
export * from "./NotFoundErrorBody.mjs";
|
|
2
3
|
export * from "./OptionalContacts.mjs";
|
|
3
4
|
export * from "./CompanySectorEnum.mjs";
|
|
4
5
|
export * from "./CompanyTypeEnum.mjs";
|
|
@@ -59,14 +60,16 @@ export * from "./RcsMediaDetailsContent.mjs";
|
|
|
59
60
|
export * from "./RcsMediaContent.mjs";
|
|
60
61
|
export * from "./RcsCardsContent.mjs";
|
|
61
62
|
export * from "./RcsContent.mjs";
|
|
62
|
-
export * from "./
|
|
63
|
+
export * from "./ButtonClickedData.mjs";
|
|
63
64
|
export * from "./LocationShareAction.mjs";
|
|
64
|
-
export * from "./
|
|
65
|
+
export * from "./ButtonClicked.mjs";
|
|
65
66
|
export * from "./MessageContent.mjs";
|
|
66
67
|
export * from "./MessageMethodEnum.mjs";
|
|
67
68
|
export * from "./MessageStatusEnum.mjs";
|
|
68
69
|
export * from "./MessageProtocolEnum.mjs";
|
|
69
70
|
export * from "./Message.mjs";
|
|
71
|
+
export * from "./MessageWithReaction.mjs";
|
|
72
|
+
export * from "./MessageList.mjs";
|
|
70
73
|
export * from "./ReactionResult.mjs";
|
|
71
74
|
export * from "./MessageSchedule.mjs";
|
|
72
75
|
export * from "./Tracking.mjs";
|
|
@@ -78,7 +81,7 @@ export * from "./RichTextMessage.mjs";
|
|
|
78
81
|
export * from "./RichMediaMessage.mjs";
|
|
79
82
|
export * from "./RcsCards.mjs";
|
|
80
83
|
export * from "./RichCardsMessage.mjs";
|
|
81
|
-
export * from "./
|
|
84
|
+
export * from "./RichMessage.mjs";
|
|
82
85
|
export * from "./SentRcsDetails.mjs";
|
|
83
86
|
export * from "./SmsValidationResult.mjs";
|
|
84
87
|
export * from "./MmsValidationResult.mjs";
|
|
@@ -102,6 +105,10 @@ export * from "./DetachedWebhookInfo.mjs";
|
|
|
102
105
|
export * from "./MessagingProfileEnum.mjs";
|
|
103
106
|
export * from "./AttachedPhoneNumberResult.mjs";
|
|
104
107
|
export * from "./DetachedPhoneNumberResult.mjs";
|
|
108
|
+
export * from "./RcsCapability.mjs";
|
|
109
|
+
export * from "./RcsCapabilitiesResult.mjs";
|
|
110
|
+
export * from "./RcsWhitelistResponse.mjs";
|
|
111
|
+
export * from "./RcsLinkResult.mjs";
|
|
105
112
|
export * from "./BrandStatus.mjs";
|
|
106
113
|
export * from "./TollFreeStatusEnum.mjs";
|
|
107
114
|
export * from "./TollFreeCampaignStatus.mjs";
|
|
@@ -115,6 +122,7 @@ export * from "./ShortenedUrl.mjs";
|
|
|
115
122
|
export * from "./LinkClickEvent.mjs";
|
|
116
123
|
export * from "./ShortenedUrlWithClickData.mjs";
|
|
117
124
|
export * from "./UploadResults.mjs";
|
|
125
|
+
export * from "./RefreshedFile.mjs";
|
|
118
126
|
export * from "./VcardAddress.mjs";
|
|
119
127
|
export * from "./VcardPhone.mjs";
|
|
120
128
|
export * from "./VcardEmail.mjs";
|
|
@@ -124,3 +132,5 @@ export * from "./VCardData.mjs";
|
|
|
124
132
|
export * from "./VcardResource.mjs";
|
|
125
133
|
export * from "./Webhooks.mjs";
|
|
126
134
|
export * from "./WebhookResult.mjs";
|
|
135
|
+
export * from "./MessageEvent.mjs";
|
|
136
|
+
export * from "./UserEvent.mjs";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export * from "./BadRequestErrorBody.mjs";
|
|
2
|
+
export * from "./NotFoundErrorBody.mjs";
|
|
2
3
|
export * from "./OptionalContacts.mjs";
|
|
3
4
|
export * from "./CompanySectorEnum.mjs";
|
|
4
5
|
export * from "./CompanyTypeEnum.mjs";
|
|
@@ -59,14 +60,16 @@ export * from "./RcsMediaDetailsContent.mjs";
|
|
|
59
60
|
export * from "./RcsMediaContent.mjs";
|
|
60
61
|
export * from "./RcsCardsContent.mjs";
|
|
61
62
|
export * from "./RcsContent.mjs";
|
|
62
|
-
export * from "./
|
|
63
|
+
export * from "./ButtonClickedData.mjs";
|
|
63
64
|
export * from "./LocationShareAction.mjs";
|
|
64
|
-
export * from "./
|
|
65
|
+
export * from "./ButtonClicked.mjs";
|
|
65
66
|
export * from "./MessageContent.mjs";
|
|
66
67
|
export * from "./MessageMethodEnum.mjs";
|
|
67
68
|
export * from "./MessageStatusEnum.mjs";
|
|
68
69
|
export * from "./MessageProtocolEnum.mjs";
|
|
69
70
|
export * from "./Message.mjs";
|
|
71
|
+
export * from "./MessageWithReaction.mjs";
|
|
72
|
+
export * from "./MessageList.mjs";
|
|
70
73
|
export * from "./ReactionResult.mjs";
|
|
71
74
|
export * from "./MessageSchedule.mjs";
|
|
72
75
|
export * from "./Tracking.mjs";
|
|
@@ -78,7 +81,7 @@ export * from "./RichTextMessage.mjs";
|
|
|
78
81
|
export * from "./RichMediaMessage.mjs";
|
|
79
82
|
export * from "./RcsCards.mjs";
|
|
80
83
|
export * from "./RichCardsMessage.mjs";
|
|
81
|
-
export * from "./
|
|
84
|
+
export * from "./RichMessage.mjs";
|
|
82
85
|
export * from "./SentRcsDetails.mjs";
|
|
83
86
|
export * from "./SmsValidationResult.mjs";
|
|
84
87
|
export * from "./MmsValidationResult.mjs";
|
|
@@ -102,6 +105,10 @@ export * from "./DetachedWebhookInfo.mjs";
|
|
|
102
105
|
export * from "./MessagingProfileEnum.mjs";
|
|
103
106
|
export * from "./AttachedPhoneNumberResult.mjs";
|
|
104
107
|
export * from "./DetachedPhoneNumberResult.mjs";
|
|
108
|
+
export * from "./RcsCapability.mjs";
|
|
109
|
+
export * from "./RcsCapabilitiesResult.mjs";
|
|
110
|
+
export * from "./RcsWhitelistResponse.mjs";
|
|
111
|
+
export * from "./RcsLinkResult.mjs";
|
|
105
112
|
export * from "./BrandStatus.mjs";
|
|
106
113
|
export * from "./TollFreeStatusEnum.mjs";
|
|
107
114
|
export * from "./TollFreeCampaignStatus.mjs";
|
|
@@ -115,6 +122,7 @@ export * from "./ShortenedUrl.mjs";
|
|
|
115
122
|
export * from "./LinkClickEvent.mjs";
|
|
116
123
|
export * from "./ShortenedUrlWithClickData.mjs";
|
|
117
124
|
export * from "./UploadResults.mjs";
|
|
125
|
+
export * from "./RefreshedFile.mjs";
|
|
118
126
|
export * from "./VcardAddress.mjs";
|
|
119
127
|
export * from "./VcardPhone.mjs";
|
|
120
128
|
export * from "./VcardEmail.mjs";
|
|
@@ -124,3 +132,5 @@ export * from "./VCardData.mjs";
|
|
|
124
132
|
export * from "./VcardResource.mjs";
|
|
125
133
|
export * from "./Webhooks.mjs";
|
|
126
134
|
export * from "./WebhookResult.mjs";
|
|
135
|
+
export * from "./MessageEvent.mjs";
|
|
136
|
+
export * from "./UserEvent.mjs";
|
package/dist/esm/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export * as Pinnacle from "./api/index.mjs";
|
|
2
|
-
export { PinnacleClient } from "./
|
|
2
|
+
export { PinnacleClient } from "./wrapper/PinnacleClient.mjs";
|
|
3
3
|
export { PinnacleEnvironment } from "./environments.mjs";
|
|
4
4
|
export { PinnacleError, PinnacleTimeoutError } from "./errors/index.mjs";
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export * as Pinnacle from "./api/index.mjs";
|
|
2
|
-
export { PinnacleClient } from "./
|
|
2
|
+
export { PinnacleClient } from "./wrapper/PinnacleClient.mjs";
|
|
3
3
|
export { PinnacleEnvironment } from "./environments.mjs";
|
|
4
4
|
export { PinnacleError, PinnacleTimeoutError } from "./errors/index.mjs";
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "2.0.
|
|
1
|
+
export declare const SDK_VERSION = "2.0.2";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "2.0.
|
|
1
|
+
export const SDK_VERSION = "2.0.2";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PinnacleClient as FernClient } from "../Client.mjs";
|
|
2
|
+
import { EnhancedTools } from "./tools/Client.mjs";
|
|
3
|
+
import { EnhancedMessages } from "./messages/Client.mjs";
|
|
4
|
+
export declare class PinnacleClient extends FernClient {
|
|
5
|
+
protected _tools: EnhancedTools | undefined;
|
|
6
|
+
protected _messages: EnhancedMessages | undefined;
|
|
7
|
+
get tools(): EnhancedTools;
|
|
8
|
+
get messages(): EnhancedMessages;
|
|
9
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { PinnacleClient as FernClient } from "../Client.mjs";
|
|
2
|
+
import { EnhancedTools } from "./tools/Client.mjs";
|
|
3
|
+
import { EnhancedMessages } from "./messages/Client.mjs";
|
|
4
|
+
export class PinnacleClient extends FernClient {
|
|
5
|
+
get tools() {
|
|
6
|
+
var _a;
|
|
7
|
+
return ((_a = this._tools) !== null && _a !== void 0 ? _a : (this._tools = new EnhancedTools(this._options)));
|
|
8
|
+
}
|
|
9
|
+
get messages() {
|
|
10
|
+
var _a;
|
|
11
|
+
return ((_a = this._messages) !== null && _a !== void 0 ? _a : (this._messages = new EnhancedMessages(this._options)));
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Messages } from "../../api/resources/messages/client/Client.mjs";
|
|
2
|
+
import * as Pinnacle from "../../api/index.mjs";
|
|
3
|
+
interface ExpressLikeRequest {
|
|
4
|
+
headers: Record<string, string | string[] | undefined>;
|
|
5
|
+
body?: any;
|
|
6
|
+
get?: (name: string) => string | undefined;
|
|
7
|
+
protocol?: string;
|
|
8
|
+
originalUrl?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare class EnhancedMessages extends Messages {
|
|
11
|
+
process(req: Request | ExpressLikeRequest, secret?: string): Promise<Pinnacle.MessageEvent | Pinnacle.UserEvent>;
|
|
12
|
+
}
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import { Messages } from "../../api/resources/messages/client/Client.mjs";
|
|
11
|
+
import { UnauthorizedError } from "../../api/errors/index.mjs";
|
|
12
|
+
export class EnhancedMessages extends Messages {
|
|
13
|
+
process(req, secret) {
|
|
14
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
15
|
+
var _a, _b;
|
|
16
|
+
const signingSecret = secret || process.env.PINNACLE_SIGNING_SECRET;
|
|
17
|
+
let headerSecret;
|
|
18
|
+
let body;
|
|
19
|
+
if (req instanceof Request) {
|
|
20
|
+
headerSecret =
|
|
21
|
+
((_a = req.headers) === null || _a === void 0 ? void 0 : _a.get("PINNACLE-SIGNING-SECRET")) || ((_b = req.headers) === null || _b === void 0 ? void 0 : _b.get("pinnacle-signing-secret")) || undefined;
|
|
22
|
+
body = yield req.json();
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
const headers = req.headers;
|
|
26
|
+
headerSecret = headers["pinnacle-signing-secret"];
|
|
27
|
+
body = req.body;
|
|
28
|
+
}
|
|
29
|
+
if (!signingSecret) {
|
|
30
|
+
throw new UnauthorizedError({
|
|
31
|
+
error: "Make sure to set the PINNACLE_SIGNING_SECRET environment variable or pass the secret as an argument to the process method",
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
if (!headerSecret) {
|
|
35
|
+
throw new UnauthorizedError({
|
|
36
|
+
error: "Failed to get the PINNACLE-SIGNING-SECRET header from request",
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
if (headerSecret !== signingSecret) {
|
|
40
|
+
throw new UnauthorizedError({ error: "Invalid webhook signature" });
|
|
41
|
+
}
|
|
42
|
+
return body;
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Tools } from '../../api/resources/tools/client/Client.mjs';
|
|
2
|
+
import { FileUploader } from './FileUploader.mjs';
|
|
3
|
+
export class EnhancedTools extends Tools {
|
|
4
|
+
get file() {
|
|
5
|
+
var _a;
|
|
6
|
+
return ((_a = this._fileUploader) !== null && _a !== void 0 ? _a : (this._fileUploader = new FileUploader(this._options)));
|
|
7
|
+
}
|
|
8
|
+
}
|