Skip to content

Commit

Permalink
[Librarian] Regenerated @ 1a532562bf3ce874c001a38784d8e0cf34f80aea
Browse files Browse the repository at this point in the history
  • Loading branch information
twilio-ci committed Jul 11, 2018
1 parent 6a6733a commit a3d2725
Show file tree
Hide file tree
Showing 26 changed files with 2,678 additions and 109 deletions.
15 changes: 15 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
twilio-node changelog
=====================

[2018-07-11] Version 3.17.6
----------------------------
**Library**
- PR #362: Remove old Precise env and sudo flag on TravisCI. Thanks to @jonatasbaldin!

**Api**
- Add `cidr_prefix_length` param to SIP IpAddresses API

**Studio**
- Add new /Execution endpoints to begin Engagement -> Execution migration

**Video**
- [Rooms] Allow deletion of individual recordings from a room


[2018-07-05] Version 3.17.5
----------------------------
**Library**
Expand Down
12 changes: 6 additions & 6 deletions lib/rest/Preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ var Wireless = require('./preview/Wireless'); /* jshint ignore:line */
* authorizationDocuments resource
* @property {Twilio.Preview.HostedNumbers.HostedNumberOrderList} hostedNumberOrders -
* hostedNumberOrders resource
* @property {Twilio.Preview.Marketplace.InstalledAddOnList} installedAddOns -
* installedAddOns resource
* @property {Twilio.Preview.Marketplace.AvailableAddOnList} availableAddOns -
* availableAddOns resource
* @property {Twilio.Preview.Marketplace.InstalledAddOnList} installedAddOns -
* installedAddOns resource
* @property {Twilio.Preview.Sync.ServiceList} services - services resource
* @property {Twilio.Preview.Studio.FlowList} flows - flows resource
* @property {Twilio.Preview.Understand.AssistantList} assistants -
Expand Down Expand Up @@ -200,16 +200,16 @@ Object.defineProperty(Preview.prototype,
});

Object.defineProperty(Preview.prototype,
'installedAddOns', {
'availableAddOns', {
get: function() {
return this.marketplace.installedAddOns;
return this.marketplace.availableAddOns;
}
});

Object.defineProperty(Preview.prototype,
'availableAddOns', {
'installedAddOns', {
get: function() {
return this.marketplace.availableAddOns;
return this.marketplace.installedAddOns;
}
});

Expand Down
9 changes: 4 additions & 5 deletions lib/rest/Twilio.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ var Wireless = require('./Wireless'); /* jshint ignore:line */
/**
* Twilio Client to interact with the Rest API
*
* @constructor Twilio
* @constructor
*
* @property {Twilio.Accounts} accounts - accounts domain
* @property {Twilio.Api} api - api domain
Expand Down Expand Up @@ -102,13 +102,12 @@ var Wireless = require('./Wireless'); /* jshint ignore:line */
* The username used for authentication. This is normally account sid, but if using key/secret auth will be the api key sid.
* @param {string} password -
* The password used for authentication. This is normally auth token, but if using key/secret auth will be the secret.
* @param {object} [opts] - ...
* @param {HttpClient} [opts.httpClient] -
* @param {object} [opts] - The options argument
* @param {RequestClient} [opts.httpClient] -
* The client used for http requests. Defaults to RequestClient
* @param {string} [opts.accountSid] -
* The default accountSid. This is set to username if not provided
* @param {Environment} [opts.env] -
* The environment object. Defaults to process.env
* @param {object} [opts.env] - The environment object. Defaults to process.env
* @param {string} [opts.region] - Twilio region to use. Defaults to none
*
* @returns {Twilio} A new instance of Twilio client
Expand Down
16 changes: 8 additions & 8 deletions lib/rest/Video.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ var V1 = require('./video/V1'); /* jshint ignore:line */
* @constructor Twilio.Video
*
* @property {Twilio.Video.V1} v1 - v1 version
* @property {Twilio.Video.V1.CompositionList} compositions - compositions resource
* @property {Twilio.Video.V1.CompositionSettingsList} compositionSettings -
* compositionSettings resource
* @property {Twilio.Video.V1.RecordingList} recordings - recordings resource
* @property {Twilio.Video.V1.RecordingSettingsList} recordingSettings -
* recordingSettings resource
* @property {Twilio.Video.V1.CompositionList} compositions - compositions resource
* @property {Twilio.Video.V1.RoomList} rooms - rooms resource
*
* @param {Twilio} twilio - The twilio client
Expand All @@ -50,6 +50,13 @@ Object.defineProperty(Video.prototype,
}
});

