twilio 3.83.4 → 3.84.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +6 -0
  3. package/lib/rest/FlexApi.d.ts +4 -0
  4. package/lib/rest/FlexApi.js +19 -0
  5. package/lib/rest/Oauth.d.ts +2 -0
  6. package/lib/rest/Oauth.js +8 -0
  7. package/lib/rest/api/v2010/account/address.d.ts +6 -0
  8. package/lib/rest/api/v2010/account/address.js +13 -2
  9. package/lib/rest/api/v2010/account/call/userDefinedMessageSubscription.d.ts +1 -1
  10. package/lib/rest/api/v2010/account/call/userDefinedMessageSubscription.js +3 -6
  11. package/lib/rest/conversations/v1/conversation/message.d.ts +6 -0
  12. package/lib/rest/conversations/v1/conversation/message.js +10 -1
  13. package/lib/rest/conversations/v1/service/conversation/message.d.ts +6 -0
  14. package/lib/rest/conversations/v1/service/conversation/message.js +10 -1
  15. package/lib/rest/flexApi/V2.d.ts +25 -0
  16. package/lib/rest/flexApi/V2.js +46 -0
  17. package/lib/rest/flexApi/v1/goodData.d.ts +2 -2
  18. package/lib/rest/flexApi/v1/goodData.js +4 -4
  19. package/lib/rest/flexApi/v1/userRoles.js +1 -1
  20. package/lib/rest/flexApi/v2/webChannels.d.ts +101 -0
  21. package/lib/rest/flexApi/v2/webChannels.js +244 -0
  22. package/lib/rest/messaging/v1/service/usAppToPerson.d.ts +1 -1
  23. package/lib/rest/messaging/v1/service/usAppToPerson.js +5 -2
  24. package/lib/rest/messaging/v1/tollfreeVerification.d.ts +74 -1
  25. package/lib/rest/messaging/v1/tollfreeVerification.js +159 -0
  26. package/lib/rest/oauth/V1.d.ts +3 -0
  27. package/lib/rest/oauth/V1.js +11 -0
  28. package/lib/rest/oauth/v1/deviceCode.d.ts +107 -0
  29. package/lib/rest/oauth/v1/deviceCode.js +258 -0
  30. package/lib/rest/oauth/v1/openidDiscovery.js +1 -1
  31. package/lib/rest/supersim/v1/ipCommand.d.ts +1 -1
  32. package/lib/rest/supersim/v1/ipCommand.js +2 -1
  33. package/lib/rest/supersim/v1/settingsUpdate.d.ts +6 -0
  34. package/lib/rest/supersim/v1/settingsUpdate.js +7 -0
  35. package/lib/twiml/VoiceResponse.d.ts +7 -7
  36. package/lib/twiml/VoiceResponse.js +14 -14
  37. package/package.json +2 -2
@@ -10,6 +10,7 @@
10
10
  /* jshint ignore:end */
11
11
 
12
12
  var _ = require('lodash'); /* jshint ignore:line */
13
+ var DeviceCodeList = require('./v1/deviceCode').DeviceCodeList;
13
14
  var OauthList = require('./v1/oauth').OauthList;
14
15
  var OpenidDiscoveryList = require('./v1/openidDiscovery').OpenidDiscoveryList;
15
16
  var TokenList = require('./v1/token').TokenList;
@@ -24,6 +25,7 @@ var Version = require('../../base/Version'); /* jshint ignore:line */
24
25
  * @constructor Twilio.Oauth.V1
25
26
  *
26
27
  * @property {Twilio.Oauth.V1.OauthList} oauth - oauth resource
28
+ * @property {Twilio.Oauth.V1.DeviceCodeList} deviceCode - deviceCode resource
27
29
  * @property {Twilio.Oauth.V1.OpenidDiscoveryList} openidDiscovery -
28
30
  * openidDiscovery resource
29
31
  * @property {Twilio.Oauth.V1.TokenList} token - token resource
@@ -37,6 +39,7 @@ function V1(domain) {
37
39
 
38
40
  // Resources
39
41
  this._oauth = undefined;
42
+ this._deviceCode = undefined;
40
43
  this._openidDiscovery = undefined;
41
44
  this._token = undefined;
42
45
  this._userInfo = undefined;
@@ -53,6 +56,14 @@ Object.defineProperty(V1.prototype,
53
56
  }
54
57
  });
