twilio 3.82.2 → 3.83.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 (61) hide show
  1. package/lib/rest/Oauth.d.ts +32 -0
  2. package/lib/rest/Oauth.js +79 -0
  3. package/lib/rest/Supersim.d.ts +2 -0
  4. package/lib/rest/Supersim.js +9 -0
  5. package/lib/rest/Twilio.d.ts +2 -0
  6. package/lib/rest/Twilio.js +14 -0
  7. package/lib/rest/api/v2010/account/call/userDefinedMessage.d.ts +107 -0
  8. package/lib/rest/api/v2010/account/call/userDefinedMessage.js +259 -0
  9. package/lib/rest/api/v2010/account/call/userDefinedMessageSubscription.d.ts +153 -0
  10. package/lib/rest/api/v2010/account/call/userDefinedMessageSubscription.js +407 -0
  11. package/lib/rest/api/v2010/account/call.d.ts +14 -0
  12. package/lib/rest/api/v2010/account/call.js +67 -0
  13. package/lib/rest/api/v2010/account/conference/participant.d.ts +2 -2
  14. package/lib/rest/api/v2010/account/conference/participant.js +6 -4
  15. package/lib/rest/api/v2010/account/message.d.ts +6 -0
  16. package/lib/rest/api/v2010/account/message.js +10 -1
  17. package/lib/rest/oauth/V1.d.ts +34 -0
  18. package/lib/rest/oauth/V1.js +80 -0
  19. package/lib/rest/oauth/v1/oauth.d.ts +115 -0
  20. package/lib/rest/oauth/v1/oauth.js +299 -0
  21. package/lib/rest/oauth/v1/openidDiscovery.d.ts +137 -0
  22. package/lib/rest/oauth/v1/openidDiscovery.js +329 -0
  23. package/lib/rest/oauth/v1/token.d.ts +115 -0
  24. package/lib/rest/oauth/v1/token.js +265 -0
  25. package/lib/rest/oauth/v1/userInfo.d.ts +123 -0
  26. package/lib/rest/oauth/v1/userInfo.js +308 -0
  27. package/lib/rest/proxy/v1/service/session/participant.d.ts +0 -2
  28. package/lib/rest/proxy/v1/service/session/participant.js +1 -6
  29. package/lib/rest/proxy/v1/service/session.d.ts +0 -4
  30. package/lib/rest/proxy/v1/service/session.js +2 -10
  31. package/lib/rest/supersim/V1.d.ts +3 -0
  32. package/lib/rest/supersim/V1.js +12 -0
  33. package/lib/rest/supersim/v1/settingsUpdate.d.ts +261 -0
  34. package/lib/rest/supersim/v1/settingsUpdate.js +466 -0
  35. package/lib/rest/taskrouter/v1/workspace/task/reservation.d.ts +6 -0
  36. package/lib/rest/taskrouter/v1/workspace/task/reservation.js +7 -0
  37. package/lib/rest/taskrouter/v1/workspace/taskQueue.d.ts +6 -0
  38. package/lib/rest/taskrouter/v1/workspace/taskQueue.js +4 -0
  39. package/lib/rest/taskrouter/v1/workspace/worker.d.ts +6 -0
  40. package/lib/rest/taskrouter/v1/workspace/worker.js +4 -0
  41. package/lib/rest/verify/v2/service/accessToken.d.ts +0 -12
  42. package/lib/rest/verify/v2/service/accessToken.js +0 -12
  43. package/lib/rest/verify/v2/service/entity/challenge/notification.d.ts +0 -9
  44. package/lib/rest/verify/v2/service/entity/challenge/notification.js +0 -9
  45. package/lib/rest/verify/v2/service/entity/challenge.d.ts +0 -12
  46. package/lib/rest/verify/v2/service/entity/challenge.js +0 -12
  47. package/lib/rest/verify/v2/service/entity/factor.d.ts +0 -12
  48. package/lib/rest/verify/v2/service/entity/factor.js +0 -12
  49. package/lib/rest/verify/v2/service/entity/newFactor.d.ts +0 -9
  50. package/lib/rest/verify/v2/service/entity/newFactor.js +0 -9
  51. package/lib/rest/verify/v2/service/entity.d.ts +0 -12
  52. package/lib/rest/verify/v2/service/entity.js +0 -12
  53. package/lib/rest/verify/v2/service/verification.d.ts +1 -1
  54. package/lib/rest/verify/v2/service/verification.js +2 -1
  55. package/lib/rest/verify/v2/service/webhook.d.ts +0 -12
  56. package/lib/rest/verify/v2/service/webhook.js +0 -12
  57. package/lib/rest/verify/v2/template.d.ts +2 -0
  58. package/lib/rest/verify/v2/template.js +2 -0
  59. package/lib/twiml/VoiceResponse.d.ts +7 -1
  60. package/lib/twiml/VoiceResponse.js +6 -0
  61. package/package.json +1 -1
