rcs-js 2.0.0-rc.7 → 2.0.0-rc.9
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 +0 -3
- package/dist/cjs/Client.js +6 -11
- package/dist/cjs/api/resources/brands/client/requests/UpsertBrandParams.d.ts +1 -1
- package/dist/cjs/api/resources/campaigns/resources/rcs/client/requests/UpsertRcsCampaignParams.d.ts +2 -0
- package/dist/cjs/api/resources/index.d.ts +0 -1
- package/dist/cjs/api/resources/index.js +1 -2
- package/dist/cjs/api/resources/messages/client/Client.d.ts +3 -3
- package/dist/cjs/api/resources/messages/client/Client.js +3 -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 +26 -0
- package/dist/cjs/api/resources/messages/resources/mms/client/Client.js +83 -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/resources/sms → messages/resources/mms/types}/index.js +1 -1
- package/dist/cjs/api/resources/messages/resources/rcs/client/Client.d.ts +28 -0
- package/dist/cjs/api/resources/messages/resources/rcs/client/Client.js +85 -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/{message → messages/resources/rcs/types}/index.js +1 -2
- package/dist/cjs/api/resources/{message → messages}/resources/sms/client/Client.d.ts +22 -1
- package/dist/cjs/api/resources/messages/resources/{send → sms}/client/Client.js +19 -117
- 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/types/ExtendedRcsCampaign.d.ts +2 -0
- package/dist/cjs/api/types/Rcs.d.ts +3 -3
- package/dist/cjs/api/types/RcsCampaign.d.ts +2 -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/RcsMediaContent.d.ts +1 -1
- package/dist/cjs/api/types/RcsTextContent.d.ts +1 -1
- package/dist/cjs/api/types/{RcsButtonContent.d.ts → RichButton.d.ts} +2 -2
- package/dist/cjs/api/types/{RcsCard.d.ts → RichCardsMessage.d.ts} +1 -1
- package/dist/cjs/api/types/{RcsMedia.d.ts → RichMediaMessage.d.ts} +2 -2
- package/dist/cjs/api/types/{RcsText.d.ts → RichTextMessage.d.ts} +1 -1
- package/dist/{esm/api/types/NullableContact.d.mts → cjs/api/types/UpsertContact.d.ts} +1 -1
- package/dist/cjs/api/types/index.d.ts +5 -5
- package/dist/cjs/api/types/index.js +5 -5
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Client.d.mts +0 -3
- package/dist/esm/Client.mjs +2 -7
- package/dist/esm/api/resources/brands/client/requests/UpsertBrandParams.d.mts +1 -1
- package/dist/esm/api/resources/campaigns/resources/rcs/client/requests/UpsertRcsCampaignParams.d.mts +2 -0
- package/dist/esm/api/resources/index.d.mts +0 -1
- package/dist/esm/api/resources/index.mjs +0 -1
- package/dist/esm/api/resources/messages/client/Client.d.mts +3 -3
- package/dist/esm/api/resources/messages/client/Client.mjs +3 -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 +26 -0
- package/dist/esm/api/resources/messages/resources/mms/client/Client.mjs +83 -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 +28 -0
- package/dist/esm/api/resources/messages/resources/rcs/client/Client.mjs +85 -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 +22 -1
- package/dist/esm/api/resources/messages/resources/{send → sms}/client/Client.mjs +17 -115
- 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/types/ExtendedRcsCampaign.d.mts +2 -0
- package/dist/esm/api/types/Rcs.d.mts +3 -3
- package/dist/esm/api/types/RcsCampaign.d.mts +2 -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/RcsMediaContent.d.mts +1 -1
- package/dist/esm/api/types/RcsTextContent.d.mts +1 -1
- package/dist/esm/api/types/{RcsButtonContent.d.mts → RichButton.d.mts} +2 -2
- package/dist/esm/api/types/{RcsCard.d.mts → RichCardsMessage.d.mts} +1 -1
- package/dist/esm/api/types/{RcsMedia.d.mts → RichMediaMessage.d.mts} +2 -2
- package/dist/esm/api/types/{RcsText.d.mts → RichTextMessage.d.mts} +1 -1
- package/dist/{cjs/api/types/NullableContact.d.ts → esm/api/types/UpsertContact.d.mts} +1 -1
- package/dist/esm/api/types/index.d.mts +5 -5
- package/dist/esm/api/types/index.mjs +5 -5
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +2 -2
- package/reference.md +46 -48
- 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/Client.js +0 -135
- package/dist/cjs/api/resources/message/resources/sms/client/index.d.ts +0 -1
- package/dist/cjs/api/resources/message/resources/sms/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/client/requests/index.js +0 -2
- 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/Client.mjs +0 -98
- package/dist/esm/api/resources/message/resources/sms/client/index.d.mts +0 -1
- package/dist/esm/api/resources/message/resources/sms/index.d.mts +0 -1
- package/dist/esm/api/resources/message/resources/sms/index.mjs +0 -1
- package/dist/esm/api/resources/messages/resources/send/client/Client.d.mts +0 -110
- package/dist/esm/api/resources/messages/resources/send/client/requests/index.mjs +0 -1
- 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 → RichButton.js} +0 -0
- /package/dist/cjs/api/types/{RcsButtonContent.js → RichCardsMessage.js} +0 -0
- /package/dist/cjs/api/types/{RcsCard.js → RichMediaMessage.js} +0 -0
- /package/dist/cjs/api/types/{RcsMedia.js → RichTextMessage.js} +0 -0
- /package/dist/cjs/api/types/{RcsText.js → UpsertContact.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 → RichButton.mjs} +0 -0
- /package/dist/esm/api/types/{RcsButtonContent.mjs → RichCardsMessage.mjs} +0 -0
- /package/dist/esm/api/types/{RcsCard.mjs → RichMediaMessage.mjs} +0 -0
- /package/dist/esm/api/types/{RcsMedia.mjs → RichTextMessage.mjs} +0 -0
- /package/dist/esm/api/types/{RcsText.mjs → UpsertContact.mjs} +0 -0
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
export * as
|
|
2
|
-
export * from "./
|
|
1
|
+
export * as sms from "./sms/index.mjs";
|
|
2
|
+
export * from "./sms/types/index.mjs";
|
|
3
3
|
export * as mms from "./mms/index.mjs";
|
|
4
|
+
export * from "./mms/types/index.mjs";
|
|
4
5
|
export * as rcs from "./rcs/index.mjs";
|
|
5
|
-
export * from "./
|
|
6
|
+
export * from "./rcs/types/index.mjs";
|
|
7
|
+
export * from "./sms/client/requests/index.mjs";
|
|
8
|
+
export * from "./mms/client/requests/index.mjs";
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
export * as
|
|
2
|
-
export * from "./
|
|
1
|
+
export * as sms from "./sms/index.mjs";
|
|
2
|
+
export * from "./sms/types/index.mjs";
|
|
3
3
|
export * as mms from "./mms/index.mjs";
|
|
4
|
+
export * from "./mms/types/index.mjs";
|
|
4
5
|
export * as rcs from "./rcs/index.mjs";
|
|
5
|
-
export * from "./
|
|
6
|
+
export * from "./rcs/types/index.mjs";
|
|
7
|
+
export * from "./sms/client/requests/index.mjs";
|
|
8
|
+
export * from "./mms/client/requests/index.mjs";
|
|
@@ -29,6 +29,32 @@ 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
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* await client.messages.mms.send({
|
|
46
|
+
* from: "+14155164736",
|
|
47
|
+
* mediaUrls: ["https://fastly.picsum.photos/id/941/300/300.jpg?hmac=mDxM9PWSqRDjecwSCEpzU4bj35gqnG7yA25OL29uNv0"],
|
|
48
|
+
* options: {
|
|
49
|
+
* multiple_messages: true,
|
|
50
|
+
* validate: true
|
|
51
|
+
* },
|
|
52
|
+
* text: "Check out this image!",
|
|
53
|
+
* to: "+14154746461"
|
|
54
|
+
* })
|
|
55
|
+
*/
|
|
56
|
+
send(request: Pinnacle.messages.Mms, requestOptions?: Mms.RequestOptions): core.HttpResponsePromise<Pinnacle.messages.MmsSendResponse>;
|
|
57
|
+
private __send;
|
|
32
58
|
/**
|
|
33
59
|
* Validate MMS message content without sending it.
|
|
34
60
|
*
|
|
@@ -19,6 +19,89 @@ 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
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* await client.messages.mms.send({
|
|
36
|
+
* from: "+14155164736",
|
|
37
|
+
* mediaUrls: ["https://fastly.picsum.photos/id/941/300/300.jpg?hmac=mDxM9PWSqRDjecwSCEpzU4bj35gqnG7yA25OL29uNv0"],
|
|
38
|
+
* options: {
|
|
39
|
+
* multiple_messages: true,
|
|
40
|
+
* validate: true
|
|
41
|
+
* },
|
|
42
|
+
* text: "Check out this image!",
|
|
43
|
+
* to: "+14154746461"
|
|
44
|
+
* })
|
|
45
|
+
*/
|
|
46
|
+
send(request, requestOptions) {
|
|
47
|
+
return core.HttpResponsePromise.fromPromise(this.__send(request, requestOptions));
|
|
48
|
+
}
|
|
49
|
+
__send(request, requestOptions) {
|
|
50
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
51
|
+
var _a, _b, _c;
|
|
52
|
+
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);
|
|
53
|
+
const _response = yield core.fetcher({
|
|
54
|
+
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"),
|
|
55
|
+
method: "POST",
|
|
56
|
+
headers: _headers,
|
|
57
|
+
contentType: "application/json",
|
|
58
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
59
|
+
requestType: "json",
|
|
60
|
+
body: request,
|
|
61
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
62
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
63
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
64
|
+
});
|
|
65
|
+
if (_response.ok) {
|
|
66
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
67
|
+
}
|
|
68
|
+
if (_response.error.reason === "status-code") {
|
|
69
|
+
switch (_response.error.statusCode) {
|
|
70
|
+
case 400:
|
|
71
|
+
throw new Pinnacle.BadRequestError(_response.error.body, _response.rawResponse);
|
|
72
|
+
case 401:
|
|
73
|
+
throw new Pinnacle.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
74
|
+
case 402:
|
|
75
|
+
throw new Pinnacle.PaymentRequiredError(_response.error.body, _response.rawResponse);
|
|
76
|
+
case 404:
|
|
77
|
+
throw new Pinnacle.NotFoundError(_response.error.body, _response.rawResponse);
|
|
78
|
+
case 500:
|
|
79
|
+
throw new Pinnacle.InternalServerError(_response.error.body, _response.rawResponse);
|
|
80
|
+
default:
|
|
81
|
+
throw new errors.PinnacleError({
|
|
82
|
+
statusCode: _response.error.statusCode,
|
|
83
|
+
body: _response.error.body,
|
|
84
|
+
rawResponse: _response.rawResponse,
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
switch (_response.error.reason) {
|
|
89
|
+
case "non-json":
|
|
90
|
+
throw new errors.PinnacleError({
|
|
91
|
+
statusCode: _response.error.statusCode,
|
|
92
|
+
body: _response.error.rawBody,
|
|
93
|
+
rawResponse: _response.rawResponse,
|
|
94
|
+
});
|
|
95
|
+
case "timeout":
|
|
96
|
+
throw new errors.PinnacleTimeoutError("Timeout exceeded when calling POST /messages/send/mms.");
|
|
97
|
+
case "unknown":
|
|
98
|
+
throw new errors.PinnacleError({
|
|
99
|
+
message: _response.error.errorMessage,
|
|
100
|
+
rawResponse: _response.rawResponse,
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
}
|
|
22
105
|
/**
|
|
23
106
|
* Validate MMS message content without sending it.
|
|
24
107
|
*
|
|
@@ -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,34 @@ 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
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* await client.messages.rcs.send({
|
|
48
|
+
* quickReplies: [{
|
|
49
|
+
* type: "openUrl",
|
|
50
|
+
* payload: "payload",
|
|
51
|
+
* title: "title"
|
|
52
|
+
* }],
|
|
53
|
+
* text: "text",
|
|
54
|
+
* from: "from",
|
|
55
|
+
* to: "to"
|
|
56
|
+
* })
|
|
57
|
+
*/
|
|
58
|
+
send(request: Pinnacle.Rcs, requestOptions?: Rcs.RequestOptions): core.HttpResponsePromise<Pinnacle.messages.RcsSendResponse>;
|
|
59
|
+
private __send;
|
|
32
60
|
/**
|
|
33
61
|
* Validate RCS message content without sending it.
|
|
34
62
|
*
|
|
@@ -19,6 +19,91 @@ 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
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* await client.messages.rcs.send({
|
|
38
|
+
* quickReplies: [{
|
|
39
|
+
* type: "openUrl",
|
|
40
|
+
* payload: "payload",
|
|
41
|
+
* title: "title"
|
|
42
|
+
* }],
|
|
43
|
+
* text: "text",
|
|
44
|
+
* from: "from",
|
|
45
|
+
* to: "to"
|
|
46
|
+
* })
|
|
47
|
+
*/
|
|
48
|
+
send(request, requestOptions) {
|
|
49
|
+
return core.HttpResponsePromise.fromPromise(this.__send(request, requestOptions));
|
|
50
|
+
}
|
|
51
|
+
__send(request, requestOptions) {
|
|
52
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
53
|
+
var _a, _b, _c;
|
|
54
|
+
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);
|
|
55
|
+
const _response = yield core.fetcher({
|
|
56
|
+
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"),
|
|
57
|
+
method: "POST",
|
|
58
|
+
headers: _headers,
|
|
59
|
+
contentType: "application/json",
|
|
60
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
61
|
+
requestType: "json",
|
|
62
|
+
body: request,
|
|
63
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
64
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
65
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
66
|
+
});
|
|
67
|
+
if (_response.ok) {
|
|
68
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
69
|
+
}
|
|
70
|
+
if (_response.error.reason === "status-code") {
|
|
71
|
+
switch (_response.error.statusCode) {
|
|
72
|
+
case 400:
|
|
73
|
+
throw new Pinnacle.BadRequestError(_response.error.body, _response.rawResponse);
|
|
74
|
+
case 401:
|
|
75
|
+
throw new Pinnacle.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
76
|
+
case 402:
|
|
77
|
+
throw new Pinnacle.PaymentRequiredError(_response.error.body, _response.rawResponse);
|
|
78
|
+
case 404:
|
|
79
|
+
throw new Pinnacle.NotFoundError(_response.error.body, _response.rawResponse);
|
|
80
|
+
case 500:
|
|
81
|
+
throw new Pinnacle.InternalServerError(_response.error.body, _response.rawResponse);
|
|
82
|
+
default:
|
|
83
|
+
throw new errors.PinnacleError({
|
|
84
|
+
statusCode: _response.error.statusCode,
|
|
85
|
+
body: _response.error.body,
|
|
86
|
+
rawResponse: _response.rawResponse,
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
switch (_response.error.reason) {
|
|
91
|
+
case "non-json":
|
|
92
|
+
throw new errors.PinnacleError({
|
|
93
|
+
statusCode: _response.error.statusCode,
|
|
94
|
+
body: _response.error.rawBody,
|
|
95
|
+
rawResponse: _response.rawResponse,
|
|
96
|
+
});
|
|
97
|
+
case "timeout":
|
|
98
|
+
throw new errors.PinnacleTimeoutError("Timeout exceeded when calling POST /messages/send/rcs.");
|
|
99
|
+
case "unknown":
|
|
100
|
+
throw new errors.PinnacleError({
|
|
101
|
+
message: _response.error.errorMessage,
|
|
102
|
+
rawResponse: _response.rawResponse,
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
}
|
|
22
107
|
/**
|
|
23
108
|
* Validate RCS message content without sending it.
|
|
24
109
|
*
|
|
@@ -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,27 @@ 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
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* await client.messages.sms.send({
|
|
46
|
+
* from: "+14155164736",
|
|
47
|
+
* text: "Hey!",
|
|
48
|
+
* to: "+14154746461"
|
|
49
|
+
* })
|
|
50
|
+
*/
|
|
51
|
+
send(request: Pinnacle.messages.Sms, requestOptions?: Sms.RequestOptions): core.HttpResponsePromise<Pinnacle.messages.SmsSendResponse>;
|
|
52
|
+
private __send;
|
|
32
53
|
/**
|
|
33
54
|
* Validate SMS message content without sending it.
|
|
34
55
|
*
|
|
@@ -40,7 +61,7 @@ export declare class Sms {
|
|
|
40
61
|
* @throws {@link Pinnacle.InternalServerError}
|
|
41
62
|
*
|
|
42
63
|
* @example
|
|
43
|
-
* await client.
|
|
64
|
+
* await client.messages.sms.validate({
|
|
44
65
|
* text: "Hello from Pinnacle"
|
|
45
66
|
* })
|
|
46
67
|
*/
|
|
@@ -15,7 +15,7 @@ import * as core from "../../../../../../core/index.mjs";
|
|
|
15
15
|
import * as Pinnacle from "../../../../../index.mjs";
|
|
16
16
|
import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/headers.mjs";
|
|
17
17
|
import * as errors from "../../../../../../errors/index.mjs";
|
|
18
|
-
export class
|
|
18
|
+
export class Sms {
|
|
19
19
|
constructor(_options) {
|
|
20
20
|
this._options = _options;
|
|
21
21
|
}
|
|
@@ -23,7 +23,7 @@ export class Send {
|
|
|
23
23
|
* Send a SMS message immediately or schedule it for future delivery.
|
|
24
24
|
*
|
|
25
25
|
* @param {Pinnacle.messages.Sms} request
|
|
26
|
-
* @param {
|
|
26
|
+
* @param {Sms.RequestOptions} requestOptions - Request-specific configuration.
|
|
27
27
|
*
|
|
28
28
|
* @throws {@link Pinnacle.BadRequestError}
|
|
29
29
|
* @throws {@link Pinnacle.UnauthorizedError}
|
|
@@ -32,16 +32,16 @@ export class Send {
|
|
|
32
32
|
* @throws {@link Pinnacle.InternalServerError}
|
|
33
33
|
*
|
|
34
34
|
* @example
|
|
35
|
-
* await client.messages.send
|
|
35
|
+
* await client.messages.sms.send({
|
|
36
36
|
* from: "+14155164736",
|
|
37
|
-
* text: "Hey!
|
|
37
|
+
* text: "Hey!",
|
|
38
38
|
* to: "+14154746461"
|
|
39
39
|
* })
|
|
40
40
|
*/
|
|
41
|
-
|
|
42
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
41
|
+
send(request, requestOptions) {
|
|
42
|
+
return core.HttpResponsePromise.fromPromise(this.__send(request, requestOptions));
|
|
43
43
|
}
|
|
44
|
-
|
|
44
|
+
__send(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);
|
|
@@ -98,38 +98,29 @@ export class Send {
|
|
|
98
98
|
});
|
|
99
99
|
}
|
|
100
100
|
/**
|
|
101
|
-
*
|
|
101
|
+
* Validate SMS message content without sending it.
|
|
102
102
|
*
|
|
103
|
-
* @param {Pinnacle.
|
|
104
|
-
* @param {
|
|
103
|
+
* @param {Pinnacle.SmsContent} request
|
|
104
|
+
* @param {Sms.RequestOptions} requestOptions - Request-specific configuration.
|
|
105
105
|
*
|
|
106
106
|
* @throws {@link Pinnacle.BadRequestError}
|
|
107
107
|
* @throws {@link Pinnacle.UnauthorizedError}
|
|
108
|
-
* @throws {@link Pinnacle.PaymentRequiredError}
|
|
109
|
-
* @throws {@link Pinnacle.NotFoundError}
|
|
110
108
|
* @throws {@link Pinnacle.InternalServerError}
|
|
111
109
|
*
|
|
112
110
|
* @example
|
|
113
|
-
* await client.messages.
|
|
114
|
-
*
|
|
115
|
-
* mediaUrls: ["https://fastly.picsum.photos/id/941/300/300.jpg?hmac=mDxM9PWSqRDjecwSCEpzU4bj35gqnG7yA25OL29uNv0"],
|
|
116
|
-
* options: {
|
|
117
|
-
* multiple_messages: true,
|
|
118
|
-
* validate: true
|
|
119
|
-
* },
|
|
120
|
-
* text: "Check out this image!",
|
|
121
|
-
* to: "+14154746461"
|
|
111
|
+
* await client.messages.sms.validate({
|
|
112
|
+
* text: "Hello from Pinnacle"
|
|
122
113
|
* })
|
|
123
114
|
*/
|
|
124
|
-
|
|
125
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
115
|
+
validate(request, requestOptions) {
|
|
116
|
+
return core.HttpResponsePromise.fromPromise(this.__validate(request, requestOptions));
|
|
126
117
|
}
|
|
127
|
-
|
|
118
|
+
__validate(request, requestOptions) {
|
|
128
119
|
return __awaiter(this, void 0, void 0, function* () {
|
|
129
120
|
var _a, _b, _c;
|
|
130
121
|
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
122
|
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, "messages/
|
|
123
|
+
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/validate/sms"),
|
|
133
124
|
method: "POST",
|
|
134
125
|
headers: _headers,
|
|
135
126
|
contentType: "application/json",
|
|
@@ -149,95 +140,6 @@ export class Send {
|
|
|
149
140
|
throw new Pinnacle.BadRequestError(_response.error.body, _response.rawResponse);
|
|
150
141
|
case 401:
|
|
151
142
|
throw new Pinnacle.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
152
|
-
case 402:
|
|
153
|
-
throw new Pinnacle.PaymentRequiredError(_response.error.body, _response.rawResponse);
|
|
154
|
-
case 404:
|
|
155
|
-
throw new Pinnacle.NotFoundError(_response.error.body, _response.rawResponse);
|
|
156
|
-
case 500:
|
|
157
|
-
throw new Pinnacle.InternalServerError(_response.error.body, _response.rawResponse);
|
|
158
|
-
default:
|
|
159
|
-
throw new errors.PinnacleError({
|
|
160
|
-
statusCode: _response.error.statusCode,
|
|
161
|
-
body: _response.error.body,
|
|
162
|
-
rawResponse: _response.rawResponse,
|
|
163
|
-
});
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
switch (_response.error.reason) {
|
|
167
|
-
case "non-json":
|
|
168
|
-
throw new errors.PinnacleError({
|
|
169
|
-
statusCode: _response.error.statusCode,
|
|
170
|
-
body: _response.error.rawBody,
|
|
171
|
-
rawResponse: _response.rawResponse,
|
|
172
|
-
});
|
|
173
|
-
case "timeout":
|
|
174
|
-
throw new errors.PinnacleTimeoutError("Timeout exceeded when calling POST /messages/send/mms.");
|
|
175
|
-
case "unknown":
|
|
176
|
-
throw new errors.PinnacleError({
|
|
177
|
-
message: _response.error.errorMessage,
|
|
178
|
-
rawResponse: _response.rawResponse,
|
|
179
|
-
});
|
|
180
|
-
}
|
|
181
|
-
});
|
|
182
|
-
}
|
|
183
|
-
/**
|
|
184
|
-
* Send a RCS message immediately or schedule it for future delivery. <br>
|
|
185
|
-
*
|
|
186
|
-
* Requires an active RCS agent and recipient devices that support RCS Business Messaging.
|
|
187
|
-
*
|
|
188
|
-
* @param {Pinnacle.Rcs} request
|
|
189
|
-
* @param {Send.RequestOptions} requestOptions - Request-specific configuration.
|
|
190
|
-
*
|
|
191
|
-
* @throws {@link Pinnacle.BadRequestError}
|
|
192
|
-
* @throws {@link Pinnacle.UnauthorizedError}
|
|
193
|
-
* @throws {@link Pinnacle.PaymentRequiredError}
|
|
194
|
-
* @throws {@link Pinnacle.NotFoundError}
|
|
195
|
-
* @throws {@link Pinnacle.InternalServerError}
|
|
196
|
-
*
|
|
197
|
-
* @example
|
|
198
|
-
* await client.messages.send.rcs({
|
|
199
|
-
* quickReplies: [{
|
|
200
|
-
* type: "openUrl",
|
|
201
|
-
* payload: "payload",
|
|
202
|
-
* title: "title"
|
|
203
|
-
* }],
|
|
204
|
-
* text: "text",
|
|
205
|
-
* from: "from",
|
|
206
|
-
* to: "to"
|
|
207
|
-
* })
|
|
208
|
-
*/
|
|
209
|
-
rcs(request, requestOptions) {
|
|
210
|
-
return core.HttpResponsePromise.fromPromise(this.__rcs(request, requestOptions));
|
|
211
|
-
}
|
|
212
|
-
__rcs(request, requestOptions) {
|
|
213
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
214
|
-
var _a, _b, _c;
|
|
215
|
-
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
|
-
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, "messages/send/rcs"),
|
|
218
|
-
method: "POST",
|
|
219
|
-
headers: _headers,
|
|
220
|
-
contentType: "application/json",
|
|
221
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
222
|
-
requestType: "json",
|
|
223
|
-
body: request,
|
|
224
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
225
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
226
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
227
|
-
});
|
|
228
|
-
if (_response.ok) {
|
|
229
|
-
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
230
|
-
}
|
|
231
|
-
if (_response.error.reason === "status-code") {
|
|
232
|
-
switch (_response.error.statusCode) {
|
|
233
|
-
case 400:
|
|
234
|
-
throw new Pinnacle.BadRequestError(_response.error.body, _response.rawResponse);
|
|
235
|
-
case 401:
|
|
236
|
-
throw new Pinnacle.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
237
|
-
case 402:
|
|
238
|
-
throw new Pinnacle.PaymentRequiredError(_response.error.body, _response.rawResponse);
|
|
239
|
-
case 404:
|
|
240
|
-
throw new Pinnacle.NotFoundError(_response.error.body, _response.rawResponse);
|
|
241
143
|
case 500:
|
|
242
144
|
throw new Pinnacle.InternalServerError(_response.error.body, _response.rawResponse);
|
|
243
145
|
default:
|
|
@@ -256,7 +158,7 @@ export class Send {
|
|
|
256
158
|
rawResponse: _response.rawResponse,
|
|
257
159
|
});
|
|
258
160
|
case "timeout":
|
|
259
|
-
throw new errors.PinnacleTimeoutError("Timeout exceeded when calling POST /messages/
|
|
161
|
+
throw new errors.PinnacleTimeoutError("Timeout exceeded when calling POST /messages/validate/sms.");
|
|
260
162
|
case "unknown":
|
|
261
163
|
throw new errors.PinnacleError({
|
|
262
164
|
message: _response.error.errorMessage,
|
|
@@ -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. */
|
|
@@ -35,6 +35,8 @@ export declare namespace ExtendedRcsCampaign {
|
|
|
35
35
|
description?: string;
|
|
36
36
|
/** List of emails. */
|
|
37
37
|
emails?: Agent.Emails.Item[];
|
|
38
|
+
/** 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. */
|
|
39
|
+
brandVerificationUrl?: string;
|
|
38
40
|
/** Link to the agent's hero. */
|
|
39
41
|
heroUrl?: string;
|
|
40
42
|
/** Link to the agent's icon. */
|
|
@@ -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;
|