twilio 5.5.2 → 5.6.1
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.
- package/lib/base/BaseTwilio.js +2 -1
- package/lib/rest/MessagingBase.d.ts +3 -0
- package/lib/rest/MessagingBase.js +5 -0
- package/lib/rest/accounts/v1/bulkConsents.d.ts +1 -1
- package/lib/rest/api/v2010/account/address/dependentPhoneNumber.d.ts +10 -12
- package/lib/rest/api/v2010/account/address/dependentPhoneNumber.js +2 -2
- package/lib/rest/api/v2010/account/call/transcription.d.ts +1 -1
- package/lib/rest/api/v2010/account/call.d.ts +1 -1
- package/lib/rest/api/v2010/account/conference/participant.d.ts +2 -2
- package/lib/rest/content/v1/content/approvalFetch.d.ts +3 -3
- package/lib/rest/content/v1/content.d.ts +9 -6
- package/lib/rest/content/v1/contentAndApprovals.d.ts +9 -9
- package/lib/rest/content/v1/legacyContent.d.ts +6 -6
- package/lib/rest/events/v1/subscription.d.ts +0 -10
- package/lib/rest/events/v1/subscription.js +0 -6
- package/lib/rest/flexApi/v1/interaction.d.ts +47 -0
- package/lib/rest/flexApi/v1/interaction.js +32 -0
- package/lib/rest/messaging/V2.d.ts +15 -0
- package/lib/rest/messaging/V2.js +37 -0
- package/lib/rest/messaging/v1/brandRegistration/brandVetting.d.ts +0 -6
- package/lib/rest/messaging/v1/brandRegistration/brandVetting.js +0 -2
- package/lib/rest/messaging/v2/channelsSender.d.ts +453 -0
- package/lib/rest/messaging/v2/channelsSender.js +301 -0
- package/lib/rest/numbers/V1.d.ts +5 -5
- package/lib/rest/numbers/V1.js +8 -6
- package/lib/rest/numbers/v1/{webhook.d.ts → portingWebhookConfigurationFetch.d.ts} +10 -10
- package/lib/rest/numbers/v1/{webhook.js → portingWebhookConfigurationFetch.js} +6 -6
- package/lib/rest/serverless/v1/service/build.d.ts +1 -1
- package/lib/rest/verify/v2/verificationAttemptsSummary.d.ts +3 -3
- package/lib/rest/video/v1/room.d.ts +4 -0
- package/lib/rest/video/v1/room.js +4 -0
- package/lib/twiml/VoiceResponse.d.ts +36 -16
- package/package.json +2 -2
|
@@ -0,0 +1,301 @@
|
|
|
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.ChannelsSenderPage = exports.ChannelsSenderListInstance = exports.ChannelsSenderInstance = exports.ChannelsSenderContextImpl = exports.MessagingV2ChannelsSenderWebhook = exports.MessagingV2ChannelsSenderRequestsUpdate = exports.MessagingV2ChannelsSenderRequestsCreate = exports.MessagingV2ChannelsSenderProperties = exports.MessagingV2ChannelsSenderProfileWebsites = exports.MessagingV2ChannelsSenderProfileEmails = exports.MessagingV2ChannelsSenderProfile = exports.MessagingV2ChannelsSenderOfflineReasonsItems = exports.MessagingV2ChannelsSenderConfiguration = 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
|
+
/**
|
|
26
|
+
* Configuration settings for creating a sender, e.g., {\"waba_id\": \"1234567890\", \"verification_method\": \"sms\"}
|
|
27
|
+
*/
|
|
28
|
+
class MessagingV2ChannelsSenderConfiguration {
|
|
29
|
+
}
|
|
30
|
+
exports.MessagingV2ChannelsSenderConfiguration = MessagingV2ChannelsSenderConfiguration;
|
|
31
|
+
class MessagingV2ChannelsSenderOfflineReasonsItems {
|
|
32
|
+
}
|
|
33
|
+
exports.MessagingV2ChannelsSenderOfflineReasonsItems = MessagingV2ChannelsSenderOfflineReasonsItems;
|
|
34
|
+
/**
|
|
35
|
+
* Sender profile specific configurations, e.g., {\"name\": \"xxx\", \"about\": \"xxx\", \"address\": \"xxx\", \"description\": \"xxx\", \"email\": \"xxx@xxx\", \"logo_url\": \"https://xxx\", \"vertical\": \"xxx\", \"websites\": [\"https://xxx\", \"...\"]}
|
|
36
|
+
*/
|
|
37
|
+
class MessagingV2ChannelsSenderProfile {
|
|
38
|
+
}
|
|
39
|
+
exports.MessagingV2ChannelsSenderProfile = MessagingV2ChannelsSenderProfile;
|
|
40
|
+
class MessagingV2ChannelsSenderProfileEmails {
|
|
41
|
+
}
|
|
42
|
+
exports.MessagingV2ChannelsSenderProfileEmails = MessagingV2ChannelsSenderProfileEmails;
|
|
43
|
+
class MessagingV2ChannelsSenderProfileWebsites {
|
|
44
|
+
}
|
|
45
|
+
exports.MessagingV2ChannelsSenderProfileWebsites = MessagingV2ChannelsSenderProfileWebsites;
|
|
46
|
+
/**
|
|
47
|
+
* Sender specific additional properties, e.g., {\"quality_rating\": \"HIGH\", \"messaging_limit\": \"10K Customers/24hr\"}
|
|
48
|
+
*/
|
|
49
|
+
class MessagingV2ChannelsSenderProperties {
|
|
50
|
+
}
|
|
51
|
+
exports.MessagingV2ChannelsSenderProperties = MessagingV2ChannelsSenderProperties;
|
|
52
|
+
class MessagingV2ChannelsSenderRequestsCreate {
|
|
53
|
+
}
|
|
54
|
+
exports.MessagingV2ChannelsSenderRequestsCreate = MessagingV2ChannelsSenderRequestsCreate;
|
|
55
|
+
class MessagingV2ChannelsSenderRequestsUpdate {
|
|
56
|
+
}
|
|
57
|
+
exports.MessagingV2ChannelsSenderRequestsUpdate = MessagingV2ChannelsSenderRequestsUpdate;
|
|
58
|
+
/**
|
|
59
|
+
* Webhook specific configurations, e.g., {\"callback_url\": \"https://xxx\", \"callback_method\": \"POST\", \"fallback_url\": \"https://xxx\", \"fallback_method\": \"POST\", \"status_callback_url\": \"https://xxx\", \"status_callback_method\": \"POST\"}
|
|
60
|
+
*/
|
|
61
|
+
class MessagingV2ChannelsSenderWebhook {
|
|
62
|
+
}
|
|
63
|
+
exports.MessagingV2ChannelsSenderWebhook = MessagingV2ChannelsSenderWebhook;
|
|
64
|
+
class ChannelsSenderContextImpl {
|
|
65
|
+
constructor(_version, sid) {
|
|
66
|
+
this._version = _version;
|
|
67
|
+
if (!(0, utility_1.isValidPathParam)(sid)) {
|
|
68
|
+
throw new Error("Parameter 'sid' is not valid.");
|
|
69
|
+
}
|
|
70
|
+
this._solution = { sid };
|
|
71
|
+
this._uri = `/Channels/Senders/${sid}`;
|
|
72
|
+
}
|
|
73
|
+
remove(callback) {
|
|
74
|
+
const headers = {};
|
|
75
|
+
const instance = this;
|
|
76
|
+
let operationVersion = instance._version, operationPromise = operationVersion.remove({
|
|
77
|
+
uri: instance._uri,
|
|
78
|
+
method: "delete",
|
|
79
|
+
headers,
|
|
80
|
+
});
|
|
81
|
+
operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
|
|
82
|
+
return operationPromise;
|
|
83
|
+
}
|
|
84
|
+
fetch(callback) {
|
|
85
|
+
const headers = {};
|
|
86
|
+
headers["Accept"] = "application/json";
|
|
87
|
+
const instance = this;
|
|
88
|
+
let operationVersion = instance._version, operationPromise = operationVersion.fetch({
|
|
89
|
+
uri: instance._uri,
|
|
90
|
+
method: "get",
|
|
91
|
+
headers,
|
|
92
|
+
});
|
|
93
|
+
operationPromise = operationPromise.then((payload) => new ChannelsSenderInstance(operationVersion, payload, instance._solution.sid));
|
|
94
|
+
operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
|
|
95
|
+
return operationPromise;
|
|
96
|
+
}
|
|
97
|
+
update(params, headers, callback) {
|
|
98
|
+
if (params instanceof Function) {
|
|
99
|
+
callback = params;
|
|
100
|
+
params = {};
|
|
101
|
+
}
|
|
102
|
+
else {
|
|
103
|
+
params = params || {};
|
|
104
|
+
}
|
|
105
|
+
let data = {};
|
|
106
|
+
data = params;
|
|
107
|
+
if (headers === null || headers === undefined) {
|
|
108
|
+
headers = {};
|
|
109
|
+
}
|
|
110
|
+
headers["Content-Type"] = "application/json";
|
|
111
|
+
headers["Accept"] = "application/json";
|
|
112
|
+
const instance = this;
|
|
113
|
+
let operationVersion = instance._version, operationPromise = operationVersion.update({
|
|
114
|
+
uri: instance._uri,
|
|
115
|
+
method: "post",
|
|
116
|
+
data,
|
|
117
|
+
headers,
|
|
118
|
+
});
|
|
119
|
+
operationPromise = operationPromise.then((payload) => new ChannelsSenderInstance(operationVersion, payload, instance._solution.sid));
|
|
120
|
+
operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
|
|
121
|
+
return operationPromise;
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Provide a user-friendly representation
|
|
125
|
+
*
|
|
126
|
+
* @returns Object
|
|
127
|
+
*/
|
|
128
|
+
toJSON() {
|
|
129
|
+
return this._solution;
|
|
130
|
+
}
|
|
131
|
+
[util_1.inspect.custom](_depth, options) {
|
|
132
|
+
return (0, util_1.inspect)(this.toJSON(), options);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
exports.ChannelsSenderContextImpl = ChannelsSenderContextImpl;
|
|
136
|
+
class ChannelsSenderInstance {
|
|
137
|
+
constructor(_version, payload, sid) {
|
|
138
|
+
this._version = _version;
|
|
139
|
+
this.sid = payload.sid;
|
|
140
|
+
this.status = payload.status;
|
|
141
|
+
this.senderId = payload.sender_id;
|
|
142
|
+
this.configuration = payload.configuration;
|
|
143
|
+
this.webhook = payload.webhook;
|
|
144
|
+
this.profile = payload.profile;
|
|
145
|
+
this.properties = payload.properties;
|
|
146
|
+
this.offlineReasons = payload.offline_reasons;
|
|
147
|
+
this.url = payload.url;
|
|
148
|
+
this._solution = { sid: sid || this.sid };
|
|
149
|
+
}
|
|
150
|
+
get _proxy() {
|
|
151
|
+
this._context =
|
|
152
|
+
this._context ||
|
|
153
|
+
new ChannelsSenderContextImpl(this._version, this._solution.sid);
|
|
154
|
+
return this._context;
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Remove a ChannelsSenderInstance
|
|
158
|
+
*
|
|
159
|
+
* @param callback - Callback to handle processed record
|
|
160
|
+
*
|
|
161
|
+
* @returns Resolves to processed boolean
|
|
162
|
+
*/
|
|
163
|
+
remove(callback) {
|
|
164
|
+
return this._proxy.remove(callback);
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Fetch a ChannelsSenderInstance
|
|
168
|
+
*
|
|
169
|
+
* @param callback - Callback to handle processed record
|
|
170
|
+
*
|
|
171
|
+
* @returns Resolves to processed ChannelsSenderInstance
|
|
172
|
+
*/
|
|
173
|
+
fetch(callback) {
|
|
174
|
+
return this._proxy.fetch(callback);
|
|
175
|
+
}
|
|
176
|
+
update(params, callback) {
|
|
177
|
+
return this._proxy.update(params, callback);
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Provide a user-friendly representation
|
|
181
|
+
*
|
|
182
|
+
* @returns Object
|
|
183
|
+
*/
|
|
184
|
+
toJSON() {
|
|
185
|
+
return {
|
|
186
|
+
sid: this.sid,
|
|
187
|
+
status: this.status,
|
|
188
|
+
senderId: this.senderId,
|
|
189
|
+
configuration: this.configuration,
|
|
190
|
+
webhook: this.webhook,
|
|
191
|
+
profile: this.profile,
|
|
192
|
+
properties: this.properties,
|
|
193
|
+
offlineReasons: this.offlineReasons,
|
|
194
|
+
url: this.url,
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
[util_1.inspect.custom](_depth, options) {
|
|
198
|
+
return (0, util_1.inspect)(this.toJSON(), options);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
exports.ChannelsSenderInstance = ChannelsSenderInstance;
|
|
202
|
+
function ChannelsSenderListInstance(version) {
|
|
203
|
+
const instance = ((sid) => instance.get(sid));
|
|
204
|
+
instance.get = function get(sid) {
|
|
205
|
+
return new ChannelsSenderContextImpl(version, sid);
|
|
206
|
+
};
|
|
207
|
+
instance._version = version;
|
|
208
|
+
instance._solution = {};
|
|
209
|
+
instance._uri = `/Channels/Senders`;
|
|
210
|
+
instance.create = function create(params, headers, callback) {
|
|
211
|
+
if (params === null || params === undefined) {
|
|
212
|
+
throw new Error('Required parameter "params" missing.');
|
|
213
|
+
}
|
|
214
|
+
let data = {};
|
|
215
|
+
data = params;
|
|
216
|
+
if (headers === null || headers === undefined) {
|
|
217
|
+
headers = {};
|
|
218
|
+
}
|
|
219
|
+
headers["Content-Type"] = "application/json";
|
|
220
|
+
headers["Accept"] = "application/json";
|
|
221
|
+
let operationVersion = version, operationPromise = operationVersion.create({
|
|
222
|
+
uri: instance._uri,
|
|
223
|
+
method: "post",
|
|
224
|
+
data,
|
|
225
|
+
headers,
|
|
226
|
+
});
|
|
227
|
+
operationPromise = operationPromise.then((payload) => new ChannelsSenderInstance(operationVersion, payload));
|
|
228
|
+
operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
|
|
229
|
+
return operationPromise;
|
|
230
|
+
};
|
|
231
|
+
instance.page = function page(params, callback) {
|
|
232
|
+
if (params === null || params === undefined) {
|
|
233
|
+
throw new Error('Required parameter "params" missing.');
|
|
234
|
+
}
|
|
235
|
+
if (params["channel"] === null || params["channel"] === undefined) {
|
|
236
|
+
throw new Error("Required parameter \"params['channel']\" missing.");
|
|
237
|
+
}
|
|
238
|
+
let data = {};
|
|
239
|
+
data["Channel"] = params["channel"];
|
|
240
|
+
if (params["pageSize"] !== undefined)
|
|
241
|
+
data["PageSize"] = params["pageSize"];
|
|
242
|
+
if (params.pageNumber !== undefined)
|
|
243
|
+
data["Page"] = params.pageNumber;
|
|
244
|
+
if (params.pageToken !== undefined)
|
|
245
|
+
data["PageToken"] = params.pageToken;
|
|
246
|
+
const headers = {};
|
|
247
|
+
headers["Accept"] = "application/json";
|
|
248
|
+
let operationVersion = version, operationPromise = operationVersion.page({
|
|
249
|
+
uri: instance._uri,
|
|
250
|
+
method: "get",
|
|
251
|
+
params: data,
|
|
252
|
+
headers,
|
|
253
|
+
});
|
|
254
|
+
operationPromise = operationPromise.then((payload) => new ChannelsSenderPage(operationVersion, payload, instance._solution));
|
|
255
|
+
operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
|
|
256
|
+
return operationPromise;
|
|
257
|
+
};
|
|
258
|
+
instance.each = instance._version.each;
|
|
259
|
+
instance.list = instance._version.list;
|
|
260
|
+
instance.getPage = function getPage(targetUrl, callback) {
|
|
261
|
+
const operationPromise = instance._version._domain.twilio.request({
|
|
262
|
+
method: "get",
|
|
263
|
+
uri: targetUrl,
|
|
264
|
+
});
|
|
265
|
+
let pagePromise = operationPromise.then((payload) => new ChannelsSenderPage(instance._version, payload, instance._solution));
|
|
266
|
+
pagePromise = instance._version.setPromiseCallback(pagePromise, callback);
|
|
267
|
+
return pagePromise;
|
|
268
|
+
};
|
|
269
|
+
instance.toJSON = function toJSON() {
|
|
270
|
+
return instance._solution;
|
|
271
|
+
};
|
|
272
|
+
instance[util_1.inspect.custom] = function inspectImpl(_depth, options) {
|
|
273
|
+
return (0, util_1.inspect)(instance.toJSON(), options);
|
|
274
|
+
};
|
|
275
|
+
return instance;
|
|
276
|
+
}
|
|
277
|
+
exports.ChannelsSenderListInstance = ChannelsSenderListInstance;
|
|
278
|
+
class ChannelsSenderPage extends Page_1.default {
|
|
279
|
+
/**
|
|
280
|
+
* Initialize the ChannelsSenderPage
|
|
281
|
+
*
|
|
282
|
+
* @param version - Version of the resource
|
|
283
|
+
* @param response - Response from the API
|
|
284
|
+
* @param solution - Path solution
|
|
285
|
+
*/
|
|
286
|
+
constructor(version, response, solution) {
|
|
287
|
+
super(version, response, solution);
|
|
288
|
+
}
|
|
289
|
+
/**
|
|
290
|
+
* Build an instance of ChannelsSenderInstance
|
|
291
|
+
*
|
|
292
|
+
* @param payload - Payload response from the API
|
|
293
|
+
*/
|
|
294
|
+
getInstance(payload) {
|
|
295
|
+
return new ChannelsSenderInstance(this._version, payload);
|
|
296
|
+
}
|
|
297
|
+
[util_1.inspect.custom](depth, options) {
|
|
298
|
+
return (0, util_1.inspect)(this.toJSON(), options);
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
exports.ChannelsSenderPage = ChannelsSenderPage;
|
package/lib/rest/numbers/V1.d.ts
CHANGED
|
@@ -7,8 +7,8 @@ import { PortingPortInPhoneNumberListInstance } from "./v1/portingPortInPhoneNum
|
|
|
7
7
|
import { PortingPortabilityListInstance } from "./v1/portingPortability";
|
|
8
8
|
import { PortingWebhookConfigurationListInstance } from "./v1/portingWebhookConfiguration";
|
|
9
9
|
import { PortingWebhookConfigurationDeleteListInstance } from "./v1/portingWebhookConfigurationDelete";
|
|
10
|
+
import { PortingWebhookConfigurationFetchListInstance } from "./v1/portingWebhookConfigurationFetch";
|
|
10
11
|
import { SigningRequestConfigurationListInstance } from "./v1/signingRequestConfiguration";
|
|
11
|
-
import { WebhookListInstance } from "./v1/webhook";
|
|
12
12
|
export default class V1 extends Version {
|
|
13
13
|
/**
|
|
14
14
|
* Initialize the V1 version of Numbers
|
|
@@ -30,10 +30,10 @@ export default class V1 extends Version {
|
|
|
30
30
|
protected _portingWebhookConfigurations?: PortingWebhookConfigurationListInstance;
|
|
31
31
|
/** portingWebhookConfigurationsDelete - { Twilio.Numbers.V1.PortingWebhookConfigurationDeleteListInstance } resource */
|
|
32
32
|
protected _portingWebhookConfigurationsDelete?: PortingWebhookConfigurationDeleteListInstance;
|
|
33
|
+
/** portingWebhookConfigurationFetch - { Twilio.Numbers.V1.PortingWebhookConfigurationFetchListInstance } resource */
|
|
34
|
+
protected _portingWebhookConfigurationFetch?: PortingWebhookConfigurationFetchListInstance;
|
|
33
35
|
/** signingRequestConfigurations - { Twilio.Numbers.V1.SigningRequestConfigurationListInstance } resource */
|
|
34
36
|
protected _signingRequestConfigurations?: SigningRequestConfigurationListInstance;
|
|
35
|
-
/** webhook - { Twilio.Numbers.V1.WebhookListInstance } resource */
|
|
36
|
-
protected _webhook?: WebhookListInstance;
|
|
37
37
|
/** Getter for bulkEligibilities resource */
|
|
38
38
|
get bulkEligibilities(): BulkEligibilityListInstance;
|
|
39
39
|
/** Getter for eligibilities resource */
|
|
@@ -48,8 +48,8 @@ export default class V1 extends Version {
|
|
|
48
48
|
get portingWebhookConfigurations(): PortingWebhookConfigurationListInstance;
|
|
49
49
|
/** Getter for portingWebhookConfigurationsDelete resource */
|
|
50
50
|
get portingWebhookConfigurationsDelete(): PortingWebhookConfigurationDeleteListInstance;
|
|
51
|
+
/** Getter for portingWebhookConfigurationFetch resource */
|
|
52
|
+
get portingWebhookConfigurationFetch(): PortingWebhookConfigurationFetchListInstance;
|
|
51
53
|
/** Getter for signingRequestConfigurations resource */
|
|
52
54
|
get signingRequestConfigurations(): SigningRequestConfigurationListInstance;
|
|
53
|
-
/** Getter for webhook resource */
|
|
54
|
-
get webhook(): WebhookListInstance;
|
|
55
55
|
}
|
package/lib/rest/numbers/V1.js
CHANGED
|
@@ -24,8 +24,8 @@ const portingPortInPhoneNumber_1 = require("./v1/portingPortInPhoneNumber");
|
|
|
24
24
|
const portingPortability_1 = require("./v1/portingPortability");
|
|
25
25
|
const portingWebhookConfiguration_1 = require("./v1/portingWebhookConfiguration");
|
|
26
26
|
const portingWebhookConfigurationDelete_1 = require("./v1/portingWebhookConfigurationDelete");
|
|
27
|
+
const portingWebhookConfigurationFetch_1 = require("./v1/portingWebhookConfigurationFetch");
|
|
27
28
|
const signingRequestConfiguration_1 = require("./v1/signingRequestConfiguration");
|
|
28
|
-
const webhook_1 = require("./v1/webhook");
|
|
29
29
|
class V1 extends Version_1.default {
|
|
30
30
|
/**
|
|
31
31
|
* Initialize the V1 version of Numbers
|
|
@@ -79,6 +79,13 @@ class V1 extends Version_1.default {
|
|
|
79
79
|
(0, portingWebhookConfigurationDelete_1.PortingWebhookConfigurationDeleteListInstance)(this);
|
|
80
80
|
return this._portingWebhookConfigurationsDelete;
|
|
81
81
|
}
|
|
82
|
+
/** Getter for portingWebhookConfigurationFetch resource */
|
|
83
|
+
get portingWebhookConfigurationFetch() {
|
|
84
|
+
this._portingWebhookConfigurationFetch =
|
|
85
|
+
this._portingWebhookConfigurationFetch ||
|
|
86
|
+
(0, portingWebhookConfigurationFetch_1.PortingWebhookConfigurationFetchListInstance)(this);
|
|
87
|
+
return this._portingWebhookConfigurationFetch;
|
|
88
|
+
}
|
|
82
89
|
/** Getter for signingRequestConfigurations resource */
|
|
83
90
|
get signingRequestConfigurations() {
|
|
84
91
|
this._signingRequestConfigurations =
|
|
@@ -86,10 +93,5 @@ class V1 extends Version_1.default {
|
|
|
86
93
|
(0, signingRequestConfiguration_1.SigningRequestConfigurationListInstance)(this);
|
|
87
94
|
return this._signingRequestConfigurations;
|
|
88
95
|
}
|
|
89
|
-
/** Getter for webhook resource */
|
|
90
|
-
get webhook() {
|
|
91
|
-
this._webhook = this._webhook || (0, webhook_1.WebhookListInstance)(this);
|
|
92
|
-
return this._webhook;
|
|
93
|
-
}
|
|
94
96
|
}
|
|
95
97
|
exports.default = V1;
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import { inspect, InspectOptions } from "util";
|
|
3
3
|
import V1 from "../V1";
|
|
4
|
-
export interface
|
|
4
|
+
export interface PortingWebhookConfigurationFetchSolution {
|
|
5
5
|
}
|
|
6
|
-
export interface
|
|
6
|
+
export interface PortingWebhookConfigurationFetchListInstance {
|
|
7
7
|
_version: V1;
|
|
8
|
-
_solution:
|
|
8
|
+
_solution: PortingWebhookConfigurationFetchSolution;
|
|
9
9
|
_uri: string;
|
|
10
10
|
/**
|
|
11
|
-
* Fetch a
|
|
11
|
+
* Fetch a PortingWebhookConfigurationFetchInstance
|
|
12
12
|
*
|
|
13
13
|
* @param callback - Callback to handle processed record
|
|
14
14
|
*
|
|
15
|
-
* @returns Resolves to processed
|
|
15
|
+
* @returns Resolves to processed PortingWebhookConfigurationFetchInstance
|
|
16
16
|
*/
|
|
17
|
-
fetch(callback?: (error: Error | null, item?:
|
|
17
|
+
fetch(callback?: (error: Error | null, item?: PortingWebhookConfigurationFetchInstance) => any): Promise<PortingWebhookConfigurationFetchInstance>;
|
|
18
18
|
/**
|
|
19
19
|
* Provide a user-friendly representation
|
|
20
20
|
*/
|
|
21
21
|
toJSON(): any;
|
|
22
22
|
[inspect.custom](_depth: any, options: InspectOptions): any;
|
|
23
23
|
}
|
|
24
|
-
export declare function
|
|
25
|
-
interface
|
|
24
|
+
export declare function PortingWebhookConfigurationFetchListInstance(version: V1): PortingWebhookConfigurationFetchListInstance;
|
|
25
|
+
interface PortingWebhookConfigurationFetchResource {
|
|
26
26
|
url: string;
|
|
27
27
|
port_in_target_url: string;
|
|
28
28
|
port_out_target_url: string;
|
|
@@ -30,9 +30,9 @@ interface WebhookResource {
|
|
|
30
30
|
port_in_target_date_created: Date;
|
|
31
31
|
port_out_target_date_created: Date;
|
|
32
32
|
}
|
|
33
|
-
export declare class
|
|
33
|
+
export declare class PortingWebhookConfigurationFetchInstance {
|
|
34
34
|
protected _version: V1;
|
|
35
|
-
constructor(_version: V1, payload:
|
|
35
|
+
constructor(_version: V1, payload: PortingWebhookConfigurationFetchResource);
|
|
36
36
|
/**
|
|
37
37
|
* The URL of the webhook configuration request
|
|
38
38
|
*/
|
|
@@ -13,11 +13,11 @@
|
|
|
13
13
|
* Do not edit the class manually.
|
|
14
14
|
*/
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.
|
|
16
|
+
exports.PortingWebhookConfigurationFetchInstance = exports.PortingWebhookConfigurationFetchListInstance = void 0;
|
|
17
17
|
const util_1 = require("util");
|
|
18
18
|
const deserialize = require("../../../base/deserialize");
|
|
19
19
|
const serialize = require("../../../base/serialize");
|
|
20
|
-
function
|
|
20
|
+
function PortingWebhookConfigurationFetchListInstance(version) {
|
|
21
21
|
const instance = {};
|
|
22
22
|
instance._version = version;
|
|
23
23
|
instance._solution = {};
|
|
@@ -30,7 +30,7 @@ function WebhookListInstance(version) {
|
|
|
30
30
|
method: "get",
|
|
31
31
|
headers,
|
|
32
32
|
});
|
|
33
|
-
operationPromise = operationPromise.then((payload) => new
|
|
33
|
+
operationPromise = operationPromise.then((payload) => new PortingWebhookConfigurationFetchInstance(operationVersion, payload));
|
|
34
34
|
operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
|
|
35
35
|
return operationPromise;
|
|
36
36
|
};
|
|
@@ -42,8 +42,8 @@ function WebhookListInstance(version) {
|
|
|
42
42
|
};
|
|
43
43
|
return instance;
|
|
44
44
|
}
|
|
45
|
-
exports.
|
|
46
|
-
class
|
|
45
|
+
exports.PortingWebhookConfigurationFetchListInstance = PortingWebhookConfigurationFetchListInstance;
|
|
46
|
+
class PortingWebhookConfigurationFetchInstance {
|
|
47
47
|
constructor(_version, payload) {
|
|
48
48
|
this._version = _version;
|
|
49
49
|
this.url = payload.url;
|
|
@@ -72,4 +72,4 @@ class WebhookInstance {
|
|
|
72
72
|
return (0, util_1.inspect)(this.toJSON(), options);
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
|
-
exports.
|
|
75
|
+
exports.PortingWebhookConfigurationFetchInstance = PortingWebhookConfigurationFetchInstance;
|
|
@@ -7,7 +7,7 @@ import { BuildStatusListInstance } from "./build/buildStatus";
|
|
|
7
7
|
/**
|
|
8
8
|
* The Runtime version that will be used to run the Build resource when it is deployed.
|
|
9
9
|
*/
|
|
10
|
-
export type BuildRuntime = "node8" | "node10" | "node12" | "node14" | "node16" | "node18";
|
|
10
|
+
export type BuildRuntime = "node8" | "node10" | "node12" | "node14" | "node16" | "node18" | "node20" | "node22";
|
|
11
11
|
/**
|
|
12
12
|
* The status of the Build. Can be: `building`, `completed`, or `failed`.
|
|
13
13
|
*/
|
|
@@ -63,7 +63,7 @@ interface VerificationAttemptsSummaryResource {
|
|
|
63
63
|
total_attempts: number;
|
|
64
64
|
total_converted: number;
|
|
65
65
|
total_unconverted: number;
|
|
66
|
-
conversion_rate_percentage:
|
|
66
|
+
conversion_rate_percentage: string;
|
|
67
67
|
url: string;
|
|
68
68
|
}
|
|
69
69
|
export declare class VerificationAttemptsSummaryInstance {
|
|
@@ -86,7 +86,7 @@ export declare class VerificationAttemptsSummaryInstance {
|
|
|
86
86
|
/**
|
|
87
87
|
* Percentage of the confirmed messages over the total, defined by (total_converted/total_attempts)*100.
|
|
88
88
|
*/
|
|
89
|
-
conversionRatePercentage:
|
|
89
|
+
conversionRatePercentage: string;
|
|
90
90
|
url: string;
|
|
91
91
|
private get _proxy();
|
|
92
92
|
/**
|
|
@@ -115,7 +115,7 @@ export declare class VerificationAttemptsSummaryInstance {
|
|
|
115
115
|
totalAttempts: number;
|
|
116
116
|
totalConverted: number;
|
|
117
117
|
totalUnconverted: number;
|
|
118
|
-
conversionRatePercentage:
|
|
118
|
+
conversionRatePercentage: string;
|
|
119
119
|
url: string;
|
|
120
120
|
};
|
|
121
121
|
[inspect.custom](_depth: any, options: InspectOptions): string;
|
|
@@ -34,12 +34,16 @@ export interface RoomListInstanceCreateOptions {
|
|
|
34
34
|
maxParticipants?: number;
|
|
35
35
|
/** Whether to start recording when Participants connect. */
|
|
36
36
|
recordParticipantsOnConnect?: boolean;
|
|
37
|
+
/** Whether to start transcriptions when Participants connect. If TranscriptionsConfiguration is not provided, default settings will be used. */
|
|
38
|
+
transcribeParticipantsOnConnect?: boolean;
|
|
37
39
|
/** An array of the video codecs that are supported when publishing a track in the room. Can be: `VP8` and `H264`. */
|
|
38
40
|
videoCodecs?: Array<RoomVideoCodec>;
|
|
39
41
|
/** The region for the Room\\\'s media server. Can be one of the [available Media Regions](https://www.twilio.com/docs/video/ip-addresses#group-rooms-media-servers). */
|
|
40
42
|
mediaRegion?: string;
|
|
41
43
|
/** A collection of Recording Rules that describe how to include or exclude matching tracks for recording */
|
|
42
44
|
recordingRules?: object;
|
|
45
|
+
/** A collection of properties that describe transcription behaviour. If TranscribeParticipantsOnConnect is set to true and TranscriptionsConfiguration is not provided, default settings will be used. */
|
|
46
|
+
transcriptionsConfiguration?: object;
|
|
43
47
|
/** When set to true, indicates that the participants in the room will only publish audio. No video tracks will be allowed. */
|
|
44
48
|
audioOnly?: boolean;
|
|
45
49
|
/** The maximum number of seconds a Participant can be connected to the room. The maximum possible value is 86400 seconds (24 hours). The default is 14400 seconds (4 hours). */
|
|
@@ -235,12 +235,16 @@ function RoomListInstance(version) {
|
|
|
235
235
|
data["MaxParticipants"] = params["maxParticipants"];
|
|
236
236
|
if (params["recordParticipantsOnConnect"] !== undefined)
|
|
237
237
|
data["RecordParticipantsOnConnect"] = serialize.bool(params["recordParticipantsOnConnect"]);
|
|
238
|
+
if (params["transcribeParticipantsOnConnect"] !== undefined)
|
|
239
|
+
data["TranscribeParticipantsOnConnect"] = serialize.bool(params["transcribeParticipantsOnConnect"]);
|
|
238
240
|
if (params["videoCodecs"] !== undefined)
|
|
239
241
|
data["VideoCodecs"] = serialize.map(params["videoCodecs"], (e) => e);
|
|
240
242
|
if (params["mediaRegion"] !== undefined)
|
|
241
243
|
data["MediaRegion"] = params["mediaRegion"];
|
|
242
244
|
if (params["recordingRules"] !== undefined)
|
|
243
245
|
data["RecordingRules"] = serialize.object(params["recordingRules"]);
|
|
246
|
+
if (params["transcriptionsConfiguration"] !== undefined)
|
|
247
|
+
data["TranscriptionsConfiguration"] = serialize.object(params["transcriptionsConfiguration"]);
|
|
244
248
|
if (params["audioOnly"] !== undefined)
|
|
245
249
|
data["AudioOnly"] = serialize.bool(params["audioOnly"]);
|
|
246
250
|
if (params["maxParticipantDuration"] !== undefined)
|
|
@@ -1466,20 +1466,30 @@ declare namespace VoiceResponse {
|
|
|
1466
1466
|
* Attributes to pass to conversationRelay
|
|
1467
1467
|
*/
|
|
1468
1468
|
export interface ConversationRelayAttributes {
|
|
1469
|
-
/** debug -
|
|
1470
|
-
debug?:
|
|
1469
|
+
/** debug - Multiple debug options to be used for troubleshooting */
|
|
1470
|
+
debug?: string;
|
|
1471
1471
|
/** dtmfDetection - Whether DTMF tones should be detected and reported in speech transcription */
|
|
1472
1472
|
dtmfDetection?: boolean;
|
|
1473
|
-
/**
|
|
1474
|
-
|
|
1475
|
-
/**
|
|
1476
|
-
|
|
1473
|
+
/** elevenlabsTextNormalization - When using ElevenLabs as TTS provider, this parameter allows you to enable or disable its text normalization feature */
|
|
1474
|
+
elevenlabsTextNormalization?: string;
|
|
1475
|
+
/** hints - Phrases to help better accuracy in speech recognition of these pharases */
|
|
1476
|
+
hints?: string;
|
|
1477
|
+
/** intelligenceService - The Conversational Intelligence Service id or unique name to be used for the session */
|
|
1478
|
+
intelligenceService?: string;
|
|
1479
|
+
/** interruptSensitivity - Set the sensitivity of the interrupt feature for speech. The value can be low, medium, or high */
|
|
1480
|
+
interruptSensitivity?: string;
|
|
1481
|
+
/** interruptible - Whether and how the input from a caller, such as speaking or DTMF can interrupt the play of text-to-speech */
|
|
1482
|
+
interruptible?: string;
|
|
1477
1483
|
/** language - Language to be used for both text-to-speech and transcription */
|
|
1478
1484
|
language?: string;
|
|
1479
1485
|
/** partialPrompts - Whether partial prompts should be reported to WebSocket server before the caller finishes speaking */
|
|
1480
1486
|
partialPrompts?: boolean;
|
|
1487
|
+
/** preemptible - Whether subsequent text-to-speech or play media can interrupt the on-going play of text-to-speech or media */
|
|
1488
|
+
preemptible?: boolean;
|
|
1481
1489
|
/** profanityFilter - Whether profanities should be filtered out of the speech transcription */
|
|
1482
1490
|
profanityFilter?: boolean;
|
|
1491
|
+
/** reportInputDuringAgentSpeech - Whether prompts should be reported to WebSocket server when text-to-speech playing and interrupt is disabled */
|
|
1492
|
+
reportInputDuringAgentSpeech?: boolean;
|
|
1483
1493
|
/** speechModel - Speech model to be used for transcription */
|
|
1484
1494
|
speechModel?: string;
|
|
1485
1495
|
/** transcriptionLanguage - Language to be used for transcription */
|
|
@@ -1496,29 +1506,39 @@ declare namespace VoiceResponse {
|
|
|
1496
1506
|
voice?: string;
|
|
1497
1507
|
/** welcomeGreeting - The sentence to be played automatically when the session is connected */
|
|
1498
1508
|
welcomeGreeting?: string;
|
|
1499
|
-
/** welcomeGreetingInterruptible - Whether caller
|
|
1500
|
-
welcomeGreetingInterruptible?:
|
|
1509
|
+
/** welcomeGreetingInterruptible - "Whether and how the input from a caller, such as speaking or DTMF can interrupt the welcome greeting */
|
|
1510
|
+
welcomeGreetingInterruptible?: string;
|
|
1501
1511
|
}
|
|
1502
1512
|
/**
|
|
1503
1513
|
* Attributes to pass to assistant
|
|
1504
1514
|
*/
|
|
1505
1515
|
export interface AssistantAttributes {
|
|
1506
|
-
/** debug -
|
|
1507
|
-
debug?:
|
|
1516
|
+
/** debug - Multiple debug options to be used for troubleshooting */
|
|
1517
|
+
debug?: string;
|
|
1508
1518
|
/** dtmfDetection - Whether DTMF tones should be detected and reported in speech transcription */
|
|
1509
1519
|
dtmfDetection?: boolean;
|
|
1520
|
+
/** elevenlabsTextNormalization - When using ElevenLabs as TTS provider, this parameter allows you to enable or disable its text normalization feature */
|
|
1521
|
+
elevenlabsTextNormalization?: string;
|
|
1522
|
+
/** hints - Phrases to help better accuracy in speech recognition of these pharases */
|
|
1523
|
+
hints?: string;
|
|
1510
1524
|
/** id - The assistant ID of the AI Assistant */
|
|
1511
1525
|
id?: string;
|
|
1512
|
-
/**
|
|
1513
|
-
|
|
1514
|
-
/**
|
|
1515
|
-
|
|
1526
|
+
/** intelligenceService - The Conversational Intelligence Service id or unique name to be used for the session */
|
|
1527
|
+
intelligenceService?: string;
|
|
1528
|
+
/** interruptSensitivity - Set the sensitivity of the interrupt feature for speech. The value can be low, medium, or high */
|
|
1529
|
+
interruptSensitivity?: string;
|
|
1530
|
+
/** interruptible - Whether and how the input from a caller, such as speaking or DTMF can interrupt the play of text-to-speech */
|
|
1531
|
+
interruptible?: string;
|
|
1516
1532
|
/** language - Language to be used for both text-to-speech and transcription */
|
|
1517
1533
|
language?: string;
|
|
1518
1534
|
/** partialPrompts - Whether partial prompts should be reported to WebSocket server before the caller finishes speaking */
|
|
1519
1535
|
partialPrompts?: boolean;
|
|
1536
|
+
/** preemptible - Whether subsequent text-to-speech or play media can interrupt the on-going play of text-to-speech or media */
|
|
1537
|
+
preemptible?: boolean;
|
|
1520
1538
|
/** profanityFilter - Whether profanities should be filtered out of the speech transcription */
|
|
1521
1539
|
profanityFilter?: boolean;
|
|
1540
|
+
/** reportInputDuringAgentSpeech - Whether prompts should be reported to WebSocket server when text-to-speech playing and interrupt is disabled */
|
|
1541
|
+
reportInputDuringAgentSpeech?: boolean;
|
|
1522
1542
|
/** speechModel - Speech model to be used for transcription */
|
|
1523
1543
|
speechModel?: string;
|
|
1524
1544
|
/** transcriptionLanguage - Language to be used for transcription */
|
|
@@ -1533,8 +1553,8 @@ declare namespace VoiceResponse {
|
|
|
1533
1553
|
voice?: string;
|
|
1534
1554
|
/** welcomeGreeting - The sentence to be played automatically when the session is connected */
|
|
1535
1555
|
welcomeGreeting?: string;
|
|
1536
|
-
/** welcomeGreetingInterruptible - Whether caller
|
|
1537
|
-
welcomeGreetingInterruptible?:
|
|
1556
|
+
/** welcomeGreetingInterruptible - "Whether and how the input from a caller, such as speaking or DTMF can interrupt the welcome greeting */
|
|
1557
|
+
welcomeGreetingInterruptible?: string;
|
|
1538
1558
|
}
|
|
1539
1559
|
/**
|
|
1540
1560
|
* Attributes to pass to language
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "twilio",
|
|
3
3
|
"description": "A Twilio helper library",
|
|
4
|
-
"version": "5.
|
|
4
|
+
"version": "5.6.1",
|
|
5
5
|
"author": "API Team <api@twilio.com>",
|
|
6
6
|
"contributors": [
|
|
7
7
|
{
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"url": "https://github.com/twilio/twilio-node.git"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"axios": "^1.
|
|
23
|
+
"axios": "^1.8.3",
|
|
24
24
|
"dayjs": "^1.11.9",
|
|
25
25
|
"https-proxy-agent": "^5.0.0",
|
|
26
26
|
"jsonwebtoken": "^9.0.2",
|