twilio 3.80.0 → 3.80.1

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 (36) hide show
  1. package/lib/rest/Microvisor.d.ts +28 -0
  2. package/lib/rest/Microvisor.js +62 -0
  3. package/lib/rest/Preview.d.ts +0 -6
  4. package/lib/rest/Preview.js +0 -28
  5. package/lib/rest/Routes.d.ts +30 -0
  6. package/lib/rest/Routes.js +71 -0
  7. package/lib/rest/Twilio.d.ts +4 -0
  8. package/lib/rest/Twilio.js +28 -0
  9. package/lib/rest/api/v2010/account/sip/ipAccessControlList/ipAddress.d.ts +2 -2
  10. package/lib/rest/api/v2010/account/sip/ipAccessControlList/ipAddress.js +4 -4
  11. package/lib/rest/microvisor/V1.d.ts +28 -0
  12. package/lib/rest/microvisor/V1.js +57 -0
  13. package/lib/rest/{preview/bulk_exports/export/day.d.ts → microvisor/v1/app.d.ts} +79 -69
  14. package/lib/rest/{preview/bulk_exports/export/day.js → microvisor/v1/app.js} +160 -122
  15. package/lib/rest/{preview/bulk_exports/export/exportCustomJob.d.ts → microvisor/v1/device.d.ts} +136 -84
  16. package/lib/rest/microvisor/v1/device.js +652 -0
  17. package/lib/rest/routes/V2.d.ts +31 -0
  18. package/lib/rest/routes/V2.js +69 -0
  19. package/lib/rest/routes/v2/phoneNumber.d.ts +193 -0
  20. package/lib/rest/routes/v2/phoneNumber.js +466 -0
  21. package/lib/rest/routes/v2/sipDomain.d.ts +205 -0
  22. package/lib/rest/routes/v2/sipDomain.js +447 -0
  23. package/lib/rest/routes/v2/trunk.d.ts +205 -0
  24. package/lib/rest/routes/v2/trunk.js +458 -0
  25. package/lib/rest/supersim/v1/fleet.d.ts +3 -1
  26. package/lib/rest/supersim/v1/fleet.js +8 -3
  27. package/package.json +1 -1
  28. package/lib/rest/preview/BulkExports.d.ts +0 -28
  29. package/lib/rest/preview/BulkExports.js +0 -59
  30. package/lib/rest/preview/bulk_exports/export/exportCustomJob.js +0 -540
  31. package/lib/rest/preview/bulk_exports/export/job.d.ts +0 -163
  32. package/lib/rest/preview/bulk_exports/export/job.js +0 -390
  33. package/lib/rest/preview/bulk_exports/export.d.ts +0 -153
  34. package/lib/rest/preview/bulk_exports/export.js +0 -402
  35. package/lib/rest/preview/bulk_exports/exportConfiguration.d.ts +0 -180
  36. package/lib/rest/preview/bulk_exports/exportConfiguration.js +0 -411
