Skip to content

Commit

Permalink
[Librarian] Regenerated @ 0a245f5931e0ff292c12b643839bbb9a1b3831e3 47…
Browse files Browse the repository at this point in the history
…27b4211b32329ec55ad87676be1f406d3fd9e9
  • Loading branch information
twilio-dx committed Jan 9, 2025
1 parent 419b33c commit 62b7d14
Show file tree
Hide file tree
Showing 11 changed files with 92 additions and 41 deletions.
6 changes: 6 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -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**
Expand Down
2 changes: 1 addition & 1 deletion src/rest/api/v2010/account/call/transcription.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
14 changes: 9 additions & 5 deletions src/rest/assistants/v1/assistant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand All @@ -72,27 +72,31 @@ export class AssistantsV1ServiceKnowledge {
/**
* The name of the knowledge source.
*/
"name"?: string;
"name": string;
/**
* The status of processing the knowledge source (\'QUEUED\', \'PROCESSING\', \'COMPLETED\', \'FAILED\')
*/
"status"?: string;
/**
* 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 {
Expand Down
7 changes: 7 additions & 0 deletions src/rest/assistants/v1/assistant/assistantsKnowledge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ interface AssistantsKnowledgeResource {
status: string;
type: string;
url: string;
embedding_model: string;
date_created: Date;
date_updated: Date;
}
Expand All @@ -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);

Expand Down Expand Up @@ -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.
*/
Expand Down Expand Up @@ -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,
};
Expand Down
15 changes: 15 additions & 0 deletions src/rest/assistants/v1/knowledge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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;
}

/**
Expand Down Expand Up @@ -353,6 +361,7 @@ interface KnowledgeResource {
status: string;
type: string;
url: string;
embedding_model: string;
date_created: Date;
date_updated: Date;
}
Expand All @@ -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);

Expand Down Expand Up @@ -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.
*/
Expand Down Expand Up @@ -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,
};
Expand Down
7 changes: 0 additions & 7 deletions src/rest/content/v1/content.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,6 @@ export class FlowsPage {
export class FlowsPageComponent {
"label": string;
"type": string;
"text"?: string;
"options"?: Array<FlowsPageComponentSelectItem>;
}

export class FlowsPageComponentSelectItem {
"id": string;
"title": string;
}

export class ListItem {
Expand Down
3 changes: 2 additions & 1 deletion src/rest/conversations/v1/addressConfiguration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ export type AddressConfigurationType =
| "whatsapp"
| "messenger"
| "gbm"
| "email";
| "email"
| "rcs";

/**
* Options to pass to update a AddressConfigurationInstance
Expand Down
7 changes: 6 additions & 1 deletion src/rest/insights/v1/call/callSummary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down
7 changes: 6 additions & 1 deletion src/rest/insights/v1/callSummaries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down
20 changes: 11 additions & 9 deletions src/rest/numbers/V1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
/**
Expand All @@ -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 {
Expand Down Expand Up @@ -104,17 +104,19 @@ 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 =
this._signingRequestConfigurations ||
SigningRequestConfigurationListInstance(this);
return this._signingRequestConfigurations;
}

/** Getter for webhook resource */
get webhook(): WebhookListInstance {
this._webhook = this._webhook || WebhookListInstance(this);
return this._webhook;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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<WebhookInstance>;
callback?: (
error: Error | null,
item?: PortingWebhookConfigurationFetchInstance
) => any
): Promise<PortingWebhookConfigurationFetchInstance>;

/**
* Provide a user-friendly representation
Expand All @@ -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<WebhookInstance> {
callback?: (
error: Error | null,
items: PortingWebhookConfigurationFetchInstance
) => any
): Promise<PortingWebhookConfigurationFetchInstance> {
const headers: any = {};
headers["Accept"] = "application/json";

Expand All @@ -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(
Expand All @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit 62b7d14

Please sign in to comment.