twilio 3.77.1 → 3.78.0

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 (54) hide show
  1. package/README.md +1 -1
  2. package/lib/rest/Insights.d.ts +0 -2
  3. package/lib/rest/Insights.js +0 -8
  4. package/lib/rest/Lookups.d.ts +2 -0
  5. package/lib/rest/Lookups.js +11 -0
  6. package/lib/rest/Twilio.d.ts +1 -3
  7. package/lib/rest/Twilio.js +3 -17
  8. package/lib/rest/api/v2010/account/call/payment.d.ts +1 -1
  9. package/lib/rest/api/v2010/account/call/payment.js +1 -1
  10. package/lib/rest/api/v2010/account/usage/record/allTime.d.ts +1 -1
  11. package/lib/rest/api/v2010/account/usage/record/daily.d.ts +1 -1
  12. package/lib/rest/api/v2010/account/usage/record/lastMonth.d.ts +1 -1
  13. package/lib/rest/api/v2010/account/usage/record/monthly.d.ts +1 -1
  14. package/lib/rest/api/v2010/account/usage/record/thisMonth.d.ts +1 -1
  15. package/lib/rest/api/v2010/account/usage/record/today.d.ts +1 -1
  16. package/lib/rest/api/v2010/account/usage/record/yearly.d.ts +1 -1
  17. package/lib/rest/api/v2010/account/usage/record/yesterday.d.ts +1 -1
  18. package/lib/rest/api/v2010/account/usage/record.d.ts +1 -1
  19. package/lib/rest/api/v2010/account/usage/trigger.d.ts +1 -1
  20. package/lib/rest/flexApi/v1/interaction/interactionChannel/interactionChannelInvite.d.ts +5 -5
  21. package/lib/rest/flexApi/v1/interaction/interactionChannel/interactionChannelInvite.js +10 -9
  22. package/lib/rest/flexApi/v1/interaction/interactionChannel.d.ts +8 -8
  23. package/lib/rest/flexApi/v1/interaction/interactionChannel.js +12 -13
  24. package/lib/rest/flexApi/v1/interaction.js +2 -1
  25. package/lib/rest/insights/V1.d.ts +0 -3
  26. package/lib/rest/insights/V1.js +0 -11
  27. package/lib/rest/insights/v1/{annotation.d.ts → call/annotation.d.ts} +29 -17
  28. package/lib/rest/insights/v1/{annotation.js → call/annotation.js} +72 -55
  29. package/lib/rest/insights/v1/call/summary.d.ts +2 -0
  30. package/lib/rest/insights/v1/call/summary.js +2 -0
  31. package/lib/rest/insights/v1/call.d.ts +7 -16
  32. package/lib/rest/insights/v1/call.js +28 -16
  33. package/lib/rest/lookups/V2.d.ts +25 -0
  34. package/lib/rest/lookups/V2.js +47 -0
  35. package/lib/rest/lookups/v2/phoneNumber.d.ts +182 -0
  36. package/lib/rest/lookups/v2/phoneNumber.js +362 -0
  37. package/lib/rest/media/v1/mediaRecording.d.ts +2 -4
  38. package/lib/rest/media/v1/mediaRecording.js +2 -4
  39. package/lib/rest/verify/v2/service/verification.d.ts +3 -1
  40. package/lib/rest/verify/v2/service/verification.js +3 -0
  41. package/lib/rest/verify/v2/service/verificationCheck.d.ts +1 -1
  42. package/lib/rest/verify/v2/verificationAttemptsSummary.d.ts +2 -2
  43. package/lib/rest/verify/v2/verificationAttemptsSummary.js +3 -3
  44. package/lib/twiml/VoiceResponse.d.ts +81 -4
  45. package/lib/twiml/VoiceResponse.js +111 -3
  46. package/package.json +1 -1
  47. package/lib/rest/Fax.d.ts +0 -26
  48. package/lib/rest/Fax.js +0 -54
  49. package/lib/rest/fax/V1.d.ts +0 -25
  50. package/lib/rest/fax/V1.js +0 -46
  51. package/lib/rest/fax/v1/fax/faxMedia.d.ts +0 -310
  52. package/lib/rest/fax/v1/fax/faxMedia.js +0 -633
  53. package/lib/rest/fax/v1/fax.d.ts +0 -367
  54. package/lib/rest/fax/v1/fax.js +0 -700
