rcs-js 2.0.0-rc.13 → 2.0.0-rc.15
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 +2 -2
- package/dist/cjs/Client.js +3 -3
- package/dist/cjs/api/resources/brands/client/Client.d.ts +4 -4
- package/dist/cjs/api/resources/brands/client/Client.js +9 -9
- package/dist/cjs/api/resources/brands/client/requests/BrandsGetRequest.d.ts +1 -1
- package/dist/cjs/api/resources/brands/client/requests/UpsertBrandParams.d.ts +3 -3
- package/dist/cjs/api/resources/campaigns/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/campaigns/client/Client.js +1 -1
- package/dist/cjs/api/resources/campaigns/resources/dlc/client/Client.d.ts +3 -3
- package/dist/cjs/api/resources/campaigns/resources/dlc/client/Client.js +1 -1
- package/dist/cjs/api/resources/campaigns/resources/rcs/client/Client.d.ts +3 -3
- package/dist/cjs/api/resources/campaigns/resources/rcs/client/Client.js +1 -1
- package/dist/cjs/api/resources/campaigns/resources/tollFree/client/Client.d.ts +3 -3
- package/dist/cjs/api/resources/campaigns/resources/tollFree/client/Client.js +1 -1
- package/dist/cjs/api/resources/contacts/client/Client.d.ts +3 -3
- package/dist/cjs/api/resources/contacts/client/Client.js +7 -7
- package/dist/cjs/api/resources/contacts/client/requests/ContactsGetRequest.d.ts +2 -2
- package/dist/cjs/api/resources/conversations/client/Client.d.ts +4 -4
- package/dist/cjs/api/resources/conversations/client/Client.js +2 -5
- package/dist/cjs/api/resources/messages/client/Client.d.ts +3 -3
- package/dist/cjs/api/resources/messages/client/Client.js +1 -1
- package/dist/cjs/api/resources/messages/client/requests/ReactMessageParams.d.ts +1 -1
- package/dist/cjs/api/resources/messages/resources/mms/client/Client.d.ts +3 -3
- package/dist/cjs/api/resources/messages/resources/mms/client/Client.js +1 -1
- package/dist/cjs/api/resources/messages/resources/rcs/client/Client.d.ts +3 -3
- package/dist/cjs/api/resources/messages/resources/rcs/client/Client.js +1 -1
- package/dist/cjs/api/resources/messages/resources/sms/client/Client.d.ts +3 -3
- package/dist/cjs/api/resources/messages/resources/sms/client/Client.js +1 -1
- package/dist/cjs/api/resources/phoneNumbers/client/Client.d.ts +3 -3
- package/dist/cjs/api/resources/phoneNumbers/client/Client.js +1 -1
- package/dist/cjs/api/resources/phoneNumbers/resources/campaign/client/Client.d.ts +4 -4
- package/dist/cjs/api/resources/phoneNumbers/resources/campaign/client/Client.js +2 -2
- package/dist/cjs/api/resources/phoneNumbers/resources/webhook/client/Client.d.ts +6 -5
- package/dist/cjs/api/resources/phoneNumbers/resources/webhook/client/Client.js +4 -3
- package/dist/cjs/api/resources/rcs/client/Client.d.ts +3 -3
- package/dist/cjs/api/resources/rcs/client/Client.js +1 -1
- package/dist/cjs/api/resources/status/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/status/client/Client.js +1 -1
- package/dist/cjs/api/resources/status/resources/get/client/Client.d.ts +3 -3
- package/dist/cjs/api/resources/status/resources/get/client/Client.js +1 -1
- package/dist/cjs/api/resources/tools/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/tools/client/Client.js +1 -1
- package/dist/cjs/api/resources/tools/resources/contactCard/client/Client.d.ts +5 -5
- package/dist/cjs/api/resources/tools/resources/contactCard/client/Client.js +3 -3
- package/dist/cjs/api/resources/tools/resources/file/client/Client.d.ts +3 -3
- package/dist/cjs/api/resources/tools/resources/file/client/Client.js +1 -1
- package/dist/cjs/api/resources/tools/resources/url/client/Client.d.ts +3 -3
- package/dist/cjs/api/resources/tools/resources/url/client/Client.js +1 -1
- package/dist/cjs/api/resources/webhooks/client/Client.d.ts +3 -3
- package/dist/cjs/api/resources/webhooks/client/Client.js +1 -1
- package/dist/cjs/api/types/AdvancedPhoneInformation.d.ts +9 -9
- package/dist/cjs/api/types/AttachWebhookParams.d.ts +2 -2
- package/dist/cjs/api/types/ButtonClickedData.d.ts +3 -1
- package/dist/cjs/api/types/Conversation.d.ts +3 -3
- package/dist/cjs/api/types/EnhancedContactItem.d.ts +1 -1
- package/dist/cjs/api/types/ExtendedBrand.d.ts +6 -2
- package/dist/cjs/api/types/ExtendedBrandWithVetting.d.ts +2 -2
- package/dist/cjs/api/types/Message.d.ts +4 -4
- package/dist/cjs/api/types/RcsCapabilitiesResult.d.ts +1 -1
- package/dist/cjs/api/types/ShortenedUrl.d.ts +1 -1
- package/dist/cjs/api/types/TollFreeCampaignWithExtendedBrandAndStatus.d.ts +0 -1
- package/dist/cjs/api/types/UploadResults.d.ts +1 -1
- package/dist/cjs/api/types/VCardData.d.ts +1 -1
- package/dist/cjs/api/types/WebhookEventEnum.d.ts +1 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/wrapper/messages/Client.js +1 -1
- package/dist/esm/Client.d.mts +2 -2
- package/dist/esm/Client.mjs +3 -3
- package/dist/esm/api/resources/brands/client/Client.d.mts +4 -4
- package/dist/esm/api/resources/brands/client/Client.mjs +9 -9
- package/dist/esm/api/resources/brands/client/requests/BrandsGetRequest.d.mts +1 -1
- package/dist/esm/api/resources/brands/client/requests/UpsertBrandParams.d.mts +3 -3
- package/dist/esm/api/resources/campaigns/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/campaigns/client/Client.mjs +1 -1
- package/dist/esm/api/resources/campaigns/resources/dlc/client/Client.d.mts +3 -3
- package/dist/esm/api/resources/campaigns/resources/dlc/client/Client.mjs +1 -1
- package/dist/esm/api/resources/campaigns/resources/rcs/client/Client.d.mts +3 -3
- package/dist/esm/api/resources/campaigns/resources/rcs/client/Client.mjs +1 -1
- package/dist/esm/api/resources/campaigns/resources/tollFree/client/Client.d.mts +3 -3
- package/dist/esm/api/resources/campaigns/resources/tollFree/client/Client.mjs +1 -1
- package/dist/esm/api/resources/contacts/client/Client.d.mts +3 -3
- package/dist/esm/api/resources/contacts/client/Client.mjs +7 -7
- package/dist/esm/api/resources/contacts/client/requests/ContactsGetRequest.d.mts +2 -2
- package/dist/esm/api/resources/conversations/client/Client.d.mts +4 -4
- package/dist/esm/api/resources/conversations/client/Client.mjs +2 -5
- package/dist/esm/api/resources/messages/client/Client.d.mts +3 -3
- package/dist/esm/api/resources/messages/client/Client.mjs +1 -1
- package/dist/esm/api/resources/messages/client/requests/ReactMessageParams.d.mts +1 -1
- package/dist/esm/api/resources/messages/resources/mms/client/Client.d.mts +3 -3
- package/dist/esm/api/resources/messages/resources/mms/client/Client.mjs +1 -1
- package/dist/esm/api/resources/messages/resources/rcs/client/Client.d.mts +3 -3
- package/dist/esm/api/resources/messages/resources/rcs/client/Client.mjs +1 -1
- package/dist/esm/api/resources/messages/resources/sms/client/Client.d.mts +3 -3
- package/dist/esm/api/resources/messages/resources/sms/client/Client.mjs +1 -1
- package/dist/esm/api/resources/phoneNumbers/client/Client.d.mts +3 -3
- package/dist/esm/api/resources/phoneNumbers/client/Client.mjs +1 -1
- package/dist/esm/api/resources/phoneNumbers/resources/campaign/client/Client.d.mts +4 -4
- package/dist/esm/api/resources/phoneNumbers/resources/campaign/client/Client.mjs +2 -2
- package/dist/esm/api/resources/phoneNumbers/resources/webhook/client/Client.d.mts +6 -5
- package/dist/esm/api/resources/phoneNumbers/resources/webhook/client/Client.mjs +4 -3
- package/dist/esm/api/resources/rcs/client/Client.d.mts +3 -3
- package/dist/esm/api/resources/rcs/client/Client.mjs +1 -1
- package/dist/esm/api/resources/status/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/status/client/Client.mjs +1 -1
- package/dist/esm/api/resources/status/resources/get/client/Client.d.mts +3 -3
- package/dist/esm/api/resources/status/resources/get/client/Client.mjs +1 -1
- package/dist/esm/api/resources/tools/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/tools/client/Client.mjs +1 -1
- package/dist/esm/api/resources/tools/resources/contactCard/client/Client.d.mts +5 -5
- package/dist/esm/api/resources/tools/resources/contactCard/client/Client.mjs +3 -3
- package/dist/esm/api/resources/tools/resources/file/client/Client.d.mts +3 -3
- package/dist/esm/api/resources/tools/resources/file/client/Client.mjs +1 -1
- package/dist/esm/api/resources/tools/resources/url/client/Client.d.mts +3 -3
- package/dist/esm/api/resources/tools/resources/url/client/Client.mjs +1 -1
- package/dist/esm/api/resources/webhooks/client/Client.d.mts +3 -3
- package/dist/esm/api/resources/webhooks/client/Client.mjs +1 -1
- package/dist/esm/api/types/AdvancedPhoneInformation.d.mts +9 -9
- package/dist/esm/api/types/AttachWebhookParams.d.mts +2 -2
- package/dist/esm/api/types/ButtonClickedData.d.mts +3 -1
- package/dist/esm/api/types/Conversation.d.mts +3 -3
- package/dist/esm/api/types/EnhancedContactItem.d.mts +1 -1
- package/dist/esm/api/types/ExtendedBrand.d.mts +6 -2
- package/dist/esm/api/types/ExtendedBrandWithVetting.d.mts +2 -2
- package/dist/esm/api/types/Message.d.mts +4 -4
- package/dist/esm/api/types/RcsCapabilitiesResult.d.mts +1 -1
- package/dist/esm/api/types/ShortenedUrl.d.mts +1 -1
- package/dist/esm/api/types/TollFreeCampaignWithExtendedBrandAndStatus.d.mts +0 -1
- package/dist/esm/api/types/UploadResults.d.mts +1 -1
- package/dist/esm/api/types/VCardData.d.mts +1 -1
- package/dist/esm/api/types/WebhookEventEnum.d.mts +1 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/dist/esm/wrapper/messages/Client.mjs +1 -1
- package/package.json +2 -2
- package/reference.md +8 -7
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
/**
|
|
5
5
|
* Types of events that can trigger webhook notifications for phone numbers.
|
|
6
6
|
* Subscribe to specific events to receive real-time updates about your phone number activity.
|
|
7
|
+
* Use `null` to listen to all events.
|
|
7
8
|
*/
|
|
8
9
|
export type WebhookEventEnum = "MESSAGE.STATUS" | "MESSAGE.RECEIVED";
|
|
9
10
|
export declare const WebhookEventEnum: {
|
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.15";
|
package/dist/cjs/version.js
CHANGED
|
@@ -31,7 +31,7 @@ class EnhancedMessages extends Client_js_1.Messages {
|
|
|
31
31
|
}
|
|
32
32
|
if (!signingSecret) {
|
|
33
33
|
throw new index_js_1.UnauthorizedError({
|
|
34
|
-
error: "Make sure to set the
|
|
34
|
+
error: "Make sure to set the PINNACLE_SIGNING_SECRET environment variable or pass the secret as an argument to the process method",
|
|
35
35
|
});
|
|
36
36
|
}
|
|
37
37
|
if (!headerSecret) {
|
package/dist/esm/Client.d.mts
CHANGED
|
@@ -18,7 +18,7 @@ export declare namespace PinnacleClient {
|
|
|
18
18
|
environment?: core.Supplier<environments.PinnacleEnvironment | string>;
|
|
19
19
|
/** Specify a custom URL to connect the client to. */
|
|
20
20
|
baseUrl?: core.Supplier<string>;
|
|
21
|
-
apiKey
|
|
21
|
+
apiKey?: core.Supplier<string | undefined>;
|
|
22
22
|
/** Additional headers to include in requests. */
|
|
23
23
|
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
24
24
|
}
|
|
@@ -47,7 +47,7 @@ export declare class PinnacleClient {
|
|
|
47
47
|
protected _campaigns: Campaigns | undefined;
|
|
48
48
|
protected _status: Status | undefined;
|
|
49
49
|
protected _tools: Tools | undefined;
|
|
50
|
-
constructor(_options
|
|
50
|
+
constructor(_options?: PinnacleClient.Options);
|
|
51
51
|
get brands(): Brands;
|
|
52
52
|
get contacts(): Contacts;
|
|
53
53
|
get conversations(): Conversations;
|
package/dist/esm/Client.mjs
CHANGED
|
@@ -14,12 +14,12 @@ import { Campaigns } from "./api/resources/campaigns/client/Client.mjs";
|
|
|
14
14
|
import { Status } from "./api/resources/status/client/Client.mjs";
|
|
15
15
|
import { Tools } from "./api/resources/tools/client/Client.mjs";
|
|
16
16
|
export class PinnacleClient {
|
|
17
|
-
constructor(_options) {
|
|
17
|
+
constructor(_options = {}) {
|
|
18
18
|
this._options = Object.assign(Object.assign({}, _options), { headers: mergeHeaders({
|
|
19
19
|
"X-Fern-Language": "JavaScript",
|
|
20
20
|
"X-Fern-SDK-Name": "rcs-js",
|
|
21
|
-
"X-Fern-SDK-Version": "2.0.0-rc.
|
|
22
|
-
"User-Agent": "rcs-js/2.0.0-rc.
|
|
21
|
+
"X-Fern-SDK-Version": "2.0.0-rc.15",
|
|
22
|
+
"User-Agent": "rcs-js/2.0.0-rc.15",
|
|
23
23
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
24
24
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
25
25
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -9,7 +9,7 @@ export declare namespace Brands {
|
|
|
9
9
|
environment?: core.Supplier<environments.PinnacleEnvironment | string>;
|
|
10
10
|
/** Specify a custom URL to connect the client to. */
|
|
11
11
|
baseUrl?: core.Supplier<string>;
|
|
12
|
-
apiKey
|
|
12
|
+
apiKey?: core.Supplier<string | undefined>;
|
|
13
13
|
/** Additional headers to include in requests. */
|
|
14
14
|
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
15
15
|
}
|
|
@@ -28,7 +28,7 @@ export declare namespace Brands {
|
|
|
28
28
|
}
|
|
29
29
|
export declare class Brands {
|
|
30
30
|
protected readonly _options: Brands.Options;
|
|
31
|
-
constructor(_options
|
|
31
|
+
constructor(_options?: Brands.Options);
|
|
32
32
|
/**
|
|
33
33
|
* Automatically populate brand information based on partial input data you provide.
|
|
34
34
|
*
|
|
@@ -81,7 +81,7 @@ export declare class Brands {
|
|
|
81
81
|
* website: "https://www.pinnacle.sh"
|
|
82
82
|
* })
|
|
83
83
|
*/
|
|
84
|
-
upsert(request
|
|
84
|
+
upsert(request: Pinnacle.UpsertBrandParams, requestOptions?: Brands.RequestOptions): core.HttpResponsePromise<Pinnacle.ExtendedBrand>;
|
|
85
85
|
private __upsert;
|
|
86
86
|
/**
|
|
87
87
|
* Retrieve detailed information for a specific brand in your account by ID.
|
|
@@ -173,6 +173,6 @@ export declare class Brands {
|
|
|
173
173
|
vet(brandId: number, request: Pinnacle.VetBrandParams, requestOptions?: Brands.RequestOptions): core.HttpResponsePromise<Pinnacle.VettingResults>;
|
|
174
174
|
private __vet;
|
|
175
175
|
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
176
|
-
"PINNACLE-API-KEY": string;
|
|
176
|
+
"PINNACLE-API-KEY": string | undefined;
|
|
177
177
|
}>;
|
|
178
178
|
}
|
|
@@ -16,7 +16,7 @@ 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
18
|
export class Brands {
|
|
19
|
-
constructor(_options) {
|
|
19
|
+
constructor(_options = {}) {
|
|
20
20
|
this._options = _options;
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
@@ -124,11 +124,11 @@ export class Brands {
|
|
|
124
124
|
* website: "https://www.pinnacle.sh"
|
|
125
125
|
* })
|
|
126
126
|
*/
|
|
127
|
-
upsert(request
|
|
127
|
+
upsert(request, requestOptions) {
|
|
128
128
|
return core.HttpResponsePromise.fromPromise(this.__upsert(request, requestOptions));
|
|
129
129
|
}
|
|
130
|
-
__upsert() {
|
|
131
|
-
return __awaiter(this,
|
|
130
|
+
__upsert(request, requestOptions) {
|
|
131
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
132
132
|
var _a, _b, _c;
|
|
133
133
|
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
134
134
|
const _response = yield core.fetcher({
|
|
@@ -199,15 +199,15 @@ export class Brands {
|
|
|
199
199
|
}
|
|
200
200
|
__get(id_1) {
|
|
201
201
|
return __awaiter(this, arguments, void 0, function* (id, request = {}, requestOptions) {
|
|
202
|
-
var _a, _b, _c
|
|
202
|
+
var _a, _b, _c;
|
|
203
203
|
const { hideEIN: hideEin } = request;
|
|
204
204
|
const _queryParams = {};
|
|
205
|
-
if (hideEin
|
|
206
|
-
_queryParams["hideEIN"] =
|
|
205
|
+
if (hideEin != null) {
|
|
206
|
+
_queryParams["hideEIN"] = hideEin.toString();
|
|
207
207
|
}
|
|
208
|
-
let _headers = mergeHeaders((
|
|
208
|
+
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
209
209
|
const _response = yield core.fetcher({
|
|
210
|
-
url: core.url.join((
|
|
210
|
+
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, `brands/${encodeURIComponent(id)}`),
|
|
211
211
|
method: "GET",
|
|
212
212
|
headers: _headers,
|
|
213
213
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
@@ -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
|
|
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. */
|
|
@@ -41,9 +41,9 @@ export interface UpsertBrandParams {
|
|
|
41
41
|
/** Legal name of the brand as registered. */
|
|
42
42
|
name?: string | null;
|
|
43
43
|
/** Industry the brand operates in. */
|
|
44
|
-
sector
|
|
44
|
+
sector: Pinnacle.CompanySectorEnum | null;
|
|
45
45
|
/** Legal structure of the brand. */
|
|
46
|
-
type
|
|
46
|
+
type: Pinnacle.CompanyTypeEnum | null;
|
|
47
47
|
/** Brand website URL. */
|
|
48
48
|
website?: string | null;
|
|
49
49
|
}
|
|
@@ -11,7 +11,7 @@ export declare namespace Campaigns {
|
|
|
11
11
|
environment?: core.Supplier<environments.PinnacleEnvironment | string>;
|
|
12
12
|
/** Specify a custom URL to connect the client to. */
|
|
13
13
|
baseUrl?: core.Supplier<string>;
|
|
14
|
-
apiKey
|
|
14
|
+
apiKey?: core.Supplier<string | undefined>;
|
|
15
15
|
/** Additional headers to include in requests. */
|
|
16
16
|
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
17
17
|
}
|
|
@@ -21,7 +21,7 @@ export declare class Campaigns {
|
|
|
21
21
|
protected _dlc: Dlc | undefined;
|
|
22
22
|
protected _tollFree: TollFree | undefined;
|
|
23
23
|
protected _rcs: Rcs | undefined;
|
|
24
|
-
constructor(_options
|
|
24
|
+
constructor(_options?: Campaigns.Options);
|
|
25
25
|
get dlc(): Dlc;
|
|
26
26
|
get tollFree(): TollFree;
|
|
27
27
|
get rcs(): Rcs;
|
|
@@ -5,7 +5,7 @@ import { Dlc } from "../resources/dlc/client/Client.mjs";
|
|
|
5
5
|
import { TollFree } from "../resources/tollFree/client/Client.mjs";
|
|
6
6
|
import { Rcs } from "../resources/rcs/client/Client.mjs";
|
|
7
7
|
export class Campaigns {
|
|
8
|
-
constructor(_options) {
|
|
8
|
+
constructor(_options = {}) {
|
|
9
9
|
this._options = _options;
|
|
10
10
|
}
|
|
11
11
|
get dlc() {
|
|
@@ -9,7 +9,7 @@ export declare namespace Dlc {
|
|
|
9
9
|
environment?: core.Supplier<environments.PinnacleEnvironment | string>;
|
|
10
10
|
/** Specify a custom URL to connect the client to. */
|
|
11
11
|
baseUrl?: core.Supplier<string>;
|
|
12
|
-
apiKey
|
|
12
|
+
apiKey?: core.Supplier<string | undefined>;
|
|
13
13
|
/** Additional headers to include in requests. */
|
|
14
14
|
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
15
15
|
}
|
|
@@ -28,7 +28,7 @@ export declare namespace Dlc {
|
|
|
28
28
|
}
|
|
29
29
|
export declare class Dlc {
|
|
30
30
|
protected readonly _options: Dlc.Options;
|
|
31
|
-
constructor(_options
|
|
31
|
+
constructor(_options?: Dlc.Options);
|
|
32
32
|
/**
|
|
33
33
|
* Generate campaign details based off existing campaign and the brand it's connected to.
|
|
34
34
|
*
|
|
@@ -153,6 +153,6 @@ export declare class Dlc {
|
|
|
153
153
|
validate(request: Pinnacle.ValidateCampaignParams, requestOptions?: Dlc.RequestOptions): core.HttpResponsePromise<Pinnacle.CampaignValidationResult>;
|
|
154
154
|
private __validate;
|
|
155
155
|
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
156
|
-
"PINNACLE-API-KEY": string;
|
|
156
|
+
"PINNACLE-API-KEY": string | undefined;
|
|
157
157
|
}>;
|
|
158
158
|
}
|
|
@@ -16,7 +16,7 @@ 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
18
|
export class Dlc {
|
|
19
|
-
constructor(_options) {
|
|
19
|
+
constructor(_options = {}) {
|
|
20
20
|
this._options = _options;
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
@@ -9,7 +9,7 @@ export declare namespace Rcs {
|
|
|
9
9
|
environment?: core.Supplier<environments.PinnacleEnvironment | string>;
|
|
10
10
|
/** Specify a custom URL to connect the client to. */
|
|
11
11
|
baseUrl?: core.Supplier<string>;
|
|
12
|
-
apiKey
|
|
12
|
+
apiKey?: core.Supplier<string | undefined>;
|
|
13
13
|
/** Additional headers to include in requests. */
|
|
14
14
|
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
15
15
|
}
|
|
@@ -28,7 +28,7 @@ export declare namespace Rcs {
|
|
|
28
28
|
}
|
|
29
29
|
export declare class Rcs {
|
|
30
30
|
protected readonly _options: Rcs.Options;
|
|
31
|
-
constructor(_options
|
|
31
|
+
constructor(_options?: Rcs.Options);
|
|
32
32
|
/**
|
|
33
33
|
* Generate campaign details based off existing campaign and the brand it's connected to.
|
|
34
34
|
*
|
|
@@ -156,6 +156,6 @@ export declare class Rcs {
|
|
|
156
156
|
validate(request: Pinnacle.ValidateCampaignParams, requestOptions?: Rcs.RequestOptions): core.HttpResponsePromise<Pinnacle.CampaignValidationResult>;
|
|
157
157
|
private __validate;
|
|
158
158
|
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
159
|
-
"PINNACLE-API-KEY": string;
|
|
159
|
+
"PINNACLE-API-KEY": string | undefined;
|
|
160
160
|
}>;
|
|
161
161
|
}
|
|
@@ -16,7 +16,7 @@ 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
18
|
export class Rcs {
|
|
19
|
-
constructor(_options) {
|
|
19
|
+
constructor(_options = {}) {
|
|
20
20
|
this._options = _options;
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
@@ -9,7 +9,7 @@ export declare namespace TollFree {
|
|
|
9
9
|
environment?: core.Supplier<environments.PinnacleEnvironment | string>;
|
|
10
10
|
/** Specify a custom URL to connect the client to. */
|
|
11
11
|
baseUrl?: core.Supplier<string>;
|
|
12
|
-
apiKey
|
|
12
|
+
apiKey?: core.Supplier<string | undefined>;
|
|
13
13
|
/** Additional headers to include in requests. */
|
|
14
14
|
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
15
15
|
}
|
|
@@ -28,7 +28,7 @@ export declare namespace TollFree {
|
|
|
28
28
|
}
|
|
29
29
|
export declare class TollFree {
|
|
30
30
|
protected readonly _options: TollFree.Options;
|
|
31
|
-
constructor(_options
|
|
31
|
+
constructor(_options?: TollFree.Options);
|
|
32
32
|
/**
|
|
33
33
|
* Generate campaign details based off existing campaign and the brand it's connected to.
|
|
34
34
|
*
|
|
@@ -131,6 +131,6 @@ export declare class TollFree {
|
|
|
131
131
|
validate(request: Pinnacle.ValidateCampaignParams, requestOptions?: TollFree.RequestOptions): core.HttpResponsePromise<Pinnacle.CampaignValidationResult>;
|
|
132
132
|
private __validate;
|
|
133
133
|
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
134
|
-
"PINNACLE-API-KEY": string;
|
|
134
|
+
"PINNACLE-API-KEY": string | undefined;
|
|
135
135
|
}>;
|
|
136
136
|
}
|
|
@@ -16,7 +16,7 @@ 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
18
|
export class TollFree {
|
|
19
|
-
constructor(_options) {
|
|
19
|
+
constructor(_options = {}) {
|
|
20
20
|
this._options = _options;
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
@@ -9,7 +9,7 @@ export declare namespace Contacts {
|
|
|
9
9
|
environment?: core.Supplier<environments.PinnacleEnvironment | string>;
|
|
10
10
|
/** Specify a custom URL to connect the client to. */
|
|
11
11
|
baseUrl?: core.Supplier<string>;
|
|
12
|
-
apiKey
|
|
12
|
+
apiKey?: core.Supplier<string | undefined>;
|
|
13
13
|
/** Additional headers to include in requests. */
|
|
14
14
|
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
15
15
|
}
|
|
@@ -28,7 +28,7 @@ export declare namespace Contacts {
|
|
|
28
28
|
}
|
|
29
29
|
export declare class Contacts {
|
|
30
30
|
protected readonly _options: Contacts.Options;
|
|
31
|
-
constructor(_options
|
|
31
|
+
constructor(_options?: Contacts.Options);
|
|
32
32
|
/**
|
|
33
33
|
* Retrieve contact information for a given number.
|
|
34
34
|
*
|
|
@@ -85,6 +85,6 @@ export declare class Contacts {
|
|
|
85
85
|
update(request: Pinnacle.UpdateContactParams, requestOptions?: Contacts.RequestOptions): core.HttpResponsePromise<Pinnacle.UpdatedContactId>;
|
|
86
86
|
private __update;
|
|
87
87
|
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
88
|
-
"PINNACLE-API-KEY": string;
|
|
88
|
+
"PINNACLE-API-KEY": string | undefined;
|
|
89
89
|
}>;
|
|
90
90
|
}
|
|
@@ -16,7 +16,7 @@ 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
18
|
export class Contacts {
|
|
19
|
-
constructor(_options) {
|
|
19
|
+
constructor(_options = {}) {
|
|
20
20
|
this._options = _options;
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
@@ -38,18 +38,18 @@ export class Contacts {
|
|
|
38
38
|
}
|
|
39
39
|
__get() {
|
|
40
40
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
41
|
-
var _a, _b, _c
|
|
41
|
+
var _a, _b, _c;
|
|
42
42
|
const { id, phoneNumber } = request;
|
|
43
43
|
const _queryParams = {};
|
|
44
|
-
if (id
|
|
45
|
-
_queryParams["id"] =
|
|
44
|
+
if (id != null) {
|
|
45
|
+
_queryParams["id"] = id.toString();
|
|
46
46
|
}
|
|
47
|
-
if (phoneNumber
|
|
47
|
+
if (phoneNumber != null) {
|
|
48
48
|
_queryParams["phoneNumber"] = phoneNumber;
|
|
49
49
|
}
|
|
50
|
-
let _headers = mergeHeaders((
|
|
50
|
+
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
51
51
|
const _response = yield core.fetcher({
|
|
52
|
-
url: core.url.join((
|
|
52
|
+
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, "contacts"),
|
|
53
53
|
method: "GET",
|
|
54
54
|
headers: _headers,
|
|
55
55
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
@@ -11,7 +11,7 @@ export interface ContactsGetRequest {
|
|
|
11
11
|
*
|
|
12
12
|
* Either this parameter or `phoneNumber` must be provided, but not both.
|
|
13
13
|
*/
|
|
14
|
-
id?: number
|
|
14
|
+
id?: number;
|
|
15
15
|
/** Phone number you want to look up contact information for, provided in URL-encoded E.164 format with %2B prefix instead of +. */
|
|
16
|
-
phoneNumber?: string
|
|
16
|
+
phoneNumber?: string;
|
|
17
17
|
}
|
|
@@ -9,7 +9,7 @@ export declare namespace Conversations {
|
|
|
9
9
|
environment?: core.Supplier<environments.PinnacleEnvironment | string>;
|
|
10
10
|
/** Specify a custom URL to connect the client to. */
|
|
11
11
|
baseUrl?: core.Supplier<string>;
|
|
12
|
-
apiKey
|
|
12
|
+
apiKey?: core.Supplier<string | undefined>;
|
|
13
13
|
/** Additional headers to include in requests. */
|
|
14
14
|
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
15
15
|
}
|
|
@@ -28,7 +28,7 @@ export declare namespace Conversations {
|
|
|
28
28
|
}
|
|
29
29
|
export declare class Conversations {
|
|
30
30
|
protected readonly _options: Conversations.Options;
|
|
31
|
-
constructor(_options
|
|
31
|
+
constructor(_options?: Conversations.Options);
|
|
32
32
|
/**
|
|
33
33
|
* Fetch a specific conversation using either its unique identifier or by matching sender and recipient details.
|
|
34
34
|
*
|
|
@@ -44,7 +44,7 @@ export declare class Conversations {
|
|
|
44
44
|
* id: 1
|
|
45
45
|
* })
|
|
46
46
|
*/
|
|
47
|
-
get(request: Pinnacle.GetConversationParams, requestOptions?: Conversations.RequestOptions): core.HttpResponsePromise<
|
|
47
|
+
get(request: Pinnacle.GetConversationParams, requestOptions?: Conversations.RequestOptions): core.HttpResponsePromise<Pinnacle.Conversation | null>;
|
|
48
48
|
private __get;
|
|
49
49
|
/**
|
|
50
50
|
* Retrieves conversations by page with optional filtering based off provided parameters.
|
|
@@ -88,6 +88,6 @@ export declare class Conversations {
|
|
|
88
88
|
update(request: Pinnacle.UpdateConversationParams, requestOptions?: Conversations.RequestOptions): core.HttpResponsePromise<Pinnacle.SuccessfulConversationUpdate>;
|
|
89
89
|
private __update;
|
|
90
90
|
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
91
|
-
"PINNACLE-API-KEY": string;
|
|
91
|
+
"PINNACLE-API-KEY": string | undefined;
|
|
92
92
|
}>;
|
|
93
93
|
}
|
|
@@ -16,7 +16,7 @@ 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
18
|
export class Conversations {
|
|
19
|
-
constructor(_options) {
|
|
19
|
+
constructor(_options = {}) {
|
|
20
20
|
this._options = _options;
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
@@ -54,10 +54,7 @@ export class Conversations {
|
|
|
54
54
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
55
55
|
});
|
|
56
56
|
if (_response.ok) {
|
|
57
|
-
return {
|
|
58
|
-
data: _response.body,
|
|
59
|
-
rawResponse: _response.rawResponse,
|
|
60
|
-
};
|
|
57
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
61
58
|
}
|
|
62
59
|
if (_response.error.reason === "status-code") {
|
|
63
60
|
switch (_response.error.statusCode) {
|
|
@@ -12,7 +12,7 @@ export declare namespace Messages {
|
|
|
12
12
|
environment?: core.Supplier<environments.PinnacleEnvironment | string>;
|
|
13
13
|
/** Specify a custom URL to connect the client to. */
|
|
14
14
|
baseUrl?: core.Supplier<string>;
|
|
15
|
-
apiKey
|
|
15
|
+
apiKey?: core.Supplier<string | undefined>;
|
|
16
16
|
/** Additional headers to include in requests. */
|
|
17
17
|
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
18
18
|
}
|
|
@@ -34,7 +34,7 @@ export declare class Messages {
|
|
|
34
34
|
protected _sms: Sms | undefined;
|
|
35
35
|
protected _mms: Mms | undefined;
|
|
36
36
|
protected _rcs: Rcs | undefined;
|
|
37
|
-
constructor(_options
|
|
37
|
+
constructor(_options?: Messages.Options);
|
|
38
38
|
get sms(): Sms;
|
|
39
39
|
get mms(): Mms;
|
|
40
40
|
get rcs(): Rcs;
|
|
@@ -79,6 +79,6 @@ export declare class Messages {
|
|
|
79
79
|
react(request: Pinnacle.ReactMessageParams, requestOptions?: Messages.RequestOptions): core.HttpResponsePromise<Pinnacle.ReactionResult>;
|
|
80
80
|
private __react;
|
|
81
81
|
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
82
|
-
"PINNACLE-API-KEY": string;
|
|
82
|
+
"PINNACLE-API-KEY": string | undefined;
|
|
83
83
|
}>;
|
|
84
84
|
}
|
|
@@ -19,7 +19,7 @@ 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
|
-
constructor(_options) {
|
|
22
|
+
constructor(_options = {}) {
|
|
23
23
|
this._options = _options;
|
|
24
24
|
}
|
|
25
25
|
get sms() {
|
|
@@ -9,7 +9,7 @@ export declare namespace Mms {
|
|
|
9
9
|
environment?: core.Supplier<environments.PinnacleEnvironment | string>;
|
|
10
10
|
/** Specify a custom URL to connect the client to. */
|
|
11
11
|
baseUrl?: core.Supplier<string>;
|
|
12
|
-
apiKey
|
|
12
|
+
apiKey?: core.Supplier<string | undefined>;
|
|
13
13
|
/** Additional headers to include in requests. */
|
|
14
14
|
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
15
15
|
}
|
|
@@ -28,7 +28,7 @@ export declare namespace Mms {
|
|
|
28
28
|
}
|
|
29
29
|
export declare class Mms {
|
|
30
30
|
protected readonly _options: Mms.Options;
|
|
31
|
-
constructor(_options
|
|
31
|
+
constructor(_options?: Mms.Options);
|
|
32
32
|
/**
|
|
33
33
|
* Send a MMS immediately or schedule it for future delivery.
|
|
34
34
|
*
|
|
@@ -75,6 +75,6 @@ export declare class Mms {
|
|
|
75
75
|
validate(request: Pinnacle.MmsContent, requestOptions?: Mms.RequestOptions): core.HttpResponsePromise<Pinnacle.MmsValidationResult>;
|
|
76
76
|
private __validate;
|
|
77
77
|
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
78
|
-
"PINNACLE-API-KEY": string;
|
|
78
|
+
"PINNACLE-API-KEY": string | undefined;
|
|
79
79
|
}>;
|
|
80
80
|
}
|
|
@@ -16,7 +16,7 @@ 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
18
|
export class Mms {
|
|
19
|
-
constructor(_options) {
|
|
19
|
+
constructor(_options = {}) {
|
|
20
20
|
this._options = _options;
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
@@ -9,7 +9,7 @@ export declare namespace Rcs {
|
|
|
9
9
|
environment?: core.Supplier<environments.PinnacleEnvironment | string>;
|
|
10
10
|
/** Specify a custom URL to connect the client to. */
|
|
11
11
|
baseUrl?: core.Supplier<string>;
|
|
12
|
-
apiKey
|
|
12
|
+
apiKey?: core.Supplier<string | undefined>;
|
|
13
13
|
/** Additional headers to include in requests. */
|
|
14
14
|
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
15
15
|
}
|
|
@@ -28,7 +28,7 @@ export declare namespace Rcs {
|
|
|
28
28
|
}
|
|
29
29
|
export declare class Rcs {
|
|
30
30
|
protected readonly _options: Rcs.Options;
|
|
31
|
-
constructor(_options
|
|
31
|
+
constructor(_options?: Rcs.Options);
|
|
32
32
|
/**
|
|
33
33
|
* Send a RCS message immediately or schedule it for future delivery. <br>
|
|
34
34
|
*
|
|
@@ -81,6 +81,6 @@ export declare class Rcs {
|
|
|
81
81
|
validate(request: Pinnacle.RcsValidateContent, requestOptions?: Rcs.RequestOptions): core.HttpResponsePromise<Pinnacle.RcsValidationResult>;
|
|
82
82
|
private __validate;
|
|
83
83
|
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
84
|
-
"PINNACLE-API-KEY": string;
|
|
84
|
+
"PINNACLE-API-KEY": string | undefined;
|
|
85
85
|
}>;
|
|
86
86
|
}
|
|
@@ -16,7 +16,7 @@ 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
18
|
export class Rcs {
|
|
19
|
-
constructor(_options) {
|
|
19
|
+
constructor(_options = {}) {
|
|
20
20
|
this._options = _options;
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
@@ -9,7 +9,7 @@ export declare namespace Sms {
|
|
|
9
9
|
environment?: core.Supplier<environments.PinnacleEnvironment | string>;
|
|
10
10
|
/** Specify a custom URL to connect the client to. */
|
|
11
11
|
baseUrl?: core.Supplier<string>;
|
|
12
|
-
apiKey
|
|
12
|
+
apiKey?: core.Supplier<string | undefined>;
|
|
13
13
|
/** Additional headers to include in requests. */
|
|
14
14
|
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
15
15
|
}
|
|
@@ -28,7 +28,7 @@ export declare namespace Sms {
|
|
|
28
28
|
}
|
|
29
29
|
export declare class Sms {
|
|
30
30
|
protected readonly _options: Sms.Options;
|
|
31
|
-
constructor(_options
|
|
31
|
+
constructor(_options?: Sms.Options);
|
|
32
32
|
/**
|
|
33
33
|
* Send a SMS message immediately or schedule it for future delivery.
|
|
34
34
|
*
|
|
@@ -69,6 +69,6 @@ export declare class Sms {
|
|
|
69
69
|
validate(request: Pinnacle.SmsContent, requestOptions?: Sms.RequestOptions): core.HttpResponsePromise<Pinnacle.SmsValidationResult>;
|
|
70
70
|
private __validate;
|
|
71
71
|
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
72
|
-
"PINNACLE-API-KEY": string;
|
|
72
|
+
"PINNACLE-API-KEY": string | undefined;
|
|
73
73
|
}>;
|
|
74
74
|
}
|
|
@@ -16,7 +16,7 @@ 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
18
|
export class Sms {
|
|
19
|
-
constructor(_options) {
|
|
19
|
+
constructor(_options = {}) {
|
|
20
20
|
this._options = _options;
|
|
21
21
|
}
|
|
22
22
|
/**
|