twilio 3.24.0 → 3.25.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 (34) hide show
  1. package/CHANGES.md +22 -0
  2. package/lib/rest/Authy.js +5 -5
  3. package/lib/rest/Preview.d.ts +0 -2
  4. package/lib/rest/Preview.js +12 -23
  5. package/lib/rest/Video.js +8 -8
  6. package/lib/rest/api/v2010/account/message.d.ts +2 -0
  7. package/lib/rest/api/v2010/account/message.js +4 -1
  8. package/lib/rest/api/v2010/account/sip/ipAccessControlList.d.ts +3 -3
  9. package/lib/rest/api/v2010/account/sip/ipAccessControlList.js +3 -3
  10. package/lib/rest/authy/V1.d.ts +1 -1
  11. package/lib/rest/authy/V1.js +8 -8
  12. package/lib/rest/authy/v1/form.d.ts +13 -13
  13. package/lib/rest/authy/v1/form.js +17 -17
  14. package/lib/rest/authy/v1/service/entity/factor/challenge.d.ts +12 -13
  15. package/lib/rest/authy/v1/service/entity/factor/challenge.js +4 -6
  16. package/lib/rest/authy/v1/service/entity/factor.d.ts +9 -9
  17. package/lib/rest/authy/v1/service/entity/factor.js +7 -9
  18. package/lib/rest/chat/v2/service/channel/member.d.ts +7 -0
  19. package/lib/rest/chat/v2/service/channel/member.js +13 -2
  20. package/lib/rest/ipMessaging/v2/service/channel/member.d.ts +7 -0
  21. package/lib/rest/ipMessaging/v2/service/channel/member.js +13 -2
  22. package/lib/rest/preview/Marketplace.d.ts +1 -1
  23. package/lib/rest/preview/Marketplace.js +9 -9
  24. package/lib/rest/verify/v1/service/verification.d.ts +2 -0
  25. package/lib/rest/verify/v1/service/verification.js +3 -1
  26. package/lib/rest/video/V1.d.ts +1 -1
  27. package/lib/rest/video/V1.js +10 -10
  28. package/package.json +1 -1
  29. package/lib/rest/preview/Authy.d.ts +0 -27
  30. package/lib/rest/preview/Authy.js +0 -44
  31. package/lib/rest/preview/authy/service/entity.d.ts +0 -250
  32. package/lib/rest/preview/authy/service/entity.js +0 -514
  33. package/lib/rest/preview/authy/service.d.ts +0 -275
  34. package/lib/rest/preview/authy/service.js +0 -578
@@ -12,7 +12,9 @@ import { ChallengeList } from './factor/challenge';
12
12
  import { ChallengeListInstance } from './factor/challenge';
13
13
  import { SerializableClass } from '../../../../../interfaces';
14
14
 
15
- type FactorFactorStatus = 'unverified'|'verified';
15
+ type FactorFactorStatuses = 'unverified'|'verified';
16
+
17
+ type FactorFactorTypes = 'app-push'|'sms'|'totp';
16
18
 
17
19
  /**
18
20
  * @description Initialize the FactorList
@@ -100,15 +102,13 @@ interface FactorListInstance {
100
102
  * Options to pass to create
101
103
  *
102
104
  * @property binding - A unique binding for this Factor
103
- * @property config - Factor configuration
104
- * @property factorType - The Type of this Factor
105
105
  * @property friendlyName - The friendly name of this Factor
106
+ * @property type - The Type of this Factor
106
107
  */
107
108
  interface FactorListInstanceCreateOptions {
108
109
  binding: string;
109
- config?: string;
110
- factorType: string;
111
110
  friendlyName: string;
111
+ type: FactorFactorTypes;
112
112
  }
113
113
 
114
114
  /**
@@ -181,8 +181,8 @@ interface FactorResource {
181
181
  links: string;
182
182
  service_sid: string;
183
183
  sid: string;
184
- status: FactorFactorStatus;
185
- type: string;
184
+ status: FactorFactorStatuses;
185
+ type: FactorFactorTypes;
186
186
  url: string;
187
187
  }
188
188
 
@@ -279,13 +279,13 @@ declare class FactorInstance extends SerializableClass {
279
279
  remove(callback?: (error: Error | null, items: FactorInstance) => any): void;
280
280
  serviceSid: string;
281
281
  sid: string;
282
- status: FactorFactorStatus;
282
+ status: FactorFactorStatuses;
283
283
  /**
284
284
  * Produce a plain JSON object version of the FactorInstance for serialization.
285
285
  * Removes any circular references in the object.
286
286
  */
