Skip to content

Commit 4af092a

Browse files
committed
[Librarian] Regenerated @ c9ac9b9736431d573d8dec29ad3095eee969cdea
1 parent b39e374 commit 4af092a

File tree

24 files changed

+414
-45
lines changed

24 files changed

+414
-45
lines changed

Diff for: CHANGES.md

+15
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,21 @@
11
twilio-node changelog
22
=====================
33

4+
[2023-09-21] Version 4.18.0
5+
---------------------------
6+
**Conversations**
7+
- Enable conversation email bindings, email address configurations and email message subjects
8+
9+
**Flex**
10+
- Adding `console_errors_included` to Flex Configuration field `debugger_integrations`
11+
- Introducing new channel status as `inactive` in modify channel endpoint for leave functionality **(breaking change)**
12+
- Adding `citrix_voice_vdi` to Flex Configuration
13+
14+
**Taskrouter**
15+
- Add Update Queues, Workers, Workflow Real Time Statistics API to flex-rt-data-api-v2 endpoint
16+
- Add Update Workspace Real Time Statistics API to flex-rt-data-api-v2 endpoint
17+
18+
419
[2023-09-07] Version 4.17.0
520
---------------------------
621
**Api**

Diff for: src/rest/api/V2010.ts

+9
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import ApiBase from "../ApiBase";
1616
import Version from "../../base/Version";
1717
import { AccountListInstance } from "./v2010/account";
18+
import { SafelistListInstance } from "./v2010/safelist";
1819
import { AccountContext } from "./v2010/account";
1920

