twilio 3.83.3 → 3.84.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 (63) hide show
  1. package/README.md +6 -0
  2. package/lib/rest/FlexApi.d.ts +6 -0
  3. package/lib/rest/FlexApi.js +27 -0
  4. package/lib/rest/Messaging.d.ts +4 -0
  5. package/lib/rest/Messaging.js +18 -0
  6. package/lib/rest/Oauth.d.ts +2 -0
  7. package/lib/rest/Oauth.js +8 -0
  8. package/lib/rest/Preview.d.ts +0 -10
  9. package/lib/rest/Preview.js +0 -46
  10. package/lib/rest/api/v2010/account/address.d.ts +6 -0
  11. package/lib/rest/api/v2010/account/address.js +13 -2
  12. package/lib/rest/api/v2010/account/call/userDefinedMessageSubscription.d.ts +1 -1
  13. package/lib/rest/api/v2010/account/call/userDefinedMessageSubscription.js +3 -6
  14. package/lib/rest/content/v1/content/approvalFetch.d.ts +139 -0
  15. package/lib/rest/content/v1/content/approvalFetch.js +328 -0
  16. package/lib/rest/content/v1/content.d.ts +7 -6
  17. package/lib/rest/content/v1/content.js +31 -31
  18. package/lib/rest/flexApi/V1.d.ts +3 -0
  19. package/lib/rest/flexApi/V1.js +11 -0
  20. package/lib/rest/flexApi/V2.d.ts +25 -0
  21. package/lib/rest/flexApi/V2.js +46 -0
  22. package/lib/rest/flexApi/v1/assessments.d.ts +113 -0
  23. package/lib/rest/flexApi/v1/assessments.js +300 -0
  24. package/lib/rest/flexApi/v1/goodData.d.ts +2 -2
  25. package/lib/rest/flexApi/v1/goodData.js +4 -4
  26. package/lib/rest/flexApi/v1/userRoles.js +1 -1
  27. package/lib/rest/flexApi/v2/webChannels.d.ts +101 -0
  28. package/lib/rest/flexApi/v2/webChannels.js +244 -0
  29. package/lib/rest/lookups/v2/phoneNumber.d.ts +22 -0
  30. package/lib/rest/lookups/v2/phoneNumber.js +43 -1
  31. package/lib/rest/messaging/V1.d.ts +6 -0
  32. package/lib/rest/messaging/V1.js +24 -0
  33. package/lib/rest/messaging/v1/domainCert.d.ts +178 -0
  34. package/lib/rest/messaging/v1/domainCert.js +447 -0
  35. package/lib/rest/messaging/v1/domainConfig.d.ts +172 -0
  36. package/lib/rest/messaging/v1/domainConfig.js +421 -0
  37. package/lib/rest/messaging/v1/service/usAppToPerson.d.ts +1 -1
  38. package/lib/rest/messaging/v1/service/usAppToPerson.js +5 -2
  39. package/lib/rest/microvisor/v1/device.d.ts +2 -0
  40. package/lib/rest/microvisor/v1/device.js +2 -0
  41. package/lib/rest/oauth/V1.d.ts +3 -0
  42. package/lib/rest/oauth/V1.js +11 -0
  43. package/lib/rest/oauth/v1/deviceCode.d.ts +107 -0
  44. package/lib/rest/oauth/v1/deviceCode.js +258 -0
  45. package/lib/rest/oauth/v1/openidDiscovery.js +1 -1
  46. package/lib/rest/serverless/v1/service/build.d.ts +1 -1
  47. package/lib/rest/supersim/v1/settingsUpdate.d.ts +6 -0
  48. package/lib/rest/supersim/v1/settingsUpdate.js +7 -0
  49. package/lib/twiml/VoiceResponse.d.ts +7 -7
  50. package/lib/twiml/VoiceResponse.js +14 -14
  51. package/package.json +1 -1
  52. package/lib/rest/preview/TrustedComms.d.ts +0 -34
  53. package/lib/rest/preview/TrustedComms.js +0 -84
  54. package/lib/rest/preview/trusted_comms/brandedChannel/channel.d.ts +0 -120
  55. package/lib/rest/preview/trusted_comms/brandedChannel/channel.js +0 -257
  56. package/lib/rest/preview/trusted_comms/brandedChannel.d.ts +0 -150
  57. package/lib/rest/preview/trusted_comms/brandedChannel.js +0 -362
  58. package/lib/rest/preview/trusted_comms/brandsInformation.d.ts +0 -158
  59. package/lib/rest/preview/trusted_comms/brandsInformation.js +0 -338
  60. package/lib/rest/preview/trusted_comms/cps.d.ts +0 -156
  61. package/lib/rest/preview/trusted_comms/cps.js +0 -332
  62. package/lib/rest/preview/trusted_comms/currentCall.d.ts +0 -180
  63. package/lib/rest/preview/trusted_comms/currentCall.js +0 -367