287
287
  toJSON(): any;
288
- type: string;
288
+ type: FactorFactorTypes;
289
289
  /**
290
290
  * update a FactorInstance
291
291
  *
@@ -56,9 +56,8 @@ FactorList = function FactorList(version, serviceSid, identity) {
56
56
  *
57
57
  * @param {object} opts - Options for request
58
58
  * @param {string} opts.binding - A unique binding for this Factor
59
- * @param {string} opts.factorType - The Type of this Factor
60
59
  * @param {string} opts.friendlyName - The friendly name of this Factor
61
- * @param {string} [opts.config] - Factor configuration
60
+ * @param {factor.factor_types} opts.type - The Type of this Factor
62
61
  * @param {function} [callback] - Callback to handle processed record
63
62
  *
64
63
  * @returns {Promise} Resolves to processed FactorInstance
@@ -71,19 +70,18 @@ FactorList = function FactorList(version, serviceSid, identity) {
71
70
  if (_.isUndefined(opts.binding)) {
72
71
  throw new Error('Required parameter "opts.binding" missing.');
73
72
  }
74
- if (_.isUndefined(opts.factorType)) {
75
- throw new Error('Required parameter "opts.factorType" missing.');
76
- }
77
73
  if (_.isUndefined(opts.friendlyName)) {
78
74
  throw new Error('Required parameter "opts.friendlyName" missing.');
79
75
  }
76
+ if (_.isUndefined(opts.type)) {
77
+ throw new Error('Required parameter "opts.type" missing.');
78
+ }
80
79
 
81
80
  var deferred = Q.defer();
82
81
  var data = values.of({
83
82
  'Binding': _.get(opts, 'binding'),
84
- 'FactorType': _.get(opts, 'factorType'),
85
83
  'FriendlyName': _.get(opts, 'friendlyName'),
86
- 'Config': _.get(opts, 'config')
84
+ 'Type': _.get(opts, 'type')
87
85
  });
88
86
 
89
87
  var promise = this._version.create({uri: this._uri, method: 'POST', data: data});
@@ -403,8 +401,8 @@ FactorPage.prototype.getInstance = function getInstance(payload) {
403
401
  * @property {Date} dateCreated - The date this Factor was created
404
402
  * @property {Date} dateUpdated - The date this Factor was updated
405
403
  * @property {string} friendlyName - A human readable description of this resource.
406
- * @property {factor.factor_status} status - The Status of this Factor
407
- * @property {string} type - The Type of this Factor
404
+ * @property {factor.factor_statuses} status - The Status of this Factor
405
+ * @property {factor.factor_types} type - The Type of this Factor
408
406
  * @property {string} url - The URL of this resource.
409
407
  * @property {string} links - Nested resource URLs.
410
408
  *
@@ -25,6 +25,7 @@ declare function MemberList(version: V2, serviceSid: string, channelSid: string)
25
25
  /**
26
26
  * Options to pass to update
27
27
  *
28
+ * @property attributes - An optional string metadata field you can use to store any data you wish.
28
29
  * @property dateCreated - The ISO8601 time specifying the datetime the Members should be set as being created.
29
30
  * @property dateUpdated - The ISO8601 time specifying the datetime the Member should be set as having been last updated.
30
31
  * @property lastConsumedMessageIndex - Field used to specify the last consumed Message index for the Channel for this Member.
@@ -32,6 +33,7 @@ declare function MemberList(version: V2, serviceSid: string, channelSid: string)
32
33
  * @property roleSid - The role to be assigned to this member.
33
34
  */
