twilio 3.83.2 → 3.83.4

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 (51) hide show
  1. package/LICENSE +1 -1
  2. package/lib/rest/Content.d.ts +26 -0
  3. package/lib/rest/Content.js +54 -0
  4. package/lib/rest/FlexApi.d.ts +2 -0
  5. package/lib/rest/FlexApi.js +8 -0
  6. package/lib/rest/Messaging.d.ts +4 -0
  7. package/lib/rest/Messaging.js +18 -0
  8. package/lib/rest/Preview.d.ts +0 -10
  9. package/lib/rest/Preview.js +0 -46
  10. package/lib/rest/Twilio.d.ts +2 -0
  11. package/lib/rest/Twilio.js +14 -0
  12. package/lib/rest/content/V1.d.ts +25 -0
  13. package/lib/rest/content/V1.js +46 -0
  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 +323 -0
  17. package/lib/rest/content/v1/content.js +668 -0
  18. package/lib/rest/flexApi/V1.d.ts +3 -0
  19. package/lib/rest/flexApi/V1.js +11 -0
  20. package/lib/rest/flexApi/v1/assessments.d.ts +113 -0
  21. package/lib/rest/flexApi/v1/assessments.js +300 -0
  22. package/lib/rest/flexApi/v1/goodData.d.ts +2 -0
  23. package/lib/rest/flexApi/v1/goodData.js +2 -0
  24. package/lib/rest/insights/v1/call/summary.d.ts +5 -1
  25. package/lib/rest/insights/v1/call/summary.js +2 -0
  26. package/lib/rest/insights/v1/callSummaries.d.ts +5 -1
  27. package/lib/rest/insights/v1/callSummaries.js +2 -0
  28. package/lib/rest/lookups/v2/phoneNumber.d.ts +22 -0
  29. package/lib/rest/lookups/v2/phoneNumber.js +43 -1
  30. package/lib/rest/messaging/V1.d.ts +6 -0
  31. package/lib/rest/messaging/V1.js +24 -0
  32. package/lib/rest/messaging/v1/domainCert.d.ts +178 -0
  33. package/lib/rest/messaging/v1/domainCert.js +447 -0
  34. package/lib/rest/messaging/v1/domainConfig.d.ts +172 -0
  35. package/lib/rest/messaging/v1/domainConfig.js +421 -0
  36. package/lib/rest/microvisor/v1/device.d.ts +2 -0
  37. package/lib/rest/microvisor/v1/device.js +2 -0
  38. package/lib/rest/serverless/v1/service/build.d.ts +1 -1
  39. package/package.json +1 -1
  40. package/lib/rest/preview/TrustedComms.d.ts +0 -34
  41. package/lib/rest/preview/TrustedComms.js +0 -84
  42. package/lib/rest/preview/trusted_comms/brandedChannel/channel.d.ts +0 -120
  43. package/lib/rest/preview/trusted_comms/brandedChannel/channel.js +0 -257
  44. package/lib/rest/preview/trusted_comms/brandedChannel.d.ts +0 -150
  45. package/lib/rest/preview/trusted_comms/brandedChannel.js +0 -362
  46. package/lib/rest/preview/trusted_comms/brandsInformation.d.ts +0 -158
  47. package/lib/rest/preview/trusted_comms/brandsInformation.js +0 -338
  48. package/lib/rest/preview/trusted_comms/cps.d.ts +0 -156
  49. package/lib/rest/preview/trusted_comms/cps.js +0 -332
  50. package/lib/rest/preview/trusted_comms/currentCall.d.ts +0 -180
  51. package/lib/rest/preview/trusted_comms/currentCall.js +0 -367
@@ -1,367 +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 CurrentCallList;
21
- var CurrentCallPage;
22
- var CurrentCallInstance;
23
- var CurrentCallContext;
24
-
25
- /* jshint ignore:start */
26
- /**
27
- * Initialize the CurrentCallList
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.CurrentCallList
34
- *
35
- * @param {Twilio.Preview.TrustedComms} version - Version of the resource
36
- */
37
- /* jshint ignore:end */
38
- CurrentCallList = function CurrentCallList(version) {
39
- /* jshint ignore:start */
40
- /**
41
- * @function currentCalls
42
- * @memberof Twilio.Preview.TrustedComms#
43
- *
44
- * @param {string} sid - sid of instance
45
- *
46
- * @returns {Twilio.Preview.TrustedComms.CurrentCallContext}
47
- */
48
- /* jshint ignore:end */
49
- function CurrentCallListInstance(sid) {
50
- return CurrentCallListInstance.get(sid);
51
- }
52
-
53
- CurrentCallListInstance._version = version;
54
- // Path Solution
55
- CurrentCallListInstance._solution = {};
56
- /* jshint ignore:start */
57
- /**
58
- * Constructs a current_call
59
- *
60
- * @function get
61
- * @memberof Twilio.Preview.TrustedComms.CurrentCallList#
62
- *
63
- * @returns {Twilio.Preview.TrustedComms.CurrentCallContext}
64
- */
65
- /* jshint ignore:end */
66
- CurrentCallListInstance.get = function get() {
67
- return new CurrentCallContext(this._version);
68
- };
69
-
70
- /* jshint ignore:start */
71
- /**
72
- * Provide a user-friendly representation
73
- *
74
- * @function toJSON
75
- * @memberof Twilio.Preview.TrustedComms.CurrentCallList#
76
- *
77
- * @returns Object
78
- */
79
- /* jshint ignore:end */
80
- CurrentCallListInstance.toJSON = function toJSON() {
81
- return this._solution;
82
- };
83
-
84
- CurrentCallListInstance[util.inspect.custom] = function inspect(depth, options)
85
- {
86
- return util.inspect(this.toJSON(), options);
87
- };
88
-
89
- return CurrentCallListInstance;
90
- };
91
-
92
-
93
- /* jshint ignore:start */
94
- /**
95
- * Initialize the CurrentCallPage
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.CurrentCallPage
102
- *
103
- * @param {TrustedComms} version - Version of the resource
104
- * @param {Response<string>} response - Response from the API
105
- * @param {CurrentCallSolution} solution - Path solution
106
- *
107
- * @returns CurrentCallPage
108
- */
109
- /* jshint ignore:end */
110
- CurrentCallPage = function CurrentCallPage(version, response, solution) {
111
- // Path Solution
112
- this._solution = solution;
113
-
114
- Page.prototype.constructor.call(this, version, response, this._solution);
115
- };
116
-
117
- _.extend(CurrentCallPage.prototype, Page.prototype);
118
- CurrentCallPage.prototype.constructor = CurrentCallPage;
119
-
120
- /* jshint ignore:start */
121
- /**
122
- * Build an instance of CurrentCallInstance
123
- *
124
- * @function getInstance
125
- * @memberof Twilio.Preview.TrustedComms.CurrentCallPage#
126
- *
127
- * @param {CurrentCallPayload} payload - Payload response from the API
128
- *
129
- * @returns CurrentCallInstance
130
- */
131
- /* jshint ignore:end */
132
- CurrentCallPage.prototype.getInstance = function getInstance(payload) {
133
- return new CurrentCallInstance(this._version, payload);
134
- };
135
-
136
- /* jshint ignore:start */
137
- /**
138
- * Provide a user-friendly representation
139
- *
140
- * @function toJSON
141
- * @memberof Twilio.Preview.TrustedComms.CurrentCallPage#
142
- *
143
- * @returns Object
144
- */
145
- /* jshint ignore:end */
146
- CurrentCallPage.prototype.toJSON = function toJSON() {
147
- let clone = {};
148
- _.forOwn(this, function(value, key) {
149
- if (!_.startsWith(key, '_') && ! _.isFunction(value)) {
150
- clone[key] = value;
151
- }
152
- });
153
- return clone;
154
- };
155
-
156
- CurrentCallPage.prototype[util.inspect.custom] = function inspect(depth,
157
- options) {
158
- return util.inspect(this.toJSON(), options);
159
- };
160
-
161
-
162
- /* jshint ignore:start */
163
- /**
164
- * Initialize the CurrentCallContext
165
- *
166
- * PLEASE NOTE that this class contains preview products that are subject to
167
- * change. Use them with caution. If you currently do not have developer preview
168
- * access, please contact help@twilio.com.
169
- *
170
- * @constructor Twilio.Preview.TrustedComms.CurrentCallInstance
171
- *
172
- * @property {string} bgColor - Background color of the current phone call
173
- * @property {string} caller - Caller name of the current phone call
174
- * @property {Date} createdAt - The date this current phone call was created
175
- * @property {string} fontColor - Font color of the current phone call
176
- * @property {string} from - The originating phone number
177
- * @property {string} logo - Logo URL of the caller
178
- * @property {string} manager - The name of the CPS organization
179
- * @property {string} reason - The business reason for this current phone call
180
- * @property {string} shieldImg -
181
- * Shield image URL that serves as authenticity proof of the current phone call
182
- * @property {string} sid -
183
- * A string that uniquely identifies this current branded phone call.
184
- * @property {string} status - The status of the current phone call
185
- * @property {string} to - The terminating phone number
186
- * @property {string} url - The URL of this resource.
187
- * @property {string} useCase - The use case for the current phone call
188
- *
189
- * @param {TrustedComms} version - Version of the resource
190
- * @param {CurrentCallPayload} payload - The instance payload
191
- */
192
- /* jshint ignore:end */
193
- CurrentCallInstance = function CurrentCallInstance(version, payload) {
194
- this._version = version;
195
-
196
- // Marshaled Properties
197
- this.bgColor = payload.bg_color; // jshint ignore:line
198
- this.caller = payload.caller; // jshint ignore:line
199
- this.createdAt = deserialize.iso8601DateTime(payload.created_at); // jshint ignore:line
200
- this.fontColor = payload.font_color; // jshint ignore:line
201
- this.from = payload.from; // jshint ignore:line
202
- this.logo = payload.logo; // jshint ignore:line
203
- this.manager = payload.manager; // jshint ignore:line
204
- this.reason = payload.reason; // jshint ignore:line
205
- this.shieldImg = payload.shield_img; // jshint ignore:line
206
- this.sid = payload.sid; // jshint ignore:line
207
- this.status = payload.status; // jshint ignore:line
208
- this.to = payload.to; // jshint ignore:line
209
- this.url = payload.url; // jshint ignore:line
210
- this.useCase = payload.use_case; // jshint ignore:line
211
-
212
- // Context
213
- this._context = undefined;
214
- this._solution = {};
215
- };
216
-
217
- Object.defineProperty(CurrentCallInstance.prototype,
218
- '_proxy', {
219
- get: function() {
220
- if (!this._context) {
221
- this._context = new CurrentCallContext(this._version);
222
- }
223
-
224
- return this._context;
225
- }
226
- });
227
-
228
- /* jshint ignore:start */
229
- /**
230
- * fetch a CurrentCallInstance
231
- *
232
- * @function fetch
233
- * @memberof Twilio.Preview.TrustedComms.CurrentCallInstance#
234
- *
235
- * @param {object} [opts] - Options for request
236
- * @param {string} [opts.xXcnamSensitivePhoneNumberFrom] -
237
- * The originating Phone Number
238
- * @param {string} [opts.xXcnamSensitivePhoneNumberTo] -
239
- * The terminating Phone Number
240
- * @param {function} [callback] - Callback to handle processed record
241
- *
242
- * @returns {Promise} Resolves to processed CurrentCallInstance
243
- */
244
- /* jshint ignore:end */
245
- CurrentCallInstance.prototype.fetch = function fetch(opts, callback) {
246
- return this._proxy.fetch(opts, callback);
247
- };
248
-
249
- /* jshint ignore:start */
250
- /**
251
- * Provide a user-friendly representation
252
- *
253
- * @function toJSON
254
- * @memberof Twilio.Preview.TrustedComms.CurrentCallInstance#
255
- *
256
- * @returns Object
257
- */
258
- /* jshint ignore:end */
259
- CurrentCallInstance.prototype.toJSON = function toJSON() {
260
- let clone = {};
261
- _.forOwn(this, function(value, key) {
262
- if (!_.startsWith(key, '_') && ! _.isFunction(value)) {
263
- clone[key] = value;
264
- }
265
- });
266
- return clone;
267
- };
268
-
269
- CurrentCallInstance.prototype[util.inspect.custom] = function inspect(depth,
270
- options) {
271
- return util.inspect(this.toJSON(), options);
272
- };
273
-
274
-
275
- /* jshint ignore:start */
276
- /**
277
- * Initialize the CurrentCallContext
278
- *
279
- * PLEASE NOTE that this class contains preview products that are subject to
280
- * change. Use them with caution. If you currently do not have developer preview
281
- * access, please contact help@twilio.com.
282
- *
283
- * @constructor Twilio.Preview.TrustedComms.CurrentCallContext
284
- *
285
- * @param {TrustedComms} version - Version of the resource
286
- */
287
- /* jshint ignore:end */
288
- CurrentCallContext = function CurrentCallContext(version) {
289
- this._version = version;
290
-
291
- // Path Solution
292
- this._solution = {};
293
- this._uri = `/CurrentCall`;
294
- };
295
-
296
- /* jshint ignore:start */
297
- /**
298
- * fetch a CurrentCallInstance
299
- *
300
- * @function fetch
301
- * @memberof Twilio.Preview.TrustedComms.CurrentCallContext#
302
- *
303
- * @param {object} [opts] - Options for request
304
- * @param {string} [opts.xXcnamSensitivePhoneNumberFrom] -
305
- * The originating Phone Number
306
- * @param {string} [opts.xXcnamSensitivePhoneNumberTo] -
307
- * The terminating Phone Number
308
- * @param {function} [callback] - Callback to handle processed record
309
- *
310
- * @returns {Promise} Resolves to processed CurrentCallInstance
311
- */
312
- /* jshint ignore:end */
313
- CurrentCallContext.prototype.fetch = function fetch(opts, callback) {
314
- if (_.isFunction(opts)) {
315
- callback = opts;
316
- opts = {};
317
- }
318
- opts = opts || {};
319
-
320
- var deferred = Q.defer();
321
- var headers = values.of({
322
- 'X-Xcnam-Sensitive-Phone-Number-From': _.get(opts, 'xXcnamSensitivePhoneNumberFrom'),
323
- 'X-Xcnam-Sensitive-Phone-Number-To': _.get(opts, 'xXcnamSensitivePhoneNumberTo')
324
- });
325
-
326
- var promise = this._version.fetch({uri: this._uri, method: 'GET', headers: headers});
327
-
328
- promise = promise.then(function(payload) {
329
- deferred.resolve(new CurrentCallInstance(this._version, payload));
330
- }.bind(this));
331
-
332
- promise.catch(function(error) {
333
- deferred.reject(error);
334
- });
335
-
336
- if (_.isFunction(callback)) {
337
- deferred.promise.nodeify(callback);
338
- }
339
-
340
- return deferred.promise;
341
- };
342
-
343
- /* jshint ignore:start */
344
- /**
345
- * Provide a user-friendly representation
346
- *
347
- * @function toJSON
348
- * @memberof Twilio.Preview.TrustedComms.CurrentCallContext#
349
- *
350
- * @returns Object
351
- */
352
- /* jshint ignore:end */
353
- CurrentCallContext.prototype.toJSON = function toJSON() {
354
- return this._solution;
355
- };
356
-
357
- CurrentCallContext.prototype[util.inspect.custom] = function inspect(depth,
358
- options) {
359
- return util.inspect(this.toJSON(), options);
360
- };
361
-
362
- module.exports = {
363
- CurrentCallList: CurrentCallList,
364
- CurrentCallPage: CurrentCallPage,
365
- CurrentCallInstance: CurrentCallInstance,
366
- CurrentCallContext: CurrentCallContext
367
- };