@@ -1,362 +0,0 @@
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 ChannelList = require('./brandedChannel/channel').ChannelList;
16
- var Page = require('../../../base/Page'); /* jshint ignore:line */
17
- var values = require('../../../base/values'); /* jshint ignore:line */
18
-
19
- var BrandedChannelList;
20
- var BrandedChannelPage;
21
- var BrandedChannelInstance;
22
- var BrandedChannelContext;
23
-
24
- /* jshint ignore:start */
25
- /**
26
- * Initialize the BrandedChannelList
27
- *
28
- * PLEASE NOTE that this class contains preview products that are subject to
29
- * change. Use them with caution. If you currently do not have developer preview
30
- * access, please contact help@twilio.com.
31
- *
32
- * @constructor Twilio.Preview.TrustedComms.BrandedChannelList
33
- *
34
- * @param {Twilio.Preview.TrustedComms} version - Version of the resource
35
- */
36
- /* jshint ignore:end */
37
- BrandedChannelList = function BrandedChannelList(version) {
38
- /* jshint ignore:start */
39
- /**
40
- * @function brandedChannels
41
- * @memberof Twilio.Preview.TrustedComms#
42
- *
43
- * @param {string} sid - sid of instance
44
- *
45
- * @returns {Twilio.Preview.TrustedComms.BrandedChannelContext}
46
- */
47
- /* jshint ignore:end */
48
- function BrandedChannelListInstance(sid) {
49
- return BrandedChannelListInstance.get(sid);
50
- }
51
-
52
- BrandedChannelListInstance._version = version;
53
- // Path Solution
54
- BrandedChannelListInstance._solution = {};
55
- /* jshint ignore:start */
56
- /**
57
- * Constructs a branded_channel
58
- *
59
- * @function get
60
- * @memberof Twilio.Preview.TrustedComms.BrandedChannelList#
61
- *
62
- * @param {string} sid - Branded Channel Sid.
63
- *
64
- * @returns {Twilio.Preview.TrustedComms.BrandedChannelContext}
65
- */
66
- /* jshint ignore:end */
67
- BrandedChannelListInstance.get = function get(sid) {
68
- return new BrandedChannelContext(this._version, sid);
69
- };
70
-
71
- /* jshint ignore:start */
72
- /**
73
- * Provide a user-friendly representation
74
- *
75
- * @function toJSON
76
- * @memberof Twilio.Preview.TrustedComms.BrandedChannelList#
77
- *
78
- * @returns Object
79
- */
80
- /* jshint ignore:end */
81
- BrandedChannelListInstance.toJSON = function toJSON() {
82
- return this._solution;
83
- };
84
-
85
- BrandedChannelListInstance[util.inspect.custom] = function inspect(depth,
86
- options) {
87
- return util.inspect(this.toJSON(), options);
88
- };
89
-
90
- return BrandedChannelListInstance;
91
- };
92
-
93
-
94
- /* jshint ignore:start */
95
- /**
96
- * Initialize the BrandedChannelPage
97
- *
98
- * PLEASE NOTE that this class contains preview products that are subject to
99
- * change. Use them with caution. If you currently do not have developer preview
100
- * access, please contact help@twilio.com.
101
- *
102
- * @constructor Twilio.Preview.TrustedComms.BrandedChannelPage
103
- *
104
- * @param {TrustedComms} version - Version of the resource
105
- * @param {Response<string>} response - Response from the API
106
- * @param {BrandedChannelSolution} solution - Path solution
107
- *
108
- * @returns BrandedChannelPage
109
- */
110
- /* jshint ignore:end */
111
- BrandedChannelPage = function BrandedChannelPage(version, response, solution) {
112
- // Path Solution
113
- this._solution = solution;
114
-
115
- Page.prototype.constructor.call(this, version, response, this._solution);
116
- };
117
-
118
- _.extend(BrandedChannelPage.prototype, Page.prototype);
119
- BrandedChannelPage.prototype.constructor = BrandedChannelPage;
120
-
121
- /* jshint ignore:start */
122
- /**
123
- * Build an instance of BrandedChannelInstance
124
- *
125
- * @function getInstance
126
- * @memberof Twilio.Preview.TrustedComms.BrandedChannelPage#
127
- *
128
- * @param {BrandedChannelPayload} payload - Payload response from the API
129
- *
130
- * @returns BrandedChannelInstance
131
- */
132
- /* jshint ignore:end */
133
- BrandedChannelPage.prototype.getInstance = function getInstance(payload) {
134
- return new BrandedChannelInstance(this._version, payload);
135
- };
136
-
137
- /* jshint ignore:start */
138
- /**
139
- * Provide a user-friendly representation
140
- *
141
- * @function toJSON
142
- * @memberof Twilio.Preview.TrustedComms.BrandedChannelPage#
143
- *
144
- * @returns Object
145
- */
146
- /* jshint ignore:end */
147
- BrandedChannelPage.prototype.toJSON = function toJSON() {
148
- let clone = {};
149
- _.forOwn(this, function(value, key) {
150
- if (!_.startsWith(key, '_') && ! _.isFunction(value)) {
151
- clone[key] = value;
152
- }
153
- });
154
- return clone;
155
- };
156
-
157
- BrandedChannelPage.prototype[util.inspect.custom] = function inspect(depth,
158
- options) {
159
- return util.inspect(this.toJSON(), options);
160
- };
161
-
162
-
163
- /* jshint ignore:start */
164
- /**
165
- * Initialize the BrandedChannelContext
166
- *
167
- * PLEASE NOTE that this class contains preview products that are subject to
168
- * change. Use them with caution. If you currently do not have developer preview
169
- * access, please contact help@twilio.com.
170
- *
171
- * @constructor Twilio.Preview.TrustedComms.BrandedChannelInstance
172
- *
173
- * @property {string} accountSid - Account Sid.
174
- * @property {string} businessSid - Business Sid.
175
- * @property {string} brandSid - Brand Sid.
176
- * @property {string} sid - Branded Channel Sid.
177
- * @property {string} links - Nested resource URLs.
178
- * @property {string} url - The URL of this resource.
179
- *
180
- * @param {TrustedComms} version - Version of the resource
181
- * @param {BrandedChannelPayload} payload - The instance payload
182
- * @param {sid} sid - Branded Channel Sid.
183
- */
184
- /* jshint ignore:end */
185
- BrandedChannelInstance = function BrandedChannelInstance(version, payload, sid)
186
- {
187
- this._version = version;
188
-
189
- // Marshaled Properties
190
- this.accountSid = payload.account_sid; // jshint ignore:line
191
- this.businessSid = payload.business_sid; // jshint ignore:line
192
- this.brandSid = payload.brand_sid; // jshint ignore:line
193
- this.sid = payload.sid; // jshint ignore:line
194
- this.links = payload.links; // jshint ignore:line
195
- this.url = payload.url; // jshint ignore:line
196
-
197
- // Context
198
- this._context = undefined;
199
- this._solution = {sid: sid || this.sid, };
200
- };
201
-
202
- Object.defineProperty(BrandedChannelInstance.prototype,
203
- '_proxy', {
204
- get: function() {
205
- if (!this._context) {
206
- this._context = new BrandedChannelContext(this._version, this._solution.sid);
207
- }
208
-
209
- return this._context;
210
- }
211
- });
212
-
213
- /* jshint ignore:start */
214
- /**
215
- * fetch a BrandedChannelInstance
216
- *
217
- * @function fetch
218
- * @memberof Twilio.Preview.TrustedComms.BrandedChannelInstance#
219
- *
220
- * @param {function} [callback] - Callback to handle processed record
221
- *
222
- * @returns {Promise} Resolves to processed BrandedChannelInstance
223
- */
224
- /* jshint ignore:end */
225
- BrandedChannelInstance.prototype.fetch = function fetch(callback) {
226
- return this._proxy.fetch(callback);
227
- };
228
-
229
- /* jshint ignore:start */
230
- /**
231
- * Access the channels
232
- *
233
- * @function channels
234
- * @memberof Twilio.Preview.TrustedComms.BrandedChannelInstance#
235
- *
236
- * @returns {Twilio.Preview.TrustedComms.BrandedChannelContext.ChannelList}
237
- */
238
- /* jshint ignore:end */
239
- BrandedChannelInstance.prototype.channels = function channels() {
240
- return this._proxy.channels;
241
- };
242
-
243
- /* jshint ignore:start */
244
- /**
245
- * Provide a user-friendly representation
246
- *
247
- * @function toJSON
248
- * @memberof Twilio.Preview.TrustedComms.BrandedChannelInstance#
249
- *
250
- * @returns Object
251
- */
252
- /* jshint ignore:end */
253
- BrandedChannelInstance.prototype.toJSON = function toJSON() {
254
- let clone = {};
255
- _.forOwn(this, function(value, key) {
256
- if (!_.startsWith(key, '_') && ! _.isFunction(value)) {
257
- clone[key] = value;
258
- }
259
- });
260
- return clone;
261
- };
262
-
263
- BrandedChannelInstance.prototype[util.inspect.custom] = function inspect(depth,
264
- options) {
265
- return util.inspect(this.toJSON(), options);
266
- };
267
-
268
-
269
- /* jshint ignore:start */
270
- /**
271
- * Initialize the BrandedChannelContext
272
- *
273
- * PLEASE NOTE that this class contains preview products that are subject to
274
- * change. Use them with caution. If you currently do not have developer preview
275
- * access, please contact help@twilio.com.
276
- *
277
- * @constructor Twilio.Preview.TrustedComms.BrandedChannelContext
278
- *
279
- * @property {Twilio.Preview.TrustedComms.BrandedChannelContext.ChannelList} channels -
280
- * channels resource
281
- *
282
- * @param {TrustedComms} version - Version of the resource
283
- * @param {sid} sid - Branded Channel Sid.
284
- */
285
- /* jshint ignore:end */
286
- BrandedChannelContext = function BrandedChannelContext(version, sid) {
287
- this._version = version;
288
-
289
- // Path Solution
290
- this._solution = {sid: sid, };
291
- this._uri = `/BrandedChannels/${sid}`;
292
-
293
- // Dependents
294
- this._channels = undefined;
295
- };
296
-
297
- /* jshint ignore:start */
298
- /**
299
- * fetch a BrandedChannelInstance
300
- *
301
- * @function fetch
302
- * @memberof Twilio.Preview.TrustedComms.BrandedChannelContext#
303
- *
304
- * @param {function} [callback] - Callback to handle processed record
305
- *
306
- * @returns {Promise} Resolves to processed BrandedChannelInstance
307
- */
308
- /* jshint ignore:end */
309
- BrandedChannelContext.prototype.fetch = function fetch(callback) {
310
- var deferred = Q.defer();
311
- var promise = this._version.fetch({uri: this._uri, method: 'GET'});
312
-
313
- promise = promise.then(function(payload) {
314
- deferred.resolve(new BrandedChannelInstance(this._version, payload, this._solution.sid));
315
- }.bind(this));
316
-
317
- promise.catch(function(error) {
318
- deferred.reject(error);
319
- });
320
-
321
- if (_.isFunction(callback)) {
322
- deferred.promise.nodeify(callback);
323
- }
324
-
325
- return deferred.promise;
326
- };
327
-
328
- Object.defineProperty(BrandedChannelContext.prototype,
329
- 'channels', {
330
- get: function() {
331
- if (!this._channels) {
332
- this._channels = new ChannelList(this._version, this._solution.sid);
333
- }
334
- return this._channels;
335
- }
336
- });
337
-
338
- /* jshint ignore:start */
339
- /**
340
- * Provide a user-friendly representation
341
- *
342
- * @function toJSON
343
- * @memberof Twilio.Preview.TrustedComms.BrandedChannelContext#
344
- *
345
- * @returns Object
346
- */
347
- /* jshint ignore:end */
348
- BrandedChannelContext.prototype.toJSON = function toJSON() {
349
- return this._solution;
350
- };
351
-
352
- BrandedChannelContext.prototype[util.inspect.custom] = function inspect(depth,
353
- options) {
354
- return util.inspect(this.toJSON(), options);
355
- };
356
-
357
- module.exports = {
358
- BrandedChannelList: BrandedChannelList,
359
- BrandedChannelPage: BrandedChannelPage,
360
- BrandedChannelInstance: BrandedChannelInstance,
361
- BrandedChannelContext: BrandedChannelContext
362
- };
@@ -1,158 +0,0 @@
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 TrustedComms = require('../TrustedComms');
11
- import { SerializableClass } from '../../../interfaces';
12
-
13
- /**
14
- * Initialize the BrandsInformationList
15
- *
16
- * PLEASE NOTE that this class contains preview products that are subject to
17
- * change. Use them with caution. If you currently do not have developer preview
18
- * access, please contact help@twilio.com.
19
- *
20
- * @param version - Version of the resource
21
- */
22
- declare function BrandsInformationList(version: TrustedComms): BrandsInformationListInstance;
23
-
24
- /**
25
- * Options to pass to fetch
26
- *
27
- * @property ifNoneMatch - Standard `If-None-Match` HTTP header
28
- */
29
- interface BrandsInformationInstanceFetchOptions {
30
- ifNoneMatch?: string;
31
- }
32
-
33
- interface BrandsInformationListInstance {
34
- /**
35
- * @param sid - sid of instance
36
- */
37
- (sid: string): BrandsInformationContext;
38
- /**
39
- * Constructs a brands_information
40
- */
41
- get(): BrandsInformationContext;
42
- /**
43
- * Provide a user-friendly representation
44
- */
45
- toJSON(): any;
46
- }
47
-
48
- interface BrandsInformationPayload extends BrandsInformationResource, Page.TwilioResponsePayload {
49
- }
50
-
51
- interface BrandsInformationResource {
52
- file_link: string;
53
- file_link_ttl_in_seconds: string;
54
- update_time: Date;
55
- url: string;
56
- }
57
-
58
- interface BrandsInformationSolution {
59
- }
60
-
61
-
62
- declare class BrandsInformationContext {
63
- /**
64
- * Initialize the BrandsInformationContext
65
- *
66
- * PLEASE NOTE that this class contains preview products that are subject to
67
- * change. Use them with caution. If you currently do not have developer preview
68
- * access, please contact help@twilio.com.
69
- *
70
- * @param version - Version of the resource
71
- */
72
- constructor(version: TrustedComms);
73
-
74
- /**
75
- * fetch a BrandsInformationInstance
76
- *
77
- * @param callback - Callback to handle processed record
78
- */
79
- fetch(callback?: (error: Error | null, items: BrandsInformationInstance) => any): Promise<BrandsInformationInstance>;
80
- /**
81
- * fetch a BrandsInformationInstance
82
- *
83
- * @param opts - Options for request
84
- * @param callback - Callback to handle processed record
85
- */
86
- fetch(opts?: BrandsInformationInstanceFetchOptions, callback?: (error: Error | null, items: BrandsInformationInstance) => any): Promise<BrandsInformationInstance>;
87
- /**
88
- * Provide a user-friendly representation
89
- */
90
- toJSON(): any;
91
- }
92
-
93
-
94
- declare class BrandsInformationInstance extends SerializableClass {
95
- /**
96
- * Initialize the BrandsInformationContext
97
- *
98
- * PLEASE NOTE that this class contains preview products that are subject to
99
- * change. Use them with caution. If you currently do not have developer preview
100
- * access, please contact help@twilio.com.
101
- *
102
- * @param version - Version of the resource
103
- * @param payload - The instance payload
104
- */
105
- constructor(version: TrustedComms, payload: BrandsInformationPayload);
106
-
107
- private _proxy: BrandsInformationContext;
108
- /**
109
- * fetch a BrandsInformationInstance
110
- *
111
- * @param callback - Callback to handle processed record
112
- */
113
- fetch(callback?: (error: Error | null, items: BrandsInformationInstance) => any): Promise<BrandsInformationInstance>;
114
- /**
115
- * fetch a BrandsInformationInstance
116
- *
117
- * @param opts - Options for request
118
- * @param callback - Callback to handle processed record
119
- */
120
- fetch(opts?: BrandsInformationInstanceFetchOptions, callback?: (error: Error | null, items: BrandsInformationInstance) => any): Promise<BrandsInformationInstance>;
121
- fileLink: string;
122
- fileLinkTtlInSeconds: string;
123
- /**
124
- * Provide a user-friendly representation
125
- */
126
- toJSON(): any;
127
- updateTime: Date;
128
- url: string;
129
- }
130
-
131
-
132
- declare class BrandsInformationPage extends Page<TrustedComms, BrandsInformationPayload, BrandsInformationResource, BrandsInformationInstance> {
133
- /**
134
- * Initialize the BrandsInformationPage
135
- *
136
- * PLEASE NOTE that this class contains preview products that are subject to
137
- * change. Use them with caution. If you currently do not have developer preview
138
- * access, please contact help@twilio.com.
139
- *
140
- * @param version - Version of the resource
141
- * @param response - Response from the API
142
- * @param solution - Path solution
143
- */
144
- constructor(version: TrustedComms, response: Response<string>, solution: BrandsInformationSolution);
145
-
146
- /**
147
- * Build an instance of BrandsInformationInstance
148
- *
149
- * @param payload - Payload response from the API
150
- */
151
- getInstance(payload: BrandsInformationPayload): BrandsInformationInstance;
152
- /**
153
- * Provide a user-friendly representation
154
- */
155
- toJSON(): any;
156
- }
157
-
158
- export { BrandsInformationContext, BrandsInformationInstance, BrandsInformationInstanceFetchOptions, BrandsInformationList, BrandsInformationListInstance, BrandsInformationPage, BrandsInformationPayload, BrandsInformationResource, BrandsInformationSolution }