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
@@ -0,0 +1,328 @@
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 values = require('../../../../base/values'); /* jshint ignore:line */
17
+
18
+ var ApprovalFetchList;
19
+ var ApprovalFetchPage;
20
+ var ApprovalFetchInstance;
21
+ var ApprovalFetchContext;
22
+
23
+ /* jshint ignore:start */
24
+ /**
25
+ * Initialize the ApprovalFetchList
26
+ *
27
+ * PLEASE NOTE that this class contains preview products that are subject to
28
+ * change. Use them with caution. If you currently do not have developer preview
29
+ * access, please contact help@twilio.com.
30
+ *
31
+ * @constructor Twilio.Content.V1.ContentContext.ApprovalFetchList
32
+ *
33
+ * @param {Twilio.Content.V1} version - Version of the resource
34
+ * @param {string} sid - The unique string that identifies the Content resource
35
+ */
36
+ /* jshint ignore:end */
37
+ ApprovalFetchList = function ApprovalFetchList(version, sid) {
38
+ /* jshint ignore:start */
39
+ /**
40
+ * @function approvalFetch
41
+ * @memberof Twilio.Content.V1.ContentContext#
42
+ *
43
+ * @param {string} sid - sid of instance
44
+ *
45
+ * @returns {Twilio.Content.V1.ContentContext.ApprovalFetchContext}
46
+ */
47
+ /* jshint ignore:end */
48
+ function ApprovalFetchListInstance(sid) {
49
+ return ApprovalFetchListInstance.get(sid);
50
+ }
51
+
52
+ ApprovalFetchListInstance._version = version;
53
+ // Path Solution
54
+ ApprovalFetchListInstance._solution = {sid: sid};
55
+ /* jshint ignore:start */
56
+ /**
57
+ * Constructs a approval_fetch
58
+ *
59
+ * @function get
60
+ * @memberof Twilio.Content.V1.ContentContext.ApprovalFetchList#
61
+ *
62
+ * @returns {Twilio.Content.V1.ContentContext.ApprovalFetchContext}
63
+ */
64
+ /* jshint ignore:end */
65
+ ApprovalFetchListInstance.get = function get() {
66
+ return new ApprovalFetchContext(this._version, this._solution.sid);
67
+ };
68
+
69
+ /* jshint ignore:start */
70
+ /**
71
+ * Provide a user-friendly representation
72
+ *
73
+ * @function toJSON
74
+ * @memberof Twilio.Content.V1.ContentContext.ApprovalFetchList#
75
+ *
76
+ * @returns Object
77
+ */
78
+ /* jshint ignore:end */
79
+ ApprovalFetchListInstance.toJSON = function toJSON() {
80
+ return this._solution;
81
+ };
82
+
83
+ ApprovalFetchListInstance[util.inspect.custom] = function inspect(depth,
84
+ options) {
85
+ return util.inspect(this.toJSON(), options);
86
+ };
87
+
88
+ return ApprovalFetchListInstance;
89
+ };
90
+
91
+
92
+ /* jshint ignore:start */
93
+ /**
94
+ * Initialize the ApprovalFetchPage
95
+ *
96
+ * PLEASE NOTE that this class contains preview products that are subject to
97
+ * change. Use them with caution. If you currently do not have developer preview
98
+ * access, please contact help@twilio.com.
99
+ *
100
+ * @constructor Twilio.Content.V1.ContentContext.ApprovalFetchPage
101
+ *
102
+ * @param {V1} version - Version of the resource
103
+ * @param {Response<string>} response - Response from the API
104
+ * @param {ApprovalFetchSolution} solution - Path solution
105
+ *
106
+ * @returns ApprovalFetchPage
107
+ */
108
+ /* jshint ignore:end */
109
+ ApprovalFetchPage = function ApprovalFetchPage(version, response, solution) {
110
+ // Path Solution
111
+ this._solution = solution;
112
+
113
+ Page.prototype.constructor.call(this, version, response, this._solution);
114
+ };
115
+
116
+ _.extend(ApprovalFetchPage.prototype, Page.prototype);
117
+ ApprovalFetchPage.prototype.constructor = ApprovalFetchPage;
118
+
119
+ /* jshint ignore:start */
120
+ /**
121
+ * Build an instance of ApprovalFetchInstance
122
+ *
123
+ * @function getInstance
124
+ * @memberof Twilio.Content.V1.ContentContext.ApprovalFetchPage#
125
+ *
126
+ * @param {ApprovalFetchPayload} payload - Payload response from the API
127
+ *
128
+ * @returns ApprovalFetchInstance
129
+ */
130
+ /* jshint ignore:end */
131
+ ApprovalFetchPage.prototype.getInstance = function getInstance(payload) {
132
+ return new ApprovalFetchInstance(this._version, payload, this._solution.sid);
133
+ };
134
+
135
+ /* jshint ignore:start */
136
+ /**
137
+ * Provide a user-friendly representation
138
+ *
139
+ * @function toJSON
140
+ * @memberof Twilio.Content.V1.ContentContext.ApprovalFetchPage#
141
+ *
142
+ * @returns Object
143
+ */
144
+ /* jshint ignore:end */
145
+ ApprovalFetchPage.prototype.toJSON = function toJSON() {
146
+ let clone = {};
147
+ _.forOwn(this, function(value, key) {
148
+ if (!_.startsWith(key, '_') && ! _.isFunction(value)) {
149
+ clone[key] = value;
150
+ }
151
+ });
152
+ return clone;
153
+ };
154
+
155
+ ApprovalFetchPage.prototype[util.inspect.custom] = function inspect(depth,
156
+ options) {
157
+ return util.inspect(this.toJSON(), options);
158
+ };
159
+
160
+
161
+ /* jshint ignore:start */
162
+ /**
163
+ * Initialize the ApprovalFetchContext
164
+ *
165
+ * PLEASE NOTE that this class contains preview products that are subject to
166
+ * change. Use them with caution. If you currently do not have developer preview
167
+ * access, please contact help@twilio.com.
168
+ *
169
+ * @constructor Twilio.Content.V1.ContentContext.ApprovalFetchInstance
170
+ *
171
+ * @property {string} sid - The unique string that identifies the Content resource
172
+ * @property {string} accountSid -
173
+ * The SID of the Account that created the Content resource
174
+ * @property {object} whatsapp -
175
+ * Contains the whatsapp approval information for the Content resource
176
+ * @property {string} url -
177
+ * The URL of the resource, relative to `https://content.twilio.com`
178
+ *
179
+ * @param {V1} version - Version of the resource
180
+ * @param {ApprovalFetchPayload} payload - The instance payload
181
+ * @param {sid} sid - The unique string that identifies the Content resource
182
+ */
183
+ /* jshint ignore:end */
184
+ ApprovalFetchInstance = function ApprovalFetchInstance(version, payload, sid) {
185
+ this._version = version;
186
+
187
+ // Marshaled Properties
188
+ this.sid = payload.sid; // jshint ignore:line
189
+ this.accountSid = payload.account_sid; // jshint ignore:line
190
+ this.whatsapp = payload.whatsapp; // jshint ignore:line
191
+ this.url = payload.url; // jshint ignore:line
192
+
193
+ // Context
194
+ this._context = undefined;
195
+ this._solution = {sid: sid, };
196
+ };
197
+
198
+ Object.defineProperty(ApprovalFetchInstance.prototype,
199
+ '_proxy', {
200
+ get: function() {
201
+ if (!this._context) {
202
+ this._context = new ApprovalFetchContext(this._version, this._solution.sid);
203
+ }
204
+
205
+ return this._context;
206
+ }
207
+ });
208
+
209
+ /* jshint ignore:start */
210
+ /**
211
+ * fetch a ApprovalFetchInstance
212
+ *
213
+ * @function fetch
214
+ * @memberof Twilio.Content.V1.ContentContext.ApprovalFetchInstance#
215
+ *
216
+ * @param {function} [callback] - Callback to handle processed record
217
+ *
218
+ * @returns {Promise} Resolves to processed ApprovalFetchInstance
219
+ */
220
+ /* jshint ignore:end */
221
+ ApprovalFetchInstance.prototype.fetch = function fetch(callback) {
222
+ return this._proxy.fetch(callback);
223
+ };
224
+
225
+ /* jshint ignore:start */
226
+ /**
227
+ * Provide a user-friendly representation
228
+ *
229
+ * @function toJSON
230
+ * @memberof Twilio.Content.V1.ContentContext.ApprovalFetchInstance#
231
+ *
232
+ * @returns Object
233
+ */
234
+ /* jshint ignore:end */
235
+ ApprovalFetchInstance.prototype.toJSON = function toJSON() {
236
+ let clone = {};
237
+ _.forOwn(this, function(value, key) {
238
+ if (!_.startsWith(key, '_') && ! _.isFunction(value)) {
239
+ clone[key] = value;
240
+ }
241
+ });
242
+ return clone;
243
+ };
244
+
245
+ ApprovalFetchInstance.prototype[util.inspect.custom] = function inspect(depth,
246
+ options) {
247
+ return util.inspect(this.toJSON(), options);
248
+ };
249
+
250
+
251
+ /* jshint ignore:start */
252
+ /**
253
+ * Initialize the ApprovalFetchContext
254
+ *
255
+ * PLEASE NOTE that this class contains preview products that are subject to
256
+ * change. Use them with caution. If you currently do not have developer preview
257
+ * access, please contact help@twilio.com.
258
+ *
259
+ * @constructor Twilio.Content.V1.ContentContext.ApprovalFetchContext
260
+ *
261
+ * @param {V1} version - Version of the resource
262
+ * @param {sid} sid - The unique string that identifies the Content resource
263
+ */
264
+ /* jshint ignore:end */
265
+ ApprovalFetchContext = function ApprovalFetchContext(version, sid) {
266
+ this._version = version;
267
+
268
+ // Path Solution
269
+ this._solution = {sid: sid, };
270
+ this._uri = `/Content/${sid}/ApprovalRequests`;
271
+ };
272
+
273
+ /* jshint ignore:start */
274
+ /**
275
+ * fetch a ApprovalFetchInstance
276
+ *
277
+ * @function fetch
278
+ * @memberof Twilio.Content.V1.ContentContext.ApprovalFetchContext#
279
+ *
280
+ * @param {function} [callback] - Callback to handle processed record
281
+ *
282
+ * @returns {Promise} Resolves to processed ApprovalFetchInstance
283
+ */
284
+ /* jshint ignore:end */
285
+ ApprovalFetchContext.prototype.fetch = function fetch(callback) {
286
+ var deferred = Q.defer();
287
+ var promise = this._version.fetch({uri: this._uri, method: 'GET'});
288
+
289
+ promise = promise.then(function(payload) {
290
+ deferred.resolve(new ApprovalFetchInstance(this._version, payload, this._solution.sid));
291
+ }.bind(this));
292
+
293
+ promise.catch(function(error) {
294
+ deferred.reject(error);
295
+ });
296
+
297
+ if (_.isFunction(callback)) {
298
+ deferred.promise.nodeify(callback);
299
+ }
300
+
301
+ return deferred.promise;
302
+ };
303
+
304
+ /* jshint ignore:start */
305
+ /**
306
+ * Provide a user-friendly representation
307
+ *
308
+ * @function toJSON
309
+ * @memberof Twilio.Content.V1.ContentContext.ApprovalFetchContext#
310
+ *
311
+ * @returns Object
312
+ */
313
+ /* jshint ignore:end */
314
+ ApprovalFetchContext.prototype.toJSON = function toJSON() {
315
+ return this._solution;
316
+ };
317
+
318
+ ApprovalFetchContext.prototype[util.inspect.custom] = function inspect(depth,
319
+ options) {
320
+ return util.inspect(this.toJSON(), options);
321
+ };
322
+
323
+ module.exports = {
324
+ ApprovalFetchList: ApprovalFetchList,
325
+ ApprovalFetchPage: ApprovalFetchPage,
326
+ ApprovalFetchInstance: ApprovalFetchInstance,
327
+ ApprovalFetchContext: ApprovalFetchContext
328
+ };
@@ -8,6 +8,8 @@
8
8
  import Page = require('../../../base/Page');
