rcs-js 2.0.14 → 2.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/Client.js +2 -2
- package/dist/cjs/api/resources/campaigns/resources/rcs/client/Client.d.ts +6 -12
- package/dist/cjs/api/resources/campaigns/resources/rcs/client/Client.js +6 -12
- package/dist/cjs/api/resources/campaigns/resources/rcs/client/requests/UpsertRcsCampaignParams.d.ts +12 -32
- package/dist/cjs/api/resources/messages/resources/rcs/client/Client.d.ts +0 -10
- package/dist/cjs/api/resources/messages/resources/rcs/client/Client.js +0 -10
- package/dist/cjs/api/resources/phoneNumbers/client/Client.d.ts +0 -3
- package/dist/cjs/api/resources/phoneNumbers/client/Client.js +0 -5
- package/dist/cjs/api/resources/phoneNumbers/resources/index.d.ts +0 -1
- package/dist/cjs/api/resources/phoneNumbers/resources/index.js +1 -2
- package/dist/cjs/api/resources/webhooks/client/Client.d.ts +43 -0
- package/dist/cjs/api/resources/webhooks/client/Client.js +157 -0
- package/dist/cjs/api/resources/webhooks/client/requests/AttachWebhookParams.d.ts +23 -0
- package/dist/cjs/api/resources/webhooks/client/requests/DetachWebhookParams.d.ts +13 -0
- package/dist/cjs/api/resources/webhooks/client/requests/index.d.ts +2 -0
- package/dist/cjs/api/types/AttachWebhookResult.d.ts +22 -0
- package/dist/cjs/api/types/BaseRichMessage.d.ts +18 -1
- package/dist/cjs/api/types/DetachWebhookResult.d.ts +9 -0
- package/dist/cjs/api/types/ExtendedBrandWithVetting.d.ts +2 -2
- package/dist/cjs/api/types/ExtendedRcsCampaign.d.ts +6 -20
- package/dist/cjs/api/types/FailedSender.d.ts +6 -0
- package/dist/cjs/api/types/FailedSender.js +3 -0
- package/dist/cjs/api/types/RcsCampaign.d.ts +6 -20
- package/dist/cjs/api/types/RcsCampaignSummary.d.ts +0 -2
- package/dist/cjs/api/types/RcsCardsContent.d.ts +1 -1
- package/dist/cjs/api/types/RcsMediaContent.d.ts +1 -1
- package/dist/cjs/api/types/RcsValidateContent.d.ts +1 -1
- package/dist/cjs/api/types/RichCards.d.ts +1 -1
- package/dist/cjs/api/types/RichCardsMessage.d.ts +15 -1
- package/dist/cjs/api/types/RichMediaMessage.d.ts +1 -1
- package/dist/cjs/api/types/RichText.d.ts +1 -1
- package/dist/cjs/api/types/{SendRichMessageOptions.d.ts → SendRichMessageOptions4.d.ts} +1 -1
- package/dist/cjs/api/types/SendRichMessageOptions4.js +3 -0
- package/dist/cjs/api/types/SentRichMessageFallbackMms.d.ts +1 -1
- package/dist/cjs/api/types/SentRichMessageFallbackSms.d.ts +1 -1
- package/dist/cjs/api/types/SuccessfulConversationUpdate.d.ts +1 -1
- package/dist/cjs/api/types/VcardContent.d.ts +1 -1
- package/dist/cjs/api/types/WebhookEventEnum.d.ts +3 -2
- package/dist/cjs/api/types/WebhookEventEnum.js +3 -2
- package/dist/cjs/api/types/index.d.ts +4 -5
- package/dist/cjs/api/types/index.js +4 -5
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Client.mjs +2 -2
- package/dist/esm/api/resources/campaigns/resources/rcs/client/Client.d.mts +6 -12
- package/dist/esm/api/resources/campaigns/resources/rcs/client/Client.mjs +6 -12
- package/dist/esm/api/resources/campaigns/resources/rcs/client/requests/UpsertRcsCampaignParams.d.mts +12 -32
- package/dist/esm/api/resources/messages/resources/rcs/client/Client.d.mts +0 -10
- package/dist/esm/api/resources/messages/resources/rcs/client/Client.mjs +0 -10
- package/dist/esm/api/resources/phoneNumbers/client/Client.d.mts +0 -3
- package/dist/esm/api/resources/phoneNumbers/client/Client.mjs +0 -5
- package/dist/esm/api/resources/phoneNumbers/resources/index.d.mts +0 -1
- package/dist/esm/api/resources/phoneNumbers/resources/index.mjs +0 -1
- package/dist/esm/api/resources/webhooks/client/Client.d.mts +43 -0
- package/dist/esm/api/resources/webhooks/client/Client.mjs +157 -0
- package/dist/esm/api/resources/webhooks/client/requests/AttachWebhookParams.d.mts +23 -0
- package/dist/esm/api/resources/webhooks/client/requests/DetachWebhookParams.d.mts +13 -0
- package/dist/esm/api/resources/webhooks/client/requests/index.d.mts +2 -0
- package/dist/esm/api/types/AttachWebhookResult.d.mts +22 -0
- package/dist/esm/api/types/BaseRichMessage.d.mts +18 -1
- package/dist/esm/api/types/DetachWebhookResult.d.mts +9 -0
- package/dist/esm/api/types/ExtendedBrandWithVetting.d.mts +2 -2
- package/dist/esm/api/types/ExtendedRcsCampaign.d.mts +6 -20
- package/dist/esm/api/types/FailedSender.d.mts +6 -0
- package/dist/esm/api/types/FailedSender.mjs +2 -0
- package/dist/esm/api/types/RcsCampaign.d.mts +6 -20
- package/dist/esm/api/types/RcsCampaignSummary.d.mts +0 -2
- package/dist/esm/api/types/RcsCardsContent.d.mts +1 -1
- package/dist/esm/api/types/RcsMediaContent.d.mts +1 -1
- package/dist/esm/api/types/RcsValidateContent.d.mts +1 -1
- package/dist/esm/api/types/RichCards.d.mts +1 -1
- package/dist/esm/api/types/RichCardsMessage.d.mts +15 -1
- package/dist/esm/api/types/RichMediaMessage.d.mts +1 -1
- package/dist/esm/api/types/RichText.d.mts +1 -1
- package/dist/esm/api/types/{SendRichMessageOptions.d.mts → SendRichMessageOptions4.d.mts} +1 -1
- package/dist/esm/api/types/SendRichMessageOptions4.mjs +2 -0
- package/dist/esm/api/types/SentRichMessageFallbackMms.d.mts +1 -1
- package/dist/esm/api/types/SentRichMessageFallbackSms.d.mts +1 -1
- package/dist/esm/api/types/SuccessfulConversationUpdate.d.mts +1 -1
- package/dist/esm/api/types/VcardContent.d.mts +1 -1
- package/dist/esm/api/types/WebhookEventEnum.d.mts +3 -2
- package/dist/esm/api/types/WebhookEventEnum.mjs +3 -2
- package/dist/esm/api/types/index.d.mts +4 -5
- package/dist/esm/api/types/index.mjs +4 -5
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +143 -182
- package/dist/cjs/api/resources/phoneNumbers/resources/webhook/client/Client.d.ts +0 -63
- package/dist/cjs/api/resources/phoneNumbers/resources/webhook/client/Client.js +0 -231
- package/dist/cjs/api/resources/phoneNumbers/resources/webhook/client/index.d.ts +0 -1
- package/dist/cjs/api/resources/phoneNumbers/resources/webhook/client/index.js +0 -2
- package/dist/cjs/api/resources/phoneNumbers/resources/webhook/index.d.ts +0 -1
- package/dist/cjs/api/resources/phoneNumbers/resources/webhook/index.js +0 -17
- package/dist/cjs/api/types/AttachWebhookParams.d.ts +0 -19
- package/dist/cjs/api/types/ConfiguredWebhook.d.ts +0 -32
- package/dist/cjs/api/types/DetachedWebhookInfo.d.ts +0 -8
- package/dist/cjs/api/types/RcsCampaignUseCaseEnum.d.ts +0 -37
- package/dist/cjs/api/types/RcsCampaignUseCaseEnum.js +0 -40
- package/dist/esm/api/resources/phoneNumbers/resources/webhook/client/Client.d.mts +0 -63
- package/dist/esm/api/resources/phoneNumbers/resources/webhook/client/Client.mjs +0 -194
- package/dist/esm/api/resources/phoneNumbers/resources/webhook/client/index.d.mts +0 -1
- package/dist/esm/api/resources/phoneNumbers/resources/webhook/client/index.mjs +0 -1
- package/dist/esm/api/resources/phoneNumbers/resources/webhook/index.d.mts +0 -1
- package/dist/esm/api/resources/phoneNumbers/resources/webhook/index.mjs +0 -1
- package/dist/esm/api/types/AttachWebhookParams.d.mts +0 -19
- package/dist/esm/api/types/ConfiguredWebhook.d.mts +0 -32
- package/dist/esm/api/types/DetachedWebhookInfo.d.mts +0 -8
- package/dist/esm/api/types/RcsCampaignUseCaseEnum.d.mts +0 -37
- package/dist/esm/api/types/RcsCampaignUseCaseEnum.mjs +0 -37
- /package/dist/cjs/api/{types → resources/webhooks/client/requests}/AttachWebhookParams.js +0 -0
- /package/dist/cjs/api/{types/ConfiguredWebhook.js → resources/webhooks/client/requests/DetachWebhookParams.js} +0 -0
- /package/dist/cjs/api/types/{DetachedWebhookInfo.js → AttachWebhookResult.js} +0 -0
- /package/dist/cjs/api/types/{SendRichMessageOptions.js → DetachWebhookResult.js} +0 -0
- /package/dist/esm/api/{types → resources/webhooks/client/requests}/AttachWebhookParams.mjs +0 -0
- /package/dist/esm/api/{types/ConfiguredWebhook.mjs → resources/webhooks/client/requests/DetachWebhookParams.mjs} +0 -0
- /package/dist/esm/api/types/{DetachedWebhookInfo.mjs → AttachWebhookResult.mjs} +0 -0
- /package/dist/esm/api/types/{SendRichMessageOptions.mjs → DetachWebhookResult.mjs} +0 -0
|
@@ -1,194 +0,0 @@
|
|
|
1
|
-
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/headers.mjs";
|
|
12
|
-
import * as core from "../../../../../../core/index.mjs";
|
|
13
|
-
import * as environments from "../../../../../../environments.mjs";
|
|
14
|
-
import * as errors from "../../../../../../errors/index.mjs";
|
|
15
|
-
import * as Pinnacle from "../../../../../index.mjs";
|
|
16
|
-
export class Webhook {
|
|
17
|
-
constructor(_options) {
|
|
18
|
-
this._options = _options;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Connect a webhook to your phone number to receive real-time notifications for incoming messages, delivery status updates, and other communication events.
|
|
22
|
-
*
|
|
23
|
-
* @param {string} phone - The phone number you want to attach the webhook to in E.164 format. Make sure it is url encoded (i.e. replace the leading + with %2B). <br>
|
|
24
|
-
*
|
|
25
|
-
* Must be a phone number that you own and have already [purchased](./buy) through the API. A phone number can have multiple webhooks attached to it.
|
|
26
|
-
* @param {Pinnacle.AttachWebhookParams} request
|
|
27
|
-
* @param {Webhook.RequestOptions} requestOptions - Request-specific configuration.
|
|
28
|
-
*
|
|
29
|
-
* @throws {@link Pinnacle.BadRequestError}
|
|
30
|
-
* @throws {@link Pinnacle.UnauthorizedError}
|
|
31
|
-
* @throws {@link Pinnacle.ForbiddenError}
|
|
32
|
-
* @throws {@link Pinnacle.NotFoundError}
|
|
33
|
-
* @throws {@link Pinnacle.InternalServerError}
|
|
34
|
-
* @throws {@link Pinnacle.NotImplementedError}
|
|
35
|
-
*
|
|
36
|
-
* @example
|
|
37
|
-
* await client.phoneNumbers.webhook.attach("%2B14155551234", {
|
|
38
|
-
* webhookId: "wh_1234567890",
|
|
39
|
-
* event: "MESSAGE.STATUS"
|
|
40
|
-
* })
|
|
41
|
-
*/
|
|
42
|
-
attach(phone, request, requestOptions) {
|
|
43
|
-
return core.HttpResponsePromise.fromPromise(this.__attach(phone, request, requestOptions));
|
|
44
|
-
}
|
|
45
|
-
__attach(phone, request, requestOptions) {
|
|
46
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
47
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
48
|
-
const _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);
|
|
49
|
-
const _response = yield core.fetcher({
|
|
50
|
-
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, `phone-numbers/${core.url.encodePathParam(phone)}/attach-webhook`),
|
|
51
|
-
method: "POST",
|
|
52
|
-
headers: _headers,
|
|
53
|
-
contentType: "application/json",
|
|
54
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
55
|
-
requestType: "json",
|
|
56
|
-
body: request,
|
|
57
|
-
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
58
|
-
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
59
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
60
|
-
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
61
|
-
logging: this._options.logging,
|
|
62
|
-
});
|
|
63
|
-
if (_response.ok) {
|
|
64
|
-
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
65
|
-
}
|
|
66
|
-
if (_response.error.reason === "status-code") {
|
|
67
|
-
switch (_response.error.statusCode) {
|
|
68
|
-
case 400:
|
|
69
|
-
throw new Pinnacle.BadRequestError(_response.error.body, _response.rawResponse);
|
|
70
|
-
case 401:
|
|
71
|
-
throw new Pinnacle.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
72
|
-
case 403:
|
|
73
|
-
throw new Pinnacle.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
74
|
-
case 404:
|
|
75
|
-
throw new Pinnacle.NotFoundError(_response.error.body, _response.rawResponse);
|
|
76
|
-
case 500:
|
|
77
|
-
throw new Pinnacle.InternalServerError(_response.error.body, _response.rawResponse);
|
|
78
|
-
case 501:
|
|
79
|
-
throw new Pinnacle.NotImplementedError(_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 /phone-numbers/{phone}/attach-webhook.");
|
|
97
|
-
case "unknown":
|
|
98
|
-
throw new errors.PinnacleError({
|
|
99
|
-
message: _response.error.errorMessage,
|
|
100
|
-
rawResponse: _response.rawResponse,
|
|
101
|
-
});
|
|
102
|
-
}
|
|
103
|
-
});
|
|
104
|
-
}
|
|
105
|
-
/**
|
|
106
|
-
* Disconnect a webhook from your phone number to stop receiving event notifications for that specific number. <br>
|
|
107
|
-
*
|
|
108
|
-
* The webhook configuration itself remains intact and available for use with other phone numbers.
|
|
109
|
-
*
|
|
110
|
-
* @param {string} phone - The phone number you want to attach the webhook to in E.164 format. Make sure it is url encoded (i.e. replace the leading + with %2B). <br>
|
|
111
|
-
*
|
|
112
|
-
* Must be a phone number that you own and currently has the specified webhook attached.
|
|
113
|
-
* @param {string} webhookId - The unique identifier of the webhook you want to detach from the phone number. <br>
|
|
114
|
-
*
|
|
115
|
-
* This must be a valid webhook ID that is currently attached to the specified phone number. This identifier is a string that always begins with the prefix `wh_`, for example: `wh_1234567890`.
|
|
116
|
-
* @param {Webhook.RequestOptions} requestOptions - Request-specific configuration.
|
|
117
|
-
*
|
|
118
|
-
* @throws {@link Pinnacle.BadRequestError}
|
|
119
|
-
* @throws {@link Pinnacle.UnauthorizedError}
|
|
120
|
-
* @throws {@link Pinnacle.ForbiddenError}
|
|
121
|
-
* @throws {@link Pinnacle.NotFoundError}
|
|
122
|
-
* @throws {@link Pinnacle.InternalServerError}
|
|
123
|
-
* @throws {@link Pinnacle.NotImplementedError}
|
|
124
|
-
*
|
|
125
|
-
* @example
|
|
126
|
-
* await client.phoneNumbers.webhook.detach("+14155551234", "wh_1234567890")
|
|
127
|
-
*/
|
|
128
|
-
detach(phone, webhookId, requestOptions) {
|
|
129
|
-
return core.HttpResponsePromise.fromPromise(this.__detach(phone, webhookId, requestOptions));
|
|
130
|
-
}
|
|
131
|
-
__detach(phone, webhookId, requestOptions) {
|
|
132
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
133
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
134
|
-
const _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);
|
|
135
|
-
const _response = yield core.fetcher({
|
|
136
|
-
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, `phone-numbers/${core.url.encodePathParam(phone)}/detach-webhook/${core.url.encodePathParam(webhookId)}`),
|
|
137
|
-
method: "DELETE",
|
|
138
|
-
headers: _headers,
|
|
139
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
140
|
-
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
141
|
-
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
142
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
143
|
-
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
144
|
-
logging: this._options.logging,
|
|
145
|
-
});
|
|
146
|
-
if (_response.ok) {
|
|
147
|
-
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
148
|
-
}
|
|
149
|
-
if (_response.error.reason === "status-code") {
|
|
150
|
-
switch (_response.error.statusCode) {
|
|
151
|
-
case 400:
|
|
152
|
-
throw new Pinnacle.BadRequestError(_response.error.body, _response.rawResponse);
|
|
153
|
-
case 401:
|
|
154
|
-
throw new Pinnacle.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
155
|
-
case 403:
|
|
156
|
-
throw new Pinnacle.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
157
|
-
case 404:
|
|
158
|
-
throw new Pinnacle.NotFoundError(_response.error.body, _response.rawResponse);
|
|
159
|
-
case 500:
|
|
160
|
-
throw new Pinnacle.InternalServerError(_response.error.body, _response.rawResponse);
|
|
161
|
-
case 501:
|
|
162
|
-
throw new Pinnacle.NotImplementedError(_response.error.body, _response.rawResponse);
|
|
163
|
-
default:
|
|
164
|
-
throw new errors.PinnacleError({
|
|
165
|
-
statusCode: _response.error.statusCode,
|
|
166
|
-
body: _response.error.body,
|
|
167
|
-
rawResponse: _response.rawResponse,
|
|
168
|
-
});
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
switch (_response.error.reason) {
|
|
172
|
-
case "non-json":
|
|
173
|
-
throw new errors.PinnacleError({
|
|
174
|
-
statusCode: _response.error.statusCode,
|
|
175
|
-
body: _response.error.rawBody,
|
|
176
|
-
rawResponse: _response.rawResponse,
|
|
177
|
-
});
|
|
178
|
-
case "timeout":
|
|
179
|
-
throw new errors.PinnacleTimeoutError("Timeout exceeded when calling DELETE /phone-numbers/{phone}/detach-webhook/{webhookId}.");
|
|
180
|
-
case "unknown":
|
|
181
|
-
throw new errors.PinnacleError({
|
|
182
|
-
message: _response.error.errorMessage,
|
|
183
|
-
rawResponse: _response.rawResponse,
|
|
184
|
-
});
|
|
185
|
-
}
|
|
186
|
-
});
|
|
187
|
-
}
|
|
188
|
-
_getCustomAuthorizationHeaders() {
|
|
189
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
190
|
-
const apiKeyValue = yield core.Supplier.get(this._options.apiKey);
|
|
191
|
-
return { "PINNACLE-API-KEY": apiKeyValue };
|
|
192
|
-
});
|
|
193
|
-
}
|
|
194
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./client/index.mjs";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./client/index.mjs";
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type * as Pinnacle from "../index.mjs";
|
|
2
|
-
/**
|
|
3
|
-
* Use this request to connect a webhook to your phone number and receive real-time event notifications.
|
|
4
|
-
* You can either attach one of your existing webhooks by providing its ID or create a new webhook by specifying its name, URL, and event type.
|
|
5
|
-
*/
|
|
6
|
-
export type AttachWebhookParams =
|
|
7
|
-
/**
|
|
8
|
-
* Attach a webhook you've already created in your account to this phone number. */
|
|
9
|
-
{
|
|
10
|
-
webhookId: string;
|
|
11
|
-
event: Pinnacle.WebhookEventEnum | null;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Create a new webhook and immediately attach it to your phone number. */
|
|
15
|
-
| {
|
|
16
|
-
name: string;
|
|
17
|
-
url: string;
|
|
18
|
-
event: Pinnacle.WebhookEventEnum | null;
|
|
19
|
-
};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import type * as Pinnacle from "../index.mjs";
|
|
2
|
-
/**
|
|
3
|
-
* Confirmation that a webhook has been successfully attached to the specified phone number.
|
|
4
|
-
* Includes detailed webhook information, the subscribed event type, and the associated phone number.
|
|
5
|
-
*/
|
|
6
|
-
export interface ConfiguredWebhook {
|
|
7
|
-
/** Detailed information about the attached webhook. */
|
|
8
|
-
webhook: ConfiguredWebhook.Webhook;
|
|
9
|
-
/** Specific event type configured for this webhook attachment. */
|
|
10
|
-
event: Pinnacle.WebhookEventEnum;
|
|
11
|
-
/** Phone number in E.164 format that is linked to the webhook. */
|
|
12
|
-
phoneNumber: string;
|
|
13
|
-
}
|
|
14
|
-
export declare namespace ConfiguredWebhook {
|
|
15
|
-
/**
|
|
16
|
-
* Detailed information about the attached webhook.
|
|
17
|
-
*/
|
|
18
|
-
interface Webhook {
|
|
19
|
-
/** Unique identifier of the webhook within the account. This identifier is a string that always begins with the prefix `wh_`, for example: `wh_1234567890`. */
|
|
20
|
-
id: string;
|
|
21
|
-
/** Name of the webhook. */
|
|
22
|
-
name: string;
|
|
23
|
-
/** The HTTPS endpoint URL where webhook events will be sent as HTTP POST requests. */
|
|
24
|
-
url: string;
|
|
25
|
-
/**
|
|
26
|
-
* Secret key used to verify the authenticity of incoming webhook requests. <br>
|
|
27
|
-
*
|
|
28
|
-
* This secret key will be stored in the `PINNACLE-SIGNING-SECRET` header.
|
|
29
|
-
*/
|
|
30
|
-
secret?: string;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export interface DetachedWebhookInfo {
|
|
2
|
-
/** Confirmation message. */
|
|
3
|
-
message: string;
|
|
4
|
-
/** Unique identifier of the webhook within the account. This identifier is a string that always begins with the prefix `wh_`, for example: `wh_1234567890`. */
|
|
5
|
-
webhookId: string;
|
|
6
|
-
/** Phone number the webhook was detached from in E.164 format. */
|
|
7
|
-
phoneNumber: string;
|
|
8
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/** The primary use case classification for this campaign. */
|
|
2
|
-
export declare const RcsCampaignUseCaseEnum: {
|
|
3
|
-
readonly AdvertisingMarketing: "ADVERTISING_MARKETING";
|
|
4
|
-
readonly ArtsAndEntertainment: "ARTS_AND_ENTERTAINMENT";
|
|
5
|
-
readonly Bfsi: "BFSI";
|
|
6
|
-
readonly CommercialAndIndustrial: "COMMERCIAL_AND_INDUSTRIAL";
|
|
7
|
-
readonly CommunityOrganizations: "COMMUNITY_ORGANIZATIONS";
|
|
8
|
-
readonly CreditRating: "CREDIT_RATING";
|
|
9
|
-
readonly DeliveryPartner: "DELIVERY_PARTNER";
|
|
10
|
-
readonly Education: "EDUCATION";
|
|
11
|
-
readonly Finance: "FINANCE";
|
|
12
|
-
readonly FoodAndBeverage: "FOOD_AND_BEVERAGE";
|
|
13
|
-
readonly Gaming: "GAMING";
|
|
14
|
-
readonly Government: "GOVERNMENT";
|
|
15
|
-
readonly Health: "HEALTH";
|
|
16
|
-
readonly HotelAndBnb: "HOTEL_AND_BNB";
|
|
17
|
-
readonly Insurance: "INSURANCE";
|
|
18
|
-
readonly Legal: "LEGAL";
|
|
19
|
-
readonly Lending: "LENDING";
|
|
20
|
-
readonly Loans: "LOANS";
|
|
21
|
-
readonly LocalServices: "LOCAL_SERVICES";
|
|
22
|
-
readonly News: "NEWS";
|
|
23
|
-
readonly NonGovernmentalOrganizations: "NON_GOVERNMENTAL_ORGANIZATIONS";
|
|
24
|
-
readonly NonProfitOrganizations: "NON_PROFIT_ORGANIZATIONS";
|
|
25
|
-
readonly OnlineSeller: "ONLINE_SELLER";
|
|
26
|
-
readonly Other: "OTHER";
|
|
27
|
-
readonly Productivity: "PRODUCTIVITY";
|
|
28
|
-
readonly Property: "PROPERTY";
|
|
29
|
-
readonly ScienceTechnologyEngineering: "SCIENCE_TECHNOLOGY_ENGINEERING";
|
|
30
|
-
readonly ShoppingAndRetail: "SHOPPING_AND_RETAIL";
|
|
31
|
-
readonly Social: "SOCIAL";
|
|
32
|
-
readonly Sports: "SPORTS";
|
|
33
|
-
readonly Telecommunications: "TELECOMMUNICATIONS";
|
|
34
|
-
readonly Travel: "TRAVEL";
|
|
35
|
-
readonly Utilities: "UTILITIES";
|
|
36
|
-
};
|
|
37
|
-
export type RcsCampaignUseCaseEnum = (typeof RcsCampaignUseCaseEnum)[keyof typeof RcsCampaignUseCaseEnum];
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
-
/** The primary use case classification for this campaign. */
|
|
3
|
-
export const RcsCampaignUseCaseEnum = {
|
|
4
|
-
AdvertisingMarketing: "ADVERTISING_MARKETING",
|
|
5
|
-
ArtsAndEntertainment: "ARTS_AND_ENTERTAINMENT",
|
|
6
|
-
Bfsi: "BFSI",
|
|
7
|
-
CommercialAndIndustrial: "COMMERCIAL_AND_INDUSTRIAL",
|
|
8
|
-
CommunityOrganizations: "COMMUNITY_ORGANIZATIONS",
|
|
9
|
-
CreditRating: "CREDIT_RATING",
|
|
10
|
-
DeliveryPartner: "DELIVERY_PARTNER",
|
|
11
|
-
Education: "EDUCATION",
|
|
12
|
-
Finance: "FINANCE",
|
|
13
|
-
FoodAndBeverage: "FOOD_AND_BEVERAGE",
|
|
14
|
-
Gaming: "GAMING",
|
|
15
|
-
Government: "GOVERNMENT",
|
|
16
|
-
Health: "HEALTH",
|
|
17
|
-
HotelAndBnb: "HOTEL_AND_BNB",
|
|
18
|
-
Insurance: "INSURANCE",
|
|
19
|
-
Legal: "LEGAL",
|
|
20
|
-
Lending: "LENDING",
|
|
21
|
-
Loans: "LOANS",
|
|
22
|
-
LocalServices: "LOCAL_SERVICES",
|
|
23
|
-
News: "NEWS",
|
|
24
|
-
NonGovernmentalOrganizations: "NON_GOVERNMENTAL_ORGANIZATIONS",
|
|
25
|
-
NonProfitOrganizations: "NON_PROFIT_ORGANIZATIONS",
|
|
26
|
-
OnlineSeller: "ONLINE_SELLER",
|
|
27
|
-
Other: "OTHER",
|
|
28
|
-
Productivity: "PRODUCTIVITY",
|
|
29
|
-
Property: "PROPERTY",
|
|
30
|
-
ScienceTechnologyEngineering: "SCIENCE_TECHNOLOGY_ENGINEERING",
|
|
31
|
-
ShoppingAndRetail: "SHOPPING_AND_RETAIL",
|
|
32
|
-
Social: "SOCIAL",
|
|
33
|
-
Sports: "SPORTS",
|
|
34
|
-
Telecommunications: "TELECOMMUNICATIONS",
|
|
35
|
-
Travel: "TRAVEL",
|
|
36
|
-
Utilities: "UTILITIES",
|
|
37
|
-
};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|