2021
export default class V2010 extends Version {
@@ -29,6 +30,8 @@ export default class V2010 extends Version {
2930

3031
/** accounts - { Twilio.Api.V2010.AccountListInstance } resource */
3132
protected _accounts?: AccountListInstance;
33+
/** safelist - { Twilio.Api.V2010.SafelistListInstance } resource */
34+
protected _safelist?: SafelistListInstance;
3235
/** account - { Twilio.Api.V2010.AccountContext } resource */
3336
protected _account?: AccountContext;
3437

@@ -38,6 +41,12 @@ export default class V2010 extends Version {
3841
return this._accounts;
3942
}
4043

44+
/** Getter for safelist resource */
45+
get safelist(): SafelistListInstance {
46+
this._safelist = this._safelist || SafelistListInstance(this);
47+
return this._safelist;
48+
}
49+
4150
/** Getter for account resource */
4251
get account(): AccountContext {
4352
this._account =

Diff for: src/rest/api/v2010/account/message.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ export interface MessageListInstanceCreateOptions {
105105
tags?: string;
106106
/** */
107107
riskCheck?: MessageRiskCheck;
108-
/** 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. */
108+
/** 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 belongs 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. */
109109
from?: string;
110110
/** 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. */
111111
messagingServiceSid?: string;

Diff for: src/rest/api/v2010/safelist.ts

+288
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,288 @@
1+
/*
2+
* This code was generated by
3+
* ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
4+
* | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
5+
* | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
6+
*
7+
* Twilio - Api
8+
* This is the public Twilio REST API.
9+
*
10+
* NOTE: This class is auto generated by OpenAPI Generator.
11+
* https://openapi-generator.tech
12+
* Do not edit the class manually.
13+
*/
14+
15+
import { inspect, InspectOptions } from "util";
16+
import V2010 from "../V2010";
17+
const deserialize = require("../../../base/deserialize");
18+
const serialize = require("../../../base/serialize");
19+
import { isValidPathParam } from "../../../base/utility";
20+
21+
/**
22+
* Options to pass to create a SafelistInstance
23+
*/
24+
export interface SafelistListInstanceCreateOptions {
25+
/** The phone number to be added in SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164). */
26+
phoneNumber: string;
27+
}
28+
29+
/**
30+
* Options to pass to remove a SafelistInstance
31+
*/
32+
export interface SafelistListInstanceRemoveOptions {
33+
/** The phone number to be removed from SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164). */
34+
phoneNumber?: string;
35+
}
36+
37+
/**
38+
* Options to pass to fetch a SafelistInstance
39+
*/
40+
export interface SafelistListInstanceFetchOptions {
41+
/** The phone number to be fetched from SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164). */
42+
phoneNumber?: string;
43+
}
44+
45+
export interface SafelistSolution {}
46+
47+
export interface SafelistListInstance {
48+
_version: V2010;
49+
_solution: SafelistSolution;
50+
_uri: string;
51+
52+
/**
53+
* Create a SafelistInstance
54+
*
55+
* @param params - Parameter for request
56+
* @param callback - Callback to handle processed record
57+
*
58+
* @returns Resolves to processed SafelistInstance
59+
*/
60+
create(
61+
params: SafelistListInstanceCreateOptions,
62+
callback?: (error: Error | null, item?: SafelistInstance) => any
63+
): Promise<SafelistInstance>;
64+
65+
/**
66+
* Remove a SafelistInstance
67+
*
68+
* @param callback - Callback to handle processed record
69+
*
70+
* @returns Resolves to processed boolean
71+
*/
72+
remove(
73+
callback?: (error: Error | null, item?: boolean) => any
74+
): Promise<boolean>;
75+
/**
76+
* Remove a SafelistInstance
77+
*
78+
* @param params - Parameter for request
79+
* @param callback - Callback to handle processed record
80+
*
81+
* @returns Resolves to processed SafelistInstance
82+
*/
83+
remove(
84+
params: SafelistListInstanceRemoveOptions,
85+
callback?: (error: Error | null, item?: boolean) => any
86+
): Promise<boolean>;
87+
88+
/**
89+
* Fetch a SafelistInstance
90+
*
91+
* @param callback - Callback to handle processed record
92+
*
93+
* @returns Resolves to processed SafelistInstance
94+
*/
95+
fetch(
96+
callback?: (error: Error | null, item?: SafelistInstance) => any
97+
): Promise<SafelistInstance>;
98+
/**
99+
* Fetch a SafelistInstance
100+
*
101+
* @param params - Parameter for request
102+
* @param callback - Callback to handle processed record
103+
*
104+
* @returns Resolves to processed SafelistInstance
105+
*/
106+
fetch(
107+
params: SafelistListInstanceFetchOptions,
108+
callback?: (error: Error | null, item?: SafelistInstance) => any
109+
): Promise<SafelistInstance>;
110+
111+
/**
112+
* Provide a user-friendly representation
113+
*/
114+
toJSON(): any;
115+
[inspect.custom](_depth: any, options: InspectOptions): any;
116+
}
117+
118+
export function SafelistListInstance(version: V2010): SafelistListInstance {
119+
const instance = {} as SafelistListInstance;
120+
121+
instance._version = version;
122+
instance._solution = {};
123+
instance._uri = `/SafeList/Numbers.json`;
124+
125+
instance.create = function create(
126+
params: SafelistListInstanceCreateOptions,
127+
callback?: (error: Error | null, items: SafelistInstance) => any
128+
): Promise<SafelistInstance> {
129+
if (params === null || params === undefined) {
130+
throw new Error('Required parameter "params" missing.');
131+
}
132+
133+
if (params["phoneNumber"] === null || params["phoneNumber"] === undefined) {
134+
throw new Error("Required parameter \"params['phoneNumber']\" missing.");
135+
}
136+
137+
let data: any = {};
138+
139+
data["PhoneNumber"] = params["phoneNumber"];
140+
141+
const headers: any = {};
142+
headers["Content-Type"] = "application/x-www-form-urlencoded";
143+
144+
let operationVersion = version,
145+
operationPromise = operationVersion.create({
146+
uri: instance._uri,
147+
method: "post",
148+
data,
149+
headers,
150+
});
151+
152+
operationPromise = operationPromise.then(
153+
(payload) => new SafelistInstance(operationVersion, payload)
154+
);
155+
156+
operationPromise = instance._version.setPromiseCallback(
157+
operationPromise,
158+
callback
159+
);
160+
return operationPromise;
161+
};
162+
163+
instance.remove = function remove(
164+
params?:
165+
| SafelistListInstanceRemoveOptions
166+
| ((error: Error | null, items: boolean) => any),
167+
callback?: (error: Error | null, items: boolean) => any
168+
): Promise<boolean> {
169+
if (params instanceof Function) {
170+
callback = params;
171+
params = {};
172+
} else {
173+
params = params || {};
174+
}
175+
176+
let data: any = {};
177+
178+
if (params["phoneNumber"] !== undefined)
179+
data["PhoneNumber"] = params["phoneNumber"];
180+
181+
const headers: any = {};
182+
183+
let operationVersion = version,
184+
operationPromise = operationVersion.remove({
185+
uri: instance._uri,
186+
method: "delete",
187+
params: data,
188+
headers,
189+
});
190+
191+
operationPromise = instance._version.setPromiseCallback(
192+
operationPromise,
193+
callback
194+
);
195+
return operationPromise;
196+
};
197+
198+
instance.fetch = function fetch(
199+
params?:
200+
| SafelistListInstanceFetchOptions
201+
| ((error: Error | null, items: SafelistInstance) => any),
202+
callback?: (error: Error | null, items: SafelistInstance) => any
203+
): Promise<SafelistInstance> {
204+
if (params instanceof Function) {
205+
callback = params;
206+
params = {};
207+
} else {
208+
params = params || {};
209+
}
210+
211+
let data: any = {};
212+
213+
if (params["phoneNumber"] !== undefined)
214+
data["PhoneNumber"] = params["phoneNumber"];
215+
216+
const headers: any = {};
217+
218+
let operationVersion = version,
219+
operationPromise = operationVersion.fetch({
220+
uri: instance._uri,
221+
method: "get",
222+
params: data,
223+
headers,
224+
});
225+
226+
operationPromise = operationPromise.then(
227+
(payload) => new SafelistInstance(operationVersion, payload)
228+
);
229+
230+
operationPromise = instance._version.setPromiseCallback(
231+
operationPromise,
232+
callback
233+
);
234+
return operationPromise;
235+
};
236+
237+
instance.toJSON = function toJSON() {
238+
return instance._solution;
239+
};
240+
241+
instance[inspect.custom] = function inspectImpl(
242+
_depth: any,
243+
options: InspectOptions
244+
) {
245+
return inspect(instance.toJSON(), options);
246+
};
247+
248+
return instance;
249+
}
250+
251+
interface SafelistPayload extends SafelistResource {}
252+
253+
interface SafelistResource {
254+
sid: string;
255+
phone_number: string;
256+
}
257+
258+
export class SafelistInstance {
259+
constructor(protected _version: V2010, payload: SafelistResource) {
260+
this.sid = payload.sid;
261+
this.phoneNumber = payload.phone_number;
262+
}
263+
264+
/**
265+
* The unique string that we created to identify the SafeList resource.
266+
*/
267+
sid: string;
268+
/**
269+
* The phone number in SafeList.
270+
*/
271+
phoneNumber: string;
272+
273+
/**
274+
* Provide a user-friendly representation
275+
*
276+
* @returns Object
277+
*/
278+
toJSON() {
279+
return {
280+
sid: this.sid,
281+
phoneNumber: this.phoneNumber,
282+
};
283+
}
284+
285+
[inspect.custom](_depth: any, options: InspectOptions) {
286+
return inspect(this.toJSON(), options);
287+
}
288+
}

Diff for: src/rest/chat/v3/channel.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export interface ChannelContextUpdateOptions {
3030
xTwilioWebhookEnabled?: ChannelWebhookEnabledType;
3131
/** */
3232
type?: ChannelChannelType;
33-
/** The unique ID of the [Messaging Service](https://www.twilio.com/docs/messaging/services/api) this channel belongs to. */
33+
/** The unique ID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) this channel belongs to. */
3434
messagingServiceSid?: string;
3535
}
3636

@@ -247,7 +247,7 @@ export class ChannelInstance {
247247
*/
248248
messagesCount: number;
249249
/**
250-
* The unique ID of the [Messaging Service](https://www.twilio.com/docs/messaging/services/api) this channel belongs to.
250+
* The unique ID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) this channel belongs to.
251251
*/
252252
messagingServiceSid: string;
253253
/**

Diff for: src/rest/conversations/v1/addressConfiguration.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,12 @@ export type AddressConfigurationAutoCreationType =
2727

2828
export type AddressConfigurationMethod = "GET" | "POST";
2929

30-
export type AddressConfigurationType = "sms" | "whatsapp" | "messenger" | "gbm";
30+
export type AddressConfigurationType =
31+
| "sms"
32+
| "whatsapp"
33+
| "messenger"
34+
| "gbm"
35+
| "email";
3136

3237
/**
3338
* Options to pass to update a AddressConfigurationInstance

Diff for: src/rest/conversations/v1/configuration.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import { WebhookListInstance } from "./configuration/webhook";
2525
export interface ConfigurationContextUpdateOptions {
2626
/** The SID of the default [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) to use when creating a conversation. */
2727
defaultChatServiceSid?: string;
28-
/** The SID of the default [Messaging Service](https://www.twilio.com/docs/messaging/services/api) to use when creating a conversation. */
28+
/** The SID of the default [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) to use when creating a conversation. */
2929
defaultMessagingServiceSid?: string;
3030
/** Default ISO8601 duration when conversation will be switched to `inactive` state. Minimum value for this timer is 1 minute. */
3131
defaultInactiveTimer?: string;
@@ -205,7 +205,7 @@ export class ConfigurationInstance {
205205
*/
206206
defaultChatServiceSid: string;
207207
/**
208-
* The SID of the default [Messaging Service](https://www.twilio.com/docs/messaging/services/api) used when creating a conversation.
208+
* The SID of the default [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) used when creating a conversation.
209209
*/
210210
defaultMessagingServiceSid: string;
211211
/**

0 commit comments

Comments
 (0)