9
9
  import Response = require('../../../http/response');
10
10
  import V1 = require('../V1');
11
+ import { ApprovalFetchList } from './content/approvalFetch';
12
+ import { ApprovalFetchListInstance } from './content/approvalFetch';
11
13
  import { SerializableClass } from '../../../interfaces';
12
14
 
13
15
  /**
@@ -26,12 +28,6 @@ interface ContentListInstance {
26
28
  * @param sid - sid of instance
27
29
  */
28
30
  (sid: string): ContentContext;
29
- /**
30
- * create a ContentInstance
31
- *
32
- * @param callback - Callback to handle processed record
33
- */
34
- create(callback?: (error: Error | null, item: ContentInstance) => any): Promise<ContentInstance>;
35
31
  /**
36
32
  * Streams ContentInstance records from the API.
37
33
  *
@@ -230,6 +226,7 @@ declare class ContentContext {
230
226
  */
231
227
  constructor(version: V1, sid: string);
232
228
 
229
+ approvalFetch: ApprovalFetchListInstance;
233
230
  /**
234
231
  * fetch a ContentInstance
235
232
  *
@@ -265,6 +262,10 @@ declare class ContentInstance extends SerializableClass {
265
262
 
266
263
  private _proxy: ContentContext;
267
264
  accountSid: string;
265
+ /**
266
+ * Access the approvalFetch
267
+ */
268
+ approvalFetch(): ApprovalFetchListInstance;
268
269
  dateCreated: Date;
