rcs-js 2.0.12 → 2.0.13-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/Client.js +2 -2
- package/dist/cjs/api/resources/conversations/types/ConversationsListMessagesRequestStatus.d.ts +1 -0
- package/dist/cjs/api/resources/conversations/types/ConversationsListMessagesRequestStatus.js +1 -0
- package/dist/cjs/api/resources/messages/resources/blast/client/Client.d.ts +4 -0
- package/dist/cjs/api/resources/messages/resources/blast/client/Client.js +4 -0
- package/dist/cjs/api/resources/messages/resources/blast/client/requests/BlastRcs.d.ts +9 -0
- package/dist/cjs/api/resources/messages/resources/rcs/client/Client.d.ts +1 -4
- package/dist/cjs/api/resources/messages/resources/rcs/client/Client.js +1 -4
- package/dist/cjs/api/resources/messages/resources/rcs/client/requests/SendTypingIndicatorSchema.d.ts +1 -15
- package/dist/cjs/api/resources/messages/resources/rcs/types/SendRichMessageResponse.d.ts +1 -1
- package/dist/cjs/api/resources/rcs/client/Client.d.ts +19 -42
- package/dist/cjs/api/resources/rcs/client/Client.js +30 -56
- package/dist/cjs/api/resources/rcs/client/requests/RcsLinkRequest.d.ts +0 -3
- package/dist/cjs/api/resources/rcs/client/requests/index.d.ts +0 -1
- package/dist/cjs/api/resources/rcs/index.d.ts +1 -0
- package/dist/cjs/api/resources/rcs/index.js +1 -0
- package/dist/cjs/api/resources/rcs/resources/index.d.ts +2 -0
- package/dist/cjs/api/resources/rcs/resources/index.js +41 -0
- package/dist/cjs/api/resources/rcs/resources/test/client/Client.d.ts +190 -0
- package/dist/cjs/api/resources/rcs/resources/test/client/Client.js +473 -0
- package/dist/cjs/api/resources/rcs/resources/test/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/rcs/resources/test/client/index.js +17 -0
- package/dist/cjs/api/resources/rcs/resources/test/client/requests/CreateTestAgentRequest.d.ts +89 -0
- package/dist/cjs/api/resources/rcs/resources/test/client/requests/TestAgentWhitelistRequest.d.ts +15 -0
- package/dist/cjs/api/resources/rcs/resources/test/client/requests/TestGetWhitelistStatusRequest.d.ts +20 -0
- package/dist/cjs/api/resources/rcs/resources/test/client/requests/TestGetWhitelistStatusRequest.js +3 -0
- package/dist/cjs/api/resources/rcs/resources/test/client/requests/UpdateTestAgentRequest.d.ts +57 -0
- package/dist/cjs/api/resources/rcs/resources/test/client/requests/UpdateTestAgentRequest.js +3 -0
- package/dist/cjs/api/resources/rcs/resources/test/client/requests/index.d.ts +4 -0
- package/dist/cjs/api/resources/rcs/resources/test/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/rcs/resources/test/index.d.ts +1 -0
- package/dist/cjs/api/resources/rcs/resources/test/index.js +17 -0
- package/dist/cjs/api/types/AgentEmailEntry.d.ts +9 -0
- package/dist/cjs/api/types/AgentEmailEntry.js +3 -0
- package/dist/cjs/api/types/AgentPhoneEntry.d.ts +9 -0
- package/dist/cjs/api/types/AgentPhoneEntry.js +3 -0
- package/dist/cjs/api/types/AgentPrivacyPolicy.d.ts +7 -0
- package/dist/cjs/api/types/AgentPrivacyPolicy.js +3 -0
- package/dist/cjs/api/types/AgentTermsConditions.d.ts +7 -0
- package/dist/cjs/api/types/AgentTermsConditions.js +3 -0
- package/dist/cjs/api/types/AgentUseCase.d.ts +15 -0
- package/dist/cjs/api/types/AgentUseCase.js +18 -0
- package/dist/cjs/api/types/AgentWebsiteEntry.d.ts +9 -0
- package/dist/cjs/api/types/AgentWebsiteEntry.js +3 -0
- package/dist/cjs/api/types/BaseRichMessage.d.ts +1 -0
- package/dist/cjs/api/types/CarrierLaunchStatus.d.ts +12 -0
- package/dist/cjs/api/types/CarrierLaunchStatus.js +15 -0
- package/dist/cjs/api/types/CarrierLaunches.d.ts +14 -0
- package/dist/cjs/api/types/CarrierLaunches.js +3 -0
- package/dist/cjs/api/types/FallbackMessage.d.ts +32 -0
- package/dist/cjs/api/types/FallbackMessage.js +3 -0
- package/dist/cjs/api/types/Message.d.ts +8 -0
- package/dist/cjs/api/types/MessageEvent.d.ts +40 -0
- package/dist/cjs/api/types/MessageEvent.js +8 -0
- package/dist/cjs/api/types/MessageEventContent.d.ts +30 -7
- package/dist/cjs/api/types/MessageEventMmsContent.d.ts +0 -2
- package/dist/cjs/api/types/MessageEventRcsButtonData.d.ts +50 -3
- package/dist/cjs/api/types/MessageEventRcsButtonData.js +17 -0
- package/dist/cjs/api/types/MessageEventRcsCardsContent.d.ts +0 -2
- package/dist/cjs/api/types/MessageEventRcsLocationData.d.ts +20 -4
- package/dist/cjs/api/types/MessageEventRcsMediaContent.d.ts +0 -2
- package/dist/cjs/api/types/MessageEventRcsTextContent.d.ts +0 -2
- package/dist/cjs/api/types/MessageEventSmsContent.d.ts +0 -2
- package/dist/cjs/api/types/MessageStatusEnum.d.ts +1 -0
- package/dist/cjs/api/types/MessageStatusEnum.js +1 -0
- package/dist/cjs/api/types/RcsAgentResponse.d.ts +17 -0
- package/dist/cjs/api/types/RcsAgentResponse.js +3 -0
- package/dist/cjs/api/types/RcsWhitelistStatus.d.ts +13 -0
- package/dist/cjs/api/types/RcsWhitelistStatus.js +16 -0
- package/dist/cjs/api/types/RichCardsMessage.d.ts +1 -0
- package/dist/cjs/api/types/SendRichMessageOptions.d.ts +0 -2
- package/dist/cjs/api/types/SentRichMessageFallbackMms.d.ts +8 -0
- package/dist/cjs/api/types/SentRichMessageFallbackMms.js +3 -0
- package/dist/cjs/api/types/SentRichMessageFallbackSms.d.ts +8 -0
- package/dist/cjs/api/types/SentRichMessageFallbackSms.js +3 -0
- package/dist/cjs/api/types/TestAgentDetails.d.ts +19 -0
- package/dist/cjs/api/types/TestAgentDetails.js +3 -0
- package/dist/cjs/api/types/TestAgentResponse.d.ts +19 -0
- package/dist/cjs/api/types/TestAgentResponse.js +3 -0
- package/dist/cjs/api/types/TestAgentWhitelistResponse.d.ts +7 -0
- package/dist/cjs/api/types/TestAgentWhitelistResponse.js +3 -0
- package/dist/cjs/api/types/index.d.ts +16 -1
- package/dist/cjs/api/types/index.js +16 -1
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Client.mjs +2 -2
- package/dist/esm/api/resources/conversations/types/ConversationsListMessagesRequestStatus.d.mts +1 -0
- package/dist/esm/api/resources/conversations/types/ConversationsListMessagesRequestStatus.mjs +1 -0
- package/dist/esm/api/resources/messages/resources/blast/client/Client.d.mts +4 -0
- package/dist/esm/api/resources/messages/resources/blast/client/Client.mjs +4 -0
- package/dist/esm/api/resources/messages/resources/blast/client/requests/BlastRcs.d.mts +9 -0
- package/dist/esm/api/resources/messages/resources/rcs/client/Client.d.mts +1 -4
- package/dist/esm/api/resources/messages/resources/rcs/client/Client.mjs +1 -4
- package/dist/esm/api/resources/messages/resources/rcs/client/requests/SendTypingIndicatorSchema.d.mts +1 -15
- package/dist/esm/api/resources/messages/resources/rcs/types/SendRichMessageResponse.d.mts +1 -1
- package/dist/esm/api/resources/rcs/client/Client.d.mts +19 -42
- package/dist/esm/api/resources/rcs/client/Client.mjs +30 -56
- package/dist/esm/api/resources/rcs/client/requests/RcsLinkRequest.d.mts +0 -3
- package/dist/esm/api/resources/rcs/client/requests/index.d.mts +0 -1
- 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/rcs/resources/index.d.mts +2 -0
- package/dist/esm/api/resources/rcs/resources/index.mjs +2 -0
- package/dist/esm/api/resources/rcs/resources/test/client/Client.d.mts +190 -0
- package/dist/esm/api/resources/rcs/resources/test/client/Client.mjs +436 -0
- package/dist/esm/api/resources/rcs/resources/test/client/index.d.mts +1 -0
- package/dist/esm/api/resources/rcs/resources/test/client/index.mjs +1 -0
- package/dist/esm/api/resources/rcs/resources/test/client/requests/CreateTestAgentRequest.d.mts +89 -0
- package/dist/esm/api/resources/rcs/resources/test/client/requests/TestAgentWhitelistRequest.d.mts +15 -0
- package/dist/esm/api/resources/rcs/resources/test/client/requests/TestGetWhitelistStatusRequest.d.mts +20 -0
- package/dist/esm/api/resources/rcs/resources/test/client/requests/TestGetWhitelistStatusRequest.mjs +2 -0
- package/dist/esm/api/resources/rcs/resources/test/client/requests/UpdateTestAgentRequest.d.mts +57 -0
- package/dist/esm/api/resources/rcs/resources/test/client/requests/UpdateTestAgentRequest.mjs +2 -0
- package/dist/esm/api/resources/rcs/resources/test/client/requests/index.d.mts +4 -0
- package/dist/esm/api/resources/rcs/resources/test/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/rcs/resources/test/index.d.mts +1 -0
- package/dist/esm/api/resources/rcs/resources/test/index.mjs +1 -0
- package/dist/esm/api/types/AgentEmailEntry.d.mts +9 -0
- package/dist/esm/api/types/AgentEmailEntry.mjs +2 -0
- package/dist/esm/api/types/AgentPhoneEntry.d.mts +9 -0
- package/dist/esm/api/types/AgentPhoneEntry.mjs +2 -0
- package/dist/esm/api/types/AgentPrivacyPolicy.d.mts +7 -0
- package/dist/esm/api/types/AgentPrivacyPolicy.mjs +2 -0
- package/dist/esm/api/types/AgentTermsConditions.d.mts +7 -0
- package/dist/esm/api/types/AgentTermsConditions.mjs +2 -0
- package/dist/esm/api/types/AgentUseCase.d.mts +15 -0
- package/dist/esm/api/types/AgentUseCase.mjs +15 -0
- package/dist/esm/api/types/AgentWebsiteEntry.d.mts +9 -0
- package/dist/esm/api/types/AgentWebsiteEntry.mjs +2 -0
- package/dist/esm/api/types/BaseRichMessage.d.mts +1 -0
- package/dist/esm/api/types/CarrierLaunchStatus.d.mts +12 -0
- package/dist/esm/api/types/CarrierLaunchStatus.mjs +12 -0
- package/dist/esm/api/types/CarrierLaunches.d.mts +14 -0
- package/dist/esm/api/types/CarrierLaunches.mjs +2 -0
- package/dist/esm/api/types/FallbackMessage.d.mts +32 -0
- package/dist/esm/api/types/FallbackMessage.mjs +2 -0
- package/dist/esm/api/types/Message.d.mts +8 -0
- package/dist/esm/api/types/MessageEvent.d.mts +40 -0
- package/dist/esm/api/types/MessageEvent.mjs +8 -0
- package/dist/esm/api/types/MessageEventContent.d.mts +30 -7
- package/dist/esm/api/types/MessageEventMmsContent.d.mts +0 -2
- package/dist/esm/api/types/MessageEventRcsButtonData.d.mts +50 -3
- package/dist/esm/api/types/MessageEventRcsButtonData.mjs +16 -1
- package/dist/esm/api/types/MessageEventRcsCardsContent.d.mts +0 -2
- package/dist/esm/api/types/MessageEventRcsLocationData.d.mts +20 -4
- package/dist/esm/api/types/MessageEventRcsMediaContent.d.mts +0 -2
- package/dist/esm/api/types/MessageEventRcsTextContent.d.mts +0 -2
- package/dist/esm/api/types/MessageEventSmsContent.d.mts +0 -2
- package/dist/esm/api/types/MessageStatusEnum.d.mts +1 -0
- package/dist/esm/api/types/MessageStatusEnum.mjs +1 -0
- package/dist/esm/api/types/RcsAgentResponse.d.mts +17 -0
- package/dist/esm/api/types/RcsAgentResponse.mjs +2 -0
- package/dist/esm/api/types/RcsWhitelistStatus.d.mts +13 -0
- package/dist/esm/api/types/RcsWhitelistStatus.mjs +13 -0
- package/dist/esm/api/types/RichCardsMessage.d.mts +1 -0
- package/dist/esm/api/types/SendRichMessageOptions.d.mts +0 -2
- package/dist/esm/api/types/SentRichMessageFallbackMms.d.mts +8 -0
- package/dist/esm/api/types/SentRichMessageFallbackMms.mjs +2 -0
- package/dist/esm/api/types/SentRichMessageFallbackSms.d.mts +8 -0
- package/dist/esm/api/types/SentRichMessageFallbackSms.mjs +2 -0
- package/dist/esm/api/types/TestAgentDetails.d.mts +19 -0
- package/dist/esm/api/types/TestAgentDetails.mjs +2 -0
- package/dist/esm/api/types/TestAgentResponse.d.mts +19 -0
- package/dist/esm/api/types/TestAgentResponse.mjs +2 -0
- package/dist/esm/api/types/TestAgentWhitelistResponse.d.mts +7 -0
- package/dist/esm/api/types/TestAgentWhitelistResponse.mjs +2 -0
- package/dist/esm/api/types/index.d.mts +16 -1
- package/dist/esm/api/types/index.mjs +16 -1
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +2 -2
- package/reference.md +420 -44
- package/dist/cjs/api/resources/rcs/client/requests/RcsWhitelistRequest.d.ts +0 -13
- package/dist/cjs/api/types/RcsWhitelistResponse.d.ts +0 -7
- package/dist/esm/api/resources/rcs/client/requests/RcsWhitelistRequest.d.mts +0 -13
- package/dist/esm/api/types/RcsWhitelistResponse.d.mts +0 -7
- /package/dist/cjs/api/resources/rcs/{client/requests/RcsWhitelistRequest.js → resources/test/client/requests/CreateTestAgentRequest.js} +0 -0
- /package/dist/cjs/api/{types/RcsWhitelistResponse.js → resources/rcs/resources/test/client/requests/TestAgentWhitelistRequest.js} +0 -0
- /package/dist/esm/api/resources/rcs/{client/requests/RcsWhitelistRequest.mjs → resources/test/client/requests/CreateTestAgentRequest.mjs} +0 -0
- /package/dist/esm/api/{types/RcsWhitelistResponse.mjs → resources/rcs/resources/test/client/requests/TestAgentWhitelistRequest.mjs} +0 -0
package/dist/cjs/Client.js
CHANGED
|
@@ -53,8 +53,8 @@ class PinnacleClient {
|
|
|
53
53
|
this._options = Object.assign(Object.assign({}, _options), { logging: core.logging.createLogger(_options === null || _options === void 0 ? void 0 : _options.logging), headers: (0, headers_js_1.mergeHeaders)({
|
|
54
54
|
"X-Fern-Language": "JavaScript",
|
|
55
55
|
"X-Fern-SDK-Name": "rcs-js",
|
|
56
|
-
"X-Fern-SDK-Version": "2.0.
|
|
57
|
-
"User-Agent": "rcs-js/2.0.
|
|
56
|
+
"X-Fern-SDK-Version": "2.0.14",
|
|
57
|
+
"User-Agent": "rcs-js/2.0.14",
|
|
58
58
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
59
59
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
60
60
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
package/dist/cjs/api/resources/conversations/types/ConversationsListMessagesRequestStatus.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export declare const ConversationsListMessagesRequestStatus: {
|
|
|
4
4
|
readonly SendFailed: "SEND_FAILED";
|
|
5
5
|
readonly Delivered: "DELIVERED";
|
|
6
6
|
readonly DeliveryFailed: "DELIVERY_FAILED";
|
|
7
|
+
readonly FallbackSent: "FALLBACK_SENT";
|
|
7
8
|
readonly Received: "RECEIVED";
|
|
8
9
|
readonly Read: "READ";
|
|
9
10
|
};
|
|
@@ -96,6 +96,10 @@ export declare class Blast {
|
|
|
96
96
|
* }],
|
|
97
97
|
* text: "Hello from Pinnacle RCS!"
|
|
98
98
|
* },
|
|
99
|
+
* fallback: {
|
|
100
|
+
* from: "+14155164736",
|
|
101
|
+
* text: "Hello from Pinnacle! Reply LEARN to learn more."
|
|
102
|
+
* },
|
|
99
103
|
* options: {
|
|
100
104
|
* transcode: true,
|
|
101
105
|
* validate: true
|
|
@@ -257,6 +257,10 @@ class Blast {
|
|
|
257
257
|
* }],
|
|
258
258
|
* text: "Hello from Pinnacle RCS!"
|
|
259
259
|
* },
|
|
260
|
+
* fallback: {
|
|
261
|
+
* from: "+14155164736",
|
|
262
|
+
* text: "Hello from Pinnacle! Reply LEARN to learn more."
|
|
263
|
+
* },
|
|
260
264
|
* options: {
|
|
261
265
|
* transcode: true,
|
|
262
266
|
* validate: true
|
|
@@ -12,6 +12,10 @@ import type * as Pinnacle from "../../../../../../index.js";
|
|
|
12
12
|
* }],
|
|
13
13
|
* text: "Hello from Pinnacle RCS!"
|
|
14
14
|
* },
|
|
15
|
+
* fallback: {
|
|
16
|
+
* from: "+14155164736",
|
|
17
|
+
* text: "Hello from Pinnacle! Reply LEARN to learn more."
|
|
18
|
+
* },
|
|
15
19
|
* options: {
|
|
16
20
|
* transcode: true,
|
|
17
21
|
* validate: true
|
|
@@ -30,6 +34,10 @@ import type * as Pinnacle from "../../../../../../index.js";
|
|
|
30
34
|
* }],
|
|
31
35
|
* text: "Hello from Pinnacle RCS!"
|
|
32
36
|
* },
|
|
37
|
+
* fallback: {
|
|
38
|
+
* from: "+14155164736",
|
|
39
|
+
* text: "Hello from Pinnacle! Reply LEARN to learn more."
|
|
40
|
+
* },
|
|
33
41
|
* options: {
|
|
34
42
|
* transcode: true,
|
|
35
43
|
* validate: true
|
|
@@ -54,6 +62,7 @@ export interface BlastRcs {
|
|
|
54
62
|
*/
|
|
55
63
|
senders: string[];
|
|
56
64
|
message: Pinnacle.RcsValidateContent;
|
|
65
|
+
fallback?: Pinnacle.FallbackMessage;
|
|
57
66
|
/** Configure how your RCS blast is sent and tracked. */
|
|
58
67
|
options?: BlastRcs.Options;
|
|
59
68
|
}
|
|
@@ -66,10 +66,7 @@ export declare class Rcs {
|
|
|
66
66
|
* @example
|
|
67
67
|
* await client.messages.rcs.sendTyping({
|
|
68
68
|
* agentId: "agent_pinnacle",
|
|
69
|
-
* to: "+14154746461"
|
|
70
|
-
* options: {
|
|
71
|
-
* test_mode: false
|
|
72
|
-
* }
|
|
69
|
+
* to: "+14154746461"
|
|
73
70
|
* })
|
|
74
71
|
*/
|
|
75
72
|
sendTyping(request: Pinnacle.messages.SendTypingIndicatorSchema, requestOptions?: Rcs.RequestOptions): core.HttpResponsePromise<Pinnacle.SendTypingIndicatorResponse>;
|
|
@@ -175,10 +175,7 @@ class Rcs {
|
|
|
175
175
|
* @example
|
|
176
176
|
* await client.messages.rcs.sendTyping({
|
|
177
177
|
* agentId: "agent_pinnacle",
|
|
178
|
-
* to: "+14154746461"
|
|
179
|
-
* options: {
|
|
180
|
-
* test_mode: false
|
|
181
|
-
* }
|
|
178
|
+
* to: "+14154746461"
|
|
182
179
|
* })
|
|
183
180
|
*/
|
|
184
181
|
sendTyping(request, requestOptions) {
|
package/dist/cjs/api/resources/messages/resources/rcs/client/requests/SendTypingIndicatorSchema.d.ts
CHANGED
|
@@ -2,10 +2,7 @@
|
|
|
2
2
|
* @example
|
|
3
3
|
* {
|
|
4
4
|
* agentId: "agent_pinnacle",
|
|
5
|
-
* to: "+14154746461"
|
|
6
|
-
* options: {
|
|
7
|
-
* test_mode: false
|
|
8
|
-
* }
|
|
5
|
+
* to: "+14154746461"
|
|
9
6
|
* }
|
|
10
7
|
*/
|
|
11
8
|
export interface SendTypingIndicatorSchema {
|
|
@@ -21,15 +18,4 @@ export interface SendTypingIndicatorSchema {
|
|
|
21
18
|
* Must include country code with a leading plus sign (e.g., `+14155551234`).
|
|
22
19
|
*/
|
|
23
20
|
to: string;
|
|
24
|
-
/** Configure how your typing indicator is sent. */
|
|
25
|
-
options?: SendTypingIndicatorSchema.Options;
|
|
26
|
-
}
|
|
27
|
-
export declare namespace SendTypingIndicatorSchema {
|
|
28
|
-
/**
|
|
29
|
-
* Configure how your typing indicator is sent.
|
|
30
|
-
*/
|
|
31
|
-
interface Options {
|
|
32
|
-
/** Send via the test agent to whitelisted test devices. Useful for development and debugging. */
|
|
33
|
-
test_mode?: boolean;
|
|
34
|
-
}
|
|
35
21
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type * as Pinnacle from "../../../../../index.js";
|
|
2
|
-
export type SendRichMessageResponse = Pinnacle.SentRichMessage | Pinnacle.ScheduledMessage;
|
|
2
|
+
export type SendRichMessageResponse = Pinnacle.SentRichMessage | Pinnacle.ScheduledMessage | Pinnacle.SentRichMessageFallbackSms | Pinnacle.SentRichMessageFallbackMms;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
|
|
2
2
|
import * as core from "../../../../core/index.js";
|
|
3
3
|
import * as Pinnacle from "../../../index.js";
|
|
4
|
+
import { Test } from "../resources/test/client/Client.js";
|
|
4
5
|
export declare namespace Rcs {
|
|
5
6
|
interface Options extends BaseClientOptions {
|
|
6
7
|
}
|
|
@@ -9,74 +10,51 @@ export declare namespace Rcs {
|
|
|
9
10
|
}
|
|
10
11
|
export declare class Rcs {
|
|
11
12
|
protected readonly _options: Rcs.Options;
|
|
13
|
+
protected _test: Test | undefined;
|
|
12
14
|
constructor(_options: Rcs.Options);
|
|
15
|
+
get test(): Test;
|
|
13
16
|
/**
|
|
14
|
-
*
|
|
17
|
+
* Retrieve details of an RCS agent by its ID.
|
|
15
18
|
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
19
|
+
* Returns the agent's configuration including display name, description, logo, hero image,
|
|
20
|
+
* contact information, and other settings.
|
|
18
21
|
*
|
|
19
|
-
* @param {
|
|
22
|
+
* @param {string} agentId - The RCS agent ID (must be prefixed with `agent_`).
|
|
20
23
|
* @param {Rcs.RequestOptions} requestOptions - Request-specific configuration.
|
|
21
24
|
*
|
|
22
25
|
* @throws {@link Pinnacle.BadRequestError}
|
|
23
26
|
* @throws {@link Pinnacle.UnauthorizedError}
|
|
24
27
|
* @throws {@link Pinnacle.ForbiddenError}
|
|
28
|
+
* @throws {@link Pinnacle.NotFoundError}
|
|
25
29
|
* @throws {@link Pinnacle.InternalServerError}
|
|
26
|
-
* @throws {@link Pinnacle.NotImplementedError}
|
|
27
30
|
*
|
|
28
31
|
* @example
|
|
29
|
-
* await client.rcs.
|
|
30
|
-
* phoneNumbers: ["+12345678901", "+19876543210"]
|
|
31
|
-
* })
|
|
32
|
+
* await client.rcs.getAgent("agent_abc123def456")
|
|
32
33
|
*/
|
|
33
|
-
|
|
34
|
-
private
|
|
34
|
+
getAgent(agentId: string, requestOptions?: Rcs.RequestOptions): core.HttpResponsePromise<Pinnacle.RcsAgentResponse>;
|
|
35
|
+
private __getAgent;
|
|
35
36
|
/**
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
* ## Overview
|
|
39
|
-
* During development and testing, RCS agents can only send messages to whitelisted phone numbers.
|
|
40
|
-
* Use this endpoint to whitelist specific phone numbers to send and receive messages from the test agent.
|
|
41
|
-
*
|
|
42
|
-
* ## Verification Process
|
|
43
|
-
* After whitelisting a number, you'll need to complete verification:
|
|
44
|
-
*
|
|
45
|
-
* 1. Check the test device for message from "RBM Tester Management"
|
|
46
|
-
* 2. Click the "Make me a tester" button
|
|
47
|
-
* 3. Enter the separate 4-digit verification SMS code in the Pinnacle dashboard at:
|
|
48
|
-
* ```
|
|
49
|
-
* https://app.pinnacle.sh/dashboard/brands/{brandId}?campaignId={campaignId}&campaignType=RCS
|
|
50
|
-
* ```
|
|
51
|
-
*
|
|
52
|
-
* > **⚠️ Important: Re-whitelisting Numbers**
|
|
53
|
-
* >
|
|
54
|
-
* > If you whitelist a number that's already whitelisted, you'll receive a new message from "RBM Tester Management". **You must click the "Make me a tester" button again to continue sending and receiving messages.**
|
|
37
|
+
* Check RCS capabilities for one or more phone numbers.
|
|
55
38
|
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
* > - **Verification required:** Messages cannot be sent nor received until you have clicked the "Make me a tester" button on the test device.
|
|
59
|
-
* > - **Testing only:** This is only required for test agents. Production agents can message any RCS-enabled number.
|
|
60
|
-
* > - **Network limitations:** Whitelisting may be temporarily unavailable for some carriers but are usually restored shortly.
|
|
39
|
+
* This endpoint allows you to verify which RCS features (cards, buttons, etc.) are supported
|
|
40
|
+
* on specific phone numbers before sending RCS messages to them.
|
|
61
41
|
*
|
|
62
|
-
* @param {Pinnacle.
|
|
42
|
+
* @param {Pinnacle.RcsCapabilitiesQuery} request
|
|
63
43
|
* @param {Rcs.RequestOptions} requestOptions - Request-specific configuration.
|
|
64
44
|
*
|
|
65
45
|
* @throws {@link Pinnacle.BadRequestError}
|
|
66
46
|
* @throws {@link Pinnacle.UnauthorizedError}
|
|
67
47
|
* @throws {@link Pinnacle.ForbiddenError}
|
|
68
|
-
* @throws {@link Pinnacle.NotFoundError}
|
|
69
48
|
* @throws {@link Pinnacle.InternalServerError}
|
|
70
49
|
* @throws {@link Pinnacle.NotImplementedError}
|
|
71
50
|
*
|
|
72
51
|
* @example
|
|
73
|
-
* await client.rcs.
|
|
74
|
-
*
|
|
75
|
-
* phoneNumber: "+12345678901"
|
|
52
|
+
* await client.rcs.getCapabilities({
|
|
53
|
+
* phoneNumbers: ["+12345678901", "+19876543210"]
|
|
76
54
|
* })
|
|
77
55
|
*/
|
|
78
|
-
|
|
79
|
-
private
|
|
56
|
+
getCapabilities(request: Pinnacle.RcsCapabilitiesQuery, requestOptions?: Rcs.RequestOptions): core.HttpResponsePromise<Pinnacle.RcsCapabilitiesResult>;
|
|
57
|
+
private __getCapabilities;
|
|
80
58
|
/**
|
|
81
59
|
* Generate a link for initiating an RCS conversation with your agent.
|
|
82
60
|
*
|
|
@@ -96,7 +74,6 @@ export declare class Rcs {
|
|
|
96
74
|
* @example
|
|
97
75
|
* await client.rcs.getLink({
|
|
98
76
|
* agentId: "agent_XXXXXXXXXXXX",
|
|
99
|
-
* testMode: false,
|
|
100
77
|
* phoneNumber: "+12345678901",
|
|
101
78
|
* body: "Hello, I need help with my order"
|
|
102
79
|
* })
|
|
@@ -49,45 +49,45 @@ const core = __importStar(require("../../../../core/index.js"));
|
|
|
49
49
|
const environments = __importStar(require("../../../../environments.js"));
|
|
50
50
|
const errors = __importStar(require("../../../../errors/index.js"));
|
|
51
51
|
const Pinnacle = __importStar(require("../../../index.js"));
|
|
52
|
+
const Client_js_1 = require("../resources/test/client/Client.js");
|
|
52
53
|
class Rcs {
|
|
53
54
|
constructor(_options) {
|
|
54
55
|
this._options = _options;
|
|
55
56
|
}
|
|
57
|
+
get test() {
|
|
58
|
+
var _a;
|
|
59
|
+
return ((_a = this._test) !== null && _a !== void 0 ? _a : (this._test = new Client_js_1.Test(this._options)));
|
|
60
|
+
}
|
|
56
61
|
/**
|
|
57
|
-
*
|
|
62
|
+
* Retrieve details of an RCS agent by its ID.
|
|
58
63
|
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
64
|
+
* Returns the agent's configuration including display name, description, logo, hero image,
|
|
65
|
+
* contact information, and other settings.
|
|
61
66
|
*
|
|
62
|
-
* @param {
|
|
67
|
+
* @param {string} agentId - The RCS agent ID (must be prefixed with `agent_`).
|
|
63
68
|
* @param {Rcs.RequestOptions} requestOptions - Request-specific configuration.
|
|
64
69
|
*
|
|
65
70
|
* @throws {@link Pinnacle.BadRequestError}
|
|
66
71
|
* @throws {@link Pinnacle.UnauthorizedError}
|
|
67
72
|
* @throws {@link Pinnacle.ForbiddenError}
|
|
73
|
+
* @throws {@link Pinnacle.NotFoundError}
|
|
68
74
|
* @throws {@link Pinnacle.InternalServerError}
|
|
69
|
-
* @throws {@link Pinnacle.NotImplementedError}
|
|
70
75
|
*
|
|
71
76
|
* @example
|
|
72
|
-
* await client.rcs.
|
|
73
|
-
* phoneNumbers: ["+12345678901", "+19876543210"]
|
|
74
|
-
* })
|
|
77
|
+
* await client.rcs.getAgent("agent_abc123def456")
|
|
75
78
|
*/
|
|
76
|
-
|
|
77
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
79
|
+
getAgent(agentId, requestOptions) {
|
|
80
|
+
return core.HttpResponsePromise.fromPromise(this.__getAgent(agentId, requestOptions));
|
|
78
81
|
}
|
|
79
|
-
|
|
82
|
+
__getAgent(agentId, requestOptions) {
|
|
80
83
|
return __awaiter(this, void 0, void 0, function* () {
|
|
81
84
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
82
85
|
const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
83
86
|
const _response = yield core.fetcher({
|
|
84
|
-
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,
|
|
85
|
-
method: "
|
|
87
|
+
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/${core.url.encodePathParam(agentId)}`),
|
|
88
|
+
method: "GET",
|
|
86
89
|
headers: _headers,
|
|
87
|
-
contentType: "application/json",
|
|
88
90
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
89
|
-
requestType: "json",
|
|
90
|
-
body: request,
|
|
91
91
|
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
92
92
|
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
93
93
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -105,10 +105,10 @@ class Rcs {
|
|
|
105
105
|
throw new Pinnacle.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
106
106
|
case 403:
|
|
107
107
|
throw new Pinnacle.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
108
|
+
case 404:
|
|
109
|
+
throw new Pinnacle.NotFoundError(_response.error.body, _response.rawResponse);
|
|
108
110
|
case 500:
|
|
109
111
|
throw new Pinnacle.InternalServerError(_response.error.body, _response.rawResponse);
|
|
110
|
-
case 501:
|
|
111
|
-
throw new Pinnacle.NotImplementedError(_response.error.body, _response.rawResponse);
|
|
112
112
|
default:
|
|
113
113
|
throw new errors.PinnacleError({
|
|
114
114
|
statusCode: _response.error.statusCode,
|
|
@@ -125,7 +125,7 @@ class Rcs {
|
|
|
125
125
|
rawResponse: _response.rawResponse,
|
|
126
126
|
});
|
|
127
127
|
case "timeout":
|
|
128
|
-
throw new errors.PinnacleTimeoutError("Timeout exceeded when calling
|
|
128
|
+
throw new errors.PinnacleTimeoutError("Timeout exceeded when calling GET /rcs/{agentId}.");
|
|
129
129
|
case "unknown":
|
|
130
130
|
throw new errors.PinnacleError({
|
|
131
131
|
message: _response.error.errorMessage,
|
|
@@ -135,57 +135,34 @@ class Rcs {
|
|
|
135
135
|
});
|
|
136
136
|
}
|
|
137
137
|
/**
|
|
138
|
-
*
|
|
139
|
-
*
|
|
140
|
-
* ## Overview
|
|
141
|
-
* During development and testing, RCS agents can only send messages to whitelisted phone numbers.
|
|
142
|
-
* Use this endpoint to whitelist specific phone numbers to send and receive messages from the test agent.
|
|
143
|
-
*
|
|
144
|
-
* ## Verification Process
|
|
145
|
-
* After whitelisting a number, you'll need to complete verification:
|
|
146
|
-
*
|
|
147
|
-
* 1. Check the test device for message from "RBM Tester Management"
|
|
148
|
-
* 2. Click the "Make me a tester" button
|
|
149
|
-
* 3. Enter the separate 4-digit verification SMS code in the Pinnacle dashboard at:
|
|
150
|
-
* ```
|
|
151
|
-
* https://app.pinnacle.sh/dashboard/brands/{brandId}?campaignId={campaignId}&campaignType=RCS
|
|
152
|
-
* ```
|
|
153
|
-
*
|
|
154
|
-
* > **⚠️ Important: Re-whitelisting Numbers**
|
|
155
|
-
* >
|
|
156
|
-
* > If you whitelist a number that's already whitelisted, you'll receive a new message from "RBM Tester Management". **You must click the "Make me a tester" button again to continue sending and receiving messages.**
|
|
138
|
+
* Check RCS capabilities for one or more phone numbers.
|
|
157
139
|
*
|
|
158
|
-
*
|
|
159
|
-
*
|
|
160
|
-
* > - **Verification required:** Messages cannot be sent nor received until you have clicked the "Make me a tester" button on the test device.
|
|
161
|
-
* > - **Testing only:** This is only required for test agents. Production agents can message any RCS-enabled number.
|
|
162
|
-
* > - **Network limitations:** Whitelisting may be temporarily unavailable for some carriers but are usually restored shortly.
|
|
140
|
+
* This endpoint allows you to verify which RCS features (cards, buttons, etc.) are supported
|
|
141
|
+
* on specific phone numbers before sending RCS messages to them.
|
|
163
142
|
*
|
|
164
|
-
* @param {Pinnacle.
|
|
143
|
+
* @param {Pinnacle.RcsCapabilitiesQuery} request
|
|
165
144
|
* @param {Rcs.RequestOptions} requestOptions - Request-specific configuration.
|
|
166
145
|
*
|
|
167
146
|
* @throws {@link Pinnacle.BadRequestError}
|
|
168
147
|
* @throws {@link Pinnacle.UnauthorizedError}
|
|
169
148
|
* @throws {@link Pinnacle.ForbiddenError}
|
|
170
|
-
* @throws {@link Pinnacle.NotFoundError}
|
|
171
149
|
* @throws {@link Pinnacle.InternalServerError}
|
|
172
150
|
* @throws {@link Pinnacle.NotImplementedError}
|
|
173
151
|
*
|
|
174
152
|
* @example
|
|
175
|
-
* await client.rcs.
|
|
176
|
-
*
|
|
177
|
-
* phoneNumber: "+12345678901"
|
|
153
|
+
* await client.rcs.getCapabilities({
|
|
154
|
+
* phoneNumbers: ["+12345678901", "+19876543210"]
|
|
178
155
|
* })
|
|
179
156
|
*/
|
|
180
|
-
|
|
181
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
157
|
+
getCapabilities(request, requestOptions) {
|
|
158
|
+
return core.HttpResponsePromise.fromPromise(this.__getCapabilities(request, requestOptions));
|
|
182
159
|
}
|
|
183
|
-
|
|
160
|
+
__getCapabilities(request, requestOptions) {
|
|
184
161
|
return __awaiter(this, void 0, void 0, function* () {
|
|
185
162
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
186
163
|
const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
187
164
|
const _response = yield core.fetcher({
|
|
188
|
-
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/
|
|
165
|
+
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"),
|
|
189
166
|
method: "POST",
|
|
190
167
|
headers: _headers,
|
|
191
168
|
contentType: "application/json",
|
|
@@ -209,8 +186,6 @@ class Rcs {
|
|
|
209
186
|
throw new Pinnacle.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
210
187
|
case 403:
|
|
211
188
|
throw new Pinnacle.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
212
|
-
case 404:
|
|
213
|
-
throw new Pinnacle.NotFoundError(_response.error.body, _response.rawResponse);
|
|
214
189
|
case 500:
|
|
215
190
|
throw new Pinnacle.InternalServerError(_response.error.body, _response.rawResponse);
|
|
216
191
|
case 501:
|
|
@@ -231,7 +206,7 @@ class Rcs {
|
|
|
231
206
|
rawResponse: _response.rawResponse,
|
|
232
207
|
});
|
|
233
208
|
case "timeout":
|
|
234
|
-
throw new errors.PinnacleTimeoutError("Timeout exceeded when calling POST /rcs/
|
|
209
|
+
throw new errors.PinnacleTimeoutError("Timeout exceeded when calling POST /rcs/capabilities.");
|
|
235
210
|
case "unknown":
|
|
236
211
|
throw new errors.PinnacleError({
|
|
237
212
|
message: _response.error.errorMessage,
|
|
@@ -259,7 +234,6 @@ class Rcs {
|
|
|
259
234
|
* @example
|
|
260
235
|
* await client.rcs.getLink({
|
|
261
236
|
* agentId: "agent_XXXXXXXXXXXX",
|
|
262
|
-
* testMode: false,
|
|
263
237
|
* phoneNumber: "+12345678901",
|
|
264
238
|
* body: "Hello, I need help with my order"
|
|
265
239
|
* })
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
* @example
|
|
3
3
|
* {
|
|
4
4
|
* agentId: "agent_XXXXXXXXXXXX",
|
|
5
|
-
* testMode: false,
|
|
6
5
|
* phoneNumber: "+12345678901",
|
|
7
6
|
* body: "Hello, I need help with my order"
|
|
8
7
|
* }
|
|
@@ -10,8 +9,6 @@
|
|
|
10
9
|
export interface RcsLinkRequest {
|
|
11
10
|
/** The RCS agent ID (must be prefixed with 'agent_') */
|
|
12
11
|
agentId: string;
|
|
13
|
-
/** Link to the test agent or the production agent if false */
|
|
14
|
-
testMode?: boolean;
|
|
15
12
|
/** Fallback phone number (E.164 format) to use if the phone number does not support RCS. If not provided, no url will be generated. */
|
|
16
13
|
phoneNumber?: string;
|
|
17
14
|
/** Optional message body to pre-fill after the user clicks the link */
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
19
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
20
|
+
};
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.test = void 0;
|
|
40
|
+
__exportStar(require("./test/client/requests/index.js"), exports);
|
|
41
|
+
exports.test = __importStar(require("./test/index.js"));
|