@@ -0,0 +1,182 @@
1
+ /**
2
+ * This code was generated by
3
+ * \ / _ _ _| _ _
4
+ * | (_)\/(_)(_|\/| |(/_ v1.0.0
5
+ * / /
6
+ */
7
+
8
+ import Page = require('../../../base/Page');
9
+ import Response = require('../../../http/response');
10
+ import V2 = require('../V2');
11
+ import { SerializableClass } from '../../../interfaces';
12
+
13
+ type PhoneNumberType = 'landline'|'mobile'|'voip';
14
+
15
+ type PhoneNumberValidationError = 'TOO_SHORT'|'TOO_LONG'|'INVALID_BUT_POSSIBLE'|'INVALID_COUNTRY_CODE'|'INVALID_LENGTH'|'NOT_A_NUMBER';
16
+
17
+ /**
18
+ * Initialize the PhoneNumberList
19
+ *
20
+ * PLEASE NOTE that this class contains beta products that are subject to change.
21
+ * Use them with caution.
22
+ *
23
+ * @param version - Version of the resource
24
+ */
25
+ declare function PhoneNumberList(version: V2): PhoneNumberListInstance;
26
+
27
+ /**
28
+ * Options to pass to fetch
29
+ *
30
+ * @property countryCode - Country code for national phone number lookups
31
+ * @property fields - Fields to return
32
+ */
33
+ interface PhoneNumberInstanceFetchOptions {
34
+ countryCode?: string;
35
+ fields?: string;
36
+ }
37
+
38
+ interface PhoneNumberListInstance {
39
+ /**
40
+ * @param sid - sid of instance
41
+ */
42
+ (sid: string): PhoneNumberContext;
43
+ /**
44
+ * Constructs a phone_number
45
+ *
46
+ * @param phoneNumber - Phone number to lookup
47
+ */
48
+ get(phoneNumber: string): PhoneNumberContext;
49
+ /**
50
+ * Provide a user-friendly representation
51
+ */
52
+ toJSON(): any;
53
+ }
54
+
55
+ interface PhoneNumberPayload extends PhoneNumberResource, Page.TwilioResponsePayload {
56
+ }
57
+
58
+ interface PhoneNumberResource {
59
+ call_forwarding: object;
60
+ caller_name: object;
61
+ calling_country_code: string;
62
+ country_code: string;
63
+ enhanced_line_type: object;
64
+ line_type_intelligence: object;
65
+ live_activity: object;
66
+ national_format: string;
67
+ phone_number: string;
68
+ sim_swap: object;
69
+ url: string;
70
+ valid: boolean;
71
+ validation_errors: PhoneNumberValidationError[];
72
+ }
73
+
74
+ interface PhoneNumberSolution {
75
+ }
76
+
77
+
78
+ declare class PhoneNumberContext {
79
+ /**
80
+ * Initialize the PhoneNumberContext
81
+ *
82
+ * PLEASE NOTE that this class contains beta products that are subject to change.
83
+ * Use them with caution.
84
+ *
85
+ * @param version - Version of the resource
86
+ * @param phoneNumber - Phone number to lookup
87
+ */
88
+ constructor(version: V2, phoneNumber: string);
89
+
90
+ /**
91
+ * fetch a PhoneNumberInstance
92
+ *
93
+ * @param callback - Callback to handle processed record
94
+ */
95
+ fetch(callback?: (error: Error | null, items: PhoneNumberInstance) => any): Promise<PhoneNumberInstance>;
96
+ /**
97
+ * fetch a PhoneNumberInstance
98
+ *
99
+ * @param opts - Options for request
100
+ * @param callback - Callback to handle processed record
101
+ */
102
+ fetch(opts?: PhoneNumberInstanceFetchOptions, callback?: (error: Error | null, items: PhoneNumberInstance) => any): Promise<PhoneNumberInstance>;
103
+ /**
104
+ * Provide a user-friendly representation
105
+ */
106
+ toJSON(): any;
107
+ }
108
+
109
+
110
+ declare class PhoneNumberInstance extends SerializableClass {
111
+ /**
112
+ * Initialize the PhoneNumberContext
113
+ *
114
+ * PLEASE NOTE that this class contains beta products that are subject to change.
115
+ * Use them with caution.
116
+ *
117
+ * @param version - Version of the resource
118
+ * @param payload - The instance payload
119
+ * @param phoneNumber - Phone number to lookup
120
+ */
121
+ constructor(version: V2, payload: PhoneNumberPayload, phoneNumber: string);
122
+
123
+ private _proxy: PhoneNumberContext;
124
+ callForwarding: any;
125
+ callerName: any;
126
+ callingCountryCode: string;
127
+ countryCode: string;
128
+ enhancedLineType: any;
129
+ /**
130
+ * fetch a PhoneNumberInstance
131
+ *
132
+ * @param callback - Callback to handle processed record
133
+ */
134
+ fetch(callback?: (error: Error | null, items: PhoneNumberInstance) => any): Promise<PhoneNumberInstance>;
135
+ /**
136
+ * fetch a PhoneNumberInstance
137
+ *
138
+ * @param opts - Options for request
139
+ * @param callback - Callback to handle processed record
140
+ */
141
+ fetch(opts?: PhoneNumberInstanceFetchOptions, callback?: (error: Error | null, items: PhoneNumberInstance) => any): Promise<PhoneNumberInstance>;
142
+ lineTypeIntelligence: any;
143
+ liveActivity: any;
144
+ nationalFormat: string;
145
+ phoneNumber: string;
146
+ simSwap: any;
147
+ /**
148
+ * Provide a user-friendly representation
149
+ */
150
+ toJSON(): any;
151
+ url: string;
152
+ valid: boolean;
153
+ validationErrors: PhoneNumberValidationError[];
154
+ }
155
+
156
+
157
+ declare class PhoneNumberPage extends Page<V2, PhoneNumberPayload, PhoneNumberResource, PhoneNumberInstance> {
158
+ /**
159
+ * Initialize the PhoneNumberPage
160
+ *
161
+ * PLEASE NOTE that this class contains beta products that are subject to change.
162
+ * Use them with caution.
163
+ *
164
+ * @param version - Version of the resource
165
+ * @param response - Response from the API
166
+ * @param solution - Path solution
167
+ */
168
+ constructor(version: V2, response: Response<string>, solution: PhoneNumberSolution);
169
+
170
+ /**
171
+ * Build an instance of PhoneNumberInstance
172
+ *
173
+ * @param payload - Payload response from the API
174
+ */
175
+ getInstance(payload: PhoneNumberPayload): PhoneNumberInstance;
176
+ /**
177
+ * Provide a user-friendly representation
178
+ */
179
+ toJSON(): any;
180
+ }
181
+
182
+ export { PhoneNumberContext, PhoneNumberInstance, PhoneNumberInstanceFetchOptions, PhoneNumberList, PhoneNumberListInstance, PhoneNumberPage, PhoneNumberPayload, PhoneNumberResource, PhoneNumberSolution, PhoneNumberType, PhoneNumberValidationError }
@@ -0,0 +1,362 @@
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 values = require('../../../base/values'); /* jshint ignore:line */
17
+
18
+ var PhoneNumberList;
19
+ var PhoneNumberPage;
20
+ var PhoneNumberInstance;
21
+ var PhoneNumberContext;
22
+
23
+ /* jshint ignore:start */
24
+ /**
25
+ * Initialize the PhoneNumberList
26
+ *
27
+ * PLEASE NOTE that this class contains beta products that are subject to change.
28
+ * Use them with caution.
29
+ *
30
+ * @constructor Twilio.Lookups.V2.PhoneNumberList
31
+ *
32
+ * @param {Twilio.Lookups.V2} version - Version of the resource
33
+ */
34
+ /* jshint ignore:end */
35
+ PhoneNumberList = function PhoneNumberList(version) {
36
+ /* jshint ignore:start */
37
+ /**
38
+ * @function phoneNumbers
39
+ * @memberof Twilio.Lookups.V2#
40
+ *
41
+ * @param {string} sid - sid of instance
42
+ *
43
+ * @returns {Twilio.Lookups.V2.PhoneNumberContext}
44
+ */
45
+ /* jshint ignore:end */
46
+ function PhoneNumberListInstance(sid) {
47
+ return PhoneNumberListInstance.get(sid);
48
+ }
49
+
50
+ PhoneNumberListInstance._version = version;
51
+ // Path Solution
52
+ PhoneNumberListInstance._solution = {};
53
+ /* jshint ignore:start */
54
+ /**
55
+ * Constructs a phone_number
56
+ *
57
+ * @function get
58
+ * @memberof Twilio.Lookups.V2.PhoneNumberList#
59
+ *
60
+ * @param {string} phoneNumber - Phone number to lookup
61
+ *
62
+ * @returns {Twilio.Lookups.V2.PhoneNumberContext}
63
+ */
64
+ /* jshint ignore:end */
65
+ PhoneNumberListInstance.get = function get(phoneNumber) {
66
+ return new PhoneNumberContext(this._version, phoneNumber);
67
+ };
68
+
69
+ /* jshint ignore:start */
70
+ /**
71
+ * Provide a user-friendly representation
72
+ *
73
+ * @function toJSON
74
+ * @memberof Twilio.Lookups.V2.PhoneNumberList#
75
+ *
76
+ * @returns Object
77
+ */
78
+ /* jshint ignore:end */
79
+ PhoneNumberListInstance.toJSON = function toJSON() {
80
+ return this._solution;
81
+ };
82
+
83
+ PhoneNumberListInstance[util.inspect.custom] = function inspect(depth, options)
84
+ {
85
+ return util.inspect(this.toJSON(), options);
86
+ };
87
+
88
+ return PhoneNumberListInstance;
89
+ };
90
+
91
+
92
+ /* jshint ignore:start */
93
+ /**
94
+ * Initialize the PhoneNumberPage
95
+ *
96
+ * PLEASE NOTE that this class contains beta products that are subject to change.
97
+ * Use them with caution.
98
+ *
99
+ * @constructor Twilio.Lookups.V2.PhoneNumberPage
100
+ *
101
+ * @param {V2} version - Version of the resource
102
+ * @param {Response<string>} response - Response from the API
103
+ * @param {PhoneNumberSolution} solution - Path solution
104
+ *
105
+ * @returns PhoneNumberPage
106
+ */
107
+ /* jshint ignore:end */
108
+ PhoneNumberPage = function PhoneNumberPage(version, response, solution) {
109
+ // Path Solution
110
+ this._solution = solution;
111
+
112
+ Page.prototype.constructor.call(this, version, response, this._solution);
113
+ };
114
+
115
+ _.extend(PhoneNumberPage.prototype, Page.prototype);
116
+ PhoneNumberPage.prototype.constructor = PhoneNumberPage;
117
+
118
+ /* jshint ignore:start */
119
+ /**
120
+ * Build an instance of PhoneNumberInstance
121
+ *
122
+ * @function getInstance
123
+ * @memberof Twilio.Lookups.V2.PhoneNumberPage#
124
+ *
125
+ * @param {PhoneNumberPayload} payload - Payload response from the API
126
+ *
127
+ * @returns PhoneNumberInstance
128
+ */
129
+ /* jshint ignore:end */
130
+ PhoneNumberPage.prototype.getInstance = function getInstance(payload) {
131
+ return new PhoneNumberInstance(this._version, payload);
132
+ };
133
+
134
+ /* jshint ignore:start */
135
+ /**
136
+ * Provide a user-friendly representation
137
+ *
138
+ * @function toJSON
139
+ * @memberof Twilio.Lookups.V2.PhoneNumberPage#
140
+ *
141
+ * @returns Object
142
+ */
143
+ /* jshint ignore:end */
144
+ PhoneNumberPage.prototype.toJSON = function toJSON() {
145
+ let clone = {};
146
+ _.forOwn(this, function(value, key) {
147
+ if (!_.startsWith(key, '_') && ! _.isFunction(value)) {
148
+ clone[key] = value;
149
+ }
150
+ });
151
+ return clone;
152
+ };
153
+
154
+ PhoneNumberPage.prototype[util.inspect.custom] = function inspect(depth,
155
+ options) {
156
+ return util.inspect(this.toJSON(), options);
157
+ };
158
+
159
+
160
+ /* jshint ignore:start */
161
+ /**
162
+ * Initialize the PhoneNumberContext
163
+ *
164
+ * PLEASE NOTE that this class contains beta products that are subject to change.
165
+ * Use them with caution.
166
+ *
167
+ * @constructor Twilio.Lookups.V2.PhoneNumberInstance
168
+ *
169
+ * @property {string} callingCountryCode - International dialing prefix
170
+ * @property {string} countryCode - Phone number's ISO country code
171
+ * @property {string} phoneNumber - Phone number in E.164 format
172
+ * @property {string} nationalFormat - Phone number in national format
173
+ * @property {boolean} valid - Boolean which indicates if the phone number is valid
174
+ * @property {phone_number.validation_error} validationErrors -
175
+ * Contains reasons why a phone number is invalid
176
+ * @property {object} callerName - An object that contains caller name information
177
+ * @property {object} simSwap - An object that contains SIM swap information
178
+ * @property {object} callForwarding -
179
+ * An object that contains call forwarding status information
180
+ * @property {object} liveActivity -
181
+ * An object that contains live activity information
182
+ * @property {object} enhancedLineType -
183
+ * An object that contains line type information
184
+ * @property {object} lineTypeIntelligence -
185
+ * An object that contains line type information
186
+ * @property {string} url - The absolute URL of the resource
187
+ *
188
+ * @param {V2} version - Version of the resource
189
+ * @param {PhoneNumberPayload} payload - The instance payload
190
+ * @param {string} phoneNumber - Phone number to lookup
191
+ */
192
+ /* jshint ignore:end */
193
+ PhoneNumberInstance = function PhoneNumberInstance(version, payload,
194
+ phoneNumber) {
195
+ this._version = version;
196
+
197
+ // Marshaled Properties
198
+ this.callingCountryCode = payload.calling_country_code; // jshint ignore:line
199
+ this.countryCode = payload.country_code; // jshint ignore:line
200
+ this.phoneNumber = payload.phone_number; // jshint ignore:line
201
+ this.nationalFormat = payload.national_format; // jshint ignore:line
202
+ this.valid = payload.valid; // jshint ignore:line
203
+ this.validationErrors = payload.validation_errors; // jshint ignore:line
204
+ this.callerName = payload.caller_name; // jshint ignore:line
205
+ this.simSwap = payload.sim_swap; // jshint ignore:line
206
+ this.callForwarding = payload.call_forwarding; // jshint ignore:line
207
+ this.liveActivity = payload.live_activity; // jshint ignore:line
208
+ this.enhancedLineType = payload.enhanced_line_type; // jshint ignore:line
209
+ this.lineTypeIntelligence = payload.line_type_intelligence; // jshint ignore:line
210
+ this.url = payload.url; // jshint ignore:line
211
+
212
+ // Context
213
+ this._context = undefined;
214
+ this._solution = {phoneNumber: phoneNumber || this.phoneNumber, };
215
+ };
216
+
217
+ Object.defineProperty(PhoneNumberInstance.prototype,
218
+ '_proxy', {
219
+ get: function() {
220
+ if (!this._context) {
221
+ this._context = new PhoneNumberContext(this._version, this._solution.phoneNumber);
222
+ }
223
+
224
+ return this._context;
225
+ }
226
+ });
227
+
228
+ /* jshint ignore:start */
229
+ /**
230
+ * fetch a PhoneNumberInstance
231
+ *
232
+ * @function fetch
233
+ * @memberof Twilio.Lookups.V2.PhoneNumberInstance#
234
+ *
235
+ * @param {object} [opts] - Options for request
236
+ * @param {string} [opts.fields] - Fields to return
237
+ * @param {string} [opts.countryCode] -
238
+ * Country code for national phone number lookups
239
+ * @param {function} [callback] - Callback to handle processed record
240
+ *
241
+ * @returns {Promise} Resolves to processed PhoneNumberInstance
242
+ */
243
+ /* jshint ignore:end */
244
+ PhoneNumberInstance.prototype.fetch = function fetch(opts, callback) {
245
+ return this._proxy.fetch(opts, callback);
246
+ };
247
+
248
+ /* jshint ignore:start */
249
+ /**
250
+ * Provide a user-friendly representation
251
+ *
252
+ * @function toJSON
253
+ * @memberof Twilio.Lookups.V2.PhoneNumberInstance#
254
+ *
255
+ * @returns Object
256
+ */
257
+ /* jshint ignore:end */
258
+ PhoneNumberInstance.prototype.toJSON = function toJSON() {
259
+ let clone = {};
260
+ _.forOwn(this, function(value, key) {
261
+ if (!_.startsWith(key, '_') && ! _.isFunction(value)) {
262
+ clone[key] = value;
263
+ }
264
+ });
265
+ return clone;
266
+ };
267
+
268
+ PhoneNumberInstance.prototype[util.inspect.custom] = function inspect(depth,
269
+ options) {
270
+ return util.inspect(this.toJSON(), options);
271
+ };
272
+
273
+
274
+ /* jshint ignore:start */
275
+ /**
276
+ * Initialize the PhoneNumberContext
277
+ *
278
+ * PLEASE NOTE that this class contains beta products that are subject to change.
279
+ * Use them with caution.
280
+ *
281
+ * @constructor Twilio.Lookups.V2.PhoneNumberContext
282
+ *
283
+ * @param {V2} version - Version of the resource
284
+ * @param {string} phoneNumber - Phone number to lookup
285
+ */
286
+ /* jshint ignore:end */
287
+ PhoneNumberContext = function PhoneNumberContext(version, phoneNumber) {
288
+ this._version = version;
289
+
290
+ // Path Solution
291
+ this._solution = {phoneNumber: phoneNumber, };
292
+ this._uri = `/PhoneNumbers/${phoneNumber}`;
293
+ };
294
+
295
+ /* jshint ignore:start */
296
+ /**
297
+ * fetch a PhoneNumberInstance
298
+ *
299
+ * @function fetch
300
+ * @memberof Twilio.Lookups.V2.PhoneNumberContext#
301
+ *
302
+ * @param {object} [opts] - Options for request
303
+ * @param {string} [opts.fields] - Fields to return
304
+ * @param {string} [opts.countryCode] -
305
+ * Country code for national phone number lookups
306
+ * @param {function} [callback] - Callback to handle processed record
307
+ *
308
+ * @returns {Promise} Resolves to processed PhoneNumberInstance
309
+ */
310
+ /* jshint ignore:end */
311
+ PhoneNumberContext.prototype.fetch = function fetch(opts, callback) {
312
+ if (_.isFunction(opts)) {
313
+ callback = opts;
314
+ opts = {};
315
+ }
316
+ opts = opts || {};
317
+
318
+ var deferred = Q.defer();
319
+ var data = values.of({'Fields': _.get(opts, 'fields'), 'CountryCode': _.get(opts, 'countryCode')});
320
+
321
+ var promise = this._version.fetch({uri: this._uri, method: 'GET', params: data});
322
+
323
+ promise = promise.then(function(payload) {
324
+ deferred.resolve(new PhoneNumberInstance(this._version, payload, this._solution.phoneNumber));
325
+ }.bind(this));
326
+
327
+ promise.catch(function(error) {
328
+ deferred.reject(error);
329
+ });
330
+
331
+ if (_.isFunction(callback)) {
332
+ deferred.promise.nodeify(callback);
333
+ }
334
+
335
+ return deferred.promise;
336
+ };
337
+
338
+ /* jshint ignore:start */
339
+ /**
340
+ * Provide a user-friendly representation
341
+ *
342
+ * @function toJSON
343
+ * @memberof Twilio.Lookups.V2.PhoneNumberContext#
344
+ *
345
+ * @returns Object
346
+ */
347
+ /* jshint ignore:end */
348
+ PhoneNumberContext.prototype.toJSON = function toJSON() {
349
+ return this._solution;
350
+ };
351
+
352
+ PhoneNumberContext.prototype[util.inspect.custom] = function inspect(depth,
353
+ options) {
354
+ return util.inspect(this.toJSON(), options);
355
+ };
356
+
357
+ module.exports = {
358
+ PhoneNumberList: PhoneNumberList,
359
+ PhoneNumberPage: PhoneNumberPage,
360
+ PhoneNumberInstance: PhoneNumberInstance,
361
+ PhoneNumberContext: PhoneNumberContext
362
+ };
@@ -226,16 +226,15 @@ interface MediaRecordingPayload extends MediaRecordingResource, Page.TwilioRespo
226
226
 