269
270
  dateUpdated: Date;
270
271
  /**
@@ -12,6 +12,7 @@
12
12
  var Q = require('q'); /* jshint ignore:line */
13
13
  var _ = require('lodash'); /* jshint ignore:line */
14
14
  var util = require('util'); /* jshint ignore:line */
15
+ var ApprovalFetchList = require('./content/approvalFetch').ApprovalFetchList;
15
16
  var Page = require('../../../base/Page'); /* jshint ignore:line */
16
17
  var deserialize = require(
17
18
  '../../../base/deserialize'); /* jshint ignore:line */
@@ -54,37 +55,6 @@ ContentList = function ContentList(version) {
54
55
  // Path Solution
55
56
  ContentListInstance._solution = {};
56
57
  ContentListInstance._uri = `/Content`;
57
- /* jshint ignore:start */
58
- /**
59
- * create a ContentInstance
60
- *
61
- * @function create
62
- * @memberof Twilio.Content.V1.ContentList#
63
- *
64
- * @param {function} [callback] - Callback to handle processed record
65
- *
66
- * @returns {Promise} Resolves to processed ContentInstance
67
- */
68
- /* jshint ignore:end */
69
- ContentListInstance.create = function create(callback) {
70
- var deferred = Q.defer();
71
- var promise = this._version.create({uri: this._uri, method: 'POST'});
72
-
73
- promise = promise.then(function(payload) {
74
- deferred.resolve(new ContentInstance(this._version, payload, this._solution.sid));
75
- }.bind(this));
76
-
77
- promise.catch(function(error) {
78
- deferred.reject(error);
79
- });
80
-
81
- if (_.isFunction(callback)) {
82
- deferred.promise.nodeify(callback);
83
- }
84
-
85
- return deferred.promise;
86
- };
87
-
88
58
  /* jshint ignore:start */
89
59
  /**
90
60
  * Streams ContentInstance records from the API.
@@ -531,6 +501,20 @@ ContentInstance.prototype.remove = function remove(callback) {
531
501
  return this._proxy.remove(callback);
532
502
  };
533
503
 
504
+ /* jshint ignore:start */
505
+ /**
506
+ * Access the approvalFetch
507
+ *
508
+ * @function approvalFetch
509
+ * @memberof Twilio.Content.V1.ContentInstance#
510
+ *
511
+ * @returns {Twilio.Content.V1.ContentContext.ApprovalFetchList}
512
+ */
513
+ /* jshint ignore:end */
514
+ ContentInstance.prototype.approvalFetch = function approvalFetch() {
515
+ return this._proxy.approvalFetch;
516
+ };
517
+
534
518
  /* jshint ignore:start */
535
519
  /**
536
520
  * Provide a user-friendly representation
@@ -567,6 +551,9 @@ ContentInstance.prototype[util.inspect.custom] = function inspect(depth,
567
551
  *
568
552
  * @constructor Twilio.Content.V1.ContentContext
569
553
  *
554
+ * @property {Twilio.Content.V1.ContentContext.ApprovalFetchList} approvalFetch -
555
+ * approvalFetch resource
556
+ *
570
557
  * @param {V1} version - Version of the resource
571
558
  * @param {sid} sid - The unique string that identifies the resource
572
559
  */
@@ -577,6 +564,9 @@ ContentContext = function ContentContext(version, sid) {
577
564
  // Path Solution
578
565
  this._solution = {sid: sid, };
579
566
  this._uri = `/Content/${sid}`;
567
+
568
+ // Dependents
569
+ this._approvalFetch = undefined;
580
570
  };
581
571
 
582
572
  /* jshint ignore:start */
@@ -641,6 +631,16 @@ ContentContext.prototype.remove = function remove(callback) {
641
631
  return deferred.promise;
642
632
  };
643
633
 
634
+ Object.defineProperty(ContentContext.prototype,
635
+ 'approvalFetch', {
636
+ get: function() {
637
+ if (!this._approvalFetch) {
638
+ this._approvalFetch = new ApprovalFetchList(this._version, this._solution.sid);
639
+ }
640
+ return this._approvalFetch;
641
+ }
642
+ });
643
+
644
644
  /* jshint ignore:start */
645
645
  /**
646
646
  * Provide a user-friendly representation
@@ -7,6 +7,8 @@
7
7
 
8
8
  import FlexApi = require('../FlexApi');
9
9
  import Version = require('../../base/Version');
10
+ import { AssessmentsList } from './v1/assessments';
11
+ import { AssessmentsListInstance } from './v1/assessments';
10
12
  import { ChannelList } from './v1/channel';
11
13
  import { ChannelListInstance } from './v1/channel';
12
14
  import { ConfigurationList } from './v1/configuration';
@@ -31,6 +33,7 @@ declare class V1 extends Version {
31
33
  */
32
34
  constructor(domain: FlexApi);
33
35
 
36
+ readonly assessments: AssessmentsListInstance;
34
37
  readonly channel: ChannelListInstance;
35
38
  readonly configuration: ConfigurationListInstance;
36
39
  readonly flexFlow: FlexFlowListInstance;
@@ -10,6 +10,7 @@
10
10
  /* jshint ignore:end */
11
11
 
12
12
  var _ = require('lodash'); /* jshint ignore:line */
13
+ var AssessmentsList = require('./v1/assessments').AssessmentsList;
13
14
  var ChannelList = require('./v1/channel').ChannelList;
14
15
  var ConfigurationList = require('./v1/configuration').ConfigurationList;
15
16
  var FlexFlowList = require('./v1/flexFlow').FlexFlowList;
@@ -26,6 +27,7 @@ var WebChannelList = require('./v1/webChannel').WebChannelList;
26
27
  *
27
28
  * @constructor Twilio.FlexApi.V1
28
29
  *
30
+ * @property {Twilio.FlexApi.V1.AssessmentsList} assessments - assessments resource
29
31
  * @property {Twilio.FlexApi.V1.ChannelList} channel - channel resource
30
32
  * @property {Twilio.FlexApi.V1.ConfigurationList} configuration -
31
33
  * configuration resource
@@ -42,6 +44,7 @@ function V1(domain) {
42
44
  Version.prototype.constructor.call(this, domain, 'v1');
43
45
 
44
46
  // Resources
47
+ this._assessments = undefined;
45
48
  this._channel = undefined;
46
49
  this._configuration = undefined;
47
50
  this._flexFlow = undefined;
@@ -54,6 +57,14 @@ function V1(domain) {
54
57
  _.extend(V1.prototype, Version.prototype);
55
58
  V1.prototype.constructor = V1;
56
59
 
60
+ Object.defineProperty(V1.prototype,
61
+ 'assessments', {
62
+ get: function() {
63
+ this._assessments = this._assessments || new AssessmentsList(this);
64
+ return this._assessments;
65
+ }
66
+ });
67
+
57
68
  Object.defineProperty(V1.prototype,
58
69
  'channel', {
59
70
  get: function() {
@@ -0,0 +1,25 @@
1
+ /**
2
+ * This code was generated by
3
+ * \ / _ _ _| _ _
4
+ * | (_)\/(_)(_|\/| |(/_ v1.0.0
5
+ * / /
6
+ */
7
+
8
+ import FlexApi = require('../FlexApi');
9
+ import Version = require('../../base/Version');
10
+ import { WebChannelsList } from './v2/webChannels';
11
+ import { WebChannelsListInstance } from './v2/webChannels';
12
+
13
+
14
+ declare class V2 extends Version {
15
+ /**
16
+ * Initialize the V2 version of FlexApi
17
+ *
18
+ * @param domain - The twilio domain
19
+ */
20
+ constructor(domain: FlexApi);
21
+
22
+ readonly webChannels: WebChannelsListInstance;
23
+ }
24
+
25
+ export = V2;
@@ -0,0 +1,46 @@
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 Version = require('../../base/Version'); /* jshint ignore:line */
14
+ var WebChannelsList = require('./v2/webChannels').WebChannelsList;
15
+
16
+
17
+ /* jshint ignore:start */
18
+ /**
19
+ * Initialize the V2 version of FlexApi
20
+ *
21
+ * @constructor Twilio.FlexApi.V2
22
+ *
23
+ * @property {Twilio.FlexApi.V2.WebChannelsList} webChannels - webChannels resource
24
+ *
25
+ * @param {Twilio.FlexApi} domain - The twilio domain
26
+ */
27
+ /* jshint ignore:end */
28
+ function V2(domain) {
29
+ Version.prototype.constructor.call(this, domain, 'v2');
30
+
31
+ // Resources
32
+ this._webChannels = undefined;
33
+ }
34
+
35
+ _.extend(V2.prototype, Version.prototype);
36
+ V2.prototype.constructor = V2;
37
+
38
+ Object.defineProperty(V2.prototype,
39
+ 'webChannels', {
40
+ get: function() {
41
+ this._webChannels = this._webChannels || new WebChannelsList(this);
42
+ return this._webChannels;
43
+ }
44
+ });
45
+
46
+ module.exports = V2;
@@ -0,0 +1,113 @@
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 AssessmentsList
15
+ *
16
+ * @param version - Version of the resource
17
+ */
18
+ declare function AssessmentsList(version: V1): AssessmentsListInstance;
19
+
20
+ interface AssessmentsListInstance {
21
+ /**
22
+ * @param sid - sid of instance
23
+ */
24
+ (sid: string): AssessmentsContext;
25
+ /**
26
+ * Constructs a assessments
27
+ */
28
+ get(): AssessmentsContext;
29
+ /**
30
+ * Provide a user-friendly representation
31
+ */
32
+ toJSON(): any;
33
+ }
34
+
35
+ interface AssessmentsPayload extends AssessmentsResource, Page.TwilioResponsePayload {
36
+ }
37
+
38
+ interface AssessmentsResource {
39
+ url: string;
40
+ }
41
+
42
+ interface AssessmentsSolution {
43
+ }
44
+
45
+
46
+ declare class AssessmentsContext {
47
+ /**
48
+ * Initialize the AssessmentsContext
49
+ *
50
+ * @param version - Version of the resource
51
+ */
52
+ constructor(version: V1);
53
+
54
+ /**
55
+ * create a AssessmentsInstance
56
+ *
57
+ * @param callback - Callback to handle processed record
58
+ */
59
+ create(callback?: (error: Error | null, item: AssessmentsInstance) => any): Promise<AssessmentsInstance>;
60
+ /**
61
+ * Provide a user-friendly representation
62
+ */
63
+ toJSON(): any;
64
+ }
65
+
66
+
67
+ declare class AssessmentsInstance extends SerializableClass {
68
+ /**
69
+ * Initialize the AssessmentsContext
70
+ *
71
+ * @param version - Version of the resource
72
+ * @param payload - The instance payload
73
+ */
74
+ constructor(version: V1, payload: AssessmentsPayload);
75
+
76
+ private _proxy: AssessmentsContext;
77
+ /**
78
+ * create a AssessmentsInstance
79
+ *
80
+ * @param callback - Callback to handle processed record
81
+ */
82
+ create(callback?: (error: Error | null, items: AssessmentsInstance) => any): Promise<AssessmentsInstance>;
83
+ /**
84
+ * Provide a user-friendly representation
85
+ */
86
+ toJSON(): any;
87
+ url: string;
88
+ }
89
+
90
+
91
+ declare class AssessmentsPage extends Page<V1, AssessmentsPayload, AssessmentsResource, AssessmentsInstance> {
92
+ /**
93
+ * Initialize the AssessmentsPage
94
+ *
95
+ * @param version - Version of the resource
96
+ * @param response - Response from the API
97
+ * @param solution - Path solution
98
+ */
99
+ constructor(version: V1, response: Response<string>, solution: AssessmentsSolution);
100
+
101
+ /**
102
+ * Build an instance of AssessmentsInstance
103
+ *
104
+ * @param payload - Payload response from the API
105
+ */
106
+ getInstance(payload: AssessmentsPayload): AssessmentsInstance;
107
+ /**
108
+ * Provide a user-friendly representation
109
+ */
110
+ toJSON(): any;
111
+ }
112
+
113
+ export { AssessmentsContext, AssessmentsInstance, AssessmentsList, AssessmentsListInstance, AssessmentsPage, AssessmentsPayload, AssessmentsResource, AssessmentsSolution }