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
@@ -0,0 +1,101 @@
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
+ /**
14
+ * Initialize the WebChannelsList
15
+ *
16
+ * @param version - Version of the resource
17
+ */
18
+ declare function WebChannelsList(version: V2): WebChannelsListInstance;
19
+
20
+ interface WebChannelsListInstance {
21
+ /**
22
+ * create a WebChannelsInstance
23
+ *
24
+ * @param opts - Options for request
25
+ * @param callback - Callback to handle processed record
26
+ */
27
+ create(opts: WebChannelsListInstanceCreateOptions, callback?: (error: Error | null, item: WebChannelsInstance) => any): Promise<WebChannelsInstance>;
28
+ /**
29
+ * Provide a user-friendly representation
30
+ */
31
+ toJSON(): any;
32
+ }
33
+
34
+ /**
35
+ * Options to pass to create
36
+ *
37
+ * @property addressSid - The SID of the Conversations Address
38
+ * @property chatFriendlyName - The Conversation's friendly name
39
+ * @property customerFriendlyName - The Conversation participant's friendly name
40
+ * @property preEngagementData - The pre-engagement data
41
+ */
42
+ interface WebChannelsListInstanceCreateOptions {
43
+ addressSid: string;
44
+ chatFriendlyName?: string;
45
+ customerFriendlyName?: string;
46
+ preEngagementData?: string;
47
+ }
48
+
49
+ interface WebChannelsPayload extends WebChannelsResource, Page.TwilioResponsePayload {
50
+ }
51
+
52
+ interface WebChannelsResource {
53
+ conversation_sid: string;
54
+ identity: string;
55
+ }
56
+
57
+ interface WebChannelsSolution {
58
+ }
59
+
60
+
61
+ declare class WebChannelsInstance extends SerializableClass {
62
+ /**
63
+ * Initialize the WebChannelsContext
64
+ *
65
+ * @param version - Version of the resource
66
+ * @param payload - The instance payload
67
+ */
68
+ constructor(version: V2, payload: WebChannelsPayload);
69
+
70
+ conversationSid: string;
71
+ identity: string;
72
+ /**
73
+ * Provide a user-friendly representation
74
+ */
75
+ toJSON(): any;
76
+ }
77
+
78
+
79
+ declare class WebChannelsPage extends Page<V2, WebChannelsPayload, WebChannelsResource, WebChannelsInstance> {
80
+ /**
81
+ * Initialize the WebChannelsPage
82
+ *
83
+ * @param version - Version of the resource
84
+ * @param response - Response from the API
85
+ * @param solution - Path solution
86
+ */
87
+ constructor(version: V2, response: Response<string>, solution: WebChannelsSolution);
88
+
89
+ /**
90
+ * Build an instance of WebChannelsInstance
91
+ *
92
+ * @param payload - Payload response from the API
93
+ */
94
+ getInstance(payload: WebChannelsPayload): WebChannelsInstance;
95
+ /**
96
+ * Provide a user-friendly representation
97
+ */
98
+ toJSON(): any;
99
+ }
100
+
101
+ export { WebChannelsInstance, WebChannelsList, WebChannelsListInstance, WebChannelsListInstanceCreateOptions, WebChannelsPage, WebChannelsPayload, WebChannelsResource, WebChannelsSolution }
@@ -0,0 +1,244 @@
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 WebChannelsList;
19
+ var WebChannelsPage;
20
+ var WebChannelsInstance;
21
+
22
+ /* jshint ignore:start */
23
+ /**
24
+ * Initialize the WebChannelsList
25
+ *
26
+ * @constructor Twilio.FlexApi.V2.WebChannelsList
27
+ *
28
+ * @param {Twilio.FlexApi.V2} version - Version of the resource
29
+ */
30
+ /* jshint ignore:end */
31
+ WebChannelsList = function WebChannelsList(version) {
32
+ /* jshint ignore:start */
33
+ /**
34
+ * @function webChannels
35
+ * @memberof Twilio.FlexApi.V2#
36
+ *
37
+ * @param {string} sid - sid of instance
38
+ *
39
+ * @returns {Twilio.FlexApi.V2.WebChannelsContext}
40
+ */
41
+ /* jshint ignore:end */
42
+ function WebChannelsListInstance(sid) {
43
+ return WebChannelsListInstance.get(sid);
44
+ }
45
+
46
+ WebChannelsListInstance._version = version;
47
+ // Path Solution
48
+ WebChannelsListInstance._solution = {};
49
+ WebChannelsListInstance._uri = `/WebChats`;
50
+ /* jshint ignore:start */
51
+ /**
52
+ * create a WebChannelsInstance
53
+ *
54
+ * @function create
55
+ * @memberof Twilio.FlexApi.V2.WebChannelsList#
56
+ *
57
+ * @param {object} opts - Options for request
58
+ * @param {string} opts.addressSid - The SID of the Conversations Address
59
+ * @param {string} [opts.chatFriendlyName] - The Conversation's friendly name
60
+ * @param {string} [opts.customerFriendlyName] -
61
+ * The Conversation participant's friendly name
62
+ * @param {string} [opts.preEngagementData] - The pre-engagement data
63
+ * @param {function} [callback] - Callback to handle processed record
64
+ *
65
+ * @returns {Promise} Resolves to processed WebChannelsInstance
66
+ */
67
+ /* jshint ignore:end */
68
+ WebChannelsListInstance.create = function create(opts, callback) {
69
+ if (_.isUndefined(opts)) {
70
+ throw new Error('Required parameter "opts" missing.');
71
+ }
72
+ if (_.isUndefined(opts['addressSid'])) {
73
+ throw new Error('Required parameter "opts[\'addressSid\']" missing.');
74
+ }
75
+
76
+ var deferred = Q.defer();
77
+ var data = values.of({
78
+ 'AddressSid': _.get(opts, 'addressSid'),
79
+ 'ChatFriendlyName': _.get(opts, 'chatFriendlyName'),
80
+ 'CustomerFriendlyName': _.get(opts, 'customerFriendlyName'),
81
+ 'PreEngagementData': _.get(opts, 'preEngagementData')
82
+ });
83
+
84
+ var promise = this._version.create({uri: this._uri, method: 'POST', data: data});
85
+
86
+ promise = promise.then(function(payload) {
87
+ deferred.resolve(new WebChannelsInstance(this._version, payload));
88
+ }.bind(this));
89
+
90
+ promise.catch(function(error) {
91
+ deferred.reject(error);
92
+ });
93
+
94
+ if (_.isFunction(callback)) {
95
+ deferred.promise.nodeify(callback);
96
+ }
97
+
98
+ return deferred.promise;
99
+ };
100
+
101
+ /* jshint ignore:start */
102
+ /**
103
+ * Provide a user-friendly representation
104
+ *
105
+ * @function toJSON
106
+ * @memberof Twilio.FlexApi.V2.WebChannelsList#
107
+ *
108
+ * @returns Object
109
+ */
110
+ /* jshint ignore:end */
111
+ WebChannelsListInstance.toJSON = function toJSON() {
112
+ return this._solution;
113
+ };
114
+
115
+ WebChannelsListInstance[util.inspect.custom] = function inspect(depth, options)
116
+ {
117
+ return util.inspect(this.toJSON(), options);
118
+ };
119
+
120
+ return WebChannelsListInstance;
121
+ };
122
+
123
+
124
+ /* jshint ignore:start */
125
+ /**
126
+ * Initialize the WebChannelsPage
127
+ *
128
+ * @constructor Twilio.FlexApi.V2.WebChannelsPage
129
+ *
130
+ * @param {V2} version - Version of the resource
131
+ * @param {Response<string>} response - Response from the API
132
+ * @param {WebChannelsSolution} solution - Path solution
133
+ *
134
+ * @returns WebChannelsPage
135
+ */
136
+ /* jshint ignore:end */
137
+ WebChannelsPage = function WebChannelsPage(version, response, solution) {
138
+ // Path Solution
139
+ this._solution = solution;
140
+
141
+ Page.prototype.constructor.call(this, version, response, this._solution);
142
+ };
143
+
144
+ _.extend(WebChannelsPage.prototype, Page.prototype);
145
+ WebChannelsPage.prototype.constructor = WebChannelsPage;
146
+
147
+ /* jshint ignore:start */
148
+ /**
149
+ * Build an instance of WebChannelsInstance
150
+ *
151
+ * @function getInstance
152
+ * @memberof Twilio.FlexApi.V2.WebChannelsPage#
153
+ *
154
+ * @param {WebChannelsPayload} payload - Payload response from the API
155
+ *
156
+ * @returns WebChannelsInstance
157
+ */
158
+ /* jshint ignore:end */
159
+ WebChannelsPage.prototype.getInstance = function getInstance(payload) {
160
+ return new WebChannelsInstance(this._version, payload);
161
+ };
162
+
163
+ /* jshint ignore:start */
164
+ /**
165
+ * Provide a user-friendly representation
166
+ *
167
+ * @function toJSON
168
+ * @memberof Twilio.FlexApi.V2.WebChannelsPage#
169
+ *
170
+ * @returns Object
171
+ */
172
+ /* jshint ignore:end */
173
+ WebChannelsPage.prototype.toJSON = function toJSON() {
174
+ let clone = {};
175
+ _.forOwn(this, function(value, key) {
176
+ if (!_.startsWith(key, '_') && ! _.isFunction(value)) {
177
+ clone[key] = value;
178
+ }
179
+ });
180
+ return clone;
181
+ };
182
+
183
+ WebChannelsPage.prototype[util.inspect.custom] = function inspect(depth,
184
+ options) {
185
+ return util.inspect(this.toJSON(), options);
186
+ };
187
+
188
+
189
+ /* jshint ignore:start */
190
+ /**
191
+ * Initialize the WebChannelsContext
192
+ *
193
+ * @constructor Twilio.FlexApi.V2.WebChannelsInstance
194
+ *
195
+ * @property {string} conversationSid -
196
+ * The unique string representing the Conversation resource created
197
+ * @property {string} identity - The unique string representing the User created
198
+ *
199
+ * @param {V2} version - Version of the resource
200
+ * @param {WebChannelsPayload} payload - The instance payload
201
+ */
202
+ /* jshint ignore:end */
203
+ WebChannelsInstance = function WebChannelsInstance(version, payload) {
204
+ this._version = version;
205
+
206
+ // Marshaled Properties
207
+ this.conversationSid = payload.conversation_sid; // jshint ignore:line
208
+ this.identity = payload.identity; // jshint ignore:line
209
+
210
+ // Context
211
+ this._context = undefined;
212
+ this._solution = {};
213
+ };
214
+
215
+ /* jshint ignore:start */
216
+ /**
217
+ * Provide a user-friendly representation
218
+ *
219
+ * @function toJSON
220
+ * @memberof Twilio.FlexApi.V2.WebChannelsInstance#
221
+ *
222
+ * @returns Object
223
+ */
224
+ /* jshint ignore:end */
225
+ WebChannelsInstance.prototype.toJSON = function toJSON() {
226
+ let clone = {};
227
+ _.forOwn(this, function(value, key) {
228
+ if (!_.startsWith(key, '_') && ! _.isFunction(value)) {
229
+ clone[key] = value;
230
+ }
231
+ });
232
+ return clone;
233
+ };
234
+
235
+ WebChannelsInstance.prototype[util.inspect.custom] = function inspect(depth,
236
+ options) {
237
+ return util.inspect(this.toJSON(), options);
238
+ };
239
+
240
+ module.exports = {
241
+ WebChannelsList: WebChannelsList,
242
+ WebChannelsPage: WebChannelsPage,
243
+ WebChannelsInstance: WebChannelsInstance
244
+ };
@@ -165,7 +165,7 @@ interface UsAppToPersonListInstanceCreateOptions {
165
165
  hasEmbeddedPhone: boolean;
166
166
  helpKeywords?: string | string[];
167
167
  helpMessage?: string;
168
- messageFlow?: string;
168
+ messageFlow: string;
169
169
  messageSamples: string | string[];
170
170
  optInKeywords?: string | string[];
171
171
  optInMessage?: string;
@@ -67,13 +67,13 @@ UsAppToPersonList = function UsAppToPersonList(version, messagingServiceSid) {
67
67
  * @param {string} opts.brandRegistrationSid - A2P Brand Registration SID
68
68
  * @param {string} opts.description -
69
69
  * A short description of what this SMS campaign does
70
+ * @param {string} opts.messageFlow - The message flow of the campaign
70
71
  * @param {string|list} opts.messageSamples - Message samples
71
72
  * @param {string} opts.usAppToPersonUsecase - A2P Campaign Use Case.
72
73
  * @param {boolean} opts.hasEmbeddedLinks -
73
74
  * Indicates that this SMS campaign will send messages that contain links
74
75
  * @param {boolean} opts.hasEmbeddedPhone -
75
76
  * Indicates that this SMS campaign will send messages that contain phone numbers
76
- * @param {string} [opts.messageFlow] - The message flow of the campaign
77
77
  * @param {string} [opts.optInMessage] - Opt In Message
78
78
  * @param {string} [opts.optOutMessage] - Opt Out Message
79
79
  * @param {string} [opts.helpMessage] - Help Message
@@ -95,6 +95,9 @@ UsAppToPersonList = function UsAppToPersonList(version, messagingServiceSid) {
95
95
  if (_.isUndefined(opts['description'])) {
96
96
  throw new Error('Required parameter "opts[\'description\']" missing.');
97
97
  }
98
+ if (_.isUndefined(opts['messageFlow'])) {
99
+ throw new Error('Required parameter "opts[\'messageFlow\']" missing.');
100
+ }
98
101
  if (_.isUndefined(opts['messageSamples'])) {
99
102
  throw new Error('Required parameter "opts[\'messageSamples\']" missing.');
100
103
  }
@@ -112,11 +115,11 @@ UsAppToPersonList = function UsAppToPersonList(version, messagingServiceSid) {
112
115
  var data = values.of({
113
116
  'BrandRegistrationSid': _.get(opts, 'brandRegistrationSid'),
114
117
  'Description': _.get(opts, 'description'),
118
+ 'MessageFlow': _.get(opts, 'messageFlow'),
115
119
  'MessageSamples': serialize.map(_.get(opts, 'messageSamples'), function(e) { return e; }),
116
120
  'UsAppToPersonUsecase': _.get(opts, 'usAppToPersonUsecase'),
117
121
  'HasEmbeddedLinks': serialize.bool(_.get(opts, 'hasEmbeddedLinks')),
118
122
  'HasEmbeddedPhone': serialize.bool(_.get(opts, 'hasEmbeddedPhone')),
119
- 'MessageFlow': _.get(opts, 'messageFlow'),
120
123
  'OptInMessage': _.get(opts, 'optInMessage'),
121
124
  'OptOutMessage': _.get(opts, 'optOutMessage'),
122
125
  'HelpMessage': _.get(opts, 'helpMessage'),
@@ -24,6 +24,53 @@ type TollfreeVerificationStatus = 'PENDING_REVIEW'|'IN_REVIEW'|'TWILIO_APPROVED'
24
24
  */
25
25
  declare function TollfreeVerificationList(version: V1): TollfreeVerificationListInstance;
26
26
 
27
+ /**
28
+ * Options to pass to update
29
+ *
30
+ * @property additionalInformation - Additional information to be provided for verification
31
+ * @property businessCity - The city of the business or organization using the Tollfree number
32
+ * @property businessContactEmail - The email address of the contact for the business or organization using the Tollfree number
33
+ * @property businessContactFirstName - The first name of the contact for the business or organization using the Tollfree number
34
+ * @property businessContactLastName - The last name of the contact for the business or organization using the Tollfree number
35
+ * @property businessContactPhone - The phone number of the contact for the business or organization using the Tollfree number
36
+ * @property businessCountry - The country of the business or organization using the Tollfree number
37
+ * @property businessName - The name of the business or organization using the Tollfree number
38
+ * @property businessPostalCode - The postal code of the business or organization using the Tollfree number
39
+ * @property businessStateProvinceRegion - The state/province/region of the business or organization using the Tollfree number
40
+ * @property businessStreetAddress - The address of the business or organization using the Tollfree number
41
+ * @property businessStreetAddress2 - The address of the business or organization using the Tollfree number
42
+ * @property businessWebsite - The website of the business or organization using the Tollfree number
43
+ * @property messageVolume - Estimate monthly volume of messages from the Tollfree Number
44
+ * @property notificationEmail - The email address to receive the notification about the verification result.
45
+ * @property optInImageUrls - Link to an image that shows the opt-in workflow. Multiple images allowed and must be a publicly hosted URL
46
+ * @property optInType - Describe how a user opts-in to text messages
47
+ * @property productionMessageSample - An example of message content, i.e. a sample message
48
+ * @property useCaseCategories - The category of the use case for the Tollfree Number. List as many are applicable.
49
+ * @property useCaseSummary - Further explaination on how messaging is used by the business or organization
50
+ */
51
+ interface TollfreeVerificationInstanceUpdateOptions {
52
+ additionalInformation?: string;
53
+ businessCity?: string;
54
+ businessContactEmail?: string;
55
+ businessContactFirstName?: string;
56
+ businessContactLastName?: string;
57
+ businessContactPhone?: string;
58
+ businessCountry?: string;
59
+ businessName?: string;
60
+ businessPostalCode?: string;
61
+ businessStateProvinceRegion?: string;
62
+ businessStreetAddress?: string;
63
+ businessStreetAddress2?: string;
64
+ businessWebsite?: string;
65
+ messageVolume?: string;
66
+ notificationEmail?: string;
67
+ optInImageUrls?: string | string[];
68
+ optInType?: TollfreeVerificationOptInType;
69
+ productionMessageSample?: string;
70
+ useCaseCategories?: string | string[];
71
+ useCaseSummary?: string;
72
+ }
73
+
27
74
  interface TollfreeVerificationListInstance {
28
75
  /**
29
76
  * @param sid - sid of instance
@@ -329,6 +376,19 @@ declare class TollfreeVerificationContext {
329
376
  * Provide a user-friendly representation
330
377
  */
331
378
  toJSON(): any;
379
+ /**
380
+ * update a TollfreeVerificationInstance
381
+ *
382
+ * @param callback - Callback to handle processed record
383
+ */
384
+ update(callback?: (error: Error | null, items: TollfreeVerificationInstance) => any): Promise<TollfreeVerificationInstance>;
385
+ /**
386
+ * update a TollfreeVerificationInstance
387
+ *
388
+ * @param opts - Options for request
389
+ * @param callback - Callback to handle processed record
390
+ */
391
+ update(opts?: TollfreeVerificationInstanceUpdateOptions, callback?: (error: Error | null, items: TollfreeVerificationInstance) => any): Promise<TollfreeVerificationInstance>;
332
392
  }
333
393
 
334
394
 
@@ -384,6 +444,19 @@ declare class TollfreeVerificationInstance extends SerializableClass {
384
444
  toJSON(): any;
385
445
  tollfreePhoneNumberSid: string;
386
446
  trustProductSid: string;
447
+ /**
448
+ * update a TollfreeVerificationInstance
449
+ *
450
+ * @param callback - Callback to handle processed record
451
+ */
452
+ update(callback?: (error: Error | null, items: TollfreeVerificationInstance) => any): Promise<TollfreeVerificationInstance>;
453
+ /**
454
+ * update a TollfreeVerificationInstance
455
+ *
456
+ * @param opts - Options for request
457
+ * @param callback - Callback to handle processed record
458
+ */
459
+ update(opts?: TollfreeVerificationInstanceUpdateOptions, callback?: (error: Error | null, items: TollfreeVerificationInstance) => any): Promise<TollfreeVerificationInstance>;
387
460
  url: string;
388
461
  useCaseCategories: string[];
389
462
  useCaseSummary: string;
@@ -415,4 +488,4 @@ declare class TollfreeVerificationPage extends Page<V1, TollfreeVerificationPayl
415
488
  toJSON(): any;
416
489
  }
417
490
 
418
- export { TollfreeVerificationContext, TollfreeVerificationInstance, TollfreeVerificationList, TollfreeVerificationListInstance, TollfreeVerificationListInstanceCreateOptions, TollfreeVerificationListInstanceEachOptions, TollfreeVerificationListInstanceOptions, TollfreeVerificationListInstancePageOptions, TollfreeVerificationOptInType, TollfreeVerificationPage, TollfreeVerificationPayload, TollfreeVerificationResource, TollfreeVerificationSolution, TollfreeVerificationStatus }
491
+ export { TollfreeVerificationContext, TollfreeVerificationInstance, TollfreeVerificationInstanceUpdateOptions, TollfreeVerificationList, TollfreeVerificationListInstance, TollfreeVerificationListInstanceCreateOptions, TollfreeVerificationListInstanceEachOptions, TollfreeVerificationListInstanceOptions, TollfreeVerificationListInstancePageOptions, TollfreeVerificationOptInType, TollfreeVerificationPage, TollfreeVerificationPayload, TollfreeVerificationResource, TollfreeVerificationSolution, TollfreeVerificationStatus }
@@ -696,6 +696,64 @@ TollfreeVerificationInstance.prototype.fetch = function fetch(callback) {
696
696
  return this._proxy.fetch(callback);
697
697
  };
698
698
 
699
+ /* jshint ignore:start */
700
+ /**
701
+ * update a TollfreeVerificationInstance
702
+ *
703
+ * @function update
704
+ * @memberof Twilio.Messaging.V1.TollfreeVerificationInstance#
705
+ *
706
+ * @param {object} [opts] - Options for request
707
+ * @param {string} [opts.businessName] -
708
+ * The name of the business or organization using the Tollfree number
709
+ * @param {string} [opts.businessWebsite] -
710
+ * The website of the business or organization using the Tollfree number
711
+ * @param {string} [opts.notificationEmail] -
712
+ * The email address to receive the notification about the verification result.
713
+ * @param {string|list} [opts.useCaseCategories] -
714
+ * The category of the use case for the Tollfree Number. List as many are applicable.
715
+ * @param {string} [opts.useCaseSummary] -
716
+ * Further explaination on how messaging is used by the business or organization
717
+ * @param {string} [opts.productionMessageSample] -
718
+ * An example of message content, i.e. a sample message
719
+ * @param {string|list} [opts.optInImageUrls] -
720
+ * Link to an image that shows the opt-in workflow. Multiple images allowed and must be a publicly hosted URL
721
+ * @param {tollfree_verification.opt_in_type} [opts.optInType] -
722
+ * Describe how a user opts-in to text messages
723
+ * @param {string} [opts.messageVolume] -
724
+ * Estimate monthly volume of messages from the Tollfree Number
725
+ * @param {string} [opts.businessStreetAddress] -
726
+ * The address of the business or organization using the Tollfree number
727
+ * @param {string} [opts.businessStreetAddress2] -
728
+ * The address of the business or organization using the Tollfree number
729
+ * @param {string} [opts.businessCity] -
730
+ * The city of the business or organization using the Tollfree number
731
+ * @param {string} [opts.businessStateProvinceRegion] -
732
+ * The state/province/region of the business or organization using the Tollfree number
733
+ * @param {string} [opts.businessPostalCode] -
734
+ * The postal code of the business or organization using the Tollfree number
735
+ * @param {string} [opts.businessCountry] -
736
+ * The country of the business or organization using the Tollfree number
737
+ * @param {string} [opts.additionalInformation] -
738
+ * Additional information to be provided for verification
739
+ * @param {string} [opts.businessContactFirstName] -
740
+ * The first name of the contact for the business or organization using the Tollfree number
741
+ * @param {string} [opts.businessContactLastName] -
742
+ * The last name of the contact for the business or organization using the Tollfree number
743
+ * @param {string} [opts.businessContactEmail] -
744
+ * The email address of the contact for the business or organization using the Tollfree number
745
+ * @param {string} [opts.businessContactPhone] -
746
+ * The phone number of the contact for the business or organization using the Tollfree number
747
+ * @param {function} [callback] - Callback to handle processed record
748
+ *
749
+ * @returns {Promise} Resolves to processed TollfreeVerificationInstance
750
+ */
751
+ /* jshint ignore:end */
752
+ TollfreeVerificationInstance.prototype.update = function update(opts, callback)
753
+ {
754
+ return this._proxy.update(opts, callback);
755
+ };
756
+
699
757
  /* jshint ignore:start */
700
758
  /**
701
759
  * Provide a user-friendly representation
@@ -775,6 +833,107 @@ TollfreeVerificationContext.prototype.fetch = function fetch(callback) {
775
833
  return deferred.promise;
776
834
  };
777
835
 
836
+ /* jshint ignore:start */
837
+ /**
838
+ * update a TollfreeVerificationInstance
839
+ *
840
+ * @function update
841
+ * @memberof Twilio.Messaging.V1.TollfreeVerificationContext#
842
+ *
843
+ * @param {object} [opts] - Options for request
844
+ * @param {string} [opts.businessName] -
845
+ * The name of the business or organization using the Tollfree number
846
+ * @param {string} [opts.businessWebsite] -
847
+ * The website of the business or organization using the Tollfree number
848
+ * @param {string} [opts.notificationEmail] -
849
+ * The email address to receive the notification about the verification result.
850
+ * @param {string|list} [opts.useCaseCategories] -
851
+ * The category of the use case for the Tollfree Number. List as many are applicable.
852
+ * @param {string} [opts.useCaseSummary] -
853
+ * Further explaination on how messaging is used by the business or organization
854
+ * @param {string} [opts.productionMessageSample] -
855
+ * An example of message content, i.e. a sample message
856
+ * @param {string|list} [opts.optInImageUrls] -
857
+ * Link to an image that shows the opt-in workflow. Multiple images allowed and must be a publicly hosted URL
858
+ * @param {tollfree_verification.opt_in_type} [opts.optInType] -
859
+ * Describe how a user opts-in to text messages
860
+ * @param {string} [opts.messageVolume] -
861
+ * Estimate monthly volume of messages from the Tollfree Number
862
+ * @param {string} [opts.businessStreetAddress] -
863
+ * The address of the business or organization using the Tollfree number
864
+ * @param {string} [opts.businessStreetAddress2] -
865
+ * The address of the business or organization using the Tollfree number
866
+ * @param {string} [opts.businessCity] -
867
+ * The city of the business or organization using the Tollfree number
868
+ * @param {string} [opts.businessStateProvinceRegion] -
869
+ * The state/province/region of the business or organization using the Tollfree number
870
+ * @param {string} [opts.businessPostalCode] -
871
+ * The postal code of the business or organization using the Tollfree number
872
+ * @param {string} [opts.businessCountry] -
873
+ * The country of the business or organization using the Tollfree number
874
+ * @param {string} [opts.additionalInformation] -
875
+ * Additional information to be provided for verification
876
+ * @param {string} [opts.businessContactFirstName] -
877
+ * The first name of the contact for the business or organization using the Tollfree number
878
+ * @param {string} [opts.businessContactLastName] -
879
+ * The last name of the contact for the business or organization using the Tollfree number
880
+ * @param {string} [opts.businessContactEmail] -
881
+ * The email address of the contact for the business or organization using the Tollfree number
882
+ * @param {string} [opts.businessContactPhone] -
883
+ * The phone number of the contact for the business or organization using the Tollfree number
884
+ * @param {function} [callback] - Callback to handle processed record
885
+ *
886
+ * @returns {Promise} Resolves to processed TollfreeVerificationInstance
887
+ */
888
+ /* jshint ignore:end */
889
+ TollfreeVerificationContext.prototype.update = function update(opts, callback) {
890
+ if (_.isFunction(opts)) {
891
+ callback = opts;
892
+ opts = {};
893
+ }
894
+ opts = opts || {};
895
+
896
+ var deferred = Q.defer();
897
+ var data = values.of({
898
+ 'BusinessName': _.get(opts, 'businessName'),
899
+ 'BusinessWebsite': _.get(opts, 'businessWebsite'),
900
+ 'NotificationEmail': _.get(opts, 'notificationEmail'),
901
+ 'UseCaseCategories': serialize.map(_.get(opts, 'useCaseCategories'), function(e) { return e; }),
902
+ 'UseCaseSummary': _.get(opts, 'useCaseSummary'),
903
+ 'ProductionMessageSample': _.get(opts, 'productionMessageSample'),
904
+ 'OptInImageUrls': serialize.map(_.get(opts, 'optInImageUrls'), function(e) { return e; }),
905
+ 'OptInType': _.get(opts, 'optInType'),
906
+ 'MessageVolume': _.get(opts, 'messageVolume'),
907
+ 'BusinessStreetAddress': _.get(opts, 'businessStreetAddress'),
908
+ 'BusinessStreetAddress2': _.get(opts, 'businessStreetAddress2'),
909
+ 'BusinessCity': _.get(opts, 'businessCity'),
910
+ 'BusinessStateProvinceRegion': _.get(opts, 'businessStateProvinceRegion'),
911
+ 'BusinessPostalCode': _.get(opts, 'businessPostalCode'),
912
+ 'BusinessCountry': _.get(opts, 'businessCountry'),
913
+ 'AdditionalInformation': _.get(opts, 'additionalInformation'),
914
+ 'BusinessContactFirstName': _.get(opts, 'businessContactFirstName'),
915
+ 'BusinessContactLastName': _.get(opts, 'businessContactLastName'),
916
+ 'BusinessContactEmail': _.get(opts, 'businessContactEmail'),
917
+ 'BusinessContactPhone': _.get(opts, 'businessContactPhone')
918
+ });
919
+
920
+ var promise = this._version.update({uri: this._uri, method: 'POST', data: data});
921
+
922
+ promise = promise.then(function(payload) {
923
+ deferred.resolve(new TollfreeVerificationInstance(this._version, payload, this._solution.sid));
924
+ }.bind(this));
925
+
926
+ promise.catch(function(error) {
927
+ deferred.reject(error);
928
+ });
929
+
930
+ if (_.isFunction(callback)) {
931
+ deferred.promise.nodeify(callback);
932
+ }
933
+
934
+ return deferred.promise;
935
+ };
936
+
778
937
  /* jshint ignore:start */
779
938
  /**
780
939
  * Provide a user-friendly representation
@@ -7,6 +7,8 @@
7
7
 
8
8
  import Oauth = require('../Oauth');
9
9
  import Version = require('../../base/Version');
10
+ import { DeviceCodeList } from './v1/deviceCode';
11
+ import { DeviceCodeListInstance } from './v1/deviceCode';
10
12
  import { OauthList } from './v1/oauth';
11
13
  import { OauthListInstance } from './v1/oauth';
12
14
  import { OpenidDiscoveryList } from './v1/openidDiscovery';
@@ -25,6 +27,7 @@ declare class V1 extends Version {
25
27
  */
26
28
  constructor(domain: Oauth);
27
29
 
30
+ readonly deviceCode: DeviceCodeListInstance;
28
31
  readonly oauth: OauthListInstance;
29
32
  readonly openidDiscovery: OpenidDiscoveryListInstance;
30
33
  readonly token: TokenListInstance;