twilio 5.1.0 → 5.2.0
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/lib/base/BaseTwilio.js +2 -1
- package/lib/rest/Marketplace.d.ts +4 -0
- package/lib/rest/Marketplace.js +8 -0
- package/lib/rest/MarketplaceBase.d.ts +13 -0
- package/lib/rest/MarketplaceBase.js +31 -0
- package/lib/rest/Twilio.d.ts +5 -0
- package/lib/rest/Twilio.js +6 -0
- package/lib/rest/api/v2010/account/call.d.ts +1 -1
- package/lib/rest/api/v2010/account/message.d.ts +2 -2
- package/lib/rest/api/v2010/account/recording.d.ts +1 -1
- package/lib/rest/content/v2/content.d.ts +54 -0
- package/lib/rest/content/v2/content.js +18 -0
- package/lib/rest/content/v2/contentAndApprovals.d.ts +54 -0
- package/lib/rest/content/v2/contentAndApprovals.js +18 -0
- package/lib/rest/events/v1/eventType.d.ts +12 -0
- package/lib/rest/events/v1/eventType.js +4 -0
- package/lib/rest/marketplace/V1.d.ts +25 -0
- package/lib/rest/marketplace/V1.js +51 -0
- package/lib/rest/marketplace/v1/availableAddOn/availableAddOnExtension.d.ts +219 -0
- package/lib/rest/marketplace/v1/availableAddOn/availableAddOnExtension.js +187 -0
- package/lib/rest/marketplace/v1/availableAddOn.d.ts +231 -0
- package/lib/rest/marketplace/v1/availableAddOn.js +196 -0
- package/lib/rest/marketplace/v1/installedAddOn/installedAddOnExtension.d.ts +251 -0
- package/lib/rest/marketplace/v1/installedAddOn/installedAddOnExtension.js +214 -0
- package/lib/rest/marketplace/v1/installedAddOn/installedAddOnUsage.d.ts +84 -0
- package/lib/rest/marketplace/v1/installedAddOn/installedAddOnUsage.js +86 -0
- package/lib/rest/marketplace/v1/installedAddOn.d.ts +340 -0
- package/lib/rest/marketplace/v1/installedAddOn.js +294 -0
- package/lib/rest/marketplace/v1/moduleDataManagement.d.ts +147 -0
- package/lib/rest/marketplace/v1/moduleDataManagement.js +153 -0
- package/lib/rest/messaging/v1/tollfreeVerification.d.ts +13 -1
- package/lib/rest/messaging/v1/tollfreeVerification.js +4 -0
- package/lib/rest/numbers/V1.d.ts +5 -0
- package/lib/rest/numbers/V1.js +8 -0
- package/lib/rest/numbers/v1/portingPortIn.d.ts +3 -0
- package/lib/rest/numbers/v1/portingPortIn.js +2 -0
- package/lib/rest/numbers/v1/portingPortInPhoneNumber.d.ts +24 -6
- package/lib/rest/numbers/v1/portingPortInPhoneNumber.js +9 -3
- package/lib/rest/numbers/v1/portingPortability.d.ts +0 -12
- package/lib/rest/numbers/v1/portingPortability.js +0 -4
- package/lib/rest/numbers/v1/signingRequestConfiguration.d.ts +100 -0
- package/lib/rest/numbers/v1/signingRequestConfiguration.js +89 -0
- package/lib/rest/trusthub/v1/complianceTollfreeInquiries.d.ts +2 -0
- package/lib/rest/trusthub/v1/complianceTollfreeInquiries.js +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,294 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* This code was generated by
|
|
4
|
+
* ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
|
|
5
|
+
* | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
|
|
6
|
+
* | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
|
|
7
|
+
*
|
|
8
|
+
* Twilio - Marketplace
|
|
9
|
+
* This is the public Twilio REST API.
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator.
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
16
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
17
|
+
};
|
|
18
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
+
exports.InstalledAddOnPage = exports.InstalledAddOnListInstance = exports.InstalledAddOnInstance = exports.InstalledAddOnContextImpl = void 0;
|
|
20
|
+
const util_1 = require("util");
|
|
21
|
+
const Page_1 = __importDefault(require("../../../base/Page"));
|
|
22
|
+
const deserialize = require("../../../base/deserialize");
|
|
23
|
+
const serialize = require("../../../base/serialize");
|
|
24
|
+
const utility_1 = require("../../../base/utility");
|
|
25
|
+
const installedAddOnExtension_1 = require("./installedAddOn/installedAddOnExtension");
|
|
26
|
+
const installedAddOnUsage_1 = require("./installedAddOn/installedAddOnUsage");
|
|
27
|
+
class InstalledAddOnContextImpl {
|
|
28
|
+
constructor(_version, sid) {
|
|
29
|
+
this._version = _version;
|
|
30
|
+
if (!(0, utility_1.isValidPathParam)(sid)) {
|
|
31
|
+
throw new Error("Parameter 'sid' is not valid.");
|
|
32
|
+
}
|
|
33
|
+
this._solution = { sid };
|
|
34
|
+
this._uri = `/InstalledAddOns/${sid}`;
|
|
35
|
+
}
|
|
36
|
+
get extensions() {
|
|
37
|
+
this._extensions =
|
|
38
|
+
this._extensions ||
|
|
39
|
+
(0, installedAddOnExtension_1.InstalledAddOnExtensionListInstance)(this._version, this._solution.sid);
|
|
40
|
+
return this._extensions;
|
|
41
|
+
}
|
|
42
|
+
get usage() {
|
|
43
|
+
this._usage =
|
|
44
|
+
this._usage ||
|
|
45
|
+
(0, installedAddOnUsage_1.InstalledAddOnUsageListInstance)(this._version, this._solution.sid);
|
|
46
|
+
return this._usage;
|
|
47
|
+
}
|
|
48
|
+
remove(callback) {
|
|
49
|
+
const instance = this;
|
|
50
|
+
let operationVersion = instance._version, operationPromise = operationVersion.remove({
|
|
51
|
+
uri: instance._uri,
|
|
52
|
+
method: "delete",
|
|
53
|
+
});
|
|
54
|
+
operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
|
|
55
|
+
return operationPromise;
|
|
56
|
+
}
|
|
57
|
+
fetch(callback) {
|
|
58
|
+
const instance = this;
|
|
59
|
+
let operationVersion = instance._version, operationPromise = operationVersion.fetch({
|
|
60
|
+
uri: instance._uri,
|
|
61
|
+
method: "get",
|
|
62
|
+
});
|
|
63
|
+
operationPromise = operationPromise.then((payload) => new InstalledAddOnInstance(operationVersion, payload, instance._solution.sid));
|
|
64
|
+
operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
|
|
65
|
+
return operationPromise;
|
|
66
|
+
}
|
|
67
|
+
update(params, callback) {
|
|
68
|
+
if (params instanceof Function) {
|
|
69
|
+
callback = params;
|
|
70
|
+
params = {};
|
|
71
|
+
}
|
|
72
|
+
else {
|
|
73
|
+
params = params || {};
|
|
74
|
+
}
|
|
75
|
+
let data = {};
|
|
76
|
+
if (params["configuration"] !== undefined)
|
|
77
|
+
data["Configuration"] = serialize.object(params["configuration"]);
|
|
78
|
+
if (params["uniqueName"] !== undefined)
|
|
79
|
+
data["UniqueName"] = params["uniqueName"];
|
|
80
|
+
const headers = {};
|
|
81
|
+
headers["Content-Type"] = "application/x-www-form-urlencoded";
|
|
82
|
+
const instance = this;
|
|
83
|
+
let operationVersion = instance._version, operationPromise = operationVersion.update({
|
|
84
|
+
uri: instance._uri,
|
|
85
|
+
method: "post",
|
|
86
|
+
data,
|
|
87
|
+
headers,
|
|
88
|
+
});
|
|
89
|
+
operationPromise = operationPromise.then((payload) => new InstalledAddOnInstance(operationVersion, payload, instance._solution.sid));
|
|
90
|
+
operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
|
|
91
|
+
return operationPromise;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Provide a user-friendly representation
|
|
95
|
+
*
|
|
96
|
+
* @returns Object
|
|
97
|
+
*/
|
|
98
|
+
toJSON() {
|
|
99
|
+
return this._solution;
|
|
100
|
+
}
|
|
101
|
+
[util_1.inspect.custom](_depth, options) {
|
|
102
|
+
return (0, util_1.inspect)(this.toJSON(), options);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
exports.InstalledAddOnContextImpl = InstalledAddOnContextImpl;
|
|
106
|
+
class InstalledAddOnInstance {
|
|
107
|
+
constructor(_version, payload, sid) {
|
|
108
|
+
this._version = _version;
|
|
109
|
+
this.sid = payload.sid;
|
|
110
|
+
this.accountSid = payload.account_sid;
|
|
111
|
+
this.friendlyName = payload.friendly_name;
|
|
112
|
+
this.description = payload.description;
|
|
113
|
+
this.configuration = payload.configuration;
|
|
114
|
+
this.uniqueName = payload.unique_name;
|
|
115
|
+
this.dateCreated = deserialize.iso8601DateTime(payload.date_created);
|
|
116
|
+
this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated);
|
|
117
|
+
this.url = payload.url;
|
|
118
|
+
this.links = payload.links;
|
|
119
|
+
this._solution = { sid: sid || this.sid };
|
|
120
|
+
}
|
|
121
|
+
get _proxy() {
|
|
122
|
+
this._context =
|
|
123
|
+
this._context ||
|
|
124
|
+
new InstalledAddOnContextImpl(this._version, this._solution.sid);
|
|
125
|
+
return this._context;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Remove a InstalledAddOnInstance
|
|
129
|
+
*
|
|
130
|
+
* @param callback - Callback to handle processed record
|
|
131
|
+
*
|
|
132
|
+
* @returns Resolves to processed boolean
|
|
133
|
+
*/
|
|
134
|
+
remove(callback) {
|
|
135
|
+
return this._proxy.remove(callback);
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Fetch a InstalledAddOnInstance
|
|
139
|
+
*
|
|
140
|
+
* @param callback - Callback to handle processed record
|
|
141
|
+
*
|
|
142
|
+
* @returns Resolves to processed InstalledAddOnInstance
|
|
143
|
+
*/
|
|
144
|
+
fetch(callback) {
|
|
145
|
+
return this._proxy.fetch(callback);
|
|
146
|
+
}
|
|
147
|
+
update(params, callback) {
|
|
148
|
+
return this._proxy.update(params, callback);
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Access the extensions.
|
|
152
|
+
*/
|
|
153
|
+
extensions() {
|
|
154
|
+
return this._proxy.extensions;
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Access the usage.
|
|
158
|
+
*/
|
|
159
|
+
usage() {
|
|
160
|
+
return this._proxy.usage;
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Provide a user-friendly representation
|
|
164
|
+
*
|
|
165
|
+
* @returns Object
|
|
166
|
+
*/
|
|
167
|
+
toJSON() {
|
|
168
|
+
return {
|
|
169
|
+
sid: this.sid,
|
|
170
|
+
accountSid: this.accountSid,
|
|
171
|
+
friendlyName: this.friendlyName,
|
|
172
|
+
description: this.description,
|
|
173
|
+
configuration: this.configuration,
|
|
174
|
+
uniqueName: this.uniqueName,
|
|
175
|
+
dateCreated: this.dateCreated,
|
|
176
|
+
dateUpdated: this.dateUpdated,
|
|
177
|
+
url: this.url,
|
|
178
|
+
links: this.links,
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
[util_1.inspect.custom](_depth, options) {
|
|
182
|
+
return (0, util_1.inspect)(this.toJSON(), options);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
exports.InstalledAddOnInstance = InstalledAddOnInstance;
|
|
186
|
+
function InstalledAddOnListInstance(version) {
|
|
187
|
+
const instance = ((sid) => instance.get(sid));
|
|
188
|
+
instance.get = function get(sid) {
|
|
189
|
+
return new InstalledAddOnContextImpl(version, sid);
|
|
190
|
+
};
|
|
191
|
+
instance._version = version;
|
|
192
|
+
instance._solution = {};
|
|
193
|
+
instance._uri = `/InstalledAddOns`;
|
|
194
|
+
instance.create = function create(params, callback) {
|
|
195
|
+
if (params === null || params === undefined) {
|
|
196
|
+
throw new Error('Required parameter "params" missing.');
|
|
197
|
+
}
|
|
198
|
+
if (params["availableAddOnSid"] === null ||
|
|
199
|
+
params["availableAddOnSid"] === undefined) {
|
|
200
|
+
throw new Error("Required parameter \"params['availableAddOnSid']\" missing.");
|
|
201
|
+
}
|
|
202
|
+
if (params["acceptTermsOfService"] === null ||
|
|
203
|
+
params["acceptTermsOfService"] === undefined) {
|
|
204
|
+
throw new Error("Required parameter \"params['acceptTermsOfService']\" missing.");
|
|
205
|
+
}
|
|
206
|
+
let data = {};
|
|
207
|
+
data["AvailableAddOnSid"] = params["availableAddOnSid"];
|
|
208
|
+
data["AcceptTermsOfService"] = serialize.bool(params["acceptTermsOfService"]);
|
|
209
|
+
if (params["configuration"] !== undefined)
|
|
210
|
+
data["Configuration"] = serialize.object(params["configuration"]);
|
|
211
|
+
if (params["uniqueName"] !== undefined)
|
|
212
|
+
data["UniqueName"] = params["uniqueName"];
|
|
213
|
+
const headers = {};
|
|
214
|
+
headers["Content-Type"] = "application/x-www-form-urlencoded";
|
|
215
|
+
let operationVersion = version, operationPromise = operationVersion.create({
|
|
216
|
+
uri: instance._uri,
|
|
217
|
+
method: "post",
|
|
218
|
+
data,
|
|
219
|
+
headers,
|
|
220
|
+
});
|
|
221
|
+
operationPromise = operationPromise.then((payload) => new InstalledAddOnInstance(operationVersion, payload));
|
|
222
|
+
operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
|
|
223
|
+
return operationPromise;
|
|
224
|
+
};
|
|
225
|
+
instance.page = function page(params, callback) {
|
|
226
|
+
if (params instanceof Function) {
|
|
227
|
+
callback = params;
|
|
228
|
+
params = {};
|
|
229
|
+
}
|
|
230
|
+
else {
|
|
231
|
+
params = params || {};
|
|
232
|
+
}
|
|
233
|
+
let data = {};
|
|
234
|
+
if (params["pageSize"] !== undefined)
|
|
235
|
+
data["PageSize"] = params["pageSize"];
|
|
236
|
+
if (params.pageNumber !== undefined)
|
|
237
|
+
data["Page"] = params.pageNumber;
|
|
238
|
+
if (params.pageToken !== undefined)
|
|
239
|
+
data["PageToken"] = params.pageToken;
|
|
240
|
+
const headers = {};
|
|
241
|
+
let operationVersion = version, operationPromise = operationVersion.page({
|
|
242
|
+
uri: instance._uri,
|
|
243
|
+
method: "get",
|
|
244
|
+
params: data,
|
|
245
|
+
headers,
|
|
246
|
+
});
|
|
247
|
+
operationPromise = operationPromise.then((payload) => new InstalledAddOnPage(operationVersion, payload, instance._solution));
|
|
248
|
+
operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
|
|
249
|
+
return operationPromise;
|
|
250
|
+
};
|
|
251
|
+
instance.each = instance._version.each;
|
|
252
|
+
instance.list = instance._version.list;
|
|
253
|
+
instance.getPage = function getPage(targetUrl, callback) {
|
|
254
|
+
const operationPromise = instance._version._domain.twilio.request({
|
|
255
|
+
method: "get",
|
|
256
|
+
uri: targetUrl,
|
|
257
|
+
});
|
|
258
|
+
let pagePromise = operationPromise.then((payload) => new InstalledAddOnPage(instance._version, payload, instance._solution));
|
|
259
|
+
pagePromise = instance._version.setPromiseCallback(pagePromise, callback);
|
|
260
|
+
return pagePromise;
|
|
261
|
+
};
|
|
262
|
+
instance.toJSON = function toJSON() {
|
|
263
|
+
return instance._solution;
|
|
264
|
+
};
|
|
265
|
+
instance[util_1.inspect.custom] = function inspectImpl(_depth, options) {
|
|
266
|
+
return (0, util_1.inspect)(instance.toJSON(), options);
|
|
267
|
+
};
|
|
268
|
+
return instance;
|
|
269
|
+
}
|
|
270
|
+
exports.InstalledAddOnListInstance = InstalledAddOnListInstance;
|
|
271
|
+
class InstalledAddOnPage extends Page_1.default {
|
|
272
|
+
/**
|
|
273
|
+
* Initialize the InstalledAddOnPage
|
|
274
|
+
*
|
|
275
|
+
* @param version - Version of the resource
|
|
276
|
+
* @param response - Response from the API
|
|
277
|
+
* @param solution - Path solution
|
|
278
|
+
*/
|
|
279
|
+
constructor(version, response, solution) {
|
|
280
|
+
super(version, response, solution);
|
|
281
|
+
}
|
|
282
|
+
/**
|
|
283
|
+
* Build an instance of InstalledAddOnInstance
|
|
284
|
+
*
|
|
285
|
+
* @param payload - Payload response from the API
|
|
286
|
+
*/
|
|
287
|
+
getInstance(payload) {
|
|
288
|
+
return new InstalledAddOnInstance(this._version, payload);
|
|
289
|
+
}
|
|
290
|
+
[util_1.inspect.custom](depth, options) {
|
|
291
|
+
return (0, util_1.inspect)(this.toJSON(), options);
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
exports.InstalledAddOnPage = InstalledAddOnPage;
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { inspect, InspectOptions } from "util";
|
|
3
|
+
import V1 from "../V1";
|
|
4
|
+
/**
|
|
5
|
+
* Options to pass to update a ModuleDataManagementInstance
|
|
6
|
+
*/
|
|
7
|
+
export interface ModuleDataManagementContextUpdateOptions {
|
|
8
|
+
/** */
|
|
9
|
+
moduleInfo?: string;
|
|
10
|
+
/** */
|
|
11
|
+
description?: string;
|
|
12
|
+
/** */
|
|
13
|
+
documentation?: string;
|
|
14
|
+
/** */
|
|
15
|
+
policies?: string;
|
|
16
|
+
/** */
|
|
17
|
+
support?: string;
|
|
18
|
+
}
|
|
19
|
+
export interface ModuleDataManagementContext {
|
|
20
|
+
/**
|
|
21
|
+
* Fetch a ModuleDataManagementInstance
|
|
22
|
+
*
|
|
23
|
+
* @param callback - Callback to handle processed record
|
|
24
|
+
*
|
|
25
|
+
* @returns Resolves to processed ModuleDataManagementInstance
|
|
26
|
+
*/
|
|
27
|
+
fetch(callback?: (error: Error | null, item?: ModuleDataManagementInstance) => any): Promise<ModuleDataManagementInstance>;
|
|
28
|
+
/**
|
|
29
|
+
* Update a ModuleDataManagementInstance
|
|
30
|
+
*
|
|
31
|
+
* @param callback - Callback to handle processed record
|
|
32
|
+
*
|
|
33
|
+
* @returns Resolves to processed ModuleDataManagementInstance
|
|
34
|
+
*/
|
|
35
|
+
update(callback?: (error: Error | null, item?: ModuleDataManagementInstance) => any): Promise<ModuleDataManagementInstance>;
|
|
36
|
+
/**
|
|
37
|
+
* Update a ModuleDataManagementInstance
|
|
38
|
+
*
|
|
39
|
+
* @param params - Parameter for request
|
|
40
|
+
* @param callback - Callback to handle processed record
|
|
41
|
+
*
|
|
42
|
+
* @returns Resolves to processed ModuleDataManagementInstance
|
|
43
|
+
*/
|
|
44
|
+
update(params: ModuleDataManagementContextUpdateOptions, callback?: (error: Error | null, item?: ModuleDataManagementInstance) => any): Promise<ModuleDataManagementInstance>;
|
|
45
|
+
/**
|
|
46
|
+
* Provide a user-friendly representation
|
|
47
|
+
*/
|
|
48
|
+
toJSON(): any;
|
|
49
|
+
[inspect.custom](_depth: any, options: InspectOptions): any;
|
|
50
|
+
}
|
|
51
|
+
export interface ModuleDataManagementContextSolution {
|
|
52
|
+
sid: string;
|
|
53
|
+
}
|
|
54
|
+
export declare class ModuleDataManagementContextImpl implements ModuleDataManagementContext {
|
|
55
|
+
protected _version: V1;
|
|
56
|
+
protected _solution: ModuleDataManagementContextSolution;
|
|
57
|
+
protected _uri: string;
|
|
58
|
+
constructor(_version: V1, sid: string);
|
|
59
|
+
fetch(callback?: (error: Error | null, item?: ModuleDataManagementInstance) => any): Promise<ModuleDataManagementInstance>;
|
|
60
|
+
update(params?: ModuleDataManagementContextUpdateOptions | ((error: Error | null, item?: ModuleDataManagementInstance) => any), callback?: (error: Error | null, item?: ModuleDataManagementInstance) => any): Promise<ModuleDataManagementInstance>;
|
|
61
|
+
/**
|
|
62
|
+
* Provide a user-friendly representation
|
|
63
|
+
*
|
|
64
|
+
* @returns Object
|
|
65
|
+
*/
|
|
66
|
+
toJSON(): ModuleDataManagementContextSolution;
|
|
67
|
+
[inspect.custom](_depth: any, options: InspectOptions): string;
|
|
68
|
+
}
|
|
69
|
+
interface ModuleDataManagementResource {
|
|
70
|
+
url: string;
|
|
71
|
+
sid: string;
|
|
72
|
+
description: any;
|
|
73
|
+
support: any;
|
|
74
|
+
policies: any;
|
|
75
|
+
module_info: any;
|
|
76
|
+
documentation: any;
|
|
77
|
+
}
|
|
78
|
+
export declare class ModuleDataManagementInstance {
|
|
79
|
+
protected _version: V1;
|
|
80
|
+
protected _solution: ModuleDataManagementContextSolution;
|
|
81
|
+
protected _context?: ModuleDataManagementContext;
|
|
82
|
+
constructor(_version: V1, payload: ModuleDataManagementResource, sid?: string);
|
|
83
|
+
url: string;
|
|
84
|
+
sid: string;
|
|
85
|
+
description: any;
|
|
86
|
+
support: any;
|
|
87
|
+
policies: any;
|
|
88
|
+
moduleInfo: any;
|
|
89
|
+
documentation: any;
|
|
90
|
+
private get _proxy();
|
|
91
|
+
/**
|
|
92
|
+
* Fetch a ModuleDataManagementInstance
|
|
93
|
+
*
|
|
94
|
+
* @param callback - Callback to handle processed record
|
|
95
|
+
*
|
|
96
|
+
* @returns Resolves to processed ModuleDataManagementInstance
|
|
97
|
+
*/
|
|
98
|
+
fetch(callback?: (error: Error | null, item?: ModuleDataManagementInstance) => any): Promise<ModuleDataManagementInstance>;
|
|
99
|
+
/**
|
|
100
|
+
* Update a ModuleDataManagementInstance
|
|
101
|
+
*
|
|
102
|
+
* @param callback - Callback to handle processed record
|
|
103
|
+
*
|
|
104
|
+
* @returns Resolves to processed ModuleDataManagementInstance
|
|
105
|
+
*/
|
|
106
|
+
update(callback?: (error: Error | null, item?: ModuleDataManagementInstance) => any): Promise<ModuleDataManagementInstance>;
|
|
107
|
+
/**
|
|
108
|
+
* Update a ModuleDataManagementInstance
|
|
109
|
+
*
|
|
110
|
+
* @param params - Parameter for request
|
|
111
|
+
* @param callback - Callback to handle processed record
|
|
112
|
+
*
|
|
113
|
+
* @returns Resolves to processed ModuleDataManagementInstance
|
|
114
|
+
*/
|
|
115
|
+
update(params: ModuleDataManagementContextUpdateOptions, callback?: (error: Error | null, item?: ModuleDataManagementInstance) => any): Promise<ModuleDataManagementInstance>;
|
|
116
|
+
/**
|
|
117
|
+
* Provide a user-friendly representation
|
|
118
|
+
*
|
|
119
|
+
* @returns Object
|
|
120
|
+
*/
|
|
121
|
+
toJSON(): {
|
|
122
|
+
url: string;
|
|
123
|
+
sid: string;
|
|
124
|
+
description: any;
|
|
125
|
+
support: any;
|
|
126
|
+
policies: any;
|
|
127
|
+
moduleInfo: any;
|
|
128
|
+
documentation: any;
|
|
129
|
+
};
|
|
130
|
+
[inspect.custom](_depth: any, options: InspectOptions): string;
|
|
131
|
+
}
|
|
132
|
+
export interface ModuleDataManagementSolution {
|
|
133
|
+
}
|
|
134
|
+
export interface ModuleDataManagementListInstance {
|
|
135
|
+
_version: V1;
|
|
136
|
+
_solution: ModuleDataManagementSolution;
|
|
137
|
+
_uri: string;
|
|
138
|
+
(sid: string): ModuleDataManagementContext;
|
|
139
|
+
get(sid: string): ModuleDataManagementContext;
|
|
140
|
+
/**
|
|
141
|
+
* Provide a user-friendly representation
|
|
142
|
+
*/
|
|
143
|
+
toJSON(): any;
|
|
144
|
+
[inspect.custom](_depth: any, options: InspectOptions): any;
|
|
145
|
+
}
|
|
146
|
+
export declare function ModuleDataManagementListInstance(version: V1): ModuleDataManagementListInstance;
|
|
147
|
+
export {};
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* This code was generated by
|
|
4
|
+
* ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
|
|
5
|
+
* | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
|
|
6
|
+
* | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
|
|
7
|
+
*
|
|
8
|
+
* Twilio - Marketplace
|
|
9
|
+
* This is the public Twilio REST API.
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator.
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.ModuleDataManagementListInstance = exports.ModuleDataManagementInstance = exports.ModuleDataManagementContextImpl = void 0;
|
|
17
|
+
const util_1 = require("util");
|
|
18
|
+
const deserialize = require("../../../base/deserialize");
|
|
19
|
+
const serialize = require("../../../base/serialize");
|
|
20
|
+
const utility_1 = require("../../../base/utility");
|
|
21
|
+
class ModuleDataManagementContextImpl {
|
|
22
|
+
constructor(_version, sid) {
|
|
23
|
+
this._version = _version;
|
|
24
|
+
if (!(0, utility_1.isValidPathParam)(sid)) {
|
|
25
|
+
throw new Error("Parameter 'sid' is not valid.");
|
|
26
|
+
}
|
|
27
|
+
this._solution = { sid };
|
|
28
|
+
this._uri = `/Listing/${sid}`;
|
|
29
|
+
}
|
|
30
|
+
fetch(callback) {
|
|
31
|
+
const instance = this;
|
|
32
|
+
let operationVersion = instance._version, operationPromise = operationVersion.fetch({
|
|
33
|
+
uri: instance._uri,
|
|
34
|
+
method: "get",
|
|
35
|
+
});
|
|
36
|
+
operationPromise = operationPromise.then((payload) => new ModuleDataManagementInstance(operationVersion, payload, instance._solution.sid));
|
|
37
|
+
operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
|
|
38
|
+
return operationPromise;
|
|
39
|
+
}
|
|
40
|
+
update(params, callback) {
|
|
41
|
+
if (params instanceof Function) {
|
|
42
|
+
callback = params;
|
|
43
|
+
params = {};
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
params = params || {};
|
|
47
|
+
}
|
|
48
|
+
let data = {};
|
|
49
|
+
if (params["moduleInfo"] !== undefined)
|
|
50
|
+
data["ModuleInfo"] = params["moduleInfo"];
|
|
51
|
+
if (params["description"] !== undefined)
|
|
52
|
+
data["Description"] = params["description"];
|
|
53
|
+
if (params["documentation"] !== undefined)
|
|
54
|
+
data["Documentation"] = params["documentation"];
|
|
55
|
+
if (params["policies"] !== undefined)
|
|
56
|
+
data["Policies"] = params["policies"];
|
|
57
|
+
if (params["support"] !== undefined)
|
|
58
|
+
data["Support"] = params["support"];
|
|
59
|
+
const headers = {};
|
|
60
|
+
headers["Content-Type"] = "application/x-www-form-urlencoded";
|
|
61
|
+
const instance = this;
|
|
62
|
+
let operationVersion = instance._version, operationPromise = operationVersion.update({
|
|
63
|
+
uri: instance._uri,
|
|
64
|
+
method: "post",
|
|
65
|
+
data,
|
|
66
|
+
headers,
|
|
67
|
+
});
|
|
68
|
+
operationPromise = operationPromise.then((payload) => new ModuleDataManagementInstance(operationVersion, payload, instance._solution.sid));
|
|
69
|
+
operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
|
|
70
|
+
return operationPromise;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Provide a user-friendly representation
|
|
74
|
+
*
|
|
75
|
+
* @returns Object
|
|
76
|
+
*/
|
|
77
|
+
toJSON() {
|
|
78
|
+
return this._solution;
|
|
79
|
+
}
|
|
80
|
+
[util_1.inspect.custom](_depth, options) {
|
|
81
|
+
return (0, util_1.inspect)(this.toJSON(), options);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
exports.ModuleDataManagementContextImpl = ModuleDataManagementContextImpl;
|
|
85
|
+
class ModuleDataManagementInstance {
|
|
86
|
+
constructor(_version, payload, sid) {
|
|
87
|
+
this._version = _version;
|
|
88
|
+
this.url = payload.url;
|
|
89
|
+
this.sid = payload.sid;
|
|
90
|
+
this.description = payload.description;
|
|
91
|
+
this.support = payload.support;
|
|
92
|
+
this.policies = payload.policies;
|
|
93
|
+
this.moduleInfo = payload.module_info;
|
|
94
|
+
this.documentation = payload.documentation;
|
|
95
|
+
this._solution = { sid: sid || this.sid };
|
|
96
|
+
}
|
|
97
|
+
get _proxy() {
|
|
98
|
+
this._context =
|
|
99
|
+
this._context ||
|
|
100
|
+
new ModuleDataManagementContextImpl(this._version, this._solution.sid);
|
|
101
|
+
return this._context;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Fetch a ModuleDataManagementInstance
|
|
105
|
+
*
|
|
106
|
+
* @param callback - Callback to handle processed record
|
|
107
|
+
*
|
|
108
|
+
* @returns Resolves to processed ModuleDataManagementInstance
|
|
109
|
+
*/
|
|
110
|
+
fetch(callback) {
|
|
111
|
+
return this._proxy.fetch(callback);
|
|
112
|
+
}
|
|
113
|
+
update(params, callback) {
|
|
114
|
+
return this._proxy.update(params, callback);
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Provide a user-friendly representation
|
|
118
|
+
*
|
|
119
|
+
* @returns Object
|
|
120
|
+
*/
|
|
121
|
+
toJSON() {
|
|
122
|
+
return {
|
|
123
|
+
url: this.url,
|
|
124
|
+
sid: this.sid,
|
|
125
|
+
description: this.description,
|
|
126
|
+
support: this.support,
|
|
127
|
+
policies: this.policies,
|
|
128
|
+
moduleInfo: this.moduleInfo,
|
|
129
|
+
documentation: this.documentation,
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
[util_1.inspect.custom](_depth, options) {
|
|
133
|
+
return (0, util_1.inspect)(this.toJSON(), options);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
exports.ModuleDataManagementInstance = ModuleDataManagementInstance;
|
|
137
|
+
function ModuleDataManagementListInstance(version) {
|
|
138
|
+
const instance = ((sid) => instance.get(sid));
|
|
139
|
+
instance.get = function get(sid) {
|
|
140
|
+
return new ModuleDataManagementContextImpl(version, sid);
|
|
141
|
+
};
|
|
142
|
+
instance._version = version;
|
|
143
|
+
instance._solution = {};
|
|
144
|
+
instance._uri = ``;
|
|
145
|
+
instance.toJSON = function toJSON() {
|
|
146
|
+
return instance._solution;
|
|
147
|
+
};
|
|
148
|
+
instance[util_1.inspect.custom] = function inspectImpl(_depth, options) {
|
|
149
|
+
return (0, util_1.inspect)(instance.toJSON(), options);
|
|
150
|
+
};
|
|
151
|
+
return instance;
|
|
152
|
+
}
|
|
153
|
+
exports.ModuleDataManagementListInstance = ModuleDataManagementListInstance;
|
|
@@ -3,7 +3,7 @@ import { inspect, InspectOptions } from "util";
|
|
|
3
3
|
import Page, { TwilioResponsePayload } from "../../../base/Page";
|
|
4
4
|
import Response from "../../../http/response";
|
|
5
5
|
import V1 from "../V1";
|
|
6
|
-
export type TollfreeVerificationOptInType = "VERBAL" | "WEB_FORM" | "PAPER_FORM" | "VIA_TEXT" | "MOBILE_QR_CODE";
|
|
6
|
+
export type TollfreeVerificationOptInType = "VERBAL" | "WEB_FORM" | "PAPER_FORM" | "VIA_TEXT" | "MOBILE_QR_CODE" | "IMPORT";
|
|
7
7
|
export type TollfreeVerificationStatus = "PENDING_REVIEW" | "IN_REVIEW" | "TWILIO_APPROVED" | "TWILIO_REJECTED";
|
|
8
8
|
/**
|
|
9
9
|
* Options to pass to update a TollfreeVerificationInstance
|
|
@@ -111,6 +111,10 @@ export interface TollfreeVerificationListInstanceEachOptions {
|
|
|
111
111
|
tollfreePhoneNumberSid?: string;
|
|
112
112
|
/** The compliance status of the Tollfree Verification record. */
|
|
113
113
|
status?: TollfreeVerificationStatus;
|
|
114
|
+
/** Customer supplied reference id for the Tollfree Verification record. */
|
|
115
|
+
externalReferenceId?: string;
|
|
116
|
+
/** Whether to include Tollfree Verifications from sub accounts in list response. */
|
|
117
|
+
includeSubAccounts?: boolean;
|
|
114
118
|
/** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
|
|
115
119
|
pageSize?: number;
|
|
116
120
|
/** Function to process each record. If this and a positional callback are passed, this one will be used */
|
|
@@ -128,6 +132,10 @@ export interface TollfreeVerificationListInstanceOptions {
|
|
|
128
132
|
tollfreePhoneNumberSid?: string;
|
|
129
133
|
/** The compliance status of the Tollfree Verification record. */
|
|
130
134
|
status?: TollfreeVerificationStatus;
|
|
135
|
+
/** Customer supplied reference id for the Tollfree Verification record. */
|
|
136
|
+
externalReferenceId?: string;
|
|
137
|
+
/** Whether to include Tollfree Verifications from sub accounts in list response. */
|
|
138
|
+
includeSubAccounts?: boolean;
|
|
131
139
|
/** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
|
|
132
140
|
pageSize?: number;
|
|
133
141
|
/** Upper limit for the number of records to return. list() guarantees never to return more than limit. Default is no limit */
|
|
@@ -141,6 +149,10 @@ export interface TollfreeVerificationListInstancePageOptions {
|
|
|
141
149
|
tollfreePhoneNumberSid?: string;
|
|
142
150
|
/** The compliance status of the Tollfree Verification record. */
|
|
143
151
|
status?: TollfreeVerificationStatus;
|
|
152
|
+
/** Customer supplied reference id for the Tollfree Verification record. */
|
|
153
|
+
externalReferenceId?: string;
|
|
154
|
+
/** Whether to include Tollfree Verifications from sub accounts in list response. */
|
|
155
|
+
includeSubAccounts?: boolean;
|
|
144
156
|
/** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
|
|
145
157
|
pageSize?: number;
|
|
146
158
|
/** Page Number, this value is simply for client state */
|
|
@@ -364,6 +364,10 @@ function TollfreeVerificationListInstance(version) {
|
|
|
364
364
|
data["TollfreePhoneNumberSid"] = params["tollfreePhoneNumberSid"];
|
|
365
365
|
if (params["status"] !== undefined)
|
|
366
366
|
data["Status"] = params["status"];
|
|
367
|
+
if (params["externalReferenceId"] !== undefined)
|
|
368
|
+
data["ExternalReferenceId"] = params["externalReferenceId"];
|
|
369
|
+
if (params["includeSubAccounts"] !== undefined)
|
|
370
|
+
data["IncludeSubAccounts"] = serialize.bool(params["includeSubAccounts"]);
|
|
367
371
|
if (params["pageSize"] !== undefined)
|
|
368
372
|
data["PageSize"] = params["pageSize"];
|
|
369
373
|
if (params.pageNumber !== undefined)
|
package/lib/rest/numbers/V1.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ import { PortingPortabilityListInstance } from "./v1/portingPortability";
|
|
|
8
8
|
import { PortingWebhookConfigurationListInstance } from "./v1/portingWebhookConfiguration";
|
|
9
9
|
import { PortingWebhookConfigurationDeleteListInstance } from "./v1/portingWebhookConfigurationDelete";
|
|
10
10
|
import { PortingWebhookConfigurationFetchListInstance } from "./v1/portingWebhookConfigurationFetch";
|
|
11
|
+
import { SigningRequestConfigurationListInstance } from "./v1/signingRequestConfiguration";
|
|
11
12
|
export default class V1 extends Version {
|
|
12
13
|
/**
|
|
13
14
|
* Initialize the V1 version of Numbers
|
|
@@ -31,6 +32,8 @@ export default class V1 extends Version {
|
|
|
31
32
|
protected _portingWebhookConfigurationsDelete?: PortingWebhookConfigurationDeleteListInstance;
|
|
32
33
|
/** portingWebhookConfigurationFetch - { Twilio.Numbers.V1.PortingWebhookConfigurationFetchListInstance } resource */
|
|
33
34
|
protected _portingWebhookConfigurationFetch?: PortingWebhookConfigurationFetchListInstance;
|
|
35
|
+
/** signingRequestConfigurations - { Twilio.Numbers.V1.SigningRequestConfigurationListInstance } resource */
|
|
36
|
+
protected _signingRequestConfigurations?: SigningRequestConfigurationListInstance;
|
|
34
37
|
/** Getter for bulkEligibilities resource */
|
|
35
38
|
get bulkEligibilities(): BulkEligibilityListInstance;
|
|
36
39
|
/** Getter for eligibilities resource */
|
|
@@ -47,4 +50,6 @@ export default class V1 extends Version {
|
|
|
47
50
|
get portingWebhookConfigurationsDelete(): PortingWebhookConfigurationDeleteListInstance;
|
|
48
51
|
/** Getter for portingWebhookConfigurationFetch resource */
|
|
49
52
|
get portingWebhookConfigurationFetch(): PortingWebhookConfigurationFetchListInstance;
|
|
53
|
+
/** Getter for signingRequestConfigurations resource */
|
|
54
|
+
get signingRequestConfigurations(): SigningRequestConfigurationListInstance;
|
|
50
55
|
}
|