Skip to content

Commit

Permalink
[Librarian] Regenerated @ 964f1611ab7481d828261f49551385a276499e30
Browse files Browse the repository at this point in the history
  • Loading branch information
twilio-dx committed Dec 14, 2022
1 parent 08d60d4 commit b1d283a
Show file tree
Hide file tree
Showing 39 changed files with 1,238 additions and 70 deletions.
36 changes: 36 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,42 @@
twilio-node changelog
=====================

[2022-12-14] Version 3.84.0
---------------------------
**Library - Docs**
- [PR #821](https://github.com/twilio/twilio-node/pull/821): add commands to install release candidates. Thanks to [@childish-sambino](https://github.com/childish-sambino)!

**Api**
- Add `street_secondary` param to address create and update
- Make `method` optional for user defined message subscription **(breaking change)**

**Flex**
- Flex Conversations is now Generally Available
- Adding the ie1 mapping for authorization api, updating service base uri and base url response attribute **(breaking change)**
- Change web channels to GA and library visibility to public
- Changing the uri for authorization api from using Accounts to Insights **(breaking change)**

**Media**
- Gate Twilio Live endpoints behind beta_feature for EOS

**Messaging**
- Mark `MessageFlow` as a required field for Campaign Creation **(breaking change)**

**Oauth**
- updated openid discovery endpoint uri **(breaking change)**
- Added device code authorization endpoint

**Supersim**
- Allow filtering the SettingsUpdates resource by `status`

**Twiml**
- Add new Polly Neural voices
- Add tr-TR, ar-AE, yue-CN, fi-FI languages to SSML `<lang>` element.
- Add x-amazon-jyutping, x-amazon-pinyin, x-amazon-pron-kana, x-amazon-yomigana alphabets to SSML `<phoneme>` element.
- Rename `character` value for SSML `<say-as>` `interpret-as` attribute to `characters`. **(breaking change)**
- Rename `role` attribute to `format` in SSML `<say-as>` element. **(breaking change)**


[2022-11-30] Version 3.83.4
---------------------------
**Flex**
Expand Down
4 changes: 4 additions & 0 deletions lib/rest/FlexApi.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import Domain = require('../base/Domain');
import Twilio = require('./Twilio');
import V1 = require('./flexApi/V1');
import V2 = require('./flexApi/V2');
import { AssessmentsListInstance } from './flexApi/v1/assessments';
import { ChannelListInstance } from './flexApi/v1/channel';
import { ConfigurationListInstance } from './flexApi/v1/configuration';
Expand All @@ -16,6 +17,7 @@ import { GoodDataListInstance } from './flexApi/v1/goodData';
import { InteractionListInstance } from './flexApi/v1/interaction';
import { UserRolesListInstance } from './flexApi/v1/userRoles';
import { WebChannelListInstance } from './flexApi/v1/webChannel';
import { WebChannelsListInstance } from './flexApi/v2/webChannels';


declare class FlexApi extends Domain {
Expand All @@ -34,7 +36,9 @@ declare class FlexApi extends Domain {
readonly interaction: InteractionListInstance;
readonly userRoles: UserRolesListInstance;
readonly v1: V1;
readonly v2: V2;
readonly webChannel: WebChannelListInstance;
readonly webChannels: WebChannelsListInstance;
}

export = FlexApi;
19 changes: 19 additions & 0 deletions lib/rest/FlexApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
var _ = require('lodash'); /* jshint ignore:line */
var Domain = require('../base/Domain'); /* jshint ignore:line */
var V1 = require('./flexApi/V1'); /* jshint ignore:line */
var V2 = require('./flexApi/V2'); /* jshint ignore:line */


/* jshint ignore:start */
Expand All @@ -21,6 +22,7 @@ var V1 = require('./flexApi/V1'); /* jshint ignore:line */
* @constructor Twilio.FlexApi
*
* @property {Twilio.FlexApi.V1} v1 - v1 version
* @property {Twilio.FlexApi.V2} v2 - v2 version
* @property {Twilio.FlexApi.V1.AssessmentsList} assessments - assessments resource
* @property {Twilio.FlexApi.V1.ChannelList} channel - channel resource
* @property {Twilio.FlexApi.V1.ConfigurationList} configuration -
Expand All @@ -30,6 +32,7 @@ var V1 = require('./flexApi/V1'); /* jshint ignore:line */
* @property {Twilio.FlexApi.V1.InteractionList} interaction - interaction resource
* @property {Twilio.FlexApi.V1.UserRolesList} userRoles - userRoles resource
* @property {Twilio.FlexApi.V1.WebChannelList} webChannel - webChannel resource
* @property {Twilio.FlexApi.V2.WebChannelsList} webChannels - webChannels resource
*
* @param {Twilio} twilio - The twilio client
*/
Expand All @@ -39,6 +42,7 @@ function FlexApi(twilio) {

// Versions
this._v1 = undefined;
this._v2 = undefined;
}

_.extend(FlexApi.prototype, Domain.prototype);
Expand All @@ -52,6 +56,14 @@ Object.defineProperty(FlexApi.prototype,
}
});

