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,338 +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 Page = require('../../../base/Page'); /* jshint ignore:line */
16
- var deserialize = require(
17
- '../../../base/deserialize'); /* jshint ignore:line */
18
- var values = require('../../../base/values'); /* jshint ignore:line */
19
-
20
- var BrandsInformationList;
21
- var BrandsInformationPage;
22
- var BrandsInformationInstance;
23
- var BrandsInformationContext;
24
-
25
- /* jshint ignore:start */
26
- /**
27
- * Initialize the BrandsInformationList
28
- *
29
- * PLEASE NOTE that this class contains preview products that are subject to
30
- * change. Use them with caution. If you currently do not have developer preview
31
- * access, please contact help@twilio.com.
32
- *
33
- * @constructor Twilio.Preview.TrustedComms.BrandsInformationList
34
- *
35
- * @param {Twilio.Preview.TrustedComms} version - Version of the resource
36
- */
37
- /* jshint ignore:end */
38
- BrandsInformationList = function BrandsInformationList(version) {
39
- /* jshint ignore:start */
40
- /**
41
- * @function brandsInformation
42
- * @memberof Twilio.Preview.TrustedComms#
43
- *
44
- * @param {string} sid - sid of instance
45
- *
46
- * @returns {Twilio.Preview.TrustedComms.BrandsInformationContext}
47
- */
48
- /* jshint ignore:end */
49
- function BrandsInformationListInstance(sid) {
50
- return BrandsInformationListInstance.get(sid);
51
- }
52
-
53
- BrandsInformationListInstance._version = version;
54
- // Path Solution
55
- BrandsInformationListInstance._solution = {};
56
- /* jshint ignore:start */
57
- /**
58
- * Constructs a brands_information
59
- *
60
- * @function get
61
- * @memberof Twilio.Preview.TrustedComms.BrandsInformationList#
62
- *
63
- * @returns {Twilio.Preview.TrustedComms.BrandsInformationContext}
64
- */
65
- /* jshint ignore:end */
66
- BrandsInformationListInstance.get = function get() {
67
- return new BrandsInformationContext(this._version);
68
- };
69
-
70
- /* jshint ignore:start */
71
- /**
72
- * Provide a user-friendly representation
73
- *
74
- * @function toJSON
75
- * @memberof Twilio.Preview.TrustedComms.BrandsInformationList#
76
- *
77
- * @returns Object
78
- */
79
- /* jshint ignore:end */
80
- BrandsInformationListInstance.toJSON = function toJSON() {
81
- return this._solution;
82
- };
83
-
84
- BrandsInformationListInstance[util.inspect.custom] = function inspect(depth,
85
- options) {
86
- return util.inspect(this.toJSON(), options);
87
- };
88
-
89
- return BrandsInformationListInstance;
90
- };
91
-
92
-
93
- /* jshint ignore:start */
94
- /**
95
- * Initialize the BrandsInformationPage
96
- *
97
- * PLEASE NOTE that this class contains preview products that are subject to
98
- * change. Use them with caution. If you currently do not have developer preview
99
- * access, please contact help@twilio.com.
100
- *
101
- * @constructor Twilio.Preview.TrustedComms.BrandsInformationPage
102
- *
103
- * @param {TrustedComms} version - Version of the resource
104
- * @param {Response<string>} response - Response from the API
105
- * @param {BrandsInformationSolution} solution - Path solution
106
- *
107
- * @returns BrandsInformationPage
108
- */
109
- /* jshint ignore:end */
110
- BrandsInformationPage = function BrandsInformationPage(version, response,
111
- solution) {
112
- // Path Solution
113
- this._solution = solution;
114
-
115
- Page.prototype.constructor.call(this, version, response, this._solution);
116
- };
117
-
118
- _.extend(BrandsInformationPage.prototype, Page.prototype);
119
- BrandsInformationPage.prototype.constructor = BrandsInformationPage;
120
-
121
- /* jshint ignore:start */
122
- /**
123
- * Build an instance of BrandsInformationInstance
124
- *
125
- * @function getInstance
126
- * @memberof Twilio.Preview.TrustedComms.BrandsInformationPage#
127
- *
128
- * @param {BrandsInformationPayload} payload - Payload response from the API
129
- *
130
- * @returns BrandsInformationInstance
131
- */
132
- /* jshint ignore:end */
133
- BrandsInformationPage.prototype.getInstance = function getInstance(payload) {
134
- return new BrandsInformationInstance(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.BrandsInformationPage#
143
- *
144
- * @returns Object
145
- */
146
- /* jshint ignore:end */
147
- BrandsInformationPage.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
- BrandsInformationPage.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 BrandsInformationContext
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.BrandsInformationInstance
172
- *
173
- * @property {Date} updateTime - Creation time of the information retrieved
174
- * @property {string} fileLink - The URL to the brands information
175
- * @property {string} fileLinkTtlInSeconds - How long will be the `file_link` valid
176
- * @property {string} url - The URL of this resource
177
- *
178
- * @param {TrustedComms} version - Version of the resource
179
- * @param {BrandsInformationPayload} payload - The instance payload
180
- */
181
- /* jshint ignore:end */
182
- BrandsInformationInstance = function BrandsInformationInstance(version, payload)
183
- {
184
- this._version = version;
185
-
186
- // Marshaled Properties
187
- this.updateTime = deserialize.iso8601DateTime(payload.update_time); // jshint ignore:line
188
- this.fileLink = payload.file_link; // jshint ignore:line
189
- this.fileLinkTtlInSeconds = payload.file_link_ttl_in_seconds; // jshint ignore:line
190
- this.url = payload.url; // jshint ignore:line
191
-
192
- // Context
193
- this._context = undefined;
194
- this._solution = {};
195
- };
196
-
197
- Object.defineProperty(BrandsInformationInstance.prototype,
198
- '_proxy', {
199
- get: function() {
200
- if (!this._context) {
201
- this._context = new BrandsInformationContext(this._version);
202
- }
203
-
204
- return this._context;
205
- }
206
- });
207
-
208
- /* jshint ignore:start */
209
- /**
210
- * fetch a BrandsInformationInstance
211
- *
212
- * @function fetch
213
- * @memberof Twilio.Preview.TrustedComms.BrandsInformationInstance#
214
- *
215
- * @param {object} [opts] - Options for request
216
- * @param {string} [opts.ifNoneMatch] - Standard `If-None-Match` HTTP header
217
- * @param {function} [callback] - Callback to handle processed record
218
- *
219
- * @returns {Promise} Resolves to processed BrandsInformationInstance
220
- */
221
- /* jshint ignore:end */
222
- BrandsInformationInstance.prototype.fetch = function fetch(opts, callback) {
223
- return this._proxy.fetch(opts, callback);
224
- };
225
-
226
- /* jshint ignore:start */
227
- /**
228
- * Provide a user-friendly representation
229
- *
230
- * @function toJSON
231
- * @memberof Twilio.Preview.TrustedComms.BrandsInformationInstance#
232
- *
233
- * @returns Object
234
- */
235
- /* jshint ignore:end */
236
- BrandsInformationInstance.prototype.toJSON = function toJSON() {
237
- let clone = {};
238
- _.forOwn(this, function(value, key) {
239
- if (!_.startsWith(key, '_') && ! _.isFunction(value)) {
240
- clone[key] = value;
241
- }
242
- });
243
- return clone;
244
- };
245
-
246
- BrandsInformationInstance.prototype[util.inspect.custom] = function
247
- inspect(depth, options) {
248
- return util.inspect(this.toJSON(), options);
249
- };
250
-
251
-
252
- /* jshint ignore:start */
253
- /**
254
- * Initialize the BrandsInformationContext
255
- *
256
- * PLEASE NOTE that this class contains preview products that are subject to
257
- * change. Use them with caution. If you currently do not have developer preview
258
- * access, please contact help@twilio.com.
259
- *
260
- * @constructor Twilio.Preview.TrustedComms.BrandsInformationContext
261
- *
262
- * @param {TrustedComms} version - Version of the resource
263
- */
264
- /* jshint ignore:end */
265
- BrandsInformationContext = function BrandsInformationContext(version) {
266
- this._version = version;
267
-
268
- // Path Solution
269
- this._solution = {};
270
- this._uri = `/BrandsInformation`;
271
- };
272
-
273
- /* jshint ignore:start */
274
- /**
275
- * fetch a BrandsInformationInstance
276
- *
277
- * @function fetch
278
- * @memberof Twilio.Preview.TrustedComms.BrandsInformationContext#
279
- *
280
- * @param {object} [opts] - Options for request
281
- * @param {string} [opts.ifNoneMatch] - Standard `If-None-Match` HTTP header
282
- * @param {function} [callback] - Callback to handle processed record
283
- *
284
- * @returns {Promise} Resolves to processed BrandsInformationInstance
285
- */
286
- /* jshint ignore:end */
287
- BrandsInformationContext.prototype.fetch = function fetch(opts, callback) {
288
- if (_.isFunction(opts)) {
289
- callback = opts;
290
- opts = {};
291
- }
292
- opts = opts || {};
293
-
294
- var deferred = Q.defer();
295
- var headers = values.of({'If-None-Match': _.get(opts, 'ifNoneMatch')});
296
-
297
- var promise = this._version.fetch({uri: this._uri, method: 'GET', headers: headers});
298
-
299
- promise = promise.then(function(payload) {
300
- deferred.resolve(new BrandsInformationInstance(this._version, payload));
301
- }.bind(this));
302
-
303
- promise.catch(function(error) {
304
- deferred.reject(error);
305
- });
306
-
307
- if (_.isFunction(callback)) {
308
- deferred.promise.nodeify(callback);
309
- }
310
-
311
- return deferred.promise;
312
- };
313
-
314
- /* jshint ignore:start */
315
- /**
316
- * Provide a user-friendly representation
317
- *
318
- * @function toJSON
319
- * @memberof Twilio.Preview.TrustedComms.BrandsInformationContext#
320
- *
321
- * @returns Object
322
- */
323
- /* jshint ignore:end */
324
- BrandsInformationContext.prototype.toJSON = function toJSON() {
325
- return this._solution;
326
- };
327
-
328
- BrandsInformationContext.prototype[util.inspect.custom] = function
329
- inspect(depth, options) {
330
- return util.inspect(this.toJSON(), options);
331
- };
332
-
333
- module.exports = {
334
- BrandsInformationList: BrandsInformationList,
335
- BrandsInformationPage: BrandsInformationPage,
336
- BrandsInformationInstance: BrandsInformationInstance,
337
- BrandsInformationContext: BrandsInformationContext
338
- };
@@ -1,156 +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 CpsList
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 CpsList(version: TrustedComms): CpsListInstance;
23
-
24
- /**
25
- * Options to pass to fetch
26
- *
27
- * @property xXcnamSensitivePhoneNumber - Phone number to retrieve CPS.
28
- */
29
- interface CpsInstanceFetchOptions {
30
- xXcnamSensitivePhoneNumber?: string;
31
- }
32
-
33
- interface CpsListInstance {
34
- /**
35
- * @param sid - sid of instance
36
- */
37
- (sid: string): CpsContext;
38
- /**
39
- * Constructs a cps
40
- */
41
- get(): CpsContext;
42
- /**
43
- * Provide a user-friendly representation
44
- */
45
- toJSON(): any;
46
- }
47
-
48
- interface CpsPayload extends CpsResource, Page.TwilioResponsePayload {
49
- }
50
-
51
- interface CpsResource {
52
- cps_url: string;
53
- phone_number: string;
54
- url: string;
55
- }
56
-
57
- interface CpsSolution {
58
- }
59
-
60
-
61
- declare class CpsContext {
62
- /**
63
- * Initialize the CpsContext
64
- *
65
- * PLEASE NOTE that this class contains preview products that are subject to
66
- * change. Use them with caution. If you currently do not have developer preview
67
- * access, please contact help@twilio.com.
68
- *
69
- * @param version - Version of the resource
70
- */
71
- constructor(version: TrustedComms);
72
-
73
- /**
74
- * fetch a CpsInstance
75
- *
76
- * @param callback - Callback to handle processed record
77
- */
78
- fetch(callback?: (error: Error | null, items: CpsInstance) => any): Promise<CpsInstance>;
79
- /**
80
- * fetch a CpsInstance
81
- *
82
- * @param opts - Options for request
83
- * @param callback - Callback to handle processed record
84
- */
85
- fetch(opts?: CpsInstanceFetchOptions, callback?: (error: Error | null, items: CpsInstance) => any): Promise<CpsInstance>;
86
- /**
87
- * Provide a user-friendly representation
88
- */
89
- toJSON(): any;
90
- }
91
-
92
-
93
- declare class CpsInstance extends SerializableClass {
94
- /**
95
- * Initialize the CpsContext
96
- *
97
- * PLEASE NOTE that this class contains preview products that are subject to
98
- * change. Use them with caution. If you currently do not have developer preview
99
- * access, please contact help@twilio.com.
100
- *
101
- * @param version - Version of the resource
102
- * @param payload - The instance payload
103
- */
104
- constructor(version: TrustedComms, payload: CpsPayload);
105
-
106
- private _proxy: CpsContext;
107
- cpsUrl: string;
108
- /**
109
- * fetch a CpsInstance
110
- *
111
- * @param callback - Callback to handle processed record
112
- */
113
- fetch(callback?: (error: Error | null, items: CpsInstance) => any): Promise<CpsInstance>;
114
- /**
115
- * fetch a CpsInstance
116
- *
117
- * @param opts - Options for request
118
- * @param callback - Callback to handle processed record
119
- */
120
- fetch(opts?: CpsInstanceFetchOptions, callback?: (error: Error | null, items: CpsInstance) => any): Promise<CpsInstance>;
121
- phoneNumber: string;
122
- /**
123
- * Provide a user-friendly representation
124
- */
125
- toJSON(): any;
126
- url: string;
127
- }
128
-
129
-
130
- declare class CpsPage extends Page<TrustedComms, CpsPayload, CpsResource, CpsInstance> {
131
- /**
132
- * Initialize the CpsPage
133
- *
134
- * PLEASE NOTE that this class contains preview products that are subject to
135
- * change. Use them with caution. If you currently do not have developer preview
136
- * access, please contact help@twilio.com.
137
- *
138
- * @param version - Version of the resource
139
- * @param response - Response from the API
140
- * @param solution - Path solution
141
- */
142
- constructor(version: TrustedComms, response: Response<string>, solution: CpsSolution);
143
-
144
- /**
145
- * Build an instance of CpsInstance
146
- *
147
- * @param payload - Payload response from the API
148
- */
149
- getInstance(payload: CpsPayload): CpsInstance;
150
- /**
151
- * Provide a user-friendly representation
152
- */
153
- toJSON(): any;
154
- }
155
-
156
- export { CpsContext, CpsInstance, CpsInstanceFetchOptions, CpsList, CpsListInstance, CpsPage, CpsPayload, CpsResource, CpsSolution }