twilio 3.83.3 → 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 (38) hide show
  1. package/lib/rest/FlexApi.d.ts +2 -0
  2. package/lib/rest/FlexApi.js +8 -0
  3. package/lib/rest/Messaging.d.ts +4 -0
  4. package/lib/rest/Messaging.js +18 -0
  5. package/lib/rest/Preview.d.ts +0 -10
  6. package/lib/rest/Preview.js +0 -46
  7. package/lib/rest/content/v1/content/approvalFetch.d.ts +139 -0
  8. package/lib/rest/content/v1/content/approvalFetch.js +328 -0
  9. package/lib/rest/content/v1/content.d.ts +7 -6
  10. package/lib/rest/content/v1/content.js +31 -31
  11. package/lib/rest/flexApi/V1.d.ts +3 -0
  12. package/lib/rest/flexApi/V1.js +11 -0
  13. package/lib/rest/flexApi/v1/assessments.d.ts +113 -0
  14. package/lib/rest/flexApi/v1/assessments.js +300 -0
  15. package/lib/rest/lookups/v2/phoneNumber.d.ts +22 -0
  16. package/lib/rest/lookups/v2/phoneNumber.js +43 -1
  17. package/lib/rest/messaging/V1.d.ts +6 -0
  18. package/lib/rest/messaging/V1.js +24 -0
  19. package/lib/rest/messaging/v1/domainCert.d.ts +178 -0
  20. package/lib/rest/messaging/v1/domainCert.js +447 -0
  21. package/lib/rest/messaging/v1/domainConfig.d.ts +172 -0
  22. package/lib/rest/messaging/v1/domainConfig.js +421 -0
  23. package/lib/rest/microvisor/v1/device.d.ts +2 -0
  24. package/lib/rest/microvisor/v1/device.js +2 -0
  25. package/lib/rest/serverless/v1/service/build.d.ts +1 -1
  26. package/package.json +1 -1
  27. package/lib/rest/preview/TrustedComms.d.ts +0 -34
  28. package/lib/rest/preview/TrustedComms.js +0 -84
  29. package/lib/rest/preview/trusted_comms/brandedChannel/channel.d.ts +0 -120
  30. package/lib/rest/preview/trusted_comms/brandedChannel/channel.js +0 -257
  31. package/lib/rest/preview/trusted_comms/brandedChannel.d.ts +0 -150
  32. package/lib/rest/preview/trusted_comms/brandedChannel.js +0 -362
  33. package/lib/rest/preview/trusted_comms/brandsInformation.d.ts +0 -158
  34. package/lib/rest/preview/trusted_comms/brandsInformation.js +0 -338
  35. package/lib/rest/preview/trusted_comms/cps.d.ts +0 -156
  36. package/lib/rest/preview/trusted_comms/cps.js +0 -332
  37. package/lib/rest/preview/trusted_comms/currentCall.d.ts +0 -180
  38. package/lib/rest/preview/trusted_comms/currentCall.js +0 -367
@@ -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.3",
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;
@@ -1,84 +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 _ = require('lodash'); /* jshint ignore:line */
13
- var BrandedChannelList = require(
14
- './trusted_comms/brandedChannel').BrandedChannelList;
15
- var BrandsInformationList = require(
16
- './trusted_comms/brandsInformation').BrandsInformationList;
17
- var CpsList = require('./trusted_comms/cps').CpsList;
18
- var CurrentCallList = require('./trusted_comms/currentCall').CurrentCallList;
19
- var Version = require('../../base/Version'); /* jshint ignore:line */
20
-
21
-
22
- /* jshint ignore:start */
23
- /**
24
- * Initialize the TrustedComms version of Preview
25
- *
26
- * @constructor Twilio.Preview.TrustedComms
27
- *
28
- * @property {Twilio.Preview.TrustedComms.BrandedChannelList} brandedChannels -
29
- * brandedChannels resource
30
- * @property {Twilio.Preview.TrustedComms.BrandsInformationList} brandsInformation -
31
- * brandsInformation resource
32
- * @property {Twilio.Preview.TrustedComms.CpsList} cps - cps resource
33
- * @property {Twilio.Preview.TrustedComms.CurrentCallList} currentCalls -
34
- * currentCalls resource
35
- *
36
- * @param {Twilio.Preview} domain - The twilio domain
37
- */
38
- /* jshint ignore:end */
39
- function TrustedComms(domain) {
40
- Version.prototype.constructor.call(this, domain, 'TrustedComms');
41
-
42
- // Resources
43
- this._brandedChannels = undefined;
44
- this._brandsInformation = undefined;
45
- this._cps = undefined;
46
- this._currentCalls = undefined;
47
- }
48
-
49
- _.extend(TrustedComms.prototype, Version.prototype);
50
- TrustedComms.prototype.constructor = TrustedComms;
51
-
52
- Object.defineProperty(TrustedComms.prototype,
53
- 'brandedChannels', {
54
- get: function() {
55
- this._brandedChannels = this._brandedChannels || new BrandedChannelList(this);
56
- return this._brandedChannels;
57
- }
58
- });
59
-
60
- Object.defineProperty(TrustedComms.prototype,
61
- 'brandsInformation', {
62
- get: function() {
63
- this._brandsInformation = this._brandsInformation || new BrandsInformationList(this);
64
- return this._brandsInformation;
65
- }
66
- });
67
-
68
- Object.defineProperty(TrustedComms.prototype,
69
- 'cps', {
70
- get: function() {
71
- this._cps = this._cps || new CpsList(this);
72
- return this._cps;
73
- }
74
- });
75
-
76
- Object.defineProperty(TrustedComms.prototype,
77
- 'currentCalls', {
78
- get: function() {
79
- this._currentCalls = this._currentCalls || new CurrentCallList(this);
80
- return this._currentCalls;
81
- }
82
- });
83
-
84
- module.exports = TrustedComms;