Object.defineProperty(FlexApi.prototype,
'v2', {
get: function() {
this._v2 = this._v2 || new V2(this);
return this._v2;
}
});

Object.defineProperty(FlexApi.prototype,
'assessments', {
get: function() {
Expand Down Expand Up @@ -108,4 +120,11 @@ Object.defineProperty(FlexApi.prototype,
}
});

Object.defineProperty(FlexApi.prototype,
'webChannels', {
get: function() {
return this.v2.webChannels;
}
});

module.exports = FlexApi;
2 changes: 2 additions & 0 deletions lib/rest/Oauth.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import Domain = require('../base/Domain');
import Twilio = require('./Twilio');
import V1 = require('./oauth/V1');
import { DeviceCodeListInstance } from './oauth/v1/deviceCode';
import { OauthListInstance } from './oauth/v1/oauth';
import { OpenidDiscoveryListInstance } from './oauth/v1/openidDiscovery';
import { TokenListInstance } from './oauth/v1/token';
Expand All @@ -22,6 +23,7 @@ declare class Oauth extends Domain {
*/
constructor(twilio: Twilio);

readonly deviceCode: DeviceCodeListInstance;
readonly oauth: OauthListInstance;
readonly openidDiscovery: OpenidDiscoveryListInstance;
readonly token: TokenListInstance;
Expand Down
8 changes: 8 additions & 0 deletions lib/rest/Oauth.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ var V1 = require('./oauth/V1'); /* jshint ignore:line */
*
* @property {Twilio.Oauth.V1} v1 - v1 version
* @property {Twilio.Oauth.V1.OauthList} oauth - oauth resource
* @property {Twilio.Oauth.V1.DeviceCodeList} deviceCode - deviceCode resource
* @property {Twilio.Oauth.V1.OpenidDiscoveryList} openidDiscovery -
* openidDiscovery resource
* @property {Twilio.Oauth.V1.TokenList} token - token resource
Expand Down Expand Up @@ -55,6 +56,13 @@ Object.defineProperty(Oauth.prototype,
}
});

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

