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
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as environments from "../../../../environments.mjs";
|
|
5
|
+
import * as core from "../../../../core/index.mjs";
|
|
6
|
+
import * as Pinnacle from "../../../index.mjs";
|
|
7
|
+
export declare namespace Rcs {
|
|
8
|
+
interface Options {
|
|
9
|
+
environment?: core.Supplier<environments.PinnacleEnvironment | string>;
|
|
10
|
+
/** Specify a custom URL to connect the client to. */
|
|
11
|
+
baseUrl?: core.Supplier<string>;
|
|
12
|
+
apiKey: core.Supplier<string>;
|
|
13
|
+
/** Additional headers to include in requests. */
|
|
14
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
15
|
+
}
|
|
16
|
+
interface RequestOptions {
|
|
17
|
+
/** The maximum time to wait for a response in seconds. */
|
|
18
|
+
timeoutInSeconds?: number;
|
|
19
|
+
/** The number of times to retry the request. Defaults to 2. */
|
|
20
|
+
maxRetries?: number;
|
|
21
|
+
/** A hook to abort the request. */
|
|
22
|
+
abortSignal?: AbortSignal;
|
|
23
|
+
/** Additional query string parameters to include in the request. */
|
|
24
|
+
queryParams?: Record<string, unknown>;
|
|
25
|
+
/** Additional headers to include in the request. */
|
|
26
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
export declare class Rcs {
|
|
30
|
+
protected readonly _options: Rcs.Options;
|
|
31
|
+
constructor(_options: Rcs.Options);
|
|
32
|
+
/**
|
|
33
|
+
* Check RCS capabilities for one or more phone numbers.
|
|
34
|
+
*
|
|
35
|
+
* This endpoint allows you to verify which RCS features (cards, buttons, etc.) are supported
|
|
36
|
+
* on specific phone numbers before sending RCS messages to them.
|
|
37
|
+
*
|
|
38
|
+
* @param {Pinnacle.RcsCapabilitiesQuery} request
|
|
39
|
+
* @param {Rcs.RequestOptions} requestOptions - Request-specific configuration.
|
|
40
|
+
*
|
|
41
|
+
* @throws {@link Pinnacle.BadRequestError}
|
|
42
|
+
* @throws {@link Pinnacle.UnauthorizedError}
|
|
43
|
+
* @throws {@link Pinnacle.InternalServerError}
|
|
44
|
+
* @throws {@link Pinnacle.NotImplementedError}
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* await client.rcs.getCapabilities({
|
|
48
|
+
* phoneNumbers: ["+12345678901", "+19876543210"]
|
|
49
|
+
* })
|
|
50
|
+
*/
|
|
51
|
+
getCapabilities(request: Pinnacle.RcsCapabilitiesQuery, requestOptions?: Rcs.RequestOptions): core.HttpResponsePromise<Pinnacle.RcsCapabilitiesResult>;
|
|
52
|
+
private __getCapabilities;
|
|
53
|
+
/**
|
|
54
|
+
* Whitelist a phone number for testing with your test RCS agent.
|
|
55
|
+
*
|
|
56
|
+
* ## Overview
|
|
57
|
+
* During development and testing, RCS agents can only send messages to whitelisted phone numbers.
|
|
58
|
+
* Use this endpoint to add test devices to your agent's whitelist before sending test messages.
|
|
59
|
+
*
|
|
60
|
+
* ## Verification Process
|
|
61
|
+
* After whitelisting a number, you'll need to complete verification:
|
|
62
|
+
*
|
|
63
|
+
* 1. Check the test device for an "RBM Tester Management" request
|
|
64
|
+
* 2. Accept the request on the device
|
|
65
|
+
* 3. Enter the 4-digit verification code in the Pinnacle dashboard at:
|
|
66
|
+
* ```
|
|
67
|
+
* https://app.pinnacle.sh/dashboard/brands/{brandId}?campaignId={campaignId}&campaignType=RCS
|
|
68
|
+
* ```
|
|
69
|
+
*
|
|
70
|
+
* > **Important Notes**
|
|
71
|
+
* >
|
|
72
|
+
* > - **Testing only:** This is only required for test agents. Production agents can message any RCS-enabled number
|
|
73
|
+
* > - **AT&T limitation:** Whitelisting may currently fail for AT&T numbers
|
|
74
|
+
* > - **Verification required:** The whitelist request isn't complete until you verify the device.
|
|
75
|
+
*
|
|
76
|
+
* @param {Pinnacle.RcsWhitelistRequest} request
|
|
77
|
+
* @param {Rcs.RequestOptions} requestOptions - Request-specific configuration.
|
|
78
|
+
*
|
|
79
|
+
* @throws {@link Pinnacle.BadRequestError}
|
|
80
|
+
* @throws {@link Pinnacle.UnauthorizedError}
|
|
81
|
+
* @throws {@link Pinnacle.NotFoundError}
|
|
82
|
+
* @throws {@link Pinnacle.InternalServerError}
|
|
83
|
+
* @throws {@link Pinnacle.NotImplementedError}
|
|
84
|
+
*
|
|
85
|
+
* @example
|
|
86
|
+
* await client.rcs.whitelist({
|
|
87
|
+
* agentId: "agent_XXXXXXXXXXXX",
|
|
88
|
+
* phoneNumber: "+12345678901"
|
|
89
|
+
* })
|
|
90
|
+
*/
|
|
91
|
+
whitelist(request: Pinnacle.RcsWhitelistRequest, requestOptions?: Rcs.RequestOptions): core.HttpResponsePromise<Pinnacle.RcsWhitelistResponse>;
|
|
92
|
+
private __whitelist;
|
|
93
|
+
/**
|
|
94
|
+
* Generate a link for initiating an RCS conversation with your agent.
|
|
95
|
+
*
|
|
96
|
+
* Users can click these links to start conversations with your RCS agent directly
|
|
97
|
+
* from websites, emails, or other applications.
|
|
98
|
+
*
|
|
99
|
+
* @param {Pinnacle.RcsLinkRequest} request
|
|
100
|
+
* @param {Rcs.RequestOptions} requestOptions - Request-specific configuration.
|
|
101
|
+
*
|
|
102
|
+
* @throws {@link Pinnacle.BadRequestError}
|
|
103
|
+
* @throws {@link Pinnacle.UnauthorizedError}
|
|
104
|
+
* @throws {@link Pinnacle.NotFoundError}
|
|
105
|
+
* @throws {@link Pinnacle.InternalServerError}
|
|
106
|
+
* @throws {@link Pinnacle.NotImplementedError}
|
|
107
|
+
*
|
|
108
|
+
* @example
|
|
109
|
+
* await client.rcs.getLink({
|
|
110
|
+
* agentId: "agent_XXXXXXXXXXXX",
|
|
111
|
+
* testMode: false,
|
|
112
|
+
* phoneNumber: "+12345678901",
|
|
113
|
+
* body: "Hello, I need help with my order"
|
|
114
|
+
* })
|
|
115
|
+
*/
|
|
116
|
+
getLink(request: Pinnacle.RcsLinkRequest, requestOptions?: Rcs.RequestOptions): core.HttpResponsePromise<Pinnacle.RcsLinkResult>;
|
|
117
|
+
private __getLink;
|
|
118
|
+
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
119
|
+
"PINNACLE-API-KEY": string;
|
|
120
|
+
}>;
|
|
121
|
+
}
|
|
@@ -10,43 +10,43 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
11
11
|
});
|
|
12
12
|
};
|
|
13
|
-
import * as environments from "
|
|
14
|
-
import * as core from "
|
|
15
|
-
import * as Pinnacle from "
|
|
16
|
-
import { mergeHeaders, mergeOnlyDefinedHeaders } from "
|
|
17
|
-
import * as errors from "
|
|
18
|
-
export class
|
|
13
|
+
import * as environments from "../../../../environments.mjs";
|
|
14
|
+
import * as core from "../../../../core/index.mjs";
|
|
15
|
+
import * as Pinnacle from "../../../index.mjs";
|
|
16
|
+
import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.mjs";
|
|
17
|
+
import * as errors from "../../../../errors/index.mjs";
|
|
18
|
+
export class Rcs {
|
|
19
19
|
constructor(_options) {
|
|
20
20
|
this._options = _options;
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
23
|
+
* Check RCS capabilities for one or more phone numbers.
|
|
24
24
|
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
25
|
+
* This endpoint allows you to verify which RCS features (cards, buttons, etc.) are supported
|
|
26
|
+
* on specific phone numbers before sending RCS messages to them.
|
|
27
|
+
*
|
|
28
|
+
* @param {Pinnacle.RcsCapabilitiesQuery} request
|
|
29
|
+
* @param {Rcs.RequestOptions} requestOptions - Request-specific configuration.
|
|
27
30
|
*
|
|
28
31
|
* @throws {@link Pinnacle.BadRequestError}
|
|
29
32
|
* @throws {@link Pinnacle.UnauthorizedError}
|
|
30
|
-
* @throws {@link Pinnacle.PaymentRequiredError}
|
|
31
|
-
* @throws {@link Pinnacle.NotFoundError}
|
|
32
33
|
* @throws {@link Pinnacle.InternalServerError}
|
|
34
|
+
* @throws {@link Pinnacle.NotImplementedError}
|
|
33
35
|
*
|
|
34
36
|
* @example
|
|
35
|
-
* await client.
|
|
36
|
-
*
|
|
37
|
-
* text: "Hey! \uD83D\uDE02",
|
|
38
|
-
* to: "+14154746461"
|
|
37
|
+
* await client.rcs.getCapabilities({
|
|
38
|
+
* phoneNumbers: ["+12345678901", "+19876543210"]
|
|
39
39
|
* })
|
|
40
40
|
*/
|
|
41
|
-
|
|
42
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
41
|
+
getCapabilities(request, requestOptions) {
|
|
42
|
+
return core.HttpResponsePromise.fromPromise(this.__getCapabilities(request, requestOptions));
|
|
43
43
|
}
|
|
44
|
-
|
|
44
|
+
__getCapabilities(request, requestOptions) {
|
|
45
45
|
return __awaiter(this, void 0, void 0, function* () {
|
|
46
46
|
var _a, _b, _c;
|
|
47
47
|
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);
|
|
48
48
|
const _response = yield core.fetcher({
|
|
49
|
-
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, "
|
|
49
|
+
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, "rcs/capabilities"),
|
|
50
50
|
method: "POST",
|
|
51
51
|
headers: _headers,
|
|
52
52
|
contentType: "application/json",
|
|
@@ -66,12 +66,10 @@ export class Send {
|
|
|
66
66
|
throw new Pinnacle.BadRequestError(_response.error.body, _response.rawResponse);
|
|
67
67
|
case 401:
|
|
68
68
|
throw new Pinnacle.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
69
|
-
case 402:
|
|
70
|
-
throw new Pinnacle.PaymentRequiredError(_response.error.body, _response.rawResponse);
|
|
71
|
-
case 404:
|
|
72
|
-
throw new Pinnacle.NotFoundError(_response.error.body, _response.rawResponse);
|
|
73
69
|
case 500:
|
|
74
70
|
throw new Pinnacle.InternalServerError(_response.error.body, _response.rawResponse);
|
|
71
|
+
case 501:
|
|
72
|
+
throw new Pinnacle.NotImplementedError(_response.error.body, _response.rawResponse);
|
|
75
73
|
default:
|
|
76
74
|
throw new errors.PinnacleError({
|
|
77
75
|
statusCode: _response.error.statusCode,
|
|
@@ -88,7 +86,7 @@ export class Send {
|
|
|
88
86
|
rawResponse: _response.rawResponse,
|
|
89
87
|
});
|
|
90
88
|
case "timeout":
|
|
91
|
-
throw new errors.PinnacleTimeoutError("Timeout exceeded when calling POST /
|
|
89
|
+
throw new errors.PinnacleTimeoutError("Timeout exceeded when calling POST /rcs/capabilities.");
|
|
92
90
|
case "unknown":
|
|
93
91
|
throw new errors.PinnacleError({
|
|
94
92
|
message: _response.error.errorMessage,
|
|
@@ -98,38 +96,52 @@ export class Send {
|
|
|
98
96
|
});
|
|
99
97
|
}
|
|
100
98
|
/**
|
|
101
|
-
*
|
|
99
|
+
* Whitelist a phone number for testing with your test RCS agent.
|
|
100
|
+
*
|
|
101
|
+
* ## Overview
|
|
102
|
+
* During development and testing, RCS agents can only send messages to whitelisted phone numbers.
|
|
103
|
+
* Use this endpoint to add test devices to your agent's whitelist before sending test messages.
|
|
104
|
+
*
|
|
105
|
+
* ## Verification Process
|
|
106
|
+
* After whitelisting a number, you'll need to complete verification:
|
|
107
|
+
*
|
|
108
|
+
* 1. Check the test device for an "RBM Tester Management" request
|
|
109
|
+
* 2. Accept the request on the device
|
|
110
|
+
* 3. Enter the 4-digit verification code in the Pinnacle dashboard at:
|
|
111
|
+
* ```
|
|
112
|
+
* https://app.pinnacle.sh/dashboard/brands/{brandId}?campaignId={campaignId}&campaignType=RCS
|
|
113
|
+
* ```
|
|
114
|
+
*
|
|
115
|
+
* > **Important Notes**
|
|
116
|
+
* >
|
|
117
|
+
* > - **Testing only:** This is only required for test agents. Production agents can message any RCS-enabled number
|
|
118
|
+
* > - **AT&T limitation:** Whitelisting may currently fail for AT&T numbers
|
|
119
|
+
* > - **Verification required:** The whitelist request isn't complete until you verify the device.
|
|
102
120
|
*
|
|
103
|
-
* @param {Pinnacle.
|
|
104
|
-
* @param {
|
|
121
|
+
* @param {Pinnacle.RcsWhitelistRequest} request
|
|
122
|
+
* @param {Rcs.RequestOptions} requestOptions - Request-specific configuration.
|
|
105
123
|
*
|
|
106
124
|
* @throws {@link Pinnacle.BadRequestError}
|
|
107
125
|
* @throws {@link Pinnacle.UnauthorizedError}
|
|
108
|
-
* @throws {@link Pinnacle.PaymentRequiredError}
|
|
109
126
|
* @throws {@link Pinnacle.NotFoundError}
|
|
110
127
|
* @throws {@link Pinnacle.InternalServerError}
|
|
128
|
+
* @throws {@link Pinnacle.NotImplementedError}
|
|
111
129
|
*
|
|
112
130
|
* @example
|
|
113
|
-
* await client.
|
|
114
|
-
*
|
|
115
|
-
*
|
|
116
|
-
* options: {
|
|
117
|
-
* multiple_messages: true,
|
|
118
|
-
* validate: true
|
|
119
|
-
* },
|
|
120
|
-
* text: "Check out this image!",
|
|
121
|
-
* to: "+14154746461"
|
|
131
|
+
* await client.rcs.whitelist({
|
|
132
|
+
* agentId: "agent_XXXXXXXXXXXX",
|
|
133
|
+
* phoneNumber: "+12345678901"
|
|
122
134
|
* })
|
|
123
135
|
*/
|
|
124
|
-
|
|
125
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
136
|
+
whitelist(request, requestOptions) {
|
|
137
|
+
return core.HttpResponsePromise.fromPromise(this.__whitelist(request, requestOptions));
|
|
126
138
|
}
|
|
127
|
-
|
|
139
|
+
__whitelist(request, requestOptions) {
|
|
128
140
|
return __awaiter(this, void 0, void 0, function* () {
|
|
129
141
|
var _a, _b, _c;
|
|
130
142
|
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);
|
|
131
143
|
const _response = yield core.fetcher({
|
|
132
|
-
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, "
|
|
144
|
+
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, "rcs/whitelist"),
|
|
133
145
|
method: "POST",
|
|
134
146
|
headers: _headers,
|
|
135
147
|
contentType: "application/json",
|
|
@@ -149,12 +161,12 @@ export class Send {
|
|
|
149
161
|
throw new Pinnacle.BadRequestError(_response.error.body, _response.rawResponse);
|
|
150
162
|
case 401:
|
|
151
163
|
throw new Pinnacle.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
152
|
-
case 402:
|
|
153
|
-
throw new Pinnacle.PaymentRequiredError(_response.error.body, _response.rawResponse);
|
|
154
164
|
case 404:
|
|
155
165
|
throw new Pinnacle.NotFoundError(_response.error.body, _response.rawResponse);
|
|
156
166
|
case 500:
|
|
157
167
|
throw new Pinnacle.InternalServerError(_response.error.body, _response.rawResponse);
|
|
168
|
+
case 501:
|
|
169
|
+
throw new Pinnacle.NotImplementedError(_response.error.body, _response.rawResponse);
|
|
158
170
|
default:
|
|
159
171
|
throw new errors.PinnacleError({
|
|
160
172
|
statusCode: _response.error.statusCode,
|
|
@@ -171,7 +183,7 @@ export class Send {
|
|
|
171
183
|
rawResponse: _response.rawResponse,
|
|
172
184
|
});
|
|
173
185
|
case "timeout":
|
|
174
|
-
throw new errors.PinnacleTimeoutError("Timeout exceeded when calling POST /
|
|
186
|
+
throw new errors.PinnacleTimeoutError("Timeout exceeded when calling POST /rcs/whitelist.");
|
|
175
187
|
case "unknown":
|
|
176
188
|
throw new errors.PinnacleError({
|
|
177
189
|
message: _response.error.errorMessage,
|
|
@@ -181,40 +193,37 @@ export class Send {
|
|
|
181
193
|
});
|
|
182
194
|
}
|
|
183
195
|
/**
|
|
184
|
-
*
|
|
196
|
+
* Generate a link for initiating an RCS conversation with your agent.
|
|
185
197
|
*
|
|
186
|
-
*
|
|
198
|
+
* Users can click these links to start conversations with your RCS agent directly
|
|
199
|
+
* from websites, emails, or other applications.
|
|
187
200
|
*
|
|
188
|
-
* @param {Pinnacle.
|
|
189
|
-
* @param {
|
|
201
|
+
* @param {Pinnacle.RcsLinkRequest} request
|
|
202
|
+
* @param {Rcs.RequestOptions} requestOptions - Request-specific configuration.
|
|
190
203
|
*
|
|
191
204
|
* @throws {@link Pinnacle.BadRequestError}
|
|
192
205
|
* @throws {@link Pinnacle.UnauthorizedError}
|
|
193
|
-
* @throws {@link Pinnacle.PaymentRequiredError}
|
|
194
206
|
* @throws {@link Pinnacle.NotFoundError}
|
|
195
207
|
* @throws {@link Pinnacle.InternalServerError}
|
|
208
|
+
* @throws {@link Pinnacle.NotImplementedError}
|
|
196
209
|
*
|
|
197
210
|
* @example
|
|
198
|
-
* await client.
|
|
199
|
-
*
|
|
200
|
-
*
|
|
201
|
-
*
|
|
202
|
-
*
|
|
203
|
-
* }],
|
|
204
|
-
* text: "text",
|
|
205
|
-
* from: "from",
|
|
206
|
-
* to: "to"
|
|
211
|
+
* await client.rcs.getLink({
|
|
212
|
+
* agentId: "agent_XXXXXXXXXXXX",
|
|
213
|
+
* testMode: false,
|
|
214
|
+
* phoneNumber: "+12345678901",
|
|
215
|
+
* body: "Hello, I need help with my order"
|
|
207
216
|
* })
|
|
208
217
|
*/
|
|
209
|
-
|
|
210
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
218
|
+
getLink(request, requestOptions) {
|
|
219
|
+
return core.HttpResponsePromise.fromPromise(this.__getLink(request, requestOptions));
|
|
211
220
|
}
|
|
212
|
-
|
|
221
|
+
__getLink(request, requestOptions) {
|
|
213
222
|
return __awaiter(this, void 0, void 0, function* () {
|
|
214
223
|
var _a, _b, _c;
|
|
215
224
|
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);
|
|
216
225
|
const _response = yield core.fetcher({
|
|
217
|
-
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, "
|
|
226
|
+
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, "rcs/link"),
|
|
218
227
|
method: "POST",
|
|
219
228
|
headers: _headers,
|
|
220
229
|
contentType: "application/json",
|
|
@@ -234,12 +243,12 @@ export class Send {
|
|
|
234
243
|
throw new Pinnacle.BadRequestError(_response.error.body, _response.rawResponse);
|
|
235
244
|
case 401:
|
|
236
245
|
throw new Pinnacle.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
237
|
-
case 402:
|
|
238
|
-
throw new Pinnacle.PaymentRequiredError(_response.error.body, _response.rawResponse);
|
|
239
246
|
case 404:
|
|
240
247
|
throw new Pinnacle.NotFoundError(_response.error.body, _response.rawResponse);
|
|
241
248
|
case 500:
|
|
242
249
|
throw new Pinnacle.InternalServerError(_response.error.body, _response.rawResponse);
|
|
250
|
+
case 501:
|
|
251
|
+
throw new Pinnacle.NotImplementedError(_response.error.body, _response.rawResponse);
|
|
243
252
|
default:
|
|
244
253
|
throw new errors.PinnacleError({
|
|
245
254
|
statusCode: _response.error.statusCode,
|
|
@@ -256,7 +265,7 @@ export class Send {
|
|
|
256
265
|
rawResponse: _response.rawResponse,
|
|
257
266
|
});
|
|
258
267
|
case "timeout":
|
|
259
|
-
throw new errors.PinnacleTimeoutError("Timeout exceeded when calling POST /
|
|
268
|
+
throw new errors.PinnacleTimeoutError("Timeout exceeded when calling POST /rcs/link.");
|
|
260
269
|
case "unknown":
|
|
261
270
|
throw new errors.PinnacleError({
|
|
262
271
|
message: _response.error.errorMessage,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./requests/index.mjs";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* @example
|
|
6
|
+
* {
|
|
7
|
+
* phoneNumbers: ["+12345678901", "+19876543210"]
|
|
8
|
+
* }
|
|
9
|
+
*/
|
|
10
|
+
export interface RcsCapabilitiesQuery {
|
|
11
|
+
/** List of phone numbers to check RCS capabilities for (E.164 format) */
|
|
12
|
+
phoneNumbers: string[];
|
|
13
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* @example
|
|
6
|
+
* {
|
|
7
|
+
* agentId: "agent_XXXXXXXXXXXX",
|
|
8
|
+
* testMode: false,
|
|
9
|
+
* phoneNumber: "+12345678901",
|
|
10
|
+
* body: "Hello, I need help with my order"
|
|
11
|
+
* }
|
|
12
|
+
*/
|
|
13
|
+
export interface RcsLinkRequest {
|
|
14
|
+
/** The RCS agent ID (must be prefixed with 'agent_') */
|
|
15
|
+
agentId: string;
|
|
16
|
+
/** Link to the test agent or the production agent if false */
|
|
17
|
+
testMode?: boolean;
|
|
18
|
+
/** Fallback phone number (E.164 format) to use if the phone number does not support RCS. If not provided, no url will be generated. */
|
|
19
|
+
phoneNumber?: string;
|
|
20
|
+
/** Optional message body to pre-fill after the user clicks the link */
|
|
21
|
+
body?: string;
|
|
22
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* @example
|
|
6
|
+
* {
|
|
7
|
+
* agentId: "agent_XXXXXXXXXXXX",
|
|
8
|
+
* phoneNumber: "+12345678901"
|
|
9
|
+
* }
|
|
10
|
+
*/
|
|
11
|
+
export interface RcsWhitelistRequest {
|
|
12
|
+
/** The RCS agent ID (must be prefixed with 'agent_') */
|
|
13
|
+
agentId: string;
|
|
14
|
+
/** Phone number to whitelist for testing (E.164 format) */
|
|
15
|
+
phoneNumber: string;
|
|
16
|
+
}
|
|
@@ -64,9 +64,9 @@ export declare class Get {
|
|
|
64
64
|
tollFree(campaignId: number, requestOptions?: Get.RequestOptions): core.HttpResponsePromise<Pinnacle.TollFreeCampaignStatus>;
|
|
65
65
|
private __tollFree;
|
|
66
66
|
/**
|
|
67
|
-
* Retrieve a
|
|
67
|
+
* Retrieve a 10DLC campaign's status.
|
|
68
68
|
*
|
|
69
|
-
* @param {number} campaignId - ID of the
|
|
69
|
+
* @param {number} campaignId - ID of the 10DLC campaign.
|
|
70
70
|
* @param {Get.RequestOptions} requestOptions - Request-specific configuration.
|
|
71
71
|
*
|
|
72
72
|
* @throws {@link Pinnacle.BadRequestError}
|
|
@@ -162,9 +162,9 @@ export class Get {
|
|
|
162
162
|
});
|
|
163
163
|
}
|
|
164
164
|
/**
|
|
165
|
-
* Retrieve a
|
|
165
|
+
* Retrieve a 10DLC campaign's status.
|
|
166
166
|
*
|
|
167
|
-
* @param {number} campaignId - ID of the
|
|
167
|
+
* @param {number} campaignId - ID of the 10DLC campaign.
|
|
168
168
|
* @param {Get.RequestOptions} requestOptions - Request-specific configuration.
|
|
169
169
|
*
|
|
170
170
|
* @throws {@link Pinnacle.BadRequestError}
|
|
@@ -5,10 +5,10 @@ import * as Pinnacle from "../index.mjs";
|
|
|
5
5
|
/**
|
|
6
6
|
* Response for list conversation.
|
|
7
7
|
*/
|
|
8
|
-
export
|
|
9
|
-
|
|
8
|
+
export type ConversationList = {
|
|
9
|
+
error?: string | undefined;
|
|
10
|
+
} | {
|
|
10
11
|
count: number;
|
|
11
12
|
conversations: Pinnacle.Conversation[];
|
|
12
|
-
/** Indicates if more conversations are available beyond the current page. */
|
|
13
13
|
hasMore: boolean;
|
|
14
|
-
}
|
|
14
|
+
};
|
|
@@ -24,7 +24,7 @@ export interface DlcCampaignStatus {
|
|
|
24
24
|
*/
|
|
25
25
|
status: Pinnacle.ProfileStatusEnum;
|
|
26
26
|
/**
|
|
27
|
-
* Status of
|
|
27
|
+
* Status of local long code numbers that are being attached to this campaign. <br>
|
|
28
28
|
*
|
|
29
29
|
* Note that phone numbers can only be attached to `VERIFIED` campaigns via the [attach campaign endpoint](../phone-numbers/attach-campaign).
|
|
30
30
|
*/
|
|
@@ -32,7 +32,7 @@ export interface DlcCampaignStatus {
|
|
|
32
32
|
}
|
|
33
33
|
export declare namespace DlcCampaignStatus {
|
|
34
34
|
/**
|
|
35
|
-
* Status of
|
|
35
|
+
* Status of local long code numbers that are being attached to this campaign. <br>
|
|
36
36
|
*
|
|
37
37
|
* Note that phone numbers can only be attached to `VERIFIED` campaigns via the [attach campaign endpoint](../phone-numbers/attach-campaign).
|
|
38
38
|
*/
|
|
@@ -9,6 +9,8 @@ export interface ExtendedRcsCampaign {
|
|
|
9
9
|
agentId: string;
|
|
10
10
|
/** Brand associated with this campaign. */
|
|
11
11
|
brand: Pinnacle.ExtendedBrand;
|
|
12
|
+
/** Link to document verifying the brand's name. This may be the certificate of incorporation, business license, or other relevant document. You can typically find this on the Secretary of State website. */
|
|
13
|
+
brandVerificationUrl?: string;
|
|
12
14
|
/** Indicates whether the brand has provided an attestation. */
|
|
13
15
|
brandAttestation: boolean;
|
|
14
16
|
/** Unique identifier for the campaign. */
|
|
@@ -35,9 +37,9 @@ export declare namespace ExtendedRcsCampaign {
|
|
|
35
37
|
description?: string;
|
|
36
38
|
/** List of emails. */
|
|
37
39
|
emails?: Agent.Emails.Item[];
|
|
38
|
-
/** Link to the agent's hero. */
|
|
40
|
+
/** Link to the agent's hero. Hero must be an image file with dimensions 1440x448px. */
|
|
39
41
|
heroUrl?: string;
|
|
40
|
-
/** Link to the agent's icon. */
|
|
42
|
+
/** Link to the agent's icon. Icon must be an image file with dimensions 224x224px. */
|
|
41
43
|
iconUrl?: string;
|
|
42
44
|
/** Name of the agent. */
|
|
43
45
|
name?: string;
|
|
@@ -5,10 +5,10 @@ import * as Pinnacle from "../index.mjs";
|
|
|
5
5
|
export type Rcs =
|
|
6
6
|
/**
|
|
7
7
|
* Send a text RCS message with optional quick reply buttons. */
|
|
8
|
-
Pinnacle.
|
|
8
|
+
Pinnacle.RichTextMessage
|
|
9
9
|
/**
|
|
10
10
|
* Send a media RCS message with optional quick reply buttons. */
|
|
11
|
-
| Pinnacle.
|
|
11
|
+
| Pinnacle.RichMediaMessage
|
|
12
12
|
/**
|
|
13
13
|
* Send a cards RCS message with optional quick reply buttons. */
|
|
14
|
-
| Pinnacle.
|
|
14
|
+
| Pinnacle.RichCardsMessage;
|
|
@@ -7,6 +7,8 @@ export interface RcsCampaign {
|
|
|
7
7
|
agent?: RcsCampaign.Agent;
|
|
8
8
|
/** Unique identifier for the campaign. */
|
|
9
9
|
campaignId?: number;
|
|
10
|
+
/** Link to document verifying the brand's name. This may be the certificate of incorporation, business license, or other relevant document. You can typically find this on the Secretary of State website. */
|
|
11
|
+
brandVerificationUrl?: string;
|
|
10
12
|
/** List of what the agent might say to users. */
|
|
11
13
|
expectedAgentResponses?: string[];
|
|
12
14
|
/** Legal documentation links. */
|
|
@@ -35,9 +37,9 @@ export declare namespace RcsCampaign {
|
|
|
35
37
|
phones?: Agent.Phones.Item[];
|
|
36
38
|
/** List of urls. */
|
|
37
39
|
websites?: Agent.Websites.Item[];
|
|
38
|
-
/** Link to the agent's hero. */
|
|
40
|
+
/** Link to the agent's hero. Hero must be an image file with dimensions 1440x448px. */
|
|
39
41
|
heroUrl?: string;
|
|
40
|
-
/** Link to the agent's icon. */
|
|
42
|
+
/** Link to the agent's icon. Icon must be an image file with dimensions 224x224px. */
|
|
41
43
|
iconUrl?: string;
|
|
42
44
|
}
|
|
43
45
|
namespace Agent {
|
|
@@ -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) | undefined>;
|
|
@@ -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
|
+
}
|
|
@@ -11,7 +11,7 @@ export interface RcsCards {
|
|
|
11
11
|
/** Collection of cards attached to the message. */
|
|
12
12
|
cards: RcsCards.Cards.Item[];
|
|
13
13
|
/** List of interactive quick reply buttons in the message. */
|
|
14
|
-
quickReplies: Pinnacle.
|
|
14
|
+
quickReplies: Pinnacle.RichButton[];
|
|
15
15
|
}
|
|
16
16
|
export declare namespace RcsCards {
|
|
17
17
|
type Cards = Cards.Item[];
|
|
@@ -21,7 +21,7 @@ export declare namespace RcsCards {
|
|
|
21
21
|
*/
|
|
22
22
|
interface Item {
|
|
23
23
|
/** Action buttons attached to the card. */
|
|
24
|
-
buttons: Pinnacle.
|
|
24
|
+
buttons: Pinnacle.RichButton[];
|
|
25
25
|
/** Media file URLs to send. */
|
|
26
26
|
media?: string;
|
|
27
27
|
/** Secondary text displayed below the title for additional context. */
|