55
58
 
59
+ Object.defineProperty(V1.prototype,
60
+ 'deviceCode', {
61
+ get: function() {
62
+ this._deviceCode = this._deviceCode || new DeviceCodeList(this);
63
+ return this._deviceCode;
64
+ }
65
+ });
66
+
56
67
  Object.defineProperty(V1.prototype,
57
68
  'openidDiscovery', {
58
69
  get: function() {
@@ -0,0 +1,107 @@
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 V1 = require('../V1');
11
+ import { SerializableClass } from '../../../interfaces';
12
+
13
+ /**
14
+ * Initialize the DeviceCodeList
15
+ *
16
+ * @param version - Version of the resource
17
+ */
18
+ declare function DeviceCodeList(version: V1): DeviceCodeListInstance;
19
+
20
+ interface DeviceCodeListInstance {
21
+ /**
22
+ * create a DeviceCodeInstance
23
+ *
24
+ * @param opts - Options for request
25
+ * @param callback - Callback to handle processed record
26
+ */
27
+ create(opts: DeviceCodeListInstanceCreateOptions, callback?: (error: Error | null, item: DeviceCodeInstance) => any): Promise<DeviceCodeInstance>;
28
+ /**
29
+ * Provide a user-friendly representation
30
+ */
31
+ toJSON(): any;
32
+ }
33
+
34
+ /**
35
+ * Options to pass to create
36
+ *
37
+ * @property audiences - An array of intended audiences
38
+ * @property clientSid - A string that uniquely identifies this oauth app
39
+ * @property scopes - An Array of scopes
40
+ */
41
+ interface DeviceCodeListInstanceCreateOptions {
42
+ audiences?: string | string[];
43
+ clientSid: string;
44
+ scopes: string | string[];
45
+ }
46
+
47
+ interface DeviceCodePayload extends DeviceCodeResource, Page.TwilioResponsePayload {
48
+ }
49
+
50
+ interface DeviceCodeResource {
51
+ device_code: string;
52
+ expires_in: number;
53
+ interval: number;
54
+ user_code: string;
55
+ verification_uri: string;
56
+ verification_uri_complete: string;
57
+ }
58
+
59
+ interface DeviceCodeSolution {
60
+ }
61
+
62
+
63
+ declare class DeviceCodeInstance extends SerializableClass {
64
+ /**
65
+ * Initialize the DeviceCodeContext
66
+ *
67
+ * @param version - Version of the resource
68
+ * @param payload - The instance payload
69
+ */
70
+ constructor(version: V1, payload: DeviceCodePayload);
71
+
72
+ deviceCode: string;
73
+ expiresIn: number;
74
+ interval: number;
75
+ /**
76
+ * Provide a user-friendly representation
77
+ */
78
+ toJSON(): any;
79
+ userCode: string;
80
+ verificationUri: string;
81
+ verificationUriComplete: string;
82
+ }
83
+
84
+
85
+ declare class DeviceCodePage extends Page<V1, DeviceCodePayload, DeviceCodeResource, DeviceCodeInstance> {
86
+ /**
87
+ * Initialize the DeviceCodePage
88
+ *
89
+ * @param version - Version of the resource
90
+ * @param response - Response from the API
91
+ * @param solution - Path solution
92
+ */
93
+ constructor(version: V1, response: Response<string>, solution: DeviceCodeSolution);
94
+
95
+ /**
96
+ * Build an instance of DeviceCodeInstance
97
+ *
98
+ * @param payload - Payload response from the API
99
+ */
100
+ getInstance(payload: DeviceCodePayload): DeviceCodeInstance;
101
+ /**
102
+ * Provide a user-friendly representation
103
+ */
104
+ toJSON(): any;
105
+ }
106
+
107
+ export { DeviceCodeInstance, DeviceCodeList, DeviceCodeListInstance, DeviceCodeListInstanceCreateOptions, DeviceCodePage, DeviceCodePayload, DeviceCodeResource, DeviceCodeSolution }
@@ -0,0 +1,258 @@
1
+ 'use strict';
2
+
3
+ /* jshint ignore:start */
4
+ /**
5
+ * This code was generated by
6
+ * \ / _ _ _| _ _
7
+ * | (_)\/(_)(_|\/| |(/_ v1.0.0
8
+ * / /
9
+ */
10
+ /* jshint ignore:end */
11
+
12
+ var Q = require('q'); /* jshint ignore:line */
13
+ var _ = require('lodash'); /* jshint ignore:line */
14
+ var util = require('util'); /* jshint ignore:line */
15
+ var Page = require('../../../base/Page'); /* jshint ignore:line */
16
+ var deserialize = require(
17
+ '../../../base/deserialize'); /* jshint ignore:line */
18
+ var serialize = require('../../../base/serialize'); /* jshint ignore:line */
19
+ var values = require('../../../base/values'); /* jshint ignore:line */
20
+
21
+ var DeviceCodeList;
22
+ var DeviceCodePage;
23
+ var DeviceCodeInstance;
24
+
25
+ /* jshint ignore:start */
26
+ /**
27
+ * Initialize the DeviceCodeList
28
+ *
29
+ * @constructor Twilio.Oauth.V1.DeviceCodeList
30
+ *
31
+ * @param {Twilio.Oauth.V1} version - Version of the resource
32
+ */
33
+ /* jshint ignore:end */
34
+ DeviceCodeList = function DeviceCodeList(version) {
35
+ /* jshint ignore:start */
36
+ /**
37
+ * @function deviceCode
38
+ * @memberof Twilio.Oauth.V1#
39
+ *
40
+ * @param {string} sid - sid of instance
41
+ *
42
+ * @returns {Twilio.Oauth.V1.DeviceCodeContext}
43
+ */
44
+ /* jshint ignore:end */
45
+ function DeviceCodeListInstance(sid) {
46
+ return DeviceCodeListInstance.get(sid);
47
+ }
48
+
49
+ DeviceCodeListInstance._version = version;
50
+ // Path Solution
51
+ DeviceCodeListInstance._solution = {};
52
+ DeviceCodeListInstance._uri = `/device/code`;
53
+ /* jshint ignore:start */
54
+ /**
55
+ * create a DeviceCodeInstance
56
+ *
57
+ * @function create
58
+ * @memberof Twilio.Oauth.V1.DeviceCodeList#
59
+ *
60
+ * @param {object} opts - Options for request
61
+ * @param {string} opts.clientSid -
62
+ * A string that uniquely identifies this oauth app
63
+ * @param {string|list} opts.scopes - An Array of scopes
64
+ * @param {string|list} [opts.audiences] - An array of intended audiences
65
+ * @param {function} [callback] - Callback to handle processed record
66
+ *
67
+ * @returns {Promise} Resolves to processed DeviceCodeInstance
68
+ */
69
+ /* jshint ignore:end */
70
+ DeviceCodeListInstance.create = function create(opts, callback) {
71
+ if (_.isUndefined(opts)) {
72
+ throw new Error('Required parameter "opts" missing.');
73
+ }
74
+ if (_.isUndefined(opts['clientSid'])) {
75
+ throw new Error('Required parameter "opts[\'clientSid\']" missing.');
76
+ }
77
+ if (_.isUndefined(opts['scopes'])) {
78
+ throw new Error('Required parameter "opts[\'scopes\']" missing.');
79
+ }
80
+
81
+ var deferred = Q.defer();
82
+ var data = values.of({
83
+ 'ClientSid': _.get(opts, 'clientSid'),
84
+ 'Scopes': serialize.map(_.get(opts, 'scopes'), function(e) { return e; }),
85
+ 'Audiences': serialize.map(_.get(opts, 'audiences'), function(e) { return e; })
86
+ });
87
+
88
+ var promise = this._version.create({uri: this._uri, method: 'POST', data: data});
89
+
90
+ promise = promise.then(function(payload) {
91
+ deferred.resolve(new DeviceCodeInstance(this._version, payload));
92
+ }.bind(this));
93
+
94
+ promise.catch(function(error) {
95
+ deferred.reject(error);
96
+ });
97
+
98
+ if (_.isFunction(callback)) {
99
+ deferred.promise.nodeify(callback);
100
+ }
101
+
102
+ return deferred.promise;
103
+ };
104
+
105
+ /* jshint ignore:start */
106
+ /**
107
+ * Provide a user-friendly representation
108
+ *
109
+ * @function toJSON
110
+ * @memberof Twilio.Oauth.V1.DeviceCodeList#
111
+ *
112
+ * @returns Object
113
+ */
114
+ /* jshint ignore:end */
115
+ DeviceCodeListInstance.toJSON = function toJSON() {
116
+ return this._solution;
117
+ };
118
+
119
+ DeviceCodeListInstance[util.inspect.custom] = function inspect(depth, options) {
120
+ return util.inspect(this.toJSON(), options);
121
+ };
122
+
123
+ return DeviceCodeListInstance;
124
+ };
125
+
126
+
127
+ /* jshint ignore:start */
128
+ /**
129
+ * Initialize the DeviceCodePage
130
+ *
131
+ * @constructor Twilio.Oauth.V1.DeviceCodePage
132
+ *
133
+ * @param {V1} version - Version of the resource
134
+ * @param {Response<string>} response - Response from the API
135
+ * @param {DeviceCodeSolution} solution - Path solution
136
+ *
137
+ * @returns DeviceCodePage
138
+ */
139
+ /* jshint ignore:end */
140
+ DeviceCodePage = function DeviceCodePage(version, response, solution) {
141
+ // Path Solution
142
+ this._solution = solution;
143
+
144
+ Page.prototype.constructor.call(this, version, response, this._solution);
145
+ };
146
+
147
+ _.extend(DeviceCodePage.prototype, Page.prototype);
148
+ DeviceCodePage.prototype.constructor = DeviceCodePage;
149
+
150
+ /* jshint ignore:start */
151
+ /**
152
+ * Build an instance of DeviceCodeInstance
153
+ *
154
+ * @function getInstance
155
+ * @memberof Twilio.Oauth.V1.DeviceCodePage#
156
+ *
157
+ * @param {DeviceCodePayload} payload - Payload response from the API
158
+ *
159
+ * @returns DeviceCodeInstance
160
+ */
161
+ /* jshint ignore:end */
162
+ DeviceCodePage.prototype.getInstance = function getInstance(payload) {
163
+ return new DeviceCodeInstance(this._version, payload);
164
+ };
165
+
166
+ /* jshint ignore:start */
167
+ /**
168
+ * Provide a user-friendly representation
169
+ *
170
+ * @function toJSON
171
+ * @memberof Twilio.Oauth.V1.DeviceCodePage#
172
+ *
173
+ * @returns Object
174
+ */
175
+ /* jshint ignore:end */
176
+ DeviceCodePage.prototype.toJSON = function toJSON() {
177
+ let clone = {};
178
+ _.forOwn(this, function(value, key) {
179
+ if (!_.startsWith(key, '_') && ! _.isFunction(value)) {
180
+ clone[key] = value;
181
+ }
182
+ });
183
+ return clone;
184
+ };
185
+
186
+ DeviceCodePage.prototype[util.inspect.custom] = function inspect(depth, options)
187
+ {
188
+ return util.inspect(this.toJSON(), options);
189
+ };
190
+
191
+
192
+ /* jshint ignore:start */
193
+ /**
194
+ * Initialize the DeviceCodeContext
195
+ *
196
+ * @constructor Twilio.Oauth.V1.DeviceCodeInstance
197
+ *
198
+ * @property {string} deviceCode - The device verification code
199
+ * @property {string} userCode - The verification code for the end user
200
+ * @property {string} verificationUri -
201
+ * The URI that the end user visits to verify request
202
+ * @property {string} verificationUriComplete -
203
+ * he URI with user_code that the end-user alternatively visits to verify request
204
+ * @property {number} expiresIn -
205
+ * The expiration time of the device_code and user_code in seconds
206
+ * @property {number} interval -
207
+ * The minimum amount of time in seconds that the client should wait between polling requests to the token endpoint
208
+ *
209
+ * @param {V1} version - Version of the resource
210
+ * @param {DeviceCodePayload} payload - The instance payload
211
+ */
212
+ /* jshint ignore:end */
213
+ DeviceCodeInstance = function DeviceCodeInstance(version, payload) {
214
+ this._version = version;
215
+
216
+ // Marshaled Properties
217
+ this.deviceCode = payload.device_code; // jshint ignore:line
218
+ this.userCode = payload.user_code; // jshint ignore:line
219
+ this.verificationUri = payload.verification_uri; // jshint ignore:line
220
+ this.verificationUriComplete = payload.verification_uri_complete; // jshint ignore:line
221
+ this.expiresIn = deserialize.integer(payload.expires_in); // jshint ignore:line
222
+ this.interval = deserialize.integer(payload.interval); // jshint ignore:line
223
+
224
+ // Context
225
+ this._context = undefined;
226
+ this._solution = {};
227
+ };
228
+
229
+ /* jshint ignore:start */
230
+ /**
231
+ * Provide a user-friendly representation
232
+ *
233
+ * @function toJSON
234
+ * @memberof Twilio.Oauth.V1.DeviceCodeInstance#
235
+ *
236
+ * @returns Object
237
+ */
238
+ /* jshint ignore:end */
239
+ DeviceCodeInstance.prototype.toJSON = function toJSON() {
240
+ let clone = {};
241
+ _.forOwn(this, function(value, key) {
242
+ if (!_.startsWith(key, '_') && ! _.isFunction(value)) {
243
+ clone[key] = value;
244
+ }
245
+ });
246
+ return clone;
247
+ };
248
+
249
+ DeviceCodeInstance.prototype[util.inspect.custom] = function inspect(depth,
250
+ options) {
251
+ return util.inspect(this.toJSON(), options);
252
+ };
253
+
254
+ module.exports = {
255
+ DeviceCodeList: DeviceCodeList,
256
+ DeviceCodePage: DeviceCodePage,
257
+ DeviceCodeInstance: DeviceCodeInstance
258
+ };
@@ -268,7 +268,7 @@ OpenidDiscoveryContext = function OpenidDiscoveryContext(version) {
268
268
 
269
269
  // Path Solution
270
270
  this._solution = {};
271
- this._uri = `/well-known/openid-configuration`;
271
+ this._uri = `/.well-known/openid-configuration`;
272
272
  };
273
273
 
274
274
  /* jshint ignore:start */
@@ -152,7 +152,7 @@ interface IpCommandListInstance {
152
152
  * @property callbackMethod - The HTTP method we should use to call callback_url
153
153
  * @property callbackUrl - The URL we should call after we have sent the IP Command
154
154
  * @property devicePort - The device port to which the IP Command will be sent
155
- * @property payload - The payload to be delivered to the device
155
+ * @property payload - The data to be delivered to the device. If payload_type has been specified as binary, payload should be encoded using base64 encoding. Twilio will decode the the binary payload before sending to the device.
156
156
  * @property payloadType - Indicates how the payload is encoded
157
157
  * @property sim - The sid or unique_name of the Super SIM to send the IP Command to
158
158
  */
@@ -63,7 +63,8 @@ IpCommandList = function IpCommandList(version) {
63
63
  * @param {object} opts - Options for request
64
64
  * @param {string} opts.sim -
65
65
  * The sid or unique_name of the Super SIM to send the IP Command to
66
- * @param {string} opts.payload - The payload to be delivered to the device
66
+ * @param {string} opts.payload -
67
+ * The data to be delivered to the device. If payload_type has been specified as binary, payload should be encoded using base64 encoding. Twilio will decode the the binary payload before sending to the device.
67
68
  * @param {number} opts.devicePort -
68
69
  * The device port to which the IP Command will be sent
69
70
  * @param {ip_command.payload_type} [opts.payloadType] -
@@ -143,6 +143,7 @@ interface SettingsUpdateListInstance {
143
143
  * each() will attempt to read the limit with the most efficient
144
144
  * page size, i.e. min(limit, 1000)
145
145
  * @property sim - Filter the Settings Updates by Super SIM
146
+ * @property status - Filter the Settings Updates by status
146
147
  */
147
148
  interface SettingsUpdateListInstanceEachOptions {
148
149
  callback?: (item: SettingsUpdateInstance, done: (err?: Error) => void) => void;
@@ -150,6 +151,7 @@ interface SettingsUpdateListInstanceEachOptions {
150
151
  limit?: number;
151
152
  pageSize?: number;
152
153
  sim?: string;
154
+ status?: SettingsUpdateStatus;
153
155
  }
154
156
 
155
157
  /**
@@ -166,11 +168,13 @@ interface SettingsUpdateListInstanceEachOptions {
166
168
  * list() will attempt to read the limit with the most
167
169
  * efficient page size, i.e. min(limit, 1000)
168
170
  * @property sim - Filter the Settings Updates by Super SIM
171
+ * @property status - Filter the Settings Updates by status
169
172
  */
170
173
  interface SettingsUpdateListInstanceOptions {
171
174
  limit?: number;
172
175
  pageSize?: number;
173
176
  sim?: string;
177
+ status?: SettingsUpdateStatus;
174
178
  }
175
179
 
176
180
  /**
@@ -180,12 +184,14 @@ interface SettingsUpdateListInstanceOptions {
180
184
  * @property pageSize - Number of records to return, defaults to 50
181
185
  * @property pageToken - PageToken provided by the API
182
186
  * @property sim - Filter the Settings Updates by Super SIM
187
+ * @property status - Filter the Settings Updates by status
183
188
  */
184
189
  interface SettingsUpdateListInstancePageOptions {
185
190
  pageNumber?: number;
186
191
  pageSize?: number;
187
192
  pageToken?: string;
188
193
  sim?: string;
194
+ status?: SettingsUpdateStatus;
189
195
  }
190
196
 
191
197
  interface SettingsUpdatePayload extends SettingsUpdateResource, Page.TwilioResponsePayload {
@@ -70,6 +70,8 @@ SettingsUpdateList = function SettingsUpdateList(version) {
70
70
  *
71
71
  * @param {object} [opts] - Options for request
72
72
  * @param {string} [opts.sim] - Filter the Settings Updates by Super SIM
73
+ * @param {settings_update.status} [opts.status] -
74
+ * Filter the Settings Updates by status
73
75
  * @param {number} [opts.limit] -
74
76
  * Upper limit for the number of records to return.
75
77
  * each() guarantees never to return more than limit.
@@ -160,6 +162,8 @@ SettingsUpdateList = function SettingsUpdateList(version) {
160
162
  *
161
163
  * @param {object} [opts] - Options for request
162
164
  * @param {string} [opts.sim] - Filter the Settings Updates by Super SIM
165
+ * @param {settings_update.status} [opts.status] -
166
+ * Filter the Settings Updates by status
163
167
  * @param {number} [opts.limit] -
164
168
  * Upper limit for the number of records to return.
165
169
  * list() guarantees never to return more than limit.
@@ -221,6 +225,8 @@ SettingsUpdateList = function SettingsUpdateList(version) {
221
225
  *
222
226
  * @param {object} [opts] - Options for request
223
227
  * @param {string} [opts.sim] - Filter the Settings Updates by Super SIM
228
+ * @param {settings_update.status} [opts.status] -
229
+ * Filter the Settings Updates by status
224
230
  * @param {string} [opts.pageToken] - PageToken provided by the API
225
231
  * @param {number} [opts.pageNumber] -
226
232
  * Page Number, this value is simply for client state
@@ -240,6 +246,7 @@ SettingsUpdateList = function SettingsUpdateList(version) {
240
246
  var deferred = Q.defer();
241
247
  var data = values.of({
242
248
  'Sim': _.get(opts, 'sim'),
249
+ 'Status': _.get(opts, 'status'),
243
250
  'PageToken': opts.pageToken,
244
251
  'Page': opts.pageNumber,
245
252
  'PageSize': opts.pageSize
@@ -259,7 +259,7 @@ declare namespace VoiceResponse {
259
259
 
260
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';
261
261
 
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.Aria-Neural'|'Polly.Arlet-Neural'|'Polly.Arthur-Neural'|'Polly.Ayanda-Neural'|'Polly.Bianca-Neural'|'Polly.Brian-Neural'|'Polly.Camila-Neural'|'Polly.Daniel-Neural'|'Polly.Emma-Neural'|'Polly.Gabrielle-Neural'|'Polly.Hannah-Neural'|'Polly.Ines-Neural'|'Polly.Ivy-Neural'|'Polly.Joanna-Neural'|'Polly.Joey-Neural'|'Polly.Justin-Neural'|'Polly.Kajal-Neural'|'Polly.Kendra-Neural'|'Polly.Kevin-Neural'|'Polly.Kimberly-Neural'|'Polly.Lea-Neural'|'Polly.Liam-Neural'|'Polly.Lucia-Neural'|'Polly.Lupe-Neural'|'Polly.Matthew-Neural'|'Polly.Mia-Neural'|'Polly.Olivia-Neural'|'Polly.Pedro-Neural'|'Polly.Salli-Neural'|'Polly.Seoyeon-Neural'|'Polly.Takumi-Neural'|'Polly.Vicki-Neural'|'Polly.Vitoria-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.Aria-Neural'|'Polly.Arlet-Neural'|'Polly.Arthur-Neural'|'Polly.Ayanda-Neural'|'Polly.Bianca-Neural'|'Polly.Brian-Neural'|'Polly.Camila-Neural'|'Polly.Daniel-Neural'|'Polly.Elin-Neural'|'Polly.Emma-Neural'|'Polly.Gabrielle-Neural'|'Polly.Hala-Neural'|'Polly.Hannah-Neural'|'Polly.Hiujin-Neural'|'Polly.Ida-Neural'|'Polly.Ines-Neural'|'Polly.Ivy-Neural'|'Polly.Joanna-Neural'|'Polly.Joey-Neural'|'Polly.Justin-Neural'|'Polly.Kajal-Neural'|'Polly.Kendra-Neural'|'Polly.Kevin-Neural'|'Polly.Kimberly-Neural'|'Polly.Laura-Neural'|'Polly.Lea-Neural'|'Polly.Liam-Neural'|'Polly.Lucia-Neural'|'Polly.Lupe-Neural'|'Polly.Matthew-Neural'|'Polly.Mia-Neural'|'Polly.Ola-Neural'|'Polly.Olivia-Neural'|'Polly.Pedro-Neural'|'Polly.Salli-Neural'|'Polly.Seoyeon-Neural'|'Polly.Suvi-Neural'|'Polly.Takumi-Neural'|'Polly.Vicki-Neural'|'Polly.Vitoria-Neural'|'Polly.Zhiyu-Neural';
263
263
 
264
264
  type SipEvent = 'initiated'|'ringing'|'answered'|'completed';
265
265
 
@@ -269,13 +269,13 @@ declare namespace VoiceResponse {
269
269
 
270
270
  type SsmlEmphasisLevel = 'strong'|'moderate'|'reduced';
271
271
 
272
- type SsmlLangXmlLang = 'arb'|'ca-ES'|'cmn-CN'|'cy-GB'|'da-DK'|'de-DE'|'de-AT'|'en-AU'|'en-GB'|'en-GB-WLS'|'en-IN'|'en-NZ'|'en-US'|'en-ZA'|'es-ES'|'es-MX'|'es-US'|'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';
272
+ type SsmlLangXmlLang = 'arb'|'ar-AE'|'ca-ES'|'cmn-CN'|'cy-GB'|'da-DK'|'de-DE'|'de-AT'|'en-AU'|'en-GB'|'en-GB-WLS'|'en-IN'|'en-NZ'|'en-US'|'en-ZA'|'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'|'yue-CN';
273
273
 
274
- type SsmlPhonemeAlphabet = 'ipa'|'x-sampa';
274
+ type SsmlPhonemeAlphabet = 'ipa'|'x-sampa'|'x-amazon-jyutping'|'x-amazon-pinyin'|'x-amazon-pron-kana'|'x-amazon-yomigana';
275
275
 
276
- type SsmlSayAsInterpretAs = 'character'|'spell-out'|'cardinal'|'number'|'ordinal'|'digits'|'fraction'|'unit'|'date'|'time'|'address'|'expletive'|'telephone';
276
+ type SsmlSayAsFormat = 'mdy'|'dmy'|'ymd'|'md'|'dm'|'ym'|'my'|'d'|'m'|'y'|'yyyymmdd';
277
277
 
278
- type SsmlSayAsRole = 'mdy'|'dmy'|'ymd'|'md'|'dm'|'ym'|'my'|'d'|'m'|'y'|'yyyymmdd';
278
+ type SsmlSayAsInterpretAs = 'characters'|'spell-out'|'cardinal'|'number'|'ordinal'|'digits'|'fraction'|'unit'|'date'|'time'|'address'|'expletive'|'telephone';
279
279
 
280
280
  type StreamStatusCallbackMethod = 'GET'|'POST';
281
281
 
@@ -849,12 +849,12 @@ declare namespace VoiceResponse {
849
849
  /**
850
850
  * Options to pass to sayAs
851
851
  *
852
+ * @property format - Specify the format of the date when interpret-as is set to date
852
853
  * @property interpret-as - Specify the type of words are spoken
853
- * @property role - Specify the format of the date when interpret-as is set to date
854
854
  */
855
855
  export interface SsmlSayAsAttributes {
856
+ format?: SsmlSayAsFormat;
856
857
  "interpret-as"?: SsmlSayAsInterpretAs;
857
- role?: SsmlSayAsRole;
858
858
  }
859
859
 
860
860
  /**