rcs-js 2.0.0-rc.1 → 2.0.0-rc.11
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 +3 -3
- package/dist/cjs/Client.js +11 -11
- package/dist/cjs/api/resources/brands/client/Client.d.ts +2 -0
- package/dist/cjs/api/resources/brands/client/Client.js +6 -0
- package/dist/cjs/api/resources/brands/client/requests/UpsertBrandParams.d.ts +1 -1
- package/dist/cjs/api/resources/campaigns/resources/dlc/client/Client.d.ts +6 -6
- package/dist/cjs/api/resources/campaigns/resources/dlc/client/Client.js +6 -6
- package/dist/cjs/api/resources/campaigns/resources/rcs/client/Client.d.ts +1 -0
- package/dist/cjs/api/resources/campaigns/resources/rcs/client/Client.js +1 -0
- package/dist/cjs/api/resources/campaigns/resources/rcs/client/requests/UpsertRcsCampaignParams.d.ts +5 -2
- package/dist/cjs/api/resources/index.d.ts +2 -1
- package/dist/cjs/api/resources/index.js +3 -2
- package/dist/cjs/api/resources/messages/client/Client.d.ts +6 -3
- package/dist/cjs/api/resources/messages/client/Client.js +12 -3
- package/dist/cjs/api/resources/messages/resources/index.d.ts +6 -3
- package/dist/cjs/api/resources/messages/resources/index.js +7 -4
- package/dist/cjs/api/resources/messages/resources/mms/client/Client.d.ts +27 -0
- package/dist/cjs/api/resources/messages/resources/mms/client/Client.js +86 -0
- package/dist/cjs/api/resources/messages/resources/mms/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/messages/resources/mms/client/index.js +15 -0
- package/dist/cjs/api/resources/messages/resources/{send → mms}/client/requests/index.d.ts +0 -1
- package/dist/cjs/api/resources/messages/resources/mms/index.d.ts +1 -0
- package/dist/cjs/api/resources/messages/resources/mms/index.js +1 -0
- package/dist/cjs/api/resources/messages/resources/{send/types/SendRcsResponse.d.ts → mms/types/MmsSendResponse.d.ts} +1 -1
- package/dist/cjs/api/resources/messages/resources/mms/types/index.d.ts +1 -0
- package/dist/cjs/api/resources/{message → messages/resources/mms/types}/index.js +1 -2
- package/dist/cjs/api/resources/messages/resources/rcs/client/Client.d.ts +29 -0
- package/dist/cjs/api/resources/messages/resources/rcs/client/Client.js +88 -0
- package/dist/cjs/api/resources/messages/resources/rcs/index.d.ts +1 -0
- package/dist/cjs/api/resources/messages/resources/rcs/index.js +1 -0
- package/dist/cjs/api/resources/messages/resources/{send/types/SendSmsResponse.d.ts → rcs/types/RcsSendResponse.d.ts} +1 -1
- package/dist/cjs/api/resources/messages/resources/rcs/types/index.d.ts +1 -0
- package/dist/cjs/api/resources/messages/resources/rcs/types/index.js +17 -0
- package/dist/cjs/api/resources/{message → messages}/resources/sms/client/Client.d.ts +23 -1
- package/dist/cjs/api/resources/{message → messages}/resources/sms/client/Client.js +82 -1
- package/dist/cjs/api/resources/messages/resources/{send → sms}/client/requests/Sms.d.ts +2 -2
- package/dist/cjs/api/resources/messages/resources/sms/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/messages/resources/{send/types/SendMmsResponse.d.ts → sms/types/SmsSendResponse.d.ts} +1 -1
- package/dist/cjs/api/resources/messages/resources/sms/types/index.d.ts +1 -0
- package/dist/cjs/api/resources/messages/resources/sms/types/index.js +17 -0
- package/dist/cjs/api/resources/phoneNumbers/client/requests/SearchPhoneNumberParams.d.ts +2 -2
- package/dist/cjs/api/resources/phoneNumbers/resources/campaign/client/Client.d.ts +2 -0
- package/dist/cjs/api/resources/phoneNumbers/resources/campaign/client/Client.js +6 -0
- package/dist/cjs/api/resources/phoneNumbers/resources/webhook/client/Client.d.ts +1 -0
- package/dist/cjs/api/resources/phoneNumbers/resources/webhook/client/Client.js +3 -0
- package/dist/cjs/api/resources/rcs/client/Client.d.ts +121 -0
- package/dist/cjs/api/resources/{messages/resources/send → rcs}/client/Client.js +76 -67
- 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/index.d.ts +3 -0
- package/dist/cjs/api/resources/status/resources/get/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/status/resources/get/client/Client.js +2 -2
- package/dist/cjs/api/types/ConversationList.d.ts +4 -4
- package/dist/cjs/api/types/DlcCampaignStatus.d.ts +2 -2
- package/dist/cjs/api/types/ExtendedRcsCampaign.d.ts +4 -2
- package/dist/cjs/api/types/Rcs.d.ts +3 -3
- package/dist/cjs/api/types/RcsCampaign.d.ts +4 -2
- package/dist/cjs/api/types/RcsCapabilitiesResult.d.ts +8 -0
- package/dist/cjs/api/types/RcsCapability.d.ts +36 -0
- package/dist/cjs/api/types/RcsCards.d.ts +2 -2
- package/dist/cjs/api/types/RcsCardsContent.d.ts +2 -2
- package/dist/cjs/api/types/RcsLinkResult.d.ts +13 -0
- package/dist/cjs/api/types/RcsLinkResult.js +5 -0
- package/dist/cjs/api/types/RcsMediaContent.d.ts +1 -1
- package/dist/cjs/api/types/RcsTextContent.d.ts +1 -1
- 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/{RcsButtonContent.d.ts → RichButton.d.ts} +2 -2
- package/dist/cjs/api/types/RichButton.js +5 -0
- package/dist/cjs/api/types/{RcsCard.d.ts → RichCardsMessage.d.ts} +1 -1
- package/dist/cjs/api/types/RichCardsMessage.js +5 -0
- package/dist/cjs/api/types/{RcsMedia.d.ts → RichMediaMessage.d.ts} +2 -2
- package/dist/cjs/api/types/RichMediaMessage.js +5 -0
- package/dist/cjs/api/types/{RcsText.d.ts → RichTextMessage.d.ts} +1 -1
- package/dist/cjs/api/types/RichTextMessage.js +5 -0
- package/dist/{esm/api/types/NullableContact.d.mts → cjs/api/types/UpsertContact.d.ts} +1 -1
- package/dist/cjs/api/types/UpsertContact.js +5 -0
- package/dist/cjs/api/types/index.d.ts +9 -5
- package/dist/cjs/api/types/index.js +9 -5
- package/dist/cjs/index.d.ts +4 -4
- package/dist/cjs/index.js +8 -8
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Client.d.mts +3 -3
- package/dist/esm/Client.mjs +7 -7
- package/dist/esm/api/resources/brands/client/Client.d.mts +2 -0
- package/dist/esm/api/resources/brands/client/Client.mjs +6 -0
- package/dist/esm/api/resources/brands/client/requests/UpsertBrandParams.d.mts +1 -1
- package/dist/esm/api/resources/campaigns/resources/dlc/client/Client.d.mts +6 -6
- package/dist/esm/api/resources/campaigns/resources/dlc/client/Client.mjs +6 -6
- package/dist/esm/api/resources/campaigns/resources/rcs/client/Client.d.mts +1 -0
- package/dist/esm/api/resources/campaigns/resources/rcs/client/Client.mjs +1 -0
- package/dist/esm/api/resources/campaigns/resources/rcs/client/requests/UpsertRcsCampaignParams.d.mts +5 -2
- package/dist/esm/api/resources/index.d.mts +2 -1
- package/dist/esm/api/resources/index.mjs +2 -1
- package/dist/esm/api/resources/messages/client/Client.d.mts +6 -3
- package/dist/esm/api/resources/messages/client/Client.mjs +12 -3
- package/dist/esm/api/resources/messages/resources/index.d.mts +6 -3
- package/dist/esm/api/resources/messages/resources/index.mjs +6 -3
- package/dist/esm/api/resources/messages/resources/mms/client/Client.d.mts +27 -0
- package/dist/esm/api/resources/messages/resources/mms/client/Client.mjs +86 -0
- package/dist/esm/api/resources/messages/resources/mms/client/index.d.mts +1 -0
- package/dist/esm/api/resources/messages/resources/mms/client/index.mjs +1 -1
- package/dist/esm/api/resources/messages/resources/{send → mms}/client/requests/index.d.mts +0 -1
- package/dist/esm/api/resources/messages/resources/mms/index.d.mts +1 -0
- package/dist/esm/api/resources/messages/resources/mms/index.mjs +1 -0
- package/dist/esm/api/resources/messages/resources/{send/types/SendRcsResponse.d.mts → mms/types/MmsSendResponse.d.mts} +1 -1
- package/dist/esm/api/resources/messages/resources/mms/types/index.d.mts +1 -0
- package/dist/esm/api/resources/messages/resources/mms/types/index.mjs +1 -0
- package/dist/esm/api/resources/messages/resources/rcs/client/Client.d.mts +29 -0
- package/dist/esm/api/resources/messages/resources/rcs/client/Client.mjs +88 -0
- package/dist/esm/api/resources/messages/resources/rcs/index.d.mts +1 -0
- package/dist/esm/api/resources/messages/resources/rcs/index.mjs +1 -0
- package/dist/esm/api/resources/messages/resources/{send/types/SendSmsResponse.d.mts → rcs/types/RcsSendResponse.d.mts} +1 -1
- package/dist/esm/api/resources/messages/resources/rcs/types/index.d.mts +1 -0
- package/dist/esm/api/resources/messages/resources/rcs/types/index.mjs +1 -0
- package/dist/esm/api/resources/{message → messages}/resources/sms/client/Client.d.mts +23 -1
- package/dist/esm/api/resources/{message → messages}/resources/sms/client/Client.mjs +82 -1
- package/dist/esm/api/resources/messages/resources/{send → sms}/client/requests/Sms.d.mts +2 -2
- package/dist/esm/api/resources/messages/resources/sms/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/messages/resources/{send/types/SendMmsResponse.d.mts → sms/types/SmsSendResponse.d.mts} +1 -1
- package/dist/esm/api/resources/messages/resources/sms/types/index.d.mts +1 -0
- package/dist/esm/api/resources/messages/resources/sms/types/index.mjs +1 -0
- package/dist/esm/api/resources/phoneNumbers/client/requests/SearchPhoneNumberParams.d.mts +2 -2
- package/dist/esm/api/resources/phoneNumbers/resources/campaign/client/Client.d.mts +2 -0
- package/dist/esm/api/resources/phoneNumbers/resources/campaign/client/Client.mjs +6 -0
- package/dist/esm/api/resources/phoneNumbers/resources/webhook/client/Client.d.mts +1 -0
- package/dist/esm/api/resources/phoneNumbers/resources/webhook/client/Client.mjs +3 -0
- package/dist/esm/api/resources/rcs/client/Client.d.mts +121 -0
- package/dist/esm/api/resources/{messages/resources/send → rcs}/client/Client.mjs +74 -65
- 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/index.d.mts +3 -0
- package/dist/esm/api/resources/status/resources/get/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/status/resources/get/client/Client.mjs +2 -2
- package/dist/esm/api/types/ConversationList.d.mts +4 -4
- package/dist/esm/api/types/DlcCampaignStatus.d.mts +2 -2
- package/dist/esm/api/types/ExtendedRcsCampaign.d.mts +4 -2
- package/dist/esm/api/types/Rcs.d.mts +3 -3
- package/dist/esm/api/types/RcsCampaign.d.mts +4 -2
- package/dist/esm/api/types/RcsCapabilitiesResult.d.mts +8 -0
- package/dist/esm/api/types/RcsCapability.d.mts +36 -0
- package/dist/esm/api/types/RcsCards.d.mts +2 -2
- package/dist/esm/api/types/RcsCardsContent.d.mts +2 -2
- package/dist/esm/api/types/RcsLinkResult.d.mts +13 -0
- package/dist/esm/api/types/RcsLinkResult.mjs +4 -0
- package/dist/esm/api/types/RcsMediaContent.d.mts +1 -1
- package/dist/esm/api/types/RcsTextContent.d.mts +1 -1
- 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/{RcsButtonContent.d.mts → RichButton.d.mts} +2 -2
- package/dist/esm/api/types/RichButton.mjs +4 -0
- package/dist/esm/api/types/{RcsCard.d.mts → RichCardsMessage.d.mts} +1 -1
- package/dist/esm/api/types/RichCardsMessage.mjs +4 -0
- package/dist/esm/api/types/{RcsMedia.d.mts → RichMediaMessage.d.mts} +2 -2
- package/dist/esm/api/types/RichMediaMessage.mjs +4 -0
- package/dist/esm/api/types/{RcsText.d.mts → RichTextMessage.d.mts} +1 -1
- package/dist/esm/api/types/RichTextMessage.mjs +4 -0
- package/dist/{cjs/api/types/NullableContact.d.ts → esm/api/types/UpsertContact.d.mts} +1 -1
- package/dist/esm/api/types/UpsertContact.mjs +4 -0
- package/dist/esm/api/types/index.d.mts +9 -5
- package/dist/esm/api/types/index.mjs +9 -5
- package/dist/esm/index.d.mts +4 -4
- package/dist/esm/index.mjs +4 -4
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +284 -56
- package/dist/cjs/api/resources/message/client/Client.d.ts +0 -22
- package/dist/cjs/api/resources/message/client/Client.js +0 -17
- package/dist/cjs/api/resources/message/client/index.d.ts +0 -1
- package/dist/cjs/api/resources/message/index.d.ts +0 -2
- package/dist/cjs/api/resources/message/resources/index.d.ts +0 -1
- package/dist/cjs/api/resources/message/resources/index.js +0 -37
- package/dist/cjs/api/resources/message/resources/sms/client/index.d.ts +0 -1
- package/dist/cjs/api/resources/messages/resources/send/client/Client.d.ts +0 -110
- package/dist/cjs/api/resources/messages/resources/send/types/index.d.ts +0 -3
- package/dist/cjs/api/resources/messages/resources/send/types/index.js +0 -19
- package/dist/esm/api/resources/message/client/Client.d.mts +0 -22
- package/dist/esm/api/resources/message/client/Client.mjs +0 -13
- package/dist/esm/api/resources/message/client/index.d.mts +0 -1
- package/dist/esm/api/resources/message/index.d.mts +0 -2
- package/dist/esm/api/resources/message/index.mjs +0 -2
- package/dist/esm/api/resources/message/resources/index.d.mts +0 -1
- package/dist/esm/api/resources/message/resources/index.mjs +0 -1
- package/dist/esm/api/resources/message/resources/sms/client/index.d.mts +0 -1
- package/dist/esm/api/resources/messages/resources/send/client/Client.d.mts +0 -110
- package/dist/esm/api/resources/messages/resources/send/types/index.d.mts +0 -3
- package/dist/esm/api/resources/messages/resources/send/types/index.mjs +0 -3
- /package/dist/cjs/api/resources/messages/resources/{send → mms}/client/requests/Mms.d.ts +0 -0
- /package/dist/cjs/api/resources/messages/resources/{send → mms}/client/requests/Mms.js +0 -0
- /package/dist/cjs/api/resources/{message/client → messages/resources/mms/client/requests}/index.js +0 -0
- /package/dist/cjs/api/resources/messages/resources/{send/client/requests/Sms.js → mms/types/MmsSendResponse.js} +0 -0
- /package/dist/cjs/api/resources/messages/resources/{send/types/SendMmsResponse.js → rcs/types/RcsSendResponse.js} +0 -0
- /package/dist/cjs/api/resources/messages/resources/{send → sms}/client/index.d.ts +0 -0
- /package/dist/cjs/api/resources/messages/resources/{send → sms}/client/index.js +0 -0
- /package/dist/cjs/api/resources/messages/resources/{send/types/SendRcsResponse.js → sms/client/requests/Sms.js} +0 -0
- /package/dist/cjs/api/resources/{message/resources/sms/client → messages/resources/sms/client/requests}/index.js +0 -0
- /package/dist/cjs/api/resources/messages/resources/{send → sms}/index.d.ts +0 -0
- /package/dist/cjs/api/resources/messages/resources/{send → sms}/index.js +0 -0
- /package/dist/cjs/api/resources/messages/resources/{send/types/SendSmsResponse.js → sms/types/SmsSendResponse.js} +0 -0
- /package/dist/cjs/api/{types/NullableContact.js → resources/rcs/client/requests/RcsCapabilitiesQuery.js} +0 -0
- /package/dist/cjs/api/{types/RcsButtonContent.js → resources/rcs/client/requests/RcsLinkRequest.js} +0 -0
- /package/dist/cjs/api/{types/RcsCard.js → resources/rcs/client/requests/RcsWhitelistRequest.js} +0 -0
- /package/dist/cjs/api/resources/{messages/resources/send → rcs}/client/requests/index.js +0 -0
- /package/dist/cjs/api/resources/{message/resources/sms → rcs}/index.d.ts +0 -0
- /package/dist/cjs/api/resources/{message/resources/sms → rcs}/index.js +0 -0
- /package/dist/cjs/api/types/{RcsMedia.js → RcsCapabilitiesResult.js} +0 -0
- /package/dist/cjs/api/types/{RcsText.js → RcsCapability.js} +0 -0
- /package/dist/esm/api/resources/messages/resources/{send → mms}/client/requests/Mms.d.mts +0 -0
- /package/dist/esm/api/resources/messages/resources/{send → mms}/client/requests/Mms.mjs +0 -0
- /package/dist/esm/api/resources/{message/client → messages/resources/mms/client/requests}/index.mjs +0 -0
- /package/dist/esm/api/resources/messages/resources/{send/client/requests/Sms.mjs → mms/types/MmsSendResponse.mjs} +0 -0
- /package/dist/esm/api/resources/messages/resources/{send/types/SendMmsResponse.mjs → rcs/types/RcsSendResponse.mjs} +0 -0
- /package/dist/esm/api/resources/messages/resources/{send → sms}/client/index.d.mts +0 -0
- /package/dist/esm/api/resources/messages/resources/{send → sms}/client/index.mjs +0 -0
- /package/dist/esm/api/resources/messages/resources/{send/types/SendRcsResponse.mjs → sms/client/requests/Sms.mjs} +0 -0
- /package/dist/esm/api/resources/{message/resources/sms/client → messages/resources/sms/client/requests}/index.mjs +0 -0
- /package/dist/esm/api/resources/messages/resources/{send → sms}/index.d.mts +0 -0
- /package/dist/esm/api/resources/messages/resources/{send → sms}/index.mjs +0 -0
- /package/dist/esm/api/resources/messages/resources/{send/types/SendSmsResponse.mjs → sms/types/SmsSendResponse.mjs} +0 -0
- /package/dist/esm/api/{types/NullableContact.mjs → resources/rcs/client/requests/RcsCapabilitiesQuery.mjs} +0 -0
- /package/dist/esm/api/{types/RcsButtonContent.mjs → resources/rcs/client/requests/RcsLinkRequest.mjs} +0 -0
- /package/dist/esm/api/{types/RcsCard.mjs → resources/rcs/client/requests/RcsWhitelistRequest.mjs} +0 -0
- /package/dist/esm/api/resources/{messages/resources/send → rcs}/client/requests/index.mjs +0 -0
- /package/dist/esm/api/resources/{message/resources/sms → rcs}/index.d.mts +0 -0
- /package/dist/esm/api/resources/{message/resources/sms → rcs}/index.mjs +0 -0
- /package/dist/esm/api/types/{RcsMedia.mjs → RcsCapabilitiesResult.mjs} +0 -0
- /package/dist/esm/api/types/{RcsText.mjs → RcsCapability.mjs} +0 -0
|
@@ -29,6 +29,33 @@ export declare namespace Mms {
|
|
|
29
29
|
export declare class Mms {
|
|
30
30
|
protected readonly _options: Mms.Options;
|
|
31
31
|
constructor(_options: Mms.Options);
|
|
32
|
+
/**
|
|
33
|
+
* Send a MMS immediately or schedule it for future delivery.
|
|
34
|
+
*
|
|
35
|
+
* @param {Pinnacle.messages.Mms} request
|
|
36
|
+
* @param {Mms.RequestOptions} requestOptions - Request-specific configuration.
|
|
37
|
+
*
|
|
38
|
+
* @throws {@link Pinnacle.BadRequestError}
|
|
39
|
+
* @throws {@link Pinnacle.UnauthorizedError}
|
|
40
|
+
* @throws {@link Pinnacle.PaymentRequiredError}
|
|
41
|
+
* @throws {@link Pinnacle.NotFoundError}
|
|
42
|
+
* @throws {@link Pinnacle.InternalServerError}
|
|
43
|
+
* @throws {@link Pinnacle.NotImplementedError}
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* await client.messages.mms.send({
|
|
47
|
+
* from: "+14155164736",
|
|
48
|
+
* mediaUrls: ["https://fastly.picsum.photos/id/941/300/300.jpg?hmac=mDxM9PWSqRDjecwSCEpzU4bj35gqnG7yA25OL29uNv0"],
|
|
49
|
+
* options: {
|
|
50
|
+
* multiple_messages: true,
|
|
51
|
+
* validate: true
|
|
52
|
+
* },
|
|
53
|
+
* text: "Check out this image!",
|
|
54
|
+
* to: "+14154746461"
|
|
55
|
+
* })
|
|
56
|
+
*/
|
|
57
|
+
send(request: Pinnacle.messages.Mms, requestOptions?: Mms.RequestOptions): core.HttpResponsePromise<Pinnacle.messages.MmsSendResponse>;
|
|
58
|
+
private __send;
|
|
32
59
|
/**
|
|
33
60
|
* Validate MMS message content without sending it.
|
|
34
61
|
*
|
|
@@ -19,6 +19,92 @@ export class Mms {
|
|
|
19
19
|
constructor(_options) {
|
|
20
20
|
this._options = _options;
|
|
21
21
|
}
|
|
22
|
+
/**
|
|
23
|
+
* Send a MMS immediately or schedule it for future delivery.
|
|
24
|
+
*
|
|
25
|
+
* @param {Pinnacle.messages.Mms} request
|
|
26
|
+
* @param {Mms.RequestOptions} requestOptions - Request-specific configuration.
|
|
27
|
+
*
|
|
28
|
+
* @throws {@link Pinnacle.BadRequestError}
|
|
29
|
+
* @throws {@link Pinnacle.UnauthorizedError}
|
|
30
|
+
* @throws {@link Pinnacle.PaymentRequiredError}
|
|
31
|
+
* @throws {@link Pinnacle.NotFoundError}
|
|
32
|
+
* @throws {@link Pinnacle.InternalServerError}
|
|
33
|
+
* @throws {@link Pinnacle.NotImplementedError}
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* await client.messages.mms.send({
|
|
37
|
+
* from: "+14155164736",
|
|
38
|
+
* mediaUrls: ["https://fastly.picsum.photos/id/941/300/300.jpg?hmac=mDxM9PWSqRDjecwSCEpzU4bj35gqnG7yA25OL29uNv0"],
|
|
39
|
+
* options: {
|
|
40
|
+
* multiple_messages: true,
|
|
41
|
+
* validate: true
|
|
42
|
+
* },
|
|
43
|
+
* text: "Check out this image!",
|
|
44
|
+
* to: "+14154746461"
|
|
45
|
+
* })
|
|
46
|
+
*/
|
|
47
|
+
send(request, requestOptions) {
|
|
48
|
+
return core.HttpResponsePromise.fromPromise(this.__send(request, requestOptions));
|
|
49
|
+
}
|
|
50
|
+
__send(request, requestOptions) {
|
|
51
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
52
|
+
var _a, _b, _c;
|
|
53
|
+
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
54
|
+
const _response = yield core.fetcher({
|
|
55
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PinnacleEnvironment.Default, "messages/send/mms"),
|
|
56
|
+
method: "POST",
|
|
57
|
+
headers: _headers,
|
|
58
|
+
contentType: "application/json",
|
|
59
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
60
|
+
requestType: "json",
|
|
61
|
+
body: request,
|
|
62
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
63
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
64
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
65
|
+
});
|
|
66
|
+
if (_response.ok) {
|
|
67
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
68
|
+
}
|
|
69
|
+
if (_response.error.reason === "status-code") {
|
|
70
|
+
switch (_response.error.statusCode) {
|
|
71
|
+
case 400:
|
|
72
|
+
throw new Pinnacle.BadRequestError(_response.error.body, _response.rawResponse);
|
|
73
|
+
case 401:
|
|
74
|
+
throw new Pinnacle.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
75
|
+
case 402:
|
|
76
|
+
throw new Pinnacle.PaymentRequiredError(_response.error.body, _response.rawResponse);
|
|
77
|
+
case 404:
|
|
78
|
+
throw new Pinnacle.NotFoundError(_response.error.body, _response.rawResponse);
|
|
79
|
+
case 500:
|
|
80
|
+
throw new Pinnacle.InternalServerError(_response.error.body, _response.rawResponse);
|
|
81
|
+
case 501:
|
|
82
|
+
throw new Pinnacle.NotImplementedError(_response.error.body, _response.rawResponse);
|
|
83
|
+
default:
|
|
84
|
+
throw new errors.PinnacleError({
|
|
85
|
+
statusCode: _response.error.statusCode,
|
|
86
|
+
body: _response.error.body,
|
|
87
|
+
rawResponse: _response.rawResponse,
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
switch (_response.error.reason) {
|
|
92
|
+
case "non-json":
|
|
93
|
+
throw new errors.PinnacleError({
|
|
94
|
+
statusCode: _response.error.statusCode,
|
|
95
|
+
body: _response.error.rawBody,
|
|
96
|
+
rawResponse: _response.rawResponse,
|
|
97
|
+
});
|
|
98
|
+
case "timeout":
|
|
99
|
+
throw new errors.PinnacleTimeoutError("Timeout exceeded when calling POST /messages/send/mms.");
|
|
100
|
+
case "unknown":
|
|
101
|
+
throw new errors.PinnacleError({
|
|
102
|
+
message: _response.error.errorMessage,
|
|
103
|
+
rawResponse: _response.rawResponse,
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
}
|
|
22
108
|
/**
|
|
23
109
|
* Validate MMS message content without sending it.
|
|
24
110
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from "./requests/index.mjs";
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
import * as Pinnacle from "../../../../../index.mjs";
|
|
5
|
-
export type
|
|
5
|
+
export type MmsSendResponse = Pinnacle.SentMmsDetails | Pinnacle.ScheduledMessaage;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./MmsSendResponse.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./MmsSendResponse.mjs";
|
|
@@ -29,6 +29,35 @@ export declare namespace Rcs {
|
|
|
29
29
|
export declare class Rcs {
|
|
30
30
|
protected readonly _options: Rcs.Options;
|
|
31
31
|
constructor(_options: Rcs.Options);
|
|
32
|
+
/**
|
|
33
|
+
* Send a RCS message immediately or schedule it for future delivery. <br>
|
|
34
|
+
*
|
|
35
|
+
* Requires an active RCS agent and recipient devices that support RCS Business Messaging.
|
|
36
|
+
*
|
|
37
|
+
* @param {Pinnacle.Rcs} request
|
|
38
|
+
* @param {Rcs.RequestOptions} requestOptions - Request-specific configuration.
|
|
39
|
+
*
|
|
40
|
+
* @throws {@link Pinnacle.BadRequestError}
|
|
41
|
+
* @throws {@link Pinnacle.UnauthorizedError}
|
|
42
|
+
* @throws {@link Pinnacle.PaymentRequiredError}
|
|
43
|
+
* @throws {@link Pinnacle.NotFoundError}
|
|
44
|
+
* @throws {@link Pinnacle.InternalServerError}
|
|
45
|
+
* @throws {@link Pinnacle.NotImplementedError}
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* await client.messages.rcs.send({
|
|
49
|
+
* quickReplies: [{
|
|
50
|
+
* type: "openUrl",
|
|
51
|
+
* payload: "payload",
|
|
52
|
+
* title: "title"
|
|
53
|
+
* }],
|
|
54
|
+
* text: "text",
|
|
55
|
+
* from: "from",
|
|
56
|
+
* to: "to"
|
|
57
|
+
* })
|
|
58
|
+
*/
|
|
59
|
+
send(request: Pinnacle.Rcs, requestOptions?: Rcs.RequestOptions): core.HttpResponsePromise<Pinnacle.messages.RcsSendResponse>;
|
|
60
|
+
private __send;
|
|
32
61
|
/**
|
|
33
62
|
* Validate RCS message content without sending it.
|
|
34
63
|
*
|
|
@@ -19,6 +19,94 @@ export class Rcs {
|
|
|
19
19
|
constructor(_options) {
|
|
20
20
|
this._options = _options;
|
|
21
21
|
}
|
|
22
|
+
/**
|
|
23
|
+
* Send a RCS message immediately or schedule it for future delivery. <br>
|
|
24
|
+
*
|
|
25
|
+
* Requires an active RCS agent and recipient devices that support RCS Business Messaging.
|
|
26
|
+
*
|
|
27
|
+
* @param {Pinnacle.Rcs} request
|
|
28
|
+
* @param {Rcs.RequestOptions} requestOptions - Request-specific configuration.
|
|
29
|
+
*
|
|
30
|
+
* @throws {@link Pinnacle.BadRequestError}
|
|
31
|
+
* @throws {@link Pinnacle.UnauthorizedError}
|
|
32
|
+
* @throws {@link Pinnacle.PaymentRequiredError}
|
|
33
|
+
* @throws {@link Pinnacle.NotFoundError}
|
|
34
|
+
* @throws {@link Pinnacle.InternalServerError}
|
|
35
|
+
* @throws {@link Pinnacle.NotImplementedError}
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* await client.messages.rcs.send({
|
|
39
|
+
* quickReplies: [{
|
|
40
|
+
* type: "openUrl",
|
|
41
|
+
* payload: "payload",
|
|
42
|
+
* title: "title"
|
|
43
|
+
* }],
|
|
44
|
+
* text: "text",
|
|
45
|
+
* from: "from",
|
|
46
|
+
* to: "to"
|
|
47
|
+
* })
|
|
48
|
+
*/
|
|
49
|
+
send(request, requestOptions) {
|
|
50
|
+
return core.HttpResponsePromise.fromPromise(this.__send(request, requestOptions));
|
|
51
|
+
}
|
|
52
|
+
__send(request, requestOptions) {
|
|
53
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
54
|
+
var _a, _b, _c;
|
|
55
|
+
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
56
|
+
const _response = yield core.fetcher({
|
|
57
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PinnacleEnvironment.Default, "messages/send/rcs"),
|
|
58
|
+
method: "POST",
|
|
59
|
+
headers: _headers,
|
|
60
|
+
contentType: "application/json",
|
|
61
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
62
|
+
requestType: "json",
|
|
63
|
+
body: request,
|
|
64
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
65
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
66
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
67
|
+
});
|
|
68
|
+
if (_response.ok) {
|
|
69
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
70
|
+
}
|
|
71
|
+
if (_response.error.reason === "status-code") {
|
|
72
|
+
switch (_response.error.statusCode) {
|
|
73
|
+
case 400:
|
|
74
|
+
throw new Pinnacle.BadRequestError(_response.error.body, _response.rawResponse);
|
|
75
|
+
case 401:
|
|
76
|
+
throw new Pinnacle.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
77
|
+
case 402:
|
|
78
|
+
throw new Pinnacle.PaymentRequiredError(_response.error.body, _response.rawResponse);
|
|
79
|
+
case 404:
|
|
80
|
+
throw new Pinnacle.NotFoundError(_response.error.body, _response.rawResponse);
|
|
81
|
+
case 500:
|
|
82
|
+
throw new Pinnacle.InternalServerError(_response.error.body, _response.rawResponse);
|
|
83
|
+
case 501:
|
|
84
|
+
throw new Pinnacle.NotImplementedError(_response.error.body, _response.rawResponse);
|
|
85
|
+
default:
|
|
86
|
+
throw new errors.PinnacleError({
|
|
87
|
+
statusCode: _response.error.statusCode,
|
|
88
|
+
body: _response.error.body,
|
|
89
|
+
rawResponse: _response.rawResponse,
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
switch (_response.error.reason) {
|
|
94
|
+
case "non-json":
|
|
95
|
+
throw new errors.PinnacleError({
|
|
96
|
+
statusCode: _response.error.statusCode,
|
|
97
|
+
body: _response.error.rawBody,
|
|
98
|
+
rawResponse: _response.rawResponse,
|
|
99
|
+
});
|
|
100
|
+
case "timeout":
|
|
101
|
+
throw new errors.PinnacleTimeoutError("Timeout exceeded when calling POST /messages/send/rcs.");
|
|
102
|
+
case "unknown":
|
|
103
|
+
throw new errors.PinnacleError({
|
|
104
|
+
message: _response.error.errorMessage,
|
|
105
|
+
rawResponse: _response.rawResponse,
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
}
|
|
22
110
|
/**
|
|
23
111
|
* Validate RCS message content without sending it.
|
|
24
112
|
*
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
import * as Pinnacle from "../../../../../index.mjs";
|
|
5
|
-
export type
|
|
5
|
+
export type RcsSendResponse = Pinnacle.SentRcsDetails | Pinnacle.ScheduledMessaage;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./RcsSendResponse.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./RcsSendResponse.mjs";
|
|
@@ -29,6 +29,28 @@ export declare namespace Sms {
|
|
|
29
29
|
export declare class Sms {
|
|
30
30
|
protected readonly _options: Sms.Options;
|
|
31
31
|
constructor(_options: Sms.Options);
|
|
32
|
+
/**
|
|
33
|
+
* Send a SMS message immediately or schedule it for future delivery.
|
|
34
|
+
*
|
|
35
|
+
* @param {Pinnacle.messages.Sms} request
|
|
36
|
+
* @param {Sms.RequestOptions} requestOptions - Request-specific configuration.
|
|
37
|
+
*
|
|
38
|
+
* @throws {@link Pinnacle.BadRequestError}
|
|
39
|
+
* @throws {@link Pinnacle.UnauthorizedError}
|
|
40
|
+
* @throws {@link Pinnacle.PaymentRequiredError}
|
|
41
|
+
* @throws {@link Pinnacle.NotFoundError}
|
|
42
|
+
* @throws {@link Pinnacle.InternalServerError}
|
|
43
|
+
* @throws {@link Pinnacle.NotImplementedError}
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* await client.messages.sms.send({
|
|
47
|
+
* from: "+14155164736",
|
|
48
|
+
* text: "Hey!",
|
|
49
|
+
* to: "+14154746461"
|
|
50
|
+
* })
|
|
51
|
+
*/
|
|
52
|
+
send(request: Pinnacle.messages.Sms, requestOptions?: Sms.RequestOptions): core.HttpResponsePromise<Pinnacle.messages.SmsSendResponse>;
|
|
53
|
+
private __send;
|
|
32
54
|
/**
|
|
33
55
|
* Validate SMS message content without sending it.
|
|
34
56
|
*
|
|
@@ -40,7 +62,7 @@ export declare class Sms {
|
|
|
40
62
|
* @throws {@link Pinnacle.InternalServerError}
|
|
41
63
|
*
|
|
42
64
|
* @example
|
|
43
|
-
* await client.
|
|
65
|
+
* await client.messages.sms.validate({
|
|
44
66
|
* text: "Hello from Pinnacle"
|
|
45
67
|
* })
|
|
46
68
|
*/
|
|
@@ -19,6 +19,87 @@ export class Sms {
|
|
|
19
19
|
constructor(_options) {
|
|
20
20
|
this._options = _options;
|
|
21
21
|
}
|
|
22
|
+
/**
|
|
23
|
+
* Send a SMS message immediately or schedule it for future delivery.
|
|
24
|
+
*
|
|
25
|
+
* @param {Pinnacle.messages.Sms} request
|
|
26
|
+
* @param {Sms.RequestOptions} requestOptions - Request-specific configuration.
|
|
27
|
+
*
|
|
28
|
+
* @throws {@link Pinnacle.BadRequestError}
|
|
29
|
+
* @throws {@link Pinnacle.UnauthorizedError}
|
|
30
|
+
* @throws {@link Pinnacle.PaymentRequiredError}
|
|
31
|
+
* @throws {@link Pinnacle.NotFoundError}
|
|
32
|
+
* @throws {@link Pinnacle.InternalServerError}
|
|
33
|
+
* @throws {@link Pinnacle.NotImplementedError}
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* await client.messages.sms.send({
|
|
37
|
+
* from: "+14155164736",
|
|
38
|
+
* text: "Hey!",
|
|
39
|
+
* to: "+14154746461"
|
|
40
|
+
* })
|
|
41
|
+
*/
|
|
42
|
+
send(request, requestOptions) {
|
|
43
|
+
return core.HttpResponsePromise.fromPromise(this.__send(request, requestOptions));
|
|
44
|
+
}
|
|
45
|
+
__send(request, requestOptions) {
|
|
46
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
47
|
+
var _a, _b, _c;
|
|
48
|
+
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
49
|
+
const _response = yield core.fetcher({
|
|
50
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PinnacleEnvironment.Default, "messages/send/sms"),
|
|
51
|
+
method: "POST",
|
|
52
|
+
headers: _headers,
|
|
53
|
+
contentType: "application/json",
|
|
54
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
55
|
+
requestType: "json",
|
|
56
|
+
body: request,
|
|
57
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
58
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
59
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
60
|
+
});
|
|
61
|
+
if (_response.ok) {
|
|
62
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
63
|
+
}
|
|
64
|
+
if (_response.error.reason === "status-code") {
|
|
65
|
+
switch (_response.error.statusCode) {
|
|
66
|
+
case 400:
|
|
67
|
+
throw new Pinnacle.BadRequestError(_response.error.body, _response.rawResponse);
|
|
68
|
+
case 401:
|
|
69
|
+
throw new Pinnacle.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
70
|
+
case 402:
|
|
71
|
+
throw new Pinnacle.PaymentRequiredError(_response.error.body, _response.rawResponse);
|
|
72
|
+
case 404:
|
|
73
|
+
throw new Pinnacle.NotFoundError(_response.error.body, _response.rawResponse);
|
|
74
|
+
case 500:
|
|
75
|
+
throw new Pinnacle.InternalServerError(_response.error.body, _response.rawResponse);
|
|
76
|
+
case 501:
|
|
77
|
+
throw new Pinnacle.NotImplementedError(_response.error.body, _response.rawResponse);
|
|
78
|
+
default:
|
|
79
|
+
throw new errors.PinnacleError({
|
|
80
|
+
statusCode: _response.error.statusCode,
|
|
81
|
+
body: _response.error.body,
|
|
82
|
+
rawResponse: _response.rawResponse,
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
switch (_response.error.reason) {
|
|
87
|
+
case "non-json":
|
|
88
|
+
throw new errors.PinnacleError({
|
|
89
|
+
statusCode: _response.error.statusCode,
|
|
90
|
+
body: _response.error.rawBody,
|
|
91
|
+
rawResponse: _response.rawResponse,
|
|
92
|
+
});
|
|
93
|
+
case "timeout":
|
|
94
|
+
throw new errors.PinnacleTimeoutError("Timeout exceeded when calling POST /messages/send/sms.");
|
|
95
|
+
case "unknown":
|
|
96
|
+
throw new errors.PinnacleError({
|
|
97
|
+
message: _response.error.errorMessage,
|
|
98
|
+
rawResponse: _response.rawResponse,
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
}
|
|
22
103
|
/**
|
|
23
104
|
* Validate SMS message content without sending it.
|
|
24
105
|
*
|
|
@@ -30,7 +111,7 @@ export class Sms {
|
|
|
30
111
|
* @throws {@link Pinnacle.InternalServerError}
|
|
31
112
|
*
|
|
32
113
|
* @example
|
|
33
|
-
* await client.
|
|
114
|
+
* await client.messages.sms.validate({
|
|
34
115
|
* text: "Hello from Pinnacle"
|
|
35
116
|
* })
|
|
36
117
|
*/
|
|
@@ -6,14 +6,14 @@ import * as Pinnacle from "../../../../../../index.mjs";
|
|
|
6
6
|
* @example
|
|
7
7
|
* {
|
|
8
8
|
* from: "+14155164736",
|
|
9
|
-
* text: "Hey!
|
|
9
|
+
* text: "Hey!",
|
|
10
10
|
* to: "+14154746461"
|
|
11
11
|
* }
|
|
12
12
|
*
|
|
13
13
|
* @example
|
|
14
14
|
* {
|
|
15
15
|
* from: "+14155164736",
|
|
16
|
-
* text: "Hey!
|
|
16
|
+
* text: "Hey!",
|
|
17
17
|
* to: "+14154746461"
|
|
18
18
|
* }
|
|
19
19
|
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { type Sms } from "./Sms.mjs";
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
import * as Pinnacle from "../../../../../index.mjs";
|
|
5
|
-
export type
|
|
5
|
+
export type SmsSendResponse = Pinnacle.SentSmsDetails | Pinnacle.ScheduledMessaage;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./SmsSendResponse.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./SmsSendResponse.mjs";
|
|
@@ -29,7 +29,7 @@ export interface SearchPhoneNumberParams {
|
|
|
29
29
|
*/
|
|
30
30
|
location?: SearchPhoneNumberParams.Location;
|
|
31
31
|
/** Filter your search by digit pattern. */
|
|
32
|
-
number?: SearchPhoneNumberParams.
|
|
32
|
+
number?: SearchPhoneNumberParams.Number;
|
|
33
33
|
/** Extra search settings to control how many results you get. */
|
|
34
34
|
options?: SearchPhoneNumberParams.Options;
|
|
35
35
|
/** Types of phone numbers to return in your search. */
|
|
@@ -58,7 +58,7 @@ export declare namespace SearchPhoneNumberParams {
|
|
|
58
58
|
/**
|
|
59
59
|
* Filter your search by digit pattern.
|
|
60
60
|
*/
|
|
61
|
-
interface
|
|
61
|
+
interface Number {
|
|
62
62
|
/** Your search will return only numbers that contain this digit sequence anywhere within them. */
|
|
63
63
|
contains?: string;
|
|
64
64
|
/** Your search will return only numbers that end with these digits. */
|
|
@@ -39,6 +39,7 @@ 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({
|
|
@@ -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({
|
|
@@ -29,6 +29,7 @@ export class Campaign {
|
|
|
29
29
|
* @throws {@link Pinnacle.UnauthorizedError}
|
|
30
30
|
* @throws {@link Pinnacle.NotFoundError}
|
|
31
31
|
* @throws {@link Pinnacle.InternalServerError}
|
|
32
|
+
* @throws {@link Pinnacle.NotImplementedError}
|
|
32
33
|
*
|
|
33
34
|
* @example
|
|
34
35
|
* await client.phoneNumbers.campaign.attach({
|
|
@@ -69,6 +70,8 @@ export class Campaign {
|
|
|
69
70
|
throw new Pinnacle.NotFoundError(_response.error.body, _response.rawResponse);
|
|
70
71
|
case 500:
|
|
71
72
|
throw new Pinnacle.InternalServerError(_response.error.body, _response.rawResponse);
|
|
73
|
+
case 501:
|
|
74
|
+
throw new Pinnacle.NotImplementedError(_response.error.body, _response.rawResponse);
|
|
72
75
|
default:
|
|
73
76
|
throw new errors.PinnacleError({
|
|
74
77
|
statusCode: _response.error.statusCode,
|
|
@@ -104,6 +107,7 @@ export class Campaign {
|
|
|
104
107
|
* @throws {@link Pinnacle.UnauthorizedError}
|
|
105
108
|
* @throws {@link Pinnacle.NotFoundError}
|
|
106
109
|
* @throws {@link Pinnacle.InternalServerError}
|
|
110
|
+
* @throws {@link Pinnacle.NotImplementedError}
|
|
107
111
|
*
|
|
108
112
|
* @example
|
|
109
113
|
* await client.phoneNumbers.campaign.detach({
|
|
@@ -142,6 +146,8 @@ export class Campaign {
|
|
|
142
146
|
throw new Pinnacle.NotFoundError(_response.error.body, _response.rawResponse);
|
|
143
147
|
case 500:
|
|
144
148
|
throw new Pinnacle.InternalServerError(_response.error.body, _response.rawResponse);
|
|
149
|
+
case 501:
|
|
150
|
+
throw new Pinnacle.NotImplementedError(_response.error.body, _response.rawResponse);
|
|
145
151
|
default:
|
|
146
152
|
throw new errors.PinnacleError({
|
|
147
153
|
statusCode: _response.error.statusCode,
|
|
@@ -68,6 +68,7 @@ export declare class Webhook {
|
|
|
68
68
|
* @throws {@link Pinnacle.UnauthorizedError}
|
|
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.phoneNumbers.webhook.detach("+14155551234", 123)
|
|
@@ -115,6 +115,7 @@ export class Webhook {
|
|
|
115
115
|
* @throws {@link Pinnacle.UnauthorizedError}
|
|
116
116
|
* @throws {@link Pinnacle.NotFoundError}
|
|
117
117
|
* @throws {@link Pinnacle.InternalServerError}
|
|
118
|
+
* @throws {@link Pinnacle.NotImplementedError}
|
|
118
119
|
*
|
|
119
120
|
* @example
|
|
120
121
|
* await client.phoneNumbers.webhook.detach("+14155551234", 123)
|
|
@@ -148,6 +149,8 @@ export class Webhook {
|
|
|
148
149
|
throw new Pinnacle.NotFoundError(_response.error.body, _response.rawResponse);
|
|
149
150
|
case 500:
|
|
150
151
|
throw new Pinnacle.InternalServerError(_response.error.body, _response.rawResponse);
|
|
152
|
+
case 501:
|
|
153
|
+
throw new Pinnacle.NotImplementedError(_response.error.body, _response.rawResponse);
|
|
151
154
|
default:
|
|
152
155
|
throw new errors.PinnacleError({
|
|
153
156
|
statusCode: _response.error.statusCode,
|