twilio 3.77.0 → 3.77.3

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 (33) hide show
  1. package/lib/rest/Lookups.d.ts +2 -0
  2. package/lib/rest/Lookups.js +11 -0
  3. package/lib/rest/Twilio.d.ts +1 -3
  4. package/lib/rest/Twilio.js +3 -17
  5. package/lib/rest/api/v2010/account/call/payment.d.ts +1 -1
  6. package/lib/rest/api/v2010/account/call/payment.js +1 -1
  7. package/lib/rest/api/v2010/account/recording.d.ts +2 -0
  8. package/lib/rest/api/v2010/account/recording.js +2 -0
  9. package/lib/rest/flexApi/v1/interaction/interactionChannel/interactionChannelInvite.d.ts +5 -5
  10. package/lib/rest/flexApi/v1/interaction/interactionChannel/interactionChannelInvite.js +10 -9
  11. package/lib/rest/flexApi/v1/interaction/interactionChannel.d.ts +8 -8
  12. package/lib/rest/flexApi/v1/interaction/interactionChannel.js +12 -13
  13. package/lib/rest/flexApi/v1/interaction.js +2 -1
  14. package/lib/rest/lookups/V2.d.ts +25 -0
  15. package/lib/rest/lookups/V2.js +47 -0
  16. package/lib/rest/lookups/v2/phoneNumber.d.ts +182 -0
  17. package/lib/rest/lookups/v2/phoneNumber.js +362 -0
  18. package/lib/rest/media/v1/mediaRecording.d.ts +2 -2
  19. package/lib/rest/media/v1/mediaRecording.js +2 -2
  20. package/lib/rest/verify/v2/service/verification.d.ts +3 -1
  21. package/lib/rest/verify/v2/service/verification.js +3 -0
  22. package/lib/rest/verify/v2/service/verificationCheck.d.ts +1 -1
  23. package/lib/twiml/VoiceResponse.d.ts +79 -4
  24. package/lib/twiml/VoiceResponse.js +110 -3
  25. package/package.json +1 -1
  26. package/lib/rest/Fax.d.ts +0 -26
  27. package/lib/rest/Fax.js +0 -54
  28. package/lib/rest/fax/V1.d.ts +0 -25
  29. package/lib/rest/fax/V1.js +0 -46
  30. package/lib/rest/fax/v1/fax/faxMedia.d.ts +0 -310
  31. package/lib/rest/fax/v1/fax/faxMedia.js +0 -633
  32. package/lib/rest/fax/v1/fax.d.ts +0 -367
  33. package/lib/rest/fax/v1/fax.js +0 -700
