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.
- package/lib/rest/Microvisor.d.ts +28 -0
- package/lib/rest/Microvisor.js +62 -0
- package/lib/rest/Preview.d.ts +0 -6
- package/lib/rest/Preview.js +0 -28
- package/lib/rest/Routes.d.ts +30 -0
- package/lib/rest/Routes.js +71 -0
- package/lib/rest/Twilio.d.ts +4 -0
- package/lib/rest/Twilio.js +28 -0
- package/lib/rest/api/v2010/account/sip/ipAccessControlList/ipAddress.d.ts +2 -2
- package/lib/rest/api/v2010/account/sip/ipAccessControlList/ipAddress.js +4 -4
- package/lib/rest/microvisor/V1.d.ts +28 -0
- package/lib/rest/microvisor/V1.js +57 -0
- package/lib/rest/{preview/bulk_exports/export/day.d.ts → microvisor/v1/app.d.ts} +79 -69
- package/lib/rest/{preview/bulk_exports/export/day.js → microvisor/v1/app.js} +160 -122
- package/lib/rest/{preview/bulk_exports/export/exportCustomJob.d.ts → microvisor/v1/device.d.ts} +136 -84
- package/lib/rest/microvisor/v1/device.js +652 -0
- package/lib/rest/routes/V2.d.ts +31 -0
- package/lib/rest/routes/V2.js +69 -0
- package/lib/rest/routes/v2/phoneNumber.d.ts +193 -0
- package/lib/rest/routes/v2/phoneNumber.js +466 -0
- package/lib/rest/routes/v2/sipDomain.d.ts +205 -0
- package/lib/rest/routes/v2/sipDomain.js +447 -0
- package/lib/rest/routes/v2/trunk.d.ts +205 -0
- package/lib/rest/routes/v2/trunk.js +458 -0
- package/lib/rest/supersim/v1/fleet.d.ts +3 -1
- package/lib/rest/supersim/v1/fleet.js +8 -3
- package/package.json +1 -1
- package/lib/rest/preview/BulkExports.d.ts +0 -28
- package/lib/rest/preview/BulkExports.js +0 -59
- package/lib/rest/preview/bulk_exports/export/exportCustomJob.js +0 -540
- package/lib/rest/preview/bulk_exports/export/job.d.ts +0 -163
- package/lib/rest/preview/bulk_exports/export/job.js +0 -390
- package/lib/rest/preview/bulk_exports/export.d.ts +0 -153
- package/lib/rest/preview/bulk_exports/export.js +0 -402
- package/lib/rest/preview/bulk_exports/exportConfiguration.d.ts +0 -180
- package/lib/rest/preview/bulk_exports/exportConfiguration.js +0 -411
|
@@ -0,0 +1,458 @@
|
|
|
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 deserialize = require(
|
|
17
|
+
'../../../base/deserialize'); /* jshint ignore:line */
|
|
18
|
+
var values = require('../../../base/values'); /* jshint ignore:line */
|
|
19
|
+
|
|
20
|
+
var TrunkList;
|
|
21
|
+
var TrunkPage;
|
|
22
|
+
var TrunkInstance;
|
|
23
|
+
var TrunkContext;
|
|
24
|
+
|
|
25
|
+
/* jshint ignore:start */
|
|
26
|
+
/**
|
|
27
|
+
* Initialize the TrunkList
|
|
28
|
+
*
|
|
29
|
+
* @constructor Twilio.Routes.V2.TrunkList
|
|
30
|
+
*
|
|
31
|
+
* @param {Twilio.Routes.V2} version - Version of the resource
|
|
32
|
+
*/
|
|
33
|
+
/* jshint ignore:end */
|
|
34
|
+
TrunkList = function TrunkList(version) {
|
|
35
|
+
/* jshint ignore:start */
|
|
36
|
+
/**
|
|
37
|
+
* @function trunks
|
|
38
|
+
* @memberof Twilio.Routes.V2#
|
|
39
|
+
*
|
|
40
|
+
* @param {string} sid - sid of instance
|
|
41
|
+
*
|
|
42
|
+
* @returns {Twilio.Routes.V2.TrunkContext}
|
|
43
|
+
*/
|
|
44
|
+
/* jshint ignore:end */
|
|
45
|
+
function TrunkListInstance(sid) {
|
|
46
|
+
return TrunkListInstance.get(sid);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
TrunkListInstance._version = version;
|
|
50
|
+
// Path Solution
|
|
51
|
+
TrunkListInstance._solution = {};
|
|
52
|
+
/* jshint ignore:start */
|
|
53
|
+
/**
|
|
54
|
+
* Constructs a trunk
|
|
55
|
+
*
|
|
56
|
+
* @function get
|
|
57
|
+
* @memberof Twilio.Routes.V2.TrunkList#
|
|
58
|
+
*
|
|
59
|
+
* @param {string} sipTrunkDomain - The SIP Trunk
|
|
60
|
+
*
|
|
61
|
+
* @returns {Twilio.Routes.V2.TrunkContext}
|
|
62
|
+
*/
|
|
63
|
+
/* jshint ignore:end */
|
|
64
|
+
TrunkListInstance.get = function get(sipTrunkDomain) {
|
|
65
|
+
return new TrunkContext(this._version, sipTrunkDomain);
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
/* jshint ignore:start */
|
|
69
|
+
/**
|
|
70
|
+
* Provide a user-friendly representation
|
|
71
|
+
*
|
|
72
|
+
* @function toJSON
|
|
73
|
+
* @memberof Twilio.Routes.V2.TrunkList#
|
|
74
|
+
*
|
|
75
|
+
* @returns Object
|
|
76
|
+
*/
|
|
77
|
+
/* jshint ignore:end */
|
|
78
|
+
TrunkListInstance.toJSON = function toJSON() {
|
|
79
|
+
return this._solution;
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
TrunkListInstance[util.inspect.custom] = function inspect(depth, options) {
|
|
83
|
+
return util.inspect(this.toJSON(), options);
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
return TrunkListInstance;
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
/* jshint ignore:start */
|
|
91
|
+
/**
|
|
92
|
+
* Initialize the TrunkPage
|
|
93
|
+
*
|
|
94
|
+
* @constructor Twilio.Routes.V2.TrunkPage
|
|
95
|
+
*
|
|
96
|
+
* @param {V2} version - Version of the resource
|
|
97
|
+
* @param {Response<string>} response - Response from the API
|
|
98
|
+
* @param {TrunkSolution} solution - Path solution
|
|
99
|
+
*
|
|
100
|
+
* @returns TrunkPage
|
|
101
|
+
*/
|
|
102
|
+
/* jshint ignore:end */
|
|
103
|
+
TrunkPage = function TrunkPage(version, response, solution) {
|
|
104
|
+
// Path Solution
|
|
105
|
+
this._solution = solution;
|
|
106
|
+
|
|
107
|
+
Page.prototype.constructor.call(this, version, response, this._solution);
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
_.extend(TrunkPage.prototype, Page.prototype);
|
|
111
|
+
TrunkPage.prototype.constructor = TrunkPage;
|
|
112
|
+
|
|
113
|
+
/* jshint ignore:start */
|
|
114
|
+
/**
|
|
115
|
+
* Build an instance of TrunkInstance
|
|
116
|
+
*
|
|
117
|
+
* @function getInstance
|
|
118
|
+
* @memberof Twilio.Routes.V2.TrunkPage#
|
|
119
|
+
*
|
|
120
|
+
* @param {TrunkPayload} payload - Payload response from the API
|
|
121
|
+
*
|
|
122
|
+
* @returns TrunkInstance
|
|
123
|
+
*/
|
|
124
|
+
/* jshint ignore:end */
|
|
125
|
+
TrunkPage.prototype.getInstance = function getInstance(payload) {
|
|
126
|
+
return new TrunkInstance(this._version, payload);
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
/* jshint ignore:start */
|
|
130
|
+
/**
|
|
131
|
+
* Provide a user-friendly representation
|
|
132
|
+
*
|
|
133
|
+
* @function toJSON
|
|
134
|
+
* @memberof Twilio.Routes.V2.TrunkPage#
|
|
135
|
+
*
|
|
136
|
+
* @returns Object
|
|
137
|
+
*/
|
|
138
|
+
/* jshint ignore:end */
|
|
139
|
+
TrunkPage.prototype.toJSON = function toJSON() {
|
|
140
|
+
let clone = {};
|
|
141
|
+
_.forOwn(this, function(value, key) {
|
|
142
|
+
if (!_.startsWith(key, '_') && ! _.isFunction(value)) {
|
|
143
|
+
clone[key] = value;
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
return clone;
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
TrunkPage.prototype[util.inspect.custom] = function inspect(depth, options) {
|
|
150
|
+
return util.inspect(this.toJSON(), options);
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
/* jshint ignore:start */
|
|
155
|
+
/**
|
|
156
|
+
* Initialize the TrunkContext
|
|
157
|
+
*
|
|
158
|
+
* @constructor Twilio.Routes.V2.TrunkInstance
|
|
159
|
+
*
|
|
160
|
+
* @property {string} sipTrunkDomain - The SIP Trunk
|
|
161
|
+
* @property {string} url - The absolute URL of the resource
|
|
162
|
+
* @property {string} sid -
|
|
163
|
+
* A string that uniquely identifies the Inbound Processing Region assignments for this SIP Trunk.
|
|
164
|
+
* @property {string} accountSid - Account Sid.
|
|
165
|
+
* @property {string} friendlyName -
|
|
166
|
+
* A human readable description of the Inbound Processing Region assignments for this SIP Trunk.
|
|
167
|
+
* @property {string} voiceRegion -
|
|
168
|
+
* The Inbound Processing Region used for this SIP Trunk for voice.
|
|
169
|
+
* @property {Date} dateCreated -
|
|
170
|
+
* The date that this SIP Trunk was assigned an Inbound Processing Region.
|
|
171
|
+
* @property {Date} dateUpdated -
|
|
172
|
+
* The date that the Inbound Processing Region was updated for this SIP Trunk.
|
|
173
|
+
*
|
|
174
|
+
* @param {V2} version - Version of the resource
|
|
175
|
+
* @param {TrunkPayload} payload - The instance payload
|
|
176
|
+
* @param {string} sipTrunkDomain - The SIP Trunk
|
|
177
|
+
*/
|
|
178
|
+
/* jshint ignore:end */
|
|
179
|
+
TrunkInstance = function TrunkInstance(version, payload, sipTrunkDomain) {
|
|
180
|
+
this._version = version;
|
|
181
|
+
|
|
182
|
+
// Marshaled Properties
|
|
183
|
+
this.sipTrunkDomain = payload.sip_trunk_domain; // jshint ignore:line
|
|
184
|
+
this.url = payload.url; // jshint ignore:line
|
|
185
|
+
this.sid = payload.sid; // jshint ignore:line
|
|
186
|
+
this.accountSid = payload.account_sid; // jshint ignore:line
|
|
187
|
+
this.friendlyName = payload.friendly_name; // jshint ignore:line
|
|
188
|
+
this.voiceRegion = payload.voice_region; // jshint ignore:line
|
|
189
|
+
this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line
|
|
190
|
+
this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line
|
|
191
|
+
|
|
192
|
+
// Context
|
|
193
|
+
this._context = undefined;
|
|
194
|
+
this._solution = {sipTrunkDomain: sipTrunkDomain || this.sipTrunkDomain, };
|
|
195
|
+
};
|
|
196
|
+
|
|
197
|
+
Object.defineProperty(TrunkInstance.prototype,
|
|
198
|
+
'_proxy', {
|
|
199
|
+
get: function() {
|
|
200
|
+
if (!this._context) {
|
|
201
|
+
this._context = new TrunkContext(this._version, this._solution.sipTrunkDomain);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
return this._context;
|
|
205
|
+
}
|
|
206
|
+
});
|
|
207
|
+
|
|
208
|
+
/* jshint ignore:start */
|
|
209
|
+
/**
|
|
210
|
+
* create a TrunkInstance
|
|
211
|
+
*
|
|
212
|
+
* @function create
|
|
213
|
+
* @memberof Twilio.Routes.V2.TrunkInstance#
|
|
214
|
+
*
|
|
215
|
+
* @param {object} [opts] - Options for request
|
|
216
|
+
* @param {string} [opts.voiceRegion] -
|
|
217
|
+
* The Inbound Processing Region used for this SIP Trunk for voice
|
|
218
|
+
* @param {string} [opts.friendlyName] -
|
|
219
|
+
* A human readable description of this resource.
|
|
220
|
+
* @param {function} [callback] - Callback to handle processed record
|
|
221
|
+
*
|
|
222
|
+
* @returns {Promise} Resolves to processed TrunkInstance
|
|
223
|
+
*/
|
|
224
|
+
/* jshint ignore:end */
|
|
225
|
+
TrunkInstance.prototype.create = function create(opts, callback) {
|
|
226
|
+
return this._proxy.create(opts, callback);
|
|
227
|
+
};
|
|
228
|
+
|
|
229
|
+
/* jshint ignore:start */
|
|
230
|
+
/**
|
|
231
|
+
* update a TrunkInstance
|
|
232
|
+
*
|
|
233
|
+
* @function update
|
|
234
|
+
* @memberof Twilio.Routes.V2.TrunkInstance#
|
|
235
|
+
*
|
|
236
|
+
* @param {object} [opts] - Options for request
|
|
237
|
+
* @param {string} [opts.voiceRegion] -
|
|
238
|
+
* The Inbound Processing Region used for this SIP Trunk for voice
|
|
239
|
+
* @param {string} [opts.friendlyName] -
|
|
240
|
+
* A human readable description of this resource.
|
|
241
|
+
* @param {function} [callback] - Callback to handle processed record
|
|
242
|
+
*
|
|
243
|
+
* @returns {Promise} Resolves to processed TrunkInstance
|
|
244
|
+
*/
|
|
245
|
+
/* jshint ignore:end */
|
|
246
|
+
TrunkInstance.prototype.update = function update(opts, callback) {
|
|
247
|
+
return this._proxy.update(opts, callback);
|
|
248
|
+
};
|
|
249
|
+
|
|
250
|
+
/* jshint ignore:start */
|
|
251
|
+
/**
|
|
252
|
+
* fetch a TrunkInstance
|
|
253
|
+
*
|
|
254
|
+
* @function fetch
|
|
255
|
+
* @memberof Twilio.Routes.V2.TrunkInstance#
|
|
256
|
+
*
|
|
257
|
+
* @param {function} [callback] - Callback to handle processed record
|
|
258
|
+
*
|
|
259
|
+
* @returns {Promise} Resolves to processed TrunkInstance
|
|
260
|
+
*/
|
|
261
|
+
/* jshint ignore:end */
|
|
262
|
+
TrunkInstance.prototype.fetch = function fetch(callback) {
|
|
263
|
+
return this._proxy.fetch(callback);
|
|
264
|
+
};
|
|
265
|
+
|
|
266
|
+
/* jshint ignore:start */
|
|
267
|
+
/**
|
|
268
|
+
* Provide a user-friendly representation
|
|
269
|
+
*
|
|
270
|
+
* @function toJSON
|
|
271
|
+
* @memberof Twilio.Routes.V2.TrunkInstance#
|
|
272
|
+
*
|
|
273
|
+
* @returns Object
|
|
274
|
+
*/
|
|
275
|
+
/* jshint ignore:end */
|
|
276
|
+
TrunkInstance.prototype.toJSON = function toJSON() {
|
|
277
|
+
let clone = {};
|
|
278
|
+
_.forOwn(this, function(value, key) {
|
|
279
|
+
if (!_.startsWith(key, '_') && ! _.isFunction(value)) {
|
|
280
|
+
clone[key] = value;
|
|
281
|
+
}
|
|
282
|
+
});
|
|
283
|
+
return clone;
|
|
284
|
+
};
|
|
285
|
+
|
|
286
|
+
TrunkInstance.prototype[util.inspect.custom] = function inspect(depth, options)
|
|
287
|
+
{
|
|
288
|
+
return util.inspect(this.toJSON(), options);
|
|
289
|
+
};
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
/* jshint ignore:start */
|
|
293
|
+
/**
|
|
294
|
+
* Initialize the TrunkContext
|
|
295
|
+
*
|
|
296
|
+
* @constructor Twilio.Routes.V2.TrunkContext
|
|
297
|
+
*
|
|
298
|
+
* @param {V2} version - Version of the resource
|
|
299
|
+
* @param {string} sipTrunkDomain - The SIP Trunk
|
|
300
|
+
*/
|
|
301
|
+
/* jshint ignore:end */
|
|
302
|
+
TrunkContext = function TrunkContext(version, sipTrunkDomain) {
|
|
303
|
+
this._version = version;
|
|
304
|
+
|
|
305
|
+
// Path Solution
|
|
306
|
+
this._solution = {sipTrunkDomain: sipTrunkDomain, };
|
|
307
|
+
this._uri = `/Trunks/${sipTrunkDomain}`;
|
|
308
|
+
};
|
|
309
|
+
|
|
310
|
+
/* jshint ignore:start */
|
|
311
|
+
/**
|
|
312
|
+
* create a TrunkInstance
|
|
313
|
+
*
|
|
314
|
+
* @function create
|
|
315
|
+
* @memberof Twilio.Routes.V2.TrunkContext#
|
|
316
|
+
*
|
|
317
|
+
* @param {object} [opts] - Options for request
|
|
318
|
+
* @param {string} [opts.voiceRegion] -
|
|
319
|
+
* The Inbound Processing Region used for this SIP Trunk for voice
|
|
320
|
+
* @param {string} [opts.friendlyName] -
|
|
321
|
+
* A human readable description of this resource.
|
|
322
|
+
* @param {function} [callback] - Callback to handle processed record
|
|
323
|
+
*
|
|
324
|
+
* @returns {Promise} Resolves to processed TrunkInstance
|
|
325
|
+
*/
|
|
326
|
+
/* jshint ignore:end */
|
|
327
|
+
TrunkContext.prototype.create = function create(opts, callback) {
|
|
328
|
+
if (_.isFunction(opts)) {
|
|
329
|
+
callback = opts;
|
|
330
|
+
opts = {};
|
|
331
|
+
}
|
|
332
|
+
opts = opts || {};
|
|
333
|
+
|
|
334
|
+
var deferred = Q.defer();
|
|
335
|
+
var data = values.of({
|
|
336
|
+
'VoiceRegion': _.get(opts, 'voiceRegion'),
|
|
337
|
+
'FriendlyName': _.get(opts, 'friendlyName')
|
|
338
|
+
});
|
|
339
|
+
|
|
340
|
+
var promise = this._version.create({uri: this._uri, method: 'POST', data: data});
|
|
341
|
+
|
|
342
|
+
promise = promise.then(function(payload) {
|
|
343
|
+
deferred.resolve(new TrunkInstance(this._version, payload, this._solution.sipTrunkDomain));
|
|
344
|
+
}.bind(this));
|
|
345
|
+
|
|
346
|
+
promise.catch(function(error) {
|
|
347
|
+
deferred.reject(error);
|
|
348
|
+
});
|
|
349
|
+
|
|
350
|
+
if (_.isFunction(callback)) {
|
|
351
|
+
deferred.promise.nodeify(callback);
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
return deferred.promise;
|
|
355
|
+
};
|
|
356
|
+
|
|
357
|
+
/* jshint ignore:start */
|
|
358
|
+
/**
|
|
359
|
+
* update a TrunkInstance
|
|
360
|
+
*
|
|
361
|
+
* @function update
|
|
362
|
+
* @memberof Twilio.Routes.V2.TrunkContext#
|
|
363
|
+
*
|
|
364
|
+
* @param {object} [opts] - Options for request
|
|
365
|
+
* @param {string} [opts.voiceRegion] -
|
|
366
|
+
* The Inbound Processing Region used for this SIP Trunk for voice
|
|
367
|
+
* @param {string} [opts.friendlyName] -
|
|
368
|
+
* A human readable description of this resource.
|
|
369
|
+
* @param {function} [callback] - Callback to handle processed record
|
|
370
|
+
*
|
|
371
|
+
* @returns {Promise} Resolves to processed TrunkInstance
|
|
372
|
+
*/
|
|
373
|
+
/* jshint ignore:end */
|
|
374
|
+
TrunkContext.prototype.update = function update(opts, callback) {
|
|
375
|
+
if (_.isFunction(opts)) {
|
|
376
|
+
callback = opts;
|
|
377
|
+
opts = {};
|
|
378
|
+
}
|
|
379
|
+
opts = opts || {};
|
|
380
|
+
|
|
381
|
+
var deferred = Q.defer();
|
|
382
|
+
var data = values.of({
|
|
383
|
+
'VoiceRegion': _.get(opts, 'voiceRegion'),
|
|
384
|
+
'FriendlyName': _.get(opts, 'friendlyName')
|
|
385
|
+
});
|
|
386
|
+
|
|
387
|
+
var promise = this._version.update({uri: this._uri, method: 'POST', data: data});
|
|
388
|
+
|
|
389
|
+
promise = promise.then(function(payload) {
|
|
390
|
+
deferred.resolve(new TrunkInstance(this._version, payload, this._solution.sipTrunkDomain));
|
|
391
|
+
}.bind(this));
|
|
392
|
+
|
|
393
|
+
promise.catch(function(error) {
|
|
394
|
+
deferred.reject(error);
|
|
395
|
+
});
|
|
396
|
+
|
|
397
|
+
if (_.isFunction(callback)) {
|
|
398
|
+
deferred.promise.nodeify(callback);
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
return deferred.promise;
|
|
402
|
+
};
|
|
403
|
+
|
|
404
|
+
/* jshint ignore:start */
|
|
405
|
+
/**
|
|
406
|
+
* fetch a TrunkInstance
|
|
407
|
+
*
|
|
408
|
+
* @function fetch
|
|
409
|
+
* @memberof Twilio.Routes.V2.TrunkContext#
|
|
410
|
+
*
|
|
411
|
+
* @param {function} [callback] - Callback to handle processed record
|
|
412
|
+
*
|
|
413
|
+
* @returns {Promise} Resolves to processed TrunkInstance
|
|
414
|
+
*/
|
|
415
|
+
/* jshint ignore:end */
|
|
416
|
+
TrunkContext.prototype.fetch = function fetch(callback) {
|
|
417
|
+
var deferred = Q.defer();
|
|
418
|
+
var promise = this._version.fetch({uri: this._uri, method: 'GET'});
|
|
419
|
+
|
|
420
|
+
promise = promise.then(function(payload) {
|
|
421
|
+
deferred.resolve(new TrunkInstance(this._version, payload, this._solution.sipTrunkDomain));
|
|
422
|
+
}.bind(this));
|
|
423
|
+
|
|
424
|
+
promise.catch(function(error) {
|
|
425
|
+
deferred.reject(error);
|
|
426
|
+
});
|
|
427
|
+
|
|
428
|
+
if (_.isFunction(callback)) {
|
|
429
|
+
deferred.promise.nodeify(callback);
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
return deferred.promise;
|
|
433
|
+
};
|
|
434
|
+
|
|
435
|
+
/* jshint ignore:start */
|
|
436
|
+
/**
|
|
437
|
+
* Provide a user-friendly representation
|
|
438
|
+
*
|
|
439
|
+
* @function toJSON
|
|
440
|
+
* @memberof Twilio.Routes.V2.TrunkContext#
|
|
441
|
+
*
|
|
442
|
+
* @returns Object
|
|
443
|
+
*/
|
|
444
|
+
/* jshint ignore:end */
|
|
445
|
+
TrunkContext.prototype.toJSON = function toJSON() {
|
|
446
|
+
return this._solution;
|
|
447
|
+
};
|
|
448
|
+
|
|
449
|
+
TrunkContext.prototype[util.inspect.custom] = function inspect(depth, options) {
|
|
450
|
+
return util.inspect(this.toJSON(), options);
|
|
451
|
+
};
|
|
452
|
+
|
|
453
|
+
module.exports = {
|
|
454
|
+
TrunkList: TrunkList,
|
|
455
|
+
TrunkPage: TrunkPage,
|
|
456
|
+
TrunkInstance: TrunkInstance,
|
|
457
|
+
TrunkContext: TrunkContext
|
|
458
|
+
};
|
|
@@ -25,6 +25,7 @@ declare function FleetList(version: V1): FleetListInstance;
|
|
|
25
25
|
/**
|
|
26
26
|
* Options to pass to update
|
|
27
27
|
*
|
|
28
|
+
* @property dataLimit - The total data usage (download and upload combined) in Megabytes that each Super SIM assigned to the Fleet can consume
|
|
28
29
|
* @property ipCommandsMethod - A string representing the HTTP method to use when making a request to `ip_commands_url`
|
|
29
30
|
* @property ipCommandsUrl - The URL that will receive a webhook when a Super SIM in the Fleet is used to send an IP Command from your device
|
|
30
31
|
* @property networkAccessProfile - The SID or unique name of the Network Access Profile of the Fleet
|
|
@@ -33,6 +34,7 @@ declare function FleetList(version: V1): FleetListInstance;
|
|
|
33
34
|
* @property uniqueName - An application-defined string that uniquely identifies the resource
|
|
34
35
|
*/
|
|
35
36
|
interface FleetInstanceUpdateOptions {
|
|
37
|
+
dataLimit?: number;
|
|
36
38
|
ipCommandsMethod?: string;
|
|
37
39
|
ipCommandsUrl?: string;
|
|
38
40
|
networkAccessProfile?: string;
|
|
@@ -165,7 +167,7 @@ interface FleetListInstance {
|
|
|
165
167
|
* Options to pass to create
|
|
166
168
|
*
|
|
167
169
|
* @property dataEnabled - Defines whether SIMs in the Fleet are capable of using data connectivity
|
|
168
|
-
* @property dataLimit - The total data usage (download and upload combined) in Megabytes that each
|
|
170
|
+
* @property dataLimit - The total data usage (download and upload combined) in Megabytes that each Super SIM resource assigned to the Fleet can consume
|
|
169
171
|
* @property ipCommandsMethod - A string representing the HTTP method to use when making a request to `ip_commands_url`
|
|
170
172
|
* @property ipCommandsUrl - The URL that will receive a webhook when a Super SIM in the Fleet is used to send an IP Command from your device
|
|
171
173
|
* @property networkAccessProfile - The SID or unique name of the Network Access Profile of the Fleet
|
|
@@ -69,7 +69,7 @@ FleetList = function FleetList(version) {
|
|
|
69
69
|
* @param {boolean} [opts.dataEnabled] -
|
|
70
70
|
* Defines whether SIMs in the Fleet are capable of using data connectivity
|
|
71
71
|
* @param {number} [opts.dataLimit] -
|
|
72
|
-
* The total data usage (download and upload combined) in Megabytes that each
|
|
72
|
+
* The total data usage (download and upload combined) in Megabytes that each Super SIM resource assigned to the Fleet can consume
|
|
73
73
|
* @param {string} [opts.ipCommandsUrl] -
|
|
74
74
|
* The URL that will receive a webhook when a Super SIM in the Fleet is used to send an IP Command from your device
|
|
75
75
|
* @param {string} [opts.ipCommandsMethod] -
|
|
@@ -500,7 +500,7 @@ FleetPage.prototype[util.inspect.custom] = function inspect(depth, options) {
|
|
|
500
500
|
* @property {boolean} dataEnabled -
|
|
501
501
|
* Defines whether SIMs in the Fleet are capable of using data connectivity
|
|
502
502
|
* @property {number} dataLimit -
|
|
503
|
-
* The total data usage (download and upload combined) in Megabytes that each
|
|
503
|
+
* The total data usage (download and upload combined) in Megabytes that each Super SIM assigned to the Fleet can consume
|
|
504
504
|
* @property {fleet.data_metering} dataMetering -
|
|
505
505
|
* The model by which a SIM is metered and billed
|
|
506
506
|
* @property {boolean} smsCommandsEnabled -
|
|
@@ -593,6 +593,8 @@ FleetInstance.prototype.fetch = function fetch(callback) {
|
|
|
593
593
|
* The URL that will receive a webhook when a Super SIM in the Fleet is used to send an SMS from your device to the SMS Commands number
|
|
594
594
|
* @param {string} [opts.smsCommandsMethod] -
|
|
595
595
|
* A string representing the HTTP method to use when making a request to `sms_commands_url`
|
|
596
|
+
* @param {number} [opts.dataLimit] -
|
|
597
|
+
* The total data usage (download and upload combined) in Megabytes that each Super SIM assigned to the Fleet can consume
|
|
596
598
|
* @param {function} [callback] - Callback to handle processed record
|
|
597
599
|
*
|
|
598
600
|
* @returns {Promise} Resolves to processed FleetInstance
|
|
@@ -700,6 +702,8 @@ FleetContext.prototype.fetch = function fetch(callback) {
|
|
|
700
702
|
* The URL that will receive a webhook when a Super SIM in the Fleet is used to send an SMS from your device to the SMS Commands number
|
|
701
703
|
* @param {string} [opts.smsCommandsMethod] -
|
|
702
704
|
* A string representing the HTTP method to use when making a request to `sms_commands_url`
|
|
705
|
+
* @param {number} [opts.dataLimit] -
|
|
706
|
+
* The total data usage (download and upload combined) in Megabytes that each Super SIM assigned to the Fleet can consume
|
|
703
707
|
* @param {function} [callback] - Callback to handle processed record
|
|
704
708
|
*
|
|
705
709
|
* @returns {Promise} Resolves to processed FleetInstance
|
|
@@ -719,7 +723,8 @@ FleetContext.prototype.update = function update(opts, callback) {
|
|
|
719
723
|
'IpCommandsUrl': _.get(opts, 'ipCommandsUrl'),
|
|
720
724
|
'IpCommandsMethod': _.get(opts, 'ipCommandsMethod'),
|
|
721
725
|
'SmsCommandsUrl': _.get(opts, 'smsCommandsUrl'),
|
|
722
|
-
'SmsCommandsMethod': _.get(opts, 'smsCommandsMethod')
|
|
726
|
+
'SmsCommandsMethod': _.get(opts, 'smsCommandsMethod'),
|
|
727
|
+
'DataLimit': _.get(opts, 'dataLimit')
|
|
723
728
|
});
|
|
724
729
|
|
|
725
730
|
var promise = this._version.update({uri: this._uri, method: 'POST', data: data});
|
package/package.json
CHANGED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This code was generated by
|
|
3
|
-
* \ / _ _ _| _ _
|
|
4
|
-
* | (_)\/(_)(_|\/| |(/_ v1.0.0
|
|
5
|
-
* / /
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import Preview = require('../Preview');
|
|
9
|
-
import Version = require('../../base/Version');
|
|
10
|
-
import { ExportConfigurationList } from './bulk_exports/exportConfiguration';
|
|
11
|
-
import { ExportConfigurationListInstance } from './bulk_exports/exportConfiguration';
|
|
12
|
-
import { ExportList } from './bulk_exports/export';
|
|
13
|
-
import { ExportListInstance } from './bulk_exports/export';
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
declare class BulkExports extends Version {
|
|
17
|
-
/**
|
|
18
|
-
* Initialize the BulkExports version of Preview
|
|
19
|
-
*
|
|
20
|
-
* @param domain - The twilio domain
|
|
21
|
-
*/
|
|
22
|
-
constructor(domain: Preview);
|
|
23
|
-
|
|
24
|
-
readonly exportConfiguration: ExportConfigurationListInstance;
|
|
25
|
-
readonly exports: ExportListInstance;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export = BulkExports;
|
|
@@ -1,59 +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 _ = require('lodash'); /* jshint ignore:line */
|
|
13
|
-
var ExportConfigurationList = require(
|
|
14
|
-
'./bulk_exports/exportConfiguration').ExportConfigurationList;
|
|
15
|
-
var ExportList = require('./bulk_exports/export').ExportList;
|
|
16
|
-
var Version = require('../../base/Version'); /* jshint ignore:line */
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
/* jshint ignore:start */
|
|
20
|
-
/**
|
|
21
|
-
* Initialize the BulkExports version of Preview
|
|
22
|
-
*
|
|
23
|
-
* @constructor Twilio.Preview.BulkExports
|
|
24
|
-
*
|
|
25
|
-
* @property {Twilio.Preview.BulkExports.ExportList} exports - exports resource
|
|
26
|
-
* @property {Twilio.Preview.BulkExports.ExportConfigurationList} exportConfiguration -
|
|
27
|
-
* exportConfiguration resource
|
|
28
|
-
*
|
|
29
|
-
* @param {Twilio.Preview} domain - The twilio domain
|
|
30
|
-
*/
|
|
31
|
-
/* jshint ignore:end */
|
|
32
|
-
function BulkExports(domain) {
|
|
33
|
-
Version.prototype.constructor.call(this, domain, 'BulkExports');
|
|
34
|
-
|
|
35
|
-
// Resources
|
|
36
|
-
this._exports = undefined;
|
|
37
|
-
this._exportConfiguration = undefined;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
_.extend(BulkExports.prototype, Version.prototype);
|
|
41
|
-
BulkExports.prototype.constructor = BulkExports;
|
|
42
|
-
|
|
43
|
-
Object.defineProperty(BulkExports.prototype,
|
|
44
|
-
'exports', {
|
|
45
|
-
get: function() {
|
|
46
|
-
this._exports = this._exports || new ExportList(this);
|
|
47
|
-
return this._exports;
|
|
48
|
-
}
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
Object.defineProperty(BulkExports.prototype,
|
|
52
|
-
'exportConfiguration', {
|
|
53
|
-
get: function() {
|
|
54
|
-
this._exportConfiguration = this._exportConfiguration || new ExportConfigurationList(this);
|
|
55
|
-
return this._exportConfiguration;
|
|
56
|
-
}
|
|
57
|
-
});
|
|
58
|
-
|
|
59
|
-
module.exports = BulkExports;
|