227
227
  interface MediaRecordingResource {
228
228
  account_sid: string;
229
- bitrate: number;
230
229
  date_created: Date;
231
230
  date_updated: Date;
232
231
  duration: number;
233
232
  format: MediaRecordingFormat;
234
233
  links: string;
234
+ media_size: number;
235
235
  processor_sid: string;
236
236
  resolution: string;
237
237
  sid: string;
238
- size: number;
239
238
  source_sid: string;
240
239
  status: MediaRecordingStatus;
241
240
  status_callback: string;
@@ -295,7 +294,6 @@ declare class MediaRecordingInstance extends SerializableClass {
295
294
 
296
295
  private _proxy: MediaRecordingContext;
297
296
  accountSid: string;
298
- bitrate: number;
299
297
  dateCreated: Date;
300
298
  dateUpdated: Date;
301
299
  duration: number;
@@ -307,6 +305,7 @@ declare class MediaRecordingInstance extends SerializableClass {
307
305
  fetch(callback?: (error: Error | null, items: MediaRecordingInstance) => any): Promise<MediaRecordingInstance>;
308
306
  format: MediaRecordingFormat;
309
307
  links: string;
308
+ mediaSize: number;
310
309
  processorSid: string;
311
310
  /**
312
311
  * remove a MediaRecordingInstance
@@ -316,7 +315,6 @@ declare class MediaRecordingInstance extends SerializableClass {
316
315
  remove(callback?: (error: Error | null, items: MediaRecordingInstance) => any): Promise<boolean>;
317
316
  resolution: string;
318
317
  sid: string;
319
- size: number;
320
318
  sourceSid: string;
321
319
  status: MediaRecordingStatus;
322
320
  statusCallback: string;
@@ -433,7 +433,6 @@ MediaRecordingPage.prototype[util.inspect.custom] = function inspect(depth,
433
433
  * @constructor Twilio.Media.V1.MediaRecordingInstance
434
434
  *
435
435
  * @property {string} accountSid - The SID of the Account that created the resource
436
- * @property {number} bitrate - The bitrate of the media
437
436
  * @property {Date} dateCreated -
438
437
  * The ISO 8601 date and time in GMT when the resource was created
439
438
  * @property {Date} dateUpdated -
@@ -446,7 +445,7 @@ MediaRecordingPage.prototype[util.inspect.custom] = function inspect(depth,
446
445
  * @property {string} sourceSid -
447
446
  * The SID of the resource that generated the original media
448
447
  * @property {string} sid - The unique string that identifies the resource
449
- * @property {number} size - The size of the recording
448
+ * @property {number} mediaSize - The size of the recording media
450
449
  * @property {media_recording.status} status - The status of the MediaRecording
451
450
  * @property {string} statusCallback -
452
451
  * The URL to which Twilio will send MediaRecording event updates
@@ -465,7 +464,6 @@ MediaRecordingInstance = function MediaRecordingInstance(version, payload, sid)
465
464
 
466
465
  // Marshaled Properties
467
466
  this.accountSid = payload.account_sid; // jshint ignore:line
468
- this.bitrate = deserialize.integer(payload.bitrate); // jshint ignore:line
469
467
  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line
470
468
  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line
471
469
  this.duration = deserialize.integer(payload.duration); // jshint ignore:line
@@ -475,7 +473,7 @@ MediaRecordingInstance = function MediaRecordingInstance(version, payload, sid)
475
473
  this.resolution = payload.resolution; // jshint ignore:line
476
474
  this.sourceSid = payload.source_sid; // jshint ignore:line
477
475
  this.sid = payload.sid; // jshint ignore:line
478
- this.size = deserialize.integer(payload.size); // jshint ignore:line
476
+ this.mediaSize = deserialize.integer(payload.media_size); // jshint ignore:line
479
477
  this.status = payload.status; // jshint ignore:line
480
478
  this.statusCallback = payload.status_callback; // jshint ignore:line
481
479
  this.statusCallbackMethod = payload.status_callback_method; // jshint ignore:line
@@ -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 VerificationChannel = 'sms'|'call'|'email'|'whatsapp'|'silent';
13
+ type VerificationChannel = 'sms'|'call'|'email'|'whatsapp'|'sna';
14
14
 
15
15
  type VerificationStatus = 'canceled'|'approved';
16
16
 
@@ -104,6 +104,7 @@ interface VerificationResource {
104
104
  send_code_attempts: object[];
105
105
  service_sid: string;
106
106
  sid: string;
107
+ sna: object;
107
108
  status: string;
108
109
  to: string;
109
110
  url: string;
@@ -173,6 +174,7 @@ declare class VerificationInstance extends SerializableClass {
173
174
  sendCodeAttempts: object[];
174
175
  serviceSid: string;
175
176
  sid: string;
177
+ sna: any;
176
178
  status: string;
177
179
  to: string;
178
180
  /**
@@ -268,6 +268,8 @@ VerificationPage.prototype[util.inspect.custom] = function inspect(depth,
268
268
  * The RFC 2822 date and time in GMT when the resource was created
269
269
  * @property {Date} dateUpdated -
270
270
  * The RFC 2822 date and time in GMT when the resource was last updated
271
+ * @property {object} sna -
272
+ * The set of fields used for a silent network auth (`sna`) verification
271
273
  * @property {string} url - The absolute URL of the Verification resource
272
274
  *
273
275
  * @param {V2} version - Version of the resource
@@ -295,6 +297,7 @@ VerificationInstance = function VerificationInstance(version, payload,
295
297
  this.sendCodeAttempts = payload.send_code_attempts; // jshint ignore:line
296
298
  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line
297
299
  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line
300
+ this.sna = payload.sna; // jshint ignore:line
298
301
  this.url = payload.url; // jshint ignore:line
299
302
 
300
303
  // Context
@@ -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 VerificationCheckChannel = 'sms'|'call'|'email'|'whatsapp'|'silent';
13
+ type VerificationCheckChannel = 'sms'|'call'|'email'|'whatsapp'|'sna';
14
14
 
15
15
  /**
16
16
  * Initialize the VerificationCheckList
@@ -27,7 +27,7 @@ declare function VerificationAttemptsSummaryList(version: V2): VerificationAttem
27
27
  * @property dateCreatedAfter - Consider verification attempts create after this date on the summary.
28
28
  * @property dateCreatedBefore - Consider verification attempts created before this date on the summary.
29
29
  * @property destinationPrefix - Filters the attempts considered on the summary by destination prefix.
30
- * @property verifyServiceSid - Filter the verification attempts considered on the summary by verify service.
30
+ * @property serviceSid - Filter the verification attempts considered on the summary by verify service.
31
31
  */
32
32
  interface VerificationAttemptsSummaryInstanceFetchOptions {
33
33
  channel?: VerificationAttemptsSummaryChannels;
@@ -35,7 +35,7 @@ interface VerificationAttemptsSummaryInstanceFetchOptions {
35
35
  dateCreatedAfter?: Date;
36
36
  dateCreatedBefore?: Date;
37
37
  destinationPrefix?: string;
38
- verifyServiceSid?: string;
38
+ serviceSid?: string;
39
39
  }
40
40
 
41
41
  interface VerificationAttemptsSummaryListInstance {