twilio 4.15.0 → 4.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,6 +8,7 @@ import { MediaListInstance } from "./message/media";
8
8
  export type MessageAddressRetention = "retain" | "obfuscate";
9
9
  export type MessageContentRetention = "retain" | "discard";
10
10
  export type MessageDirection = "inbound" | "outbound-api" | "outbound-call" | "outbound-reply";
11
+ export type MessageRiskCheck = "enable" | "disable";
11
12
  export type MessageScheduleType = "fixed";
12
13
  export type MessageStatus = "queued" | "sending" | "sent" | "failed" | "delivered" | "undelivered" | "receiving" | "received" | "accepted" | "scheduled" | "read" | "partially_delivered" | "canceled";
13
14
  export type MessageUpdateStatus = "canceled";
@@ -24,9 +25,9 @@ export interface MessageContextUpdateOptions {
24
25
  * Options to pass to create a MessageInstance
25
26
  */
26
27
  export interface MessageListInstanceCreateOptions {
27
- /** 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`. */
28
+ /** 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`. */
28
29
  to: string;
29
- /** 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). */
30
+ /** 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). */
30
31
  statusCallback?: string;
31
32
  /** 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. */
32
33
  applicationSid?: string;
@@ -58,7 +59,9 @@ export interface MessageListInstanceCreateOptions {
58
59
  sendAsMms?: boolean;
59
60
  /** 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. */
60
61
  contentVariables?: string;
61
- /** 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. */
62
+ /** */
63
+ riskCheck?: MessageRiskCheck;
64
+ /** 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. */
62
65
  from?: string;
63
66
  /** 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. */
64
67
  messagingServiceSid?: string;
@@ -238,11 +241,11 @@ export declare class MessageInstance {
238
241
  numSegments: string;
239
242
  direction: MessageDirection;
240
243
  /**
241
- * 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.
244
+ * 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.
242
245
  */
243
246
  from: string;
244
247
  /**
245
- * 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`)
248
+ * 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`)
246
249
  */
247
250
  to: string;
248
251
  /**
@@ -271,7 +274,7 @@ export declare class MessageInstance {
271
274
  numMedia: string;
272
275
  status: MessageStatus;
273
276
  /**
274
- * 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.
277
+ * 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.
275
278
  */
276
279
  messagingServiceSid: string;
277
280
  /**
@@ -258,6 +258,8 @@ function MessageListInstance(version, accountSid) {
258
258
  data["SendAsMms"] = serialize.bool(params["sendAsMms"]);
259
259
  if (params["contentVariables"] !== undefined)
260
260
  data["ContentVariables"] = params["contentVariables"];
261
+ if (params["riskCheck"] !== undefined)
262
+ data["RiskCheck"] = params["riskCheck"];
261
263
  if (params["from"] !== undefined)
262
264
  data["From"] = params["from"];
263
265
  if (params["messagingServiceSid"] !== undefined)
@@ -17,13 +17,13 @@ export interface ParticipantContextRemoveOptions {
17
17
  export interface ParticipantContextUpdateOptions {
18
18
  /** The X-Twilio-Webhook-Enabled HTTP request header */
19
19
  xTwilioWebhookEnabled?: ParticipantWebhookEnabledType;
20
- /** The date that this resource was created. */
20
+ /** The date on which this resource was created. */
21
21
  dateCreated?: Date;
22
- /** The date that this resource was last updated. */
22
+ /** The date on which this resource was last updated. */
23
23
  dateUpdated?: Date;
24
- /** 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. */
24
+ /** 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. */
25
25
  identity?: string;
26
- /** 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. */
26
+ /** 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. */
27
27
  attributes?: string;
28
28
  /** The SID of a conversation-level [Role](https://www.twilio.com/docs/conversations/api/role-resource) to assign to the participant. */
29
29
  roleSid?: string;
@@ -42,19 +42,19 @@ export interface ParticipantContextUpdateOptions {
42
42
  export interface ParticipantListInstanceCreateOptions {
43
43
  /** The X-Twilio-Webhook-Enabled HTTP request header */
44
44
  xTwilioWebhookEnabled?: ParticipantWebhookEnabledType;
45
- /** 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. */
45
+ /** 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. */
46
46
  identity?: string;
47
- /** 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). */
47
+ /** 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). */
48
48
  "messagingBinding.address"?: string;
49
- /** 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). */
49
+ /** 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). */
50
50
  "messagingBinding.proxyAddress"?: string;
51
- /** The date that this resource was created. */
51
+ /** The date on which this resource was created. */
52
52
  dateCreated?: Date;
53
- /** The date that this resource was last updated. */
53
+ /** The date on which this resource was last updated. */
54
54
  dateUpdated?: Date;
55
- /** 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. */
55
+ /** 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. */
56
56
  attributes?: string;
57
- /** The address of the Twilio phone number that is used in Group MMS. Communication mask for the Conversation participant with Identity. */
57
+ /** The address of the Twilio phone number that is used in Group MMS. */
58
58
  "messagingBinding.projectedAddress"?: string;
59
59
  /** The SID of a conversation-level [Role](https://www.twilio.com/docs/conversations/api/role-resource) to assign to the participant. */
60
60
  roleSid?: string;
@@ -202,11 +202,11 @@ export declare class ParticipantInstance {
202
202
  */
203
203
  sid: string;
204
204
  /**
205
- * 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.
205
+ * 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.
206
206
  */
207
207
  identity: string;
208
208
  /**
209
- * 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.
209
+ * 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.
210
210
  */
211
211
  attributes: string;
212
212
  /**
@@ -218,11 +218,11 @@ export declare class ParticipantInstance {
218
218
  */
219
219
  roleSid: string;
220
220
  /**
221
- * The date that this resource was created.
221
+ * The date on which this resource was created.
222
222
  */
223
223
  dateCreated: Date;
224
224
  /**
225
- * The date that this resource was last updated.
225
+ * The date on which this resource was last updated.
226
226
  */
227
227
  dateUpdated: Date;
228
228
  /**
@@ -134,7 +134,7 @@ export declare class ParticipantInstance {
134
134
  */
135
135
  codecs: Array<ParticipantCodec>;
136
136
  /**
137
- * 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).
137
+ * 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).
138
138
  */
139
139
  endReason: string;
140
140
  /**
@@ -147,12 +147,12 @@ export declare class ParticipantInstance {
147
147
  errorCodeUrl: string;
148
148
  mediaRegion: ParticipantTwilioRealm;
149
149
  /**
150
- * 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.
150
+ * 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.
151
151
  */
152
152
  properties: any;
153
153
  edgeLocation: ParticipantEdgeLocation;
154
154
  /**
155
- * 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.
155
+ * 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.
156
156
  */
157
157
  publisherInfo: any;
158
158
  /**
@@ -17,13 +17,13 @@ export interface MediaProcessorContextUpdateOptions {
17
17
  * Options to pass to create a MediaProcessorInstance
18
18
  */
19
19
  export interface MediaProcessorListInstanceCreateOptions {
20
- /** The [Media Extension](/docs/live/api/media-extensions-overview) name or URL. Ex: `video-composer-v2` */
20
+ /** The [Media Extension](/docs/live/media-extensions-overview) name or URL. Ex: `video-composer-v2` */
21
21
  extension: string;
22
- /** 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. */
22
+ /** 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. */
23
23
  extensionContext: string;
24
- /** 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. */
24
+ /** 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. */
25
25
  extensionEnvironment?: any;
26
- /** The URL to which Twilio will send asynchronous webhook requests for every MediaProcessor event. See [Status Callbacks](/docs/live/status-callbacks) for details. */
26
+ /** The URL to which Twilio will send asynchronous webhook requests for every MediaProcessor event. See [Status Callbacks](/docs/live/api/status-callbacks) for details. */
27
27
  statusCallback?: string;
28
28
  /** The HTTP method Twilio should use to call the `status_callback` URL. Can be `POST` or `GET` and the default is `POST`. */
29
29
  statusCallbackMethod?: string;
@@ -156,11 +156,11 @@ export declare class MediaProcessorInstance {
156
156
  */
157
157
  dateUpdated: Date;
158
158
  /**
159
- * The [Media Extension](/docs/live/api/media-extensions-overview) name or URL. Ex: `video-composer-v2`
159
+ * The [Media Extension](/docs/live/media-extensions-overview) name or URL. Ex: `video-composer-v2`
160
160
  */
161
161
  extension: string;
162
162
  /**
163
- * 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.
163
+ * 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.
164
164
  */
165
165
  extensionContext: string;
166
166
  status: MediaProcessorStatus;
@@ -173,7 +173,7 @@ export declare class MediaProcessorInstance {
173
173
  */
174
174
  endedReason: string;
175
175
  /**
176
- * The URL to which Twilio will send asynchronous webhook requests for every MediaProcessor event. See [Status Callbacks](/docs/live/status-callbacks) for details.
176
+ * The URL to which Twilio will send asynchronous webhook requests for every MediaProcessor event. See [Status Callbacks](/docs/live/api/status-callbacks) for details.
177
177
  */
178
178
  statusCallback: string;
179
179
  /**
@@ -172,7 +172,7 @@ export declare class MediaRecordingInstance {
172
172
  mediaSize: number;
173
173
  status: MediaRecordingStatus;
174
174
  /**
175
- * The URL to which Twilio will send asynchronous webhook requests for every MediaRecording event. See [Status Callbacks](/docs/live/status-callbacks) for more details.
175
+ * 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.
176
176
  */
177
177
  statusCallback: string;
178
178
  /**
@@ -21,7 +21,7 @@ export interface PlayerStreamerContextUpdateOptions {
21
21
  export interface PlayerStreamerListInstanceCreateOptions {
22
22
  /** Specifies whether the PlayerStreamer is configured to stream video. Defaults to `true`. */
23
23
  video?: boolean;
24
- /** The URL to which Twilio will send asynchronous webhook requests for every PlayerStreamer event. See [Status Callbacks](/docs/live/status-callbacks) for more details. */
24
+ /** 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. */
25
25
  statusCallback?: string;
26
26
  /** The HTTP method Twilio should use to call the `status_callback` URL. Can be `POST` or `GET` and the default is `POST`. */
27
27
  statusCallbackMethod?: string;
@@ -170,7 +170,7 @@ export declare class PlayerStreamerInstance {
170
170
  */
171
171
  url: string;
172
172
  /**
173
- * The URL to which Twilio will send asynchronous webhook requests for every PlayerStreamer event. See [Status Callbacks](/docs/live/status-callbacks) for more details.
173
+ * 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.
174
174
  */
175
175
  statusCallback: string;
176
176
  /**
@@ -0,0 +1,234 @@
1
+ /// <reference types="node" />
2
+ import { inspect, InspectOptions } from "util";
3
+ import Page, { TwilioResponsePayload } from "../../../../base/Page";
4
+ import Response from "../../../../http/response";
5
+ import V1 from "../../V1";
6
+ /**
7
+ * Options to pass to each
8
+ */
9
+ export interface ChannelSenderListInstanceEachOptions {
10
+ /** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
11
+ pageSize?: number;
12
+ /** Function to process each record. If this and a positional callback are passed, this one will be used */
13
+ callback?: (item: ChannelSenderInstance, done: (err?: Error) => void) => void;
14
+ /** Function to be called upon completion of streaming */
15
+ done?: Function;
16
+ /** Upper limit for the number of records to return. each() guarantees never to return more than limit. Default is no limit */
17
+ limit?: number;
18
+ }
19
+ /**
20
+ * Options to pass to list
21
+ */
22
+ export interface ChannelSenderListInstanceOptions {
23
+ /** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
24
+ pageSize?: number;
25
+ /** Upper limit for the number of records to return. list() guarantees never to return more than limit. Default is no limit */
26
+ limit?: number;
27
+ }
28
+ /**
29
+ * Options to pass to page
30
+ */
31
+ export interface ChannelSenderListInstancePageOptions {
32
+ /** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
33
+ pageSize?: number;
34
+ /** Page Number, this value is simply for client state */
35
+ pageNumber?: number;
36
+ /** PageToken provided by the API */
37
+ pageToken?: string;
38
+ }
39
+ export interface ChannelSenderContext {
40
+ /**
41
+ * Fetch a ChannelSenderInstance
42
+ *
43
+ * @param callback - Callback to handle processed record
44
+ *
45
+ * @returns Resolves to processed ChannelSenderInstance
46
+ */
47
+ fetch(callback?: (error: Error | null, item?: ChannelSenderInstance) => any): Promise<ChannelSenderInstance>;
48
+ /**
49
+ * Provide a user-friendly representation
50
+ */
51
+ toJSON(): any;
52
+ [inspect.custom](_depth: any, options: InspectOptions): any;
53
+ }
54
+ export interface ChannelSenderContextSolution {
55
+ messagingServiceSid: string;
56
+ sid: string;
57
+ }
58
+ export declare class ChannelSenderContextImpl implements ChannelSenderContext {
59
+ protected _version: V1;
60
+ protected _solution: ChannelSenderContextSolution;
61
+ protected _uri: string;
62
+ constructor(_version: V1, messagingServiceSid: string, sid: string);
63
+ fetch(callback?: (error: Error | null, item?: ChannelSenderInstance) => any): Promise<ChannelSenderInstance>;
64
+ /**
65
+ * Provide a user-friendly representation
66
+ *
67
+ * @returns Object
68
+ */
69
+ toJSON(): ChannelSenderContextSolution;
70
+ [inspect.custom](_depth: any, options: InspectOptions): string;
71
+ }
72
+ interface ChannelSenderPayload extends TwilioResponsePayload {
73
+ senders: ChannelSenderResource[];
74
+ }
75
+ interface ChannelSenderResource {
76
+ account_sid: string;
77
+ messaging_service_sid: string;
78
+ sid: string;
79
+ sender: string;
80
+ sender_type: string;
81
+ country_code: string;
82
+ date_created: Date;
83
+ date_updated: Date;
84
+ url: string;
85
+ }
86
+ export declare class ChannelSenderInstance {
87
+ protected _version: V1;
88
+ protected _solution: ChannelSenderContextSolution;
89
+ protected _context?: ChannelSenderContext;
90
+ constructor(_version: V1, payload: ChannelSenderResource, messagingServiceSid: string, sid?: string);
91
+ /**
92
+ * The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the ChannelSender resource.
93
+ */
94
+ accountSid: string;
95
+ /**
96
+ * The SID of the [Service](https://www.twilio.com/docs/messaging/services) the resource is associated with.
97
+ */
98
+ messagingServiceSid: string;
99
+ /**
100
+ * The unique string that we created to identify the ChannelSender resource.
101
+ */
102
+ sid: string;
103
+ /**
104
+ * The unique string that identifies the sender e.g whatsapp:+123456XXXX.
105
+ */
106
+ sender: string;
107
+ /**
108
+ * A string value that identifies the sender type e.g WhatsApp, Messenger.
109
+ */
110
+ senderType: string;
111
+ /**
112
+ * The 2-character [ISO Country Code](https://www.iso.org/iso-3166-country-codes.html) of the number.
113
+ */
114
+ countryCode: string;
115
+ /**
116
+ * The date and time in GMT when the resource was created specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
117
+ */
118
+ dateCreated: Date;
119
+ /**
120
+ * The date and time in GMT when the resource was last updated specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
121
+ */
122
+ dateUpdated: Date;
123
+ url: string;
124
+ private get _proxy();
125
+ /**
126
+ * Fetch a ChannelSenderInstance
127
+ *
128
+ * @param callback - Callback to handle processed record
129
+ *
130
+ * @returns Resolves to processed ChannelSenderInstance
131
+ */
132
+ fetch(callback?: (error: Error | null, item?: ChannelSenderInstance) => any): Promise<ChannelSenderInstance>;
133
+ /**
134
+ * Provide a user-friendly representation
135
+ *
136
+ * @returns Object
137
+ */
138
+ toJSON(): {
139
+ accountSid: string;
140
+ messagingServiceSid: string;
141
+ sid: string;
142
+ sender: string;
143
+ senderType: string;
144
+ countryCode: string;
145
+ dateCreated: Date;
146
+ dateUpdated: Date;
147
+ url: string;
148
+ };
149
+ [inspect.custom](_depth: any, options: InspectOptions): string;
150
+ }
151
+ export interface ChannelSenderSolution {
152
+ messagingServiceSid: string;
153
+ }
154
+ export interface ChannelSenderListInstance {
155
+ _version: V1;
156
+ _solution: ChannelSenderSolution;
157
+ _uri: string;
158
+ (sid: string): ChannelSenderContext;
159
+ get(sid: string): ChannelSenderContext;
160
+ /**
161
+ * Streams ChannelSenderInstance records from the API.
162
+ *
163
+ * This operation lazily loads records as efficiently as possible until the limit
164
+ * is reached.
165
+ *
166
+ * The results are passed into the callback function, so this operation is memory
167
+ * efficient.
168
+ *
169
+ * If a function is passed as the first argument, it will be used as the callback
170
+ * function.
171
+ *
172
+ * @param { ChannelSenderListInstanceEachOptions } [params] - Options for request
173
+ * @param { function } [callback] - Function to process each record
174
+ */
175
+ each(callback?: (item: ChannelSenderInstance, done: (err?: Error) => void) => void): void;
176
+ each(params: ChannelSenderListInstanceEachOptions, callback?: (item: ChannelSenderInstance, done: (err?: Error) => void) => void): void;
177
+ /**
178
+ * Retrieve a single target page of ChannelSenderInstance records from the API.
179
+ *
180
+ * The request is executed immediately.
181
+ *
182
+ * @param { string } [targetUrl] - API-generated URL for the requested results page
183
+ * @param { function } [callback] - Callback to handle list of records
184
+ */
185
+ getPage(targetUrl: string, callback?: (error: Error | null, items: ChannelSenderPage) => any): Promise<ChannelSenderPage>;
186
+ /**
187
+ * Lists ChannelSenderInstance records from the API as a list.
188
+ *
189
+ * If a function is passed as the first argument, it will be used as the callback
190
+ * function.
191
+ *
192
+ * @param { ChannelSenderListInstanceOptions } [params] - Options for request
193
+ * @param { function } [callback] - Callback to handle list of records
194
+ */
195
+ list(callback?: (error: Error | null, items: ChannelSenderInstance[]) => any): Promise<ChannelSenderInstance[]>;
196
+ list(params: ChannelSenderListInstanceOptions, callback?: (error: Error | null, items: ChannelSenderInstance[]) => any): Promise<ChannelSenderInstance[]>;
197
+ /**
198
+ * Retrieve a single page of ChannelSenderInstance records from the API.
199
+ *
200
+ * The request is executed immediately.
201
+ *
202
+ * If a function is passed as the first argument, it will be used as the callback
203
+ * function.
204
+ *
205
+ * @param { ChannelSenderListInstancePageOptions } [params] - Options for request
206
+ * @param { function } [callback] - Callback to handle list of records
207
+ */
208
+ page(callback?: (error: Error | null, items: ChannelSenderPage) => any): Promise<ChannelSenderPage>;
209
+ page(params: ChannelSenderListInstancePageOptions, callback?: (error: Error | null, items: ChannelSenderPage) => any): Promise<ChannelSenderPage>;
210
+ /**
211
+ * Provide a user-friendly representation
212
+ */
213
+ toJSON(): any;
214
+ [inspect.custom](_depth: any, options: InspectOptions): any;
215
+ }
216
+ export declare function ChannelSenderListInstance(version: V1, messagingServiceSid: string): ChannelSenderListInstance;
217
+ export declare class ChannelSenderPage extends Page<V1, ChannelSenderPayload, ChannelSenderResource, ChannelSenderInstance> {
218
+ /**
219
+ * Initialize the ChannelSenderPage
220
+ *
221
+ * @param version - Version of the resource
222
+ * @param response - Response from the API
223
+ * @param solution - Path solution
224
+ */
225
+ constructor(version: V1, response: Response<string>, solution: ChannelSenderSolution);
226
+ /**
227
+ * Build an instance of ChannelSenderInstance
228
+ *
229
+ * @param payload - Payload response from the API
230
+ */
231
+ getInstance(payload: ChannelSenderResource): ChannelSenderInstance;
232
+ [inspect.custom](depth: any, options: InspectOptions): string;
233
+ }
234
+ export {};
@@ -0,0 +1,193 @@
1
+ "use strict";
2
+ /*
3
+ * This code was generated by
4
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
5
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
6
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
7
+ *
8
+ * Twilio - Messaging
9
+ * This is the public Twilio REST API.
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator.
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ var __importDefault = (this && this.__importDefault) || function (mod) {
16
+ return (mod && mod.__esModule) ? mod : { "default": mod };
17
+ };
18
+ Object.defineProperty(exports, "__esModule", { value: true });
19
+ exports.ChannelSenderPage = exports.ChannelSenderListInstance = exports.ChannelSenderInstance = exports.ChannelSenderContextImpl = void 0;
20
+ const util_1 = require("util");
21
+ const Page_1 = __importDefault(require("../../../../base/Page"));
22
+ const deserialize = require("../../../../base/deserialize");
23
+ const serialize = require("../../../../base/serialize");
24
+ const utility_1 = require("../../../../base/utility");
25
+ class ChannelSenderContextImpl {
26
+ constructor(_version, messagingServiceSid, sid) {
27
+ this._version = _version;
28
+ if (!(0, utility_1.isValidPathParam)(messagingServiceSid)) {
29
+ throw new Error("Parameter 'messagingServiceSid' is not valid.");
30
+ }
31
+ if (!(0, utility_1.isValidPathParam)(sid)) {
32
+ throw new Error("Parameter 'sid' is not valid.");
33
+ }
34
+ this._solution = { messagingServiceSid, sid };
35
+ this._uri = `/Services/${messagingServiceSid}/ChannelSenders/${sid}`;
36
+ }
37
+ fetch(callback) {
38
+ const instance = this;
39
+ let operationVersion = instance._version, operationPromise = operationVersion.fetch({
40
+ uri: instance._uri,
41
+ method: "get",
42
+ });
43
+ operationPromise = operationPromise.then((payload) => new ChannelSenderInstance(operationVersion, payload, instance._solution.messagingServiceSid, instance._solution.sid));
44
+ operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
45
+ return operationPromise;
46
+ }
47
+ /**
48
+ * Provide a user-friendly representation
49
+ *
50
+ * @returns Object
51
+ */
52
+ toJSON() {
53
+ return this._solution;
54
+ }
55
+ [util_1.inspect.custom](_depth, options) {
56
+ return (0, util_1.inspect)(this.toJSON(), options);
57
+ }
58
+ }
59
+ exports.ChannelSenderContextImpl = ChannelSenderContextImpl;
60
+ class ChannelSenderInstance {
61
+ constructor(_version, payload, messagingServiceSid, sid) {
62
+ this._version = _version;
63
+ this.accountSid = payload.account_sid;
64
+ this.messagingServiceSid = payload.messaging_service_sid;
65
+ this.sid = payload.sid;
66
+ this.sender = payload.sender;
67
+ this.senderType = payload.sender_type;
68
+ this.countryCode = payload.country_code;
69
+ this.dateCreated = deserialize.iso8601DateTime(payload.date_created);
70
+ this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated);
71
+ this.url = payload.url;
72
+ this._solution = { messagingServiceSid, sid: sid || this.sid };
73
+ }
74
+ get _proxy() {
75
+ this._context =
76
+ this._context ||
77
+ new ChannelSenderContextImpl(this._version, this._solution.messagingServiceSid, this._solution.sid);
78
+ return this._context;
79
+ }
80
+ /**
81
+ * Fetch a ChannelSenderInstance
82
+ *
83
+ * @param callback - Callback to handle processed record
84
+ *
85
+ * @returns Resolves to processed ChannelSenderInstance
86
+ */
87
+ fetch(callback) {
88
+ return this._proxy.fetch(callback);
89
+ }
90
+ /**
91
+ * Provide a user-friendly representation
92
+ *
93
+ * @returns Object
94
+ */
95
+ toJSON() {
96
+ return {
97
+ accountSid: this.accountSid,
98
+ messagingServiceSid: this.messagingServiceSid,
99
+ sid: this.sid,
100
+ sender: this.sender,
101
+ senderType: this.senderType,
102
+ countryCode: this.countryCode,
103
+ dateCreated: this.dateCreated,
104
+ dateUpdated: this.dateUpdated,
105
+ url: this.url,
106
+ };
107
+ }
108
+ [util_1.inspect.custom](_depth, options) {
109
+ return (0, util_1.inspect)(this.toJSON(), options);
110
+ }
111
+ }
112
+ exports.ChannelSenderInstance = ChannelSenderInstance;
113
+ function ChannelSenderListInstance(version, messagingServiceSid) {
114
+ if (!(0, utility_1.isValidPathParam)(messagingServiceSid)) {
115
+ throw new Error("Parameter 'messagingServiceSid' is not valid.");
116
+ }
117
+ const instance = ((sid) => instance.get(sid));
118
+ instance.get = function get(sid) {
119
+ return new ChannelSenderContextImpl(version, messagingServiceSid, sid);
120
+ };
121
+ instance._version = version;
122
+ instance._solution = { messagingServiceSid };
123
+ instance._uri = `/Services/${messagingServiceSid}/ChannelSenders`;
124
+ instance.page = function page(params, callback) {
125
+ if (params instanceof Function) {
126
+ callback = params;
127
+ params = {};
128
+ }
129
+ else {
130
+ params = params || {};
131
+ }
132
+ let data = {};
133
+ if (params["pageSize"] !== undefined)
134
+ data["PageSize"] = params["pageSize"];
135
+ if (params.pageNumber !== undefined)
136
+ data["Page"] = params.pageNumber;
137
+ if (params.pageToken !== undefined)
138
+ data["PageToken"] = params.pageToken;
139
+ const headers = {};
140
+ let operationVersion = version, operationPromise = operationVersion.page({
141
+ uri: instance._uri,
142
+ method: "get",
143
+ params: data,
144
+ headers,
145
+ });
146
+ operationPromise = operationPromise.then((payload) => new ChannelSenderPage(operationVersion, payload, instance._solution));
147
+ operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
148
+ return operationPromise;
149
+ };
150
+ instance.each = instance._version.each;
151
+ instance.list = instance._version.list;
152
+ instance.getPage = function getPage(targetUrl, callback) {
153
+ const operationPromise = instance._version._domain.twilio.request({
154
+ method: "get",
155
+ uri: targetUrl,
156
+ });
157
+ let pagePromise = operationPromise.then((payload) => new ChannelSenderPage(instance._version, payload, instance._solution));
158
+ pagePromise = instance._version.setPromiseCallback(pagePromise, callback);
159
+ return pagePromise;
160
+ };
161
+ instance.toJSON = function toJSON() {
162
+ return instance._solution;
163
+ };
164
+ instance[util_1.inspect.custom] = function inspectImpl(_depth, options) {
165
+ return (0, util_1.inspect)(instance.toJSON(), options);
166
+ };
167
+ return instance;
168
+ }
169
+ exports.ChannelSenderListInstance = ChannelSenderListInstance;
170
+ class ChannelSenderPage extends Page_1.default {
171
+ /**
172
+ * Initialize the ChannelSenderPage
173
+ *
174
+ * @param version - Version of the resource
175
+ * @param response - Response from the API
176
+ * @param solution - Path solution
177
+ */
178
+ constructor(version, response, solution) {
179
+ super(version, response, solution);
180
+ }
181
+ /**
182
+ * Build an instance of ChannelSenderInstance
183
+ *
184
+ * @param payload - Payload response from the API
185
+ */
186
+ getInstance(payload) {
187
+ return new ChannelSenderInstance(this._version, payload, this._solution.messagingServiceSid);
188
+ }
189
+ [util_1.inspect.custom](depth, options) {
190
+ return (0, util_1.inspect)(this.toJSON(), options);
191
+ }
192
+ }
193
+ exports.ChannelSenderPage = ChannelSenderPage;
@@ -4,6 +4,7 @@ import Page, { TwilioResponsePayload } from "../../../base/Page";
4
4
  import Response from "../../../http/response";
5
5
  import V1 from "../V1";
6
6
  import { AlphaSenderListInstance } from "./service/alphaSender";
7
+ import { ChannelSenderListInstance } from "./service/channelSender";
7
8
  import { PhoneNumberListInstance } from "./service/phoneNumber";
8
9
  import { ShortCodeListInstance } from "./service/shortCode";
9
10
  import { UsAppToPersonListInstance } from "./service/usAppToPerson";
@@ -118,6 +119,7 @@ export interface ServiceListInstancePageOptions {
118
119
  }
119
120
  export interface ServiceContext {
120
121
  alphaSenders: AlphaSenderListInstance;
122
+ channelSenders: ChannelSenderListInstance;
121
123
  phoneNumbers: PhoneNumberListInstance;
122
124
  shortCodes: ShortCodeListInstance;
123
125
  usAppToPerson: UsAppToPersonListInstance;
@@ -169,12 +171,14 @@ export declare class ServiceContextImpl implements ServiceContext {
169
171
  protected _solution: ServiceContextSolution;
170
172
  protected _uri: string;
171
173
  protected _alphaSenders?: AlphaSenderListInstance;
174
+ protected _channelSenders?: ChannelSenderListInstance;
172
175
  protected _phoneNumbers?: PhoneNumberListInstance;
173
176
  protected _shortCodes?: ShortCodeListInstance;
174
177
  protected _usAppToPerson?: UsAppToPersonListInstance;
175
178
  protected _usAppToPersonUsecases?: UsAppToPersonUsecaseListInstance;
176
179
  constructor(_version: V1, sid: string);
177
180
  get alphaSenders(): AlphaSenderListInstance;
181
+ get channelSenders(): ChannelSenderListInstance;
178
182
  get phoneNumbers(): PhoneNumberListInstance;
179
183
  get shortCodes(): ShortCodeListInstance;
180
184
  get usAppToPerson(): UsAppToPersonListInstance;
@@ -350,6 +354,10 @@ export declare class ServiceInstance {
350
354
  * Access the alphaSenders.
351
355
  */
352
356
  alphaSenders(): AlphaSenderListInstance;
357
+ /**
358
+ * Access the channelSenders.
359
+ */
360
+ channelSenders(): ChannelSenderListInstance;
353
361
  /**
354
362
  * Access the phoneNumbers.
355
363
  */
@@ -23,6 +23,7 @@ const deserialize = require("../../../base/deserialize");
23
23
  const serialize = require("../../../base/serialize");
24
24
  const utility_1 = require("../../../base/utility");
25
25
  const alphaSender_1 = require("./service/alphaSender");
26
+ const channelSender_1 = require("./service/channelSender");
26
27
  const phoneNumber_1 = require("./service/phoneNumber");
27
28
  const shortCode_1 = require("./service/shortCode");
28
29
  const usAppToPerson_1 = require("./service/usAppToPerson");
@@ -42,6 +43,12 @@ class ServiceContextImpl {
42
43
  (0, alphaSender_1.AlphaSenderListInstance)(this._version, this._solution.sid);
43
44
  return this._alphaSenders;
44
45
  }
46
+ get channelSenders() {
47
+ this._channelSenders =
48
+ this._channelSenders ||
49
+ (0, channelSender_1.ChannelSenderListInstance)(this._version, this._solution.sid);
50
+ return this._channelSenders;
51
+ }
45
52
  get phoneNumbers() {
46
53
  this._phoneNumbers =
47
54
  this._phoneNumbers ||
@@ -215,6 +222,12 @@ class ServiceInstance {
215
222
  alphaSenders() {
216
223
  return this._proxy.alphaSenders;
217
224
  }
225
+ /**
226
+ * Access the channelSenders.
227
+ */
228
+ channelSenders() {
229
+ return this._proxy.channelSenders;
230
+ }
218
231
  /**
219
232
  * Access the phoneNumbers.
220
233
  */
@@ -1,6 +1,7 @@
1
1
  import NumbersBase from "../NumbersBase";
2
2
  import Version from "../../base/Version";
3
3
  import { AuthorizationDocumentListInstance } from "./v2/authorizationDocument";
4
+ import { BulkHostedNumberOrderListInstance } from "./v2/bulkHostedNumberOrder";
4
5
  import { HostedNumberOrderListInstance } from "./v2/hostedNumberOrder";
5
6
  import { RegulatoryComplianceListInstance } from "./v2/regulatoryCompliance";
6
7
  export default class V2 extends Version {
@@ -12,12 +13,16 @@ export default class V2 extends Version {
12
13
  constructor(domain: NumbersBase);
13
14
  /** authorizationDocuments - { Twilio.Numbers.V2.AuthorizationDocumentListInstance } resource */
14
15
  protected _authorizationDocuments?: AuthorizationDocumentListInstance;
16
+ /** bulkHostedNumberOrders - { Twilio.Numbers.V2.BulkHostedNumberOrderListInstance } resource */
17
+ protected _bulkHostedNumberOrders?: BulkHostedNumberOrderListInstance;
15
18
  /** hostedNumberOrders - { Twilio.Numbers.V2.HostedNumberOrderListInstance } resource */
16
19
  protected _hostedNumberOrders?: HostedNumberOrderListInstance;
17
20
  /** regulatoryCompliance - { Twilio.Numbers.V2.RegulatoryComplianceListInstance } resource */
18
21
  protected _regulatoryCompliance?: RegulatoryComplianceListInstance;
19
22
  /** Getter for authorizationDocuments resource */
20
23
  get authorizationDocuments(): AuthorizationDocumentListInstance;
24
+ /** Getter for bulkHostedNumberOrders resource */
25
+ get bulkHostedNumberOrders(): BulkHostedNumberOrderListInstance;
21
26
  /** Getter for hostedNumberOrders resource */
22
27
  get hostedNumberOrders(): HostedNumberOrderListInstance;
23
28
  /** Getter for regulatoryCompliance resource */
@@ -18,6 +18,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
18
18
  Object.defineProperty(exports, "__esModule", { value: true });
19
19
  const Version_1 = __importDefault(require("../../base/Version"));
20
20
  const authorizationDocument_1 = require("./v2/authorizationDocument");
21
+ const bulkHostedNumberOrder_1 = require("./v2/bulkHostedNumberOrder");
21
22
  const hostedNumberOrder_1 = require("./v2/hostedNumberOrder");
22
23
  const regulatoryCompliance_1 = require("./v2/regulatoryCompliance");
23
24
  class V2 extends Version_1.default {
@@ -35,6 +36,12 @@ class V2 extends Version_1.default {
35
36
  this._authorizationDocuments || (0, authorizationDocument_1.AuthorizationDocumentListInstance)(this);
36
37
  return this._authorizationDocuments;
37
38
  }
39
+ /** Getter for bulkHostedNumberOrders resource */
40
+ get bulkHostedNumberOrders() {
41
+ this._bulkHostedNumberOrders =
42
+ this._bulkHostedNumberOrders || (0, bulkHostedNumberOrder_1.BulkHostedNumberOrderListInstance)(this);
43
+ return this._bulkHostedNumberOrders;
44
+ }
38
45
  /** Getter for hostedNumberOrders resource */
39
46
  get hostedNumberOrders() {
40
47
  this._hostedNumberOrders =
@@ -0,0 +1,159 @@
1
+ /// <reference types="node" />
2
+ import { inspect, InspectOptions } from "util";
3
+ import V2 from "../V2";
4
+ export type BulkHostedNumberOrderRequestStatus = "QUEUED" | "IN_PROGRESS" | "PROCESSED";
5
+ /**
6
+ * Options to pass to fetch a BulkHostedNumberOrderInstance
7
+ */
8
+ export interface BulkHostedNumberOrderContextFetchOptions {
9
+ /** 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\'. */
10
+ orderStatus?: string;
11
+ }
12
+ export interface BulkHostedNumberOrderContext {
13
+ /**
14
+ * Fetch a BulkHostedNumberOrderInstance
15
+ *
16
+ * @param callback - Callback to handle processed record
17
+ *
18
+ * @returns Resolves to processed BulkHostedNumberOrderInstance
19
+ */
20
+ fetch(callback?: (error: Error | null, item?: BulkHostedNumberOrderInstance) => any): Promise<BulkHostedNumberOrderInstance>;
21
+ /**
22
+ * Fetch a BulkHostedNumberOrderInstance
23
+ *
24
+ * @param params - Parameter for request
25
+ * @param callback - Callback to handle processed record
26
+ *
27
+ * @returns Resolves to processed BulkHostedNumberOrderInstance
28
+ */
29
+ fetch(params: BulkHostedNumberOrderContextFetchOptions, callback?: (error: Error | null, item?: BulkHostedNumberOrderInstance) => any): Promise<BulkHostedNumberOrderInstance>;
30
+ /**
31
+ * Provide a user-friendly representation
32
+ */
33
+ toJSON(): any;
34
+ [inspect.custom](_depth: any, options: InspectOptions): any;
35
+ }
36
+ export interface BulkHostedNumberOrderContextSolution {
37
+ sid: string;
38
+ }
39
+ export declare class BulkHostedNumberOrderContextImpl implements BulkHostedNumberOrderContext {
40
+ protected _version: V2;
41
+ protected _solution: BulkHostedNumberOrderContextSolution;
42
+ protected _uri: string;
43
+ constructor(_version: V2, sid: string);
44
+ fetch(params?: BulkHostedNumberOrderContextFetchOptions | ((error: Error | null, item?: BulkHostedNumberOrderInstance) => any), callback?: (error: Error | null, item?: BulkHostedNumberOrderInstance) => any): Promise<BulkHostedNumberOrderInstance>;
45
+ /**
46
+ * Provide a user-friendly representation
47
+ *
48
+ * @returns Object
49
+ */
50
+ toJSON(): BulkHostedNumberOrderContextSolution;
51
+ [inspect.custom](_depth: any, options: InspectOptions): string;
52
+ }
53
+ interface BulkHostedNumberOrderResource {
54
+ sid: string;
55
+ account_sid: string;
56
+ request_status: BulkHostedNumberOrderRequestStatus;
57
+ friendly_name: string;
58
+ notification_email: string;
59
+ date_created: Date;
60
+ date_completed: Date;
61
+ url: string;
62
+ total_count: number;
63
+ results: Array<any>;
64
+ }
65
+ export declare class BulkHostedNumberOrderInstance {
66
+ protected _version: V2;
67
+ protected _solution: BulkHostedNumberOrderContextSolution;
68
+ protected _context?: BulkHostedNumberOrderContext;
69
+ constructor(_version: V2, payload: BulkHostedNumberOrderResource, sid?: string);
70
+ /**
71
+ * A 34 character string that uniquely identifies this BulkHostedNumberOrder.
72
+ */
73
+ sid: string;
74
+ /**
75
+ * A 34 character string that uniquely identifies the account.
76
+ */
77
+ accountSid: string;
78
+ requestStatus: BulkHostedNumberOrderRequestStatus;
79
+ /**
80
+ * A 128 character string that is a human-readable text that describes this resource.
81
+ */
82
+ friendlyName: string;
83
+ /**
84
+ * Email address used for send notifications about this Bulk hosted number request.
85
+ */
86
+ notificationEmail: string;
87
+ /**
88
+ * The date this resource was created, given as [GMT RFC 2822](http://www.ietf.org/rfc/rfc2822.txt) format.
89
+ */
90
+ dateCreated: Date;
91
+ /**
92
+ * The date that this resource was completed, given as [GMT RFC 2822](http://www.ietf.org/rfc/rfc2822.txt) format.
93
+ */
94
+ dateCompleted: Date;
95
+ /**
96
+ * The URL of this BulkHostedNumberOrder resource.
97
+ */
98
+ url: string;
99
+ /**
100
+ * The total count of phone numbers in this Bulk hosting request.
101
+ */
102
+ totalCount: number;
103
+ /**
104
+ * 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\'.
105
+ */
106
+ results: Array<any>;
107
+ private get _proxy();
108
+ /**
109
+ * Fetch a BulkHostedNumberOrderInstance
110
+ *
111
+ * @param callback - Callback to handle processed record
112
+ *
113
+ * @returns Resolves to processed BulkHostedNumberOrderInstance
114
+ */
115
+ fetch(callback?: (error: Error | null, item?: BulkHostedNumberOrderInstance) => any): Promise<BulkHostedNumberOrderInstance>;
116
+ /**
117
+ * Fetch a BulkHostedNumberOrderInstance
118
+ *
119
+ * @param params - Parameter for request
120
+ * @param callback - Callback to handle processed record
121
+ *
122
+ * @returns Resolves to processed BulkHostedNumberOrderInstance
123
+ */
124
+ fetch(params: BulkHostedNumberOrderContextFetchOptions, callback?: (error: Error | null, item?: BulkHostedNumberOrderInstance) => any): Promise<BulkHostedNumberOrderInstance>;
125
+ /**
126
+ * Provide a user-friendly representation
127
+ *
128
+ * @returns Object
129
+ */
130
+ toJSON(): {
131
+ sid: string;
132
+ accountSid: string;
133
+ requestStatus: BulkHostedNumberOrderRequestStatus;
134
+ friendlyName: string;
135
+ notificationEmail: string;
136
+ dateCreated: Date;
137
+ dateCompleted: Date;
138
+ url: string;
139
+ totalCount: number;
140
+ results: any[];
141
+ };
142
+ [inspect.custom](_depth: any, options: InspectOptions): string;
143
+ }
144
+ export interface BulkHostedNumberOrderSolution {
145
+ }
146
+ export interface BulkHostedNumberOrderListInstance {
147
+ _version: V2;
148
+ _solution: BulkHostedNumberOrderSolution;
149
+ _uri: string;
150
+ (sid: string): BulkHostedNumberOrderContext;
151
+ get(sid: string): BulkHostedNumberOrderContext;
152
+ /**
153
+ * Provide a user-friendly representation
154
+ */
155
+ toJSON(): any;
156
+ [inspect.custom](_depth: any, options: InspectOptions): any;
157
+ }
158
+ export declare function BulkHostedNumberOrderListInstance(version: V2): BulkHostedNumberOrderListInstance;
159
+ export {};
@@ -0,0 +1,130 @@
1
+ "use strict";
2
+ /*
3
+ * This code was generated by
4
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
5
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
6
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
7
+ *
8
+ * Twilio - Numbers
9
+ * This is the public Twilio REST API.
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator.
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.BulkHostedNumberOrderListInstance = exports.BulkHostedNumberOrderInstance = exports.BulkHostedNumberOrderContextImpl = void 0;
17
+ const util_1 = require("util");
18
+ const deserialize = require("../../../base/deserialize");
19
+ const serialize = require("../../../base/serialize");
20
+ const utility_1 = require("../../../base/utility");
21
+ class BulkHostedNumberOrderContextImpl {
22
+ constructor(_version, sid) {
23
+ this._version = _version;
24
+ if (!(0, utility_1.isValidPathParam)(sid)) {
25
+ throw new Error("Parameter 'sid' is not valid.");
26
+ }
27
+ this._solution = { sid };
28
+ this._uri = `/HostedNumber/Orders/Bulk/${sid}`;
29
+ }
30
+ fetch(params, callback) {
31
+ if (params instanceof Function) {
32
+ callback = params;
33
+ params = {};
34
+ }
35
+ else {
36
+ params = params || {};
37
+ }
38
+ let data = {};
39
+ if (params["orderStatus"] !== undefined)
40
+ data["OrderStatus"] = params["orderStatus"];
41
+ const headers = {};
42
+ const instance = this;
43
+ let operationVersion = instance._version, operationPromise = operationVersion.fetch({
44
+ uri: instance._uri,
45
+ method: "get",
46
+ params: data,
47
+ headers,
48
+ });
49
+ operationPromise = operationPromise.then((payload) => new BulkHostedNumberOrderInstance(operationVersion, payload, instance._solution.sid));
50
+ operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
51
+ return operationPromise;
52
+ }
53
+ /**
54
+ * Provide a user-friendly representation
55
+ *
56
+ * @returns Object
57
+ */
58
+ toJSON() {
59
+ return this._solution;
60
+ }
61
+ [util_1.inspect.custom](_depth, options) {
62
+ return (0, util_1.inspect)(this.toJSON(), options);
63
+ }
64
+ }
65
+ exports.BulkHostedNumberOrderContextImpl = BulkHostedNumberOrderContextImpl;
66
+ class BulkHostedNumberOrderInstance {
67
+ constructor(_version, payload, sid) {
68
+ this._version = _version;
69
+ this.sid = payload.sid;
70
+ this.accountSid = payload.account_sid;
71
+ this.requestStatus = payload.request_status;
72
+ this.friendlyName = payload.friendly_name;
73
+ this.notificationEmail = payload.notification_email;
74
+ this.dateCreated = deserialize.iso8601DateTime(payload.date_created);
75
+ this.dateCompleted = deserialize.iso8601DateTime(payload.date_completed);
76
+ this.url = payload.url;
77
+ this.totalCount = deserialize.integer(payload.total_count);
78
+ this.results = payload.results;
79
+ this._solution = { sid: sid || this.sid };
80
+ }
81
+ get _proxy() {
82
+ this._context =
83
+ this._context ||
84
+ new BulkHostedNumberOrderContextImpl(this._version, this._solution.sid);
85
+ return this._context;
86
+ }
87
+ fetch(params, callback) {
88
+ return this._proxy.fetch(params, callback);
89
+ }
90
+ /**
91
+ * Provide a user-friendly representation
92
+ *
93
+ * @returns Object
94
+ */
95
+ toJSON() {
96
+ return {
97
+ sid: this.sid,
98
+ accountSid: this.accountSid,
99
+ requestStatus: this.requestStatus,
100
+ friendlyName: this.friendlyName,
101
+ notificationEmail: this.notificationEmail,
102
+ dateCreated: this.dateCreated,
103
+ dateCompleted: this.dateCompleted,
104
+ url: this.url,
105
+ totalCount: this.totalCount,
106
+ results: this.results,
107
+ };
108
+ }
109
+ [util_1.inspect.custom](_depth, options) {
110
+ return (0, util_1.inspect)(this.toJSON(), options);
111
+ }
112
+ }
113
+ exports.BulkHostedNumberOrderInstance = BulkHostedNumberOrderInstance;
114
+ function BulkHostedNumberOrderListInstance(version) {
115
+ const instance = ((sid) => instance.get(sid));
116
+ instance.get = function get(sid) {
117
+ return new BulkHostedNumberOrderContextImpl(version, sid);
118
+ };
119
+ instance._version = version;
120
+ instance._solution = {};
121
+ instance._uri = ``;
122
+ instance.toJSON = function toJSON() {
123
+ return instance._solution;
124
+ };
125
+ instance[util_1.inspect.custom] = function inspectImpl(_depth, options) {
126
+ return (0, util_1.inspect)(instance.toJSON(), options);
127
+ };
128
+ return instance;
129
+ }
130
+ exports.BulkHostedNumberOrderListInstance = BulkHostedNumberOrderListInstance;
@@ -7,6 +7,7 @@ import { EndUserTypeListInstance } from "./regulatoryCompliance/endUserType";
7
7
  import { RegulationListInstance } from "./regulatoryCompliance/regulation";
8
8
  import { SupportingDocumentListInstance } from "./regulatoryCompliance/supportingDocument";
9
9
  import { SupportingDocumentTypeListInstance } from "./regulatoryCompliance/supportingDocumentType";
10
+ export type RegulatoryComplianceEndUserType = "individual" | "business";
10
11
  export interface RegulatoryComplianceSolution {
11
12
  }
12
13
  export interface RegulatoryComplianceListInstance {
@@ -36,7 +36,7 @@ export interface RoomListInstanceCreateOptions {
36
36
  recordParticipantsOnConnect?: boolean;
37
37
  /** 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*** */
38
38
  videoCodecs?: Array<RoomVideoCodec>;
39
- /** 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.*** */
39
+ /** 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.*** */
40
40
  mediaRegion?: string;
41
41
  /** A collection of Recording Rules that describe how to include or exclude matching tracks for recording */
42
42
  recordingRules?: any;
@@ -256,7 +256,7 @@ export declare class RoomInstance {
256
256
  */
257
257
  videoCodecs: Array<RoomVideoCodec>;
258
258
  /**
259
- * 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.***
259
+ * 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.***
260
260
  */
261
261
  mediaRegion: string;
262
262
  /**
@@ -18,7 +18,7 @@ export interface CountryListInstanceEachOptions {
18
18
  lowRiskNumbersEnabled?: boolean;
19
19
  /** Filter to retrieve the country permissions with dialing to high-risk special service numbers enabled. Can be: `true` or `false` */
20
20
  highRiskSpecialNumbersEnabled?: boolean;
21
- /** 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`. */
21
+ /** 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`. */
22
22
  highRiskTollfraudNumbersEnabled?: boolean;
23
23
  /** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
24
24
  pageSize?: number;
@@ -43,7 +43,7 @@ export interface CountryListInstanceOptions {
43
43
  lowRiskNumbersEnabled?: boolean;
44
44
  /** Filter to retrieve the country permissions with dialing to high-risk special service numbers enabled. Can be: `true` or `false` */
45
45
  highRiskSpecialNumbersEnabled?: boolean;
46
- /** 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`. */
46
+ /** 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`. */
47
47
  highRiskTollfraudNumbersEnabled?: boolean;
48
48
  /** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
49
49
  pageSize?: number;
@@ -64,7 +64,7 @@ export interface CountryListInstancePageOptions {
64
64
  lowRiskNumbersEnabled?: boolean;
65
65
  /** Filter to retrieve the country permissions with dialing to high-risk special service numbers enabled. Can be: `true` or `false` */
66
66
  highRiskSpecialNumbersEnabled?: boolean;
67
- /** 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`. */
67
+ /** 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`. */
68
68
  highRiskTollfraudNumbersEnabled?: boolean;
69
69
  /** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
70
70
  pageSize?: number;
@@ -152,7 +152,7 @@ export declare class CountryInstance {
152
152
  */
153
153
  highRiskSpecialNumbersEnabled: boolean;
154
154
  /**
155
- * 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
155
+ * 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
156
156
  */
157
157
  highRiskTollfraudNumbersEnabled: boolean;
158
158
  /**
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "twilio",
3
3
  "description": "A Twilio helper library",
4
- "version": "4.15.0",
4
+ "version": "4.16.0",
5
5
  "author": "API Team <api@twilio.com>",
6
6
  "contributors": [
7
7
  {