Skip to content

Commit

Permalink
[Librarian] Regenerated @ 7e2caf2ef38bb07afedbc8ba24e3a235c57337ad 2d…
Browse files Browse the repository at this point in the history
…eb312512e85217931fbc99141b334a5d6beaaf
  • Loading branch information
twilio-dx committed Apr 1, 2024
1 parent cc0c0e8 commit 015e56c
Show file tree
Hide file tree
Showing 12 changed files with 416 additions and 139 deletions.
40 changes: 40 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,46 @@
twilio-node changelog
=====================

[2024-04-01] Version 5.0.2
--------------------------
**Library - Chore**
- [PR #1014](https://github.com/twilio/twilio-node/pull/1014): remove media reference. Thanks to [@tiwarishubham635](https://github.com/tiwarishubham635)!

**Api**
- Add property `queue_time` to conference participant resource
- Update RiskCheck documentation
- Correct call filtering by start and end time documentation, clarifying that times are UTC.

**Flex**
- Adding optional parameter to `plugins`

**Media**
- Remove API: MediaProcessor

**Messaging**
- Remove Sending-Window due to test failure
- Add Sending-Window as a response property to Messaging Services, gated by a beta feature flag

**Numbers**
- Correct valid_until_date field to be visible in Bundles resource
- Adding port_in_status field to the Port In resource and phone_number_status and sid fields to the Port In Phone Number resource

**Oauth**
- Modified token endpoint response
- Added refresh_token and scope as optional parameter to token endpoint

**Trusthub**
- Add update inquiry endpoint in compliance_registration.
- Add new field in themeSetId in compliance_registration.

**Voice**
- Correct call filtering by start and end time documentation, clarifying that times are UTC.

**Twiml**
- Add support for new Google voices (Q1 2024) for `Say` verb - gu-IN voices
- Add support for new Amazon Polly and Google voices (Q1 2024) for `Say` verb - Niamh (en-IE) and Sofie (da-DK) voices


[2024-03-14] Version 5.0.1
--------------------------
**Oauth**
Expand Down
44 changes: 22 additions & 22 deletions src/rest/api/v2010/account/call.ts

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions src/rest/api/v2010/account/conference/participant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,7 @@ interface ParticipantResource {
hold: boolean;
start_conference_on_enter: boolean;
status: ParticipantStatus;
queue_time: string;
uri: string;
}

Expand Down Expand Up @@ -472,6 +473,7 @@ export class ParticipantInstance {
this.hold = payload.hold;
this.startConferenceOnEnter = payload.start_conference_on_enter;
this.status = payload.status;
this.queueTime = payload.queue_time;
this.uri = payload.uri;

this._solution = {
Expand Down Expand Up @@ -530,6 +532,10 @@ export class ParticipantInstance {
*/
startConferenceOnEnter: boolean;
status: ParticipantStatus;
/**
* The wait time in milliseconds before participant\'s call is placed. Only available in the response to a create participant request.
*/
queueTime: string;
/**
* The URI of the resource, relative to `https://api.twilio.com`.
*/
Expand Down Expand Up @@ -623,6 +629,7 @@ export class ParticipantInstance {
hold: this.hold,
startConferenceOnEnter: this.startConferenceOnEnter,
status: this.status,
queueTime: this.queueTime,
uri: this.uri,
};
}
Expand Down
16 changes: 8 additions & 8 deletions src/rest/content/v1/content/approvalCreate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export interface ApprovalCreateListInstanceCreateOptions {
}

export interface ApprovalCreateSolution {
sid: string;
contentSid: string;
}

export interface ApprovalCreateListInstance {
Expand Down Expand Up @@ -71,17 +71,17 @@ export interface ApprovalCreateListInstance {

export function ApprovalCreateListInstance(
version: V1,
sid: string
contentSid: string
): ApprovalCreateListInstance {
if (!isValidPathParam(sid)) {
throw new Error("Parameter 'sid' is not valid.");
if (!isValidPathParam(contentSid)) {
throw new Error("Parameter 'contentSid' is not valid.");
}

const instance = {} as ApprovalCreateListInstance;

instance._version = version;
instance._solution = { sid };
instance._uri = `/Content/${sid}/ApprovalRequests/whatsapp`;
instance._solution = { contentSid };
instance._uri = `/Content/${contentSid}/ApprovalRequests/whatsapp`;

instance.create = function create(
params: ContentApprovalRequest,
Expand Down Expand Up @@ -111,7 +111,7 @@ export function ApprovalCreateListInstance(
new ApprovalCreateInstance(
operationVersion,
payload,
instance._solution.sid
instance._solution.contentSid
)
);

Expand Down Expand Up @@ -151,7 +151,7 @@ export class ApprovalCreateInstance {
constructor(
protected _version: V1,
payload: ApprovalCreateResource,
sid: string
contentSid: string
) {
this.name = payload.name;
this.category = payload.category;
Expand Down
32 changes: 16 additions & 16 deletions src/rest/content/v1/content/approvalFetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,20 +38,20 @@ export interface ApprovalFetchContext {
}

export interface ApprovalFetchContextSolution {
sid: string;
contentSid: string;
}

export class ApprovalFetchContextImpl implements ApprovalFetchContext {
protected _solution: ApprovalFetchContextSolution;
protected _uri: string;

constructor(protected _version: V1, sid: string) {
if (!isValidPathParam(sid)) {
throw new Error("Parameter 'sid' is not valid.");
constructor(protected _version: V1, contentSid: string) {
if (!isValidPathParam(contentSid)) {
throw new Error("Parameter 'contentSid' is not valid.");
}

this._solution = { sid };
this._uri = `/Content/${sid}/ApprovalRequests`;
this._solution = { contentSid };
this._uri = `/Content/${contentSid}/ApprovalRequests`;
}

fetch(
Expand All @@ -69,7 +69,7 @@ export class ApprovalFetchContextImpl implements ApprovalFetchContext {
new ApprovalFetchInstance(
operationVersion,
payload,
instance._solution.sid
instance._solution.contentSid
)
);

Expand Down Expand Up @@ -110,14 +110,14 @@ export class ApprovalFetchInstance {
constructor(
protected _version: V1,
payload: ApprovalFetchResource,
sid: string
contentSid: string
) {
this.sid = payload.sid;
this.accountSid = payload.account_sid;
this.whatsapp = payload.whatsapp;
this.url = payload.url;

this._solution = { sid };
this._solution = { contentSid };
}

/**
Expand All @@ -140,7 +140,7 @@ export class ApprovalFetchInstance {
private get _proxy(): ApprovalFetchContext {
this._context =
this._context ||
new ApprovalFetchContextImpl(this._version, this._solution.sid);
new ApprovalFetchContextImpl(this._version, this._solution.contentSid);
return this._context;
}

Expand Down Expand Up @@ -177,7 +177,7 @@ export class ApprovalFetchInstance {
}

export interface ApprovalFetchSolution {
sid: string;
contentSid: string;
}

export interface ApprovalFetchListInstance {
Expand All @@ -197,20 +197,20 @@ export interface ApprovalFetchListInstance {

export function ApprovalFetchListInstance(
version: V1,
sid: string
contentSid: string
): ApprovalFetchListInstance {
if (!isValidPathParam(sid)) {
throw new Error("Parameter 'sid' is not valid.");
if (!isValidPathParam(contentSid)) {
throw new Error("Parameter 'contentSid' is not valid.");
}

const instance = (() => instance.get()) as ApprovalFetchListInstance;

instance.get = function get(): ApprovalFetchContext {
return new ApprovalFetchContextImpl(version, sid);
return new ApprovalFetchContextImpl(version, contentSid);
};

instance._version = version;
instance._solution = { sid };
instance._solution = { contentSid };
instance._uri = ``;

instance.toJSON = function toJSON() {
Expand Down
12 changes: 6 additions & 6 deletions src/rest/conversations/v1/service/conversation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@ export interface ConversationListInstanceCreateOptions {
* Options to pass to each
*/
export interface ConversationListInstanceEachOptions {
/** Start date or time in ISO8601 format for filtering list of Conversations. If a date is provided, the start time of the date is used (YYYY-MM-DDT00:00:00Z). Can be combined with other filters. */
/** Specifies the beginning of the date range for filtering Conversations based on their creation date. Conversations that were created on or after this date will be included in the results. The date must be in ISO8601 format, specifically starting at the beginning of the specified date (YYYY-MM-DDT00:00:00Z), for precise filtering. This parameter can be combined with other filters. If this filter is used, the returned list is sorted by latest conversation creation date in descending order. */
startDate?: string;
/** End date or time in ISO8601 format for filtering list of Conversations. If a date is provided, the end time of the date is used (YYYY-MM-DDT23:59:59Z). Can be combined with other filters. */
/** Defines the end of the date range for filtering conversations by their creation date. Only conversations that were created on or before this date will appear in the results. The date must be in ISO8601 format, specifically capturing up to the end of the specified date (YYYY-MM-DDT23:59:59Z), to ensure that conversations from the entire end day are included. This parameter can be combined with other filters. If this filter is used, the returned list is sorted by latest conversation creation date in descending order. */
endDate?: string;
/** State for sorting and filtering list of Conversations. Can be `active`, `inactive` or `closed` */
state?: ConversationState;
Expand All @@ -118,9 +118,9 @@ export interface ConversationListInstanceEachOptions {
* Options to pass to list
*/
export interface ConversationListInstanceOptions {
/** Start date or time in ISO8601 format for filtering list of Conversations. If a date is provided, the start time of the date is used (YYYY-MM-DDT00:00:00Z). Can be combined with other filters. */
/** Specifies the beginning of the date range for filtering Conversations based on their creation date. Conversations that were created on or after this date will be included in the results. The date must be in ISO8601 format, specifically starting at the beginning of the specified date (YYYY-MM-DDT00:00:00Z), for precise filtering. This parameter can be combined with other filters. If this filter is used, the returned list is sorted by latest conversation creation date in descending order. */
startDate?: string;
/** End date or time in ISO8601 format for filtering list of Conversations. If a date is provided, the end time of the date is used (YYYY-MM-DDT23:59:59Z). Can be combined with other filters. */
/** Defines the end of the date range for filtering conversations by their creation date. Only conversations that were created on or before this date will appear in the results. The date must be in ISO8601 format, specifically capturing up to the end of the specified date (YYYY-MM-DDT23:59:59Z), to ensure that conversations from the entire end day are included. This parameter can be combined with other filters. If this filter is used, the returned list is sorted by latest conversation creation date in descending order. */
endDate?: string;
/** State for sorting and filtering list of Conversations. Can be `active`, `inactive` or `closed` */
state?: ConversationState;
Expand All @@ -134,9 +134,9 @@ export interface ConversationListInstanceOptions {
* Options to pass to page
*/
export interface ConversationListInstancePageOptions {
/** Start date or time in ISO8601 format for filtering list of Conversations. If a date is provided, the start time of the date is used (YYYY-MM-DDT00:00:00Z). Can be combined with other filters. */
/** Specifies the beginning of the date range for filtering Conversations based on their creation date. Conversations that were created on or after this date will be included in the results. The date must be in ISO8601 format, specifically starting at the beginning of the specified date (YYYY-MM-DDT00:00:00Z), for precise filtering. This parameter can be combined with other filters. If this filter is used, the returned list is sorted by latest conversation creation date in descending order. */
startDate?: string;
/** End date or time in ISO8601 format for filtering list of Conversations. If a date is provided, the end time of the date is used (YYYY-MM-DDT23:59:59Z). Can be combined with other filters. */
/** Defines the end of the date range for filtering conversations by their creation date. Only conversations that were created on or before this date will appear in the results. The date must be in ISO8601 format, specifically capturing up to the end of the specified date (YYYY-MM-DDT23:59:59Z), to ensure that conversations from the entire end day are included. This parameter can be combined with other filters. If this filter is used, the returned list is sorted by latest conversation creation date in descending order. */
endDate?: string;
/** State for sorting and filtering list of Conversations. Can be `active`, `inactive` or `closed` */
state?: ConversationState;
Expand Down
8 changes: 8 additions & 0 deletions src/rest/flexApi/v1/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ export interface PluginListInstanceCreateOptions {
friendlyName?: string;
/** A descriptive string that you create to describe the plugin resource. It can be up to 500 characters long */
description?: string;
/** The version of Flex Plugins CLI used to create this plugin */
cliVersion?: string;
/** The validation status of the plugin, indicating whether it has been validated */
validateStatus?: string;
}
/**
* Options to pass to each
Expand Down Expand Up @@ -579,6 +583,10 @@ export function PluginListInstance(version: V1): PluginListInstance {
data["FriendlyName"] = params["friendlyName"];
if (params["description"] !== undefined)
data["Description"] = params["description"];
if (params["cliVersion"] !== undefined)
data["CliVersion"] = params["cliVersion"];
if (params["validateStatus"] !== undefined)
data["ValidateStatus"] = params["validateStatus"];

const headers: any = {};
headers["Content-Type"] = "application/x-www-form-urlencoded";
Expand Down
7 changes: 7 additions & 0 deletions src/rest/numbers/v1/portingPortInFetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ interface PortingPortInFetchResource {
target_port_in_date: Date;
target_port_in_time_range_start: string;
target_port_in_time_range_end: string;
port_in_request_status: string;
losing_carrier_information: any;
phone_numbers: Array<any>;
documents: Array<string>;
Expand All @@ -129,6 +130,7 @@ export class PortingPortInFetchInstance {
);
this.targetPortInTimeRangeStart = payload.target_port_in_time_range_start;
this.targetPortInTimeRangeEnd = payload.target_port_in_time_range_end;
this.portInRequestStatus = payload.port_in_request_status;
this.losingCarrierInformation = payload.losing_carrier_information;
this.phoneNumbers = payload.phone_numbers;
this.documents = payload.documents;
Expand Down Expand Up @@ -166,6 +168,10 @@ export class PortingPortInFetchInstance {
* Maximum hour in the future needs to be established with the Ops team for validation.
*/
targetPortInTimeRangeEnd: string;
/**
* The status of the port in request. The possible values are: In progress, Completed, Expired, In review, Waiting for Signature, Action Required, and Canceled.
*/
portInRequestStatus: string;
/**
* The information for the losing carrier.
*/
Expand Down Expand Up @@ -216,6 +222,7 @@ export class PortingPortInFetchInstance {
targetPortInDate: this.targetPortInDate,
targetPortInTimeRangeStart: this.targetPortInTimeRangeStart,
targetPortInTimeRangeEnd: this.targetPortInTimeRangeEnd,
portInRequestStatus: this.portInRequestStatus,
losingCarrierInformation: this.losingCarrierInformation,
phoneNumbers: this.phoneNumbers,
documents: this.documents,
Expand Down
26 changes: 13 additions & 13 deletions src/rest/oauth/v1/token.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,17 @@ export interface TokenListInstanceCreateOptions {
/** A 34 character string that uniquely identifies this OAuth App. */
clientId: string;
/** The credential for confidential OAuth App. */
clientSecret: string;
clientSecret?: string;
/** JWT token related to the authorization code grant type. */
code?: string;
/** The redirect uri */
redirectUri?: string;
/** The targeted audience uri */
audience?: string;
/** JWT token related to refresh access token. */
refreshToken?: string;
/** The scope of token */
scope?: string;
}

export interface TokenSolution {}
Expand Down Expand Up @@ -86,24 +90,20 @@ export function TokenListInstance(version: V1): TokenListInstance {
throw new Error("Required parameter \"params['clientId']\" missing.");
}

if (
params["clientSecret"] === null ||
params["clientSecret"] === undefined
) {
throw new Error("Required parameter \"params['clientSecret']\" missing.");
}

let data: any = {};

data["GrantType"] = params["grantType"];

data["ClientId"] = params["clientId"];

data["ClientSecret"] = params["clientSecret"];
if (params["clientSecret"] !== undefined)
data["ClientSecret"] = params["clientSecret"];
if (params["code"] !== undefined) data["Code"] = params["code"];
if (params["redirectUri"] !== undefined)
data["RedirectUri"] = params["redirectUri"];
if (params["audience"] !== undefined) data["Audience"] = params["audience"];
if (params["refreshToken"] !== undefined)
data["RefreshToken"] = params["refreshToken"];
if (params["scope"] !== undefined) data["Scope"] = params["scope"];

const headers: any = {};
headers["Content-Type"] = "application/x-www-form-urlencoded";
Expand Down Expand Up @@ -148,7 +148,7 @@ interface TokenResource {
refresh_token: string;
id_token: string;
token_type: string;
expires_in: Date;
expires_in: number;
}

export class TokenInstance {
Expand All @@ -157,7 +157,7 @@ export class TokenInstance {
this.refreshToken = payload.refresh_token;
this.idToken = payload.id_token;
this.tokenType = payload.token_type;
this.expiresIn = deserialize.iso8601DateTime(payload.expires_in);
this.expiresIn = payload.expires_in;
}

/**
Expand All @@ -176,7 +176,7 @@ export class TokenInstance {
* Token type
*/
tokenType: string;
expiresIn: Date;
expiresIn: number;

/**
* Provide a user-friendly representation
Expand Down

0 comments on commit 015e56c

Please sign in to comment.