@@ -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
+ };
@@ -232,10 +232,10 @@ interface MediaRecordingResource {
232
232
  duration: number;
233
233
  format: MediaRecordingFormat;
234
234
  links: string;
235
+ media_size: number;
235
236
  processor_sid: string;
236
237
  resolution: string;
237
238
  sid: string;
238
- size: number;
239
239
  source_sid: string;
240
240
  status: MediaRecordingStatus;
241
241
  status_callback: string;
@@ -307,6 +307,7 @@ declare class MediaRecordingInstance extends SerializableClass {
307
307
  fetch(callback?: (error: Error | null, items: MediaRecordingInstance) => any): Promise<MediaRecordingInstance>;
308
308
  format: MediaRecordingFormat;
309
309
  links: string;
310
+ mediaSize: number;
310
311
  processorSid: string;
311
312
  /**
312
313
  * remove a MediaRecordingInstance
@@ -316,7 +317,6 @@ declare class MediaRecordingInstance extends SerializableClass {
316
317
  remove(callback?: (error: Error | null, items: MediaRecordingInstance) => any): Promise<boolean>;
317
318
  resolution: string;
318
319
  sid: string;
319
- size: number;
320
320
  sourceSid: string;
321
321
  status: MediaRecordingStatus;
322
322
  statusCallback: string;
@@ -446,7 +446,7 @@ MediaRecordingPage.prototype[util.inspect.custom] = function inspect(depth,
446
446
  * @property {string} sourceSid -
447
447
  * The SID of the resource that generated the original media
448
448
  * @property {string} sid - The unique string that identifies the resource
449
- * @property {number} size - The size of the recording
449
+ * @property {number} mediaSize - The size of the recording media
450
450
  * @property {media_recording.status} status - The status of the MediaRecording
451
451
  * @property {string} statusCallback -
452
452
  * The URL to which Twilio will send MediaRecording event updates
@@ -475,7 +475,7 @@ MediaRecordingInstance = function MediaRecordingInstance(version, payload, sid)
475
475
  this.resolution = payload.resolution; // jshint ignore:line
476
476
  this.sourceSid = payload.source_sid; // jshint ignore:line
477
477
  this.sid = payload.sid; // jshint ignore:line
478
- this.size = deserialize.integer(payload.size); // jshint ignore:line
478
+ this.mediaSize = deserialize.integer(payload.media_size); // jshint ignore:line
479
479
  this.status = payload.status; // jshint ignore:line
480
480
  this.statusCallback = payload.status_callback; // jshint ignore:line
481
481
  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';
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';
13
+ type VerificationCheckChannel = 'sms'|'call'|'email'|'whatsapp'|'sna';
14
14
 
15
15
  /**
16
16
  * Initialize the VerificationCheckList
@@ -205,6 +205,14 @@ declare namespace VoiceResponse {
205
205
 
206
206
  type ConferenceTrim = 'trim-silence'|'do-not-trim';
207
207
 
208
+ type ConversationEvent = 'call-initiated'|'call-ringing'|'call-in-progress'|'call-completed';
209
+
210
+ type ConversationRecord = 'do-not-record'|'record-from-answer'|'record-from-ringing'|'record-from-answer-dual'|'record-from-ringing-dual'|'true'|'false';
211
+
212
+ type ConversationRecordingEvent = 'in-progress'|'completed'|'absent';
213
+
214
+ type ConversationTrim = 'trim-silence'|'do-not-trim';
215
+
208
216
  type DialRecord = 'do-not-record'|'record-from-answer'|'record-from-ringing'|'record-from-answer-dual'|'record-from-ringing-dual';
209
217
 
210
218
  type DialRecordingEvent = 'in-progress'|'completed'|'absent';
@@ -249,9 +257,9 @@ declare namespace VoiceResponse {
249
257
 
250
258
  type RejectReason = 'rejected'|'busy';
251
259
 
252
- type SayLanguage = 'arb'|'ca-ES'|'cy-GB'|'da-DK'|'de-DE'|'en-AU'|'en-CA'|'en-GB'|'en-GB-WLS'|'en-IN'|'en-NZ'|'en-ZA'|'en-US'|'es-ES'|'es-MX'|'es-US'|'fi-FI'|'fr-CA'|'fr-FR'|'hi-IN'|'is-IS'|'it-IT'|'ja-JP'|'ko-KR'|'nb-NO'|'nl-NL'|'pl-PL'|'pt-BR'|'pt-PT'|'ro-RO'|'ru-RU'|'sv-SE'|'tr-TR'|'zh-CN'|'zh-HK'|'zh-TW';
260
+ type SayLanguage = 'arb'|'ca-ES'|'cy-GB'|'da-DK'|'de-DE'|'de-AT'|'en-AU'|'en-CA'|'en-GB'|'en-GB-WLS'|'en-IN'|'en-NZ'|'en-ZA'|'en-US'|'es-ES'|'es-MX'|'es-US'|'fi-FI'|'fr-CA'|'fr-FR'|'hi-IN'|'is-IS'|'it-IT'|'ja-JP'|'ko-KR'|'nb-NO'|'nl-NL'|'pl-PL'|'pt-BR'|'pt-PT'|'ro-RO'|'ru-RU'|'sv-SE'|'tr-TR'|'zh-CN'|'zh-HK'|'zh-TW';
253
261
 
254
- type SayVoice = 'man'|'woman'|'alice'|'Polly.Aditi'|'Polly.Amy'|'Polly.Astrid'|'Polly.Bianca'|'Polly.Brian'|'Polly.Camila'|'Polly.Carla'|'Polly.Carmen'|'Polly.Celine'|'Polly.Chantal'|'Polly.Conchita'|'Polly.Cristiano'|'Polly.Dora'|'Polly.Emma'|'Polly.Enrique'|'Polly.Ewa'|'Polly.Filiz'|'Polly.Geraint'|'Polly.Giorgio'|'Polly.Gwyneth'|'Polly.Hans'|'Polly.Ines'|'Polly.Ivy'|'Polly.Jacek'|'Polly.Jan'|'Polly.Joanna'|'Polly.Joey'|'Polly.Justin'|'Polly.Karl'|'Polly.Kendra'|'Polly.Kimberly'|'Polly.Lea'|'Polly.Liv'|'Polly.Lotte'|'Polly.Lucia'|'Polly.Lupe'|'Polly.Mads'|'Polly.Maja'|'Polly.Marlene'|'Polly.Mathieu'|'Polly.Matthew'|'Polly.Maxim'|'Polly.Mia'|'Polly.Miguel'|'Polly.Mizuki'|'Polly.Naja'|'Polly.Nicole'|'Polly.Penelope'|'Polly.Raveena'|'Polly.Ricardo'|'Polly.Ruben'|'Polly.Russell'|'Polly.Salli'|'Polly.Seoyeon'|'Polly.Takumi'|'Polly.Tatyana'|'Polly.Vicki'|'Polly.Vitoria'|'Polly.Zeina'|'Polly.Zhiyu'|'Polly.Amy-Neural'|'Polly.Emma-Neural'|'Polly.Brian-Neural'|'Polly.Salli-Neural'|'Polly.Ivy-Neural'|'Polly.Joanna-Neural'|'Polly.Kendra-Neural'|'Polly.Kimberly-Neural'|'Polly.Joey-Neural'|'Polly.Justin-Neural'|'Polly.Matthew-Neural'|'Polly.Camila-Neural'|'Polly.Lupe-Neural'|'Polly.Olivia-Neural'|'Polly.Kevin-Neural'|'Polly.Aria-Neural'|'Polly.Ayanda-Neural'|'Polly.Gabrielle-Neural'|'Polly.Lea-Neural'|'Polly.Vicki-Neural'|'Polly.Bianca-Neural'|'Polly.Takumi-Neural'|'Polly.Seoyeon-Neural'|'Polly.Lucia-Neural';
262
+ type SayVoice = 'man'|'woman'|'alice'|'Polly.Aditi'|'Polly.Amy'|'Polly.Astrid'|'Polly.Bianca'|'Polly.Brian'|'Polly.Camila'|'Polly.Carla'|'Polly.Carmen'|'Polly.Celine'|'Polly.Chantal'|'Polly.Conchita'|'Polly.Cristiano'|'Polly.Dora'|'Polly.Emma'|'Polly.Enrique'|'Polly.Ewa'|'Polly.Filiz'|'Polly.Geraint'|'Polly.Giorgio'|'Polly.Gwyneth'|'Polly.Hans'|'Polly.Ines'|'Polly.Ivy'|'Polly.Jacek'|'Polly.Jan'|'Polly.Joanna'|'Polly.Joey'|'Polly.Justin'|'Polly.Karl'|'Polly.Kendra'|'Polly.Kimberly'|'Polly.Lea'|'Polly.Liv'|'Polly.Lotte'|'Polly.Lucia'|'Polly.Lupe'|'Polly.Mads'|'Polly.Maja'|'Polly.Marlene'|'Polly.Mathieu'|'Polly.Matthew'|'Polly.Maxim'|'Polly.Mia'|'Polly.Miguel'|'Polly.Mizuki'|'Polly.Naja'|'Polly.Nicole'|'Polly.Penelope'|'Polly.Raveena'|'Polly.Ricardo'|'Polly.Ruben'|'Polly.Russell'|'Polly.Salli'|'Polly.Seoyeon'|'Polly.Takumi'|'Polly.Tatyana'|'Polly.Vicki'|'Polly.Vitoria'|'Polly.Zeina'|'Polly.Zhiyu'|'Polly.Amy-Neural'|'Polly.Emma-Neural'|'Polly.Brian-Neural'|'Polly.Salli-Neural'|'Polly.Ivy-Neural'|'Polly.Joanna-Neural'|'Polly.Kendra-Neural'|'Polly.Kimberly-Neural'|'Polly.Joey-Neural'|'Polly.Justin-Neural'|'Polly.Matthew-Neural'|'Polly.Camila-Neural'|'Polly.Lupe-Neural'|'Polly.Olivia-Neural'|'Polly.Kevin-Neural'|'Polly.Aria-Neural'|'Polly.Ayanda-Neural'|'Polly.Gabrielle-Neural'|'Polly.Lea-Neural'|'Polly.Vicki-Neural'|'Polly.Bianca-Neural'|'Polly.Takumi-Neural'|'Polly.Seoyeon-Neural'|'Polly.Lucia-Neural'|'Polly.Arlet-Neural'|'Polly.Hannah-Neural'|'Polly.Mia-Neural'|'Polly.Vitoria-Neural'|'Polly.Ines-Neural';
255
263
 
256
264
  type SipEvent = 'initiated'|'ringing'|'answered'|'completed';
257
265
 
@@ -337,6 +345,17 @@ declare namespace VoiceResponse {
337
345
  waitUrl?: string;
338
346
  }
339
347
 
348
+ /**
349
+ * Options to pass to config
350
+ *
351
+ * @property name - The name of the custom config
352
+ * @property value - The value of the custom config
353
+ */
354
+ export interface ConfigAttributes {
355
+ name?: string;
356
+ value?: string;
357
+ }
358
+
340
359
  /**
341
360
  * Options to pass to connect
342
361
  *
@@ -348,6 +367,37 @@ declare namespace VoiceResponse {
348
367
  method?: string;
349
368
  }
350
369
 
370
+ /**
371
+ * Options to pass to conversation
372
+ *
373
+ * @property inboundAutocreation - Inbound autocreation
374
+ * @property inboundTimeout - Inbound timeout
375
+ * @property record - Record
376
+ * @property recordingStatusCallback - Recording status callback URL
377
+ * @property recordingStatusCallbackEvent - Recording status callback events
378
+ * @property recordingStatusCallbackMethod - Recording status callback URL method
379
+ * @property routingAssignmentTimeout - Routing assignment timeout
380
+ * @property serviceInstanceSid - Service instance Sid
381
+ * @property statusCallback - Status callback URL
382
+ * @property statusCallbackEvent - Events to call status callback URL
383
+ * @property statusCallbackMethod - Status callback URL method
384
+ * @property trim - Trim
385
+ */
386
+ export interface ConversationAttributes {
387
+ inboundAutocreation?: boolean;
388
+ inboundTimeout?: number;
389
+ record?: ConversationRecord;
390
+ recordingStatusCallback?: string;
391
+ recordingStatusCallbackEvent?: ConversationRecordingEvent[];
392
+ recordingStatusCallbackMethod?: string;
393
+ routingAssignmentTimeout?: number;
394
+ serviceInstanceSid?: string;
395
+ statusCallback?: string;
396
+ statusCallbackEvent?: ConversationEvent[];
397
+ statusCallbackMethod?: string;
398
+ trim?: ConversationTrim;
399
+ }
400
+
351
401
  /**
352
402
  * Options to pass to dial
353
403
  *
@@ -646,7 +696,7 @@ declare namespace VoiceResponse {
646
696
  /**
647
697
  * Options to pass to say
648
698
  *
649
- * @property language - Message langauge
699
+ * @property language - Message language
650
700
  * @property loop - Times to loop message
651
701
  * @property voice - Voice to use
652
702
  */
@@ -837,12 +887,14 @@ declare namespace VoiceResponse {
837
887
  * @property language - Language to be used by Dialogflow to transcribe speech
838
888
  * @property sentimentAnalysis - Whether sentiment analysis needs to be enabled or not
839
889
  * @property statusCallback - URL to post status callbacks from Twilio
890
+ * @property statusCallbackMethod - HTTP method to use when requesting the status callback URL
840
891
  */
841
892
  export interface VirtualAgentAttributes {
842
893
  connectorName?: string;
843
894
  language?: string;
844
895
  sentimentAnalysis?: boolean;
845
896
  statusCallback?: string;
897
+ statusCallbackMethod?: string;
846
898
  }
847
899
 
848
900
 
@@ -885,6 +937,12 @@ declare namespace VoiceResponse {
885
937
  * @param name - Autopilot assistant sid or unique name
886
938
  */
887
939
  autopilot(attributes: object, name: string): void;
940
+ /**
941
+ * <Conversation> TwiML Noun
942
+ *
943
+ * @param attributes - TwiML attributes
944
+ */
945
+ conversation(attributes?: VoiceResponse.ConversationAttributes): void;
888
946
  /**
889
947
  * <Room> TwiML Noun
890
948
  *
@@ -909,7 +967,7 @@ declare namespace VoiceResponse {
909
967
  *
910
968
  * @param attributes - TwiML attributes
911
969
  */
912
- virtualAgent(attributes?: VoiceResponse.VirtualAgentAttributes): void;
970
+ virtualAgent(attributes?: VoiceResponse.VirtualAgentAttributes): VoiceResponse.VirtualAgent;
913
971
  }
914
972
 
915
973
 
@@ -2713,6 +2771,23 @@ declare namespace VoiceResponse {
2713
2771
  */
2714
2772
  parameter(attributes?: VoiceResponse.ParameterAttributes): void;
2715
2773
  }
2774
+
2775
+
2776
+ class VirtualAgent {
2777
+
2778
+ /**
2779
+ * <Config> TwiML Noun
2780
+ *
2781
+ * @param attributes - TwiML attributes
2782
+ */
2783
+ config(attributes?: VoiceResponse.ConfigAttributes): void;
2784
+ /**
2785
+ * <Parameter> TwiML Noun
2786
+ *
2787
+ * @param attributes - TwiML attributes
2788
+ */
2789
+ parameter(attributes?: VoiceResponse.ParameterAttributes): void;
2790
+ }
2716
2791
  }
2717
2792
 
2718
2793
  export = VoiceResponse;