Object.defineProperty(Video.prototype,
'compositions', {
get: function() {
return this.v1.compositions;
}
});

Object.defineProperty(Video.prototype,
'compositionSettings', {
get: function() {
Expand All @@ -71,13 +78,6 @@ Object.defineProperty(Video.prototype,
}
});

Object.defineProperty(Video.prototype,
'compositions', {
get: function() {
return this.v1.compositions;
}
});

Object.defineProperty(Video.prototype,
'rooms', {
get: function() {
Expand Down
20 changes: 10 additions & 10 deletions lib/rest/api/v2010/account/recording.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ var RecordingContext;
* @description Initialize the RecordingList
*
* @param {Twilio.Api.V2010} version - Version of the resource
* @param {string} accountSid - The unique sid that identifies this account
* @param {string} accountSid - The unique SID that identifies this account
*/
/* jshint ignore:end */
RecordingList = function RecordingList(version, accountSid) {
Expand Down Expand Up @@ -324,7 +324,7 @@ RecordingList = function RecordingList(version, accountSid) {
* @memberof Twilio.Api.V2010.AccountContext.RecordingList
* @instance
*
* @param {string} sid - Fetch by unique recording Sid
* @param {string} sid - Fetch by unique recording SID
*
* @returns {Twilio.Api.V2010.AccountContext.RecordingContext}
*/
Expand Down Expand Up @@ -383,18 +383,18 @@ RecordingPage.prototype.getInstance = function getInstance(payload) {
* @constructor Twilio.Api.V2010.AccountContext.RecordingInstance
* @description Initialize the RecordingContext
*
* @property {string} accountSid - The unique sid that identifies this account
* @property {string} accountSid - The unique SID that identifies this account
* @property {string} apiVersion -
* The version of the API in use during the recording.
* @property {string} callSid -
* The unique id for the call leg that corresponds to the recording.
* The unique ID for the call leg that corresponds to the recording.
* @property {string} conferenceSid -
* The unique id for the conference associated with the recording, if a conference recording.
* The unique ID for the conference associated with the recording.
* @property {Date} dateCreated - The date this resource was created
* @property {Date} dateUpdated - The date this resource was last updated
* @property {Date} startTime -
* The start time of the recording, given in RFC 2822 format.
* @property {string} duration - The length of the recording, in seconds.
* The start time of the recording, in RFC 2822 format.
* @property {string} duration - The length of the recording in seconds.
* @property {string} sid - A string that uniquely identifies this recording
* @property {string} price - The one-time cost of creating this recording.
* @property {string} priceUnit - The currency used in the Price property.
Expand All @@ -411,8 +411,8 @@ RecordingPage.prototype.getInstance = function getInstance(payload) {
*
* @param {Twilio.Api.V2010} version - Version of the resource
* @param {object} payload - The instance payload
* @param {sid} accountSid - The unique sid that identifies this account
* @param {sid} sid - Fetch by unique recording Sid
* @param {sid} accountSid - The unique SID that identifies this account
* @param {sid} sid - Fetch by unique recording SID
*/
/* jshint ignore:end */
RecordingInstance = function RecordingInstance(version, payload, accountSid,
Expand Down Expand Up @@ -554,7 +554,7 @@ RecordingInstance.prototype.toJSON = function toJSON() {
*
* @param {Twilio.Api.V2010} version - Version of the resource
* @param {sid} accountSid - The account_sid
* @param {sid} sid - Fetch by unique recording Sid
* @param {sid} sid - Fetch by unique recording SID
*/
/* jshint ignore:end */
RecordingContext = function RecordingContext(version, accountSid, sid) {
Expand Down
12 changes: 10 additions & 2 deletions lib/rest/api/v2010/account/sip/ipAccessControlList/ipAddress.js
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,7 @@ IpAddressList = function IpAddressList(version, accountSid,
* @param {object} opts - ...
* @param {string} opts.friendlyName - The friendly_name
* @param {string} opts.ipAddress - The ip_address
* @param {number} [opts.cidrPrefixLength] - The cidr_prefix_length
* @param {function} [callback] - Callback to handle processed record
*
* @returns {Promise} Resolves to processed IpAddressInstance
Expand All @@ -329,7 +330,8 @@ IpAddressList = function IpAddressList(version, accountSid,
var deferred = Q.defer();
var data = values.of({
'FriendlyName': _.get(opts, 'friendlyName'),
'IpAddress': _.get(opts, 'ipAddress')
'IpAddress': _.get(opts, 'ipAddress'),
'CidrPrefixLength': _.get(opts, 'cidrPrefixLength')
});

var promise = this._version.create({uri: this._uri, method: 'POST', data: data});
Expand Down Expand Up @@ -440,6 +442,8 @@ IpAddressPage.prototype.getInstance = function getInstance(payload) {
* A human readable descriptive text for this resource, up to 64 characters long.
* @property {string} ipAddress -
* An IP address in dotted decimal notation from which you want to accept traffic. Any SIP requests from this IP address will be allowed by Twilio. IPv4 only supported today.
* @property {number} cidrPrefixLength -
* An integer representing the length of the CIDR prefix to use with this IP address when accepting traffic. By default the entire IP address is used.
* @property {string} ipAccessControlListSid - The ip_access_control_list_sid
* @property {Date} dateCreated -
* The date that this resource was created, given as GMT in RFC 2822 format.
Expand All @@ -465,6 +469,7 @@ IpAddressInstance = function IpAddressInstance(version, payload, accountSid,
this.accountSid = payload.account_sid; // jshint ignore:line
this.friendlyName = payload.friendly_name; // jshint ignore:line
this.ipAddress = payload.ip_address; // jshint ignore:line
this.cidrPrefixLength = deserialize.integer(payload.cidr_prefix_length); // jshint ignore:line
this.ipAccessControlListSid = payload.ip_access_control_list_sid; // jshint ignore:line
this.dateCreated = deserialize.rfc2822DateTime(payload.date_created); // jshint ignore:line
this.dateUpdated = deserialize.rfc2822DateTime(payload.date_updated); // jshint ignore:line
Expand Down Expand Up @@ -523,6 +528,7 @@ IpAddressInstance.prototype.fetch = function fetch(callback) {
* @param {object} [opts] - ...
* @param {string} [opts.ipAddress] - The ip_address
* @param {string} [opts.friendlyName] - The friendly_name
* @param {number} [opts.cidrPrefixLength] - The cidr_prefix_length
* @param {function} [callback] - Callback to handle processed record
*
* @returns {Promise} Resolves to processed IpAddressInstance
Expand Down Expand Up @@ -643,6 +649,7 @@ IpAddressContext.prototype.fetch = function fetch(callback) {
* @param {object} [opts] - ...
* @param {string} [opts.ipAddress] - The ip_address
* @param {string} [opts.friendlyName] - The friendly_name
* @param {number} [opts.cidrPrefixLength] - The cidr_prefix_length
* @param {function} [callback] - Callback to handle processed record
*
* @returns {Promise} Resolves to processed IpAddressInstance
Expand All @@ -658,7 +665,8 @@ IpAddressContext.prototype.update = function update(opts, callback) {
var deferred = Q.defer();
var data = values.of({
'IpAddress': _.get(opts, 'ipAddress'),
'FriendlyName': _.get(opts, 'friendlyName')
'FriendlyName': _.get(opts, 'friendlyName'),
'CidrPrefixLength': _.get(opts, 'cidrPrefixLength')
});

var promise = this._version.update({uri: this._uri, method: 'POST', data: data});
Expand Down
18 changes: 9 additions & 9 deletions lib/rest/preview/Marketplace.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ var Version = require('../../base/Version'); /* jshint ignore:line */
*
* @constructor Twilio.Preview.Marketplace
*
* @property {Twilio.Preview.Marketplace.InstalledAddOnList} installedAddOns -
* installedAddOns resource
* @property {Twilio.Preview.Marketplace.AvailableAddOnList} availableAddOns -
* availableAddOns resource
* @property {Twilio.Preview.Marketplace.InstalledAddOnList} installedAddOns -
* installedAddOns resource
*
* @param {Twilio.Preview} domain - The twilio domain
*/
Expand All @@ -35,26 +35,26 @@ function Marketplace(domain) {
Version.prototype.constructor.call(this, domain, 'marketplace');

// Resources
this._installedAddOns = undefined;
this._availableAddOns = undefined;
this._installedAddOns = undefined;
}

_.extend(Marketplace.prototype, Version.prototype);
Marketplace.prototype.constructor = Marketplace;

Object.defineProperty(Marketplace.prototype,
'installedAddOns', {
'availableAddOns', {
get: function() {
this._installedAddOns = this._installedAddOns || new InstalledAddOnList(this);
return this._installedAddOns;
this._availableAddOns = this._availableAddOns || new AvailableAddOnList(this);
return this._availableAddOns;
}
});

Object.defineProperty(Marketplace.prototype,
'availableAddOns', {
'installedAddOns', {
get: function() {
this._availableAddOns = this._availableAddOns || new AvailableAddOnList(this);
return this._availableAddOns;
this._installedAddOns = this._installedAddOns || new InstalledAddOnList(this);
return this._installedAddOns;
}
});

Expand Down
24 changes: 23 additions & 1 deletion lib/rest/preview/hosted_numbers/authorizationDocument.js
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,10 @@ AuthorizationDocumentList = function AuthorizationDocumentList(version) {
* A list of HostedNumberOrder sids.
* @param {string} opts.addressSid - Address sid.
* @param {string} opts.email - Email.
* @param {string} opts.contactTitle -
* Title of signee of this Authorization Document.
* @param {string} opts.contactPhoneNumber -
* Authorization Document's signee's phone number.
* @param {string|list} [opts.ccEmails] - A list of emails.
* @param {function} [callback] - Callback to handle processed record
*
Expand All @@ -340,12 +344,20 @@ AuthorizationDocumentList = function AuthorizationDocumentList(version) {
if (_.isUndefined(opts.email)) {
throw new Error('Required parameter "opts.email" missing.');
}
if (_.isUndefined(opts.contactTitle)) {
throw new Error('Required parameter "opts.contactTitle" missing.');
}
if (_.isUndefined(opts.contactPhoneNumber)) {
throw new Error('Required parameter "opts.contactPhoneNumber" missing.');
}

var deferred = Q.defer();
var data = values.of({
'HostedNumberOrderSids': serialize.map(_.get(opts, 'hostedNumberOrderSids'), function(e) { return e; }),
'AddressSid': _.get(opts, 'addressSid'),
'Email': _.get(opts, 'email'),
'ContactTitle': _.get(opts, 'contactTitle'),
'ContactPhoneNumber': _.get(opts, 'contactPhoneNumber'),
'CcEmails': serialize.map(_.get(opts, 'ccEmails'), function(e) { return e; })
});

Expand Down Expand Up @@ -517,6 +529,10 @@ AuthorizationDocumentInstance.prototype.fetch = function fetch(callback) {
* @param {string|list} [opts.ccEmails] - A list of emails.
* @param {authorization_document.status} [opts.status] -
* The Status of this AuthorizationDocument.
* @param {string} [opts.contactTitle] -
* Title of signee of this Authorization Document.
* @param {string} [opts.contactPhoneNumber] -
* Authorization Document's signee's phone number.
* @param {function} [callback] - Callback to handle processed record
*
* @returns {Promise} Resolves to processed AuthorizationDocumentInstance
Expand Down Expand Up @@ -641,6 +657,10 @@ AuthorizationDocumentContext.prototype.fetch = function fetch(callback) {
* @param {string|list} [opts.ccEmails] - A list of emails.
* @param {authorization_document.status} [opts.status] -
* The Status of this AuthorizationDocument.
* @param {string} [opts.contactTitle] -
* Title of signee of this Authorization Document.
* @param {string} [opts.contactPhoneNumber] -
* Authorization Document's signee's phone number.
* @param {function} [callback] - Callback to handle processed record
*
* @returns {Promise} Resolves to processed AuthorizationDocumentInstance
Expand All @@ -660,7 +680,9 @@ AuthorizationDocumentContext.prototype.update = function update(opts, callback)
'AddressSid': _.get(opts, 'addressSid'),
'Email': _.get(opts, 'email'),
'CcEmails': serialize.map(_.get(opts, 'ccEmails'), function(e) { return e; }),
'Status': _.get(opts, 'status')
'Status': _.get(opts, 'status'),
'ContactTitle': _.get(opts, 'contactTitle'),
'ContactPhoneNumber': _.get(opts, 'contactPhoneNumber')
});

var promise = this._version.update({uri: this._uri, method: 'POST', data: data});
Expand Down
Loading

0 comments on commit a3d2725

Please sign in to comment.