Skip to content

Commit

Permalink
[Librarian] Regenerated @ 4e75c7be2507558854a659be2e05b171bcf7512b
Browse files Browse the repository at this point in the history
  • Loading branch information
twilio-dx committed Jun 30, 2021
1 parent 043dd65 commit 68ec830
Show file tree
Hide file tree
Showing 18 changed files with 1,166 additions and 41 deletions.
18 changes: 18 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,24 @@
twilio-node changelog
=====================

[2021-06-30] Version 3.65.0
---------------------------
**Conversations**
- Read-only Conversation Email Binding property `binding`

**Supersim**
- Add Billing Period resource for the Super Sim Pilot
- Add List endpoint to Billing Period resource for Super Sim Pilot
- Add Fetch endpoint to Billing Period resource for Super Sim Pilot

**Taskrouter**
- Update `transcribe` & `transcription_configuration` form params in Reservation update endpoint to have private visibility **(breaking change)**
- Add `transcribe` & `transcription_configuration` form params to Reservation update endpoint

**Twiml**
- Add `modify` event to `statusCallbackEvent` for `<Conference>`.


[2021-06-16] Version 3.64.0
---------------------------
**Library - Chore**
Expand Down
18 changes: 15 additions & 3 deletions lib/rest/api/v2010/account/message.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ declare function MessageList(version: V2010, accountSid: string): MessageListIns
* @property body - The text of the message you want to send
*/
interface MessageInstanceUpdateOptions {
body: string;
body?: string;
}

