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
package/dist/cjs/Client.d.ts
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/cjs/Client.js
CHANGED
|
@@ -50,12 +50,12 @@ const Client_js_8 = require("./api/resources/campaigns/client/Client.js");
|
|
|
50
50
|
const Client_js_9 = require("./api/resources/status/client/Client.js");
|
|
51
51
|
const Client_js_10 = require("./api/resources/tools/client/Client.js");
|
|
52
52
|
class PinnacleClient {
|
|
53
|
-
constructor(_options) {
|
|
53
|
+
constructor(_options = {}) {
|
|
54
54
|
this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({
|
|
55
55
|
"X-Fern-Language": "JavaScript",
|
|
56
56
|
"X-Fern-SDK-Name": "rcs-js",
|
|
57
|
-
"X-Fern-SDK-Version": "2.0.0-rc.
|
|
58
|
-
"User-Agent": "rcs-js/2.0.0-rc.
|
|
57
|
+
"X-Fern-SDK-Version": "2.0.0-rc.15",
|
|
58
|
+
"User-Agent": "rcs-js/2.0.0-rc.15",
|
|
59
59
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
60
60
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
61
61
|
}, _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
|
}
|
|
@@ -52,7 +52,7 @@ const Pinnacle = __importStar(require("../../../index.js"));
|
|
|
52
52
|
const headers_js_1 = require("../../../../core/headers.js");
|
|
53
53
|
const errors = __importStar(require("../../../../errors/index.js"));
|
|
54
54
|
class Brands {
|
|
55
|
-
constructor(_options) {
|
|
55
|
+
constructor(_options = {}) {
|
|
56
56
|
this._options = _options;
|
|
57
57
|
}
|
|
58
58
|
/**
|
|
@@ -160,11 +160,11 @@ class Brands {
|
|
|
160
160
|
* website: "https://www.pinnacle.sh"
|
|
161
161
|
* })
|
|
162
162
|
*/
|
|
163
|
-
upsert(request
|
|
163
|
+
upsert(request, requestOptions) {
|
|
164
164
|
return core.HttpResponsePromise.fromPromise(this.__upsert(request, requestOptions));
|
|
165
165
|
}
|
|
166
|
-
__upsert() {
|
|
167
|
-
return __awaiter(this,
|
|
166
|
+
__upsert(request, requestOptions) {
|
|
167
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
168
168
|
var _a, _b, _c;
|
|
169
169
|
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);
|
|
170
170
|
const _response = yield core.fetcher({
|
|
@@ -235,15 +235,15 @@ class Brands {
|
|
|
235
235
|
}
|
|
236
236
|
__get(id_1) {
|
|
237
237
|
return __awaiter(this, arguments, void 0, function* (id, request = {}, requestOptions) {
|
|
238
|
-
var _a, _b, _c
|
|
238
|
+
var _a, _b, _c;
|
|
239
239
|
const { hideEIN: hideEin } = request;
|
|
240
240
|
const _queryParams = {};
|
|
241
|
-
if (hideEin
|
|
242
|
-
_queryParams["hideEIN"] =
|
|
241
|
+
if (hideEin != null) {
|
|
242
|
+
_queryParams["hideEIN"] = hideEin.toString();
|
|
243
243
|
}
|
|
244
|
-
let _headers = (0, headers_js_1.mergeHeaders)((
|
|
244
|
+
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);
|
|
245
245
|
const _response = yield core.fetcher({
|
|
246
|
-
url: core.url.join((
|
|
246
|
+
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)}`),
|
|
247
247
|
method: "GET",
|
|
248
248
|
headers: _headers,
|
|
249
249
|
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;
|
|
@@ -8,7 +8,7 @@ const Client_js_1 = require("../resources/dlc/client/Client.js");
|
|
|
8
8
|
const Client_js_2 = require("../resources/tollFree/client/Client.js");
|
|
9
9
|
const Client_js_3 = require("../resources/rcs/client/Client.js");
|
|
10
10
|
class Campaigns {
|
|
11
|
-
constructor(_options) {
|
|
11
|
+
constructor(_options = {}) {
|
|
12
12
|
this._options = _options;
|
|
13
13
|
}
|
|
14
14
|
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
|
}
|
|
@@ -52,7 +52,7 @@ const Pinnacle = __importStar(require("../../../../../index.js"));
|
|
|
52
52
|
const headers_js_1 = require("../../../../../../core/headers.js");
|
|
53
53
|
const errors = __importStar(require("../../../../../../errors/index.js"));
|
|
54
54
|
class Dlc {
|
|
55
|
-
constructor(_options) {
|
|
55
|
+
constructor(_options = {}) {
|
|
56
56
|
this._options = _options;
|
|
57
57
|
}
|
|
58
58
|
/**
|
|
@@ -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
|
}
|
|
@@ -52,7 +52,7 @@ const Pinnacle = __importStar(require("../../../../../index.js"));
|
|
|
52
52
|
const headers_js_1 = require("../../../../../../core/headers.js");
|
|
53
53
|
const errors = __importStar(require("../../../../../../errors/index.js"));
|
|
54
54
|
class Rcs {
|
|
55
|
-
constructor(_options) {
|
|
55
|
+
constructor(_options = {}) {
|
|
56
56
|
this._options = _options;
|
|
57
57
|
}
|
|
58
58
|
/**
|
|
@@ -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
|
}
|
|
@@ -52,7 +52,7 @@ const Pinnacle = __importStar(require("../../../../../index.js"));
|
|
|
52
52
|
const headers_js_1 = require("../../../../../../core/headers.js");
|
|
53
53
|
const errors = __importStar(require("../../../../../../errors/index.js"));
|
|
54
54
|
class TollFree {
|
|
55
|
-
constructor(_options) {
|
|
55
|
+
constructor(_options = {}) {
|
|
56
56
|
this._options = _options;
|
|
57
57
|
}
|
|
58
58
|
/**
|
|
@@ -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
|
}
|
|
@@ -52,7 +52,7 @@ const Pinnacle = __importStar(require("../../../index.js"));
|
|
|
52
52
|
const headers_js_1 = require("../../../../core/headers.js");
|
|
53
53
|
const errors = __importStar(require("../../../../errors/index.js"));
|
|
54
54
|
class Contacts {
|
|
55
|
-
constructor(_options) {
|
|
55
|
+
constructor(_options = {}) {
|
|
56
56
|
this._options = _options;
|
|
57
57
|
}
|
|
58
58
|
/**
|
|
@@ -74,18 +74,18 @@ class Contacts {
|
|
|
74
74
|
}
|
|
75
75
|
__get() {
|
|
76
76
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
77
|
-
var _a, _b, _c
|
|
77
|
+
var _a, _b, _c;
|
|
78
78
|
const { id, phoneNumber } = request;
|
|
79
79
|
const _queryParams = {};
|
|
80
|
-
if (id
|
|
81
|
-
_queryParams["id"] =
|
|
80
|
+
if (id != null) {
|
|
81
|
+
_queryParams["id"] = id.toString();
|
|
82
82
|
}
|
|
83
|
-
if (phoneNumber
|
|
83
|
+
if (phoneNumber != null) {
|
|
84
84
|
_queryParams["phoneNumber"] = phoneNumber;
|
|
85
85
|
}
|
|
86
|
-
let _headers = (0, headers_js_1.mergeHeaders)((
|
|
86
|
+
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);
|
|
87
87
|
const _response = yield core.fetcher({
|
|
88
|
-
url: core.url.join((
|
|
88
|
+
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"),
|
|
89
89
|
method: "GET",
|
|
90
90
|
headers: _headers,
|
|
91
91
|
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
|
}
|
|
@@ -52,7 +52,7 @@ const Pinnacle = __importStar(require("../../../index.js"));
|
|
|
52
52
|
const headers_js_1 = require("../../../../core/headers.js");
|
|
53
53
|
const errors = __importStar(require("../../../../errors/index.js"));
|
|
54
54
|
class Conversations {
|
|
55
|
-
constructor(_options) {
|
|
55
|
+
constructor(_options = {}) {
|
|
56
56
|
this._options = _options;
|
|
57
57
|
}
|
|
58
58
|
/**
|
|
@@ -90,10 +90,7 @@ class Conversations {
|
|
|
90
90
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
91
91
|
});
|
|
92
92
|
if (_response.ok) {
|
|
93
|
-
return {
|
|
94
|
-
data: _response.body,
|
|
95
|
-
rawResponse: _response.rawResponse,
|
|
96
|
-
};
|
|
93
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
97
94
|
}
|
|
98
95
|
if (_response.error.reason === "status-code") {
|
|
99
96
|
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
|
}
|
|
@@ -55,7 +55,7 @@ const Client_js_1 = require("../resources/sms/client/Client.js");
|
|
|
55
55
|
const Client_js_2 = require("../resources/mms/client/Client.js");
|
|
56
56
|
const Client_js_3 = require("../resources/rcs/client/Client.js");
|
|
57
57
|
class Messages {
|
|
58
|
-
constructor(_options) {
|
|
58
|
+
constructor(_options = {}) {
|
|
59
59
|
this._options = _options;
|
|
60
60
|
}
|
|
61
61
|
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
|
}
|
|
@@ -52,7 +52,7 @@ const Pinnacle = __importStar(require("../../../../../index.js"));
|
|
|
52
52
|
const headers_js_1 = require("../../../../../../core/headers.js");
|
|
53
53
|
const errors = __importStar(require("../../../../../../errors/index.js"));
|
|
54
54
|
class Mms {
|
|
55
|
-
constructor(_options) {
|
|
55
|
+
constructor(_options = {}) {
|
|
56
56
|
this._options = _options;
|
|
57
57
|
}
|
|
58
58
|
/**
|
|
@@ -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
|
}
|
|
@@ -52,7 +52,7 @@ const Pinnacle = __importStar(require("../../../../../index.js"));
|
|
|
52
52
|
const headers_js_1 = require("../../../../../../core/headers.js");
|
|
53
53
|
const errors = __importStar(require("../../../../../../errors/index.js"));
|
|
54
54
|
class Rcs {
|
|
55
|
-
constructor(_options) {
|
|
55
|
+
constructor(_options = {}) {
|
|
56
56
|
this._options = _options;
|
|
57
57
|
}
|
|
58
58
|
/**
|
|
@@ -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
|
}
|
|
@@ -52,7 +52,7 @@ const Pinnacle = __importStar(require("../../../../../index.js"));
|
|
|
52
52
|
const headers_js_1 = require("../../../../../../core/headers.js");
|
|
53
53
|
const errors = __importStar(require("../../../../../../errors/index.js"));
|
|
54
54
|
class Sms {
|
|
55
|
-
constructor(_options) {
|
|
55
|
+
constructor(_options = {}) {
|
|
56
56
|
this._options = _options;
|
|
57
57
|
}
|
|
58
58
|
/**
|
|
@@ -11,7 +11,7 @@ export declare namespace PhoneNumbers {
|
|
|
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
|
}
|
|
@@ -32,7 +32,7 @@ export declare class PhoneNumbers {
|
|
|
32
32
|
protected readonly _options: PhoneNumbers.Options;
|
|
33
33
|
protected _webhook: Webhook | undefined;
|
|
34
34
|
protected _campaign: Campaign | undefined;
|
|
35
|
-
constructor(_options
|
|
35
|
+
constructor(_options?: PhoneNumbers.Options);
|
|
36
36
|
get webhook(): Webhook;
|
|
37
37
|
get campaign(): Campaign;
|
|
38
38
|
/**
|
|
@@ -112,6 +112,6 @@ export declare class PhoneNumbers {
|
|
|
112
112
|
get(request: Pinnacle.RetrievePhoneNumberDetailsParams, requestOptions?: PhoneNumbers.RequestOptions): core.HttpResponsePromise<Pinnacle.PhoneNumbersGetResponse>;
|
|
113
113
|
private __get;
|
|
114
114
|
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
115
|
-
"PINNACLE-API-KEY": string;
|
|
115
|
+
"PINNACLE-API-KEY": string | undefined;
|
|
116
116
|
}>;
|
|
117
117
|
}
|
|
@@ -54,7 +54,7 @@ const errors = __importStar(require("../../../../errors/index.js"));
|
|
|
54
54
|
const Client_js_1 = require("../resources/webhook/client/Client.js");
|
|
55
55
|
const Client_js_2 = require("../resources/campaign/client/Client.js");
|
|
56
56
|
class PhoneNumbers {
|
|
57
|
-
constructor(_options) {
|
|
57
|
+
constructor(_options = {}) {
|
|
58
58
|
this._options = _options;
|
|
59
59
|
}
|
|
60
60
|
get webhook() {
|