twilio 5.13.1 → 6.0.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/README.md +2 -4
- package/lib/rest/ConversationsBase.d.ts +3 -0
- package/lib/rest/ConversationsBase.js +5 -0
- package/lib/rest/InsightsBase.d.ts +3 -0
- package/lib/rest/InsightsBase.js +5 -0
- package/lib/rest/IntelligenceBase.d.ts +3 -0
- package/lib/rest/IntelligenceBase.js +5 -0
- package/lib/rest/KnowledgeBase.d.ts +3 -0
- package/lib/rest/KnowledgeBase.js +5 -0
- package/lib/rest/Memory.d.ts +4 -0
- package/lib/rest/Memory.js +8 -0
- package/lib/rest/MemoryBase.d.ts +13 -0
- package/lib/rest/MemoryBase.js +31 -0
- package/lib/rest/MessagingBase.d.ts +3 -0
- package/lib/rest/MessagingBase.js +5 -0
- package/lib/rest/Twilio.d.ts +5 -0
- package/lib/rest/Twilio.js +5 -0
- package/lib/rest/VoiceBase.d.ts +3 -0
- package/lib/rest/VoiceBase.js +5 -0
- package/lib/rest/api/v2010/account/call/recording.d.ts +2 -0
- package/lib/rest/api/v2010/account/call/recording.js +4 -0
- package/lib/rest/api/v2010/account/call/transcription.d.ts +2 -0
- package/lib/rest/api/v2010/account/call/transcription.js +6 -0
- package/lib/rest/api/v2010/account/call.d.ts +2 -0
- package/lib/rest/api/v2010/account/call.js +4 -0
- package/lib/rest/api/v2010/account/conference/participant.d.ts +2 -0
- package/lib/rest/api/v2010/account/conference/participant.js +4 -0
- package/lib/rest/api/v2010/account/message.d.ts +2 -0
- package/lib/rest/api/v2010/account/message.js +4 -0
- package/lib/rest/conversations/V2.d.ts +35 -0
- package/lib/rest/conversations/V2.js +67 -0
- package/lib/rest/conversations/v2/communication.d.ts +479 -0
- package/lib/rest/conversations/v2/communication.js +436 -0
- package/lib/rest/conversations/v2/configuration.d.ts +906 -0
- package/lib/rest/conversations/v2/configuration.js +619 -0
- package/lib/rest/conversations/v2/conversation.d.ts +936 -0
- package/lib/rest/conversations/v2/conversation.js +664 -0
- package/lib/rest/conversations/v2/operation.d.ts +167 -0
- package/lib/rest/conversations/v2/operation.js +170 -0
- package/lib/rest/conversations/v2/participant.d.ts +469 -0
- package/lib/rest/conversations/v2/participant.js +442 -0
- package/lib/rest/flexApi/V1.d.ts +0 -5
- package/lib/rest/flexApi/V1.js +0 -7
- package/lib/rest/flexApi/v1/plugin/pluginVersions.d.ts +1 -1
- package/lib/rest/flexApi/v1/plugin/pluginVersions.js +8 -6
- package/lib/rest/iam/V1.d.ts +3 -0
- package/lib/rest/iam/V1.js +5 -0
- package/lib/rest/iam/v1/rolePermission.d.ts +225 -0
- package/lib/rest/iam/v1/rolePermission.js +181 -0
- package/lib/rest/insights/V3.d.ts +20 -0
- package/lib/rest/insights/V3.js +42 -0
- package/lib/rest/insights/v1/call/callSummary.d.ts +10 -10
- package/lib/rest/insights/v1/call/event.d.ts +4 -4
- package/lib/rest/insights/v1/callSummaries.d.ts +12 -9
- package/lib/rest/insights/v2/inbound.d.ts +8 -8
- package/lib/rest/insights/v2/inbound.js +4 -4
- package/lib/rest/insights/v2/outbound.d.ts +8 -8
- package/lib/rest/insights/v2/outbound.js +4 -4
- package/lib/rest/insights/v2/report.d.ts +8 -8
- package/lib/rest/insights/v2/report.js +4 -4
- package/lib/rest/insights/v3/metadata.d.ts +115 -0
- package/lib/rest/insights/v3/metadata.js +118 -0
- package/lib/rest/insights/v3/query.d.ts +180 -0
- package/lib/rest/insights/v3/query.js +214 -0
- package/lib/rest/intelligence/V3.d.ts +35 -0
- package/lib/rest/intelligence/V3.js +65 -0
- package/lib/rest/intelligence/v3/configuration.d.ts +693 -0
- package/lib/rest/intelligence/v3/configuration.js +528 -0
- package/lib/rest/intelligence/v3/conversation.d.ts +478 -0
- package/lib/rest/intelligence/v3/conversation.js +342 -0
- package/lib/rest/intelligence/v3/operator.d.ts +619 -0
- package/lib/rest/intelligence/v3/operator.js +493 -0
- package/lib/rest/intelligence/v3/operatorResult.d.ts +543 -0
- package/lib/rest/intelligence/v3/operatorResult.js +478 -0
- package/lib/rest/intelligence/v3/version.d.ts +469 -0
- package/lib/rest/intelligence/v3/version.js +341 -0
- package/lib/rest/knowledge/V2.d.ts +31 -0
- package/lib/rest/knowledge/V2.js +62 -0
- package/lib/rest/knowledge/v2/chunk.d.ts +209 -0
- package/lib/rest/knowledge/v2/chunk.js +178 -0
- package/lib/rest/knowledge/v2/knowledge.d.ts +507 -0
- package/lib/rest/knowledge/v2/knowledge.js +466 -0
- package/lib/rest/knowledge/v2/knowledgeBasis.d.ts +484 -0
- package/lib/rest/knowledge/v2/knowledgeBasis.js +441 -0
- package/lib/rest/knowledge/v2/operation.d.ts +162 -0
- package/lib/rest/knowledge/v2/operation.js +175 -0
- package/lib/rest/knowledge/v2/search.d.ts +180 -0
- package/lib/rest/{flexApi/v1/createFlexInstance.js → knowledge/v2/search.js} +45 -36
- package/lib/rest/memory/V1.d.ts +76 -0
- package/lib/rest/memory/V1.js +140 -0
- package/lib/rest/memory/v1/bulk.d.ts +129 -0
- package/lib/rest/memory/v1/bulk.js +158 -0
- package/lib/rest/memory/v1/conversationSummary.d.ts +531 -0
- package/lib/rest/memory/v1/conversationSummary.js +473 -0
- package/lib/rest/memory/v1/dataMapping.d.ts +630 -0
- package/lib/rest/memory/v1/dataMapping.js +512 -0
- package/lib/rest/memory/v1/event.d.ts +153 -0
- package/lib/rest/memory/v1/event.js +159 -0
- package/lib/rest/memory/v1/identifier.d.ts +362 -0
- package/lib/rest/memory/v1/identifier.js +369 -0
- package/lib/rest/memory/v1/identityResolutionSetting.d.ts +247 -0
- package/lib/rest/memory/v1/identityResolutionSetting.js +229 -0
- package/lib/rest/memory/v1/import.d.ts +292 -0
- package/lib/rest/memory/v1/import.js +280 -0
- package/lib/rest/memory/v1/lookup.d.ts +82 -0
- package/lib/rest/memory/v1/lookup.js +118 -0
- package/lib/rest/memory/v1/observation.d.ts +521 -0
- package/lib/rest/memory/v1/observation.js +477 -0
- package/lib/rest/memory/v1/operation.d.ts +162 -0
- package/lib/rest/memory/v1/operation.js +175 -0
- package/lib/rest/memory/v1/profile.d.ts +441 -0
- package/lib/rest/memory/v1/profile.js +467 -0
- package/lib/rest/memory/v1/recall.d.ts +306 -0
- package/lib/rest/memory/v1/recall.js +234 -0
- package/lib/rest/memory/v1/revision.d.ts +246 -0
- package/lib/rest/memory/v1/revision.js +195 -0
- package/lib/rest/memory/v1/store.d.ts +503 -0
- package/lib/rest/memory/v1/store.js +482 -0
- package/lib/rest/memory/v1/trait.d.ts +233 -0
- package/lib/rest/memory/v1/trait.js +190 -0
- package/lib/rest/memory/v1/traitGroup.d.ts +758 -0
- package/lib/rest/memory/v1/traitGroup.js +555 -0
- package/lib/rest/messaging/V3.d.ts +15 -0
- package/lib/rest/messaging/V3.js +37 -0
- package/lib/rest/messaging/v2/channelsSender.d.ts +9 -1
- package/lib/rest/messaging/v2/channelsSender.js +2 -0
- package/lib/rest/messaging/v3/typingIndicator.d.ts +90 -0
- package/lib/rest/messaging/v3/typingIndicator.js +114 -0
- package/lib/rest/numbers/v3/hostedNumberOrder.d.ts +1 -1
- package/lib/rest/numbers/v3/hostedNumberOrder.js +2 -1
- package/lib/rest/previewIam/versionless/organization/roleAssignment.d.ts +32 -0
- package/lib/rest/previewIam/versionless/organization/roleAssignment.js +14 -0
- package/lib/rest/studio/v2/flow/execution.d.ts +12 -0
- package/lib/rest/studio/v2/flow/execution.js +6 -0
- package/lib/rest/studio/v2/flow.d.ts +4 -0
- package/lib/rest/studio/v2/flow.js +8 -0
- package/lib/rest/verify/v2/service/approveChallenge.d.ts +6 -6
- package/lib/rest/verify/v2/service/approveChallenge.js +2 -2
- package/lib/rest/verify/v2/service/newChallenge.d.ts +6 -6
- package/lib/rest/verify/v2/service/newChallenge.js +2 -2
- package/lib/rest/verify/v2/service/verification.d.ts +1 -1
- package/lib/rest/verify/v2/service/webhook.d.ts +2 -2
- package/lib/rest/verify/v2/service/webhook.js +8 -8
- package/lib/rest/video/v1/room.d.ts +4 -1
- package/lib/rest/voice/V3.d.ts +15 -0
- package/lib/rest/voice/V3.js +37 -0
- package/lib/rest/voice/v3/transcription.d.ts +378 -0
- package/lib/rest/voice/v3/transcription.js +264 -0
- package/lib/twiml/VoiceResponse.d.ts +18 -0
- package/package.json +2 -2
- package/lib/rest/flexApi/v1/createFlexInstance.d.ts +0 -165
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* This code was generated by
|
|
4
|
+
* ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
|
|
5
|
+
* | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
|
|
6
|
+
* | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
|
|
7
|
+
*
|
|
8
|
+
* Twilio API definition for public-api voice
|
|
9
|
+
* Powers Twilio public-api voice
|
|
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.TranscriptionInstance = exports.TranscriptionContextImpl = exports.VoiceV3TranscriptionTranscriptionStatusCallback = exports.VoiceV3TranscriptionTranscription = exports.VoiceV3TranscriptionResolvedConfigurationParticipantDefaults = exports.VoiceV3TranscriptionResolvedConfiguration = exports.VoiceV3TranscriptionParticipant = exports.CreateV3TranscriptionsRequest = void 0;
|
|
17
|
+
exports.TranscriptionListInstance = TranscriptionListInstance;
|
|
18
|
+
const util_1 = require("util");
|
|
19
|
+
const deserialize = require("../../../base/deserialize");
|
|
20
|
+
const serialize = require("../../../base/serialize");
|
|
21
|
+
const utility_1 = require("../../../base/utility");
|
|
22
|
+
class CreateV3TranscriptionsRequest {
|
|
23
|
+
constructor(payload) {
|
|
24
|
+
this.transcriptionConfigurationId = payload["transcriptionConfigurationId"];
|
|
25
|
+
this.inputSource = payload["inputSource"];
|
|
26
|
+
this.sourceId = payload["sourceId"];
|
|
27
|
+
this.participants = payload["participants"];
|
|
28
|
+
this.mediaUrl = payload["mediaUrl"];
|
|
29
|
+
this.audioStartedAt = payload["audioStartedAt"];
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
exports.CreateV3TranscriptionsRequest = CreateV3TranscriptionsRequest;
|
|
33
|
+
class VoiceV3TranscriptionParticipant {
|
|
34
|
+
constructor(payload) {
|
|
35
|
+
this.type = payload["type"];
|
|
36
|
+
this.address = payload["address"];
|
|
37
|
+
this.name = payload["name"];
|
|
38
|
+
this.audioChannelIndex = payload["audioChannelIndex"];
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
exports.VoiceV3TranscriptionParticipant = VoiceV3TranscriptionParticipant;
|
|
42
|
+
class VoiceV3TranscriptionResolvedConfiguration {
|
|
43
|
+
constructor(payload) {
|
|
44
|
+
this.transcriptionEngine = payload["transcriptionEngine"];
|
|
45
|
+
this.speechModel = payload["speechModel"];
|
|
46
|
+
this.language = payload["language"];
|
|
47
|
+
this.transcriptionStatusCallback = payload["transcriptionStatusCallback"];
|
|
48
|
+
this.conversationConfigurationId = payload["conversationConfigurationId"];
|
|
49
|
+
this.participantDefaults = payload["participantDefaults"];
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
exports.VoiceV3TranscriptionResolvedConfiguration = VoiceV3TranscriptionResolvedConfiguration;
|
|
53
|
+
class VoiceV3TranscriptionResolvedConfigurationParticipantDefaults {
|
|
54
|
+
constructor(payload) {
|
|
55
|
+
this.audioChannelIndex = payload["audioChannelIndex"];
|
|
56
|
+
this.type = payload["type"];
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
exports.VoiceV3TranscriptionResolvedConfigurationParticipantDefaults = VoiceV3TranscriptionResolvedConfigurationParticipantDefaults;
|
|
60
|
+
class VoiceV3TranscriptionTranscription {
|
|
61
|
+
constructor(payload) {
|
|
62
|
+
this.id = payload["id"];
|
|
63
|
+
this.accountId = payload["accountId"];
|
|
64
|
+
this.status = payload["status"];
|
|
65
|
+
this.transcriptionConfigurationId = payload["transcriptionConfigurationId"];
|
|
66
|
+
this.mediaUrl = payload["mediaUrl"];
|
|
67
|
+
this.sourceId = payload["sourceId"];
|
|
68
|
+
this.audioStartedAt = payload["audioStartedAt"];
|
|
69
|
+
this.conversationId = payload["conversationId"];
|
|
70
|
+
this.participants = payload["participants"];
|
|
71
|
+
this.duration = payload["duration"];
|
|
72
|
+
this.resolvedConfiguration = payload["resolvedConfiguration"];
|
|
73
|
+
this.createdAt = payload["createdAt"];
|
|
74
|
+
this.updatedAt = payload["updatedAt"];
|
|
75
|
+
this.url = payload["url"];
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
exports.VoiceV3TranscriptionTranscription = VoiceV3TranscriptionTranscription;
|
|
79
|
+
class VoiceV3TranscriptionTranscriptionStatusCallback {
|
|
80
|
+
constructor(payload) {
|
|
81
|
+
this.url = payload["url"];
|
|
82
|
+
this.method = payload["method"];
|
|
83
|
+
this.events = payload["events"];
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
exports.VoiceV3TranscriptionTranscriptionStatusCallback = VoiceV3TranscriptionTranscriptionStatusCallback;
|
|
87
|
+
class TranscriptionContextImpl {
|
|
88
|
+
constructor(_version, transcriptionId) {
|
|
89
|
+
this._version = _version;
|
|
90
|
+
if (!(0, utility_1.isValidPathParam)(transcriptionId)) {
|
|
91
|
+
throw new Error("Parameter 'transcriptionId' is not valid.");
|
|
92
|
+
}
|
|
93
|
+
this._solution = { transcriptionId };
|
|
94
|
+
this._uri = `/Transcriptions/${transcriptionId}`;
|
|
95
|
+
}
|
|
96
|
+
fetch(callback) {
|
|
97
|
+
const headers = {};
|
|
98
|
+
headers["Accept"] = "application/json";
|
|
99
|
+
const instance = this;
|
|
100
|
+
let operationVersion = instance._version, operationPromise = operationVersion.fetch({
|
|
101
|
+
uri: instance._uri,
|
|
102
|
+
method: "get",
|
|
103
|
+
headers,
|
|
104
|
+
});
|
|
105
|
+
operationPromise = operationPromise.then((payload) => new TranscriptionInstance(operationVersion, payload, instance._solution.transcriptionId));
|
|
106
|
+
operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
|
|
107
|
+
return operationPromise;
|
|
108
|
+
}
|
|
109
|
+
fetchWithHttpInfo(callback) {
|
|
110
|
+
const headers = {};
|
|
111
|
+
headers["Accept"] = "application/json";
|
|
112
|
+
const instance = this;
|
|
113
|
+
let operationVersion = instance._version;
|
|
114
|
+
// CREATE, FETCH, UPDATE operations
|
|
115
|
+
let operationPromise = operationVersion
|
|
116
|
+
.fetchWithResponseInfo({
|
|
117
|
+
uri: instance._uri,
|
|
118
|
+
method: "get",
|
|
119
|
+
headers,
|
|
120
|
+
})
|
|
121
|
+
.then((response) => ({
|
|
122
|
+
...response,
|
|
123
|
+
body: new TranscriptionInstance(operationVersion, response.body, instance._solution.transcriptionId),
|
|
124
|
+
}));
|
|
125
|
+
operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
|
|
126
|
+
return operationPromise;
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Provide a user-friendly representation
|
|
130
|
+
*
|
|
131
|
+
* @returns Object
|
|
132
|
+
*/
|
|
133
|
+
toJSON() {
|
|
134
|
+
return this._solution;
|
|
135
|
+
}
|
|
136
|
+
[util_1.inspect.custom](_depth, options) {
|
|
137
|
+
return (0, util_1.inspect)(this.toJSON(), options);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
exports.TranscriptionContextImpl = TranscriptionContextImpl;
|
|
141
|
+
/**
|
|
142
|
+
* Response envelope for long-running operations (202 Accepted pattern). Returned immediately on acceptance and on each status poll. Extensible to allow additional fields in future versions.
|
|
143
|
+
*/
|
|
144
|
+
class TranscriptionInstance {
|
|
145
|
+
constructor(_version, _payload, transcriptionId) {
|
|
146
|
+
this._version = _version;
|
|
147
|
+
const payload = _payload;
|
|
148
|
+
this.status = payload.status;
|
|
149
|
+
this.statusUrl = payload.statusUrl;
|
|
150
|
+
this.transcription =
|
|
151
|
+
payload.transcription !== null && payload.transcription !== undefined
|
|
152
|
+
? new VoiceV3TranscriptionTranscription(payload.transcription)
|
|
153
|
+
: null;
|
|
154
|
+
this.operationId = payload.operationId;
|
|
155
|
+
this._solution = { transcriptionId: transcriptionId };
|
|
156
|
+
}
|
|
157
|
+
get _proxy() {
|
|
158
|
+
this._context =
|
|
159
|
+
this._context ||
|
|
160
|
+
new TranscriptionContextImpl(this._version, this._solution.transcriptionId);
|
|
161
|
+
return this._context;
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Fetch a TranscriptionInstance
|
|
165
|
+
*
|
|
166
|
+
* @param callback - Callback to handle processed record
|
|
167
|
+
*
|
|
168
|
+
* @returns Resolves to processed TranscriptionInstance
|
|
169
|
+
*/
|
|
170
|
+
fetch(callback) {
|
|
171
|
+
return this._proxy.fetch(callback);
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* Fetch a TranscriptionInstance and return HTTP info
|
|
175
|
+
*
|
|
176
|
+
* @param callback - Callback to handle processed record
|
|
177
|
+
*
|
|
178
|
+
* @returns Resolves to processed TranscriptionInstance with HTTP metadata
|
|
179
|
+
*/
|
|
180
|
+
fetchWithHttpInfo(callback) {
|
|
181
|
+
return this._proxy.fetchWithHttpInfo(callback);
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Provide a user-friendly representation
|
|
185
|
+
*
|
|
186
|
+
* @returns Object
|
|
187
|
+
*/
|
|
188
|
+
toJSON() {
|
|
189
|
+
return {
|
|
190
|
+
status: this.status,
|
|
191
|
+
statusUrl: this.statusUrl,
|
|
192
|
+
transcription: this.transcription,
|
|
193
|
+
operationId: this.operationId,
|
|
194
|
+
};
|
|
195
|
+
}
|
|
196
|
+
[util_1.inspect.custom](_depth, options) {
|
|
197
|
+
return (0, util_1.inspect)(this.toJSON(), options);
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
exports.TranscriptionInstance = TranscriptionInstance;
|
|
201
|
+
function TranscriptionListInstance(version) {
|
|
202
|
+
const instance = ((transcriptionId) => instance.get(transcriptionId));
|
|
203
|
+
instance.get = function get(transcriptionId) {
|
|
204
|
+
return new TranscriptionContextImpl(version, transcriptionId);
|
|
205
|
+
};
|
|
206
|
+
instance._version = version;
|
|
207
|
+
instance._solution = {};
|
|
208
|
+
instance._uri = `/Transcriptions`;
|
|
209
|
+
instance.create = function create(params, headers, callback) {
|
|
210
|
+
if (params === null || params === undefined) {
|
|
211
|
+
throw new Error('Required parameter "params" missing.');
|
|
212
|
+
}
|
|
213
|
+
let data = {};
|
|
214
|
+
data = params;
|
|
215
|
+
if (headers === null || headers === undefined) {
|
|
216
|
+
headers = {};
|
|
217
|
+
}
|
|
218
|
+
headers["Content-Type"] = "application/json";
|
|
219
|
+
headers["Accept"] = "application/json";
|
|
220
|
+
let operationVersion = version, operationPromise = operationVersion.create({
|
|
221
|
+
uri: instance._uri,
|
|
222
|
+
method: "post",
|
|
223
|
+
data,
|
|
224
|
+
headers,
|
|
225
|
+
});
|
|
226
|
+
operationPromise = operationPromise.then((payload) => new TranscriptionInstance(operationVersion, payload));
|
|
227
|
+
operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
|
|
228
|
+
return operationPromise;
|
|
229
|
+
};
|
|
230
|
+
instance.createWithHttpInfo = function createWithHttpInfo(params, headers, callback) {
|
|
231
|
+
if (params === null || params === undefined) {
|
|
232
|
+
throw new Error('Required parameter "params" missing.');
|
|
233
|
+
}
|
|
234
|
+
let data = {};
|
|
235
|
+
data = params;
|
|
236
|
+
if (headers === null || headers === undefined) {
|
|
237
|
+
headers = {};
|
|
238
|
+
}
|
|
239
|
+
headers["Content-Type"] = "application/json";
|
|
240
|
+
headers["Accept"] = "application/json";
|
|
241
|
+
let operationVersion = version;
|
|
242
|
+
// CREATE, FETCH, UPDATE operations
|
|
243
|
+
let operationPromise = operationVersion
|
|
244
|
+
.createWithResponseInfo({
|
|
245
|
+
uri: instance._uri,
|
|
246
|
+
method: "post",
|
|
247
|
+
data,
|
|
248
|
+
headers,
|
|
249
|
+
})
|
|
250
|
+
.then((response) => ({
|
|
251
|
+
...response,
|
|
252
|
+
body: new TranscriptionInstance(operationVersion, response.body),
|
|
253
|
+
}));
|
|
254
|
+
operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
|
|
255
|
+
return operationPromise;
|
|
256
|
+
};
|
|
257
|
+
instance.toJSON = function toJSON() {
|
|
258
|
+
return instance._solution;
|
|
259
|
+
};
|
|
260
|
+
instance[util_1.inspect.custom] = function inspectImpl(_depth, options) {
|
|
261
|
+
return (0, util_1.inspect)(instance.toJSON(), options);
|
|
262
|
+
};
|
|
263
|
+
return instance;
|
|
264
|
+
}
|
|
@@ -248,6 +248,8 @@ declare namespace VoiceResponse {
|
|
|
248
248
|
method?: string;
|
|
249
249
|
/** record - Record the call */
|
|
250
250
|
record?: DialRecord;
|
|
251
|
+
/** recordingConfigurationId - Configuration for the recording */
|
|
252
|
+
recordingConfigurationId?: string;
|
|
251
253
|
/** recordingStatusCallback - Recording status callback URL */
|
|
252
254
|
recordingStatusCallback?: string;
|
|
253
255
|
/** recordingStatusCallbackEvent - Recording status callback events */
|
|
@@ -372,6 +374,8 @@ declare namespace VoiceResponse {
|
|
|
372
374
|
method?: string;
|
|
373
375
|
/** playBeep - Play beep */
|
|
374
376
|
playBeep?: boolean;
|
|
377
|
+
/** recordingConfigurationId - Configuration for the recording */
|
|
378
|
+
recordingConfigurationId?: string;
|
|
375
379
|
/** recordingStatusCallback - Status callback URL */
|
|
376
380
|
recordingStatusCallback?: string;
|
|
377
381
|
/** recordingStatusCallbackEvent - Recording status callback events */
|
|
@@ -673,6 +677,8 @@ declare namespace VoiceResponse {
|
|
|
673
677
|
export interface RecordingAttributes {
|
|
674
678
|
/** channels - The recording channels for the final recording */
|
|
675
679
|
channels?: RecordingChannels;
|
|
680
|
+
/** recordingConfigurationId - Configuration for the recording */
|
|
681
|
+
recordingConfigurationId?: string;
|
|
676
682
|
/** recordingStatusCallback - Recording Status Callback URL */
|
|
677
683
|
recordingStatusCallback?: string;
|
|
678
684
|
/** recordingStatusCallbackEvent - Recording Status Callback Events */
|
|
@@ -1274,6 +1280,8 @@ declare namespace VoiceResponse {
|
|
|
1274
1280
|
participantLabel?: string;
|
|
1275
1281
|
/** record - Record the conference */
|
|
1276
1282
|
record?: ConferenceRecord;
|
|
1283
|
+
/** recordingConfigurationId - Configuration for the recording */
|
|
1284
|
+
recordingConfigurationId?: string;
|
|
1277
1285
|
/** recordingStatusCallback - Recording status callback URL */
|
|
1278
1286
|
recordingStatusCallback?: string;
|
|
1279
1287
|
/** recordingStatusCallbackEvent - Recording status callback events */
|
|
@@ -1526,14 +1534,22 @@ declare namespace VoiceResponse {
|
|
|
1526
1534
|
* Attributes to pass to conversationRelay
|
|
1527
1535
|
*/
|
|
1528
1536
|
export interface ConversationRelayAttributes {
|
|
1537
|
+
/** backgroundnoisereduction - This parameters enables background noise filtering on the audio stream before it reaches the STT engine, improving transcription accuracy in noisy environments */
|
|
1538
|
+
backgroundnoisereduction?: string;
|
|
1529
1539
|
/** debug - Multiple debug options to be used for troubleshooting */
|
|
1530
1540
|
debug?: string;
|
|
1541
|
+
/** deepgramsmartformat - This parameter enables Deepgram's smart formatting feature, which automatically applies punctuation, capitalization, and formatting (e.g. numbers, dates, currency) to transcripts */
|
|
1542
|
+
deepgramsmartformat?: string;
|
|
1531
1543
|
/** dtmfDetection - Whether DTMF tones should be detected and reported in speech transcription */
|
|
1532
1544
|
dtmfDetection?: boolean;
|
|
1533
1545
|
/** elevenlabsTextNormalization - When using ElevenLabs as TTS provider, this parameter allows you to enable or disable its text normalization feature */
|
|
1534
1546
|
elevenlabsTextNormalization?: string;
|
|
1547
|
+
/** events - This parameter allows you to enable event subscriptions */
|
|
1548
|
+
events?: string;
|
|
1535
1549
|
/** hints - Phrases to help better accuracy in speech recognition of these pharases */
|
|
1536
1550
|
hints?: string;
|
|
1551
|
+
/** ignorebackchannel - This parameter brief caller acknowledgments (e.g. "yeah", "uh-huh") are ignored and will not interrupt the agent while it is speaking. */
|
|
1552
|
+
ignorebackchannel?: string;
|
|
1537
1553
|
/** intelligenceService - The Conversational Intelligence Service id or unique name to be used for the session */
|
|
1538
1554
|
intelligenceService?: string;
|
|
1539
1555
|
/** interruptSensitivity - Set the sensitivity of the interrupt feature for speech. The value can be low, medium, or high */
|
|
@@ -1552,6 +1568,8 @@ declare namespace VoiceResponse {
|
|
|
1552
1568
|
reportInputDuringAgentSpeech?: boolean;
|
|
1553
1569
|
/** speechModel - Speech model to be used for transcription */
|
|
1554
1570
|
speechModel?: string;
|
|
1571
|
+
/** speechtimeout - Set the duration of silence that indicates the end of speech */
|
|
1572
|
+
speechtimeout?: string;
|
|
1555
1573
|
/** transcriptionLanguage - Language to be used for transcription */
|
|
1556
1574
|
transcriptionLanguage?: string;
|
|
1557
1575
|
/** transcriptionProvider - Provider to be used for transcription */
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "twilio",
|
|
3
3
|
"description": "A Twilio helper library",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "6.0.1",
|
|
5
5
|
"author": "API Team <api@twilio.com>",
|
|
6
6
|
"contributors": [
|
|
7
7
|
{
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"main": "./lib",
|
|
72
72
|
"types": "./index.d.ts",
|
|
73
73
|
"engines": {
|
|
74
|
-
"node": ">=
|
|
74
|
+
"node": ">=20.0.0"
|
|
75
75
|
},
|
|
76
76
|
"license": "MIT"
|
|
77
77
|
}
|
|
@@ -1,165 +0,0 @@
|
|
|
1
|
-
import { inspect, InspectOptions } from "util";
|
|
2
|
-
import V1 from "../V1";
|
|
3
|
-
import { ApiResponse } from "../../../base/ApiResponse";
|
|
4
|
-
export declare class CreateInstanceRequestBody {
|
|
5
|
-
"conversation"?: CreateInstanceRequestBodyConversation;
|
|
6
|
-
constructor(payload: any);
|
|
7
|
-
}
|
|
8
|
-
export declare class CreateInstanceRequestBodyConversation {
|
|
9
|
-
/**
|
|
10
|
-
* Set newly created conversation service as the default conversation service
|
|
11
|
-
*/
|
|
12
|
-
"_default"?: boolean;
|
|
13
|
-
constructor(payload: any);
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Options to pass to create a CreateFlexInstanceInstance
|
|
17
|
-
*/
|
|
18
|
-
export interface CreateFlexInstanceContextCreateOptions {
|
|
19
|
-
/** */
|
|
20
|
-
createInstanceRequestBody?: CreateInstanceRequestBody;
|
|
21
|
-
}
|
|
22
|
-
export interface CreateFlexInstanceContext {
|
|
23
|
-
/**
|
|
24
|
-
* Create a CreateFlexInstanceInstance
|
|
25
|
-
*
|
|
26
|
-
* @param callback - Callback to handle processed record
|
|
27
|
-
*
|
|
28
|
-
* @returns Resolves to processed CreateFlexInstanceInstance
|
|
29
|
-
*/
|
|
30
|
-
create(callback?: (error: Error | null, item?: CreateFlexInstanceInstance) => any): Promise<CreateFlexInstanceInstance>;
|
|
31
|
-
/**
|
|
32
|
-
* Create a CreateFlexInstanceInstance
|
|
33
|
-
*
|
|
34
|
-
* @param params - Body for request
|
|
35
|
-
* @param headers - header params for request
|
|
36
|
-
* @param callback - Callback to handle processed record
|
|
37
|
-
*
|
|
38
|
-
* @returns Resolves to processed CreateFlexInstanceInstance
|
|
39
|
-
*/
|
|
40
|
-
create(params: CreateInstanceRequestBody, headers?: any, callback?: (error: Error | null, item?: CreateFlexInstanceInstance) => any): Promise<CreateFlexInstanceInstance>;
|
|
41
|
-
/**
|
|
42
|
-
* Create a CreateFlexInstanceInstance and return HTTP info
|
|
43
|
-
*
|
|
44
|
-
* @param callback - Callback to handle processed record
|
|
45
|
-
*
|
|
46
|
-
* @returns Resolves to processed CreateFlexInstanceInstance with HTTP metadata
|
|
47
|
-
*/
|
|
48
|
-
createWithHttpInfo(callback?: (error: Error | null, item?: ApiResponse<CreateFlexInstanceInstance>) => any): Promise<ApiResponse<CreateFlexInstanceInstance>>;
|
|
49
|
-
/**
|
|
50
|
-
* Create a CreateFlexInstanceInstance and return HTTP info
|
|
51
|
-
*
|
|
52
|
-
* @param params - Body for request
|
|
53
|
-
* @param headers - header params for request
|
|
54
|
-
* @param callback - Callback to handle processed record
|
|
55
|
-
*
|
|
56
|
-
* @returns Resolves to processed CreateFlexInstanceInstance with HTTP metadata
|
|
57
|
-
*/
|
|
58
|
-
createWithHttpInfo(params: CreateInstanceRequestBody, headers?: any, callback?: (error: Error | null, item?: ApiResponse<CreateFlexInstanceInstance>) => any): Promise<ApiResponse<CreateFlexInstanceInstance>>;
|
|
59
|
-
/**
|
|
60
|
-
* Provide a user-friendly representation
|
|
61
|
-
*/
|
|
62
|
-
toJSON(): any;
|
|
63
|
-
[inspect.custom](_depth: any, options: InspectOptions): any;
|
|
64
|
-
}
|
|
65
|
-
export interface CreateFlexInstanceContextSolution {
|
|
66
|
-
}
|
|
67
|
-
export declare class CreateFlexInstanceContextImpl implements CreateFlexInstanceContext {
|
|
68
|
-
protected _version: V1;
|
|
69
|
-
protected _solution: CreateFlexInstanceContextSolution;
|
|
70
|
-
protected _uri: string;
|
|
71
|
-
constructor(_version: V1);
|
|
72
|
-
create(params?: CreateInstanceRequestBody | ((error: Error | null, item?: CreateFlexInstanceInstance) => any), headers?: any, callback?: (error: Error | null, item?: CreateFlexInstanceInstance) => any): Promise<CreateFlexInstanceInstance>;
|
|
73
|
-
createWithHttpInfo(params?: CreateInstanceRequestBody | ((error: Error | null, item?: ApiResponse<CreateFlexInstanceInstance>) => any), headers?: any, callback?: (error: Error | null, item?: ApiResponse<CreateFlexInstanceInstance>) => any): Promise<ApiResponse<CreateFlexInstanceInstance>>;
|
|
74
|
-
/**
|
|
75
|
-
* Provide a user-friendly representation
|
|
76
|
-
*
|
|
77
|
-
* @returns Object
|
|
78
|
-
*/
|
|
79
|
-
toJSON(): CreateFlexInstanceContextSolution;
|
|
80
|
-
[inspect.custom](_depth: any, options: InspectOptions): string;
|
|
81
|
-
}
|
|
82
|
-
interface CreateFlexInstanceResource {
|
|
83
|
-
flex_instance_sid: string;
|
|
84
|
-
account_sid: string;
|
|
85
|
-
status: string;
|
|
86
|
-
date_created: Date;
|
|
87
|
-
date_updated: Date;
|
|
88
|
-
}
|
|
89
|
-
export declare class CreateFlexInstanceInstance {
|
|
90
|
-
protected _version: V1;
|
|
91
|
-
protected _solution: CreateFlexInstanceContextSolution;
|
|
92
|
-
protected _context?: CreateFlexInstanceContext;
|
|
93
|
-
constructor(_version: V1, payload: CreateFlexInstanceResource);
|
|
94
|
-
flexInstanceSid: string;
|
|
95
|
-
accountSid: string;
|
|
96
|
-
status: string;
|
|
97
|
-
dateCreated: Date;
|
|
98
|
-
dateUpdated: Date;
|
|
99
|
-
private get _proxy();
|
|
100
|
-
/**
|
|
101
|
-
* Create a CreateFlexInstanceInstance
|
|
102
|
-
*
|
|
103
|
-
* @param callback - Callback to handle processed record
|
|
104
|
-
*
|
|
105
|
-
* @returns Resolves to processed CreateFlexInstanceInstance
|
|
106
|
-
*/
|
|
107
|
-
create(callback?: (error: Error | null, item?: CreateFlexInstanceInstance) => any): Promise<CreateFlexInstanceInstance>;
|
|
108
|
-
/**
|
|
109
|
-
* Create a CreateFlexInstanceInstance
|
|
110
|
-
*
|
|
111
|
-
* @param params - Body for request
|
|
112
|
-
* @param headers - header params for request
|
|
113
|
-
* @param callback - Callback to handle processed record
|
|
114
|
-
*
|
|
115
|
-
* @returns Resolves to processed CreateFlexInstanceInstance
|
|
116
|
-
*/
|
|
117
|
-
create(params: CreateInstanceRequestBody, headers?: any, callback?: (error: Error | null, item?: CreateFlexInstanceInstance) => any): Promise<CreateFlexInstanceInstance>;
|
|
118
|
-
/**
|
|
119
|
-
* Create a CreateFlexInstanceInstance and return HTTP info
|
|
120
|
-
*
|
|
121
|
-
* @param callback - Callback to handle processed record
|
|
122
|
-
*
|
|
123
|
-
* @returns Resolves to processed CreateFlexInstanceInstance with HTTP metadata
|
|
124
|
-
*/
|
|
125
|
-
createWithHttpInfo(callback?: (error: Error | null, item?: ApiResponse<CreateFlexInstanceInstance>) => any): Promise<ApiResponse<CreateFlexInstanceInstance>>;
|
|
126
|
-
/**
|
|
127
|
-
* Create a CreateFlexInstanceInstance and return HTTP info
|
|
128
|
-
*
|
|
129
|
-
* @param params - Body for request
|
|
130
|
-
* @param headers - header params for request
|
|
131
|
-
* @param callback - Callback to handle processed record
|
|
132
|
-
*
|
|
133
|
-
* @returns Resolves to processed CreateFlexInstanceInstance with HTTP metadata
|
|
134
|
-
*/
|
|
135
|
-
createWithHttpInfo(params: CreateInstanceRequestBody, headers?: any, callback?: (error: Error | null, item?: ApiResponse<CreateFlexInstanceInstance>) => any): Promise<ApiResponse<CreateFlexInstanceInstance>>;
|
|
136
|
-
/**
|
|
137
|
-
* Provide a user-friendly representation
|
|
138
|
-
*
|
|
139
|
-
* @returns Object
|
|
140
|
-
*/
|
|
141
|
-
toJSON(): {
|
|
142
|
-
flexInstanceSid: string;
|
|
143
|
-
accountSid: string;
|
|
144
|
-
status: string;
|
|
145
|
-
dateCreated: Date;
|
|
146
|
-
dateUpdated: Date;
|
|
147
|
-
};
|
|
148
|
-
[inspect.custom](_depth: any, options: InspectOptions): string;
|
|
149
|
-
}
|
|
150
|
-
export interface CreateFlexInstanceSolution {
|
|
151
|
-
}
|
|
152
|
-
export interface CreateFlexInstanceListInstance {
|
|
153
|
-
_version: V1;
|
|
154
|
-
_solution: CreateFlexInstanceSolution;
|
|
155
|
-
_uri: string;
|
|
156
|
-
(): CreateFlexInstanceContext;
|
|
157
|
-
get(): CreateFlexInstanceContext;
|
|
158
|
-
/**
|
|
159
|
-
* Provide a user-friendly representation
|
|
160
|
-
*/
|
|
161
|
-
toJSON(): any;
|
|
162
|
-
[inspect.custom](_depth: any, options: InspectOptions): any;
|
|
163
|
-
}
|
|
164
|
-
export declare function CreateFlexInstanceListInstance(version: V1): CreateFlexInstanceListInstance;
|
|
165
|
-
export {};
|