Skip to content

Commit

Permalink
chore: sync with main (#972)
Browse files Browse the repository at this point in the history
* chore: upgraded semver versions (#966)

* [Librarian] Regenerated @ 922c1fef02b8c8fbbbe2315aa9b9d1dba49f3fc0

* Release 4.19.0

---------

Co-authored-by: sbansla <[email protected]>
Co-authored-by: Twilio <[email protected]>
  • Loading branch information
3 people authored Nov 2, 2023
1 parent d0fabfd commit 3863568
Show file tree
Hide file tree
Showing 12 changed files with 66 additions and 90 deletions.
9 changes: 9 additions & 0 deletions src/rest/accounts/V1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import AccountsBase from "../AccountsBase";
import Version from "../../base/Version";
import { AuthTokenPromotionListInstance } from "./v1/authTokenPromotion";
import { CredentialListInstance } from "./v1/credential";
import { SafelistListInstance } from "./v1/safelist";
import { SecondaryAuthTokenListInstance } from "./v1/secondaryAuthToken";

export default class V1 extends Version {
Expand All @@ -32,6 +33,8 @@ export default class V1 extends Version {
protected _authTokenPromotion?: AuthTokenPromotionListInstance;
/** credentials - { Twilio.Accounts.V1.CredentialListInstance } resource */
protected _credentials?: CredentialListInstance;
/** safelist - { Twilio.Accounts.V1.SafelistListInstance } resource */
protected _safelist?: SafelistListInstance;
/** secondaryAuthToken - { Twilio.Accounts.V1.SecondaryAuthTokenListInstance } resource */
protected _secondaryAuthToken?: SecondaryAuthTokenListInstance;

Expand All @@ -48,6 +51,12 @@ export default class V1 extends Version {
return this._credentials;
}

/** Getter for safelist resource */
get safelist(): SafelistListInstance {
this._safelist = this._safelist || SafelistListInstance(this);
return this._safelist;
}

/** Getter for secondaryAuthToken resource */
get secondaryAuthToken(): SecondaryAuthTokenListInstance {
this._secondaryAuthToken =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
* | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
*
* Twilio - Api
* Twilio - Accounts
* This is the public Twilio REST API.
*
* NOTE: This class is auto generated by OpenAPI Generator.
Expand All @@ -13,7 +13,7 @@
*/

import { inspect, InspectOptions } from "util";
import V2010 from "../V2010";
import V1 from "../V1";
const deserialize = require("../../../base/deserialize");
const serialize = require("../../../base/serialize");
import { isValidPathParam } from "../../../base/utility";
Expand Down Expand Up @@ -45,7 +45,7 @@ export interface SafelistListInstanceFetchOptions {
export interface SafelistSolution {}

export interface SafelistListInstance {
_version: V2010;
_version: V1;
_solution: SafelistSolution;
_uri: string;

Expand Down Expand Up @@ -115,12 +115,12 @@ export interface SafelistListInstance {
[inspect.custom](_depth: any, options: InspectOptions): any;
}

export function SafelistListInstance(version: V2010): SafelistListInstance {
export function SafelistListInstance(version: V1): SafelistListInstance {
const instance = {} as SafelistListInstance;

instance._version = version;
instance._solution = {};
instance._uri = `/SafeList/Numbers.json`;
instance._uri = `/SafeList/Numbers`;

instance.create = function create(
params: SafelistListInstanceCreateOptions,
Expand Down Expand Up @@ -256,7 +256,7 @@ interface SafelistResource {
}

export class SafelistInstance {
constructor(protected _version: V2010, payload: SafelistResource) {
constructor(protected _version: V1, payload: SafelistResource) {
this.sid = payload.sid;
this.phoneNumber = payload.phone_number;
}
Expand Down
9 changes: 0 additions & 9 deletions src/rest/api/V2010.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import ApiBase from "../ApiBase";
import Version from "../../base/Version";
import { AccountListInstance } from "./v2010/account";
import { SafelistListInstance } from "./v2010/safelist";
import { AccountContext } from "./v2010/account";

export default class V2010 extends Version {
Expand All @@ -30,8 +29,6 @@ export default class V2010 extends Version {

/** accounts - { Twilio.Api.V2010.AccountListInstance } resource */
protected _accounts?: AccountListInstance;
/** safelist - { Twilio.Api.V2010.SafelistListInstance } resource */
protected _safelist?: SafelistListInstance;
/** account - { Twilio.Api.V2010.AccountContext } resource */
protected _account?: AccountContext;

Expand All @@ -41,12 +38,6 @@ export default class V2010 extends Version {
return this._accounts;
}

/** Getter for safelist resource */
get safelist(): SafelistListInstance {
this._safelist = this._safelist || SafelistListInstance(this);
return this._safelist;
}

/** Getter for account resource */
get account(): AccountContext {
this._account =
Expand Down
4 changes: 4 additions & 0 deletions src/rest/api/v2010/account/conference/participant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,8 @@ export interface ParticipantListInstanceCreateOptions {
amdStatusCallbackMethod?: string;
/** Whether to trim any leading and trailing silence from the participant recording. Can be: `trim-silence` or `do-not-trim` and the default is `trim-silence`. */
trim?: string;
/** A token string needed to invoke a forwarded call. A call_token is generated when an incoming call is received on a Twilio number. Pass an incoming call\\\'s call_token value to a forwarded call via the call_token parameter when creating a new call. A forwarded call should bear the same CallerID of the original incoming call. */
callToken?: string;
}
/**
* Options to pass to each
Expand Down Expand Up @@ -887,6 +889,8 @@ export function ParticipantListInstance(
if (params["amdStatusCallbackMethod"] !== undefined)
data["AmdStatusCallbackMethod"] = params["amdStatusCallbackMethod"];
if (params["trim"] !== undefined) data["Trim"] = params["trim"];
if (params["callToken"] !== undefined)
data["CallToken"] = params["callToken"];

const headers: any = {};
headers["Content-Type"] = "application/x-www-form-urlencoded";
Expand Down
7 changes: 7 additions & 0 deletions src/rest/flexApi/v1/configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ interface ConfigurationResource {
flex_ui_status_report: any;
agent_conv_end_methods: any;
citrix_voice_vdi: any;
offline_config: any;
}

export class ConfigurationInstance {
Expand Down Expand Up @@ -228,6 +229,7 @@ export class ConfigurationInstance {
this.flexUiStatusReport = payload.flex_ui_status_report;
this.agentConvEndMethods = payload.agent_conv_end_methods;
this.citrixVoiceVdi = payload.citrix_voice_vdi;
this.offlineConfig = payload.offline_config;

this._solution = {};
}
Expand Down Expand Up @@ -417,6 +419,10 @@ export class ConfigurationInstance {
* Citrix voice vdi configuration and settings.
*/
citrixVoiceVdi: any;
/**
* Presence and presence ttl configuration
*/
offlineConfig: any;

private get _proxy(): ConfigurationContext {
this._context =
Expand Down Expand Up @@ -508,6 +514,7 @@ export class ConfigurationInstance {
flexUiStatusReport: this.flexUiStatusReport,
agentConvEndMethods: this.agentConvEndMethods,
citrixVoiceVdi: this.citrixVoiceVdi,
offlineConfig: this.offlineConfig,
};
}

Expand Down
58 changes: 1 addition & 57 deletions src/rest/intelligence/v2/transcript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,6 @@ export type TranscriptStatus =
| "failed"
| "canceled";

/**
* Options to pass to fetch a TranscriptInstance
*/
export interface TranscriptContextFetchOptions {
/** Grant access to PII Redacted/Unredacted Transcript. The default is `true` to access redacted Transcript. */
redacted?: boolean;
}

/**
* Options to pass to create a TranscriptInstance
*/
Expand Down Expand Up @@ -161,18 +153,6 @@ export interface TranscriptContext {
fetch(
callback?: (error: Error | null, item?: TranscriptInstance) => any
): Promise<TranscriptInstance>;
/**
* Fetch a TranscriptInstance
*
* @param params - Parameter for request
* @param callback - Callback to handle processed record
*
* @returns Resolves to processed TranscriptInstance
*/
fetch(
params: TranscriptContextFetchOptions,
callback?: (error: Error | null, item?: TranscriptInstance) => any
): Promise<TranscriptInstance>;

/**
* Provide a user-friendly representation
Expand Down Expand Up @@ -240,32 +220,13 @@ export class TranscriptContextImpl implements TranscriptContext {
}

fetch(
params?:
| TranscriptContextFetchOptions
| ((error: Error | null, item?: TranscriptInstance) => any),
callback?: (error: Error | null, item?: TranscriptInstance) => any
): Promise<TranscriptInstance> {
if (params instanceof Function) {
callback = params;
params = {};
} else {
params = params || {};
}

let data: any = {};

if (params["redacted"] !== undefined)
data["Redacted"] = serialize.bool(params["redacted"]);

const headers: any = {};

const instance = this;
let operationVersion = instance._version,
operationPromise = operationVersion.fetch({
uri: instance._uri,
method: "get",
params: data,
headers,
});

operationPromise = operationPromise.then(
Expand Down Expand Up @@ -429,25 +390,8 @@ export class TranscriptInstance {
*/
fetch(
callback?: (error: Error | null, item?: TranscriptInstance) => any
): Promise<TranscriptInstance>;
/**
* Fetch a TranscriptInstance
*
* @param params - Parameter for request
* @param callback - Callback to handle processed record
*
* @returns Resolves to processed TranscriptInstance
*/
fetch(
params: TranscriptContextFetchOptions,
callback?: (error: Error | null, item?: TranscriptInstance) => any
): Promise<TranscriptInstance>;

fetch(
params?: any,
callback?: (error: Error | null, item?: TranscriptInstance) => any
): Promise<TranscriptInstance> {
return this._proxy.fetch(params, callback);
return this._proxy.fetch(callback);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/rest/intelligence/v2/transcript/media.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { isValidPathParam } from "../../../../base/utility";
* Options to pass to fetch a MediaInstance
*/
export interface MediaContextFetchOptions {
/** Grant access to PII Redacted/Unredacted Media. The default is `true` to access redacted media. */
/** Grant access to PII Redacted/Unredacted Media. If redaction is enabled, the default is `true` to access redacted media. */
redacted?: boolean;
}

Expand Down
8 changes: 4 additions & 4 deletions src/rest/intelligence/v2/transcript/operatorResult.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ export type OperatorResultOperatorType =
* Options to pass to fetch a OperatorResultInstance
*/
export interface OperatorResultContextFetchOptions {
/** Grant access to PII redacted/unredacted Language Understanding operator. The default is True. */
/** Grant access to PII redacted/unredacted Language Understanding operator. If redaction is enabled, the default is True. */
redacted?: boolean;
}
/**
* Options to pass to each
*/
export interface OperatorResultListInstanceEachOptions {
/** Grant access to PII redacted/unredacted Language Understanding operator. The default is True. */
/** Grant access to PII redacted/unredacted Language Understanding operator. If redaction is enabled, the default is True. */
redacted?: boolean;
/** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
pageSize?: number;
Expand All @@ -57,7 +57,7 @@ export interface OperatorResultListInstanceEachOptions {
* Options to pass to list
*/
export interface OperatorResultListInstanceOptions {
/** Grant access to PII redacted/unredacted Language Understanding operator. The default is True. */
/** Grant access to PII redacted/unredacted Language Understanding operator. If redaction is enabled, the default is True. */
redacted?: boolean;
/** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
pageSize?: number;
Expand All @@ -69,7 +69,7 @@ export interface OperatorResultListInstanceOptions {
* Options to pass to page
*/
export interface OperatorResultListInstancePageOptions {
/** Grant access to PII redacted/unredacted Language Understanding operator. The default is True. */
/** Grant access to PII redacted/unredacted Language Understanding operator. If redaction is enabled, the default is True. */
redacted?: boolean;
/** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
pageSize?: number;
Expand Down
6 changes: 3 additions & 3 deletions src/rest/intelligence/v2/transcript/sentence.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import { isValidPathParam } from "../../../../base/utility";
* Options to pass to each
*/
export interface SentenceListInstanceEachOptions {
/** Grant access to PII Redacted/Unredacted Sentences. The default is `true` to access redacted sentences. */
/** Grant access to PII Redacted/Unredacted Sentences. If redaction is enabled, the default is `true` to access redacted sentences. */
redacted?: boolean;
/** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
pageSize?: number;
Expand All @@ -40,7 +40,7 @@ export interface SentenceListInstanceEachOptions {
* Options to pass to list
*/
export interface SentenceListInstanceOptions {
/** Grant access to PII Redacted/Unredacted Sentences. The default is `true` to access redacted sentences. */
/** Grant access to PII Redacted/Unredacted Sentences. If redaction is enabled, the default is `true` to access redacted sentences. */
redacted?: boolean;
/** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
pageSize?: number;
Expand All @@ -52,7 +52,7 @@ export interface SentenceListInstanceOptions {
* Options to pass to page
*/
export interface SentenceListInstancePageOptions {
/** Grant access to PII Redacted/Unredacted Sentences. The default is `true` to access redacted sentences. */
/** Grant access to PII Redacted/Unredacted Sentences. If redaction is enabled, the default is `true` to access redacted sentences. */
redacted?: boolean;
/** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
pageSize?: number;
Expand Down
10 changes: 5 additions & 5 deletions src/rest/lookups/v2/phoneNumber.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ interface PhoneNumberResource {
identity_match: any;
reassigned_number: any;
sms_pumping_risk: any;
disposable_phone_number_risk: any;
phone_number_quality_score: any;
url: string;
}

Expand All @@ -229,7 +229,7 @@ export class PhoneNumberInstance {
this.identityMatch = payload.identity_match;
this.reassignedNumber = payload.reassigned_number;
this.smsPumpingRisk = payload.sms_pumping_risk;
this.disposablePhoneNumberRisk = payload.disposable_phone_number_risk;
this.phoneNumberQualityScore = payload.phone_number_quality_score;
this.url = payload.url;

this._solution = { phoneNumber: phoneNumber || this.phoneNumber };
Expand Down Expand Up @@ -292,9 +292,9 @@ export class PhoneNumberInstance {
*/
smsPumpingRisk: any;
/**
* An object that contains information on if a mobile phone number could be a disposable or burner number.
* An object that contains information of a mobile phone number quality score. Quality score will return a risk score about the phone number.
*/
disposablePhoneNumberRisk: any;
phoneNumberQualityScore: any;
/**
* The absolute URL of the resource.
*/
Expand Down Expand Up @@ -358,7 +358,7 @@ export class PhoneNumberInstance {
identityMatch: this.identityMatch,
reassignedNumber: this.reassignedNumber,
smsPumpingRisk: this.smsPumpingRisk,
disposablePhoneNumberRisk: this.disposablePhoneNumberRisk,
phoneNumberQualityScore: this.phoneNumberQualityScore,
url: this.url,
};
}
Expand Down
4 changes: 2 additions & 2 deletions src/rest/messaging/v1/service/usAppToPerson.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export interface UsAppToPersonListInstanceCreateOptions {
description: string;
/** Required for all Campaigns. Details around how a consumer opts-in to their campaign, therefore giving consent to receive their messages. If multiple opt-in methods can be used for the same campaign, they must all be listed. 40 character minimum. 2048 character maximum. */
messageFlow: string;
/** Message samples, at least 1 and up to 5 sample messages (at least 2 for sole proprietor), >=20 chars, <=1024 chars each. */
/** An array of sample message strings, min two and max five. Min length for each sample: 20 chars. Max length for each sample: 1024 chars. */
messageSamples: Array<string>;
/** A2P Campaign Use Case. Examples: [ 2FA, EMERGENCY, MARKETING..] */
usAppToPersonUsecase: string;
Expand Down Expand Up @@ -293,7 +293,7 @@ export class UsAppToPersonInstance {
*/
description: string;
/**
* Message samples, at least 1 and up to 5 sample messages (at least 2 for starter/sole proprietor), >=20 chars, <=1024 chars each.
* An array of sample message strings, min two and max five. Min length for each sample: 20 chars. Max length for each sample: 1024 chars.
*/
messageSamples: Array<string>;
/**
Expand Down
Loading

0 comments on commit 3863568

Please sign in to comment.