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
@@ -0,0 +1,172 @@
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 DomainConfigList
15
+ *
16
+ * PLEASE NOTE that this class contains beta products that are subject to change.
17
+ * Use them with caution.
18
+ *
19
+ * @param version - Version of the resource
20
+ */
21
+ declare function DomainConfigList(version: V1): DomainConfigListInstance;
22
+
23
+ /**
24
+ * Options to pass to update
25
+ *
26
+ * @property callbackUrl - URL to receive click events to your webhook whenever the recipients click on the shortened links
27
+ * @property fallbackUrl - We will redirect requests to urls we are unable to identify to this url.
28
+ * @property messagingServiceSids - A list of messagingServiceSids (with prefix MG)
29
+ * @property messagingServiceSidsAction - An action type for messaging_service_sids operation (ADD, DELETE, REPLACE)
30
+ */
31
+ interface DomainConfigInstanceUpdateOptions {
32
+ callbackUrl?: string;
33
+ fallbackUrl?: string;
34
+ messagingServiceSids: string | string[];
35
+ messagingServiceSidsAction?: string;
36
+ }
37
+
38
+ interface DomainConfigListInstance {
39
+ /**
40
+ * @param sid - sid of instance
41
+ */
42
+ (sid: string): DomainConfigContext;
43
+ /**
44
+ * Constructs a domain_config
45
+ *
46
+ * @param domainSid - Unique string used to identify the domain that this config should be associated with.
47
+ */
48
+ get(domainSid: string): DomainConfigContext;
49
+ /**
50
+ * Provide a user-friendly representation
51
+ */
52
+ toJSON(): any;
53
+ }
54
+
55
+ interface DomainConfigPayload extends DomainConfigResource, Page.TwilioResponsePayload {
56
+ }
57
+
58
+ interface DomainConfigResource {
59
+ callback_url: string;
60
+ config_sid: string;
61
+ date_created: Date;
62
+ date_updated: Date;
63
+ domain_sid: string;
64
+ fallback_url: string;
65
+ messaging_service_sids: string[];
66
+ url: string;
67
+ }
68
+
69
+ interface DomainConfigSolution {
70
+ }
71
+
72
+
73
+ declare class DomainConfigContext {
74
+ /**
75
+ * Initialize the DomainConfigContext
76
+ *
77
+ * PLEASE NOTE that this class contains beta products that are subject to change.
78
+ * Use them with caution.
79
+ *
80
+ * @param version - Version of the resource
81
+ * @param domainSid - Unique string used to identify the domain that this config should be associated with.
82
+ */
83
+ constructor(version: V1, domainSid: string);
84
+
85
+ /**
86
+ * fetch a DomainConfigInstance
87
+ *
88
+ * @param callback - Callback to handle processed record
89
+ */
90
+ fetch(callback?: (error: Error | null, items: DomainConfigInstance) => any): Promise<DomainConfigInstance>;
91
+ /**
92
+ * Provide a user-friendly representation
93
+ */
94
+ toJSON(): any;
95
+ /**
96
+ * update a DomainConfigInstance
97
+ *
98
+ * @param opts - Options for request
99
+ * @param callback - Callback to handle processed record
100
+ */
101
+ update(opts: DomainConfigInstanceUpdateOptions, callback?: (error: Error | null, items: DomainConfigInstance) => any): Promise<DomainConfigInstance>;
102
+ }
103
+
104
+
105
+ declare class DomainConfigInstance extends SerializableClass {
106
+ /**
107
+ * Initialize the DomainConfigContext
108
+ *
109
+ * PLEASE NOTE that this class contains beta products that are subject to change.
110
+ * Use them with caution.
111
+ *
112
+ * @param version - Version of the resource
113
+ * @param payload - The instance payload
114
+ * @param domainSid - Unique string used to identify the domain that this config should be associated with.
115
+ */
116
+ constructor(version: V1, payload: DomainConfigPayload, domainSid: string);
117
+
118
+ private _proxy: DomainConfigContext;
119
+ callbackUrl: string;
120
+ configSid: string;
121
+ dateCreated: Date;
122
+ dateUpdated: Date;
123
+ domainSid: string;
124
+ fallbackUrl: string;
125
+ /**
126
+ * fetch a DomainConfigInstance
127
+ *
128
+ * @param callback - Callback to handle processed record
129
+ */
130
+ fetch(callback?: (error: Error | null, items: DomainConfigInstance) => any): Promise<DomainConfigInstance>;
131
+ messagingServiceSids: string[];
132
+ /**
133
+ * Provide a user-friendly representation
134
+ */
135
+ toJSON(): any;
136
+ /**
137
+ * update a DomainConfigInstance
138
+ *
139
+ * @param opts - Options for request
140
+ * @param callback - Callback to handle processed record
141
+ */
142
+ update(opts: DomainConfigInstanceUpdateOptions, callback?: (error: Error | null, items: DomainConfigInstance) => any): Promise<DomainConfigInstance>;
143
+ url: string;
144
+ }
145
+
146
+
147
+ declare class DomainConfigPage extends Page<V1, DomainConfigPayload, DomainConfigResource, DomainConfigInstance> {
148
+ /**
149
+ * Initialize the DomainConfigPage
150
+ *
151
+ * PLEASE NOTE that this class contains beta products that are subject to change.
152
+ * Use them with caution.
153
+ *
154
+ * @param version - Version of the resource
155
+ * @param response - Response from the API
156
+ * @param solution - Path solution
157
+ */
158
+ constructor(version: V1, response: Response<string>, solution: DomainConfigSolution);
159
+
160
+ /**
161
+ * Build an instance of DomainConfigInstance
162
+ *
163
+ * @param payload - Payload response from the API
164
+ */
165
+ getInstance(payload: DomainConfigPayload): DomainConfigInstance;
166
+ /**
167
+ * Provide a user-friendly representation
168
+ */
169
+ toJSON(): any;
170
+ }
171
+
172
+ export { DomainConfigContext, DomainConfigInstance, DomainConfigInstanceUpdateOptions, DomainConfigList, DomainConfigListInstance, DomainConfigPage, DomainConfigPayload, DomainConfigResource, DomainConfigSolution }
@@ -0,0 +1,421 @@
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 DomainConfigList;
22
+ var DomainConfigPage;
23
+ var DomainConfigInstance;
24
+ var DomainConfigContext;
25
+
26
+ /* jshint ignore:start */
27
+ /**
28
+ * Initialize the DomainConfigList
29
+ *
30
+ * PLEASE NOTE that this class contains beta products that are subject to change.
31
+ * Use them with caution.
32
+ *
33
+ * @constructor Twilio.Messaging.V1.DomainConfigList
34
+ *
35
+ * @param {Twilio.Messaging.V1} version - Version of the resource
36
+ */
37
+ /* jshint ignore:end */
38
+ DomainConfigList = function DomainConfigList(version) {
39
+ /* jshint ignore:start */
40
+ /**
41
+ * @function domainConfig
42
+ * @memberof Twilio.Messaging.V1#
43
+ *
44
+ * @param {string} sid - sid of instance
45
+ *
46
+ * @returns {Twilio.Messaging.V1.DomainConfigContext}
47
+ */
48
+ /* jshint ignore:end */
49
+ function DomainConfigListInstance(sid) {
50
+ return DomainConfigListInstance.get(sid);
51
+ }
52
+
53
+ DomainConfigListInstance._version = version;
54
+ // Path Solution
55
+ DomainConfigListInstance._solution = {};
56
+ /* jshint ignore:start */
57
+ /**
58
+ * Constructs a domain_config
59
+ *
60
+ * @function get
61
+ * @memberof Twilio.Messaging.V1.DomainConfigList#
62
+ *
63
+ * @param {string} domainSid -
64
+ * Unique string used to identify the domain that this config should be associated with.
65
+ *
66
+ * @returns {Twilio.Messaging.V1.DomainConfigContext}
67
+ */
68
+ /* jshint ignore:end */
69
+ DomainConfigListInstance.get = function get(domainSid) {
70
+ return new DomainConfigContext(this._version, domainSid);
71
+ };
72
+
73
+ /* jshint ignore:start */
74
+ /**
75
+ * Provide a user-friendly representation
76
+ *
77
+ * @function toJSON
78
+ * @memberof Twilio.Messaging.V1.DomainConfigList#
79
+ *
80
+ * @returns Object
81
+ */
82
+ /* jshint ignore:end */
83
+ DomainConfigListInstance.toJSON = function toJSON() {
84
+ return this._solution;
85
+ };
86
+
87
+ DomainConfigListInstance[util.inspect.custom] = function inspect(depth, options)
88
+ {
89
+ return util.inspect(this.toJSON(), options);
90
+ };
91
+
92
+ return DomainConfigListInstance;
93
+ };
94
+
95
+
96
+ /* jshint ignore:start */
97
+ /**
98
+ * Initialize the DomainConfigPage
99
+ *
100
+ * PLEASE NOTE that this class contains beta products that are subject to change.
101
+ * Use them with caution.
102
+ *
103
+ * @constructor Twilio.Messaging.V1.DomainConfigPage
104
+ *
105
+ * @param {V1} version - Version of the resource
106
+ * @param {Response<string>} response - Response from the API
107
+ * @param {DomainConfigSolution} solution - Path solution
108
+ *
109
+ * @returns DomainConfigPage
110
+ */
111
+ /* jshint ignore:end */
112
+ DomainConfigPage = function DomainConfigPage(version, response, solution) {
113
+ // Path Solution
114
+ this._solution = solution;
115
+
116
+ Page.prototype.constructor.call(this, version, response, this._solution);
117
+ };
118
+
119
+ _.extend(DomainConfigPage.prototype, Page.prototype);
120
+ DomainConfigPage.prototype.constructor = DomainConfigPage;
121
+
122
+ /* jshint ignore:start */
123
+ /**
124
+ * Build an instance of DomainConfigInstance
125
+ *
126
+ * @function getInstance
127
+ * @memberof Twilio.Messaging.V1.DomainConfigPage#
128
+ *
129
+ * @param {DomainConfigPayload} payload - Payload response from the API
130
+ *
131
+ * @returns DomainConfigInstance
132
+ */
133
+ /* jshint ignore:end */
134
+ DomainConfigPage.prototype.getInstance = function getInstance(payload) {
135
+ return new DomainConfigInstance(this._version, payload);
136
+ };
137
+
138
+ /* jshint ignore:start */
139
+ /**
140
+ * Provide a user-friendly representation
141
+ *
142
+ * @function toJSON
143
+ * @memberof Twilio.Messaging.V1.DomainConfigPage#
144
+ *
145
+ * @returns Object
146
+ */
147
+ /* jshint ignore:end */
148
+ DomainConfigPage.prototype.toJSON = function toJSON() {
149
+ let clone = {};
150
+ _.forOwn(this, function(value, key) {
151
+ if (!_.startsWith(key, '_') && ! _.isFunction(value)) {
152
+ clone[key] = value;
153
+ }
154
+ });
155
+ return clone;
156
+ };
157
+
158
+ DomainConfigPage.prototype[util.inspect.custom] = function inspect(depth,
159
+ options) {
160
+ return util.inspect(this.toJSON(), options);
161
+ };
162
+
163
+
164
+ /* jshint ignore:start */
165
+ /**
166
+ * Initialize the DomainConfigContext
167
+ *
168
+ * PLEASE NOTE that this class contains beta products that are subject to change.
169
+ * Use them with caution.
170
+ *
171
+ * @constructor Twilio.Messaging.V1.DomainConfigInstance
172
+ *
173
+ * @property {string} domainSid -
174
+ * The unique string that we created to identify the Domain resource.
175
+ * @property {string} configSid -
176
+ * The unique string that we created to identify the Domain config (prefix ZK).
177
+ * @property {string} messagingServiceSids -
178
+ * A list of messagingServiceSids (with prefix MG).
179
+ * @property {string} fallbackUrl -
180
+ * We will redirect requests to urls we are unable to identify to this url.
181
+ * @property {string} callbackUrl -
182
+ * URL to receive click events to your webhook whenever the recipients click on the shortened links.
183
+ * @property {Date} dateCreated - Date this Domain Config was created.
184
+ * @property {Date} dateUpdated - Date that this Domain Config was last updated.
185
+ * @property {string} url - The url
186
+ *
187
+ * @param {V1} version - Version of the resource
188
+ * @param {DomainConfigPayload} payload - The instance payload
189
+ * @param {sid} domainSid -
190
+ * Unique string used to identify the domain that this config should be associated with.
191
+ */
192
+ /* jshint ignore:end */
193
+ DomainConfigInstance = function DomainConfigInstance(version, payload,
194
+ domainSid) {
195
+ this._version = version;
196
+
197
+ // Marshaled Properties
198
+ this.domainSid = payload.domain_sid; // jshint ignore:line
199
+ this.configSid = payload.config_sid; // jshint ignore:line
200
+ this.messagingServiceSids = payload.messaging_service_sids; // jshint ignore:line
201
+ this.fallbackUrl = payload.fallback_url; // jshint ignore:line
202
+ this.callbackUrl = payload.callback_url; // jshint ignore:line
203
+ this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line
204
+ this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line
205
+ this.url = payload.url; // jshint ignore:line
206
+
207
+ // Context
208
+ this._context = undefined;
209
+ this._solution = {domainSid: domainSid || this.domainSid, };
210
+ };
211
+
212
+ Object.defineProperty(DomainConfigInstance.prototype,
213
+ '_proxy', {
214
+ get: function() {
215
+ if (!this._context) {
216
+ this._context = new DomainConfigContext(this._version, this._solution.domainSid);
217
+ }
218
+
219
+ return this._context;
220
+ }
221
+ });
222
+
223
+ /* jshint ignore:start */
224
+ /**
225
+ * update a DomainConfigInstance
226
+ *
227
+ * @function update
228
+ * @memberof Twilio.Messaging.V1.DomainConfigInstance#
229
+ *
230
+ * @param {object} opts - Options for request
231
+ * @param {string|list} opts.messagingServiceSids -
232
+ * A list of messagingServiceSids (with prefix MG)
233
+ * @param {string} [opts.fallbackUrl] -
234
+ * We will redirect requests to urls we are unable to identify to this url.
235
+ * @param {string} [opts.callbackUrl] -
236
+ * URL to receive click events to your webhook whenever the recipients click on the shortened links
237
+ * @param {string} [opts.messagingServiceSidsAction] -
238
+ * An action type for messaging_service_sids operation (ADD, DELETE, REPLACE)
239
+ * @param {function} [callback] - Callback to handle processed record
240
+ *
241
+ * @returns {Promise} Resolves to processed DomainConfigInstance
242
+ */
243
+ /* jshint ignore:end */
244
+ DomainConfigInstance.prototype.update = function update(opts, callback) {
245
+ return this._proxy.update(opts, callback);
246
+ };
247
+
248
+ /* jshint ignore:start */
249
+ /**
250
+ * fetch a DomainConfigInstance
251
+ *
252
+ * @function fetch
253
+ * @memberof Twilio.Messaging.V1.DomainConfigInstance#
254
+ *
255
+ * @param {function} [callback] - Callback to handle processed record
256
+ *
257
+ * @returns {Promise} Resolves to processed DomainConfigInstance
258
+ */
259
+ /* jshint ignore:end */
260
+ DomainConfigInstance.prototype.fetch = function fetch(callback) {
261
+ return this._proxy.fetch(callback);
262
+ };
263
+
264
+ /* jshint ignore:start */
265
+ /**
266
+ * Provide a user-friendly representation
267
+ *
268
+ * @function toJSON
269
+ * @memberof Twilio.Messaging.V1.DomainConfigInstance#
270
+ *
271
+ * @returns Object
272
+ */
273
+ /* jshint ignore:end */
274
+ DomainConfigInstance.prototype.toJSON = function toJSON() {
275
+ let clone = {};
276
+ _.forOwn(this, function(value, key) {
277
+ if (!_.startsWith(key, '_') && ! _.isFunction(value)) {
278
+ clone[key] = value;
279
+ }
280
+ });
281
+ return clone;
282
+ };
283
+
284
+ DomainConfigInstance.prototype[util.inspect.custom] = function inspect(depth,
285
+ options) {
286
+ return util.inspect(this.toJSON(), options);
287
+ };
288
+
289
+
290
+ /* jshint ignore:start */
291
+ /**
292
+ * Initialize the DomainConfigContext
293
+ *
294
+ * PLEASE NOTE that this class contains beta products that are subject to change.
295
+ * Use them with caution.
296
+ *
297
+ * @constructor Twilio.Messaging.V1.DomainConfigContext
298
+ *
299
+ * @param {V1} version - Version of the resource
300
+ * @param {sid} domainSid -
301
+ * Unique string used to identify the domain that this config should be associated with.
302
+ */
303
+ /* jshint ignore:end */
304
+ DomainConfigContext = function DomainConfigContext(version, domainSid) {
305
+ this._version = version;
306
+
307
+ // Path Solution
308
+ this._solution = {domainSid: domainSid, };
309
+ this._uri = `/LinkShortening/Domains/${domainSid}/Config`;
310
+ };
311
+
312
+ /* jshint ignore:start */
313
+ /**
314
+ * update a DomainConfigInstance
315
+ *
316
+ * @function update
317
+ * @memberof Twilio.Messaging.V1.DomainConfigContext#
318
+ *
319
+ * @param {object} opts - Options for request
320
+ * @param {string|list} opts.messagingServiceSids -
321
+ * A list of messagingServiceSids (with prefix MG)
322
+ * @param {string} [opts.fallbackUrl] -
323
+ * We will redirect requests to urls we are unable to identify to this url.
324
+ * @param {string} [opts.callbackUrl] -
325
+ * URL to receive click events to your webhook whenever the recipients click on the shortened links
326
+ * @param {string} [opts.messagingServiceSidsAction] -
327
+ * An action type for messaging_service_sids operation (ADD, DELETE, REPLACE)
328
+ * @param {function} [callback] - Callback to handle processed record
329
+ *
330
+ * @returns {Promise} Resolves to processed DomainConfigInstance
331
+ */
332
+ /* jshint ignore:end */
333
+ DomainConfigContext.prototype.update = function update(opts, callback) {
334
+ if (_.isUndefined(opts)) {
335
+ throw new Error('Required parameter "opts" missing.');
336
+ }
337
+ if (_.isUndefined(opts['messagingServiceSids'])) {
338
+ throw new Error('Required parameter "opts[\'messagingServiceSids\']" missing.');
339
+ }
340
+
341
+ var deferred = Q.defer();
342
+ var data = values.of({
343
+ 'MessagingServiceSids': serialize.map(_.get(opts, 'messagingServiceSids'), function(e) { return e; }),
344
+ 'FallbackUrl': _.get(opts, 'fallbackUrl'),
345
+ 'CallbackUrl': _.get(opts, 'callbackUrl'),
346
+ 'MessagingServiceSidsAction': _.get(opts, 'messagingServiceSidsAction')
347
+ });
348
+
349
+ var promise = this._version.update({uri: this._uri, method: 'POST', data: data});
350
+
351
+ promise = promise.then(function(payload) {
352
+ deferred.resolve(new DomainConfigInstance(this._version, payload, this._solution.domainSid));
353
+ }.bind(this));
354
+
355
+ promise.catch(function(error) {
356
+ deferred.reject(error);
357
+ });
358
+
359
+ if (_.isFunction(callback)) {
360
+ deferred.promise.nodeify(callback);
361
+ }
362
+
363
+ return deferred.promise;
364
+ };
365
+
366
+ /* jshint ignore:start */
367
+ /**
368
+ * fetch a DomainConfigInstance
369
+ *
370
+ * @function fetch
371
+ * @memberof Twilio.Messaging.V1.DomainConfigContext#
372
+ *
373
+ * @param {function} [callback] - Callback to handle processed record
374
+ *
375
+ * @returns {Promise} Resolves to processed DomainConfigInstance
376
+ */
377
+ /* jshint ignore:end */
378
+ DomainConfigContext.prototype.fetch = function fetch(callback) {
379
+ var deferred = Q.defer();
380
+ var promise = this._version.fetch({uri: this._uri, method: 'GET'});
381
+
382
+ promise = promise.then(function(payload) {
383
+ deferred.resolve(new DomainConfigInstance(this._version, payload, this._solution.domainSid));
384
+ }.bind(this));
385
+
386
+ promise.catch(function(error) {
387
+ deferred.reject(error);
388
+ });
389
+
390
+ if (_.isFunction(callback)) {
391
+ deferred.promise.nodeify(callback);
392
+ }
393
+
394
+ return deferred.promise;
395
+ };
396
+
397
+ /* jshint ignore:start */
398
+ /**
399
+ * Provide a user-friendly representation
400
+ *
401
+ * @function toJSON
402
+ * @memberof Twilio.Messaging.V1.DomainConfigContext#
403
+ *
404
+ * @returns Object
405
+ */
406
+ /* jshint ignore:end */
407
+ DomainConfigContext.prototype.toJSON = function toJSON() {
408
+ return this._solution;
409
+ };
410
+
411
+ DomainConfigContext.prototype[util.inspect.custom] = function inspect(depth,
412
+ options) {
413
+ return util.inspect(this.toJSON(), options);
414
+ };
415
+
416
+ module.exports = {
417
+ DomainConfigList: DomainConfigList,
418
+ DomainConfigPage: DomainConfigPage,
419
+ DomainConfigInstance: DomainConfigInstance,
420
+ DomainConfigContext: DomainConfigContext
421
+ };
@@ -212,6 +212,7 @@ interface DeviceResource {
212
212
  app: object;
213
213
  date_created: Date;
214
214
  date_updated: Date;
215
+ links: string;
215
216
  logging: object;
216
217
  sid: string;
217
218
  unique_name: string;
@@ -286,6 +287,7 @@ declare class DeviceInstance extends SerializableClass {
286
287
  * @param callback - Callback to handle processed record
287
288
  */
288
289
  fetch(callback?: (error: Error | null, items: DeviceInstance) => any): Promise<DeviceInstance>;
290
+ links: string;
289
291
  logging: any;
290
292
  sid: string;
291
293
  /**
@@ -426,6 +426,7 @@ DevicePage.prototype[util.inspect.custom] = function inspect(depth, options) {
426
426
  * @property {Date} dateCreated - The date that this Device was created.
427
427
  * @property {Date} dateUpdated - The date that this Device was last updated.
428
428
  * @property {string} url - The URL of this resource.
429
+ * @property {string} links - The absolute URLs of related resources
429
430
  *
430
431
  * @param {V1} version - Version of the resource
431
432
  * @param {DevicePayload} payload - The instance payload
@@ -444,6 +445,7 @@ DeviceInstance = function DeviceInstance(version, payload, sid) {
444
445
  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line
445
446
  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line
446
447
  this.url = payload.url; // jshint ignore:line
448
+ this.links = payload.links; // jshint ignore:line
447
449
 
448
450
  // Context
449
451
  this._context = undefined;
@@ -12,7 +12,7 @@ import { BuildStatusList } from './build/buildStatus';
12
12
  import { BuildStatusListInstance } from './build/buildStatus';
13
13
  import { SerializableClass } from '../../../../interfaces';
14
14
 
15
- type BuildRuntime = 'node8'|'node10'|'node12'|'node14';
15
+ type BuildRuntime = 'node8'|'node10'|'node12'|'node14'|'node16';
16
16
 
17
17
  type BuildStatus = 'building'|'completed'|'failed';
18
18
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "twilio",
3
3
  "description": "A Twilio helper library",
4
- "version": "3.83.2",
4
+ "version": "3.83.4",
5
5
  "author": "API Team <api@twilio.com>",
6
6
  "contributors": [
7
7
  {
@@ -1,34 +0,0 @@
1
- /**
2
- * This code was generated by
3
- * \ / _ _ _| _ _
4
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
5
- * / /
6
- */
7
-
8
- import Preview = require('../Preview');
9
- import Version = require('../../base/Version');
10
- import { BrandedChannelList } from './trusted_comms/brandedChannel';
11
- import { BrandedChannelListInstance } from './trusted_comms/brandedChannel';
12
- import { BrandsInformationList } from './trusted_comms/brandsInformation';
13
- import { BrandsInformationListInstance } from './trusted_comms/brandsInformation';
14
- import { CpsList } from './trusted_comms/cps';
15
- import { CpsListInstance } from './trusted_comms/cps';
16
- import { CurrentCallList } from './trusted_comms/currentCall';
17
- import { CurrentCallListInstance } from './trusted_comms/currentCall';
18
-
19
-
20
- declare class TrustedComms extends Version {
21
- /**
22
- * Initialize the TrustedComms version of Preview
23
- *
24
- * @param domain - The twilio domain
25
- */
26
- constructor(domain: Preview);
27
-
28
- readonly brandedChannels: BrandedChannelListInstance;
29
- readonly brandsInformation: BrandsInformationListInstance;
30
- readonly cps: CpsListInstance;
31
- readonly currentCalls: CurrentCallListInstance;
32
- }
33
-
34
- export = TrustedComms;