@@ -0,0 +1,466 @@
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 SettingsUpdateList;
21
+ var SettingsUpdatePage;
22
+ var SettingsUpdateInstance;
23
+
24
+ /* jshint ignore:start */
25
+ /**
26
+ * Initialize the SettingsUpdateList
27
+ *
28
+ * PLEASE NOTE that this class contains beta products that are subject to change.
29
+ * Use them with caution.
30
+ *
31
+ * @constructor Twilio.Supersim.V1.SettingsUpdateList
32
+ *
33
+ * @param {Twilio.Supersim.V1} version - Version of the resource
34
+ */
35
+ /* jshint ignore:end */
36
+ SettingsUpdateList = function SettingsUpdateList(version) {
37
+ /* jshint ignore:start */
38
+ /**
39
+ * @function settingsUpdates
40
+ * @memberof Twilio.Supersim.V1#
41
+ *
42
+ * @param {string} sid - sid of instance
43
+ *
44
+ * @returns {Twilio.Supersim.V1.SettingsUpdateContext}
45
+ */
46
+ /* jshint ignore:end */
47
+ function SettingsUpdateListInstance(sid) {
48
+ return SettingsUpdateListInstance.get(sid);
49
+ }
50
+
51
+ SettingsUpdateListInstance._version = version;
52
+ // Path Solution
53
+ SettingsUpdateListInstance._solution = {};
54
+ SettingsUpdateListInstance._uri = `/SettingsUpdates`;
55
+ /* jshint ignore:start */
56
+ /**
57
+ * Streams SettingsUpdateInstance records from the API.
58
+ *
59
+ * This operation lazily loads records as efficiently as possible until the limit
60
+ * is reached.
61
+ *
62
+ * The results are passed into the callback function, so this operation is memory
63
+ * efficient.
64
+ *
65
+ * If a function is passed as the first argument, it will be used as the callback
66
+ * function.
67
+ *
68
+ * @function each
69
+ * @memberof Twilio.Supersim.V1.SettingsUpdateList#
70
+ *
71
+ * @param {object} [opts] - Options for request
72
+ * @param {string} [opts.sim] - Filter the Settings Updates by Super SIM
73
+ * @param {number} [opts.limit] -
74
+ * Upper limit for the number of records to return.
75
+ * each() guarantees never to return more than limit.
76
+ * Default is no limit
77
+ * @param {number} [opts.pageSize] -
78
+ * Number of records to fetch per request,
79
+ * when not set will use the default value of 50 records.
80
+ * If no pageSize is defined but a limit is defined,
81
+ * each() will attempt to read the limit with the most efficient
82
+ * page size, i.e. min(limit, 1000)
83
+ * @param {Function} [opts.callback] -
84
+ * Function to process each record. If this and a positional
85
+ * callback are passed, this one will be used
86
+ * @param {Function} [opts.done] -
87
+ * Function to be called upon completion of streaming
88
+ * @param {Function} [callback] - Function to process each record
89
+ */
90
+ /* jshint ignore:end */
91
+ SettingsUpdateListInstance.each = function each(opts, callback) {
92
+ if (_.isFunction(opts)) {
93
+ callback = opts;
94
+ opts = {};
95
+ }
96
+ opts = opts || {};
97
+ if (opts.callback) {
98
+ callback = opts.callback;
99
+ }
100
+ if (_.isUndefined(callback)) {
101
+ throw new Error('Callback function must be provided');
102
+ }
103
+
104
+ var done = false;
105
+ var currentPage = 1;
106
+ var currentResource = 0;
107
+ var limits = this._version.readLimits({
108
+ limit: opts.limit,
109
+ pageSize: opts.pageSize
110
+ });
111
+
112
+ function onComplete(error) {
113
+ done = true;
114
+ if (_.isFunction(opts.done)) {
115
+ opts.done(error);
116
+ }
117
+ }
118
+
119
+ function fetchNextPage(fn) {
120
+ var promise = fn();
121
+ if (_.isUndefined(promise)) {
122
+ onComplete();
123
+ return;
124
+ }
125
+
126
+ promise.then(function(page) {
127
+ _.each(page.instances, function(instance) {
128
+ if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {
129
+ done = true;
130
+ return false;
131
+ }
132
+
133
+ currentResource++;
134
+ callback(instance, onComplete);
135
+ });
136
+
137
+ if (!done) {
138
+ currentPage++;
139
+ fetchNextPage(_.bind(page.nextPage, page));
140
+ } else {
141
+ onComplete();
142
+ }
143
+ });
144
+
145
+ promise.catch(onComplete);
146
+ }
147
+
148
+ fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));
149
+ };
150
+
151
+ /* jshint ignore:start */
152
+ /**
153
+ * Lists SettingsUpdateInstance records from the API as a list.
154
+ *
155
+ * If a function is passed as the first argument, it will be used as the callback
156
+ * function.
157
+ *
158
+ * @function list
159
+ * @memberof Twilio.Supersim.V1.SettingsUpdateList#
160
+ *
161
+ * @param {object} [opts] - Options for request
162
+ * @param {string} [opts.sim] - Filter the Settings Updates by Super SIM
163
+ * @param {number} [opts.limit] -
164
+ * Upper limit for the number of records to return.
165
+ * list() guarantees never to return more than limit.
166
+ * Default is no limit
167
+ * @param {number} [opts.pageSize] -
168
+ * Number of records to fetch per request,
169
+ * when not set will use the default value of 50 records.
170
+ * If no page_size is defined but a limit is defined,
171
+ * list() will attempt to read the limit with the most
172
+ * efficient page size, i.e. min(limit, 1000)
173
+ * @param {function} [callback] - Callback to handle list of records
174
+ *
175
+ * @returns {Promise} Resolves to a list of records
176
+ */
177
+ /* jshint ignore:end */
178
+ SettingsUpdateListInstance.list = function list(opts, callback) {
179
+ if (_.isFunction(opts)) {
180
+ callback = opts;
181
+ opts = {};
182
+ }
183
+ opts = opts || {};
184
+ var deferred = Q.defer();
185
+ var allResources = [];
186
+ opts.callback = function(resource, done) {
187
+ allResources.push(resource);
188
+
189
+ if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {
190
+ done();
191
+ }
192
+ };
193
+
194
+ opts.done = function(error) {
195
+ if (_.isUndefined(error)) {
196
+ deferred.resolve(allResources);
197
+ } else {
198
+ deferred.reject(error);
199
+ }
200
+ };
201
+
202
+ if (_.isFunction(callback)) {
203
+ deferred.promise.nodeify(callback);
204
+ }
205
+
206
+ this.each(opts);
207
+ return deferred.promise;
208
+ };
209
+
210
+ /* jshint ignore:start */
211
+ /**
212
+ * Retrieve a single page of SettingsUpdateInstance records from the API.
213
+ *
214
+ * The request is executed immediately.
215
+ *
216
+ * If a function is passed as the first argument, it will be used as the callback
217
+ * function.
218
+ *
219
+ * @function page
220
+ * @memberof Twilio.Supersim.V1.SettingsUpdateList#
221
+ *
222
+ * @param {object} [opts] - Options for request
223
+ * @param {string} [opts.sim] - Filter the Settings Updates by Super SIM
224
+ * @param {string} [opts.pageToken] - PageToken provided by the API
225
+ * @param {number} [opts.pageNumber] -
226
+ * Page Number, this value is simply for client state
227
+ * @param {number} [opts.pageSize] - Number of records to return, defaults to 50
228
+ * @param {function} [callback] - Callback to handle list of records
229
+ *
230
+ * @returns {Promise} Resolves to a list of records
231
+ */
232
+ /* jshint ignore:end */
233
+ SettingsUpdateListInstance.page = function page(opts, callback) {
234
+ if (_.isFunction(opts)) {
235
+ callback = opts;
236
+ opts = {};
237
+ }
238
+ opts = opts || {};
239
+
240
+ var deferred = Q.defer();
241
+ var data = values.of({
242
+ 'Sim': _.get(opts, 'sim'),
243
+ 'PageToken': opts.pageToken,
244
+ 'Page': opts.pageNumber,
245
+ 'PageSize': opts.pageSize
246
+ });
247
+
248
+ var promise = this._version.page({uri: this._uri, method: 'GET', params: data});
249
+
250
+ promise = promise.then(function(payload) {
251
+ deferred.resolve(new SettingsUpdatePage(this._version, payload, this._solution));
252
+ }.bind(this));
253
+
254
+ promise.catch(function(error) {
255
+ deferred.reject(error);
256
+ });
257
+
258
+ if (_.isFunction(callback)) {
259
+ deferred.promise.nodeify(callback);
260
+ }
261
+
262
+ return deferred.promise;
263
+ };
264
+
265
+ /* jshint ignore:start */
266
+ /**
267
+ * Retrieve a single target page of SettingsUpdateInstance records from the API.
268
+ *
269
+ * The request is executed immediately.
270
+ *
271
+ * If a function is passed as the first argument, it will be used as the callback
272
+ * function.
273
+ *
274
+ * @function getPage
275
+ * @memberof Twilio.Supersim.V1.SettingsUpdateList#
276
+ *
277
+ * @param {string} [targetUrl] - API-generated URL for the requested results page
278
+ * @param {function} [callback] - Callback to handle list of records
279
+ *
280
+ * @returns {Promise} Resolves to a list of records
281
+ */
282
+ /* jshint ignore:end */
283
+ SettingsUpdateListInstance.getPage = function getPage(targetUrl, callback) {
284
+ var deferred = Q.defer();
285
+
286
+ var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});
287
+
288
+ promise = promise.then(function(payload) {
289
+ deferred.resolve(new SettingsUpdatePage(this._version, payload, this._solution));
290
+ }.bind(this));
291
+
292
+ promise.catch(function(error) {
293
+ deferred.reject(error);
294
+ });
295
+
296
+ if (_.isFunction(callback)) {
297
+ deferred.promise.nodeify(callback);
298
+ }
299
+
300
+ return deferred.promise;
301
+ };
302
+
303
+ /* jshint ignore:start */
304
+ /**
305
+ * Provide a user-friendly representation
306
+ *
307
+ * @function toJSON
308
+ * @memberof Twilio.Supersim.V1.SettingsUpdateList#
309
+ *
310
+ * @returns Object
311
+ */
312
+ /* jshint ignore:end */
313
+ SettingsUpdateListInstance.toJSON = function toJSON() {
314
+ return this._solution;
315
+ };
316
+
317
+ SettingsUpdateListInstance[util.inspect.custom] = function inspect(depth,
318
+ options) {
319
+ return util.inspect(this.toJSON(), options);
320
+ };
321
+
322
+ return SettingsUpdateListInstance;
323
+ };
324
+
325
+
326
+ /* jshint ignore:start */
327
+ /**
328
+ * Initialize the SettingsUpdatePage
329
+ *
330
+ * PLEASE NOTE that this class contains beta products that are subject to change.
331
+ * Use them with caution.
332
+ *
333
+ * @constructor Twilio.Supersim.V1.SettingsUpdatePage
334
+ *
335
+ * @param {V1} version - Version of the resource
336
+ * @param {Response<string>} response - Response from the API
337
+ * @param {SettingsUpdateSolution} solution - Path solution
338
+ *
339
+ * @returns SettingsUpdatePage
340
+ */
341
+ /* jshint ignore:end */
342
+ SettingsUpdatePage = function SettingsUpdatePage(version, response, solution) {
343
+ // Path Solution
344
+ this._solution = solution;
345
+
346
+ Page.prototype.constructor.call(this, version, response, this._solution);
347
+ };
348
+
349
+ _.extend(SettingsUpdatePage.prototype, Page.prototype);
350
+ SettingsUpdatePage.prototype.constructor = SettingsUpdatePage;
351
+
352
+ /* jshint ignore:start */
353
+ /**
354
+ * Build an instance of SettingsUpdateInstance
355
+ *
356
+ * @function getInstance
357
+ * @memberof Twilio.Supersim.V1.SettingsUpdatePage#
358
+ *
359
+ * @param {SettingsUpdatePayload} payload - Payload response from the API
360
+ *
361
+ * @returns SettingsUpdateInstance
362
+ */
363
+ /* jshint ignore:end */
364
+ SettingsUpdatePage.prototype.getInstance = function getInstance(payload) {
365
+ return new SettingsUpdateInstance(this._version, payload);
366
+ };
367
+
368
+ /* jshint ignore:start */
369
+ /**
370
+ * Provide a user-friendly representation
371
+ *
372
+ * @function toJSON
373
+ * @memberof Twilio.Supersim.V1.SettingsUpdatePage#
374
+ *
375
+ * @returns Object
376
+ */
377
+ /* jshint ignore:end */
378
+ SettingsUpdatePage.prototype.toJSON = function toJSON() {
379
+ let clone = {};
380
+ _.forOwn(this, function(value, key) {
381
+ if (!_.startsWith(key, '_') && ! _.isFunction(value)) {
382
+ clone[key] = value;
383
+ }
384
+ });
385
+ return clone;
386
+ };
387
+
388
+ SettingsUpdatePage.prototype[util.inspect.custom] = function inspect(depth,
389
+ options) {
390
+ return util.inspect(this.toJSON(), options);
391
+ };
392
+
393
+
394
+ /* jshint ignore:start */
395
+ /**
396
+ * Initialize the SettingsUpdateContext
397
+ *
398
+ * PLEASE NOTE that this class contains beta products that are subject to change.
399
+ * Use them with caution.
400
+ *
401
+ * @constructor Twilio.Supersim.V1.SettingsUpdateInstance
402
+ *
403
+ * @property {string} sid - The unique identifier of this Settings Update
404
+ * @property {string} iccid - The ICCID associated with the SIM
405
+ * @property {string} simSid -
406
+ * The SID of the Super SIM to which this Settings Update was applied
407
+ * @property {settings_update.status} status - The Status of this Settings Update
408
+ * @property {object} packages -
409
+ * Array containing the different Settings Packages that will be applied to the SIM after the update completes
410
+ * @property {Date} dateCompleted -
411
+ * The time when the update successfully completed and the new settings were applied to the SIM
412
+ * @property {Date} dateCreated - The date this Settings Update was created
413
+ * @property {Date} dateUpdated - The date this Settings Update was last updated
414
+ *
415
+ * @param {V1} version - Version of the resource
416
+ * @param {SettingsUpdatePayload} payload - The instance payload
417
+ */
418
+ /* jshint ignore:end */
419
+ SettingsUpdateInstance = function SettingsUpdateInstance(version, payload) {
420
+ this._version = version;
421
+
422
+ // Marshaled Properties
423
+ this.sid = payload.sid; // jshint ignore:line
424
+ this.iccid = payload.iccid; // jshint ignore:line
425
+ this.simSid = payload.sim_sid; // jshint ignore:line
426
+ this.status = payload.status; // jshint ignore:line
427
+ this.packages = payload.packages; // jshint ignore:line
428
+ this.dateCompleted = deserialize.iso8601DateTime(payload.date_completed); // jshint ignore:line
429
+ this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line
430
+ this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line
431
+
432
+ // Context
433
+ this._context = undefined;
434
+ this._solution = {};
435
+ };
436
+
437
+ /* jshint ignore:start */
438
+ /**
439
+ * Provide a user-friendly representation
440
+ *
441
+ * @function toJSON
442
+ * @memberof Twilio.Supersim.V1.SettingsUpdateInstance#
443
+ *
444
+ * @returns Object
445
+ */
446
+ /* jshint ignore:end */
447
+ SettingsUpdateInstance.prototype.toJSON = function toJSON() {
448
+ let clone = {};
449
+ _.forOwn(this, function(value, key) {
450
+ if (!_.startsWith(key, '_') && ! _.isFunction(value)) {
451
+ clone[key] = value;
452
+ }
453
+ });
454
+ return clone;
455
+ };
456
+
457
+ SettingsUpdateInstance.prototype[util.inspect.custom] = function inspect(depth,
458
+ options) {
459
+ return util.inspect(this.toJSON(), options);
460
+ };
461
+
462
+ module.exports = {
463
+ SettingsUpdateList: SettingsUpdateList,
464
+ SettingsUpdatePage: SettingsUpdatePage,
465
+ SettingsUpdateInstance: SettingsUpdateInstance
466
+ };
@@ -273,6 +273,7 @@ interface ReservationListInstance {
273
273
  * each() will attempt to read the limit with the most efficient
274
274
  * page size, i.e. min(limit, 1000)
275
275
  * @property reservationStatus - Returns the list of reservations for a task with a specified ReservationStatus
276
+ * @property workerSid - The SID of the reserved Worker resource to read
276
277
  */
277
278
  interface ReservationListInstanceEachOptions {
278
279
  callback?: (item: ReservationInstance, done: (err?: Error) => void) => void;
@@ -280,6 +281,7 @@ interface ReservationListInstanceEachOptions {
280
281
  limit?: number;
281
282
  pageSize?: number;
282
283
  reservationStatus?: ReservationStatus;
284
+ workerSid?: string;
283
285
  }
284
286
 
285
287
  /**
@@ -296,11 +298,13 @@ interface ReservationListInstanceEachOptions {
296
298
  * list() will attempt to read the limit with the most
297
299
  * efficient page size, i.e. min(limit, 1000)
298
300
  * @property reservationStatus - Returns the list of reservations for a task with a specified ReservationStatus
301
+ * @property workerSid - The SID of the reserved Worker resource to read
299
302
  */
300
303
  interface ReservationListInstanceOptions {
301
304
  limit?: number;
302
305
  pageSize?: number;
303
306
  reservationStatus?: ReservationStatus;
307
+ workerSid?: string;
304
308
  }
305
309
 
306
310
  /**
@@ -310,12 +314,14 @@ interface ReservationListInstanceOptions {
310
314
  * @property pageSize - Number of records to return, defaults to 50
311
315
  * @property pageToken - PageToken provided by the API
312
316
  * @property reservationStatus - Returns the list of reservations for a task with a specified ReservationStatus
317
+ * @property workerSid - The SID of the reserved Worker resource to read
313
318
  */
314
319
  interface ReservationListInstancePageOptions {
315
320
  pageNumber?: number;
316
321
  pageSize?: number;
317
322
  pageToken?: string;
318
323
  reservationStatus?: ReservationStatus;
324
+ workerSid?: string;
319
325
  }
320
326
 
321
327
  interface ReservationPayload extends ReservationResource, Page.TwilioResponsePayload {
@@ -74,6 +74,8 @@ ReservationList = function ReservationList(version, workspaceSid, taskSid) {
74
74
  * @param {object} [opts] - Options for request
75
75
  * @param {reservation.status} [opts.reservationStatus] -
76
76
  * Returns the list of reservations for a task with a specified ReservationStatus
77
+ * @param {string} [opts.workerSid] -
78
+ * The SID of the reserved Worker resource to read
77
79
  * @param {number} [opts.limit] -
78
80
  * Upper limit for the number of records to return.
79
81
  * each() guarantees never to return more than limit.
@@ -165,6 +167,8 @@ ReservationList = function ReservationList(version, workspaceSid, taskSid) {
165
167
  * @param {object} [opts] - Options for request
166
168
  * @param {reservation.status} [opts.reservationStatus] -
167
169
  * Returns the list of reservations for a task with a specified ReservationStatus
170
+ * @param {string} [opts.workerSid] -
171
+ * The SID of the reserved Worker resource to read
168
172
  * @param {number} [opts.limit] -
169
173
  * Upper limit for the number of records to return.
170
174
  * list() guarantees never to return more than limit.
@@ -227,6 +231,8 @@ ReservationList = function ReservationList(version, workspaceSid, taskSid) {
227
231
  * @param {object} [opts] - Options for request
228
232
  * @param {reservation.status} [opts.reservationStatus] -
229
233
  * Returns the list of reservations for a task with a specified ReservationStatus
234
+ * @param {string} [opts.workerSid] -
235
+ * The SID of the reserved Worker resource to read
230
236
  * @param {string} [opts.pageToken] - PageToken provided by the API
231
237
  * @param {number} [opts.pageNumber] -
232
238
  * Page Number, this value is simply for client state
@@ -246,6 +252,7 @@ ReservationList = function ReservationList(version, workspaceSid, taskSid) {
246
252
  var deferred = Q.defer();
247
253
  var data = values.of({
248
254
  'ReservationStatus': _.get(opts, 'reservationStatus'),
255
+ 'WorkerSid': _.get(opts, 'workerSid'),
249
256
  'PageToken': opts.pageToken,
250
257
  'Page': opts.pageNumber,
251
258
  'PageSize': opts.pageSize
@@ -199,6 +199,7 @@ interface TaskQueueListInstanceCreateOptions {
199
199
  * Upper limit for the number of records to return.
200
200
  * each() guarantees never to return more than limit.
201
201
  * Default is no limit
202
+ * @property ordering - Sorting parameter for TaskQueues
202
203
  * @property pageSize -
203
204
  * Number of records to fetch per request,
204
205
  * when not set will use the default value of 50 records.
@@ -213,6 +214,7 @@ interface TaskQueueListInstanceEachOptions {
213
214
  evaluateWorkerAttributes?: string;
214
215
  friendlyName?: string;
215
216
  limit?: number;
217
+ ordering?: string;
216
218
  pageSize?: number;
217
219
  workerSid?: string;
218
220
  }
@@ -226,6 +228,7 @@ interface TaskQueueListInstanceEachOptions {
226
228
  * Upper limit for the number of records to return.
227
229
  * list() guarantees never to return more than limit.
228
230
  * Default is no limit
231
+ * @property ordering - Sorting parameter for TaskQueues
229
232
  * @property pageSize -
230
233
  * Number of records to fetch per request,
231
234
  * when not set will use the default value of 50 records.
@@ -238,6 +241,7 @@ interface TaskQueueListInstanceOptions {
238
241
  evaluateWorkerAttributes?: string;
239
242
  friendlyName?: string;
240
243
  limit?: number;
244
+ ordering?: string;
241
245
  pageSize?: number;
242
246
  workerSid?: string;
243
247
  }
@@ -247,6 +251,7 @@ interface TaskQueueListInstanceOptions {
247
251
  *
248
252
  * @property evaluateWorkerAttributes - The attributes of the Workers to read
249
253
  * @property friendlyName - The friendly_name of the TaskQueue resources to read
254
+ * @property ordering - Sorting parameter for TaskQueues
250
255
  * @property pageNumber - Page Number, this value is simply for client state
251
256
  * @property pageSize - Number of records to return, defaults to 50
252
257
  * @property pageToken - PageToken provided by the API
@@ -255,6 +260,7 @@ interface TaskQueueListInstanceOptions {
255
260
  interface TaskQueueListInstancePageOptions {
256
261
  evaluateWorkerAttributes?: string;
257
262
  friendlyName?: string;
263
+ ordering?: string;
258
264
  pageNumber?: number;
259
265
  pageSize?: number;
260
266
  pageToken?: string;
@@ -87,6 +87,7 @@ TaskQueueList = function TaskQueueList(version, workspaceSid) {
87
87
  * The attributes of the Workers to read
88
88
  * @param {string} [opts.workerSid] -
89
89
  * The SID of the Worker with the TaskQueue resources to read
90
+ * @param {string} [opts.ordering] - Sorting parameter for TaskQueues
90
91
  * @param {number} [opts.limit] -
91
92
  * Upper limit for the number of records to return.
92
93
  * each() guarantees never to return more than limit.
@@ -182,6 +183,7 @@ TaskQueueList = function TaskQueueList(version, workspaceSid) {
182
183
  * The attributes of the Workers to read
183
184
  * @param {string} [opts.workerSid] -
184
185
  * The SID of the Worker with the TaskQueue resources to read
186
+ * @param {string} [opts.ordering] - Sorting parameter for TaskQueues
185
187
  * @param {number} [opts.limit] -
186
188
  * Upper limit for the number of records to return.
187
189
  * list() guarantees never to return more than limit.
@@ -248,6 +250,7 @@ TaskQueueList = function TaskQueueList(version, workspaceSid) {
248
250
  * The attributes of the Workers to read
249
251
  * @param {string} [opts.workerSid] -
250
252
  * The SID of the Worker with the TaskQueue resources to read
253
+ * @param {string} [opts.ordering] - Sorting parameter for TaskQueues
251
254
  * @param {string} [opts.pageToken] - PageToken provided by the API
252
255
  * @param {number} [opts.pageNumber] -
253
256
  * Page Number, this value is simply for client state
@@ -269,6 +272,7 @@ TaskQueueList = function TaskQueueList(version, workspaceSid) {
269
272
  'FriendlyName': _.get(opts, 'friendlyName'),
270
273
  'EvaluateWorkerAttributes': _.get(opts, 'evaluateWorkerAttributes'),
271
274
  'WorkerSid': _.get(opts, 'workerSid'),
275
+ 'Ordering': _.get(opts, 'ordering'),
272
276
  'PageToken': opts.pageToken,
273
277
  'Page': opts.pageNumber,
274
278
  'PageSize': opts.pageSize
@@ -204,6 +204,7 @@ interface WorkerListInstanceCreateOptions {
204
204
  * Upper limit for the number of records to return.
205
205
  * each() guarantees never to return more than limit.
206
206
  * Default is no limit
207
+ * @property ordering - Sorting parameter for Workers
207
208
  * @property pageSize -
208
209
  * Number of records to fetch per request,
209
210
  * when not set will use the default value of 50 records.
@@ -222,6 +223,7 @@ interface WorkerListInstanceEachOptions {
222
223
  done?: Function;
223
224
  friendlyName?: string;
224
225
  limit?: number;
226
+ ordering?: string;
225
227
  pageSize?: number;
226
228
  targetWorkersExpression?: string;
227
229
  taskQueueName?: string;
@@ -239,6 +241,7 @@ interface WorkerListInstanceEachOptions {
239
241
  * Upper limit for the number of records to return.
240
242
  * list() guarantees never to return more than limit.
241
243
  * Default is no limit
244
+ * @property ordering - Sorting parameter for Workers
242
245
  * @property pageSize -
243
246
  * Number of records to fetch per request,
244
247
  * when not set will use the default value of 50 records.
@@ -255,6 +258,7 @@ interface WorkerListInstanceOptions {
255
258
  available?: string;
256
259
  friendlyName?: string;
257
260
  limit?: number;
261
+ ordering?: string;
258
262
  pageSize?: number;
259
263
  targetWorkersExpression?: string;
260
264
  taskQueueName?: string;
@@ -268,6 +272,7 @@ interface WorkerListInstanceOptions {
268
272
  * @property activitySid - The activity_sid of the Worker resources to read
269
273
  * @property available - Whether to return Worker resources that are available or unavailable
270
274
  * @property friendlyName - The friendly_name of the Worker resources to read
275
+ * @property ordering - Sorting parameter for Workers
271
276
  * @property pageNumber - Page Number, this value is simply for client state
272
277
  * @property pageSize - Number of records to return, defaults to 50
273
278
  * @property pageToken - PageToken provided by the API
@@ -280,6 +285,7 @@ interface WorkerListInstancePageOptions {
280
285
  activitySid?: string;
281
286
  available?: string;
282
287
  friendlyName?: string;
288
+ ordering?: string;
283
289
  pageNumber?: number;
284
290
  pageSize?: number;
285
291
  pageToken?: string;