diff --git a/CHANGES.md b/CHANGES.md index ef292b09a0..8faa3658cd 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,6 +1,23 @@ twilio-node changelog ===================== +[2023-08-24] Version 4.16.0 +--------------------------- +**Api** +- Add new property `RiskCheck` for SMS pumping protection feature only (public beta to be available soon): Include this parameter with a value of `disable` to skip any kind of risk check on the respective message request + +**Flex** +- Changing `sid` path param to `sid` in interaction channel participant update endpoint **(breaking change)** + +**Messaging** +- Add Channel Sender api +- Fixing country code docs and removing Zipwhip references + +**Numbers** +- Request status changed in numbers/v2/BulkHostedNumberOrders **(breaking change)** +- Add bulk hosting orders API under version `/v2 + + [2023-08-10] Version 4.15.0 --------------------------- **Library - Fix** diff --git a/src/rest/api/v2010/account/message.ts b/src/rest/api/v2010/account/message.ts index 9851b34319..c34ba5c840 100644 --- a/src/rest/api/v2010/account/message.ts +++ b/src/rest/api/v2010/account/message.ts @@ -32,6 +32,8 @@ export type MessageDirection = | "outbound-call" | "outbound-reply"; +export type MessageRiskCheck = "enable" | "disable"; + export type MessageScheduleType = "fixed"; export type MessageStatus = @@ -65,9 +67,9 @@ export interface MessageContextUpdateOptions { * Options to pass to create a MessageInstance */ export interface MessageListInstanceCreateOptions { - /** The recipient\\\'s phone number in [E.164](https://www.twilio.com/docs/glossary/what-e164) format (for SMS/MMS) or [channel address](https://www.twilio.com/docs/sms/channels#channel-addresses), e.g. `whatsapp:+15552229999`. */ + /** The recipient\\\'s phone number in [E.164](https://www.twilio.com/docs/glossary/what-e164) format (for SMS/MMS) or [channel address](https://www.twilio.com/docs/messaging/channels), e.g. `whatsapp:+15552229999`. */ to: string; - /** The URL of the endpoint to which Twilio sends [Message status callback requests](https://www.twilio.com/docs/sms/api/message-resource#twilios-request-to-the-statuscallback-url). URL must contain a valid hostname and underscores are not allowed. If you include this parameter with the `messaging_service_sid`, Twilio uses this URL instead of the Status Callback URL of the [Messaging Service](https://www.twilio.com/docs/messaging/services/api). */ + /** The URL of the endpoint to which Twilio sends [Message status callback requests](https://www.twilio.com/docs/sms/api/message-resource#twilios-request-to-the-statuscallback-url). URL must contain a valid hostname and underscores are not allowed. If you include this parameter with the `messaging_service_sid`, Twilio uses this URL instead of the Status Callback URL of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource). */ statusCallback?: string; /** The SID of the associated [TwiML Application](https://www.twilio.com/docs/usage/api/applications). If this parameter is provided, the `status_callback` parameter of this request is ignored; [Message status callback requests](https://www.twilio.com/docs/sms/api/message-resource#twilios-request-to-the-statuscallback-url) are sent to the TwiML App\\\'s `message_status_callback` URL. */ applicationSid?: string; @@ -99,7 +101,9 @@ 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; - /** 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/wireless/tutorials/communications-guides/how-to-send-and-receive-text-messages), [short code](https://www.twilio.com/docs/sms/api/short-code), or [channel address](https://www.twilio.com/docs/sms/channels#channel-addresses) (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. */ + /** */ + 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. */ from?: string; /** The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/services) you want to associate with the Message. When this parameter is provided and the `from` parameter is omitted, Twilio selects the optimal sender from the Messaging Service\\\'s Sender Pool. You may also provide a `from` parameter if you want to use a specific Sender from the Sender Pool. */ messagingServiceSid?: string; @@ -455,11 +459,11 @@ export class MessageInstance { numSegments: string; direction: MessageDirection; /** - * The sender\'s 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/wireless/tutorials/communications-guides/how-to-send-and-receive-text-messages), [short code](https://www.twilio.com/docs/sms/api/short-code), or [channel address](https://www.twilio.com/docs/sms/channels#channel-addresses) (e.g., `whatsapp:+15554449999`). For incoming messages, this is the number or channel address of the sender. For outgoing messages, this value is a Twilio phone number, alphanumeric sender ID, short code, or channel address from which the message is sent. + * The sender\'s 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`). For incoming messages, this is the number or channel address of the sender. For outgoing messages, this value is a Twilio phone number, alphanumeric sender ID, short code, or channel address from which the message is sent. */ from: string; /** - * The recipient\'s phone number (in [E.164](https://en.wikipedia.org/wiki/E.164) format) or [channel address](https://www.twilio.com/docs/sms/channels#channel-addresses) (e.g. `whatsapp:+15552229999`) + * The recipient\'s phone number (in [E.164](https://en.wikipedia.org/wiki/E.164) format) or [channel address](https://www.twilio.com/docs/messaging/channels) (e.g. `whatsapp:+15552229999`) */ to: string; /** @@ -488,7 +492,7 @@ export class MessageInstance { numMedia: string; status: MessageStatus; /** - * The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/services/api) associated with the Message resource. The value is `null` if a Messaging Service was not used. + * The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) associated with the Message resource. The value is `null` if a Messaging Service was not used. */ messagingServiceSid: string; /** @@ -803,6 +807,8 @@ export function MessageListInstance( data["SendAsMms"] = serialize.bool(params["sendAsMms"]); if (params["contentVariables"] !== undefined) data["ContentVariables"] = params["contentVariables"]; + if (params["riskCheck"] !== undefined) + data["RiskCheck"] = params["riskCheck"]; if (params["from"] !== undefined) data["From"] = params["from"]; if (params["messagingServiceSid"] !== undefined) data["MessagingServiceSid"] = params["messagingServiceSid"]; diff --git a/src/rest/conversations/v1/service/conversation/participant.ts b/src/rest/conversations/v1/service/conversation/participant.ts index 2f97303f3d..1b032feb64 100644 --- a/src/rest/conversations/v1/service/conversation/participant.ts +++ b/src/rest/conversations/v1/service/conversation/participant.ts @@ -36,13 +36,13 @@ export interface ParticipantContextRemoveOptions { export interface ParticipantContextUpdateOptions { /** The X-Twilio-Webhook-Enabled HTTP request header */ xTwilioWebhookEnabled?: ParticipantWebhookEnabledType; - /** The date that this resource was created. */ + /** The date on which this resource was created. */ dateCreated?: Date; - /** The date that this resource was last updated. */ + /** The date on which this resource was last updated. */ dateUpdated?: Date; - /** A unique string identifier for the conversation participant as [Conversation User](https://www.twilio.com/docs/conversations/api/user-resource). This parameter is non-null if (and only if) the participant is using the Conversation SDK to communicate. Limited to 256 characters. */ + /** A unique string identifier for the conversation participant as [Conversation User](https://www.twilio.com/docs/conversations/api/user-resource). This parameter is non-null if (and only if) the participant is using the [Conversation SDK](https://www.twilio.com/docs/conversations/sdk-overview) to communicate. Limited to 256 characters. */ identity?: string; - /** An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \\\"{}\\\" will be returned. */ + /** An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set `{}` will be returned. */ attributes?: string; /** The SID of a conversation-level [Role](https://www.twilio.com/docs/conversations/api/role-resource) to assign to the participant. */ roleSid?: string; @@ -62,19 +62,19 @@ export interface ParticipantContextUpdateOptions { export interface ParticipantListInstanceCreateOptions { /** The X-Twilio-Webhook-Enabled HTTP request header */ xTwilioWebhookEnabled?: ParticipantWebhookEnabledType; - /** A unique string identifier for the conversation participant as [Conversation User](https://www.twilio.com/docs/conversations/api/user-resource). This parameter is non-null if (and only if) the participant is using the Conversation SDK to communicate. Limited to 256 characters. */ + /** A unique string identifier for the conversation participant as [Conversation User](https://www.twilio.com/docs/conversations/api/user-resource). This parameter is non-null if (and only if) the participant is using the [Conversation SDK](https://www.twilio.com/docs/conversations/sdk-overview) to communicate. Limited to 256 characters. */ identity?: string; - /** The address of the participant\\\'s device, e.g. a phone or WhatsApp number. Together with the Proxy address, this determines a participant uniquely. This field (with proxy_address) is only null when the participant is interacting from an SDK endpoint (see the \\\'identity\\\' field). */ + /** The address of the participant\\\'s device, e.g. a phone or WhatsApp number. Together with the Proxy address, this determines a participant uniquely. This field (with `proxy_address`) is only null when the participant is interacting from an SDK endpoint (see the `identity` field). */ "messagingBinding.address"?: string; - /** The address of the Twilio phone number (or WhatsApp number) that the participant is in contact with. This field, together with participant address, is only null when the participant is interacting from an SDK endpoint (see the \\\'identity\\\' field). */ + /** The address of the Twilio phone number (or WhatsApp number) that the participant is in contact with. This field, together with participant address, is only null when the participant is interacting from an SDK endpoint (see the `identity` field). */ "messagingBinding.proxyAddress"?: string; - /** The date that this resource was created. */ + /** The date on which this resource was created. */ dateCreated?: Date; - /** The date that this resource was last updated. */ + /** The date on which this resource was last updated. */ dateUpdated?: Date; - /** An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \\\"{}\\\" will be returned. */ + /** An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set `{}` will be returned. */ attributes?: string; - /** The address of the Twilio phone number that is used in Group MMS. Communication mask for the Conversation participant with Identity. */ + /** The address of the Twilio phone number that is used in Group MMS. */ "messagingBinding.projectedAddress"?: string; /** The SID of a conversation-level [Role](https://www.twilio.com/docs/conversations/api/role-resource) to assign to the participant. */ roleSid?: string; @@ -422,11 +422,11 @@ export class ParticipantInstance { */ sid: string; /** - * A unique string identifier for the conversation participant as [Conversation User](https://www.twilio.com/docs/conversations/api/user-resource). This parameter is non-null if (and only if) the participant is using the Conversation SDK to communicate. Limited to 256 characters. + * A unique string identifier for the conversation participant as [Conversation User](https://www.twilio.com/docs/conversations/api/user-resource). This parameter is non-null if (and only if) the participant is using the [Conversation SDK](https://www.twilio.com/docs/conversations/sdk-overview) to communicate. Limited to 256 characters. */ identity: string; /** - * An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \"{}\" will be returned. + * An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set `{}` will be returned. */ attributes: string; /** @@ -438,11 +438,11 @@ export class ParticipantInstance { */ roleSid: string; /** - * The date that this resource was created. + * The date on which this resource was created. */ dateCreated: Date; /** - * The date that this resource was last updated. + * The date on which this resource was last updated. */ dateUpdated: Date; /** diff --git a/src/rest/insights/v1/room/participant.ts b/src/rest/insights/v1/room/participant.ts index f696e6ed23..8c6ba1311a 100644 --- a/src/rest/insights/v1/room/participant.ts +++ b/src/rest/insights/v1/room/participant.ts @@ -257,7 +257,7 @@ export class ParticipantInstance { */ codecs: Array; /** - * Reason the participant left the room. See [the list of possible values here](https://www.twilio.com/docs/video/video-log-analyzer/video-log-analyzer-api#end_reason). + * Reason the participant left the room. See [the list of possible values here](https://www.twilio.com/docs/video/troubleshooting/video-log-analyzer-api#end_reason). */ endReason: string; /** @@ -270,12 +270,12 @@ export class ParticipantInstance { errorCodeUrl: string; mediaRegion: ParticipantTwilioRealm; /** - * Object containing information about the participant\'s data from the room. See [below](https://www.twilio.com/docs/video/video-log-analyzer/video-log-analyzer-api#properties) for more information. + * Object containing information about the participant\'s data from the room. See [below](https://www.twilio.com/docs/video/troubleshooting/video-log-analyzer-api#properties) for more information. */ properties: any; edgeLocation: ParticipantEdgeLocation; /** - * Object containing information about the SDK name and version. See [below](https://www.twilio.com/docs/video/video-log-analyzer/video-log-analyzer-api#publisher_info) for more information. + * Object containing information about the SDK name and version. See [below](https://www.twilio.com/docs/video/troubleshooting/video-log-analyzer-api#publisher_info) for more information. */ publisherInfo: any; /** diff --git a/src/rest/media/v1/mediaProcessor.ts b/src/rest/media/v1/mediaProcessor.ts index 3866fe1b64..ab4351d4e6 100644 --- a/src/rest/media/v1/mediaProcessor.ts +++ b/src/rest/media/v1/mediaProcessor.ts @@ -38,13 +38,13 @@ export interface MediaProcessorContextUpdateOptions { * Options to pass to create a MediaProcessorInstance */ export interface MediaProcessorListInstanceCreateOptions { - /** The [Media Extension](/docs/live/api/media-extensions-overview) name or URL. Ex: `video-composer-v2` */ + /** The [Media Extension](/docs/live/media-extensions-overview) name or URL. Ex: `video-composer-v2` */ extension: string; - /** The context of the Media Extension, represented as a JSON dictionary. See the documentation for the specific [Media Extension](/docs/live/api/media-extensions-overview) you are using for more information about the context to send. */ + /** The context of the Media Extension, represented as a JSON dictionary. See the documentation for the specific [Media Extension](/docs/live/media-extensions-overview) you are using for more information about the context to send. */ extensionContext: string; - /** User-defined environment variables for the Media Extension, represented as a JSON dictionary of key/value strings. See the documentation for the specific [Media Extension](/docs/live/api/media-extensions-overview) you are using for more information about whether you need to provide this. */ + /** User-defined environment variables for the Media Extension, represented as a JSON dictionary of key/value strings. See the documentation for the specific [Media Extension](/docs/live/media-extensions-overview) you are using for more information about whether you need to provide this. */ extensionEnvironment?: any; - /** The URL to which Twilio will send asynchronous webhook requests for every MediaProcessor event. See [Status Callbacks](/docs/live/status-callbacks) for details. */ + /** The URL to which Twilio will send asynchronous webhook requests for every MediaProcessor event. See [Status Callbacks](/docs/live/api/status-callbacks) for details. */ statusCallback?: string; /** The HTTP method Twilio should use to call the `status_callback` URL. Can be `POST` or `GET` and the default is `POST`. */ statusCallbackMethod?: string; @@ -296,11 +296,11 @@ export class MediaProcessorInstance { */ dateUpdated: Date; /** - * The [Media Extension](/docs/live/api/media-extensions-overview) name or URL. Ex: `video-composer-v2` + * The [Media Extension](/docs/live/media-extensions-overview) name or URL. Ex: `video-composer-v2` */ extension: string; /** - * The context of the Media Extension, represented as a JSON dictionary. See the documentation for the specific [Media Extension](/docs/live/api/media-extensions-overview) you are using for more information about the context to send. + * The context of the Media Extension, represented as a JSON dictionary. See the documentation for the specific [Media Extension](/docs/live/media-extensions-overview) you are using for more information about the context to send. */ extensionContext: string; status: MediaProcessorStatus; @@ -313,7 +313,7 @@ export class MediaProcessorInstance { */ endedReason: string; /** - * The URL to which Twilio will send asynchronous webhook requests for every MediaProcessor event. See [Status Callbacks](/docs/live/status-callbacks) for details. + * The URL to which Twilio will send asynchronous webhook requests for every MediaProcessor event. See [Status Callbacks](/docs/live/api/status-callbacks) for details. */ statusCallback: string; /** diff --git a/src/rest/media/v1/mediaRecording.ts b/src/rest/media/v1/mediaRecording.ts index 1ae36b0de2..b316f2da4c 100644 --- a/src/rest/media/v1/mediaRecording.ts +++ b/src/rest/media/v1/mediaRecording.ts @@ -290,7 +290,7 @@ export class MediaRecordingInstance { mediaSize: number; status: MediaRecordingStatus; /** - * The URL to which Twilio will send asynchronous webhook requests for every MediaRecording event. See [Status Callbacks](/docs/live/status-callbacks) for more details. + * The URL to which Twilio will send asynchronous webhook requests for every MediaRecording event. See [Status Callbacks](/docs/live/api/status-callbacks) for more details. */ statusCallback: string; /** diff --git a/src/rest/media/v1/playerStreamer.ts b/src/rest/media/v1/playerStreamer.ts index 534d4075cd..c55acb044e 100644 --- a/src/rest/media/v1/playerStreamer.ts +++ b/src/rest/media/v1/playerStreamer.ts @@ -47,7 +47,7 @@ export interface PlayerStreamerContextUpdateOptions { export interface PlayerStreamerListInstanceCreateOptions { /** Specifies whether the PlayerStreamer is configured to stream video. Defaults to `true`. */ video?: boolean; - /** The URL to which Twilio will send asynchronous webhook requests for every PlayerStreamer event. See [Status Callbacks](/docs/live/status-callbacks) for more details. */ + /** The URL to which Twilio will send asynchronous webhook requests for every PlayerStreamer event. See [Status Callbacks](/docs/live/api/status-callbacks) for more details. */ statusCallback?: string; /** The HTTP method Twilio should use to call the `status_callback` URL. Can be `POST` or `GET` and the default is `POST`. */ statusCallbackMethod?: string; @@ -323,7 +323,7 @@ export class PlayerStreamerInstance { */ url: string; /** - * The URL to which Twilio will send asynchronous webhook requests for every PlayerStreamer event. See [Status Callbacks](/docs/live/status-callbacks) for more details. + * The URL to which Twilio will send asynchronous webhook requests for every PlayerStreamer event. See [Status Callbacks](/docs/live/api/status-callbacks) for more details. */ statusCallback: string; /** diff --git a/src/rest/messaging/v1/service.ts b/src/rest/messaging/v1/service.ts index 6c26700c5a..f8c14ee484 100644 --- a/src/rest/messaging/v1/service.ts +++ b/src/rest/messaging/v1/service.ts @@ -20,6 +20,7 @@ const deserialize = require("../../../base/deserialize"); const serialize = require("../../../base/serialize"); import { isValidPathParam } from "../../../base/utility"; import { AlphaSenderListInstance } from "./service/alphaSender"; +import { ChannelSenderListInstance } from "./service/channelSender"; import { PhoneNumberListInstance } from "./service/phoneNumber"; import { ShortCodeListInstance } from "./service/shortCode"; import { UsAppToPersonListInstance } from "./service/usAppToPerson"; @@ -140,6 +141,7 @@ export interface ServiceListInstancePageOptions { export interface ServiceContext { alphaSenders: AlphaSenderListInstance; + channelSenders: ChannelSenderListInstance; phoneNumbers: PhoneNumberListInstance; shortCodes: ShortCodeListInstance; usAppToPerson: UsAppToPersonListInstance; @@ -206,6 +208,7 @@ export class ServiceContextImpl implements ServiceContext { protected _uri: string; protected _alphaSenders?: AlphaSenderListInstance; + protected _channelSenders?: ChannelSenderListInstance; protected _phoneNumbers?: PhoneNumberListInstance; protected _shortCodes?: ShortCodeListInstance; protected _usAppToPerson?: UsAppToPersonListInstance; @@ -227,6 +230,13 @@ export class ServiceContextImpl implements ServiceContext { return this._alphaSenders; } + get channelSenders(): ChannelSenderListInstance { + this._channelSenders = + this._channelSenders || + ChannelSenderListInstance(this._version, this._solution.sid); + return this._channelSenders; + } + get phoneNumbers(): PhoneNumberListInstance { this._phoneNumbers = this._phoneNumbers || @@ -605,6 +615,13 @@ export class ServiceInstance { return this._proxy.alphaSenders; } + /** + * Access the channelSenders. + */ + channelSenders(): ChannelSenderListInstance { + return this._proxy.channelSenders; + } + /** * Access the phoneNumbers. */ diff --git a/src/rest/messaging/v1/service/channelSender.ts b/src/rest/messaging/v1/service/channelSender.ts new file mode 100644 index 0000000000..40bf6921f4 --- /dev/null +++ b/src/rest/messaging/v1/service/channelSender.ts @@ -0,0 +1,490 @@ +/* + * This code was generated by + * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ + * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ + * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ + * + * Twilio - Messaging + * This is the public Twilio REST API. + * + * NOTE: This class is auto generated by OpenAPI Generator. + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { inspect, InspectOptions } from "util"; +import Page, { TwilioResponsePayload } from "../../../../base/Page"; +import Response from "../../../../http/response"; +import V1 from "../../V1"; +const deserialize = require("../../../../base/deserialize"); +const serialize = require("../../../../base/serialize"); +import { isValidPathParam } from "../../../../base/utility"; + +/** + * Options to pass to each + */ +export interface ChannelSenderListInstanceEachOptions { + /** How many resources to return in each list page. The default is 50, and the maximum is 1000. */ + pageSize?: number; + /** Function to process each record. If this and a positional callback are passed, this one will be used */ + callback?: (item: ChannelSenderInstance, done: (err?: Error) => void) => void; + /** Function to be called upon completion of streaming */ + done?: Function; + /** Upper limit for the number of records to return. each() guarantees never to return more than limit. Default is no limit */ + limit?: number; +} + +/** + * Options to pass to list + */ +export interface ChannelSenderListInstanceOptions { + /** How many resources to return in each list page. The default is 50, and the maximum is 1000. */ + pageSize?: number; + /** Upper limit for the number of records to return. list() guarantees never to return more than limit. Default is no limit */ + limit?: number; +} + +/** + * Options to pass to page + */ +export interface ChannelSenderListInstancePageOptions { + /** How many resources to return in each list page. The default is 50, and the maximum is 1000. */ + pageSize?: number; + /** Page Number, this value is simply for client state */ + pageNumber?: number; + /** PageToken provided by the API */ + pageToken?: string; +} + +export interface ChannelSenderContext { + /** + * Fetch a ChannelSenderInstance + * + * @param callback - Callback to handle processed record + * + * @returns Resolves to processed ChannelSenderInstance + */ + fetch( + callback?: (error: Error | null, item?: ChannelSenderInstance) => any + ): Promise; + + /** + * Provide a user-friendly representation + */ + toJSON(): any; + [inspect.custom](_depth: any, options: InspectOptions): any; +} + +export interface ChannelSenderContextSolution { + messagingServiceSid: string; + sid: string; +} + +export class ChannelSenderContextImpl implements ChannelSenderContext { + protected _solution: ChannelSenderContextSolution; + protected _uri: string; + + constructor( + protected _version: V1, + messagingServiceSid: string, + sid: string + ) { + if (!isValidPathParam(messagingServiceSid)) { + throw new Error("Parameter 'messagingServiceSid' is not valid."); + } + + if (!isValidPathParam(sid)) { + throw new Error("Parameter 'sid' is not valid."); + } + + this._solution = { messagingServiceSid, sid }; + this._uri = `/Services/${messagingServiceSid}/ChannelSenders/${sid}`; + } + + fetch( + callback?: (error: Error | null, item?: ChannelSenderInstance) => any + ): Promise { + const instance = this; + let operationVersion = instance._version, + operationPromise = operationVersion.fetch({ + uri: instance._uri, + method: "get", + }); + + operationPromise = operationPromise.then( + (payload) => + new ChannelSenderInstance( + operationVersion, + payload, + instance._solution.messagingServiceSid, + instance._solution.sid + ) + ); + + operationPromise = instance._version.setPromiseCallback( + operationPromise, + callback + ); + return operationPromise; + } + + /** + * Provide a user-friendly representation + * + * @returns Object + */ + toJSON() { + return this._solution; + } + + [inspect.custom](_depth: any, options: InspectOptions) { + return inspect(this.toJSON(), options); + } +} + +interface ChannelSenderPayload extends TwilioResponsePayload { + senders: ChannelSenderResource[]; +} + +interface ChannelSenderResource { + account_sid: string; + messaging_service_sid: string; + sid: string; + sender: string; + sender_type: string; + country_code: string; + date_created: Date; + date_updated: Date; + url: string; +} + +export class ChannelSenderInstance { + protected _solution: ChannelSenderContextSolution; + protected _context?: ChannelSenderContext; + + constructor( + protected _version: V1, + payload: ChannelSenderResource, + messagingServiceSid: string, + sid?: string + ) { + this.accountSid = payload.account_sid; + this.messagingServiceSid = payload.messaging_service_sid; + this.sid = payload.sid; + this.sender = payload.sender; + this.senderType = payload.sender_type; + this.countryCode = payload.country_code; + this.dateCreated = deserialize.iso8601DateTime(payload.date_created); + this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); + this.url = payload.url; + + this._solution = { messagingServiceSid, sid: sid || this.sid }; + } + + /** + * The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the ChannelSender resource. + */ + accountSid: string; + /** + * The SID of the [Service](https://www.twilio.com/docs/messaging/services) the resource is associated with. + */ + messagingServiceSid: string; + /** + * The unique string that we created to identify the ChannelSender resource. + */ + sid: string; + /** + * The unique string that identifies the sender e.g whatsapp:+123456XXXX. + */ + sender: string; + /** + * A string value that identifies the sender type e.g WhatsApp, Messenger. + */ + senderType: string; + /** + * The 2-character [ISO Country Code](https://www.iso.org/iso-3166-country-codes.html) of the number. + */ + countryCode: string; + /** + * The date and time in GMT when the resource was created specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. + */ + dateCreated: Date; + /** + * The date and time in GMT when the resource was last updated specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. + */ + dateUpdated: Date; + url: string; + + private get _proxy(): ChannelSenderContext { + this._context = + this._context || + new ChannelSenderContextImpl( + this._version, + this._solution.messagingServiceSid, + this._solution.sid + ); + return this._context; + } + + /** + * Fetch a ChannelSenderInstance + * + * @param callback - Callback to handle processed record + * + * @returns Resolves to processed ChannelSenderInstance + */ + fetch( + callback?: (error: Error | null, item?: ChannelSenderInstance) => any + ): Promise { + return this._proxy.fetch(callback); + } + + /** + * Provide a user-friendly representation + * + * @returns Object + */ + toJSON() { + return { + accountSid: this.accountSid, + messagingServiceSid: this.messagingServiceSid, + sid: this.sid, + sender: this.sender, + senderType: this.senderType, + countryCode: this.countryCode, + dateCreated: this.dateCreated, + dateUpdated: this.dateUpdated, + url: this.url, + }; + } + + [inspect.custom](_depth: any, options: InspectOptions) { + return inspect(this.toJSON(), options); + } +} + +export interface ChannelSenderSolution { + messagingServiceSid: string; +} + +export interface ChannelSenderListInstance { + _version: V1; + _solution: ChannelSenderSolution; + _uri: string; + + (sid: string): ChannelSenderContext; + get(sid: string): ChannelSenderContext; + + /** + * Streams ChannelSenderInstance records from the API. + * + * This operation lazily loads records as efficiently as possible until the limit + * is reached. + * + * The results are passed into the callback function, so this operation is memory + * efficient. + * + * If a function is passed as the first argument, it will be used as the callback + * function. + * + * @param { ChannelSenderListInstanceEachOptions } [params] - Options for request + * @param { function } [callback] - Function to process each record + */ + each( + callback?: ( + item: ChannelSenderInstance, + done: (err?: Error) => void + ) => void + ): void; + each( + params: ChannelSenderListInstanceEachOptions, + callback?: ( + item: ChannelSenderInstance, + done: (err?: Error) => void + ) => void + ): void; + /** + * Retrieve a single target page of ChannelSenderInstance records from the API. + * + * The request is executed immediately. + * + * @param { string } [targetUrl] - API-generated URL for the requested results page + * @param { function } [callback] - Callback to handle list of records + */ + getPage( + targetUrl: string, + callback?: (error: Error | null, items: ChannelSenderPage) => any + ): Promise; + /** + * Lists ChannelSenderInstance records from the API as a list. + * + * If a function is passed as the first argument, it will be used as the callback + * function. + * + * @param { ChannelSenderListInstanceOptions } [params] - Options for request + * @param { function } [callback] - Callback to handle list of records + */ + list( + callback?: (error: Error | null, items: ChannelSenderInstance[]) => any + ): Promise; + list( + params: ChannelSenderListInstanceOptions, + callback?: (error: Error | null, items: ChannelSenderInstance[]) => any + ): Promise; + /** + * Retrieve a single page of ChannelSenderInstance records from the API. + * + * The request is executed immediately. + * + * If a function is passed as the first argument, it will be used as the callback + * function. + * + * @param { ChannelSenderListInstancePageOptions } [params] - Options for request + * @param { function } [callback] - Callback to handle list of records + */ + page( + callback?: (error: Error | null, items: ChannelSenderPage) => any + ): Promise; + page( + params: ChannelSenderListInstancePageOptions, + callback?: (error: Error | null, items: ChannelSenderPage) => any + ): Promise; + + /** + * Provide a user-friendly representation + */ + toJSON(): any; + [inspect.custom](_depth: any, options: InspectOptions): any; +} + +export function ChannelSenderListInstance( + version: V1, + messagingServiceSid: string +): ChannelSenderListInstance { + if (!isValidPathParam(messagingServiceSid)) { + throw new Error("Parameter 'messagingServiceSid' is not valid."); + } + + const instance = ((sid) => instance.get(sid)) as ChannelSenderListInstance; + + instance.get = function get(sid): ChannelSenderContext { + return new ChannelSenderContextImpl(version, messagingServiceSid, sid); + }; + + instance._version = version; + instance._solution = { messagingServiceSid }; + instance._uri = `/Services/${messagingServiceSid}/ChannelSenders`; + + instance.page = function page( + params?: + | ChannelSenderListInstancePageOptions + | ((error: Error | null, items: ChannelSenderPage) => any), + callback?: (error: Error | null, items: ChannelSenderPage) => any + ): Promise { + if (params instanceof Function) { + callback = params; + params = {}; + } else { + params = params || {}; + } + + let data: any = {}; + + if (params["pageSize"] !== undefined) data["PageSize"] = params["pageSize"]; + + if (params.pageNumber !== undefined) data["Page"] = params.pageNumber; + if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; + + const headers: any = {}; + + let operationVersion = version, + operationPromise = operationVersion.page({ + uri: instance._uri, + method: "get", + params: data, + headers, + }); + + operationPromise = operationPromise.then( + (payload) => + new ChannelSenderPage(operationVersion, payload, instance._solution) + ); + + operationPromise = instance._version.setPromiseCallback( + operationPromise, + callback + ); + return operationPromise; + }; + instance.each = instance._version.each; + instance.list = instance._version.list; + + instance.getPage = function getPage( + targetUrl: string, + callback?: (error: Error | null, items: ChannelSenderPage) => any + ): Promise { + const operationPromise = instance._version._domain.twilio.request({ + method: "get", + uri: targetUrl, + }); + + let pagePromise = operationPromise.then( + (payload) => + new ChannelSenderPage(instance._version, payload, instance._solution) + ); + pagePromise = instance._version.setPromiseCallback(pagePromise, callback); + return pagePromise; + }; + + instance.toJSON = function toJSON() { + return instance._solution; + }; + + instance[inspect.custom] = function inspectImpl( + _depth: any, + options: InspectOptions + ) { + return inspect(instance.toJSON(), options); + }; + + return instance; +} + +export class ChannelSenderPage extends Page< + V1, + ChannelSenderPayload, + ChannelSenderResource, + ChannelSenderInstance +> { + /** + * Initialize the ChannelSenderPage + * + * @param version - Version of the resource + * @param response - Response from the API + * @param solution - Path solution + */ + constructor( + version: V1, + response: Response, + solution: ChannelSenderSolution + ) { + super(version, response, solution); + } + + /** + * Build an instance of ChannelSenderInstance + * + * @param payload - Payload response from the API + */ + getInstance(payload: ChannelSenderResource): ChannelSenderInstance { + return new ChannelSenderInstance( + this._version, + payload, + this._solution.messagingServiceSid + ); + } + + [inspect.custom](depth: any, options: InspectOptions) { + return inspect(this.toJSON(), options); + } +} diff --git a/src/rest/numbers/V2.ts b/src/rest/numbers/V2.ts index 0af101c1fb..a459ba82d1 100644 --- a/src/rest/numbers/V2.ts +++ b/src/rest/numbers/V2.ts @@ -15,6 +15,7 @@ import NumbersBase from "../NumbersBase"; import Version from "../../base/Version"; import { AuthorizationDocumentListInstance } from "./v2/authorizationDocument"; +import { BulkHostedNumberOrderListInstance } from "./v2/bulkHostedNumberOrder"; import { HostedNumberOrderListInstance } from "./v2/hostedNumberOrder"; import { RegulatoryComplianceListInstance } from "./v2/regulatoryCompliance"; @@ -30,6 +31,8 @@ export default class V2 extends Version { /** authorizationDocuments - { Twilio.Numbers.V2.AuthorizationDocumentListInstance } resource */ protected _authorizationDocuments?: AuthorizationDocumentListInstance; + /** bulkHostedNumberOrders - { Twilio.Numbers.V2.BulkHostedNumberOrderListInstance } resource */ + protected _bulkHostedNumberOrders?: BulkHostedNumberOrderListInstance; /** hostedNumberOrders - { Twilio.Numbers.V2.HostedNumberOrderListInstance } resource */ protected _hostedNumberOrders?: HostedNumberOrderListInstance; /** regulatoryCompliance - { Twilio.Numbers.V2.RegulatoryComplianceListInstance } resource */ @@ -42,6 +45,13 @@ export default class V2 extends Version { return this._authorizationDocuments; } + /** Getter for bulkHostedNumberOrders resource */ + get bulkHostedNumberOrders(): BulkHostedNumberOrderListInstance { + this._bulkHostedNumberOrders = + this._bulkHostedNumberOrders || BulkHostedNumberOrderListInstance(this); + return this._bulkHostedNumberOrders; + } + /** Getter for hostedNumberOrders resource */ get hostedNumberOrders(): HostedNumberOrderListInstance { this._hostedNumberOrders = diff --git a/src/rest/numbers/v2/bulkHostedNumberOrder.ts b/src/rest/numbers/v2/bulkHostedNumberOrder.ts new file mode 100644 index 0000000000..5d7b5f7f9e --- /dev/null +++ b/src/rest/numbers/v2/bulkHostedNumberOrder.ts @@ -0,0 +1,342 @@ +/* + * This code was generated by + * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ + * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ + * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ + * + * Twilio - Numbers + * This is the public Twilio REST API. + * + * NOTE: This class is auto generated by OpenAPI Generator. + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { inspect, InspectOptions } from "util"; +import V2 from "../V2"; +const deserialize = require("../../../base/deserialize"); +const serialize = require("../../../base/serialize"); +import { isValidPathParam } from "../../../base/utility"; + +export type BulkHostedNumberOrderRequestStatus = + | "QUEUED" + | "IN_PROGRESS" + | "PROCESSED"; + +/** + * Options to pass to fetch a BulkHostedNumberOrderInstance + */ +export interface BulkHostedNumberOrderContextFetchOptions { + /** Order status can be used for filtering on Hosted Number Order status values. To see a complete list of order statuses, please check \'https://www.twilio.com/docs/phone-numbers/hosted-numbers/hosted-numbers-api/hosted-number-order-resource#status-values\'. */ + orderStatus?: string; +} + +export interface BulkHostedNumberOrderContext { + /** + * Fetch a BulkHostedNumberOrderInstance + * + * @param callback - Callback to handle processed record + * + * @returns Resolves to processed BulkHostedNumberOrderInstance + */ + fetch( + callback?: ( + error: Error | null, + item?: BulkHostedNumberOrderInstance + ) => any + ): Promise; + /** + * Fetch a BulkHostedNumberOrderInstance + * + * @param params - Parameter for request + * @param callback - Callback to handle processed record + * + * @returns Resolves to processed BulkHostedNumberOrderInstance + */ + fetch( + params: BulkHostedNumberOrderContextFetchOptions, + callback?: ( + error: Error | null, + item?: BulkHostedNumberOrderInstance + ) => any + ): Promise; + + /** + * Provide a user-friendly representation + */ + toJSON(): any; + [inspect.custom](_depth: any, options: InspectOptions): any; +} + +export interface BulkHostedNumberOrderContextSolution { + sid: string; +} + +export class BulkHostedNumberOrderContextImpl + implements BulkHostedNumberOrderContext +{ + protected _solution: BulkHostedNumberOrderContextSolution; + protected _uri: string; + + constructor(protected _version: V2, sid: string) { + if (!isValidPathParam(sid)) { + throw new Error("Parameter 'sid' is not valid."); + } + + this._solution = { sid }; + this._uri = `/HostedNumber/Orders/Bulk/${sid}`; + } + + fetch( + params?: + | BulkHostedNumberOrderContextFetchOptions + | ((error: Error | null, item?: BulkHostedNumberOrderInstance) => any), + callback?: ( + error: Error | null, + item?: BulkHostedNumberOrderInstance + ) => any + ): Promise { + if (params instanceof Function) { + callback = params; + params = {}; + } else { + params = params || {}; + } + + let data: any = {}; + + if (params["orderStatus"] !== undefined) + data["OrderStatus"] = params["orderStatus"]; + + const headers: any = {}; + + const instance = this; + let operationVersion = instance._version, + operationPromise = operationVersion.fetch({ + uri: instance._uri, + method: "get", + params: data, + headers, + }); + + operationPromise = operationPromise.then( + (payload) => + new BulkHostedNumberOrderInstance( + operationVersion, + payload, + instance._solution.sid + ) + ); + + operationPromise = instance._version.setPromiseCallback( + operationPromise, + callback + ); + return operationPromise; + } + + /** + * Provide a user-friendly representation + * + * @returns Object + */ + toJSON() { + return this._solution; + } + + [inspect.custom](_depth: any, options: InspectOptions) { + return inspect(this.toJSON(), options); + } +} + +interface BulkHostedNumberOrderPayload extends BulkHostedNumberOrderResource {} + +interface BulkHostedNumberOrderResource { + sid: string; + account_sid: string; + request_status: BulkHostedNumberOrderRequestStatus; + friendly_name: string; + notification_email: string; + date_created: Date; + date_completed: Date; + url: string; + total_count: number; + results: Array; +} + +export class BulkHostedNumberOrderInstance { + protected _solution: BulkHostedNumberOrderContextSolution; + protected _context?: BulkHostedNumberOrderContext; + + constructor( + protected _version: V2, + payload: BulkHostedNumberOrderResource, + sid?: string + ) { + this.sid = payload.sid; + this.accountSid = payload.account_sid; + this.requestStatus = payload.request_status; + this.friendlyName = payload.friendly_name; + this.notificationEmail = payload.notification_email; + this.dateCreated = deserialize.iso8601DateTime(payload.date_created); + this.dateCompleted = deserialize.iso8601DateTime(payload.date_completed); + this.url = payload.url; + this.totalCount = deserialize.integer(payload.total_count); + this.results = payload.results; + + this._solution = { sid: sid || this.sid }; + } + + /** + * A 34 character string that uniquely identifies this BulkHostedNumberOrder. + */ + sid: string; + /** + * A 34 character string that uniquely identifies the account. + */ + accountSid: string; + requestStatus: BulkHostedNumberOrderRequestStatus; + /** + * A 128 character string that is a human-readable text that describes this resource. + */ + friendlyName: string; + /** + * Email address used for send notifications about this Bulk hosted number request. + */ + notificationEmail: string; + /** + * The date this resource was created, given as [GMT RFC 2822](http://www.ietf.org/rfc/rfc2822.txt) format. + */ + dateCreated: Date; + /** + * The date that this resource was completed, given as [GMT RFC 2822](http://www.ietf.org/rfc/rfc2822.txt) format. + */ + dateCompleted: Date; + /** + * The URL of this BulkHostedNumberOrder resource. + */ + url: string; + /** + * The total count of phone numbers in this Bulk hosting request. + */ + totalCount: number; + /** + * Contains a list of all the individual hosting orders and their information, for this Bulk request. Each result object is grouped by its order status. To see a complete list of order status, please check \'https://www.twilio.com/docs/phone-numbers/hosted-numbers/hosted-numbers-api/hosted-number-order-resource#status-values\'. + */ + results: Array; + + private get _proxy(): BulkHostedNumberOrderContext { + this._context = + this._context || + new BulkHostedNumberOrderContextImpl(this._version, this._solution.sid); + return this._context; + } + + /** + * Fetch a BulkHostedNumberOrderInstance + * + * @param callback - Callback to handle processed record + * + * @returns Resolves to processed BulkHostedNumberOrderInstance + */ + fetch( + callback?: ( + error: Error | null, + item?: BulkHostedNumberOrderInstance + ) => any + ): Promise; + /** + * Fetch a BulkHostedNumberOrderInstance + * + * @param params - Parameter for request + * @param callback - Callback to handle processed record + * + * @returns Resolves to processed BulkHostedNumberOrderInstance + */ + fetch( + params: BulkHostedNumberOrderContextFetchOptions, + callback?: ( + error: Error | null, + item?: BulkHostedNumberOrderInstance + ) => any + ): Promise; + + fetch( + params?: any, + callback?: ( + error: Error | null, + item?: BulkHostedNumberOrderInstance + ) => any + ): Promise { + return this._proxy.fetch(params, callback); + } + + /** + * Provide a user-friendly representation + * + * @returns Object + */ + toJSON() { + return { + sid: this.sid, + accountSid: this.accountSid, + requestStatus: this.requestStatus, + friendlyName: this.friendlyName, + notificationEmail: this.notificationEmail, + dateCreated: this.dateCreated, + dateCompleted: this.dateCompleted, + url: this.url, + totalCount: this.totalCount, + results: this.results, + }; + } + + [inspect.custom](_depth: any, options: InspectOptions) { + return inspect(this.toJSON(), options); + } +} + +export interface BulkHostedNumberOrderSolution {} + +export interface BulkHostedNumberOrderListInstance { + _version: V2; + _solution: BulkHostedNumberOrderSolution; + _uri: string; + + (sid: string): BulkHostedNumberOrderContext; + get(sid: string): BulkHostedNumberOrderContext; + + /** + * Provide a user-friendly representation + */ + toJSON(): any; + [inspect.custom](_depth: any, options: InspectOptions): any; +} + +export function BulkHostedNumberOrderListInstance( + version: V2 +): BulkHostedNumberOrderListInstance { + const instance = ((sid) => + instance.get(sid)) as BulkHostedNumberOrderListInstance; + + instance.get = function get(sid): BulkHostedNumberOrderContext { + return new BulkHostedNumberOrderContextImpl(version, sid); + }; + + instance._version = version; + instance._solution = {}; + instance._uri = ``; + + instance.toJSON = function toJSON() { + return instance._solution; + }; + + instance[inspect.custom] = function inspectImpl( + _depth: any, + options: InspectOptions + ) { + return inspect(instance.toJSON(), options); + }; + + return instance; +} diff --git a/src/rest/numbers/v2/regulatoryCompliance.ts b/src/rest/numbers/v2/regulatoryCompliance.ts index 45cc9b28e4..d823765db7 100644 --- a/src/rest/numbers/v2/regulatoryCompliance.ts +++ b/src/rest/numbers/v2/regulatoryCompliance.ts @@ -24,6 +24,8 @@ import { RegulationListInstance } from "./regulatoryCompliance/regulation"; import { SupportingDocumentListInstance } from "./regulatoryCompliance/supportingDocument"; import { SupportingDocumentTypeListInstance } from "./regulatoryCompliance/supportingDocumentType"; +export type RegulatoryComplianceEndUserType = "individual" | "business"; + export interface RegulatoryComplianceSolution {} export interface RegulatoryComplianceListInstance { diff --git a/src/rest/video/v1/room.ts b/src/rest/video/v1/room.ts index 8a5f20f1a4..c54355d056 100644 --- a/src/rest/video/v1/room.ts +++ b/src/rest/video/v1/room.ts @@ -57,7 +57,7 @@ export interface RoomListInstanceCreateOptions { recordParticipantsOnConnect?: boolean; /** An array of the video codecs that are supported when publishing a track in the room. Can be: `VP8` and `H264`. ***This feature is not available in `peer-to-peer` rooms*** */ videoCodecs?: Array; - /** The region for the media server in Group Rooms. Can be: one of the [available Media Regions](https://www.twilio.com/docs/video/ip-address-whitelisting#group-rooms-media-servers). ***This feature is not available in `peer-to-peer` rooms.*** */ + /** The region for the media server in Group Rooms. Can be: one of the [available Media Regions](https://www.twilio.com/docs/video/ip-addresses#group-rooms-media-servers). ***This feature is not available in `peer-to-peer` rooms.*** */ mediaRegion?: string; /** A collection of Recording Rules that describe how to include or exclude matching tracks for recording */ recordingRules?: any; @@ -417,7 +417,7 @@ export class RoomInstance { */ videoCodecs: Array; /** - * The region for the media server in Group Rooms. Can be: one of the [available Media Regions](https://www.twilio.com/docs/video/ip-address-whitelisting#media-servers). ***This feature is not available in `peer-to-peer` rooms.*** + * The region for the media server in Group Rooms. Can be: one of the [available Media Regions](https://www.twilio.com/docs/video/ip-addresses#media-servers). ***This feature is not available in `peer-to-peer` rooms.*** */ mediaRegion: string; /** diff --git a/src/rest/voice/v1/dialingPermissions/country.ts b/src/rest/voice/v1/dialingPermissions/country.ts index 7fdbb12ecd..cde73d481c 100644 --- a/src/rest/voice/v1/dialingPermissions/country.ts +++ b/src/rest/voice/v1/dialingPermissions/country.ts @@ -35,7 +35,7 @@ export interface CountryListInstanceEachOptions { lowRiskNumbersEnabled?: boolean; /** Filter to retrieve the country permissions with dialing to high-risk special service numbers enabled. Can be: `true` or `false` */ highRiskSpecialNumbersEnabled?: boolean; - /** Filter to retrieve the country permissions with dialing to high-risk [toll fraud](https://www.twilio.com/learn/voice-and-video/toll-fraud) numbers enabled. Can be: `true` or `false`. */ + /** Filter to retrieve the country permissions with dialing to high-risk [toll fraud](https://www.twilio.com/blog/how-to-protect-your-account-from-toll-fraud-with-voice-dialing-geo-permissions-html) numbers enabled. Can be: `true` or `false`. */ highRiskTollfraudNumbersEnabled?: boolean; /** How many resources to return in each list page. The default is 50, and the maximum is 1000. */ pageSize?: number; @@ -61,7 +61,7 @@ export interface CountryListInstanceOptions { lowRiskNumbersEnabled?: boolean; /** Filter to retrieve the country permissions with dialing to high-risk special service numbers enabled. Can be: `true` or `false` */ highRiskSpecialNumbersEnabled?: boolean; - /** Filter to retrieve the country permissions with dialing to high-risk [toll fraud](https://www.twilio.com/learn/voice-and-video/toll-fraud) numbers enabled. Can be: `true` or `false`. */ + /** Filter to retrieve the country permissions with dialing to high-risk [toll fraud](https://www.twilio.com/blog/how-to-protect-your-account-from-toll-fraud-with-voice-dialing-geo-permissions-html) numbers enabled. Can be: `true` or `false`. */ highRiskTollfraudNumbersEnabled?: boolean; /** How many resources to return in each list page. The default is 50, and the maximum is 1000. */ pageSize?: number; @@ -83,7 +83,7 @@ export interface CountryListInstancePageOptions { lowRiskNumbersEnabled?: boolean; /** Filter to retrieve the country permissions with dialing to high-risk special service numbers enabled. Can be: `true` or `false` */ highRiskSpecialNumbersEnabled?: boolean; - /** Filter to retrieve the country permissions with dialing to high-risk [toll fraud](https://www.twilio.com/learn/voice-and-video/toll-fraud) numbers enabled. Can be: `true` or `false`. */ + /** Filter to retrieve the country permissions with dialing to high-risk [toll fraud](https://www.twilio.com/blog/how-to-protect-your-account-from-toll-fraud-with-voice-dialing-geo-permissions-html) numbers enabled. Can be: `true` or `false`. */ highRiskTollfraudNumbersEnabled?: boolean; /** How many resources to return in each list page. The default is 50, and the maximum is 1000. */ pageSize?: number; @@ -245,7 +245,7 @@ export class CountryInstance { */ highRiskSpecialNumbersEnabled: boolean; /** - * Whether dialing to high-risk [toll fraud](https://www.twilio.com/learn/voice-and-video/toll-fraud) numbers is enabled. These prefixes include narrow number ranges that have a high-risk of international revenue sharing fraud (IRSF) attacks, also known as [toll fraud](https://www.twilio.com/learn/voice-and-video/toll-fraud). These prefixes are collected from anti-fraud databases and verified by analyzing calls on our network. These prefixes are not available for download and are updated frequently + * Whether dialing to high-risk [toll fraud](https://www.twilio.com/blog/how-to-protect-your-account-from-toll-fraud-with-voice-dialing-geo-permissions-html) numbers is enabled. These prefixes include narrow number ranges that have a high-risk of international revenue sharing fraud (IRSF) attacks, also known as [toll fraud](https://www.twilio.com/blog/how-to-protect-your-account-from-toll-fraud-with-voice-dialing-geo-permissions-html). These prefixes are collected from anti-fraud databases and verified by analyzing calls on our network. These prefixes are not available for download and are updated frequently */ highRiskTollfraudNumbersEnabled: boolean; /**