rcs-js 2.0.3 → 2.0.5-rc.1
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/README.md +36 -1
- package/dist/cjs/Client.d.ts +3 -0
- package/dist/cjs/Client.js +25 -20
- package/dist/cjs/api/resources/audiences/client/Client.d.ts +129 -0
- package/dist/cjs/api/resources/audiences/client/Client.js +385 -0
- package/dist/cjs/api/resources/audiences/client/index.d.ts +2 -0
- package/dist/cjs/api/resources/audiences/client/index.js +17 -0
- package/dist/cjs/api/resources/audiences/client/requests/AudiencesDeleteRequest.d.ts +13 -0
- package/dist/cjs/api/resources/audiences/client/requests/AudiencesDeleteRequest.js +5 -0
- package/dist/cjs/api/resources/audiences/client/requests/AudiencesGetRequest.d.ts +22 -0
- package/dist/cjs/api/resources/audiences/client/requests/AudiencesGetRequest.js +5 -0
- package/dist/cjs/api/resources/audiences/client/requests/CreateAudienceParams.d.ts +31 -0
- package/dist/cjs/api/resources/audiences/client/requests/CreateAudienceParams.js +5 -0
- package/dist/cjs/api/resources/audiences/client/requests/UpdateAudienceParams.d.ts +19 -0
- package/dist/cjs/api/resources/audiences/client/requests/UpdateAudienceParams.js +5 -0
- package/dist/cjs/api/resources/audiences/client/requests/index.d.ts +4 -0
- package/dist/cjs/api/resources/audiences/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/audiences/index.d.ts +3 -0
- package/dist/cjs/api/resources/audiences/index.js +19 -0
- package/dist/cjs/api/resources/audiences/resources/contacts/client/Client.d.ts +80 -0
- package/dist/cjs/api/resources/audiences/resources/contacts/client/Client.js +220 -0
- package/dist/cjs/api/resources/audiences/resources/contacts/client/index.d.ts +2 -0
- package/dist/cjs/api/resources/audiences/resources/contacts/client/index.js +17 -0
- package/dist/cjs/api/resources/audiences/resources/contacts/client/requests/AddContactsParams.d.ts +16 -0
- package/dist/cjs/api/resources/audiences/resources/contacts/client/requests/AddContactsParams.js +5 -0
- package/dist/cjs/api/resources/audiences/resources/contacts/client/requests/RemoveContactsParams.d.ts +16 -0
- package/dist/cjs/api/resources/audiences/resources/contacts/client/requests/RemoveContactsParams.js +5 -0
- package/dist/cjs/api/resources/audiences/resources/contacts/client/requests/index.d.ts +2 -0
- package/dist/cjs/api/resources/audiences/resources/contacts/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/audiences/resources/contacts/index.d.ts +1 -0
- package/dist/cjs/api/resources/audiences/resources/contacts/index.js +17 -0
- package/dist/cjs/api/resources/audiences/resources/index.d.ts +2 -0
- package/dist/cjs/api/resources/audiences/resources/index.js +41 -0
- package/dist/cjs/api/resources/audiences/types/AudiencesGetResponse.d.ts +11 -0
- package/dist/cjs/api/resources/audiences/types/AudiencesGetResponse.js +5 -0
- package/dist/cjs/api/resources/audiences/types/index.d.ts +1 -0
- package/dist/cjs/api/resources/audiences/types/index.js +17 -0
- package/dist/cjs/api/resources/index.d.ts +3 -0
- package/dist/cjs/api/resources/index.js +4 -1
- package/dist/cjs/api/resources/messages/resources/index.d.ts +1 -0
- package/dist/cjs/api/resources/messages/resources/index.js +1 -0
- package/dist/cjs/api/resources/messages/resources/rcs/client/Client.d.ts +33 -0
- package/dist/cjs/api/resources/messages/resources/rcs/client/Client.js +90 -0
- package/dist/cjs/api/resources/messages/resources/rcs/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/messages/resources/rcs/client/index.js +15 -0
- package/dist/cjs/api/resources/messages/resources/rcs/client/requests/SendTypingIndicatorSchema.d.ts +38 -0
- package/dist/cjs/api/resources/messages/resources/rcs/client/requests/SendTypingIndicatorSchema.js +5 -0
- package/dist/cjs/api/resources/messages/resources/rcs/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/messages/resources/rcs/client/requests/index.js +2 -0
- package/dist/cjs/api/types/AudienceCountOnly.d.ts +17 -0
- package/dist/cjs/api/types/AudienceCountOnly.js +5 -0
- package/dist/cjs/api/types/AudienceWithPagination.d.ts +17 -0
- package/dist/cjs/api/types/AudienceWithPagination.js +5 -0
- package/dist/cjs/api/types/DeleteAudienceResponse.d.ts +7 -0
- package/dist/cjs/api/types/DeleteAudienceResponse.js +5 -0
- package/dist/cjs/api/types/Options.d.ts +21 -0
- package/dist/cjs/api/types/Options.js +5 -0
- package/dist/cjs/api/types/Pagination.d.ts +13 -0
- package/dist/cjs/api/types/Pagination.js +5 -0
- package/dist/cjs/api/types/RcsButtonOpenUrl.d.ts +31 -2
- package/dist/cjs/api/types/RcsButtonOpenUrl.js +9 -0
- package/dist/cjs/api/types/RcsButtonSendLocation.d.ts +8 -2
- package/dist/cjs/api/types/RichCardsMessage.d.ts +51 -1
- package/dist/cjs/api/types/RichCardsMessage.js +18 -0
- package/dist/cjs/api/types/SendTypingIndicatorResponse.d.ts +22 -0
- package/dist/cjs/api/types/SendTypingIndicatorResponse.js +5 -0
- package/dist/cjs/api/types/index.d.ts +6 -0
- package/dist/cjs/api/types/index.js +6 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Client.d.mts +3 -0
- package/dist/esm/Client.mjs +7 -2
- package/dist/esm/api/resources/audiences/client/Client.d.mts +129 -0
- package/dist/esm/api/resources/audiences/client/Client.mjs +348 -0
- package/dist/esm/api/resources/audiences/client/index.d.mts +2 -0
- package/dist/esm/api/resources/audiences/client/index.mjs +1 -0
- package/dist/esm/api/resources/audiences/client/requests/AudiencesDeleteRequest.d.mts +13 -0
- package/dist/esm/api/resources/audiences/client/requests/AudiencesDeleteRequest.mjs +4 -0
- package/dist/esm/api/resources/audiences/client/requests/AudiencesGetRequest.d.mts +22 -0
- package/dist/esm/api/resources/audiences/client/requests/AudiencesGetRequest.mjs +4 -0
- package/dist/esm/api/resources/audiences/client/requests/CreateAudienceParams.d.mts +31 -0
- package/dist/esm/api/resources/audiences/client/requests/CreateAudienceParams.mjs +4 -0
- package/dist/esm/api/resources/audiences/client/requests/UpdateAudienceParams.d.mts +19 -0
- package/dist/esm/api/resources/audiences/client/requests/UpdateAudienceParams.mjs +4 -0
- package/dist/esm/api/resources/audiences/client/requests/index.d.mts +4 -0
- package/dist/esm/api/resources/audiences/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/audiences/index.d.mts +3 -0
- package/dist/esm/api/resources/audiences/index.mjs +3 -0
- package/dist/esm/api/resources/audiences/resources/contacts/client/Client.d.mts +80 -0
- package/dist/esm/api/resources/audiences/resources/contacts/client/Client.mjs +183 -0
- package/dist/esm/api/resources/audiences/resources/contacts/client/index.d.mts +2 -0
- package/dist/esm/api/resources/audiences/resources/contacts/client/index.mjs +1 -0
- package/dist/esm/api/resources/audiences/resources/contacts/client/requests/AddContactsParams.d.mts +16 -0
- package/dist/esm/api/resources/audiences/resources/contacts/client/requests/AddContactsParams.mjs +4 -0
- package/dist/esm/api/resources/audiences/resources/contacts/client/requests/RemoveContactsParams.d.mts +16 -0
- package/dist/esm/api/resources/audiences/resources/contacts/client/requests/RemoveContactsParams.mjs +4 -0
- package/dist/esm/api/resources/audiences/resources/contacts/client/requests/index.d.mts +2 -0
- package/dist/esm/api/resources/audiences/resources/contacts/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/audiences/resources/contacts/index.d.mts +1 -0
- package/dist/esm/api/resources/audiences/resources/contacts/index.mjs +1 -0
- package/dist/esm/api/resources/audiences/resources/index.d.mts +2 -0
- package/dist/esm/api/resources/audiences/resources/index.mjs +2 -0
- package/dist/esm/api/resources/audiences/types/AudiencesGetResponse.d.mts +11 -0
- package/dist/esm/api/resources/audiences/types/AudiencesGetResponse.mjs +4 -0
- package/dist/esm/api/resources/audiences/types/index.d.mts +1 -0
- package/dist/esm/api/resources/audiences/types/index.mjs +1 -0
- package/dist/esm/api/resources/index.d.mts +3 -0
- package/dist/esm/api/resources/index.mjs +3 -0
- package/dist/esm/api/resources/messages/resources/index.d.mts +1 -0
- package/dist/esm/api/resources/messages/resources/index.mjs +1 -0
- package/dist/esm/api/resources/messages/resources/rcs/client/Client.d.mts +33 -0
- package/dist/esm/api/resources/messages/resources/rcs/client/Client.mjs +90 -0
- package/dist/esm/api/resources/messages/resources/rcs/client/index.d.mts +1 -0
- package/dist/esm/api/resources/messages/resources/rcs/client/index.mjs +1 -1
- package/dist/esm/api/resources/messages/resources/rcs/client/requests/SendTypingIndicatorSchema.d.mts +38 -0
- package/dist/esm/api/resources/messages/resources/rcs/client/requests/SendTypingIndicatorSchema.mjs +4 -0
- package/dist/esm/api/resources/messages/resources/rcs/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/messages/resources/rcs/client/requests/index.mjs +1 -0
- package/dist/esm/api/types/AudienceCountOnly.d.mts +17 -0
- package/dist/esm/api/types/AudienceCountOnly.mjs +4 -0
- package/dist/esm/api/types/AudienceWithPagination.d.mts +17 -0
- package/dist/esm/api/types/AudienceWithPagination.mjs +4 -0
- package/dist/esm/api/types/DeleteAudienceResponse.d.mts +7 -0
- package/dist/esm/api/types/DeleteAudienceResponse.mjs +4 -0
- package/dist/esm/api/types/Options.d.mts +21 -0
- package/dist/esm/api/types/Options.mjs +4 -0
- package/dist/esm/api/types/Pagination.d.mts +13 -0
- package/dist/esm/api/types/Pagination.mjs +4 -0
- package/dist/esm/api/types/RcsButtonOpenUrl.d.mts +31 -2
- package/dist/esm/api/types/RcsButtonOpenUrl.mjs +8 -1
- package/dist/esm/api/types/RcsButtonSendLocation.d.mts +8 -2
- package/dist/esm/api/types/RichCardsMessage.d.mts +51 -1
- package/dist/esm/api/types/RichCardsMessage.mjs +17 -1
- package/dist/esm/api/types/SendTypingIndicatorResponse.d.mts +22 -0
- package/dist/esm/api/types/SendTypingIndicatorResponse.mjs +4 -0
- package/dist/esm/api/types/index.d.mts +6 -0
- package/dist/esm/api/types/index.mjs +6 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +2 -2
- package/reference.md +487 -0
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
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
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
39
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
40
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
41
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
42
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
43
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
44
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
|
+
exports.Contacts = void 0;
|
|
49
|
+
const environments = __importStar(require("../../../../../../environments.js"));
|
|
50
|
+
const core = __importStar(require("../../../../../../core/index.js"));
|
|
51
|
+
const Pinnacle = __importStar(require("../../../../../index.js"));
|
|
52
|
+
const headers_js_1 = require("../../../../../../core/headers.js");
|
|
53
|
+
const errors = __importStar(require("../../../../../../errors/index.js"));
|
|
54
|
+
class Contacts {
|
|
55
|
+
constructor(_options = {}) {
|
|
56
|
+
this._options = _options;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Remove contacts from an existing audience. This operation is idempotent.
|
|
60
|
+
*
|
|
61
|
+
* - Only removes contacts that exist in the audience
|
|
62
|
+
* - Contacts not in the audience are ignored
|
|
63
|
+
*
|
|
64
|
+
* @param {Pinnacle.audiences.RemoveContactsParams} request
|
|
65
|
+
* @param {Contacts.RequestOptions} requestOptions - Request-specific configuration.
|
|
66
|
+
*
|
|
67
|
+
* @throws {@link Pinnacle.BadRequestError}
|
|
68
|
+
* @throws {@link Pinnacle.UnauthorizedError}
|
|
69
|
+
* @throws {@link Pinnacle.NotFoundError}
|
|
70
|
+
* @throws {@link Pinnacle.InternalServerError}
|
|
71
|
+
*
|
|
72
|
+
* @example
|
|
73
|
+
* await client.audiences.contacts.remove({
|
|
74
|
+
* id: "aud_abc123",
|
|
75
|
+
* contacts: ["+12125551234", "cont_def456"]
|
|
76
|
+
* })
|
|
77
|
+
*/
|
|
78
|
+
remove(request, requestOptions) {
|
|
79
|
+
return core.HttpResponsePromise.fromPromise(this.__remove(request, requestOptions));
|
|
80
|
+
}
|
|
81
|
+
__remove(request, requestOptions) {
|
|
82
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
83
|
+
var _a, _b, _c;
|
|
84
|
+
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);
|
|
85
|
+
const _response = yield core.fetcher({
|
|
86
|
+
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, "audiences/contacts"),
|
|
87
|
+
method: "DELETE",
|
|
88
|
+
headers: _headers,
|
|
89
|
+
contentType: "application/json",
|
|
90
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
91
|
+
requestType: "json",
|
|
92
|
+
body: request,
|
|
93
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
94
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
95
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
96
|
+
});
|
|
97
|
+
if (_response.ok) {
|
|
98
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
99
|
+
}
|
|
100
|
+
if (_response.error.reason === "status-code") {
|
|
101
|
+
switch (_response.error.statusCode) {
|
|
102
|
+
case 400:
|
|
103
|
+
throw new Pinnacle.BadRequestError(_response.error.body, _response.rawResponse);
|
|
104
|
+
case 401:
|
|
105
|
+
throw new Pinnacle.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
106
|
+
case 404:
|
|
107
|
+
throw new Pinnacle.NotFoundError(_response.error.body, _response.rawResponse);
|
|
108
|
+
case 500:
|
|
109
|
+
throw new Pinnacle.InternalServerError(_response.error.body, _response.rawResponse);
|
|
110
|
+
default:
|
|
111
|
+
throw new errors.PinnacleError({
|
|
112
|
+
statusCode: _response.error.statusCode,
|
|
113
|
+
body: _response.error.body,
|
|
114
|
+
rawResponse: _response.rawResponse,
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
switch (_response.error.reason) {
|
|
119
|
+
case "non-json":
|
|
120
|
+
throw new errors.PinnacleError({
|
|
121
|
+
statusCode: _response.error.statusCode,
|
|
122
|
+
body: _response.error.rawBody,
|
|
123
|
+
rawResponse: _response.rawResponse,
|
|
124
|
+
});
|
|
125
|
+
case "timeout":
|
|
126
|
+
throw new errors.PinnacleTimeoutError("Timeout exceeded when calling DELETE /audiences/contacts.");
|
|
127
|
+
case "unknown":
|
|
128
|
+
throw new errors.PinnacleError({
|
|
129
|
+
message: _response.error.errorMessage,
|
|
130
|
+
rawResponse: _response.rawResponse,
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Add contacts to an existing audience. This operation is additive and idempotent.
|
|
137
|
+
*
|
|
138
|
+
* - Phone numbers that don't exist will be auto-created as contacts
|
|
139
|
+
* - Duplicate adds are ignored
|
|
140
|
+
* - Contacts already in the audience are ignored
|
|
141
|
+
*
|
|
142
|
+
* @param {Pinnacle.audiences.AddContactsParams} request
|
|
143
|
+
* @param {Contacts.RequestOptions} requestOptions - Request-specific configuration.
|
|
144
|
+
*
|
|
145
|
+
* @throws {@link Pinnacle.BadRequestError}
|
|
146
|
+
* @throws {@link Pinnacle.UnauthorizedError}
|
|
147
|
+
* @throws {@link Pinnacle.NotFoundError}
|
|
148
|
+
* @throws {@link Pinnacle.InternalServerError}
|
|
149
|
+
*
|
|
150
|
+
* @example
|
|
151
|
+
* await client.audiences.contacts.add({
|
|
152
|
+
* id: "aud_abc123",
|
|
153
|
+
* contacts: ["+12125551234", "cont_def456", "+13105551234"]
|
|
154
|
+
* })
|
|
155
|
+
*/
|
|
156
|
+
add(request, requestOptions) {
|
|
157
|
+
return core.HttpResponsePromise.fromPromise(this.__add(request, requestOptions));
|
|
158
|
+
}
|
|
159
|
+
__add(request, requestOptions) {
|
|
160
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
161
|
+
var _a, _b, _c;
|
|
162
|
+
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);
|
|
163
|
+
const _response = yield core.fetcher({
|
|
164
|
+
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, "audiences/contacts"),
|
|
165
|
+
method: "PATCH",
|
|
166
|
+
headers: _headers,
|
|
167
|
+
contentType: "application/json",
|
|
168
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
169
|
+
requestType: "json",
|
|
170
|
+
body: request,
|
|
171
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
172
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
173
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
174
|
+
});
|
|
175
|
+
if (_response.ok) {
|
|
176
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
177
|
+
}
|
|
178
|
+
if (_response.error.reason === "status-code") {
|
|
179
|
+
switch (_response.error.statusCode) {
|
|
180
|
+
case 400:
|
|
181
|
+
throw new Pinnacle.BadRequestError(_response.error.body, _response.rawResponse);
|
|
182
|
+
case 401:
|
|
183
|
+
throw new Pinnacle.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
184
|
+
case 404:
|
|
185
|
+
throw new Pinnacle.NotFoundError(_response.error.body, _response.rawResponse);
|
|
186
|
+
case 500:
|
|
187
|
+
throw new Pinnacle.InternalServerError(_response.error.body, _response.rawResponse);
|
|
188
|
+
default:
|
|
189
|
+
throw new errors.PinnacleError({
|
|
190
|
+
statusCode: _response.error.statusCode,
|
|
191
|
+
body: _response.error.body,
|
|
192
|
+
rawResponse: _response.rawResponse,
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
switch (_response.error.reason) {
|
|
197
|
+
case "non-json":
|
|
198
|
+
throw new errors.PinnacleError({
|
|
199
|
+
statusCode: _response.error.statusCode,
|
|
200
|
+
body: _response.error.rawBody,
|
|
201
|
+
rawResponse: _response.rawResponse,
|
|
202
|
+
});
|
|
203
|
+
case "timeout":
|
|
204
|
+
throw new errors.PinnacleTimeoutError("Timeout exceeded when calling PATCH /audiences/contacts.");
|
|
205
|
+
case "unknown":
|
|
206
|
+
throw new errors.PinnacleError({
|
|
207
|
+
message: _response.error.errorMessage,
|
|
208
|
+
rawResponse: _response.rawResponse,
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
_getCustomAuthorizationHeaders() {
|
|
214
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
215
|
+
const apiKeyValue = yield core.Supplier.get(this._options.apiKey);
|
|
216
|
+
return { "PINNACLE-API-KEY": apiKeyValue };
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
exports.Contacts = Contacts;
|
|
@@ -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("./requests/index.js"), exports);
|
package/dist/cjs/api/resources/audiences/resources/contacts/client/requests/AddContactsParams.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* @example
|
|
6
|
+
* {
|
|
7
|
+
* id: "aud_abc123",
|
|
8
|
+
* contacts: ["+12125551234", "cont_def456", "+13105551234"]
|
|
9
|
+
* }
|
|
10
|
+
*/
|
|
11
|
+
export interface AddContactsParams {
|
|
12
|
+
/** Audience ID. This identifier is a string that always begins with the prefix `aud_`, for example: `aud_abc123`. */
|
|
13
|
+
id: string;
|
|
14
|
+
/** Array of phone numbers (E.164 format) or contact IDs (minimum 1 item). */
|
|
15
|
+
contacts: string[];
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* @example
|
|
6
|
+
* {
|
|
7
|
+
* id: "aud_abc123",
|
|
8
|
+
* contacts: ["+12125551234", "cont_def456"]
|
|
9
|
+
* }
|
|
10
|
+
*/
|
|
11
|
+
export interface RemoveContactsParams {
|
|
12
|
+
/** Audience ID. This identifier is a string that always begins with the prefix `aud_`, for example: `aud_abc123`. */
|
|
13
|
+
id: string;
|
|
14
|
+
/** Array of phone numbers (E.164 format) or contact IDs (minimum 1 item). */
|
|
15
|
+
contacts: string[];
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client/index.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("./client/index.js"), exports);
|
|
@@ -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 __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
36
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.contacts = void 0;
|
|
40
|
+
exports.contacts = __importStar(require("./contacts/index.js"));
|
|
41
|
+
__exportStar(require("./contacts/client/requests/index.js"), exports);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Pinnacle from "../../../index.js";
|
|
5
|
+
export type AudiencesGetResponse =
|
|
6
|
+
/**
|
|
7
|
+
* Returned when page and/or limit parameters are provided. */
|
|
8
|
+
Pinnacle.AudienceWithPagination
|
|
9
|
+
/**
|
|
10
|
+
* Returned when no pagination parameters are provided. */
|
|
11
|
+
| Pinnacle.AudienceCountOnly;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./AudiencesGetResponse.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("./AudiencesGetResponse.js"), exports);
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export * as audiences from "./audiences/index.js";
|
|
2
|
+
export * from "./audiences/types/index.js";
|
|
1
3
|
export * as conversations from "./conversations/index.js";
|
|
2
4
|
export * from "./conversations/types/index.js";
|
|
3
5
|
export * as phoneNumbers from "./phoneNumbers/index.js";
|
|
@@ -11,6 +13,7 @@ export * as webhooks from "./webhooks/index.js";
|
|
|
11
13
|
export * as status from "./status/index.js";
|
|
12
14
|
export * as tools from "./tools/index.js";
|
|
13
15
|
export * from "./brands/client/requests/index.js";
|
|
16
|
+
export * from "./audiences/client/requests/index.js";
|
|
14
17
|
export * from "./contacts/client/requests/index.js";
|
|
15
18
|
export * from "./conversations/client/requests/index.js";
|
|
16
19
|
export * from "./messages/client/requests/index.js";
|
|
@@ -36,7 +36,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
36
36
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.tools = exports.status = exports.webhooks = exports.rcs = exports.contacts = exports.brands = exports.messages = exports.campaigns = exports.phoneNumbers = exports.conversations = void 0;
|
|
39
|
+
exports.tools = exports.status = exports.webhooks = exports.rcs = exports.contacts = exports.brands = exports.messages = exports.campaigns = exports.phoneNumbers = exports.conversations = exports.audiences = void 0;
|
|
40
|
+
exports.audiences = __importStar(require("./audiences/index.js"));
|
|
41
|
+
__exportStar(require("./audiences/types/index.js"), exports);
|
|
40
42
|
exports.conversations = __importStar(require("./conversations/index.js"));
|
|
41
43
|
__exportStar(require("./conversations/types/index.js"), exports);
|
|
42
44
|
exports.phoneNumbers = __importStar(require("./phoneNumbers/index.js"));
|
|
@@ -50,6 +52,7 @@ exports.webhooks = __importStar(require("./webhooks/index.js"));
|
|
|
50
52
|
exports.status = __importStar(require("./status/index.js"));
|
|
51
53
|
exports.tools = __importStar(require("./tools/index.js"));
|
|
52
54
|
__exportStar(require("./brands/client/requests/index.js"), exports);
|
|
55
|
+
__exportStar(require("./audiences/client/requests/index.js"), exports);
|
|
53
56
|
__exportStar(require("./contacts/client/requests/index.js"), exports);
|
|
54
57
|
__exportStar(require("./conversations/client/requests/index.js"), exports);
|
|
55
58
|
__exportStar(require("./messages/client/requests/index.js"), exports);
|
|
@@ -45,3 +45,4 @@ exports.rcs = __importStar(require("./rcs/index.js"));
|
|
|
45
45
|
__exportStar(require("./rcs/types/index.js"), exports);
|
|
46
46
|
__exportStar(require("./sms/client/requests/index.js"), exports);
|
|
47
47
|
__exportStar(require("./mms/client/requests/index.js"), exports);
|
|
48
|
+
__exportStar(require("./rcs/client/requests/index.js"), exports);
|
|
@@ -58,6 +58,39 @@ export declare class Rcs {
|
|
|
58
58
|
*/
|
|
59
59
|
send(request: Pinnacle.RichMessage, requestOptions?: Rcs.RequestOptions): core.HttpResponsePromise<Pinnacle.messages.RcsSendResponse>;
|
|
60
60
|
private __send;
|
|
61
|
+
/**
|
|
62
|
+
* Send a typing indicator from an RCS agent to a recipient.
|
|
63
|
+
*
|
|
64
|
+
* This endpoint allows RCS agents to display a typing indicator to recipients. The indicator is a message bubble with animated typing dots like this: <img src="https://server.trypinnacle.app/storage/v1/object/public/pinnacle-public-assets/ios-typing-indicator.png" alt="Typing Indicator" style="display: inline; height: 1.5em; vertical-align: middle; margin: 0 4px;" />
|
|
65
|
+
*
|
|
66
|
+
* **Use Case:** Typing indicators are especially useful for providing feedback to users while the agent is thinking or generating a response that may take some time, creating a more engaging conversational experience.
|
|
67
|
+
*
|
|
68
|
+
* **Expiration:** Typing indicators automatically expire after around 20 seconds or when the agent sends a message, whichever comes first.
|
|
69
|
+
*
|
|
70
|
+
* **Frequency:** You can send typing indicators as many times as needed, though only one will be displayed at a time. Sending multiple typing indicators will extend the duration of the current indicator.
|
|
71
|
+
*
|
|
72
|
+
* > **Note:** Typing indicators are best-effort hints, not delivery-guaranteed state. The platform is allowed to coalesce or drop them, and the client UI decides when to show/hide.
|
|
73
|
+
*
|
|
74
|
+
* @param {Pinnacle.messages.SendTypingIndicatorSchema} request
|
|
75
|
+
* @param {Rcs.RequestOptions} requestOptions - Request-specific configuration.
|
|
76
|
+
*
|
|
77
|
+
* @throws {@link Pinnacle.BadRequestError}
|
|
78
|
+
* @throws {@link Pinnacle.UnauthorizedError}
|
|
79
|
+
* @throws {@link Pinnacle.NotFoundError}
|
|
80
|
+
* @throws {@link Pinnacle.InternalServerError}
|
|
81
|
+
* @throws {@link Pinnacle.NotImplementedError}
|
|
82
|
+
*
|
|
83
|
+
* @example
|
|
84
|
+
* await client.messages.rcs.sendTyping({
|
|
85
|
+
* agentId: "agent_pinnacle",
|
|
86
|
+
* to: "+14154746461",
|
|
87
|
+
* options: {
|
|
88
|
+
* test_mode: false
|
|
89
|
+
* }
|
|
90
|
+
* })
|
|
91
|
+
*/
|
|
92
|
+
sendTyping(request: Pinnacle.messages.SendTypingIndicatorSchema, requestOptions?: Rcs.RequestOptions): core.HttpResponsePromise<Pinnacle.SendTypingIndicatorResponse>;
|
|
93
|
+
private __sendTyping;
|
|
61
94
|
/**
|
|
62
95
|
* Validate RCS message content without sending it.
|
|
63
96
|
*
|
|
@@ -143,6 +143,96 @@ class Rcs {
|
|
|
143
143
|
}
|
|
144
144
|
});
|
|
145
145
|
}
|
|
146
|
+
/**
|
|
147
|
+
* Send a typing indicator from an RCS agent to a recipient.
|
|
148
|
+
*
|
|
149
|
+
* This endpoint allows RCS agents to display a typing indicator to recipients. The indicator is a message bubble with animated typing dots like this: <img src="https://server.trypinnacle.app/storage/v1/object/public/pinnacle-public-assets/ios-typing-indicator.png" alt="Typing Indicator" style="display: inline; height: 1.5em; vertical-align: middle; margin: 0 4px;" />
|
|
150
|
+
*
|
|
151
|
+
* **Use Case:** Typing indicators are especially useful for providing feedback to users while the agent is thinking or generating a response that may take some time, creating a more engaging conversational experience.
|
|
152
|
+
*
|
|
153
|
+
* **Expiration:** Typing indicators automatically expire after around 20 seconds or when the agent sends a message, whichever comes first.
|
|
154
|
+
*
|
|
155
|
+
* **Frequency:** You can send typing indicators as many times as needed, though only one will be displayed at a time. Sending multiple typing indicators will extend the duration of the current indicator.
|
|
156
|
+
*
|
|
157
|
+
* > **Note:** Typing indicators are best-effort hints, not delivery-guaranteed state. The platform is allowed to coalesce or drop them, and the client UI decides when to show/hide.
|
|
158
|
+
*
|
|
159
|
+
* @param {Pinnacle.messages.SendTypingIndicatorSchema} request
|
|
160
|
+
* @param {Rcs.RequestOptions} requestOptions - Request-specific configuration.
|
|
161
|
+
*
|
|
162
|
+
* @throws {@link Pinnacle.BadRequestError}
|
|
163
|
+
* @throws {@link Pinnacle.UnauthorizedError}
|
|
164
|
+
* @throws {@link Pinnacle.NotFoundError}
|
|
165
|
+
* @throws {@link Pinnacle.InternalServerError}
|
|
166
|
+
* @throws {@link Pinnacle.NotImplementedError}
|
|
167
|
+
*
|
|
168
|
+
* @example
|
|
169
|
+
* await client.messages.rcs.sendTyping({
|
|
170
|
+
* agentId: "agent_pinnacle",
|
|
171
|
+
* to: "+14154746461",
|
|
172
|
+
* options: {
|
|
173
|
+
* test_mode: false
|
|
174
|
+
* }
|
|
175
|
+
* })
|
|
176
|
+
*/
|
|
177
|
+
sendTyping(request, requestOptions) {
|
|
178
|
+
return core.HttpResponsePromise.fromPromise(this.__sendTyping(request, requestOptions));
|
|
179
|
+
}
|
|
180
|
+
__sendTyping(request, requestOptions) {
|
|
181
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
182
|
+
var _a, _b, _c;
|
|
183
|
+
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);
|
|
184
|
+
const _response = yield core.fetcher({
|
|
185
|
+
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/typing"),
|
|
186
|
+
method: "POST",
|
|
187
|
+
headers: _headers,
|
|
188
|
+
contentType: "application/json",
|
|
189
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
190
|
+
requestType: "json",
|
|
191
|
+
body: request,
|
|
192
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
193
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
194
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
195
|
+
});
|
|
196
|
+
if (_response.ok) {
|
|
197
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
198
|
+
}
|
|
199
|
+
if (_response.error.reason === "status-code") {
|
|
200
|
+
switch (_response.error.statusCode) {
|
|
201
|
+
case 400:
|
|
202
|
+
throw new Pinnacle.BadRequestError(_response.error.body, _response.rawResponse);
|
|
203
|
+
case 401:
|
|
204
|
+
throw new Pinnacle.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
205
|
+
case 404:
|
|
206
|
+
throw new Pinnacle.NotFoundError(_response.error.body, _response.rawResponse);
|
|
207
|
+
case 500:
|
|
208
|
+
throw new Pinnacle.InternalServerError(_response.error.body, _response.rawResponse);
|
|
209
|
+
case 501:
|
|
210
|
+
throw new Pinnacle.NotImplementedError(_response.error.body, _response.rawResponse);
|
|
211
|
+
default:
|
|
212
|
+
throw new errors.PinnacleError({
|
|
213
|
+
statusCode: _response.error.statusCode,
|
|
214
|
+
body: _response.error.body,
|
|
215
|
+
rawResponse: _response.rawResponse,
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
switch (_response.error.reason) {
|
|
220
|
+
case "non-json":
|
|
221
|
+
throw new errors.PinnacleError({
|
|
222
|
+
statusCode: _response.error.statusCode,
|
|
223
|
+
body: _response.error.rawBody,
|
|
224
|
+
rawResponse: _response.rawResponse,
|
|
225
|
+
});
|
|
226
|
+
case "timeout":
|
|
227
|
+
throw new errors.PinnacleTimeoutError("Timeout exceeded when calling POST /messages/typing.");
|
|
228
|
+
case "unknown":
|
|
229
|
+
throw new errors.PinnacleError({
|
|
230
|
+
message: _response.error.errorMessage,
|
|
231
|
+
rawResponse: _response.rawResponse,
|
|
232
|
+
});
|
|
233
|
+
}
|
|
234
|
+
});
|
|
235
|
+
}
|
|
146
236
|
/**
|
|
147
237
|
* Validate RCS message content without sending it.
|
|
148
238
|
*
|
|
@@ -1,2 +1,17 @@
|
|
|
1
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
|
+
};
|
|
2
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./requests/index.js"), exports);
|