interface MessageListInstance {
Expand Down Expand Up @@ -350,13 +350,19 @@ declare class MessageContext {
* Provide a user-friendly representation
*/
toJSON(): any;
/**
* update a MessageInstance
*
* @param callback - Callback to handle processed record
*/
update(callback?: (error: Error | null, items: MessageInstance) => any): Promise<MessageInstance>;
/**
* update a MessageInstance
*
* @param opts - Options for request
* @param callback - Callback to handle processed record
*/
update(opts: MessageInstanceUpdateOptions, callback?: (error: Error | null, items: MessageInstance) => any): Promise<MessageInstance>;
update(opts?: MessageInstanceUpdateOptions, callback?: (error: Error | null, items: MessageInstance) => any): Promise<MessageInstance>;
}


Expand Down Expand Up @@ -415,13 +421,19 @@ declare class MessageInstance extends SerializableClass {
* Provide a user-friendly representation
*/
toJSON(): any;
/**
* update a MessageInstance
*
* @param callback - Callback to handle processed record
*/
update(callback?: (error: Error | null, items: MessageInstance) => any): Promise<MessageInstance>;
/**
* update a MessageInstance
*
* @param opts - Options for request
* @param callback - Callback to handle processed record
*/
update(opts: MessageInstanceUpdateOptions, callback?: (error: Error | null, items: MessageInstance) => any): Promise<MessageInstance>;
update(opts?: MessageInstanceUpdateOptions, callback?: (error: Error | null, items: MessageInstance) => any): Promise<MessageInstance>;
uri: string;
}

Expand Down
17 changes: 8 additions & 9 deletions lib/rest/api/v2010/account/message.js
Original file line number Diff line number Diff line change
Expand Up @@ -630,8 +630,8 @@ MessageInstance.prototype.fetch = function fetch(callback) {
* @function update
* @memberof Twilio.Api.V2010.AccountContext.MessageInstance#
*
* @param {object} opts - Options for request
* @param {string} opts.body - The text of the message you want to send
* @param {object} [opts] - Options for request
* @param {string} [opts.body] - The text of the message you want to send
* @param {function} [callback] - Callback to handle processed record
*
* @returns {Promise} Resolves to processed MessageInstance
Expand Down Expand Up @@ -798,20 +798,19 @@ MessageContext.prototype.fetch = function fetch(callback) {
* @function update
* @memberof Twilio.Api.V2010.AccountContext.MessageContext#
*
* @param {object} opts - Options for request
* @param {string} opts.body - The text of the message you want to send
* @param {object} [opts] - Options for request
* @param {string} [opts.body] - The text of the message you want to send
* @param {function} [callback] - Callback to handle processed record
*
* @returns {Promise} Resolves to processed MessageInstance
*/
/* jshint ignore:end */
MessageContext.prototype.update = function update(opts, callback) {
if (_.isUndefined(opts)) {
throw new Error('Required parameter "opts" missing.');
}
if (_.isUndefined(opts.body)) {
throw new Error('Required parameter "opts.body" missing.');
if (_.isFunction(opts)) {
callback = opts;
opts = {};
}
opts = opts || {};

var deferred = Q.defer();
var data = values.of({'Body': _.get(opts, 'body')});
Expand Down
2 changes: 2 additions & 0 deletions lib/rest/conversations/v1/conversation.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,7 @@ interface ConversationPayload extends ConversationResource, Page.TwilioResponseP
interface ConversationResource {
account_sid: string;
attributes: string;
bindings: object;
chat_service_sid: string;
date_created: Date;
date_updated: Date;
Expand Down Expand Up @@ -364,6 +365,7 @@ declare class ConversationInstance extends SerializableClass {
private _proxy: ConversationContext;
accountSid: string;
attributes: string;
bindings: any;
chatServiceSid: string;
dateCreated: Date;
dateUpdated: Date;
Expand Down
2 changes: 2 additions & 0 deletions lib/rest/conversations/v1/conversation.js
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,7 @@ ConversationPage.prototype[util.inspect.custom] = function inspect(depth,
* @property {string} url - An absolute URL for this conversation.
* @property {string} links -
* Absolute URLs to access the participants, messages and webhooks of this conversation.
* @property {object} bindings - The bindings
*
* @param {V1} version - Version of the resource
* @param {ConversationPayload} payload - The instance payload
Expand All @@ -519,6 +520,7 @@ ConversationInstance = function ConversationInstance(version, payload, sid) {
this.timers = payload.timers; // jshint ignore:line
this.url = payload.url; // jshint ignore:line
this.links = payload.links; // jshint ignore:line
this.bindings = payload.bindings; // jshint ignore:line

// Context
this._context = undefined;
Expand Down
2 changes: 2 additions & 0 deletions lib/rest/conversations/v1/service/conversation.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ interface ConversationPayload extends ConversationResource, Page.TwilioResponseP
interface ConversationResource {
account_sid: string;
attributes: string;
bindings: object;
chat_service_sid: string;
date_created: Date;
date_updated: Date;
Expand Down Expand Up @@ -368,6 +369,7 @@ declare class ConversationInstance extends SerializableClass {
private _proxy: ConversationContext;
accountSid: string;
attributes: string;
bindings: any;
chatServiceSid: string;
dateCreated: Date;
dateUpdated: Date;
Expand Down
2 changes: 2 additions & 0 deletions lib/rest/conversations/v1/service/conversation.js
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,7 @@ ConversationPage.prototype[util.inspect.custom] = function inspect(depth,
* @property {string} url - An absolute URL for this conversation.
* @property {string} links -
* Absolute URLs to access the participants, messages and webhooks of this conversation.
* @property {object} bindings - The bindings
*
* @param {V1} version - Version of the resource
* @param {ConversationPayload} payload - The instance payload
Expand Down Expand Up @@ -529,6 +530,7 @@ ConversationInstance = function ConversationInstance(version, payload,
this.timers = payload.timers; // jshint ignore:line
this.url = payload.url; // jshint ignore:line
this.links = payload.links; // jshint ignore:line
this.bindings = payload.bindings; // jshint ignore:line

// Context
this._context = undefined;
Expand Down
9 changes: 9 additions & 0 deletions lib/rest/supersim/v1/sim.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
import Page = require('../../../base/Page');
import Response = require('../../../http/response');
import V1 = require('../V1');
import { BillingPeriodList } from './sim/billingPeriod';
import { BillingPeriodListInstance } from './sim/billingPeriod';
import { SerializableClass } from '../../../interfaces';

type SimStatus = 'new'|'ready'|'active'|'inactive'|'scheduled';
Expand Down Expand Up @@ -258,6 +260,7 @@ interface SimResource {
date_updated: Date;
fleet_sid: string;
iccid: string;
links: string;
sid: string;
status: SimStatus;
unique_name: string;
Expand All @@ -280,6 +283,7 @@ declare class SimContext {
*/
constructor(version: V1, sid: string);

billingPeriods: BillingPeriodListInstance;
/**
* fetch a SimInstance
*
Expand Down Expand Up @@ -321,6 +325,10 @@ declare class SimInstance extends SerializableClass {

private _proxy: SimContext;
accountSid: string;
/**
* Access the billingPeriods
*/
billingPeriods(): BillingPeriodListInstance;
dateCreated: Date;
dateUpdated: Date;
/**
Expand All @@ -331,6 +339,7 @@ declare class SimInstance extends SerializableClass {
fetch(callback?: (error: Error | null, items: SimInstance) => any): Promise<SimInstance>;
fleetSid: string;
iccid: string;
links: string;
sid: string;
status: SimStatus;
/**
Expand Down
33 changes: 33 additions & 0 deletions lib/rest/supersim/v1/sim.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
var Q = require('q'); /* jshint ignore:line */
var _ = require('lodash'); /* jshint ignore:line */
var util = require('util'); /* jshint ignore:line */
var BillingPeriodList = require('./sim/billingPeriod').BillingPeriodList;
var Page = require('../../../base/Page'); /* jshint ignore:line */
var deserialize = require(
'../../../base/deserialize'); /* jshint ignore:line */
Expand Down Expand Up @@ -491,6 +492,7 @@ SimPage.prototype[util.inspect.custom] = function inspect(depth, options) {
* @property {Date} dateUpdated -
* The ISO 8601 date and time in GMT when the resource was last updated
* @property {string} url - The absolute URL of the Sim Resource
* @property {string} links - The links
*
* @param {V1} version - Version of the resource
* @param {SimPayload} payload - The instance payload
Expand All @@ -510,6 +512,7 @@ SimInstance = function SimInstance(version, payload, sid) {
this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line
this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line
this.url = payload.url; // jshint ignore:line
this.links = payload.links; // jshint ignore:line

// Context
this._context = undefined;
Expand Down Expand Up @@ -571,6 +574,20 @@ SimInstance.prototype.update = function update(opts, callback) {
return this._proxy.update(opts, callback);
};

/* jshint ignore:start */
/**
* Access the billingPeriods
*
* @function billingPeriods
* @memberof Twilio.Supersim.V1.SimInstance#
*
* @returns {Twilio.Supersim.V1.SimContext.BillingPeriodList}
*/
/* jshint ignore:end */
SimInstance.prototype.billingPeriods = function billingPeriods() {
return this._proxy.billingPeriods;
};

/* jshint ignore:start */
/**
* Provide a user-friendly representation
Expand Down Expand Up @@ -605,6 +622,9 @@ SimInstance.prototype[util.inspect.custom] = function inspect(depth, options) {
*
* @constructor Twilio.Supersim.V1.SimContext
*
* @property {Twilio.Supersim.V1.SimContext.BillingPeriodList} billingPeriods -
* billingPeriods resource
*
* @param {V1} version - Version of the resource
* @param {sid_like} sid - The SID that identifies the resource to fetch
*/
Expand All @@ -615,6 +635,9 @@ SimContext = function SimContext(version, sid) {
// Path Solution
this._solution = {sid: sid, };
this._uri = `/Sims/${sid}`;

// Dependents
this._billingPeriods = undefined;
};

/* jshint ignore:start */
Expand Down Expand Up @@ -706,6 +729,16 @@ SimContext.prototype.update = function update(opts, callback) {
return deferred.promise;
};

Object.defineProperty(SimContext.prototype,
'billingPeriods', {
get: function() {
if (!this._billingPeriods) {
this._billingPeriods = new BillingPeriodList(this._version, this._solution.sid);
}
return this._billingPeriods;
}
});

/* jshint ignore:start */
/**
* Provide a user-friendly representation
Expand Down
Loading

0 comments on commit 68ec830

Please sign in to comment.