diff --git a/CHANGES.md b/CHANGES.md index c4af2075b..5b2f38632 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,6 +1,12 @@ twilio-node changelog ===================== +[2025-01-09] Version 5.4.1 +-------------------------- +**Numbers** +- Change beta feature flag to use v2/BulkHostedNumberOrders + + [2024-12-12] Version 5.4.0 -------------------------- **Library - Chore** diff --git a/src/rest/api/v2010/account/call/transcription.ts b/src/rest/api/v2010/account/call/transcription.ts index 28aa0abe4..0ae47ae19 100644 --- a/src/rest/api/v2010/account/call/transcription.ts +++ b/src/rest/api/v2010/account/call/transcription.ts @@ -65,7 +65,7 @@ export interface TranscriptionListInstanceCreateOptions { hints?: string; /** The provider will add punctuation to recognition result */ enableAutomaticPunctuation?: boolean; - /** The SID or the unique name of the [IntelligentService](https://www.twilio.com/docs/voice/intelligence/api/service-resource) to process the transcription. */ + /** The SID or the unique name of the [Voice Intelligence Service](https://www.twilio.com/docs/voice/intelligence/api/service-resource) to process the transcription. */ intelligenceService?: string; } diff --git a/src/rest/assistants/v1/assistant.ts b/src/rest/assistants/v1/assistant.ts index 824bbc2b4..25e723aa1 100644 --- a/src/rest/assistants/v1/assistant.ts +++ b/src/rest/assistants/v1/assistant.ts @@ -60,7 +60,7 @@ export class AssistantsV1ServiceKnowledge { /** * The description of knowledge. */ - "id"?: string; + "id": string; /** * The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Knowledge resource. */ @@ -72,7 +72,7 @@ export class AssistantsV1ServiceKnowledge { /** * The name of the knowledge source. */ - "name"?: string; + "name": string; /** * The status of processing the knowledge source (\'QUEUED\', \'PROCESSING\', \'COMPLETED\', \'FAILED\') */ @@ -80,19 +80,23 @@ export class AssistantsV1ServiceKnowledge { /** * The type of knowledge source (\'Web\', \'Database\', \'Text\', \'File\') */ - "type"?: string; + "type": string; /** * The url of the knowledge resource. */ "url"?: string; + /** + * The embedding model to be used for the knowledge source. + */ + "embedding_model"?: string; /** * The date and time in GMT when the Knowledge was created specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. */ - "date_created"?: Date; + "date_created": Date; /** * The date and time in GMT when the Knowledge was last updated specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. */ - "date_updated"?: Date; + "date_updated": Date; } export class AssistantsV1ServiceSegmentCredential { diff --git a/src/rest/assistants/v1/assistant/assistantsKnowledge.ts b/src/rest/assistants/v1/assistant/assistantsKnowledge.ts index ff61ff59b..50dcfb900 100644 --- a/src/rest/assistants/v1/assistant/assistantsKnowledge.ts +++ b/src/rest/assistants/v1/assistant/assistantsKnowledge.ts @@ -190,6 +190,7 @@ interface AssistantsKnowledgeResource { status: string; type: string; url: string; + embedding_model: string; date_created: Date; date_updated: Date; } @@ -212,6 +213,7 @@ export class AssistantsKnowledgeInstance { this.status = payload.status; this.type = payload.type; this.url = payload.url; + this.embeddingModel = payload.embedding_model; this.dateCreated = deserialize.iso8601DateTime(payload.date_created); this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); @@ -250,6 +252,10 @@ export class AssistantsKnowledgeInstance { * The url of the knowledge resource. */ url: string; + /** + * The embedding model to be used for the knowledge source. + */ + embeddingModel: string; /** * The date and time in GMT when the Knowledge was created specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. */ @@ -311,6 +317,7 @@ export class AssistantsKnowledgeInstance { status: this.status, type: this.type, url: this.url, + embeddingModel: this.embeddingModel, dateCreated: this.dateCreated, dateUpdated: this.dateUpdated, }; diff --git a/src/rest/assistants/v1/knowledge.ts b/src/rest/assistants/v1/knowledge.ts index 9a2554030..59114493d 100644 --- a/src/rest/assistants/v1/knowledge.ts +++ b/src/rest/assistants/v1/knowledge.ts @@ -44,6 +44,10 @@ export class AssistantsV1ServiceCreateKnowledgeRequest { * The type of the knowledge source. */ "type": string; + /** + * The embedding model to be used for the knowledge source. It\'s required for \'Database\' type but disallowed for other types. + */ + "embedding_model"?: string; } export class AssistantsV1ServiceCreatePolicyRequest { @@ -84,6 +88,10 @@ export class AssistantsV1ServiceUpdateKnowledgeRequest { * The description of the knowledge source. */ "type"?: string; + /** + * The embedding model to be used for the knowledge source. It\'s only applicable to \'Database\' type. + */ + "embedding_model"?: string; } /** @@ -353,6 +361,7 @@ interface KnowledgeResource { status: string; type: string; url: string; + embedding_model: string; date_created: Date; date_updated: Date; } @@ -370,6 +379,7 @@ export class KnowledgeInstance { this.status = payload.status; this.type = payload.type; this.url = payload.url; + this.embeddingModel = payload.embedding_model; this.dateCreated = deserialize.iso8601DateTime(payload.date_created); this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); @@ -408,6 +418,10 @@ export class KnowledgeInstance { * The url of the knowledge resource. */ url: string; + /** + * The embedding model to be used for the knowledge source. + */ + embeddingModel: string; /** * The date and time in GMT when the Knowledge was created specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. */ @@ -511,6 +525,7 @@ export class KnowledgeInstance { status: this.status, type: this.type, url: this.url, + embeddingModel: this.embeddingModel, dateCreated: this.dateCreated, dateUpdated: this.dateUpdated, }; diff --git a/src/rest/content/v1/content.ts b/src/rest/content/v1/content.ts index 25f2835cc..3d3ccffd0 100644 --- a/src/rest/content/v1/content.ts +++ b/src/rest/content/v1/content.ts @@ -116,13 +116,6 @@ export class FlowsPage { export class FlowsPageComponent { "label": string; "type": string; - "text"?: string; - "options"?: Array; -} - -export class FlowsPageComponentSelectItem { - "id": string; - "title": string; } export class ListItem { diff --git a/src/rest/conversations/v1/addressConfiguration.ts b/src/rest/conversations/v1/addressConfiguration.ts index 58b6766b6..8b6105c72 100644 --- a/src/rest/conversations/v1/addressConfiguration.ts +++ b/src/rest/conversations/v1/addressConfiguration.ts @@ -32,7 +32,8 @@ export type AddressConfigurationType = | "whatsapp" | "messenger" | "gbm" - | "email"; + | "email" + | "rcs"; /** * Options to pass to update a AddressConfigurationInstance diff --git a/src/rest/insights/v1/call/callSummary.ts b/src/rest/insights/v1/call/callSummary.ts index 6a50fdead..c567d06ef 100644 --- a/src/rest/insights/v1/call/callSummary.ts +++ b/src/rest/insights/v1/call/callSummary.ts @@ -37,7 +37,12 @@ export type CallSummaryCallState = | "answered" | "undialed"; -export type CallSummaryCallType = "carrier" | "sip" | "trunking" | "client"; +export type CallSummaryCallType = + | "carrier" + | "sip" + | "trunking" + | "client" + | "whatsapp"; export type CallSummaryProcessingState = "complete" | "partial"; diff --git a/src/rest/insights/v1/callSummaries.ts b/src/rest/insights/v1/callSummaries.ts index 164fde7f6..7d2e8da8b 100644 --- a/src/rest/insights/v1/callSummaries.ts +++ b/src/rest/insights/v1/callSummaries.ts @@ -39,7 +39,12 @@ export type CallSummariesCallState = | "answered" | "undialed"; -export type CallSummariesCallType = "carrier" | "sip" | "trunking" | "client"; +export type CallSummariesCallType = + | "carrier" + | "sip" + | "trunking" + | "client" + | "whatsapp"; export type CallSummariesProcessingState = "complete" | "partial"; diff --git a/src/rest/numbers/V1.ts b/src/rest/numbers/V1.ts index 148a24ce4..af82776f7 100644 --- a/src/rest/numbers/V1.ts +++ b/src/rest/numbers/V1.ts @@ -21,8 +21,8 @@ import { PortingPortInPhoneNumberListInstance } from "./v1/portingPortInPhoneNum import { PortingPortabilityListInstance } from "./v1/portingPortability"; import { PortingWebhookConfigurationListInstance } from "./v1/portingWebhookConfiguration"; import { PortingWebhookConfigurationDeleteListInstance } from "./v1/portingWebhookConfigurationDelete"; +import { PortingWebhookConfigurationFetchListInstance } from "./v1/portingWebhookConfigurationFetch"; import { SigningRequestConfigurationListInstance } from "./v1/signingRequestConfiguration"; -import { WebhookListInstance } from "./v1/webhook"; export default class V1 extends Version { /** @@ -48,10 +48,10 @@ export default class V1 extends Version { protected _portingWebhookConfigurations?: PortingWebhookConfigurationListInstance; /** portingWebhookConfigurationsDelete - { Twilio.Numbers.V1.PortingWebhookConfigurationDeleteListInstance } resource */ protected _portingWebhookConfigurationsDelete?: PortingWebhookConfigurationDeleteListInstance; + /** portingWebhookConfigurationFetch - { Twilio.Numbers.V1.PortingWebhookConfigurationFetchListInstance } resource */ + protected _portingWebhookConfigurationFetch?: PortingWebhookConfigurationFetchListInstance; /** signingRequestConfigurations - { Twilio.Numbers.V1.SigningRequestConfigurationListInstance } resource */ protected _signingRequestConfigurations?: SigningRequestConfigurationListInstance; - /** webhook - { Twilio.Numbers.V1.WebhookListInstance } resource */ - protected _webhook?: WebhookListInstance; /** Getter for bulkEligibilities resource */ get bulkEligibilities(): BulkEligibilityListInstance { @@ -104,6 +104,14 @@ export default class V1 extends Version { return this._portingWebhookConfigurationsDelete; } + /** Getter for portingWebhookConfigurationFetch resource */ + get portingWebhookConfigurationFetch(): PortingWebhookConfigurationFetchListInstance { + this._portingWebhookConfigurationFetch = + this._portingWebhookConfigurationFetch || + PortingWebhookConfigurationFetchListInstance(this); + return this._portingWebhookConfigurationFetch; + } + /** Getter for signingRequestConfigurations resource */ get signingRequestConfigurations(): SigningRequestConfigurationListInstance { this._signingRequestConfigurations = @@ -111,10 +119,4 @@ export default class V1 extends Version { SigningRequestConfigurationListInstance(this); return this._signingRequestConfigurations; } - - /** Getter for webhook resource */ - get webhook(): WebhookListInstance { - this._webhook = this._webhook || WebhookListInstance(this); - return this._webhook; - } } diff --git a/src/rest/numbers/v1/webhook.ts b/src/rest/numbers/v1/portingWebhookConfigurationFetch.ts similarity index 75% rename from src/rest/numbers/v1/webhook.ts rename to src/rest/numbers/v1/portingWebhookConfigurationFetch.ts index f48c9294e..d80f674fb 100644 --- a/src/rest/numbers/v1/webhook.ts +++ b/src/rest/numbers/v1/portingWebhookConfigurationFetch.ts @@ -18,23 +18,26 @@ const deserialize = require("../../../base/deserialize"); const serialize = require("../../../base/serialize"); import { isValidPathParam } from "../../../base/utility"; -export interface WebhookSolution {} +export interface PortingWebhookConfigurationFetchSolution {} -export interface WebhookListInstance { +export interface PortingWebhookConfigurationFetchListInstance { _version: V1; - _solution: WebhookSolution; + _solution: PortingWebhookConfigurationFetchSolution; _uri: string; /** - * Fetch a WebhookInstance + * Fetch a PortingWebhookConfigurationFetchInstance * * @param callback - Callback to handle processed record * - * @returns Resolves to processed WebhookInstance + * @returns Resolves to processed PortingWebhookConfigurationFetchInstance */ fetch( - callback?: (error: Error | null, item?: WebhookInstance) => any - ): Promise; + callback?: ( + error: Error | null, + item?: PortingWebhookConfigurationFetchInstance + ) => any + ): Promise; /** * Provide a user-friendly representation @@ -43,16 +46,21 @@ export interface WebhookListInstance { [inspect.custom](_depth: any, options: InspectOptions): any; } -export function WebhookListInstance(version: V1): WebhookListInstance { - const instance = {} as WebhookListInstance; +export function PortingWebhookConfigurationFetchListInstance( + version: V1 +): PortingWebhookConfigurationFetchListInstance { + const instance = {} as PortingWebhookConfigurationFetchListInstance; instance._version = version; instance._solution = {}; instance._uri = `/Porting/Configuration/Webhook`; instance.fetch = function fetch( - callback?: (error: Error | null, items: WebhookInstance) => any - ): Promise { + callback?: ( + error: Error | null, + items: PortingWebhookConfigurationFetchInstance + ) => any + ): Promise { const headers: any = {}; headers["Accept"] = "application/json"; @@ -64,7 +72,8 @@ export function WebhookListInstance(version: V1): WebhookListInstance { }); operationPromise = operationPromise.then( - (payload) => new WebhookInstance(operationVersion, payload) + (payload) => + new PortingWebhookConfigurationFetchInstance(operationVersion, payload) ); operationPromise = instance._version.setPromiseCallback( @@ -88,9 +97,10 @@ export function WebhookListInstance(version: V1): WebhookListInstance { return instance; } -interface WebhookPayload extends WebhookResource {} +interface PortingWebhookConfigurationFetchPayload + extends PortingWebhookConfigurationFetchResource {} -interface WebhookResource { +interface PortingWebhookConfigurationFetchResource { url: string; port_in_target_url: string; port_out_target_url: string; @@ -99,8 +109,11 @@ interface WebhookResource { port_out_target_date_created: Date; } -export class WebhookInstance { - constructor(protected _version: V1, payload: WebhookResource) { +export class PortingWebhookConfigurationFetchInstance { + constructor( + protected _version: V1, + payload: PortingWebhookConfigurationFetchResource + ) { this.url = payload.url; this.portInTargetUrl = payload.port_in_target_url; this.portOutTargetUrl = payload.port_out_target_url;