Object.defineProperty(Oauth.prototype,
'openidDiscovery', {
get: function() {
Expand Down
6 changes: 6 additions & 0 deletions lib/rest/api/v2010/account/address.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ declare function AddressList(version: V2010, accountSid: string): AddressListIns
* @property postalCode - The postal code of the address
* @property region - The state or region of the address
* @property street - The number and street address of the address
* @property streetSecondary - The additional number and street address of the address
*/
interface AddressInstanceUpdateOptions {
autoCorrectAddress?: boolean;
Expand All @@ -41,6 +42,7 @@ interface AddressInstanceUpdateOptions {
postalCode?: string;
region?: string;
street?: string;
streetSecondary?: string;
}

interface AddressListInstance {
Expand Down Expand Up @@ -175,6 +177,7 @@ interface AddressListInstance {
* @property postalCode - The postal code of the new address
* @property region - The state or region of the new address
* @property street - The number and street address of the new address
* @property streetSecondary - The additional number and street address of the address
*/
interface AddressListInstanceCreateOptions {
autoCorrectAddress?: boolean;
Expand All @@ -186,6 +189,7 @@ interface AddressListInstanceCreateOptions {
postalCode: string;
region: string;
street: string;
streetSecondary?: string;
}

/**
Expand Down Expand Up @@ -279,6 +283,7 @@ interface AddressResource {
region: string;
sid: string;
street: string;
street_secondary: string;
uri: string;
validated: boolean;
verified: boolean;
Expand Down Expand Up @@ -372,6 +377,7 @@ declare class AddressInstance extends SerializableClass {
remove(callback?: (error: Error | null, items: AddressInstance) => any): Promise<boolean>;
sid: string;
street: string;
streetSecondary: string;
/**
* Provide a user-friendly representation
*/
Expand Down
15 changes: 13 additions & 2 deletions lib/rest/api/v2010/account/address.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ AddressList = function AddressList(version, accountSid) {
* Whether to enable emergency calling on the new address
* @param {boolean} [opts.autoCorrectAddress] -
* Whether we should automatically correct the address
* @param {string} [opts.streetSecondary] -
* The additional number and street address of the address
* @param {function} [callback] - Callback to handle processed record
*
* @returns {Promise} Resolves to processed AddressInstance
Expand Down Expand Up @@ -112,7 +114,8 @@ AddressList = function AddressList(version, accountSid) {
'IsoCountry': _.get(opts, 'isoCountry'),
'FriendlyName': _.get(opts, 'friendlyName'),
'EmergencyEnabled': serialize.bool(_.get(opts, 'emergencyEnabled')),
'AutoCorrectAddress': serialize.bool(_.get(opts, 'autoCorrectAddress'))
'AutoCorrectAddress': serialize.bool(_.get(opts, 'autoCorrectAddress')),
'StreetSecondary': _.get(opts, 'streetSecondary')
});

var promise = this._version.create({uri: this._uri, method: 'POST', data: data});
Expand Down Expand Up @@ -533,6 +536,8 @@ AddressPage.prototype[util.inspect.custom] = function inspect(depth, options) {
* Whether the address has been validated to comply with local regulation
* @property {boolean} verified -
* Whether the address has been verified to comply with regulation
* @property {string} streetSecondary -
* The additional number and street address of the address
*
* @param {V2010} version - Version of the resource
* @param {AddressPayload} payload - The instance payload
Expand Down Expand Up @@ -560,6 +565,7 @@ AddressInstance = function AddressInstance(version, payload, accountSid, sid) {
this.emergencyEnabled = payload.emergency_enabled; // jshint ignore:line
this.validated = payload.validated; // jshint ignore:line
this.verified = payload.verified; // jshint ignore:line
this.streetSecondary = payload.street_secondary; // jshint ignore:line

// Context
this._context = undefined;
Expand Down Expand Up @@ -627,6 +633,8 @@ AddressInstance.prototype.fetch = function fetch(callback) {
* Whether to enable emergency calling on the address
* @param {boolean} [opts.autoCorrectAddress] -
* Whether we should automatically correct the address
* @param {string} [opts.streetSecondary] -
* The additional number and street address of the address
* @param {function} [callback] - Callback to handle processed record
*
* @returns {Promise} Resolves to processed AddressInstance
Expand Down Expand Up @@ -788,6 +796,8 @@ AddressContext.prototype.fetch = function fetch(callback) {
* Whether to enable emergency calling on the address
* @param {boolean} [opts.autoCorrectAddress] -
* Whether we should automatically correct the address
* @param {string} [opts.streetSecondary] -
* The additional number and street address of the address
* @param {function} [callback] - Callback to handle processed record
*
* @returns {Promise} Resolves to processed AddressInstance
Expand All @@ -809,7 +819,8 @@ AddressContext.prototype.update = function update(opts, callback) {
'Region': _.get(opts, 'region'),
'PostalCode': _.get(opts, 'postalCode'),
'EmergencyEnabled': serialize.bool(_.get(opts, 'emergencyEnabled')),
'AutoCorrectAddress': serialize.bool(_.get(opts, 'autoCorrectAddress'))
'AutoCorrectAddress': serialize.bool(_.get(opts, 'autoCorrectAddress')),
'StreetSecondary': _.get(opts, 'streetSecondary')
});

var promise = this._version.update({uri: this._uri, method: 'POST', data: data});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ interface UserDefinedMessageSubscriptionListInstance {
interface UserDefinedMessageSubscriptionListInstanceCreateOptions {
callback: string;
idempotencyKey?: string;
method: string;
method?: string;
}

interface UserDefinedMessageSubscriptionPayload extends UserDefinedMessageSubscriptionResource, Page.TwilioResponsePayload {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ UserDefinedMessageSubscriptionList = function
* @param {object} opts - Options for request
* @param {string} opts.callback -
* The URL we should call to send user defined messages.
* @param {string} opts.method - HTTP method used with the callback.
* @param {string} [opts.idempotencyKey] -
* A unique string value to identify API call. This should be a unique string value per API call and can be a randomly generated.
* @param {string} [opts.method] - HTTP method used with the callback.
* @param {function} [callback] - Callback to handle processed record
*
* @returns {Promise} Resolves to processed UserDefinedMessageSubscriptionInstance
Expand All @@ -79,15 +79,12 @@ UserDefinedMessageSubscriptionList = function
if (_.isUndefined(opts['callback'])) {
throw new Error('Required parameter "opts[\'callback\']" missing.');
}
if (_.isUndefined(opts['method'])) {
throw new Error('Required parameter "opts[\'method\']" missing.');
}

var deferred = Q.defer();
var data = values.of({
'Callback': _.get(opts, 'callback'),
'Method': _.get(opts, 'method'),
'IdempotencyKey': _.get(opts, 'idempotencyKey')
'IdempotencyKey': _.get(opts, 'idempotencyKey'),
'Method': _.get(opts, 'method')
});

var promise = this._version.create({uri: this._uri, method: 'POST', data: data});
Expand Down
25 changes: 25 additions & 0 deletions lib/rest/flexApi/V2.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/**
* This code was generated by
* \ / _ _ _| _ _
* | (_)\/(_)(_|\/| |(/_ v1.0.0
* / /
*/

import FlexApi = require('../FlexApi');
import Version = require('../../base/Version');
import { WebChannelsList } from './v2/webChannels';
import { WebChannelsListInstance } from './v2/webChannels';


declare class V2 extends Version {
/**
* Initialize the V2 version of FlexApi
*
* @param domain - The twilio domain
*/
constructor(domain: FlexApi);

readonly webChannels: WebChannelsListInstance;
}

export = V2;
46 changes: 46 additions & 0 deletions lib/rest/flexApi/V2.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
'use strict';

/* jshint ignore:start */
/**
* This code was generated by
* \ / _ _ _| _ _
* | (_)\/(_)(_|\/| |(/_ v1.0.0
* / /
*/
/* jshint ignore:end */

var _ = require('lodash'); /* jshint ignore:line */
var Version = require('../../base/Version'); /* jshint ignore:line */
var WebChannelsList = require('./v2/webChannels').WebChannelsList;


/* jshint ignore:start */
/**
* Initialize the V2 version of FlexApi
*
* @constructor Twilio.FlexApi.V2
*
* @property {Twilio.FlexApi.V2.WebChannelsList} webChannels - webChannels resource
*
* @param {Twilio.FlexApi} domain - The twilio domain
*/
/* jshint ignore:end */
function V2(domain) {
Version.prototype.constructor.call(this, domain, 'v2');

// Resources
this._webChannels = undefined;
}

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

Object.defineProperty(V2.prototype,
'webChannels', {
get: function() {
this._webChannels = this._webChannels || new WebChannelsList(this);
return this._webChannels;
}
});

module.exports = V2;
Loading

0 comments on commit b1d283a

Please sign in to comment.