@@ -1,411 +0,0 @@
1
- 'use strict';
2
-
3
- /* jshint ignore:start */
4
- /**
5
- * This code was generated by
6
- * \ / _ _ _| _ _
7
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
8
- * / /
9
- */
10
- /* jshint ignore:end */
11
-
12
- var Q = require('q'); /* jshint ignore:line */
13
- var _ = require('lodash'); /* jshint ignore:line */
14
- var util = require('util'); /* jshint ignore:line */
15
- var Page = require('../../../base/Page'); /* jshint ignore:line */
16
- var serialize = require('../../../base/serialize'); /* jshint ignore:line */
17
- var values = require('../../../base/values'); /* jshint ignore:line */
18
-
19
- var ExportConfigurationList;
20
- var ExportConfigurationPage;
21
- var ExportConfigurationInstance;
22
- var ExportConfigurationContext;
23
-
24
- /* jshint ignore:start */
25
- /**
26
- * Initialize the ExportConfigurationList
27
- *
28
- * PLEASE NOTE that this class contains preview products that are subject to
29
- * change. Use them with caution. If you currently do not have developer preview
30
- * access, please contact help@twilio.com.
31
- *
32
- * @constructor Twilio.Preview.BulkExports.ExportConfigurationList
33
- *
34
- * @param {Twilio.Preview.BulkExports} version - Version of the resource
35
- */
36
- /* jshint ignore:end */
37
- ExportConfigurationList = function ExportConfigurationList(version) {
38
- /* jshint ignore:start */
39
- /**
40
- * @function exportConfiguration
41
- * @memberof Twilio.Preview.BulkExports#
42
- *
43
- * @param {string} sid - sid of instance
44
- *
45
- * @returns {Twilio.Preview.BulkExports.ExportConfigurationContext}
46
- */
47
- /* jshint ignore:end */
48
- function ExportConfigurationListInstance(sid) {
49
- return ExportConfigurationListInstance.get(sid);
50
- }
51
-
52
- ExportConfigurationListInstance._version = version;
53
- // Path Solution
54
- ExportConfigurationListInstance._solution = {};
55
- /* jshint ignore:start */
56
- /**
57
- * Constructs a export_configuration
58
- *
59
- * @function get
60
- * @memberof Twilio.Preview.BulkExports.ExportConfigurationList#
61
- *
62
- * @param {string} resourceType -
63
- * The type of communication – Messages, Calls, Conferences, and Participants
64
- *
65
- * @returns {Twilio.Preview.BulkExports.ExportConfigurationContext}
66
- */
67
- /* jshint ignore:end */
68
- ExportConfigurationListInstance.get = function get(resourceType) {
69
- return new ExportConfigurationContext(this._version, resourceType);
70
- };
71
-
72
- /* jshint ignore:start */
73
- /**
74
- * Provide a user-friendly representation
75
- *
76
- * @function toJSON
77
- * @memberof Twilio.Preview.BulkExports.ExportConfigurationList#
78
- *
79
- * @returns Object
80
- */
81
- /* jshint ignore:end */
82
- ExportConfigurationListInstance.toJSON = function toJSON() {
83
- return this._solution;
84
- };
85
-
86
- ExportConfigurationListInstance[util.inspect.custom] = function inspect(depth,
87
- options) {
88
- return util.inspect(this.toJSON(), options);
89
- };
90
-
91
- return ExportConfigurationListInstance;
92
- };
93
-
94
-
95
- /* jshint ignore:start */
96
- /**
97
- * Initialize the ExportConfigurationPage
98
- *
99
- * PLEASE NOTE that this class contains preview products that are subject to
100
- * change. Use them with caution. If you currently do not have developer preview
101
- * access, please contact help@twilio.com.
102
- *
103
- * @constructor Twilio.Preview.BulkExports.ExportConfigurationPage
104
- *
105
- * @param {BulkExports} version - Version of the resource
106
- * @param {Response<string>} response - Response from the API
107
- * @param {ExportConfigurationSolution} solution - Path solution
108
- *
109
- * @returns ExportConfigurationPage
110
- */
111
- /* jshint ignore:end */
112
- ExportConfigurationPage = function ExportConfigurationPage(version, response,
113
- solution) {
114
- // Path Solution
115
- this._solution = solution;
116
-
117
- Page.prototype.constructor.call(this, version, response, this._solution);
118
- };
119
-
120
- _.extend(ExportConfigurationPage.prototype, Page.prototype);
121
- ExportConfigurationPage.prototype.constructor = ExportConfigurationPage;
122
-
123
- /* jshint ignore:start */
124
- /**
125
- * Build an instance of ExportConfigurationInstance
126
- *
127
- * @function getInstance
128
- * @memberof Twilio.Preview.BulkExports.ExportConfigurationPage#
129
- *
130
- * @param {ExportConfigurationPayload} payload - Payload response from the API
131
- *
132
- * @returns ExportConfigurationInstance
133
- */
134
- /* jshint ignore:end */
135
- ExportConfigurationPage.prototype.getInstance = function getInstance(payload) {
136
- return new ExportConfigurationInstance(this._version, payload);
137
- };
138
-
139
- /* jshint ignore:start */
140
- /**
141
- * Provide a user-friendly representation
142
- *
143
- * @function toJSON
144
- * @memberof Twilio.Preview.BulkExports.ExportConfigurationPage#
145
- *
146
- * @returns Object
147
- */
148
- /* jshint ignore:end */
149
- ExportConfigurationPage.prototype.toJSON = function toJSON() {
150
- let clone = {};
151
- _.forOwn(this, function(value, key) {
152
- if (!_.startsWith(key, '_') && ! _.isFunction(value)) {
153
- clone[key] = value;
154
- }
155
- });
156
- return clone;
157
- };
158
-
159
- ExportConfigurationPage.prototype[util.inspect.custom] = function inspect(depth,
160
- options) {
161
- return util.inspect(this.toJSON(), options);
162
- };
163
-
164
-
165
- /* jshint ignore:start */
166
- /**
167
- * Initialize the ExportConfigurationContext
168
- *
169
- * PLEASE NOTE that this class contains preview products that are subject to
170
- * change. Use them with caution. If you currently do not have developer preview
171
- * access, please contact help@twilio.com.
172
- *
173
- * @constructor Twilio.Preview.BulkExports.ExportConfigurationInstance
174
- *
175
- * @property {boolean} enabled - Whether files are automatically generated
176
- * @property {string} webhookUrl - URL targeted at export
177
- * @property {string} webhookMethod - Whether to GET or POST to the webhook url
178
- * @property {string} resourceType -
179
- * The type of communication – Messages, Calls, Conferences, and Participants
180
- * @property {string} url - The URL of this resource.
181
- *
182
- * @param {BulkExports} version - Version of the resource
183
- * @param {ExportConfigurationPayload} payload - The instance payload
184
- * @param {string} resourceType -
185
- * The type of communication – Messages, Calls, Conferences, and Participants
186
- */
187
- /* jshint ignore:end */
188
- ExportConfigurationInstance = function ExportConfigurationInstance(version,
189
- payload, resourceType) {
190
- this._version = version;
191
-
192
- // Marshaled Properties
193
- this.enabled = payload.enabled; // jshint ignore:line
194
- this.webhookUrl = payload.webhook_url; // jshint ignore:line
195
- this.webhookMethod = payload.webhook_method; // jshint ignore:line
196
- this.resourceType = payload.resource_type; // jshint ignore:line
197
- this.url = payload.url; // jshint ignore:line
198
-
199
- // Context
200
- this._context = undefined;
201
- this._solution = {resourceType: resourceType || this.resourceType, };
202
- };
203
-
204
- Object.defineProperty(ExportConfigurationInstance.prototype,
205
- '_proxy', {
206
- get: function() {
207
- if (!this._context) {
208
- this._context = new ExportConfigurationContext(this._version, this._solution.resourceType);
209
- }
210
-
211
- return this._context;
212
- }
213
- });
214
-
215
- /* jshint ignore:start */
216
- /**
217
- * fetch a ExportConfigurationInstance
218
- *
219
- * @function fetch
220
- * @memberof Twilio.Preview.BulkExports.ExportConfigurationInstance#
221
- *
222
- * @param {function} [callback] - Callback to handle processed record
223
- *
224
- * @returns {Promise} Resolves to processed ExportConfigurationInstance
225
- */
226
- /* jshint ignore:end */
227
- ExportConfigurationInstance.prototype.fetch = function fetch(callback) {
228
- return this._proxy.fetch(callback);
229
- };
230
-
231
- /* jshint ignore:start */
232
- /**
233
- * update a ExportConfigurationInstance
234
- *
235
- * @function update
236
- * @memberof Twilio.Preview.BulkExports.ExportConfigurationInstance#
237
- *
238
- * @param {object} [opts] - Options for request
239
- * @param {boolean} [opts.enabled] - Whether files are automatically generated
240
- * @param {string} [opts.webhookUrl] - URL targeted at export
241
- * @param {string} [opts.webhookMethod] - Whether to GET or POST to the webhook url
242
- * @param {function} [callback] - Callback to handle processed record
243
- *
244
- * @returns {Promise} Resolves to processed ExportConfigurationInstance
245
- */
246
- /* jshint ignore:end */
247
- ExportConfigurationInstance.prototype.update = function update(opts, callback) {
248
- return this._proxy.update(opts, callback);
249
- };
250
-
251
- /* jshint ignore:start */
252
- /**
253
- * Provide a user-friendly representation
254
- *
255
- * @function toJSON
256
- * @memberof Twilio.Preview.BulkExports.ExportConfigurationInstance#
257
- *
258
- * @returns Object
259
- */
260
- /* jshint ignore:end */
261
- ExportConfigurationInstance.prototype.toJSON = function toJSON() {
262
- let clone = {};
263
- _.forOwn(this, function(value, key) {
264
- if (!_.startsWith(key, '_') && ! _.isFunction(value)) {
265
- clone[key] = value;
266
- }
267
- });
268
- return clone;
269
- };
270
-
271
- ExportConfigurationInstance.prototype[util.inspect.custom] = function
272
- inspect(depth, options) {
273
- return util.inspect(this.toJSON(), options);
274
- };
275
-
276
-
277
- /* jshint ignore:start */
278
- /**
279
- * Initialize the ExportConfigurationContext
280
- *
281
- * PLEASE NOTE that this class contains preview products that are subject to
282
- * change. Use them with caution. If you currently do not have developer preview
283
- * access, please contact help@twilio.com.
284
- *
285
- * @constructor Twilio.Preview.BulkExports.ExportConfigurationContext
286
- *
287
- * @param {BulkExports} version - Version of the resource
288
- * @param {string} resourceType -
289
- * The type of communication – Messages, Calls, Conferences, and Participants
290
- */
291
- /* jshint ignore:end */
292
- ExportConfigurationContext = function ExportConfigurationContext(version,
293
- resourceType) {
294
- this._version = version;
295
-
296
- // Path Solution
297
- this._solution = {resourceType: resourceType, };
298
- this._uri = `/Exports/${resourceType}/Configuration`;
299
- };
300
-
301
- /* jshint ignore:start */
302
- /**
303
- * fetch a ExportConfigurationInstance
304
- *
305
- * @function fetch
306
- * @memberof Twilio.Preview.BulkExports.ExportConfigurationContext#
307
- *
308
- * @param {function} [callback] - Callback to handle processed record
309
- *
310
- * @returns {Promise} Resolves to processed ExportConfigurationInstance
311
- */
312
- /* jshint ignore:end */
313
- ExportConfigurationContext.prototype.fetch = function fetch(callback) {
314
- var deferred = Q.defer();
315
- var promise = this._version.fetch({uri: this._uri, method: 'GET'});
316
-
317
- promise = promise.then(function(payload) {
318
- deferred.resolve(new ExportConfigurationInstance(
319
- this._version,
320
- payload,
321
- this._solution.resourceType
322
- ));
323
- }.bind(this));
324
-
325
- promise.catch(function(error) {
326
- deferred.reject(error);
327
- });
328
-
329
- if (_.isFunction(callback)) {
330
- deferred.promise.nodeify(callback);
331
- }
332
-
333
- return deferred.promise;
334
- };
335
-
336
- /* jshint ignore:start */
337
- /**
338
- * update a ExportConfigurationInstance
339
- *
340
- * @function update
341
- * @memberof Twilio.Preview.BulkExports.ExportConfigurationContext#
342
- *
343
- * @param {object} [opts] - Options for request
344
- * @param {boolean} [opts.enabled] - Whether files are automatically generated
345
- * @param {string} [opts.webhookUrl] - URL targeted at export
346
- * @param {string} [opts.webhookMethod] - Whether to GET or POST to the webhook url
347
- * @param {function} [callback] - Callback to handle processed record
348
- *
349
- * @returns {Promise} Resolves to processed ExportConfigurationInstance
350
- */
351
- /* jshint ignore:end */
352
- ExportConfigurationContext.prototype.update = function update(opts, callback) {
353
- if (_.isFunction(opts)) {
354
- callback = opts;
355
- opts = {};
356
- }
357
- opts = opts || {};
358
-
359
- var deferred = Q.defer();
360
- var data = values.of({
361
- 'Enabled': serialize.bool(_.get(opts, 'enabled')),
362
- 'WebhookUrl': _.get(opts, 'webhookUrl'),
363
- 'WebhookMethod': _.get(opts, 'webhookMethod')
364
- });
365
-
366
- var promise = this._version.update({uri: this._uri, method: 'POST', data: data});
367
-
368
- promise = promise.then(function(payload) {
369
- deferred.resolve(new ExportConfigurationInstance(
370
- this._version,
371
- payload,
372
- this._solution.resourceType
373
- ));
374
- }.bind(this));
375
-
376
- promise.catch(function(error) {
377
- deferred.reject(error);
378
- });
379
-
380
- if (_.isFunction(callback)) {
381
- deferred.promise.nodeify(callback);
382
- }
383
-
384
- return deferred.promise;
385
- };
386
-
387
- /* jshint ignore:start */
388
- /**
389
- * Provide a user-friendly representation
390
- *
391
- * @function toJSON
392
- * @memberof Twilio.Preview.BulkExports.ExportConfigurationContext#
393
- *
394
- * @returns Object
395
- */
396
- /* jshint ignore:end */
397
- ExportConfigurationContext.prototype.toJSON = function toJSON() {
398
- return this._solution;
399
- };
400
-
401
- ExportConfigurationContext.prototype[util.inspect.custom] = function
402
- inspect(depth, options) {
403
- return util.inspect(this.toJSON(), options);
404
- };
405
-
406
- module.exports = {
407
- ExportConfigurationList: ExportConfigurationList,
408
- ExportConfigurationPage: ExportConfigurationPage,
409
- ExportConfigurationInstance: ExportConfigurationInstance,
410
- ExportConfigurationContext: ExportConfigurationContext
411
- };