From 8c2edfcd2a7089ffe2385bbf95a31213e0167bc8 Mon Sep 17 00:00:00 2001 From: Twilio Date: Thu, 7 Sep 2023 18:55:59 +0000 Subject: [PATCH] [Librarian] Regenerated @ b32d3e1eba2177c81eeca51181f67e618fe86dbe --- CHANGES.md | 19 +++++++ src/rest/api/v2010/account/message.ts | 10 ++++ .../api/v2010/account/message/feedback.ts | 8 +-- src/rest/flexApi/v1/configuration.ts | 7 +++ src/rest/messaging/v1/service.ts | 6 +-- src/rest/numbers/v2/bulkHostedNumberOrder.ts | 50 +++++++++---------- 6 files changed, 66 insertions(+), 34 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 8faa3658cd..7efb85da21 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,6 +1,25 @@ twilio-node changelog ===================== +[2023-09-07] Version 4.17.0 +--------------------------- +**Api** +- Make message tagging parameters public **(breaking change)** + +**Flex** +- Adding `agent_conv_end_methods` to Flex Configuration + +**Messaging** +- Mark Mesasging Services fallback_to_long_code feature obsolete + +**Numbers** +- Add Create Port In request api +- Renaming sid for bulk_hosting_sid and remove account_sid response field in numbers/v2/BulkHostedNumberOrders **(breaking change)** + +**Pricing** +- gate resources behind a beta_feature + + [2023-08-24] Version 4.16.0 --------------------------- **Api** diff --git a/src/rest/api/v2010/account/message.ts b/src/rest/api/v2010/account/message.ts index c34ba5c840..761c830e40 100644 --- a/src/rest/api/v2010/account/message.ts +++ b/src/rest/api/v2010/account/message.ts @@ -101,6 +101,8 @@ export interface MessageListInstanceCreateOptions { sendAsMms?: boolean; /** For [Content Editor/API](https://www.twilio.com/docs/content) only: Key-value pairs of [Template variables](https://www.twilio.com/docs/content/using-variables-with-content-api) and their substitution values. `content_sid` parameter must also be provided. If values are not defined in the `content_variables` parameter, the [Template\\\'s default placeholder values](https://www.twilio.com/docs/content/content-api-resources#create-templates) are used. */ contentVariables?: string; + /** A string containing a JSON map of key value pairs of tags to be recorded as metadata for the message. The object may contain up to 10 tags. Keys and values can each be up to 128 characters in length. */ + tags?: string; /** */ riskCheck?: MessageRiskCheck; /** The sender\\\'s Twilio phone number (in [E.164](https://en.wikipedia.org/wiki/E.164) format), [alphanumeric sender ID](https://www.twilio.com/docs/sms/send-messages#use-an-alphanumeric-sender-id), [Wireless SIM](https://www.twilio.com/docs/iot/wireless/programmable-wireless-send-machine-machine-sms-commands), [short code](https://www.twilio.com/docs/sms/api/short-code), or [channel address](https://www.twilio.com/docs/messaging/channels) (e.g., `whatsapp:+15554449999`). The value of the `from` parameter must be a sender that is hosted within Twilio and belong to the Account creating the Message. If you are using `messaging_service_sid`, this parameter can be empty (Twilio assigns a `from` value from the Messaging Service\\\'s Sender Pool) or you can provide a specific sender from your Sender Pool. */ @@ -413,6 +415,7 @@ interface MessageResource { price_unit: string; api_version: string; subresource_uris: Record; + tags: any; } export class MessageInstance { @@ -445,6 +448,7 @@ export class MessageInstance { this.priceUnit = payload.price_unit; this.apiVersion = payload.api_version; this.subresourceUris = payload.subresource_uris; + this.tags = payload.tags; this._solution = { accountSid, sid: sid || this.sid }; } @@ -523,6 +527,10 @@ export class MessageInstance { * A list of related resources identified by their URIs relative to `https://api.twilio.com` */ subresourceUris: Record; + /** + * A string containing a JSON map of key value pairs of tags to be recorded as metadata for the message. + */ + tags: any; private get _proxy(): MessageContext { this._context = @@ -632,6 +640,7 @@ export class MessageInstance { priceUnit: this.priceUnit, apiVersion: this.apiVersion, subresourceUris: this.subresourceUris, + tags: this.tags, }; } @@ -807,6 +816,7 @@ export function MessageListInstance( data["SendAsMms"] = serialize.bool(params["sendAsMms"]); if (params["contentVariables"] !== undefined) data["ContentVariables"] = params["contentVariables"]; + if (params["tags"] !== undefined) data["Tags"] = params["tags"]; if (params["riskCheck"] !== undefined) data["RiskCheck"] = params["riskCheck"]; if (params["from"] !== undefined) data["From"] = params["from"]; diff --git a/src/rest/api/v2010/account/message/feedback.ts b/src/rest/api/v2010/account/message/feedback.ts index 41dffa4070..9d8a2ff863 100644 --- a/src/rest/api/v2010/account/message/feedback.ts +++ b/src/rest/api/v2010/account/message/feedback.ts @@ -173,20 +173,20 @@ export class FeedbackInstance { } /** - * The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the MessageFeedback resource. + * The SID of the [Account](https://www.twilio.com/docs/iam/api/account) associated with this MessageFeedback resource. */ accountSid: string; /** - * The SID of the Message resource for which the feedback was provided. + * The SID of the Message resource associated with this MessageFeedback resource. */ messageSid: string; outcome: FeedbackOutcome; /** - * The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + * The date and time in GMT when this MessageFeedback resource was created, specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. */ dateCreated: Date; /** - * The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. + * The date and time in GMT when this MessageFeedback resource was last updated, specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. */ dateUpdated: Date; /** diff --git a/src/rest/flexApi/v1/configuration.ts b/src/rest/flexApi/v1/configuration.ts index ac6b1ede48..c07d9fb71a 100644 --- a/src/rest/flexApi/v1/configuration.ts +++ b/src/rest/flexApi/v1/configuration.ts @@ -172,6 +172,7 @@ interface ConfigurationResource { channel_configs: Array; debugger_integration: any; flex_ui_status_report: any; + agent_conv_end_methods: any; } export class ConfigurationInstance { @@ -224,6 +225,7 @@ export class ConfigurationInstance { this.channelConfigs = payload.channel_configs; this.debuggerIntegration = payload.debugger_integration; this.flexUiStatusReport = payload.flex_ui_status_report; + this.agentConvEndMethods = payload.agent_conv_end_methods; this._solution = {}; } @@ -405,6 +407,10 @@ export class ConfigurationInstance { * Configurable parameters for Flex UI Status report. */ flexUiStatusReport: any; + /** + * Agent conversation end methods. + */ + agentConvEndMethods: any; private get _proxy(): ConfigurationContext { this._context = @@ -494,6 +500,7 @@ export class ConfigurationInstance { channelConfigs: this.channelConfigs, debuggerIntegration: this.debuggerIntegration, flexUiStatusReport: this.flexUiStatusReport, + agentConvEndMethods: this.agentConvEndMethods, }; } diff --git a/src/rest/messaging/v1/service.ts b/src/rest/messaging/v1/service.ts index f8c14ee484..a45574e26e 100644 --- a/src/rest/messaging/v1/service.ts +++ b/src/rest/messaging/v1/service.ts @@ -52,7 +52,7 @@ export interface ServiceContextUpdateOptions { smartEncoding?: boolean; /** */ scanMessageContent?: ServiceScanMessageContent; - /** Whether to enable [Fallback to Long Code](https://www.twilio.com/docs/messaging/services#fallback-to-long-code) for messages sent through the Service instance. */ + /** [OBSOLETE] Former feature used to fallback to long code sender after certain short code message failures. */ fallbackToLongCode?: boolean; /** Whether to enable [Area Code Geomatch](https://www.twilio.com/docs/messaging/services#area-code-geomatch) on the Service Instance. */ areaCodeGeomatch?: boolean; @@ -90,7 +90,7 @@ export interface ServiceListInstanceCreateOptions { smartEncoding?: boolean; /** */ scanMessageContent?: ServiceScanMessageContent; - /** Whether to enable [Fallback to Long Code](https://www.twilio.com/docs/messaging/services#fallback-to-long-code) for messages sent through the Service instance. */ + /** [OBSOLETE] Former feature used to fallback to long code sender after certain short code message failures. */ fallbackToLongCode?: boolean; /** Whether to enable [Area Code Geomatch](https://www.twilio.com/docs/messaging/services#area-code-geomatch) on the Service Instance. */ areaCodeGeomatch?: boolean; @@ -509,7 +509,7 @@ export class ServiceInstance { smartEncoding: boolean; scanMessageContent: ServiceScanMessageContent; /** - * Whether to enable [Fallback to Long Code](https://www.twilio.com/docs/messaging/services#fallback-to-long-code) for messages sent through the Service instance. + * [OBSOLETE] Former feature used to fallback to long code sender after certain short code message failures. */ fallbackToLongCode: boolean; /** diff --git a/src/rest/numbers/v2/bulkHostedNumberOrder.ts b/src/rest/numbers/v2/bulkHostedNumberOrder.ts index 5d7b5f7f9e..9c51158b04 100644 --- a/src/rest/numbers/v2/bulkHostedNumberOrder.ts +++ b/src/rest/numbers/v2/bulkHostedNumberOrder.ts @@ -69,7 +69,7 @@ export interface BulkHostedNumberOrderContext { } export interface BulkHostedNumberOrderContextSolution { - sid: string; + bulkHostingSid: string; } export class BulkHostedNumberOrderContextImpl @@ -78,13 +78,13 @@ export class BulkHostedNumberOrderContextImpl protected _solution: BulkHostedNumberOrderContextSolution; protected _uri: string; - constructor(protected _version: V2, sid: string) { - if (!isValidPathParam(sid)) { - throw new Error("Parameter 'sid' is not valid."); + constructor(protected _version: V2, bulkHostingSid: string) { + if (!isValidPathParam(bulkHostingSid)) { + throw new Error("Parameter 'bulkHostingSid' is not valid."); } - this._solution = { sid }; - this._uri = `/HostedNumber/Orders/Bulk/${sid}`; + this._solution = { bulkHostingSid }; + this._uri = `/HostedNumber/Orders/Bulk/${bulkHostingSid}`; } fetch( @@ -124,7 +124,7 @@ export class BulkHostedNumberOrderContextImpl new BulkHostedNumberOrderInstance( operationVersion, payload, - instance._solution.sid + instance._solution.bulkHostingSid ) ); @@ -152,8 +152,7 @@ export class BulkHostedNumberOrderContextImpl interface BulkHostedNumberOrderPayload extends BulkHostedNumberOrderResource {} interface BulkHostedNumberOrderResource { - sid: string; - account_sid: string; + bulk_hosting_sid: string; request_status: BulkHostedNumberOrderRequestStatus; friendly_name: string; notification_email: string; @@ -171,10 +170,9 @@ export class BulkHostedNumberOrderInstance { constructor( protected _version: V2, payload: BulkHostedNumberOrderResource, - sid?: string + bulkHostingSid?: string ) { - this.sid = payload.sid; - this.accountSid = payload.account_sid; + this.bulkHostingSid = payload.bulk_hosting_sid; this.requestStatus = payload.request_status; this.friendlyName = payload.friendly_name; this.notificationEmail = payload.notification_email; @@ -184,17 +182,13 @@ export class BulkHostedNumberOrderInstance { this.totalCount = deserialize.integer(payload.total_count); this.results = payload.results; - this._solution = { sid: sid || this.sid }; + this._solution = { bulkHostingSid: bulkHostingSid || this.bulkHostingSid }; } /** * A 34 character string that uniquely identifies this BulkHostedNumberOrder. */ - sid: string; - /** - * A 34 character string that uniquely identifies the account. - */ - accountSid: string; + bulkHostingSid: string; requestStatus: BulkHostedNumberOrderRequestStatus; /** * A 128 character string that is a human-readable text that describes this resource. @@ -228,7 +222,10 @@ export class BulkHostedNumberOrderInstance { private get _proxy(): BulkHostedNumberOrderContext { this._context = this._context || - new BulkHostedNumberOrderContextImpl(this._version, this._solution.sid); + new BulkHostedNumberOrderContextImpl( + this._version, + this._solution.bulkHostingSid + ); return this._context; } @@ -278,8 +275,7 @@ export class BulkHostedNumberOrderInstance { */ toJSON() { return { - sid: this.sid, - accountSid: this.accountSid, + bulkHostingSid: this.bulkHostingSid, requestStatus: this.requestStatus, friendlyName: this.friendlyName, notificationEmail: this.notificationEmail, @@ -303,8 +299,8 @@ export interface BulkHostedNumberOrderListInstance { _solution: BulkHostedNumberOrderSolution; _uri: string; - (sid: string): BulkHostedNumberOrderContext; - get(sid: string): BulkHostedNumberOrderContext; + (bulkHostingSid: string): BulkHostedNumberOrderContext; + get(bulkHostingSid: string): BulkHostedNumberOrderContext; /** * Provide a user-friendly representation @@ -316,11 +312,11 @@ export interface BulkHostedNumberOrderListInstance { export function BulkHostedNumberOrderListInstance( version: V2 ): BulkHostedNumberOrderListInstance { - const instance = ((sid) => - instance.get(sid)) as BulkHostedNumberOrderListInstance; + const instance = ((bulkHostingSid) => + instance.get(bulkHostingSid)) as BulkHostedNumberOrderListInstance; - instance.get = function get(sid): BulkHostedNumberOrderContext { - return new BulkHostedNumberOrderContextImpl(version, sid); + instance.get = function get(bulkHostingSid): BulkHostedNumberOrderContext { + return new BulkHostedNumberOrderContextImpl(version, bulkHostingSid); }; instance._version = version;