34
35
  interface MemberInstanceUpdateOptions {
36
+ attributes?: string;
35
37
  dateCreated?: Date;
36
38
  dateUpdated?: Date;
37
39
  lastConsumedMessageIndex?: number;
@@ -105,6 +107,7 @@ interface MemberListInstance {
105
107
  /**
106
108
  * Options to pass to create
107
109
  *
110
+ * @property attributes - An optional string metadata field you can use to store any data you wish.
108
111
  * @property dateCreated - The ISO8601 time specifying the datetime the Members should be set as being created. Will be set to the current time by the Chat service if not specified. Note that this should only be used in cases where a Member is being recreated from a backup/separate source
109
112
  * @property dateUpdated - The ISO8601 time specifying the datetime the Member should be set as having been last updated. Will be set to the null by the Chat service if not specified. Note that this should only be used in cases where a Member is being recreated from a backup/separate source and where a Member was previously updated.
110
113
  * @property identity - A unique string identifier for this User in this Service. See the access tokens docs for more details.
@@ -113,6 +116,7 @@ interface MemberListInstance {
113
116
  * @property roleSid - The role to be assigned to this member. Defaults to the roles specified on the Service.
114
117
  */
115
118
  interface MemberListInstanceCreateOptions {
119
+ attributes?: string;
116
120
  dateCreated?: Date;
117
121
  dateUpdated?: Date;
118
122
  identity: string;
@@ -189,6 +193,7 @@ interface MemberPayload extends MemberResource, Page.TwilioResponsePayload {
189
193
 
190
194
  interface MemberResource {
191
195
  account_sid: string;
196
+ attributes: string;
192
197
  channel_sid: string;
193
198
  date_created: Date;
194
199
  date_updated: Date;
@@ -255,6 +260,7 @@ declare class MemberInstance extends SerializableClass {
255
260
  * @property lastConsumedMessageIndex - An Integer representing index of the last Message this Member has read within this Channel
256
261
  * @property lastConsumptionTimestamp - An ISO8601 based timestamp string representing the datetime of the last Message read event for this Member within this Channel
257
262
  * @property url - An absolute URL for this member.
263
+ * @property attributes - An optional string metadata field you can use to store any data you wish.
258
264
  *
259
265
  * @param version - Version of the resource
260
266
  * @param payload - The instance payload
@@ -266,6 +272,7 @@ declare class MemberInstance extends SerializableClass {
266
272
 
267
273
  private _proxy: MemberContext;
268
274
  accountSid: string;
275
+ attributes: string;
269
276
  channelSid: string;
270
277
  dateCreated: Date;
271
278
  dateUpdated: Date;
@@ -68,6 +68,8 @@ MemberList = function MemberList(version, serviceSid, channelSid) {
68
68
  * The ISO8601 time specifying the datetime the Members should be set as being created. Will be set to the current time by the Chat service if not specified. Note that this should only be used in cases where a Member is being recreated from a backup/separate source
69
69
  * @param {Date} [opts.dateUpdated] -
70
70
  * The ISO8601 time specifying the datetime the Member should be set as having been last updated. Will be set to the null by the Chat service if not specified. Note that this should only be used in cases where a Member is being recreated from a backup/separate source and where a Member was previously updated.
71
+ * @param {string} [opts.attributes] -
72
+ * An optional string metadata field you can use to store any data you wish.
71
73
  * @param {function} [callback] - Callback to handle processed record
72
74
  *
73
75
  * @returns {Promise} Resolves to processed MemberInstance
@@ -88,7 +90,8 @@ MemberList = function MemberList(version, serviceSid, channelSid) {
88
90
  'LastConsumedMessageIndex': _.get(opts, 'lastConsumedMessageIndex'),
89
91
  'LastConsumptionTimestamp': serialize.iso8601DateTime(_.get(opts, 'lastConsumptionTimestamp')),
90
92
  'DateCreated': serialize.iso8601DateTime(_.get(opts, 'dateCreated')),
91
- 'DateUpdated': serialize.iso8601DateTime(_.get(opts, 'dateUpdated'))
93
+ 'DateUpdated': serialize.iso8601DateTime(_.get(opts, 'dateUpdated')),
94
+ 'Attributes': _.get(opts, 'attributes')
92
95
  });
93
96
 
94
97
  var promise = this._version.create({uri: this._uri, method: 'POST', data: data});
@@ -424,6 +427,8 @@ MemberPage.prototype.getInstance = function getInstance(payload) {
424
427
  * @property {Date} lastConsumptionTimestamp -
425
428
  * An ISO8601 based timestamp string representing the datetime of the last Message read event for this Member within this Channel
426
429
  * @property {string} url - An absolute URL for this member.
430
+ * @property {string} attributes -
431
+ * An optional string metadata field you can use to store any data you wish.
427
432
  *
428
433
  * @param {V2} version - Version of the resource
429
434
  * @param {MemberPayload} payload - The instance payload
@@ -448,6 +453,7 @@ MemberInstance = function MemberInstance(version, payload, serviceSid,
448
453
  this.lastConsumedMessageIndex = deserialize.integer(payload.last_consumed_message_index); // jshint ignore:line
449
454
  this.lastConsumptionTimestamp = deserialize.iso8601DateTime(payload.last_consumption_timestamp); // jshint ignore:line
450
455
  this.url = payload.url; // jshint ignore:line
456
+ this.attributes = payload.attributes; // jshint ignore:line
451
457
 
452
458
  // Context
453
459
  this._context = undefined;
@@ -510,6 +516,8 @@ MemberInstance.prototype.remove = function remove(callback) {
510
516
  * The ISO8601 time specifying the datetime the Members should be set as being created.
511
517
  * @param {Date} [opts.dateUpdated] -
512
518
  * The ISO8601 time specifying the datetime the Member should be set as having been last updated.
519
+ * @param {string} [opts.attributes] -
520
+ * An optional string metadata field you can use to store any data you wish.
513
521
  * @param {function} [callback] - Callback to handle processed record
514
522
  *
515
523
  * @returns {Promise} Resolves to processed MemberInstance
@@ -635,6 +643,8 @@ MemberContext.prototype.remove = function remove(callback) {
635
643
  * The ISO8601 time specifying the datetime the Members should be set as being created.
636
644
  * @param {Date} [opts.dateUpdated] -
637
645
  * The ISO8601 time specifying the datetime the Member should be set as having been last updated.
646
+ * @param {string} [opts.attributes] -
647
+ * An optional string metadata field you can use to store any data you wish.
638
648
  * @param {function} [callback] - Callback to handle processed record
639
649
  *
640
650
  * @returns {Promise} Resolves to processed MemberInstance
@@ -653,7 +663,8 @@ MemberContext.prototype.update = function update(opts, callback) {
653
663
  'LastConsumedMessageIndex': _.get(opts, 'lastConsumedMessageIndex'),
654
664
  'LastConsumptionTimestamp': serialize.iso8601DateTime(_.get(opts, 'lastConsumptionTimestamp')),
655
665
  'DateCreated': serialize.iso8601DateTime(_.get(opts, 'dateCreated')),
656
- 'DateUpdated': serialize.iso8601DateTime(_.get(opts, 'dateUpdated'))
666
+ 'DateUpdated': serialize.iso8601DateTime(_.get(opts, 'dateUpdated')),
667
+ 'Attributes': _.get(opts, 'attributes')
657
668
  });
658
669
 
659
670
  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});
@@ -25,6 +25,7 @@ declare function MemberList(version: V2, serviceSid: string, channelSid: string)
25
25
  /**
26
26
  * Options to pass to update
27
27
  *
28
+ * @property attributes - An optional string metadata field you can use to store any data you wish.
28
29
  * @property dateCreated - The ISO8601 time specifying the datetime the Members should be set as being created.
29
30
  * @property dateUpdated - The ISO8601 time specifying the datetime the Member should be set as having been last updated.
30
31
  * @property lastConsumedMessageIndex - Field used to specify the last consumed Message index for the Channel for this Member.
@@ -32,6 +33,7 @@ declare function MemberList(version: V2, serviceSid: string, channelSid: string)
32
33
  * @property roleSid - The role to be assigned to this member.
33
34
  */
34
35
  interface MemberInstanceUpdateOptions {
36
+ attributes?: string;
35
37
  dateCreated?: Date;
36
38
  dateUpdated?: Date;
37
39
  lastConsumedMessageIndex?: number;
@@ -105,6 +107,7 @@ interface MemberListInstance {
105
107
  /**
106
108
  * Options to pass to create
107
109
  *
110
+ * @property attributes - An optional string metadata field you can use to store any data you wish.
108
111
  * @property dateCreated - The ISO8601 time specifying the datetime the Members should be set as being created. Will be set to the current time by the Chat service if not specified. Note that this should only be used in cases where a Member is being recreated from a backup/separate source
109
112
  * @property dateUpdated - The ISO8601 time specifying the datetime the Member should be set as having been last updated. Will be set to the null by the Chat service if not specified. Note that this should only be used in cases where a Member is being recreated from a backup/separate source and where a Member was previously updated.
110
113
  * @property identity - A unique string identifier for this User in this Service. See the access tokens docs for more details.
@@ -113,6 +116,7 @@ interface MemberListInstance {
113
116
  * @property roleSid - The role to be assigned to this member. Defaults to the roles specified on the Service.
114
117
  */
115
118
  interface MemberListInstanceCreateOptions {
119
+ attributes?: string;
116
120
  dateCreated?: Date;
117
121
  dateUpdated?: Date;
118
122
  identity: string;
@@ -189,6 +193,7 @@ interface MemberPayload extends MemberResource, Page.TwilioResponsePayload {
189
193
 
190
194
  interface MemberResource {
191
195
  account_sid: string;
196
+ attributes: string;
192
197
  channel_sid: string;
193
198
  date_created: Date;
194
199
  date_updated: Date;
@@ -255,6 +260,7 @@ declare class MemberInstance extends SerializableClass {
255
260
  * @property lastConsumedMessageIndex - An Integer representing index of the last Message this Member has read within this Channel
256
261
  * @property lastConsumptionTimestamp - An ISO8601 based timestamp string representing the datetime of the last Message read event for this Member within this Channel
257
262
  * @property url - An absolute URL for this member.
263
+ * @property attributes - An optional string metadata field you can use to store any data you wish.
258
264
  *
259
265
  * @param version - Version of the resource
260
266
  * @param payload - The instance payload
@@ -266,6 +272,7 @@ declare class MemberInstance extends SerializableClass {
266
272
 
267
273
  private _proxy: MemberContext;
268
274
  accountSid: string;
275
+ attributes: string;
269
276
  channelSid: string;
270
277
  dateCreated: Date;
271
278
  dateUpdated: Date;
@@ -68,6 +68,8 @@ MemberList = function MemberList(version, serviceSid, channelSid) {
68
68
  * The ISO8601 time specifying the datetime the Members should be set as being created. Will be set to the current time by the Chat service if not specified. Note that this should only be used in cases where a Member is being recreated from a backup/separate source
69
69
  * @param {Date} [opts.dateUpdated] -
70
70
  * The ISO8601 time specifying the datetime the Member should be set as having been last updated. Will be set to the null by the Chat service if not specified. Note that this should only be used in cases where a Member is being recreated from a backup/separate source and where a Member was previously updated.
71
+ * @param {string} [opts.attributes] -
72
+ * An optional string metadata field you can use to store any data you wish.
71
73
  * @param {function} [callback] - Callback to handle processed record
72
74
  *
73
75
  * @returns {Promise} Resolves to processed MemberInstance
@@ -88,7 +90,8 @@ MemberList = function MemberList(version, serviceSid, channelSid) {
88
90
  'LastConsumedMessageIndex': _.get(opts, 'lastConsumedMessageIndex'),
89
91
  'LastConsumptionTimestamp': serialize.iso8601DateTime(_.get(opts, 'lastConsumptionTimestamp')),
90
92
  'DateCreated': serialize.iso8601DateTime(_.get(opts, 'dateCreated')),
91
- 'DateUpdated': serialize.iso8601DateTime(_.get(opts, 'dateUpdated'))
93
+ 'DateUpdated': serialize.iso8601DateTime(_.get(opts, 'dateUpdated')),
94
+ 'Attributes': _.get(opts, 'attributes')
92
95
  });
93
96
 
94
97
  var promise = this._version.create({uri: this._uri, method: 'POST', data: data});
@@ -424,6 +427,8 @@ MemberPage.prototype.getInstance = function getInstance(payload) {
424
427
  * @property {Date} lastConsumptionTimestamp -
425
428
  * An ISO8601 based timestamp string representing the datetime of the last Message read event for this Member within this Channel
426
429
  * @property {string} url - An absolute URL for this member.
430
+ * @property {string} attributes -
431
+ * An optional string metadata field you can use to store any data you wish.
427
432
  *
428
433
  * @param {V2} version - Version of the resource
429
434
  * @param {MemberPayload} payload - The instance payload
@@ -448,6 +453,7 @@ MemberInstance = function MemberInstance(version, payload, serviceSid,
448
453
  this.lastConsumedMessageIndex = deserialize.integer(payload.last_consumed_message_index); // jshint ignore:line
449
454
  this.lastConsumptionTimestamp = deserialize.iso8601DateTime(payload.last_consumption_timestamp); // jshint ignore:line
450
455
  this.url = payload.url; // jshint ignore:line
456
+ this.attributes = payload.attributes; // jshint ignore:line
451
457
 
452
458
  // Context
453
459
  this._context = undefined;
@@ -510,6 +516,8 @@ MemberInstance.prototype.remove = function remove(callback) {
510
516
  * The ISO8601 time specifying the datetime the Members should be set as being created.
511
517
  * @param {Date} [opts.dateUpdated] -
512
518
  * The ISO8601 time specifying the datetime the Member should be set as having been last updated.
519
+ * @param {string} [opts.attributes] -
520
+ * An optional string metadata field you can use to store any data you wish.
513
521
  * @param {function} [callback] - Callback to handle processed record
514
522
  *
515
523
  * @returns {Promise} Resolves to processed MemberInstance
@@ -635,6 +643,8 @@ MemberContext.prototype.remove = function remove(callback) {
635
643
  * The ISO8601 time specifying the datetime the Members should be set as being created.
636
644
  * @param {Date} [opts.dateUpdated] -
637
645
  * The ISO8601 time specifying the datetime the Member should be set as having been last updated.
646
+ * @param {string} [opts.attributes] -
647
+ * An optional string metadata field you can use to store any data you wish.
638
648
  * @param {function} [callback] - Callback to handle processed record
639
649
  *
640
650
  * @returns {Promise} Resolves to processed MemberInstance
@@ -653,7 +663,8 @@ MemberContext.prototype.update = function update(opts, callback) {
653
663
  'LastConsumedMessageIndex': _.get(opts, 'lastConsumedMessageIndex'),
654
664
  'LastConsumptionTimestamp': serialize.iso8601DateTime(_.get(opts, 'lastConsumptionTimestamp')),
655
665
  'DateCreated': serialize.iso8601DateTime(_.get(opts, 'dateCreated')),
656
- 'DateUpdated': serialize.iso8601DateTime(_.get(opts, 'dateUpdated'))
666
+ 'DateUpdated': serialize.iso8601DateTime(_.get(opts, 'dateUpdated')),
667
+ 'Attributes': _.get(opts, 'attributes')
657
668
  });
658
669
 
659
670
  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});
@@ -17,8 +17,8 @@ declare class Marketplace extends Version {
17
17
  /**
18
18
  * Initialize the Marketplace version of Preview
19
19
  *
20
- * @property installedAddOns - installedAddOns resource
21
20
  * @property availableAddOns - availableAddOns resource
21
+ * @property installedAddOns - installedAddOns resource
22
22
  *
23
23
  * @param domain - The twilio domain
24
24
  */
@@ -21,10 +21,10 @@ var Version = require('../../base/Version'); /* jshint ignore:line */
21
21
  /**
22
22
  * Initialize the Marketplace version of Preview
23
23
  *
24
- * @property {Twilio.Preview.Marketplace.InstalledAddOnList} installedAddOns -
25
- * installedAddOns resource
26
24
  * @property {Twilio.Preview.Marketplace.AvailableAddOnList} availableAddOns -
27
25
  * availableAddOns resource
26
+ * @property {Twilio.Preview.Marketplace.InstalledAddOnList} installedAddOns -
27
+ * installedAddOns resource
28
28
  *
29
29
  * @param {Twilio.Preview} domain - The twilio domain
30
30
  */
@@ -33,26 +33,26 @@ function Marketplace(domain) {
33
33
  Version.prototype.constructor.call(this, domain, 'marketplace');
34
34
 
35
35
  // Resources
36
- this._installedAddOns = undefined;
37
36
  this._availableAddOns = undefined;
37
+ this._installedAddOns = undefined;
38
38
  }
39
39
 
40
40
  _.extend(Marketplace.prototype, Version.prototype);
41
41
  Marketplace.prototype.constructor = Marketplace;
42
42
 
43
43
  Object.defineProperty(Marketplace.prototype,
44
- 'installedAddOns', {
44
+ 'availableAddOns', {
45
45
  get: function() {
46
- this._installedAddOns = this._installedAddOns || new InstalledAddOnList(this);
47
- return this._installedAddOns;
46
+ this._availableAddOns = this._availableAddOns || new AvailableAddOnList(this);
47
+ return this._availableAddOns;
48
48
  }
49
49
  });
50
50
 
51
51
  Object.defineProperty(Marketplace.prototype,
52
- 'availableAddOns', {
52
+ 'installedAddOns', {
53
53
  get: function() {
54
- this._availableAddOns = this._availableAddOns || new AvailableAddOnList(this);
55
- return this._availableAddOns;
54
+ this._installedAddOns = this._installedAddOns || new InstalledAddOnList(this);
55
+ return this._installedAddOns;
56
56
  }
57
57
  });
58
58
 
@@ -35,6 +35,7 @@ interface VerificationListInstance {
35
35
  * Options to pass to create
36
36
  *
37
37
  * @property channel - sms or call
38
+ * @property customCode - A pre-generated code
38
39
  * @property customMessage - A custom message for this verification
39
40
  * @property locale - Locale used in the sms or call.
40
41
  * @property sendDigits - Digits to send when a phone call is started
@@ -42,6 +43,7 @@ interface VerificationListInstance {
42
43
  */
43
44
  interface VerificationListInstanceCreateOptions {
44
45
  channel: string;
46
+ customCode?: string;
45
47
  customMessage?: string;
46
48
  locale?: string;
47
49
  sendDigits?: string;
@@ -57,6 +57,7 @@ VerificationList = function VerificationList(version, serviceSid) {
57
57
  * @param {string} [opts.customMessage] - A custom message for this verification
58
58
  * @param {string} [opts.sendDigits] - Digits to send when a phone call is started
59
59
  * @param {string} [opts.locale] - Locale used in the sms or call.
60
+ * @param {string} [opts.customCode] - A pre-generated code
60
61
  * @param {function} [callback] - Callback to handle processed record
61
62
  *
62
63
  * @returns {Promise} Resolves to processed VerificationInstance
@@ -79,7 +80,8 @@ VerificationList = function VerificationList(version, serviceSid) {
79
80
  'Channel': _.get(opts, 'channel'),
80
81
  'CustomMessage': _.get(opts, 'customMessage'),
81
82
  'SendDigits': _.get(opts, 'sendDigits'),
82
- 'Locale': _.get(opts, 'locale')
83
+ 'Locale': _.get(opts, 'locale'),
84
+ 'CustomCode': _.get(opts, 'customCode')
83
85
  });
84
86
 
85
87
  var promise = this._version.create({uri: this._uri, method: 'POST', data: data});
@@ -25,11 +25,11 @@ declare class V1 extends Version {
25
25
  /**
26
26
  * Initialize the V1 version of Video
27
27
  *
28
+ * @property compositions - compositions resource
28
29
  * @property compositionHooks - compositionHooks resource
29
30
  * @property compositionSettings - compositionSettings resource
30
31
  * @property recordings - recordings resource
31
32
  * @property recordingSettings - recordingSettings resource
32
- * @property compositions - compositions resource
33
33
  * @property rooms - rooms resource
34
34
  *
35
35
  * @param domain - The twilio domain
@@ -25,6 +25,7 @@ var Version = require('../../base/Version'); /* jshint ignore:line */
25
25
  /**
26
26
  * Initialize the V1 version of Video
27
27
  *
28
+ * @property {Twilio.Video.V1.CompositionList} compositions - compositions resource
28
29
  * @property {Twilio.Video.V1.CompositionHookList} compositionHooks -
29
30
  * compositionHooks resource
30
31
  * @property {Twilio.Video.V1.CompositionSettingsList} compositionSettings -
@@ -32,7 +33,6 @@ var Version = require('../../base/Version'); /* jshint ignore:line */
32
33
  * @property {Twilio.Video.V1.RecordingList} recordings - recordings resource
33
34
  * @property {Twilio.Video.V1.RecordingSettingsList} recordingSettings -
34
35
  * recordingSettings resource
35
- * @property {Twilio.Video.V1.CompositionList} compositions - compositions resource
36
36
  * @property {Twilio.Video.V1.RoomList} rooms - rooms resource
37
37
  *
38
38
  * @param {Twilio.Video} domain - The twilio domain
@@ -42,17 +42,25 @@ function V1(domain) {
42
42
  Version.prototype.constructor.call(this, domain, 'v1');
43
43
 
44
44
  // Resources
45
+ this._compositions = undefined;
45
46
  this._compositionHooks = undefined;
46
47
  this._compositionSettings = undefined;
47
48
  this._recordings = undefined;
48
49
  this._recordingSettings = undefined;
49
- this._compositions = undefined;
50
50
  this._rooms = undefined;
51
51
  }
52
52
 
53
53
  _.extend(V1.prototype, Version.prototype);
54
54
  V1.prototype.constructor = V1;
55
55
 
56
+ Object.defineProperty(V1.prototype,
57
+ 'compositions', {
58
+ get: function() {
59
+ this._compositions = this._compositions || new CompositionList(this);
60
+ return this._compositions;
61
+ }
62
+ });
63
+
56
64
  Object.defineProperty(V1.prototype,
57
65
  'compositionHooks', {
58
66
  get: function() {
@@ -85,14 +93,6 @@ Object.defineProperty(V1.prototype,
85
93
  }
86
94
  });
87
95
 
88
- Object.defineProperty(V1.prototype,
89
- 'compositions', {
90
- get: function() {
91
- this._compositions = this._compositions || new CompositionList(this);
92
- return this._compositions;
93
- }
94
- });
95
-
96
96
  Object.defineProperty(V1.prototype,
97
97
  'rooms', {
98
98
  get: function() {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "twilio",
3
3
  "description": "A Twilio helper library",
4
- "version": "3.24.0",
4
+ "version": "3.25.0",
5
5
  "author": "API Team <api@twilio.com>",
6
6
  "contributors": [
7
7
  {
@@ -1,27 +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 { ServiceList } from './authy/service';
11
- import { ServiceListInstance } from './authy/service';
12
-
13
-
14
- declare class Authy extends Version {
15
- /**
16
- * Initialize the Authy version of Preview
17
- *
18
- * @property services - services resource
19
- *
20
- * @param domain - The twilio domain
21
- */
22
- constructor(domain: Preview);
23
-
24
- readonly services: ServiceListInstance;
25
- }
26
-
27
- export = Authy;
@@ -1,44 +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 ServiceList = require('./authy/service').ServiceList;
14
- var Version = require('../../base/Version'); /* jshint ignore:line */
15
-
16
-
17
- /* jshint ignore:start */
18
- /**
19
- * Initialize the Authy version of Preview
20
- *
21
- * @property {Twilio.Preview.Authy.ServiceList} services - services resource
22
- *
23
- * @param {Twilio.Preview} domain - The twilio domain
24
- */
25
- /* jshint ignore:end */
26
- function Authy(domain) {
27
- Version.prototype.constructor.call(this, domain, 'Authy');
28
-
29
- // Resources
30
- this._services = undefined;
31
- }
32
-
33
- _.extend(Authy.prototype, Version.prototype);
34
- Authy.prototype.constructor = Authy;
35
-
36
- Object.defineProperty(Authy.prototype,
37
- 'services', {
38
- get: function() {
39
- this._services = this._services || new ServiceList(this);
40
- return this._services;
41
- }
42
- });
43
-
44
- module.exports = Authy;