From 3863568b93e87e02d5591227eaebdcd380daf15f Mon Sep 17 00:00:00 2001 From: Shubham Date: Thu, 2 Nov 2023 11:08:03 +0530 Subject: [PATCH] chore: sync with main (#972) * chore: upgraded semver versions (#966) * [Librarian] Regenerated @ 922c1fef02b8c8fbbbe2315aa9b9d1dba49f3fc0 * Release 4.19.0 --------- Co-authored-by: sbansla <104902068+sbansla@users.noreply.github.com> Co-authored-by: Twilio --- src/rest/accounts/V1.ts | 9 +++ .../{api/v2010 => accounts/v1}/safelist.ts | 12 ++-- src/rest/api/V2010.ts | 9 --- .../v2010/account/conference/participant.ts | 4 ++ src/rest/flexApi/v1/configuration.ts | 7 +++ src/rest/intelligence/v2/transcript.ts | 58 +------------------ src/rest/intelligence/v2/transcript/media.ts | 2 +- .../v2/transcript/operatorResult.ts | 8 +-- .../intelligence/v2/transcript/sentence.ts | 6 +- src/rest/lookups/v2/phoneNumber.ts | 10 ++-- .../messaging/v1/service/usAppToPerson.ts | 4 +- src/rest/taskrouter/v1/workspace/task.ts | 27 ++++++++- 12 files changed, 66 insertions(+), 90 deletions(-) rename src/rest/{api/v2010 => accounts/v1}/safelist.ts (96%) diff --git a/src/rest/accounts/V1.ts b/src/rest/accounts/V1.ts index 519cfeffef..aede0cf6c1 100644 --- a/src/rest/accounts/V1.ts +++ b/src/rest/accounts/V1.ts @@ -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 { @@ -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; @@ -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 = diff --git a/src/rest/api/v2010/safelist.ts b/src/rest/accounts/v1/safelist.ts similarity index 96% rename from src/rest/api/v2010/safelist.ts rename to src/rest/accounts/v1/safelist.ts index f00fe1397d..f2a784d6db 100644 --- a/src/rest/api/v2010/safelist.ts +++ b/src/rest/accounts/v1/safelist.ts @@ -4,7 +4,7 @@ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * - * Twilio - Api + * Twilio - Accounts * This is the public Twilio REST API. * * NOTE: This class is auto generated by OpenAPI Generator. @@ -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"; @@ -45,7 +45,7 @@ export interface SafelistListInstanceFetchOptions { export interface SafelistSolution {} export interface SafelistListInstance { - _version: V2010; + _version: V1; _solution: SafelistSolution; _uri: string; @@ -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, @@ -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; } diff --git a/src/rest/api/V2010.ts b/src/rest/api/V2010.ts index 3c05716553..c2b5127658 100644 --- a/src/rest/api/V2010.ts +++ b/src/rest/api/V2010.ts @@ -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 { @@ -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; @@ -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 = diff --git a/src/rest/api/v2010/account/conference/participant.ts b/src/rest/api/v2010/account/conference/participant.ts index 6b46e24c06..259ce27cd2 100644 --- a/src/rest/api/v2010/account/conference/participant.ts +++ b/src/rest/api/v2010/account/conference/participant.ts @@ -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 @@ -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"; diff --git a/src/rest/flexApi/v1/configuration.ts b/src/rest/flexApi/v1/configuration.ts index 6ff89cd50f..599714e6f1 100644 --- a/src/rest/flexApi/v1/configuration.ts +++ b/src/rest/flexApi/v1/configuration.ts @@ -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 { @@ -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 = {}; } @@ -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 = @@ -508,6 +514,7 @@ export class ConfigurationInstance { flexUiStatusReport: this.flexUiStatusReport, agentConvEndMethods: this.agentConvEndMethods, citrixVoiceVdi: this.citrixVoiceVdi, + offlineConfig: this.offlineConfig, }; } diff --git a/src/rest/intelligence/v2/transcript.ts b/src/rest/intelligence/v2/transcript.ts index 633cfc2ca0..a91ba8f79a 100644 --- a/src/rest/intelligence/v2/transcript.ts +++ b/src/rest/intelligence/v2/transcript.ts @@ -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 */ @@ -161,18 +153,6 @@ export interface TranscriptContext { fetch( callback?: (error: Error | null, item?: TranscriptInstance) => any ): Promise; - /** - * 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; /** * Provide a user-friendly representation @@ -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 { - 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( @@ -429,25 +390,8 @@ export class TranscriptInstance { */ fetch( callback?: (error: Error | null, item?: TranscriptInstance) => any - ): Promise; - /** - * 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; - - fetch( - params?: any, - callback?: (error: Error | null, item?: TranscriptInstance) => any ): Promise { - return this._proxy.fetch(params, callback); + return this._proxy.fetch(callback); } /** diff --git a/src/rest/intelligence/v2/transcript/media.ts b/src/rest/intelligence/v2/transcript/media.ts index 68a391c618..0a0da5521d 100644 --- a/src/rest/intelligence/v2/transcript/media.ts +++ b/src/rest/intelligence/v2/transcript/media.ts @@ -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; } diff --git a/src/rest/intelligence/v2/transcript/operatorResult.ts b/src/rest/intelligence/v2/transcript/operatorResult.ts index 94ddf28bcb..fc64bf2aac 100644 --- a/src/rest/intelligence/v2/transcript/operatorResult.ts +++ b/src/rest/intelligence/v2/transcript/operatorResult.ts @@ -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; @@ -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; @@ -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; diff --git a/src/rest/intelligence/v2/transcript/sentence.ts b/src/rest/intelligence/v2/transcript/sentence.ts index 397fee373f..d9d1478ae8 100644 --- a/src/rest/intelligence/v2/transcript/sentence.ts +++ b/src/rest/intelligence/v2/transcript/sentence.ts @@ -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; @@ -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; @@ -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; diff --git a/src/rest/lookups/v2/phoneNumber.ts b/src/rest/lookups/v2/phoneNumber.ts index 43098ec770..8a7151eb44 100644 --- a/src/rest/lookups/v2/phoneNumber.ts +++ b/src/rest/lookups/v2/phoneNumber.ts @@ -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; } @@ -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 }; @@ -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. */ @@ -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, }; } diff --git a/src/rest/messaging/v1/service/usAppToPerson.ts b/src/rest/messaging/v1/service/usAppToPerson.ts index 11ba683049..ee9529734f 100644 --- a/src/rest/messaging/v1/service/usAppToPerson.ts +++ b/src/rest/messaging/v1/service/usAppToPerson.ts @@ -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; /** A2P Campaign Use Case. Examples: [ 2FA, EMERGENCY, MARKETING..] */ usAppToPersonUsecase: string; @@ -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; /** diff --git a/src/rest/taskrouter/v1/workspace/task.ts b/src/rest/taskrouter/v1/workspace/task.ts index bbb18889f7..d86c38d4fb 100644 --- a/src/rest/taskrouter/v1/workspace/task.ts +++ b/src/rest/taskrouter/v1/workspace/task.ts @@ -53,6 +53,8 @@ export interface TaskContextUpdateOptions { priority?: number; /** When MultiTasking is enabled, specify the TaskChannel with the task to update. Can be the TaskChannel\\\'s SID or its `unique_name`, such as `voice`, `sms`, or `default`. */ taskChannel?: string; + /** The task\\\'s new virtual start time value. When supplied, the Task takes on the specified virtual start time. Value can\\\'t be in the future. */ + virtualStartTime?: Date; } /** @@ -69,6 +71,8 @@ export interface TaskListInstanceCreateOptions { workflowSid?: string; /** A URL-encoded JSON string with the attributes of the new task. This value is passed to the Workflow\\\'s `assignment_callback_url` when the Task is assigned to a Worker. For example: `{ \\\"task_type\\\": \\\"call\\\", \\\"twilio_call_sid\\\": \\\"CAxxx\\\", \\\"customer_ticket_number\\\": \\\"12345\\\" }`. */ attributes?: string; + /** The virtual start time to assign the new task and override the default. When supplied, the new task will have this virtual start time. When not supplied, the new task will have the virtual start time equal to `date_created`. Value can\\\'t be in the future. */ + virtualStartTime?: Date; } /** * Options to pass to each @@ -88,7 +92,7 @@ export interface TaskListInstanceEachOptions { taskQueueName?: string; /** The attributes of the Tasks to read. Returns the Tasks that match the attributes specified in this parameter. */ evaluateTaskAttributes?: string; - /** How to order the returned Task resources. y default, Tasks are sorted by ascending DateCreated. This value is specified as: `Attribute:Order`, where `Attribute` can be either `Priority` or `DateCreated` and `Order` can be either `asc` or `desc`. For example, `Priority:desc` returns Tasks ordered in descending order of their Priority. Multiple sort orders can be specified in a comma-separated list such as `Priority:desc,DateCreated:asc`, which returns the Tasks in descending Priority order and ascending DateCreated Order. */ + /** How to order the returned Task resources. By default, Tasks are sorted by ascending DateCreated. This value is specified as: `Attribute:Order`, where `Attribute` can be either `DateCreated`, `Priority`, or `VirtualStartTime` and `Order` can be either `asc` or `desc`. For example, `Priority:desc` returns Tasks ordered in descending order of their Priority. Pairings of sort orders can be specified in a comma-separated list such as `Priority:desc,DateCreated:asc`, which returns the Tasks in descending Priority order and ascending DateCreated Order. The only ordering pairing not allowed is DateCreated and VirtualStartTime. */ ordering?: string; /** Whether to read Tasks with addons. If `true`, returns only Tasks with addons. If `false`, returns only Tasks without addons. */ hasAddons?: boolean; @@ -120,7 +124,7 @@ export interface TaskListInstanceOptions { taskQueueName?: string; /** The attributes of the Tasks to read. Returns the Tasks that match the attributes specified in this parameter. */ evaluateTaskAttributes?: string; - /** How to order the returned Task resources. y default, Tasks are sorted by ascending DateCreated. This value is specified as: `Attribute:Order`, where `Attribute` can be either `Priority` or `DateCreated` and `Order` can be either `asc` or `desc`. For example, `Priority:desc` returns Tasks ordered in descending order of their Priority. Multiple sort orders can be specified in a comma-separated list such as `Priority:desc,DateCreated:asc`, which returns the Tasks in descending Priority order and ascending DateCreated Order. */ + /** How to order the returned Task resources. By default, Tasks are sorted by ascending DateCreated. This value is specified as: `Attribute:Order`, where `Attribute` can be either `DateCreated`, `Priority`, or `VirtualStartTime` and `Order` can be either `asc` or `desc`. For example, `Priority:desc` returns Tasks ordered in descending order of their Priority. Pairings of sort orders can be specified in a comma-separated list such as `Priority:desc,DateCreated:asc`, which returns the Tasks in descending Priority order and ascending DateCreated Order. The only ordering pairing not allowed is DateCreated and VirtualStartTime. */ ordering?: string; /** Whether to read Tasks with addons. If `true`, returns only Tasks with addons. If `false`, returns only Tasks without addons. */ hasAddons?: boolean; @@ -148,7 +152,7 @@ export interface TaskListInstancePageOptions { taskQueueName?: string; /** The attributes of the Tasks to read. Returns the Tasks that match the attributes specified in this parameter. */ evaluateTaskAttributes?: string; - /** How to order the returned Task resources. y default, Tasks are sorted by ascending DateCreated. This value is specified as: `Attribute:Order`, where `Attribute` can be either `Priority` or `DateCreated` and `Order` can be either `asc` or `desc`. For example, `Priority:desc` returns Tasks ordered in descending order of their Priority. Multiple sort orders can be specified in a comma-separated list such as `Priority:desc,DateCreated:asc`, which returns the Tasks in descending Priority order and ascending DateCreated Order. */ + /** How to order the returned Task resources. By default, Tasks are sorted by ascending DateCreated. This value is specified as: `Attribute:Order`, where `Attribute` can be either `DateCreated`, `Priority`, or `VirtualStartTime` and `Order` can be either `asc` or `desc`. For example, `Priority:desc` returns Tasks ordered in descending order of their Priority. Pairings of sort orders can be specified in a comma-separated list such as `Priority:desc,DateCreated:asc`, which returns the Tasks in descending Priority order and ascending DateCreated Order. The only ordering pairing not allowed is DateCreated and VirtualStartTime. */ ordering?: string; /** Whether to read Tasks with addons. If `true`, returns only Tasks with addons. If `false`, returns only Tasks without addons. */ hasAddons?: boolean; @@ -347,6 +351,10 @@ export class TaskContextImpl implements TaskContext { if (params["priority"] !== undefined) data["Priority"] = params["priority"]; if (params["taskChannel"] !== undefined) data["TaskChannel"] = params["taskChannel"]; + if (params["virtualStartTime"] !== undefined) + data["VirtualStartTime"] = serialize.iso8601DateTime( + params["virtualStartTime"] + ); const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; @@ -419,6 +427,7 @@ interface TaskResource { workspace_sid: string; url: string; links: Record; + virtual_start_time: Date; } export class TaskInstance { @@ -454,6 +463,9 @@ export class TaskInstance { this.workspaceSid = payload.workspace_sid; this.url = payload.url; this.links = payload.links; + this.virtualStartTime = deserialize.iso8601DateTime( + payload.virtual_start_time + ); this._solution = { workspaceSid, sid: sid || this.sid }; } @@ -539,6 +551,10 @@ export class TaskInstance { * The URLs of related resources. */ links: Record; + /** + * The date and time in GMT indicating the ordering for routing of the Task specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. + */ + virtualStartTime: Date; private get _proxy(): TaskContext { this._context = @@ -659,6 +675,7 @@ export class TaskInstance { workspaceSid: this.workspaceSid, url: this.url, links: this.links, + virtualStartTime: this.virtualStartTime, }; } @@ -819,6 +836,10 @@ export function TaskListInstance( data["WorkflowSid"] = params["workflowSid"]; if (params["attributes"] !== undefined) data["Attributes"] = params["attributes"]; + if (params["virtualStartTime"] !== undefined) + data["VirtualStartTime"] = serialize.iso8601DateTime( + params["virtualStartTime"] + ); const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded";