Skip to content

Commit

Permalink
chore: preview changes by twiml gather
Browse files Browse the repository at this point in the history
  • Loading branch information
tiwarishubham635 committed Jan 31, 2025
1 parent 22fa9b0 commit af598d9
Show file tree
Hide file tree
Showing 9 changed files with 42 additions and 62 deletions.
24 changes: 24 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,30 @@
twilio-node changelog
=====================

[2025-01-31] Version 5.5.0
--------------------------
**Library - Fix**
- [PR #1061](https://github.com/twilio/twilio-node/pull/1061): validate Twilio signatures with escaped and unescaped query string values fixes #1059. Thanks to [@leon19](https://github.com/leon19)!

**Api**
- Add open-api file tag to `conference/call recordings` and `recording_transcriptions`.

**Events**
- Add support for subaccount subscriptions (beta)

**Insights**
- add new region to conference APIs

**Lookups**
- Add new `parnter_sub_id` query parameter to the lookup request

**Messaging**
- Adds validity period Default value in service resource documentation

**Twiml**
- Convert Twiml Attribute `speechModel` of type enum to string **(breaking change)**


[2025-01-28] Version 5.4.3
--------------------------
**Library - Fix**
Expand Down
10 changes: 0 additions & 10 deletions src/rest/content/v1/content.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,15 +216,6 @@ export class TwilioQuickReply {
"actions": Array<QuickReplyAction>;
}

/**
* twilio/schedule templates allow us to send a message with a schedule with different time slots
*/
export class TwilioSchedule {
"id": string;
"title": string;
"timeSlots": string;
}

/**
* Type containing only plain text-based content
*/
Expand All @@ -246,7 +237,6 @@ export class Types {
"twilio/catalog"?: TwilioCatalog | null;
"twilio/carousel"?: TwilioCarousel | null;
"twilio/flows"?: TwilioFlows | null;
"twilio/schedule"?: TwilioSchedule | null;
"whatsapp/card"?: WhatsappCard | null;
"whatsapp/authentication"?: WhatsappAuthentication | null;
}
Expand Down
3 changes: 1 addition & 2 deletions src/rest/conversations/v1/addressConfiguration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ export type AddressConfigurationType =
| "messenger"
| "gbm"
| "email"
| "rcs"
| "apple";
| "rcs";

/**
* Options to pass to update a AddressConfigurationInstance
Expand Down
19 changes: 0 additions & 19 deletions src/rest/events/v1/subscription.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ export interface SubscriptionContextUpdateOptions {
description?: string;
/** The SID of the sink that events selected by this subscription should be sent to. Sink must be active for the subscription to be created. */
sinkSid?: string;
/** Receive events from all children accounts in the parent account subscription. */
receiveEventsFromSubaccounts?: boolean;
}

/**
Expand All @@ -43,8 +41,6 @@ export interface SubscriptionListInstanceCreateOptions {
sinkSid: string;
/** An array of objects containing the subscribed Event Types */
types: Array<any>;
/** Receive events from all children accounts in the parent account subscription. */
receiveEventsFromSubaccounts?: boolean;
}
/**
* Options to pass to each
Expand Down Expand Up @@ -237,10 +233,6 @@ export class SubscriptionContextImpl implements SubscriptionContext {
if (params["description"] !== undefined)
data["Description"] = params["description"];
if (params["sinkSid"] !== undefined) data["SinkSid"] = params["sinkSid"];
if (params["receiveEventsFromSubaccounts"] !== undefined)
data["ReceiveEventsFromSubaccounts"] = serialize.bool(
params["receiveEventsFromSubaccounts"]
);

const headers: any = {};
headers["Content-Type"] = "application/x-www-form-urlencoded";
Expand Down Expand Up @@ -298,7 +290,6 @@ interface SubscriptionResource {
sink_sid: string;
url: string;
links: Record<string, string>;
receive_events_from_subaccounts: boolean;
}

export class SubscriptionInstance {
Expand All @@ -318,7 +309,6 @@ export class SubscriptionInstance {
this.sinkSid = payload.sink_sid;
this.url = payload.url;
this.links = payload.links;
this.receiveEventsFromSubaccounts = payload.receive_events_from_subaccounts;

this._solution = { sid: sid || this.sid };
}
Expand Down Expand Up @@ -355,10 +345,6 @@ export class SubscriptionInstance {
* Contains a dictionary of URL links to nested resources of this Subscription.
*/
links: Record<string, string>;
/**
* Receive events from all children accounts in the parent account subscription.
*/
receiveEventsFromSubaccounts: boolean;

private get _proxy(): SubscriptionContext {
this._context =
Expand Down Expand Up @@ -445,7 +431,6 @@ export class SubscriptionInstance {
sinkSid: this.sinkSid,
url: this.url,
links: this.links,
receiveEventsFromSubaccounts: this.receiveEventsFromSubaccounts,
};
}

Expand Down Expand Up @@ -595,10 +580,6 @@ export function SubscriptionListInstance(
data["Types"] = serialize.map(params["types"], (e: any) =>
serialize.object(e)
);
if (params["receiveEventsFromSubaccounts"] !== undefined)
data["ReceiveEventsFromSubaccounts"] = serialize.bool(
params["receiveEventsFromSubaccounts"]
);

const headers: any = {};
headers["Content-Type"] = "application/x-www-form-urlencoded";
Expand Down
14 changes: 7 additions & 7 deletions src/rest/iam/V1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import IamBase from "../IamBase";
import Version from "../../base/Version";
import { ApiKeyListInstance } from "./v1/apiKey";
import { GetApiKeysListInstance } from "./v1/getApiKeys";
import { NewApiKeyListInstance } from "./v1/newApiKey";
import { KeyListInstance } from "./v1/key";

Check failure on line 19 in src/rest/iam/V1.ts

View workflow job for this annotation

GitHub Actions / Test (lts/*)

Cannot find module './v1/key' or its corresponding type declarations.

Check failure on line 19 in src/rest/iam/V1.ts

View workflow job for this annotation

GitHub Actions / Test (18)

Cannot find module './v1/key' or its corresponding type declarations.

Check failure on line 19 in src/rest/iam/V1.ts

View workflow job for this annotation

GitHub Actions / Test (22)

Cannot find module './v1/key' or its corresponding type declarations.

Check failure on line 19 in src/rest/iam/V1.ts

View workflow job for this annotation

GitHub Actions / Test (14)

Cannot find module './v1/key' or its corresponding type declarations.

Check failure on line 19 in src/rest/iam/V1.ts

View workflow job for this annotation

GitHub Actions / Test (16)

Cannot find module './v1/key' or its corresponding type declarations.

Check failure on line 19 in src/rest/iam/V1.ts

View workflow job for this annotation

GitHub Actions / Test (20)

Cannot find module './v1/key' or its corresponding type declarations.

Check failure on line 19 in src/rest/iam/V1.ts

View workflow job for this annotation

GitHub Actions / Test (20)

Cannot find module './v1/key' or its corresponding type declarations.

Check failure on line 19 in src/rest/iam/V1.ts

View workflow job for this annotation

GitHub Actions / Test (22)

Cannot find module './v1/key' or its corresponding type declarations.

Check failure on line 19 in src/rest/iam/V1.ts

View workflow job for this annotation

GitHub Actions / Test (16)

Cannot find module './v1/key' or its corresponding type declarations.

Check failure on line 19 in src/rest/iam/V1.ts

View workflow job for this annotation

GitHub Actions / Test (lts/*)

Cannot find module './v1/key' or its corresponding type declarations.

Check failure on line 19 in src/rest/iam/V1.ts

View workflow job for this annotation

GitHub Actions / Test (18)

Cannot find module './v1/key' or its corresponding type declarations.

Check failure on line 19 in src/rest/iam/V1.ts

View workflow job for this annotation

GitHub Actions / Test (14)

Cannot find module './v1/key' or its corresponding type declarations.

export default class V1 extends Version {
/**
Expand All @@ -32,8 +32,8 @@ export default class V1 extends Version {
protected _apiKey?: ApiKeyListInstance;
/** getApiKeys - { Twilio.Iam.V1.GetApiKeysListInstance } resource */
protected _getApiKeys?: GetApiKeysListInstance;
/** newApiKey - { Twilio.Iam.V1.NewApiKeyListInstance } resource */
protected _newApiKey?: NewApiKeyListInstance;
/** keys - { Twilio.Iam.V1.KeyListInstance } resource */
protected _keys?: KeyListInstance;

/** Getter for apiKey resource */
get apiKey(): ApiKeyListInstance {
Expand All @@ -47,9 +47,9 @@ export default class V1 extends Version {
return this._getApiKeys;
}

/** Getter for newApiKey resource */
get newApiKey(): NewApiKeyListInstance {
this._newApiKey = this._newApiKey || NewApiKeyListInstance(this);
return this._newApiKey;
/** Getter for keys resource */
get keys(): KeyListInstance {
this._keys = this._keys || KeyListInstance(this);
return this._keys;
}
}
1 change: 0 additions & 1 deletion src/rest/insights/v1/conference.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ export type ConferenceProcessingState = "complete" | "in_progress" | "timeout";

export type ConferenceRegion =
| "us1"
| "us2"
| "au1"
| "br1"
| "ie1"
Expand Down
4 changes: 0 additions & 4 deletions src/rest/lookups/v2/phoneNumber.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ export interface PhoneNumberContextFetchOptions {
lastVerifiedDate?: string;
/** The unique identifier associated with a verification process through verify API. This query parameter is only used (optionally) for pre_fill package requests. */
verificationSid?: string;
/** The optional partnerSubId parameter to provide context for your sub-accounts, tenantIDs, sender IDs or other segmentation, enhancing the accuracy of the risk analysis. */
partnerSubId?: string;
}

export interface PhoneNumberContext {
Expand Down Expand Up @@ -149,8 +147,6 @@ export class PhoneNumberContextImpl implements PhoneNumberContext {
data["LastVerifiedDate"] = params["lastVerifiedDate"];
if (params["verificationSid"] !== undefined)
data["VerificationSid"] = params["verificationSid"];
if (params["partnerSubId"] !== undefined)
data["PartnerSubId"] = params["partnerSubId"];

const headers: any = {};
headers["Accept"] = "application/json";
Expand Down
20 changes: 9 additions & 11 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";

Check failure on line 25 in src/rest/numbers/V1.ts

View workflow job for this annotation

GitHub Actions / Test (lts/*)

Cannot find module './v1/webhook' or its corresponding type declarations.

Check failure on line 25 in src/rest/numbers/V1.ts

View workflow job for this annotation

GitHub Actions / Test (18)

Cannot find module './v1/webhook' or its corresponding type declarations.

Check failure on line 25 in src/rest/numbers/V1.ts

View workflow job for this annotation

GitHub Actions / Test (22)

Cannot find module './v1/webhook' or its corresponding type declarations.

Check failure on line 25 in src/rest/numbers/V1.ts

View workflow job for this annotation

GitHub Actions / Test (14)

Cannot find module './v1/webhook' or its corresponding type declarations.

Check failure on line 25 in src/rest/numbers/V1.ts

View workflow job for this annotation

GitHub Actions / Test (16)

Cannot find module './v1/webhook' or its corresponding type declarations.

Check failure on line 25 in src/rest/numbers/V1.ts

View workflow job for this annotation

GitHub Actions / Test (20)

Cannot find module './v1/webhook' or its corresponding type declarations.

Check failure on line 25 in src/rest/numbers/V1.ts

View workflow job for this annotation

GitHub Actions / Test (20)

Cannot find module './v1/webhook' or its corresponding type declarations.

Check failure on line 25 in src/rest/numbers/V1.ts

View workflow job for this annotation

GitHub Actions / Test (22)

Cannot find module './v1/webhook' or its corresponding type declarations.

Check failure on line 25 in src/rest/numbers/V1.ts

View workflow job for this annotation

GitHub Actions / Test (16)

Cannot find module './v1/webhook' or its corresponding type declarations.

Check failure on line 25 in src/rest/numbers/V1.ts

View workflow job for this annotation

GitHub Actions / Test (lts/*)

Cannot find module './v1/webhook' or its corresponding type declarations.

Check failure on line 25 in src/rest/numbers/V1.ts

View workflow job for this annotation

GitHub Actions / Test (18)

Cannot find module './v1/webhook' or its corresponding type declarations.

Check failure on line 25 in src/rest/numbers/V1.ts

View workflow job for this annotation

GitHub Actions / Test (14)

Cannot find module './v1/webhook' or its corresponding type declarations.

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,19 +104,17 @@ 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;
}
}
9 changes: 1 addition & 8 deletions src/twiml/VoiceResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -539,13 +539,6 @@ namespace VoiceResponse {
| "cmn-Hant-TW"
| "zu-ZA";

type GatherSpeechModel =
| "default"
| "numbers_and_commands"
| "phone_call"
| "experimental_conversations"
| "experimental_utterances";

type NumberEvent = "initiated" | "ringing" | "answered" | "completed";

type PayBankAccountType =
Expand Down Expand Up @@ -1426,7 +1419,7 @@ namespace VoiceResponse {
/** profanityFilter - Profanity Filter on speech */
profanityFilter?: boolean;
/** speechModel - Specify the model that is best suited for your use case */
speechModel?: GatherSpeechModel;
speechModel?: string;
/** speechTimeout - Time to wait to gather speech input and it should be either auto or a positive integer. */
speechTimeout?: string;
/** timeout - Time to wait to gather input */
Expand Down

0 comments on commit af598d9

Please sign in to comment.