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
|
@@ -45,13 +45,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
45
45
|
});
|
|
46
46
|
};
|
|
47
47
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
|
-
exports.
|
|
48
|
+
exports.Sms = void 0;
|
|
49
49
|
const environments = __importStar(require("../../../../../../environments.js"));
|
|
50
50
|
const core = __importStar(require("../../../../../../core/index.js"));
|
|
51
51
|
const Pinnacle = __importStar(require("../../../../../index.js"));
|
|
52
52
|
const headers_js_1 = require("../../../../../../core/headers.js");
|
|
53
53
|
const errors = __importStar(require("../../../../../../errors/index.js"));
|
|
54
|
-
class
|
|
54
|
+
class Sms {
|
|
55
55
|
constructor(_options) {
|
|
56
56
|
this._options = _options;
|
|
57
57
|
}
|
|
@@ -59,7 +59,7 @@ class Send {
|
|
|
59
59
|
* Send a SMS message immediately or schedule it for future delivery.
|
|
60
60
|
*
|
|
61
61
|
* @param {Pinnacle.messages.Sms} request
|
|
62
|
-
* @param {
|
|
62
|
+
* @param {Sms.RequestOptions} requestOptions - Request-specific configuration.
|
|
63
63
|
*
|
|
64
64
|
* @throws {@link Pinnacle.BadRequestError}
|
|
65
65
|
* @throws {@link Pinnacle.UnauthorizedError}
|
|
@@ -68,16 +68,16 @@ class Send {
|
|
|
68
68
|
* @throws {@link Pinnacle.InternalServerError}
|
|
69
69
|
*
|
|
70
70
|
* @example
|
|
71
|
-
* await client.messages.send
|
|
71
|
+
* await client.messages.sms.send({
|
|
72
72
|
* from: "+14155164736",
|
|
73
|
-
* text: "Hey!
|
|
73
|
+
* text: "Hey!",
|
|
74
74
|
* to: "+14154746461"
|
|
75
75
|
* })
|
|
76
76
|
*/
|
|
77
|
-
|
|
78
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
77
|
+
send(request, requestOptions) {
|
|
78
|
+
return core.HttpResponsePromise.fromPromise(this.__send(request, requestOptions));
|
|
79
79
|
}
|
|
80
|
-
|
|
80
|
+
__send(request, requestOptions) {
|
|
81
81
|
return __awaiter(this, void 0, void 0, function* () {
|
|
82
82
|
var _a, _b, _c;
|
|
83
83
|
let _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);
|
|
@@ -134,38 +134,29 @@ class Send {
|
|
|
134
134
|
});
|
|
135
135
|
}
|
|
136
136
|
/**
|
|
137
|
-
*
|
|
137
|
+
* Validate SMS message content without sending it.
|
|
138
138
|
*
|
|
139
|
-
* @param {Pinnacle.
|
|
140
|
-
* @param {
|
|
139
|
+
* @param {Pinnacle.SmsContent} request
|
|
140
|
+
* @param {Sms.RequestOptions} requestOptions - Request-specific configuration.
|
|
141
141
|
*
|
|
142
142
|
* @throws {@link Pinnacle.BadRequestError}
|
|
143
143
|
* @throws {@link Pinnacle.UnauthorizedError}
|
|
144
|
-
* @throws {@link Pinnacle.PaymentRequiredError}
|
|
145
|
-
* @throws {@link Pinnacle.NotFoundError}
|
|
146
144
|
* @throws {@link Pinnacle.InternalServerError}
|
|
147
145
|
*
|
|
148
146
|
* @example
|
|
149
|
-
* await client.messages.
|
|
150
|
-
*
|
|
151
|
-
* mediaUrls: ["https://fastly.picsum.photos/id/941/300/300.jpg?hmac=mDxM9PWSqRDjecwSCEpzU4bj35gqnG7yA25OL29uNv0"],
|
|
152
|
-
* options: {
|
|
153
|
-
* multiple_messages: true,
|
|
154
|
-
* validate: true
|
|
155
|
-
* },
|
|
156
|
-
* text: "Check out this image!",
|
|
157
|
-
* to: "+14154746461"
|
|
147
|
+
* await client.messages.sms.validate({
|
|
148
|
+
* text: "Hello from Pinnacle"
|
|
158
149
|
* })
|
|
159
150
|
*/
|
|
160
|
-
|
|
161
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
151
|
+
validate(request, requestOptions) {
|
|
152
|
+
return core.HttpResponsePromise.fromPromise(this.__validate(request, requestOptions));
|
|
162
153
|
}
|
|
163
|
-
|
|
154
|
+
__validate(request, requestOptions) {
|
|
164
155
|
return __awaiter(this, void 0, void 0, function* () {
|
|
165
156
|
var _a, _b, _c;
|
|
166
157
|
let _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);
|
|
167
158
|
const _response = yield core.fetcher({
|
|
168
|
-
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/
|
|
159
|
+
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"),
|
|
169
160
|
method: "POST",
|
|
170
161
|
headers: _headers,
|
|
171
162
|
contentType: "application/json",
|
|
@@ -185,95 +176,6 @@ class Send {
|
|
|
185
176
|
throw new Pinnacle.BadRequestError(_response.error.body, _response.rawResponse);
|
|
186
177
|
case 401:
|
|
187
178
|
throw new Pinnacle.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
188
|
-
case 402:
|
|
189
|
-
throw new Pinnacle.PaymentRequiredError(_response.error.body, _response.rawResponse);
|
|
190
|
-
case 404:
|
|
191
|
-
throw new Pinnacle.NotFoundError(_response.error.body, _response.rawResponse);
|
|
192
|
-
case 500:
|
|
193
|
-
throw new Pinnacle.InternalServerError(_response.error.body, _response.rawResponse);
|
|
194
|
-
default:
|
|
195
|
-
throw new errors.PinnacleError({
|
|
196
|
-
statusCode: _response.error.statusCode,
|
|
197
|
-
body: _response.error.body,
|
|
198
|
-
rawResponse: _response.rawResponse,
|
|
199
|
-
});
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
switch (_response.error.reason) {
|
|
203
|
-
case "non-json":
|
|
204
|
-
throw new errors.PinnacleError({
|
|
205
|
-
statusCode: _response.error.statusCode,
|
|
206
|
-
body: _response.error.rawBody,
|
|
207
|
-
rawResponse: _response.rawResponse,
|
|
208
|
-
});
|
|
209
|
-
case "timeout":
|
|
210
|
-
throw new errors.PinnacleTimeoutError("Timeout exceeded when calling POST /messages/send/mms.");
|
|
211
|
-
case "unknown":
|
|
212
|
-
throw new errors.PinnacleError({
|
|
213
|
-
message: _response.error.errorMessage,
|
|
214
|
-
rawResponse: _response.rawResponse,
|
|
215
|
-
});
|
|
216
|
-
}
|
|
217
|
-
});
|
|
218
|
-
}
|
|
219
|
-
/**
|
|
220
|
-
* Send a RCS message immediately or schedule it for future delivery. <br>
|
|
221
|
-
*
|
|
222
|
-
* Requires an active RCS agent and recipient devices that support RCS Business Messaging.
|
|
223
|
-
*
|
|
224
|
-
* @param {Pinnacle.Rcs} request
|
|
225
|
-
* @param {Send.RequestOptions} requestOptions - Request-specific configuration.
|
|
226
|
-
*
|
|
227
|
-
* @throws {@link Pinnacle.BadRequestError}
|
|
228
|
-
* @throws {@link Pinnacle.UnauthorizedError}
|
|
229
|
-
* @throws {@link Pinnacle.PaymentRequiredError}
|
|
230
|
-
* @throws {@link Pinnacle.NotFoundError}
|
|
231
|
-
* @throws {@link Pinnacle.InternalServerError}
|
|
232
|
-
*
|
|
233
|
-
* @example
|
|
234
|
-
* await client.messages.send.rcs({
|
|
235
|
-
* quickReplies: [{
|
|
236
|
-
* type: "openUrl",
|
|
237
|
-
* payload: "payload",
|
|
238
|
-
* title: "title"
|
|
239
|
-
* }],
|
|
240
|
-
* text: "text",
|
|
241
|
-
* from: "from",
|
|
242
|
-
* to: "to"
|
|
243
|
-
* })
|
|
244
|
-
*/
|
|
245
|
-
rcs(request, requestOptions) {
|
|
246
|
-
return core.HttpResponsePromise.fromPromise(this.__rcs(request, requestOptions));
|
|
247
|
-
}
|
|
248
|
-
__rcs(request, requestOptions) {
|
|
249
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
250
|
-
var _a, _b, _c;
|
|
251
|
-
let _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);
|
|
252
|
-
const _response = yield core.fetcher({
|
|
253
|
-
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"),
|
|
254
|
-
method: "POST",
|
|
255
|
-
headers: _headers,
|
|
256
|
-
contentType: "application/json",
|
|
257
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
258
|
-
requestType: "json",
|
|
259
|
-
body: request,
|
|
260
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
261
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
262
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
263
|
-
});
|
|
264
|
-
if (_response.ok) {
|
|
265
|
-
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
266
|
-
}
|
|
267
|
-
if (_response.error.reason === "status-code") {
|
|
268
|
-
switch (_response.error.statusCode) {
|
|
269
|
-
case 400:
|
|
270
|
-
throw new Pinnacle.BadRequestError(_response.error.body, _response.rawResponse);
|
|
271
|
-
case 401:
|
|
272
|
-
throw new Pinnacle.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
273
|
-
case 402:
|
|
274
|
-
throw new Pinnacle.PaymentRequiredError(_response.error.body, _response.rawResponse);
|
|
275
|
-
case 404:
|
|
276
|
-
throw new Pinnacle.NotFoundError(_response.error.body, _response.rawResponse);
|
|
277
179
|
case 500:
|
|
278
180
|
throw new Pinnacle.InternalServerError(_response.error.body, _response.rawResponse);
|
|
279
181
|
default:
|
|
@@ -292,7 +194,7 @@ class Send {
|
|
|
292
194
|
rawResponse: _response.rawResponse,
|
|
293
195
|
});
|
|
294
196
|
case "timeout":
|
|
295
|
-
throw new errors.PinnacleTimeoutError("Timeout exceeded when calling POST /messages/
|
|
197
|
+
throw new errors.PinnacleTimeoutError("Timeout exceeded when calling POST /messages/validate/sms.");
|
|
296
198
|
case "unknown":
|
|
297
199
|
throw new errors.PinnacleError({
|
|
298
200
|
message: _response.error.errorMessage,
|
|
@@ -308,4 +210,4 @@ class Send {
|
|
|
308
210
|
});
|
|
309
211
|
}
|
|
310
212
|
}
|
|
311
|
-
exports.
|
|
213
|
+
exports.Sms = Sms;
|
|
@@ -6,14 +6,14 @@ import * as Pinnacle from "../../../../../../index.js";
|
|
|
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.js";
|
|
@@ -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.js";
|
|
5
|
-
export type
|
|
5
|
+
export type SmsSendResponse = Pinnacle.SentSmsDetails | Pinnacle.ScheduledMessaage;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./SmsSendResponse.js";
|
|
@@ -0,0 +1,17 @@
|
|
|
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./SmsSendResponse.js"), exports);
|
|
@@ -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.js";
|
|
|
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;
|
|
@@ -25,6 +25,8 @@ export declare namespace RcsCampaign {
|
|
|
25
25
|
interface Agent {
|
|
26
26
|
/** Name of the agent. */
|
|
27
27
|
name?: string;
|
|
28
|
+
/** 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. */
|
|
29
|
+
brandVerificationUrl?: string;
|
|
28
30
|
/** Description of the agent. */
|
|
29
31
|
description?: string;
|
|
30
32
|
/** Color of the agent's buttons. */
|
|
@@ -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. */
|
|
@@ -11,7 +11,7 @@ export interface RcsCardsContent {
|
|
|
11
11
|
/** Collection of cards attached to the message. */
|
|
12
12
|
cards: RcsCardsContent.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 RcsCardsContent {
|
|
17
17
|
type Cards = Cards.Item[];
|
|
@@ -21,7 +21,7 @@ export declare namespace RcsCardsContent {
|
|
|
21
21
|
*/
|
|
22
22
|
interface Item {
|
|
23
23
|
/** Action buttons attached to the card. */
|
|
24
|
-
buttons: Pinnacle.
|
|
24
|
+
buttons: Pinnacle.RichButton[];
|
|
25
25
|
media?: Pinnacle.RcsMediaDetailsContent;
|
|
26
26
|
/** Secondary text displayed below the title for additional context. */
|
|
27
27
|
subtitle?: string;
|
|
@@ -10,5 +10,5 @@ import * as Pinnacle from "../index.js";
|
|
|
10
10
|
export interface RcsMediaContent {
|
|
11
11
|
media: Pinnacle.RcsMediaDetailsContent;
|
|
12
12
|
/** List of interactive quick reply buttons in the message. */
|
|
13
|
-
quickReplies: Pinnacle.
|
|
13
|
+
quickReplies: Pinnacle.RichButton[];
|
|
14
14
|
}
|
|
@@ -7,7 +7,7 @@ import * as Pinnacle from "../index.js";
|
|
|
7
7
|
*/
|
|
8
8
|
export interface RcsTextContent {
|
|
9
9
|
/** List of interactive quick reply buttons in the message. */
|
|
10
|
-
quickReplies: Pinnacle.
|
|
10
|
+
quickReplies: Pinnacle.RichButton[];
|
|
11
11
|
/** Text content of the RCS message. */
|
|
12
12
|
text: string;
|
|
13
13
|
}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
import * as Pinnacle from "../index.js";
|
|
5
|
-
export type
|
|
6
|
-
export declare namespace
|
|
5
|
+
export type RichButton = Pinnacle.RichButton.OpenUrl | Pinnacle.RichButton.Call | Pinnacle.RichButton.Trigger | Pinnacle.RichButton.RequestUserLocation | Pinnacle.RichButton.ScheduleEvent | Pinnacle.RichButton.SendLocation;
|
|
6
|
+
export declare namespace RichButton {
|
|
7
7
|
interface OpenUrl extends Pinnacle.RcsButtonOpenUrl {
|
|
8
8
|
type: "openUrl";
|
|
9
9
|
}
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
import * as Pinnacle from "../index.js";
|
|
5
|
-
export interface
|
|
5
|
+
export interface RichCardsMessage extends Pinnacle.RcsBase, Pinnacle.RcsCards {
|
|
6
6
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
import * as Pinnacle from "../index.js";
|
|
5
|
-
export interface
|
|
5
|
+
export interface RichMediaMessage extends Pinnacle.RcsBase {
|
|
6
6
|
/**
|
|
7
7
|
* Media file URLs to send. <br>
|
|
8
8
|
*
|
|
@@ -10,5 +10,5 @@ export interface RcsMedia extends Pinnacle.RcsBase {
|
|
|
10
10
|
*/
|
|
11
11
|
media: string;
|
|
12
12
|
/** List of interactive quick reply buttons in the message. */
|
|
13
|
-
quickReplies: Pinnacle.
|
|
13
|
+
quickReplies: Pinnacle.RichButton[];
|
|
14
14
|
}
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
import * as Pinnacle from "../index.js";
|
|
5
|
-
export interface
|
|
5
|
+
export interface RichTextMessage extends Pinnacle.RcsBase, Pinnacle.RcsTextContent {
|
|
6
6
|
}
|
|
@@ -5,7 +5,7 @@ export * from "./CompanyTypeEnum.js";
|
|
|
5
5
|
export * from "./OptionalBrandInfo.js";
|
|
6
6
|
export * from "./ZodError.js";
|
|
7
7
|
export * from "./Error_.js";
|
|
8
|
-
export * from "./
|
|
8
|
+
export * from "./UpsertContact.js";
|
|
9
9
|
export * from "./BrandStatusEnum.js";
|
|
10
10
|
export * from "./ExtendedBrand.js";
|
|
11
11
|
export * from "./VettingFeedback.js";
|
|
@@ -53,7 +53,7 @@ export * from "./RcsButtonTrigger.js";
|
|
|
53
53
|
export * from "./RcsButtonRequestUserLocation.js";
|
|
54
54
|
export * from "./RcsButtonScheduleEvent.js";
|
|
55
55
|
export * from "./RcsButtonSendLocation.js";
|
|
56
|
-
export * from "./
|
|
56
|
+
export * from "./RichButton.js";
|
|
57
57
|
export * from "./RcsTextContent.js";
|
|
58
58
|
export * from "./RcsMediaDetailsContent.js";
|
|
59
59
|
export * from "./RcsMediaContent.js";
|
|
@@ -74,10 +74,10 @@ export * from "./SentSmsDetails.js";
|
|
|
74
74
|
export * from "./ScheduledMessaage.js";
|
|
75
75
|
export * from "./SentMmsDetails.js";
|
|
76
76
|
export * from "./RcsBase.js";
|
|
77
|
-
export * from "./
|
|
78
|
-
export * from "./
|
|
77
|
+
export * from "./RichTextMessage.js";
|
|
78
|
+
export * from "./RichMediaMessage.js";
|
|
79
79
|
export * from "./RcsCards.js";
|
|
80
|
-
export * from "./
|
|
80
|
+
export * from "./RichCardsMessage.js";
|
|
81
81
|
export * from "./Rcs.js";
|
|
82
82
|
export * from "./SentRcsDetails.js";
|
|
83
83
|
export * from "./SmsValidationResult.js";
|
|
@@ -21,7 +21,7 @@ __exportStar(require("./CompanyTypeEnum.js"), exports);
|
|
|
21
21
|
__exportStar(require("./OptionalBrandInfo.js"), exports);
|
|
22
22
|
__exportStar(require("./ZodError.js"), exports);
|
|
23
23
|
__exportStar(require("./Error_.js"), exports);
|
|
24
|
-
__exportStar(require("./
|
|
24
|
+
__exportStar(require("./UpsertContact.js"), exports);
|
|
25
25
|
__exportStar(require("./BrandStatusEnum.js"), exports);
|
|
26
26
|
__exportStar(require("./ExtendedBrand.js"), exports);
|
|
27
27
|
__exportStar(require("./VettingFeedback.js"), exports);
|
|
@@ -69,7 +69,7 @@ __exportStar(require("./RcsButtonTrigger.js"), exports);
|
|
|
69
69
|
__exportStar(require("./RcsButtonRequestUserLocation.js"), exports);
|
|
70
70
|
__exportStar(require("./RcsButtonScheduleEvent.js"), exports);
|
|
71
71
|
__exportStar(require("./RcsButtonSendLocation.js"), exports);
|
|
72
|
-
__exportStar(require("./
|
|
72
|
+
__exportStar(require("./RichButton.js"), exports);
|
|
73
73
|
__exportStar(require("./RcsTextContent.js"), exports);
|
|
74
74
|
__exportStar(require("./RcsMediaDetailsContent.js"), exports);
|
|
75
75
|
__exportStar(require("./RcsMediaContent.js"), exports);
|
|
@@ -90,10 +90,10 @@ __exportStar(require("./SentSmsDetails.js"), exports);
|
|
|
90
90
|
__exportStar(require("./ScheduledMessaage.js"), exports);
|
|
91
91
|
__exportStar(require("./SentMmsDetails.js"), exports);
|
|
92
92
|
__exportStar(require("./RcsBase.js"), exports);
|
|
93
|
-
__exportStar(require("./
|
|
94
|
-
__exportStar(require("./
|
|
93
|
+
__exportStar(require("./RichTextMessage.js"), exports);
|
|
94
|
+
__exportStar(require("./RichMediaMessage.js"), exports);
|
|
95
95
|
__exportStar(require("./RcsCards.js"), exports);
|
|
96
|
-
__exportStar(require("./
|
|
96
|
+
__exportStar(require("./RichCardsMessage.js"), exports);
|
|
97
97
|
__exportStar(require("./Rcs.js"), exports);
|
|
98
98
|
__exportStar(require("./SentRcsDetails.js"), exports);
|
|
99
99
|
__exportStar(require("./SmsValidationResult.js"), exports);
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "2.0.0-rc.
|
|
1
|
+
export declare const SDK_VERSION = "2.0.0-rc.9";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/Client.d.mts
CHANGED
|
@@ -10,7 +10,6 @@ import { Messages } from "./api/resources/messages/client/Client.mjs";
|
|
|
10
10
|
import { PhoneNumbers } from "./api/resources/phoneNumbers/client/Client.mjs";
|
|
11
11
|
import { Webhooks } from "./api/resources/webhooks/client/Client.mjs";
|
|
12
12
|
import { Campaigns } from "./api/resources/campaigns/client/Client.mjs";
|
|
13
|
-
import { Message } from "./api/resources/message/client/Client.mjs";
|
|
14
13
|
import { Status } from "./api/resources/status/client/Client.mjs";
|
|
15
14
|
import { Tools } from "./api/resources/tools/client/Client.mjs";
|
|
16
15
|
export declare namespace PinnacleClient {
|
|
@@ -44,7 +43,6 @@ export declare class PinnacleClient {
|
|
|
44
43
|
protected _phoneNumbers: PhoneNumbers | undefined;
|
|
45
44
|
protected _webhooks: Webhooks | undefined;
|
|
46
45
|
protected _campaigns: Campaigns | undefined;
|
|
47
|
-
protected _message: Message | undefined;
|
|
48
46
|
protected _status: Status | undefined;
|
|
49
47
|
protected _tools: Tools | undefined;
|
|
50
48
|
constructor(_options: PinnacleClient.Options);
|
|
@@ -55,7 +53,6 @@ export declare class PinnacleClient {
|
|
|
55
53
|
get phoneNumbers(): PhoneNumbers;
|
|
56
54
|
get webhooks(): Webhooks;
|
|
57
55
|
get campaigns(): Campaigns;
|
|
58
|
-
get message(): Message;
|
|
59
56
|
get status(): Status;
|
|
60
57
|
get tools(): Tools;
|
|
61
58
|
}
|
package/dist/esm/Client.mjs
CHANGED
|
@@ -10,7 +10,6 @@ import { Messages } from "./api/resources/messages/client/Client.mjs";
|
|
|
10
10
|
import { PhoneNumbers } from "./api/resources/phoneNumbers/client/Client.mjs";
|
|
11
11
|
import { Webhooks } from "./api/resources/webhooks/client/Client.mjs";
|
|
12
12
|
import { Campaigns } from "./api/resources/campaigns/client/Client.mjs";
|
|
13
|
-
import { Message } from "./api/resources/message/client/Client.mjs";
|
|
14
13
|
import { Status } from "./api/resources/status/client/Client.mjs";
|
|
15
14
|
import { Tools } from "./api/resources/tools/client/Client.mjs";
|
|
16
15
|
export class PinnacleClient {
|
|
@@ -18,8 +17,8 @@ export class PinnacleClient {
|
|
|
18
17
|
this._options = Object.assign(Object.assign({}, _options), { headers: mergeHeaders({
|
|
19
18
|
"X-Fern-Language": "JavaScript",
|
|
20
19
|
"X-Fern-SDK-Name": "rcs-js",
|
|
21
|
-
"X-Fern-SDK-Version": "2.0.0-rc.
|
|
22
|
-
"User-Agent": "rcs-js/2.0.0-rc.
|
|
20
|
+
"X-Fern-SDK-Version": "2.0.0-rc.9",
|
|
21
|
+
"User-Agent": "rcs-js/2.0.0-rc.9",
|
|
23
22
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
24
23
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
25
24
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -52,10 +51,6 @@ export class PinnacleClient {
|
|
|
52
51
|
var _a;
|
|
53
52
|
return ((_a = this._campaigns) !== null && _a !== void 0 ? _a : (this._campaigns = new Campaigns(this._options)));
|
|
54
53
|
}
|
|
55
|
-
get message() {
|
|
56
|
-
var _a;
|
|
57
|
-
return ((_a = this._message) !== null && _a !== void 0 ? _a : (this._message = new Message(this._options)));
|
|
58
|
-
}
|
|
59
54
|
get status() {
|
|
60
55
|
var _a;
|
|
61
56
|
return ((_a = this._status) !== null && _a !== void 0 ? _a : (this._status = new Status(this._options)));
|
|
@@ -27,7 +27,7 @@ export interface UpsertBrandParams {
|
|
|
27
27
|
/** Primary brand address where the company is located. */
|
|
28
28
|
address?: string | null;
|
|
29
29
|
/** Contact information for the brand. */
|
|
30
|
-
contact?: Pinnacle.
|
|
30
|
+
contact?: Pinnacle.UpsertContact | null;
|
|
31
31
|
/** "Doing Business As" name - the public name the brand operates under. */
|
|
32
32
|
dba?: string | null;
|
|
33
33
|
/** Brief description of what the brand does. */
|
package/dist/esm/api/resources/campaigns/resources/rcs/client/requests/UpsertRcsCampaignParams.d.mts
CHANGED
|
@@ -67,6 +67,8 @@ export declare namespace UpsertRcsCampaignParams {
|
|
|
67
67
|
* Create an agent for the campaign.
|
|
68
68
|
*/
|
|
69
69
|
interface Agent {
|
|
70
|
+
/** 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. */
|
|
71
|
+
brandVerificationUrl?: string;
|
|
70
72
|
/**
|
|
71
73
|
* Color of the agent's buttons. <br>
|
|
72
74
|
*
|
|
@@ -6,7 +6,6 @@ export * as brands from "./brands/index.mjs";
|
|
|
6
6
|
export * as contacts from "./contacts/index.mjs";
|
|
7
7
|
export * as conversations from "./conversations/index.mjs";
|
|
8
8
|
export * as webhooks from "./webhooks/index.mjs";
|
|
9
|
-
export * as message from "./message/index.mjs";
|
|
10
9
|
export * as status from "./status/index.mjs";
|
|
11
10
|
export * as tools from "./tools/index.mjs";
|
|
12
11
|
export * from "./brands/client/requests/index.mjs";
|
|
@@ -6,7 +6,6 @@ export * as brands from "./brands/index.mjs";
|
|
|
6
6
|
export * as contacts from "./contacts/index.mjs";
|
|
7
7
|
export * as conversations from "./conversations/index.mjs";
|
|
8
8
|
export * as webhooks from "./webhooks/index.mjs";
|
|
9
|
-
export * as message from "./message/index.mjs";
|
|
10
9
|
export * as status from "./status/index.mjs";
|
|
11
10
|
export * as tools from "./tools/index.mjs";
|
|
12
11
|
export * from "./brands/client/requests/index.mjs";
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import * as environments from "../../../../environments.mjs";
|
|
5
5
|
import * as core from "../../../../core/index.mjs";
|
|
6
6
|
import * as Pinnacle from "../../../index.mjs";
|
|
7
|
-
import {
|
|
7
|
+
import { Sms } from "../resources/sms/client/Client.mjs";
|
|
8
8
|
import { Mms } from "../resources/mms/client/Client.mjs";
|
|
9
9
|
import { Rcs } from "../resources/rcs/client/Client.mjs";
|
|
10
10
|
export declare namespace Messages {
|
|
@@ -31,11 +31,11 @@ export declare namespace Messages {
|
|
|
31
31
|
}
|
|
32
32
|
export declare class Messages {
|
|
33
33
|
protected readonly _options: Messages.Options;
|
|
34
|
-
protected
|
|
34
|
+
protected _sms: Sms | undefined;
|
|
35
35
|
protected _mms: Mms | undefined;
|
|
36
36
|
protected _rcs: Rcs | undefined;
|
|
37
37
|
constructor(_options: Messages.Options);
|
|
38
|
-
get
|
|
38
|
+
get sms(): Sms;
|
|
39
39
|
get mms(): Mms;
|
|
40
40
|
get rcs(): Rcs;
|
|
41
41
|
/**
|
|
@@ -15,16 +15,16 @@ 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
|
-
import {
|
|
18
|
+
import { Sms } from "../resources/sms/client/Client.mjs";
|
|
19
19
|
import { Mms } from "../resources/mms/client/Client.mjs";
|
|
20
20
|
import { Rcs } from "../resources/rcs/client/Client.mjs";
|
|
21
21
|
export class Messages {
|
|
22
22
|
constructor(_options) {
|
|
23
23
|
this._options = _options;
|
|
24
24
|
}
|
|
25
|
-
get
|
|
25
|
+
get sms() {
|
|
26
26
|
var _a;
|
|
27
|
-
return ((_a = this.
|
|
27
|
+
return ((_a = this._sms) !== null && _a !== void 0 ? _a : (this._sms = new Sms(this._options)));
|
|
28
28
|
}
|
|
29
29
|
get mms() {
|
|
30
30
|
var _a;
|