twilio 3.68.0 → 3.71.2

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 (85) hide show
  1. package/CHANGES.md +104 -0
  2. package/README.md +1 -1
  3. package/lib/jwt/AccessToken.d.ts +16 -0
  4. package/lib/jwt/AccessToken.js +20 -0
  5. package/lib/jwt/ClientCapability.d.ts +1 -1
  6. package/lib/rest/Media.d.ts +28 -0
  7. package/lib/rest/Media.js +64 -0
  8. package/lib/rest/Twilio.d.ts +2 -0
  9. package/lib/rest/Twilio.js +14 -0
  10. package/lib/rest/Verify.d.ts +2 -2
  11. package/lib/rest/Verify.js +3 -4
  12. package/lib/rest/api/v2010/account/call/siprec.d.ts +776 -0
  13. package/lib/rest/api/v2010/account/call/siprec.js +811 -0
  14. package/lib/rest/api/v2010/account/call.d.ts +8 -1
  15. package/lib/rest/api/v2010/account/call.js +29 -1
  16. package/lib/rest/api/v2010/account/incomingPhoneNumber/local.d.ts +6 -2
  17. package/lib/rest/api/v2010/account/incomingPhoneNumber/local.js +5 -2
  18. package/lib/rest/api/v2010/account/incomingPhoneNumber/mobile.d.ts +6 -2
  19. package/lib/rest/api/v2010/account/incomingPhoneNumber/mobile.js +5 -2
  20. package/lib/rest/api/v2010/account/incomingPhoneNumber/tollFree.d.ts +6 -2
  21. package/lib/rest/api/v2010/account/incomingPhoneNumber/tollFree.js +5 -2
  22. package/lib/rest/api/v2010/account/incomingPhoneNumber.d.ts +7 -3
  23. package/lib/rest/api/v2010/account/incomingPhoneNumber.js +7 -4
  24. package/lib/rest/conversations/v1/service/configuration/notification.d.ts +6 -0
  25. package/lib/rest/conversations/v1/service/configuration/notification.js +11 -1
  26. package/lib/rest/flexApi/v1/configuration.d.ts +2 -0
  27. package/lib/rest/flexApi/v1/configuration.js +2 -0
  28. package/lib/rest/frontlineApi/v1/user.d.ts +4 -0
  29. package/lib/rest/frontlineApi/v1/user.js +10 -1
  30. package/lib/rest/insights/v1/callSummaries.d.ts +27 -27
  31. package/lib/rest/insights/v1/callSummaries.js +36 -36
  32. package/lib/rest/media/V1.d.ts +28 -0
  33. package/lib/rest/media/V1.js +59 -0
  34. package/lib/rest/media/v1/mediaProcessor.d.ts +355 -0
  35. package/lib/rest/media/v1/mediaProcessor.js +702 -0
  36. package/lib/rest/media/v1/playerStreamer/playbackGrant.d.ts +162 -0
  37. package/lib/rest/media/v1/playerStreamer/playbackGrant.js +384 -0
  38. package/lib/rest/media/v1/playerStreamer.d.ts +366 -0
  39. package/lib/rest/media/v1/playerStreamer.js +729 -0
  40. package/lib/rest/messaging/v1/brandRegistration/brandVetting.d.ts +330 -0
  41. package/lib/rest/messaging/v1/brandRegistration/brandVetting.js +655 -0
  42. package/lib/rest/messaging/v1/brandRegistration.d.ts +15 -2
  43. package/lib/rest/messaging/v1/brandRegistration.js +37 -1
  44. package/lib/rest/messaging/v1/service.d.ts +8 -0
  45. package/lib/rest/messaging/v1/service.js +14 -0
  46. package/lib/rest/numbers/v2/regulatoryCompliance/bundle/bundleCopy.d.ts +133 -0
  47. package/lib/rest/numbers/v2/regulatoryCompliance/bundle/bundleCopy.js +268 -0
  48. package/lib/rest/numbers/v2/regulatoryCompliance/bundle/replaceItems.d.ts +127 -0
  49. package/lib/rest/numbers/v2/regulatoryCompliance/bundle/replaceItems.js +271 -0
  50. package/lib/rest/numbers/v2/regulatoryCompliance/bundle.d.ts +14 -0
  51. package/lib/rest/numbers/v2/regulatoryCompliance/bundle.js +56 -0
  52. package/lib/rest/serverless/v1/service/build.d.ts +1 -1
  53. package/lib/rest/serverless/v1/service/environment.js +1 -1
  54. package/lib/rest/serverless/v1/service.d.ts +2 -0
  55. package/lib/rest/serverless/v1/service.js +3 -0
  56. package/lib/rest/taskrouter/v1/workspace/task/reservation.d.ts +2 -0
  57. package/lib/rest/taskrouter/v1/workspace/task/reservation.js +4 -1
  58. package/lib/rest/taskrouter/v1/workspace/worker/reservation.d.ts +2 -0
  59. package/lib/rest/taskrouter/v1/workspace/worker/reservation.js +4 -1
  60. package/lib/rest/taskrouter/v1/workspace/worker.d.ts +27 -2
  61. package/lib/rest/taskrouter/v1/workspace/worker.js +22 -7
  62. package/lib/rest/trunking/v1/trunk.d.ts +9 -1
  63. package/lib/rest/trunking/v1/trunk.js +13 -2
  64. package/lib/rest/verify/V2.d.ts +3 -3
  65. package/lib/rest/verify/V2.js +6 -8
  66. package/lib/rest/verify/v2/service/entity/factor.d.ts +4 -2
  67. package/lib/rest/verify/v2/service/entity/factor.js +8 -3
  68. package/lib/rest/verify/v2/service/entity/newFactor.d.ts +2 -2
  69. package/lib/rest/verify/v2/service/entity/newFactor.js +1 -1
  70. package/lib/rest/verify/v2/service/verification.d.ts +5 -1
  71. package/lib/rest/verify/v2/service/verification.js +7 -2
  72. package/lib/rest/verify/v2/service.d.ts +6 -0
  73. package/lib/rest/verify/v2/service.js +12 -2
  74. package/lib/rest/verify/v2/{verificationTemplate.d.ts → template.d.ts} +35 -37
  75. package/lib/rest/verify/v2/{verificationTemplate.js → template.js} +58 -64
  76. package/lib/rest/verify/v2/verificationAttempt.d.ts +1 -1
  77. package/lib/rest/video/v1/room.d.ts +4 -0
  78. package/lib/rest/video/v1/room.js +7 -1
  79. package/lib/rest/wireless/v1/ratePlan.d.ts +1 -1
  80. package/lib/rest/wireless/v1/ratePlan.js +3 -3
  81. package/lib/rest/wireless/v1/sim.d.ts +4 -4
  82. package/lib/rest/wireless/v1/sim.js +18 -24
  83. package/lib/twiml/VoiceResponse.d.ts +1296 -24
  84. package/lib/twiml/VoiceResponse.js +2170 -82
  85. package/package.json +2 -2
