twilio 5.3.2 → 5.3.4

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.
Files changed (33) hide show
  1. package/lib/base/RequestClient.d.ts +1 -0
  2. package/lib/rest/PreviewBase.d.ts +0 -3
  3. package/lib/rest/PreviewBase.js +0 -6
  4. package/lib/rest/iam/V1.d.ts +5 -5
  5. package/lib/rest/iam/V1.js +5 -5
  6. package/lib/rest/iam/v1/{newApiKey.d.ts → key.d.ts} +14 -14
  7. package/lib/rest/iam/v1/{newApiKey.js → key.js} +6 -6
  8. package/lib/rest/messaging/V1.d.ts +5 -0
  9. package/lib/rest/messaging/V1.js +7 -0
  10. package/lib/rest/messaging/v1/requestManagedCert.d.ts +127 -0
  11. package/lib/rest/messaging/v1/requestManagedCert.js +122 -0
  12. package/lib/rest/numbers/v1/portingPortability.d.ts +2 -0
  13. package/lib/rest/numbers/v1/portingPortability.js +2 -0
  14. package/lib/rest/taskrouter/v1/workspace/task.d.ts +2 -2
  15. package/lib/rest/verify/v2/service/verification.d.ts +2 -0
  16. package/lib/rest/verify/v2/service/verification.js +2 -0
  17. package/lib/rest/verify/v2/service/verificationCheck.d.ts +2 -0
  18. package/lib/rest/verify/v2/service/verificationCheck.js +2 -0
  19. package/lib/rest/video/v1/room.d.ts +14 -14
  20. package/lib/webhooks/webhooks.d.ts +1 -0
  21. package/package.json +1 -1
  22. package/lib/rest/preview/DeployedDevices.d.ts +0 -15
  23. package/lib/rest/preview/DeployedDevices.js +0 -36
  24. package/lib/rest/preview/deployed_devices/fleet/certificate.d.ts +0 -324
  25. package/lib/rest/preview/deployed_devices/fleet/certificate.js +0 -269
  26. package/lib/rest/preview/deployed_devices/fleet/deployment.d.ts +0 -318
  27. package/lib/rest/preview/deployed_devices/fleet/deployment.js +0 -264
  28. package/lib/rest/preview/deployed_devices/fleet/device.d.ts +0 -358
  29. package/lib/rest/preview/deployed_devices/fleet/device.js +0 -284
  30. package/lib/rest/preview/deployed_devices/fleet/key.d.ts +0 -330
  31. package/lib/rest/preview/deployed_devices/fleet/key.js +0 -268
  32. package/lib/rest/preview/deployed_devices/fleet.d.ts +0 -352
  33. package/lib/rest/preview/deployed_devices/fleet.js +0 -307