@@ -11,15 +11,15 @@ import V2 = require('../V2');
11
11
  import { SerializableClass } from '../../../interfaces';
12
12
 
13
13
  /**
14
- * Initialize the VerificationTemplateList
14
+ * Initialize the TemplateList
15
15
  *
16
16
  * @param version - Version of the resource
17
17
  */
18
- declare function VerificationTemplateList(version: V2): VerificationTemplateListInstance;
18
+ declare function TemplateList(version: V2): TemplateListInstance;
19
19
 
20
- interface VerificationTemplateListInstance {
20
+ interface TemplateListInstance {
21
21
  /**
22
- * Streams VerificationTemplateInstance records from the API.
22
+ * Streams TemplateInstance records from the API.
23
23
  *
24
24
  * This operation lazily loads records as efficiently as possible until the limit
25
25
  * is reached.
@@ -32,9 +32,9 @@ interface VerificationTemplateListInstance {
32
32
  *
33
33
  * @param callback - Function to process each record
34
34
  */
35
- each(callback?: (item: VerificationTemplateInstance, done: (err?: Error) => void) => void): void;
35
+ each(callback?: (item: TemplateInstance, done: (err?: Error) => void) => void): void;
36
36
  /**
37
- * Streams VerificationTemplateInstance records from the API.
37
+ * Streams TemplateInstance records from the API.
38
38
  *
39
39
  * This operation lazily loads records as efficiently as possible until the limit
40
40
  * is reached.
@@ -48,10 +48,9 @@ interface VerificationTemplateListInstance {
48
48
  * @param opts - Options for request
49
49
  * @param callback - Function to process each record
50
50
  */
51
- each(opts?: VerificationTemplateListInstanceEachOptions, callback?: (item: VerificationTemplateInstance, done: (err?: Error) => void) => void): void;
51
+ each(opts?: TemplateListInstanceEachOptions, callback?: (item: TemplateInstance, done: (err?: Error) => void) => void): void;
52
52
  /**
53
- * Retrieve a single target page of VerificationTemplateInstance records from the
54
- * API.
53
+ * Retrieve a single target page of TemplateInstance records from the API.
55
54
  *
56
55
  * The request is executed immediately.
57
56
  *
@@ -60,10 +59,9 @@ interface VerificationTemplateListInstance {
60
59
  *
61
60
  * @param callback - Callback to handle list of records
62
61
  */
63
- getPage(callback?: (error: Error | null, items: VerificationTemplatePage) => any): Promise<VerificationTemplatePage>;
62
+ getPage(callback?: (error: Error | null, items: TemplatePage) => any): Promise<TemplatePage>;
64
63
  /**
65
- * Retrieve a single target page of VerificationTemplateInstance records from the
66
- * API.
64
+ * Retrieve a single target page of TemplateInstance records from the API.
67
65
  *
68
66
  * The request is executed immediately.
69
67
  *
@@ -73,18 +71,18 @@ interface VerificationTemplateListInstance {
73
71
  * @param targetUrl - API-generated URL for the requested results page
74
72
  * @param callback - Callback to handle list of records
75
73
  */
76
- getPage(targetUrl?: string, callback?: (error: Error | null, items: VerificationTemplatePage) => any): Promise<VerificationTemplatePage>;
74
+ getPage(targetUrl?: string, callback?: (error: Error | null, items: TemplatePage) => any): Promise<TemplatePage>;
77
75
  /**
78
- * Lists VerificationTemplateInstance records from the API as a list.
76
+ * Lists TemplateInstance records from the API as a list.
79
77
  *
80
78
  * If a function is passed as the first argument, it will be used as the callback
81
79
  * function.
82
80
  *
83
81
  * @param callback - Callback to handle list of records
84
82
  */
85
- list(callback?: (error: Error | null, items: VerificationTemplateInstance[]) => any): Promise<VerificationTemplateInstance[]>;
83
+ list(callback?: (error: Error | null, items: TemplateInstance[]) => any): Promise<TemplateInstance[]>;
86
84
  /**
87
- * Lists VerificationTemplateInstance records from the API as a list.
85
+ * Lists TemplateInstance records from the API as a list.
88
86
  *
89
87
  * If a function is passed as the first argument, it will be used as the callback
90
88
  * function.
@@ -92,9 +90,9 @@ interface VerificationTemplateListInstance {
92
90
  * @param opts - Options for request
93
91
  * @param callback - Callback to handle list of records
94
92
  */
95
- list(opts?: VerificationTemplateListInstanceOptions, callback?: (error: Error | null, items: VerificationTemplateInstance[]) => any): Promise<VerificationTemplateInstance[]>;
93
+ list(opts?: TemplateListInstanceOptions, callback?: (error: Error | null, items: TemplateInstance[]) => any): Promise<TemplateInstance[]>;
96
94
  /**
97
- * Retrieve a single page of VerificationTemplateInstance records from the API.
95
+ * Retrieve a single page of TemplateInstance records from the API.
98
96
  *
99
97
  * The request is executed immediately.
100
98
  *
@@ -103,9 +101,9 @@ interface VerificationTemplateListInstance {
103
101
  *
104
102
  * @param callback - Callback to handle list of records
105
103
  */
106
- page(callback?: (error: Error | null, items: VerificationTemplatePage) => any): Promise<VerificationTemplatePage>;
104
+ page(callback?: (error: Error | null, items: TemplatePage) => any): Promise<TemplatePage>;
107
105
  /**
108
- * Retrieve a single page of VerificationTemplateInstance records from the API.
106
+ * Retrieve a single page of TemplateInstance records from the API.
109
107
  *
110
108
  * The request is executed immediately.
111
109
  *
@@ -115,7 +113,7 @@ interface VerificationTemplateListInstance {
115
113
  * @param opts - Options for request
116
114
  * @param callback - Callback to handle list of records
117
115
  */
118
- page(opts?: VerificationTemplateListInstancePageOptions, callback?: (error: Error | null, items: VerificationTemplatePage) => any): Promise<VerificationTemplatePage>;
116
+ page(opts?: TemplateListInstancePageOptions, callback?: (error: Error | null, items: TemplatePage) => any): Promise<TemplatePage>;
119
117
  /**
120
118
  * Provide a user-friendly representation
121
119
  */
@@ -141,8 +139,8 @@ interface VerificationTemplateListInstance {
141
139
  * each() will attempt to read the limit with the most efficient
142
140
  * page size, i.e. min(limit, 1000)
143
141
  */
144
- interface VerificationTemplateListInstanceEachOptions {
145
- callback?: (item: VerificationTemplateInstance, done: (err?: Error) => void) => void;
142
+ interface TemplateListInstanceEachOptions {
143
+ callback?: (item: TemplateInstance, done: (err?: Error) => void) => void;
146
144
  done?: Function;
147
145
  friendlyName?: string;
148
146
  limit?: number;
@@ -164,7 +162,7 @@ interface VerificationTemplateListInstanceEachOptions {
164
162
  * list() will attempt to read the limit with the most
165
163
  * efficient page size, i.e. min(limit, 1000)
166
164
  */
167
- interface VerificationTemplateListInstanceOptions {
165
+ interface TemplateListInstanceOptions {
168
166
  friendlyName?: string;
169
167
  limit?: number;
170
168
  pageSize?: number;
@@ -178,35 +176,35 @@ interface VerificationTemplateListInstanceOptions {
178
176
  * @property pageSize - Number of records to return, defaults to 50
179
177
  * @property pageToken - PageToken provided by the API
180
178
  */
181
- interface VerificationTemplateListInstancePageOptions {
179
+ interface TemplateListInstancePageOptions {
182
180
  friendlyName?: string;
183
181
  pageNumber?: number;
184
182
  pageSize?: number;
185
183
  pageToken?: string;
186
184
  }
187
185
 
188
- interface VerificationTemplatePayload extends VerificationTemplateResource, Page.TwilioResponsePayload {
186
+ interface TemplatePayload extends TemplateResource, Page.TwilioResponsePayload {
189
187
  }
190
188
 
191
- interface VerificationTemplateResource {
189
+ interface TemplateResource {
192
190
  account_sid: string;
193
191
  friendly_name: string;
194
192
  sid: string;
195
193
  translations: object;
196
194
  }
197
195
 
198
- interface VerificationTemplateSolution {
196
+ interface TemplateSolution {
199
197
  }
200
198
 
201
199
 
202
- declare class VerificationTemplateInstance extends SerializableClass {
200
+ declare class TemplateInstance extends SerializableClass {
203
201
  /**
204
- * Initialize the VerificationTemplateContext
202
+ * Initialize the TemplateContext
205
203
  *
206
204
  * @param version - Version of the resource
207
205
  * @param payload - The instance payload
208
206
  */
209
- constructor(version: V2, payload: VerificationTemplatePayload);
207
+ constructor(version: V2, payload: TemplatePayload);
210
208
 
211
209
  accountSid: string;
212
210
  friendlyName: string;
@@ -219,26 +217,26 @@ declare class VerificationTemplateInstance extends SerializableClass {
219
217
  }
220
218
 
221
219
 
222
- declare class VerificationTemplatePage extends Page<V2, VerificationTemplatePayload, VerificationTemplateResource, VerificationTemplateInstance> {
220
+ declare class TemplatePage extends Page<V2, TemplatePayload, TemplateResource, TemplateInstance> {
223
221
  /**
224
- * Initialize the VerificationTemplatePage
222
+ * Initialize the TemplatePage
225
223
  *
226
224
  * @param version - Version of the resource
227
225
  * @param response - Response from the API
228
226
  * @param solution - Path solution
229
227
  */
230
- constructor(version: V2, response: Response<string>, solution: VerificationTemplateSolution);
228
+ constructor(version: V2, response: Response<string>, solution: TemplateSolution);
231
229
 
232
230
  /**
233
- * Build an instance of VerificationTemplateInstance
231
+ * Build an instance of TemplateInstance
234
232
  *
235
233
  * @param payload - Payload response from the API
236
234
  */
237
- getInstance(payload: VerificationTemplatePayload): VerificationTemplateInstance;
235
+ getInstance(payload: TemplatePayload): TemplateInstance;
238
236
  /**
239
237
  * Provide a user-friendly representation
240
238
  */
241
239
  toJSON(): any;
242
240
  }
243
241
 
244
- export { VerificationTemplateInstance, VerificationTemplateList, VerificationTemplateListInstance, VerificationTemplateListInstanceEachOptions, VerificationTemplateListInstanceOptions, VerificationTemplateListInstancePageOptions, VerificationTemplatePage, VerificationTemplatePayload, VerificationTemplateResource, VerificationTemplateSolution }
242
+ export { TemplateInstance, TemplateList, TemplateListInstance, TemplateListInstanceEachOptions, TemplateListInstanceOptions, TemplateListInstancePageOptions, TemplatePage, TemplatePayload, TemplateResource, TemplateSolution }
@@ -15,41 +15,41 @@ var util = require('util'); /* jshint ignore:line */
15
15
  var Page = require('../../../base/Page'); /* jshint ignore:line */
16
16
  var values = require('../../../base/values'); /* jshint ignore:line */
17
17
 
18
- var VerificationTemplateList;
19
- var VerificationTemplatePage;
20
- var VerificationTemplateInstance;
18
+ var TemplateList;
19
+ var TemplatePage;
20
+ var TemplateInstance;
21
21
 
22
22
  /* jshint ignore:start */
23
23
  /**
24
- * Initialize the VerificationTemplateList
24
+ * Initialize the TemplateList
25
25
  *
26
- * @constructor Twilio.Verify.V2.VerificationTemplateList
26
+ * @constructor Twilio.Verify.V2.TemplateList
27
27
  *
28
28
  * @param {Twilio.Verify.V2} version - Version of the resource
29
29
  */
30
30
  /* jshint ignore:end */
31
- VerificationTemplateList = function VerificationTemplateList(version) {
31
+ TemplateList = function TemplateList(version) {
32
32
  /* jshint ignore:start */
33
33
  /**
34
- * @function verificationTemplates
34
+ * @function templates
35
35
  * @memberof Twilio.Verify.V2#
36
36
  *
37
37
  * @param {string} sid - sid of instance
38
38
  *
39
- * @returns {Twilio.Verify.V2.VerificationTemplateContext}
39
+ * @returns {Twilio.Verify.V2.TemplateContext}
40
40
  */
41
41
  /* jshint ignore:end */
42
- function VerificationTemplateListInstance(sid) {
43
- return VerificationTemplateListInstance.get(sid);
42
+ function TemplateListInstance(sid) {
43
+ return TemplateListInstance.get(sid);
44
44
  }
45
45
 
46
- VerificationTemplateListInstance._version = version;
46
+ TemplateListInstance._version = version;
47
47
  // Path Solution
48
- VerificationTemplateListInstance._solution = {};
49
- VerificationTemplateListInstance._uri = `/Templates`;
48
+ TemplateListInstance._solution = {};
49
+ TemplateListInstance._uri = `/Templates`;
50
50
  /* jshint ignore:start */
51
51
  /**
52
- * Streams VerificationTemplateInstance records from the API.
52
+ * Streams TemplateInstance records from the API.
53
53
  *
54
54
  * This operation lazily loads records as efficiently as possible until the limit
55
55
  * is reached.
@@ -61,7 +61,7 @@ VerificationTemplateList = function VerificationTemplateList(version) {
61
61
  * function.
62
62
  *
63
63
  * @function each
64
- * @memberof Twilio.Verify.V2.VerificationTemplateList#
64
+ * @memberof Twilio.Verify.V2.TemplateList#
65
65
  *
66
66
  * @param {object} [opts] - Options for request
67
67
  * @param {string} [opts.friendlyName] - Filter templates using friendly name
@@ -83,7 +83,7 @@ VerificationTemplateList = function VerificationTemplateList(version) {
83
83
  * @param {Function} [callback] - Function to process each record
84
84
  */
85
85
  /* jshint ignore:end */
86
- VerificationTemplateListInstance.each = function each(opts, callback) {
86
+ TemplateListInstance.each = function each(opts, callback) {
87
87
  if (_.isFunction(opts)) {
88
88
  callback = opts;
89
89
  opts = {};
@@ -143,13 +143,13 @@ VerificationTemplateList = function VerificationTemplateList(version) {
143
143
 
144
144
  /* jshint ignore:start */
145
145
  /**
146
- * Lists VerificationTemplateInstance records from the API as a list.
146
+ * Lists TemplateInstance records from the API as a list.
147
147
  *
148
148
  * If a function is passed as the first argument, it will be used as the callback
149
149
  * function.
150
150
  *
151
151
  * @function list
152
- * @memberof Twilio.Verify.V2.VerificationTemplateList#
152
+ * @memberof Twilio.Verify.V2.TemplateList#
153
153
  *
154
154
  * @param {object} [opts] - Options for request
155
155
  * @param {string} [opts.friendlyName] - Filter templates using friendly name
@@ -168,7 +168,7 @@ VerificationTemplateList = function VerificationTemplateList(version) {
168
168
  * @returns {Promise} Resolves to a list of records
169
169
  */
170
170
  /* jshint ignore:end */
171
- VerificationTemplateListInstance.list = function list(opts, callback) {
171
+ TemplateListInstance.list = function list(opts, callback) {
172
172
  if (_.isFunction(opts)) {
173
173
  callback = opts;
174
174
  opts = {};
@@ -202,7 +202,7 @@ VerificationTemplateList = function VerificationTemplateList(version) {
202
202
 
203
203
  /* jshint ignore:start */
204
204
  /**
205
- * Retrieve a single page of VerificationTemplateInstance records from the API.
205
+ * Retrieve a single page of TemplateInstance records from the API.
206
206
  *
207
207
  * The request is executed immediately.
208
208
  *
@@ -210,7 +210,7 @@ VerificationTemplateList = function VerificationTemplateList(version) {
210
210
  * function.
211
211
  *
212
212
  * @function page
213
- * @memberof Twilio.Verify.V2.VerificationTemplateList#
213
+ * @memberof Twilio.Verify.V2.TemplateList#
214
214
  *
215
215
  * @param {object} [opts] - Options for request
216
216
  * @param {string} [opts.friendlyName] - Filter templates using friendly name
@@ -223,7 +223,7 @@ VerificationTemplateList = function VerificationTemplateList(version) {
223
223
  * @returns {Promise} Resolves to a list of records
224
224
  */
225
225
  /* jshint ignore:end */
226
- VerificationTemplateListInstance.page = function page(opts, callback) {
226
+ TemplateListInstance.page = function page(opts, callback) {
227
227
  if (_.isFunction(opts)) {
228
228
  callback = opts;
229
229
  opts = {};
@@ -241,7 +241,7 @@ VerificationTemplateList = function VerificationTemplateList(version) {
241
241
  var promise = this._version.page({uri: this._uri, method: 'GET', params: data});
242
242
 
243
243
  promise = promise.then(function(payload) {
244
- deferred.resolve(new VerificationTemplatePage(this._version, payload, this._solution));
244
+ deferred.resolve(new TemplatePage(this._version, payload, this._solution));
245
245
  }.bind(this));
246
246
 
247
247
  promise.catch(function(error) {
@@ -257,8 +257,7 @@ VerificationTemplateList = function VerificationTemplateList(version) {
257
257
 
258
258
  /* jshint ignore:start */
259
259
  /**
260
- * Retrieve a single target page of VerificationTemplateInstance records from the
261
- * API.
260
+ * Retrieve a single target page of TemplateInstance records from the API.
262
261
  *
263
262
  * The request is executed immediately.
264
263
  *
@@ -266,7 +265,7 @@ VerificationTemplateList = function VerificationTemplateList(version) {
266
265
  * function.
267
266
  *
268
267
  * @function getPage
269
- * @memberof Twilio.Verify.V2.VerificationTemplateList#
268
+ * @memberof Twilio.Verify.V2.TemplateList#
270
269
  *
271
270
  * @param {string} [targetUrl] - API-generated URL for the requested results page
272
271
  * @param {function} [callback] - Callback to handle list of records
@@ -274,14 +273,13 @@ VerificationTemplateList = function VerificationTemplateList(version) {
274
273
  * @returns {Promise} Resolves to a list of records
275
274
  */
276
275
  /* jshint ignore:end */
277
- VerificationTemplateListInstance.getPage = function getPage(targetUrl, callback)
278
- {
276
+ TemplateListInstance.getPage = function getPage(targetUrl, callback) {
279
277
  var deferred = Q.defer();
280
278
 
281
279
  var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});
282
280
 
283
281
  promise = promise.then(function(payload) {
284
- deferred.resolve(new VerificationTemplatePage(this._version, payload, this._solution));
282
+ deferred.resolve(new TemplatePage(this._version, payload, this._solution));
285
283
  }.bind(this));
286
284
 
287
285
  promise.catch(function(error) {
@@ -300,62 +298,60 @@ VerificationTemplateList = function VerificationTemplateList(version) {
300
298
  * Provide a user-friendly representation
301
299
  *
302
300
  * @function toJSON
303
- * @memberof Twilio.Verify.V2.VerificationTemplateList#
301
+ * @memberof Twilio.Verify.V2.TemplateList#
304
302
  *
305
303
  * @returns Object
306
304
  */
307
305
  /* jshint ignore:end */
308
- VerificationTemplateListInstance.toJSON = function toJSON() {
306
+ TemplateListInstance.toJSON = function toJSON() {
309
307
  return this._solution;
310
308
  };
311
309
 
312
- VerificationTemplateListInstance[util.inspect.custom] = function inspect(depth,
313
- options) {
310
+ TemplateListInstance[util.inspect.custom] = function inspect(depth, options) {
314
311
  return util.inspect(this.toJSON(), options);
315
312
  };
316
313
 
317
- return VerificationTemplateListInstance;
314
+ return TemplateListInstance;
318
315
  };
319
316
 
320
317
 
321
318
  /* jshint ignore:start */
322
319
  /**
323
- * Initialize the VerificationTemplatePage
320
+ * Initialize the TemplatePage
324
321
  *
325
- * @constructor Twilio.Verify.V2.VerificationTemplatePage
322
+ * @constructor Twilio.Verify.V2.TemplatePage
326
323
  *
327
324
  * @param {V2} version - Version of the resource
328
325
  * @param {Response<string>} response - Response from the API
329
- * @param {VerificationTemplateSolution} solution - Path solution
326
+ * @param {TemplateSolution} solution - Path solution
330
327
  *
331
- * @returns VerificationTemplatePage
328
+ * @returns TemplatePage
332
329
  */
333
330
  /* jshint ignore:end */
334
- VerificationTemplatePage = function VerificationTemplatePage(version, response,
335
- solution) {
331
+ TemplatePage = function TemplatePage(version, response, solution) {
336
332
  // Path Solution
337
333
  this._solution = solution;
338
334
 
339
335
  Page.prototype.constructor.call(this, version, response, this._solution);
340
336
  };
341
337
 
342
- _.extend(VerificationTemplatePage.prototype, Page.prototype);
343
- VerificationTemplatePage.prototype.constructor = VerificationTemplatePage;
338
+ _.extend(TemplatePage.prototype, Page.prototype);
339
+ TemplatePage.prototype.constructor = TemplatePage;
344
340
 
345
341
  /* jshint ignore:start */
346
342
  /**
347
- * Build an instance of VerificationTemplateInstance
343
+ * Build an instance of TemplateInstance
348
344
  *
349
345
  * @function getInstance
350
- * @memberof Twilio.Verify.V2.VerificationTemplatePage#
346
+ * @memberof Twilio.Verify.V2.TemplatePage#
351
347
  *
352
- * @param {VerificationTemplatePayload} payload - Payload response from the API
348
+ * @param {TemplatePayload} payload - Payload response from the API
353
349
  *
354
- * @returns VerificationTemplateInstance
350
+ * @returns TemplateInstance
355
351
  */
356
352
  /* jshint ignore:end */
357
- VerificationTemplatePage.prototype.getInstance = function getInstance(payload) {
358
- return new VerificationTemplateInstance(this._version, payload);
353
+ TemplatePage.prototype.getInstance = function getInstance(payload) {
354
+ return new TemplateInstance(this._version, payload);
359
355
  };
360
356
 
361
357
  /* jshint ignore:start */
@@ -363,12 +359,12 @@ VerificationTemplatePage.prototype.getInstance = function getInstance(payload) {
363
359
  * Provide a user-friendly representation
364
360
  *
365
361
  * @function toJSON
366
- * @memberof Twilio.Verify.V2.VerificationTemplatePage#
362
+ * @memberof Twilio.Verify.V2.TemplatePage#
367
363
  *
368
364
  * @returns Object
369
365
  */
370
366
  /* jshint ignore:end */
371
- VerificationTemplatePage.prototype.toJSON = function toJSON() {
367
+ TemplatePage.prototype.toJSON = function toJSON() {
372
368
  let clone = {};
373
369
  _.forOwn(this, function(value, key) {
374
370
  if (!_.startsWith(key, '_') && ! _.isFunction(value)) {
@@ -378,17 +374,16 @@ VerificationTemplatePage.prototype.toJSON = function toJSON() {
378
374
  return clone;
379
375
  };
380
376
 
381
- VerificationTemplatePage.prototype[util.inspect.custom] = function
382
- inspect(depth, options) {
377
+ TemplatePage.prototype[util.inspect.custom] = function inspect(depth, options) {
383
378
  return util.inspect(this.toJSON(), options);
384
379
  };
385
380
 
386
381
 
387
382
  /* jshint ignore:start */
388
383
  /**
389
- * Initialize the VerificationTemplateContext
384
+ * Initialize the TemplateContext
390
385
  *
391
- * @constructor Twilio.Verify.V2.VerificationTemplateInstance
386
+ * @constructor Twilio.Verify.V2.TemplateInstance
392
387
  *
393
388
  * @property {string} sid - A string that uniquely identifies this Template
394
389
  * @property {string} accountSid - Account Sid
@@ -396,11 +391,10 @@ VerificationTemplatePage.prototype[util.inspect.custom] = function
396
391
  * @property {object} translations - Ojbect with the template translations.
397
392
  *
398
393
  * @param {V2} version - Version of the resource
399
- * @param {VerificationTemplatePayload} payload - The instance payload
394
+ * @param {TemplatePayload} payload - The instance payload
400
395
  */
401
396
  /* jshint ignore:end */
402
- VerificationTemplateInstance = function VerificationTemplateInstance(version,
403
- payload) {
397
+ TemplateInstance = function TemplateInstance(version, payload) {
404
398
  this._version = version;
405
399
 
406
400
  // Marshaled Properties
@@ -419,12 +413,12 @@ VerificationTemplateInstance = function VerificationTemplateInstance(version,
419
413
  * Provide a user-friendly representation
420
414
  *
421
415
  * @function toJSON
422
- * @memberof Twilio.Verify.V2.VerificationTemplateInstance#
416
+ * @memberof Twilio.Verify.V2.TemplateInstance#
423
417
  *
424
418
  * @returns Object
425
419
  */
426
420
  /* jshint ignore:end */
427
- VerificationTemplateInstance.prototype.toJSON = function toJSON() {
421
+ TemplateInstance.prototype.toJSON = function toJSON() {
428
422
  let clone = {};
429
423
  _.forOwn(this, function(value, key) {
430
424
  if (!_.startsWith(key, '_') && ! _.isFunction(value)) {
@@ -434,13 +428,13 @@ VerificationTemplateInstance.prototype.toJSON = function toJSON() {
434
428
  return clone;
435
429
  };
436
430
 
437
- VerificationTemplateInstance.prototype[util.inspect.custom] = function
438
- inspect(depth, options) {
431
+ TemplateInstance.prototype[util.inspect.custom] = function inspect(depth,
432
+ options) {
439
433
  return util.inspect(this.toJSON(), options);
440
434
  };
441
435
 
442
436
  module.exports = {
443
- VerificationTemplateList: VerificationTemplateList,
444
- VerificationTemplatePage: VerificationTemplatePage,
445
- VerificationTemplateInstance: VerificationTemplateInstance
437
+ TemplateList: TemplateList,
438
+ TemplatePage: TemplatePage,
439
+ TemplateInstance: TemplateInstance
446
440
  };
@@ -10,7 +10,7 @@ import Response = require('../../../http/response');
10
10
  import V2 = require('../V2');
11
11
  import { SerializableClass } from '../../../interfaces';
12
12
 
13
- type VerificationAttemptChannels = 'sms'|'call'|'email';
13
+ type VerificationAttemptChannels = 'sms'|'call'|'email'|'whatsapp';
14
14
 
15
15
  type VerificationAttemptConversionStatus = 'converted'|'unconverted';
16
16
 
@@ -167,6 +167,7 @@ interface RoomListInstance {
167
167
  /**
168
168
  * Options to pass to create
169
169
  *
170
+ * @property audioOnly - Indicates whether the room will only contain audio track participants for group rooms.
170
171
  * @property enableTurn - Enable Twilio's Network Traversal TURN service
171
172
  * @property maxParticipants - The maximum number of concurrent Participants allowed in the room
172
173
  * @property mediaRegion - The region for the media server in Group Rooms
@@ -179,6 +180,7 @@ interface RoomListInstance {
179
180
  * @property videoCodecs - An array of the video codecs that are supported when publishing a track in the room
180
181
  */
181
182
  interface RoomListInstanceCreateOptions {
183
+ audioOnly?: boolean;
182
184
  enableTurn?: boolean;
183
185
  maxParticipants?: number;
184
186
  mediaRegion?: string;
@@ -277,6 +279,7 @@ interface RoomPayload extends RoomResource, Page.TwilioResponsePayload {
277
279
 
278
280
  interface RoomResource {
279
281
  account_sid: string;
282
+ audio_only: boolean;
280
283
  date_created: Date;
281
284
  date_updated: Date;
282
285
  duration: number;
@@ -345,6 +348,7 @@ declare class RoomInstance extends SerializableClass {
345
348
 
346
349
  private _proxy: RoomContext;
347
350
  accountSid: string;
351
+ audioOnly: boolean;
348
352
  dateCreated: Date;
349
353
  dateUpdated: Date;
350
354
  duration: number;
@@ -80,6 +80,8 @@ RoomList = function RoomList(version) {
80
80
  * @param {string} [opts.mediaRegion] -
81
81
  * The region for the media server in Group Rooms
82
82
  * @param {object} [opts.recordingRules] - A collection of Recording Rules
83
+ * @param {boolean} [opts.audioOnly] -
84
+ * Indicates whether the room will only contain audio track participants for group rooms.
83
85
  * @param {function} [callback] - Callback to handle processed record
84
86
  *
85
87
  * @returns {Promise} Resolves to processed RoomInstance
@@ -103,7 +105,8 @@ RoomList = function RoomList(version) {
103
105
  'RecordParticipantsOnConnect': serialize.bool(_.get(opts, 'recordParticipantsOnConnect')),
104
106
  'VideoCodecs': serialize.map(_.get(opts, 'videoCodecs'), function(e) { return e; }),
105
107
  'MediaRegion': _.get(opts, 'mediaRegion'),
106
- 'RecordingRules': serialize.object(_.get(opts, 'recordingRules'))
108
+ 'RecordingRules': serialize.object(_.get(opts, 'recordingRules')),
109
+ 'AudioOnly': serialize.bool(_.get(opts, 'audioOnly'))
107
110
  });
108
111
 
109
112
  var promise = this._version.create({uri: this._uri, method: 'POST', data: data});
@@ -521,6 +524,8 @@ RoomPage.prototype[util.inspect.custom] = function inspect(depth, options) {
521
524
  * @property {room.video_codec} videoCodecs -
522
525
  * An array of the video codecs that are supported when publishing a track in the room
523
526
  * @property {string} mediaRegion - The region for the media server in Group Rooms
527
+ * @property {boolean} audioOnly -
528
+ * Indicates whether the room will only contain audio track participants for group rooms.
524
529
  * @property {string} url - The absolute URL of the resource
525
530
  * @property {string} links - The URLs of related resources
526
531
  *
@@ -550,6 +555,7 @@ RoomInstance = function RoomInstance(version, payload, sid) {
550
555
  this.recordParticipantsOnConnect = payload.record_participants_on_connect; // jshint ignore:line
551
556
  this.videoCodecs = payload.video_codecs; // jshint ignore:line
552
557
  this.mediaRegion = payload.media_region; // jshint ignore:line
558
+ this.audioOnly = payload.audio_only; // jshint ignore:line
553
559
  this.url = payload.url; // jshint ignore:line
554
560
  this.links = payload.links; // jshint ignore:line
555
561
 
@@ -169,7 +169,7 @@ interface RatePlanListInstance {
169
169
  * @property nationalRoamingDataLimit - The total data usage in Megabytes that the Network allows during one month on non-home networks in the United States
170
170
  * @property nationalRoamingEnabled - Whether SIMs can roam on networks other than the home network in the United States
171
171
  * @property uniqueName - An application-defined string that uniquely identifies the resource
172
- * @property voiceEnabled - Whether SIMs can make and receive voice calls
172
+ * @property voiceEnabled - Deprecated
173
173
  */
174
174
  interface RatePlanListInstanceCreateOptions {
175
175
  dataEnabled?: boolean;
@@ -311,8 +311,7 @@ RatePlanList = function RatePlanList(version) {
311
311
  * @param {string} [opts.dataMetering] - The model used to meter data usage
312
312
  * @param {boolean} [opts.messagingEnabled] -
313
313
  * Whether SIMs can make, send, and receive SMS using Commands
314
- * @param {boolean} [opts.voiceEnabled] -
315
- * Whether SIMs can make and receive voice calls
314
+ * @param {boolean} [opts.voiceEnabled] - Deprecated
316
315
  * @param {boolean} [opts.nationalRoamingEnabled] -
317
316
  * Whether SIMs can roam on networks other than the home network in the United States
318
317
  * @param {string|list} [opts.internationalRoaming] -
@@ -486,7 +485,8 @@ RatePlanPage.prototype[util.inspect.custom] = function inspect(depth, options) {
486
485
  * The total data usage in Megabytes that the Network allows during one month on the home network
487
486
  * @property {boolean} messagingEnabled -
488
487
  * Whether SIMs can make, send, and receive SMS using Commands
489
- * @property {boolean} voiceEnabled - Whether SIMs can make and receive voice calls
488
+ * @property {boolean} voiceEnabled -
489
+ * Deprecated. Whether SIMs can make and receive voice calls
490
490
  * @property {boolean} nationalRoamingEnabled -
491
491
  * Whether SIMs can roam on networks other than the home network in the United States
492
492
  * @property {number} nationalRoamingDataLimit -
@@ -42,10 +42,10 @@ declare function SimList(version: V1): SimListInstance;
42
42
  * @property smsUrl - The URL we should call when the SIM-connected device sends an SMS message that is not a Command
43
43
  * @property status - The new status of the Sim resource
44
44
  * @property uniqueName - An application-defined string that uniquely identifies the resource
45
- * @property voiceFallbackMethod - The HTTP method we should use to call voice_fallback_url
46
- * @property voiceFallbackUrl - The URL we should call when an error occurs while retrieving or executing the TwiML requested from voice_url
47
- * @property voiceMethod - The HTTP method we should use when we call voice_url
48
- * @property voiceUrl - The URL we should call when the SIM-connected device makes a voice call
45
+ * @property voiceFallbackMethod - Deprecated
46
+ * @property voiceFallbackUrl - Deprecated
47
+ * @property voiceMethod - Deprecated
48
+ * @property voiceUrl - Deprecated
49
49
  */
50
50
  interface SimInstanceUpdateOptions {
51
51
  accountSid?: string;