@@ -1,307 +0,0 @@
1
- "use strict";
2
- /*
3
- * This code was generated by
4
- * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
5
- * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
6
- * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
7
- *
8
- * Twilio - Preview
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.FleetPage = exports.FleetListInstance = exports.FleetInstance = exports.FleetContextImpl = 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 certificate_1 = require("./fleet/certificate");
26
- const deployment_1 = require("./fleet/deployment");
27
- const device_1 = require("./fleet/device");
28
- const key_1 = require("./fleet/key");
29
- class FleetContextImpl {
30
- constructor(_version, sid) {
31
- this._version = _version;
32
- if (!(0, utility_1.isValidPathParam)(sid)) {
33
- throw new Error("Parameter 'sid' is not valid.");
34
- }
35
- this._solution = { sid };
36
- this._uri = `/Fleets/${sid}`;
37
- }
38
- get certificates() {
39
- this._certificates =
40
- this._certificates ||
41
- (0, certificate_1.CertificateListInstance)(this._version, this._solution.sid);
42
- return this._certificates;
43
- }
44
- get deployments() {
45
- this._deployments =
46
- this._deployments ||
47
- (0, deployment_1.DeploymentListInstance)(this._version, this._solution.sid);
48
- return this._deployments;
49
- }
50
- get devices() {
51
- this._devices =
52
- this._devices || (0, device_1.DeviceListInstance)(this._version, this._solution.sid);
53
- return this._devices;
54
- }
55
- get keys() {
56
- this._keys =
57
- this._keys || (0, key_1.KeyListInstance)(this._version, this._solution.sid);
58
- return this._keys;
59
- }
60
- remove(callback) {
61
- const instance = this;
62
- let operationVersion = instance._version, operationPromise = operationVersion.remove({
63
- uri: instance._uri,
64
- method: "delete",
65
- });
66
- operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
67
- return operationPromise;
68
- }
69
- fetch(callback) {
70
- const instance = this;
71
- let operationVersion = instance._version, operationPromise = operationVersion.fetch({
72
- uri: instance._uri,
73
- method: "get",
74
- });
75
- operationPromise = operationPromise.then((payload) => new FleetInstance(operationVersion, payload, instance._solution.sid));
76
- operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
77
- return operationPromise;
78
- }
79
- update(params, callback) {
80
- if (params instanceof Function) {
81
- callback = params;
82
- params = {};
83
- }
84
- else {
85
- params = params || {};
86
- }
87
- let data = {};
88
- if (params["friendlyName"] !== undefined)
89
- data["FriendlyName"] = params["friendlyName"];
90
- if (params["defaultDeploymentSid"] !== undefined)
91
- data["DefaultDeploymentSid"] = params["defaultDeploymentSid"];
92
- const headers = {};
93
- headers["Content-Type"] = "application/x-www-form-urlencoded";
94
- const instance = this;
95
- let operationVersion = instance._version, operationPromise = operationVersion.update({
96
- uri: instance._uri,
97
- method: "post",
98
- data,
99
- headers,
100
- });
101
- operationPromise = operationPromise.then((payload) => new FleetInstance(operationVersion, payload, instance._solution.sid));
102
- operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
103
- return operationPromise;
104
- }
105
- /**
106
- * Provide a user-friendly representation
107
- *
108
- * @returns Object
109
- */
110
- toJSON() {
111
- return this._solution;
112
- }
113
- [util_1.inspect.custom](_depth, options) {
114
- return (0, util_1.inspect)(this.toJSON(), options);
115
- }
116
- }
117
- exports.FleetContextImpl = FleetContextImpl;
118
- class FleetInstance {
119
- constructor(_version, payload, sid) {
120
- this._version = _version;
121
- this.sid = payload.sid;
122
- this.url = payload.url;
123
- this.uniqueName = payload.unique_name;
124
- this.friendlyName = payload.friendly_name;
125
- this.accountSid = payload.account_sid;
126
- this.defaultDeploymentSid = payload.default_deployment_sid;
127
- this.dateCreated = deserialize.iso8601DateTime(payload.date_created);
128
- this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated);
129
- this.links = payload.links;
130
- this._solution = { sid: sid || this.sid };
131
- }
132
- get _proxy() {
133
- this._context =
134
- this._context || new FleetContextImpl(this._version, this._solution.sid);
135
- return this._context;
136
- }
137
- /**
138
- * Remove a FleetInstance
139
- *
140
- * @param callback - Callback to handle processed record
141
- *
142
- * @returns Resolves to processed boolean
143
- */
144
- remove(callback) {
145
- return this._proxy.remove(callback);
146
- }
147
- /**
148
- * Fetch a FleetInstance
149
- *
150
- * @param callback - Callback to handle processed record
151
- *
152
- * @returns Resolves to processed FleetInstance
153
- */
154
- fetch(callback) {
155
- return this._proxy.fetch(callback);
156
- }
157
- update(params, callback) {
158
- return this._proxy.update(params, callback);
159
- }
160
- /**
161
- * Access the certificates.
162
- */
163
- certificates() {
164
- return this._proxy.certificates;
165
- }
166
- /**
167
- * Access the deployments.
168
- */
169
- deployments() {
170
- return this._proxy.deployments;
171
- }
172
- /**
173
- * Access the devices.
174
- */
175
- devices() {
176
- return this._proxy.devices;
177
- }
178
- /**
179
- * Access the keys.
180
- */
181
- keys() {
182
- return this._proxy.keys;
183
- }
184
- /**
185
- * Provide a user-friendly representation
186
- *
187
- * @returns Object
188
- */
189
- toJSON() {
190
- return {
191
- sid: this.sid,
192
- url: this.url,
193
- uniqueName: this.uniqueName,
194
- friendlyName: this.friendlyName,
195
- accountSid: this.accountSid,
196
- defaultDeploymentSid: this.defaultDeploymentSid,
197
- dateCreated: this.dateCreated,
198
- dateUpdated: this.dateUpdated,
199
- links: this.links,
200
- };
201
- }
202
- [util_1.inspect.custom](_depth, options) {
203
- return (0, util_1.inspect)(this.toJSON(), options);
204
- }
205
- }
206
- exports.FleetInstance = FleetInstance;
207
- function FleetListInstance(version) {
208
- const instance = ((sid) => instance.get(sid));
209
- instance.get = function get(sid) {
210
- return new FleetContextImpl(version, sid);
211
- };
212
- instance._version = version;
213
- instance._solution = {};
214
- instance._uri = `/Fleets`;
215
- instance.create = function create(params, callback) {
216
- if (params instanceof Function) {
217
- callback = params;
218
- params = {};
219
- }
220
- else {
221
- params = params || {};
222
- }
223
- let data = {};
224
- if (params["friendlyName"] !== undefined)
225
- data["FriendlyName"] = params["friendlyName"];
226
- const headers = {};
227
- headers["Content-Type"] = "application/x-www-form-urlencoded";
228
- let operationVersion = version, operationPromise = operationVersion.create({
229
- uri: instance._uri,
230
- method: "post",
231
- data,
232
- headers,
233
- });
234
- operationPromise = operationPromise.then((payload) => new FleetInstance(operationVersion, payload));
235
- operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
236
- return operationPromise;
237
- };
238
- instance.page = function page(params, callback) {
239
- if (params instanceof Function) {
240
- callback = params;
241
- params = {};
242
- }
243
- else {
244
- params = params || {};
245
- }
246
- let data = {};
247
- if (params["pageSize"] !== undefined)
248
- data["PageSize"] = params["pageSize"];
249
- if (params.pageNumber !== undefined)
250
- data["Page"] = params.pageNumber;
251
- if (params.pageToken !== undefined)
252
- data["PageToken"] = params.pageToken;
253
- const headers = {};
254
- let operationVersion = version, operationPromise = operationVersion.page({
255
- uri: instance._uri,
256
- method: "get",
257
- params: data,
258
- headers,
259
- });
260
- operationPromise = operationPromise.then((payload) => new FleetPage(operationVersion, payload, instance._solution));
261
- operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
262
- return operationPromise;
263
- };
264
- instance.each = instance._version.each;
265
- instance.list = instance._version.list;
266
- instance.getPage = function getPage(targetUrl, callback) {
267
- const operationPromise = instance._version._domain.twilio.request({
268
- method: "get",
269
- uri: targetUrl,
270
- });
271
- let pagePromise = operationPromise.then((payload) => new FleetPage(instance._version, payload, instance._solution));
272
- pagePromise = instance._version.setPromiseCallback(pagePromise, callback);
273
- return pagePromise;
274
- };
275
- instance.toJSON = function toJSON() {
276
- return instance._solution;
277
- };
278
- instance[util_1.inspect.custom] = function inspectImpl(_depth, options) {
279
- return (0, util_1.inspect)(instance.toJSON(), options);
280
- };
281
- return instance;
282
- }
283
- exports.FleetListInstance = FleetListInstance;
284
- class FleetPage extends Page_1.default {
285
- /**
286
- * Initialize the FleetPage
287
- *
288
- * @param version - Version of the resource
289
- * @param response - Response from the API
290
- * @param solution - Path solution
291
- */
292
- constructor(version, response, solution) {
293
- super(version, response, solution);
294
- }
295
- /**
296
- * Build an instance of FleetInstance
297
- *
298
- * @param payload - Payload response from the API
299
- */
300
- getInstance(payload) {
301
- return new FleetInstance(this._version, payload);
302
- }
303
- [util_1.inspect.custom](depth, options) {
304
- return (0, util_1.inspect)(this.toJSON(), options);
305
- }
306
- }
307
- exports.FleetPage = FleetPage;