@wildix/wilma-voice-client 0.0.34 → 0.0.36
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/dist-cjs/models/enums.js +1 -5
- package/dist-cjs/schemas/schemas_0.js +4 -5
- package/dist-es/models/enums.js +0 -4
- package/dist-es/schemas/schemas_0.js +4 -5
- package/dist-types/commands/DescribeVoiceProtocolCommand.d.ts +1 -1
- package/dist-types/commands/StreamCallEventsCommand.d.ts +1 -4
- package/dist-types/models/enums.d.ts +0 -12
- package/dist-types/models/models_0.d.ts +70 -8
- package/package.json +1 -1
package/dist-cjs/models/enums.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.VoiceCommandType = exports.VoiceInputMode = exports.VoiceAudioEncoding = exports.VoiceCallToolPhase = exports.VoiceCallEndReason = exports.VoiceControlAction = exports.VoiceEventType = exports.VoicePronunciationEncoding = void 0;
|
|
4
4
|
exports.VoicePronunciationEncoding = {
|
|
5
5
|
ALIAS: "alias",
|
|
6
6
|
IPA: "ipa",
|
|
@@ -51,7 +51,3 @@ exports.VoiceCommandType = {
|
|
|
51
51
|
STOP: "stop",
|
|
52
52
|
TRANSFER: "transfer",
|
|
53
53
|
};
|
|
54
|
-
exports.VoiceCallEventInclude = {
|
|
55
|
-
COMMANDS: "commands",
|
|
56
|
-
TOOLS: "tools",
|
|
57
|
-
};
|
|
@@ -145,7 +145,6 @@ const _iM = "initialMessage";
|
|
|
145
145
|
const _iMn = "inputMode";
|
|
146
146
|
const _iWE = "interruptionWebsocketEvent";
|
|
147
147
|
const _in = "interruptible";
|
|
148
|
-
const _inc = "include";
|
|
149
148
|
const _int = "interruption";
|
|
150
149
|
const _l = "language";
|
|
151
150
|
const _la = "languages";
|
|
@@ -185,6 +184,7 @@ const _sp = "speech";
|
|
|
185
184
|
const _st = "streaming";
|
|
186
185
|
const _sta = "started";
|
|
187
186
|
const _t = "type";
|
|
187
|
+
const _tCI = "toolCallId";
|
|
188
188
|
const _tI = "traceId";
|
|
189
189
|
const _tN = "toolName";
|
|
190
190
|
const _tWC = "transferWebsocketCommand";
|
|
@@ -449,8 +449,8 @@ exports.StopWebsocketCommand$ = [3, n1, _SWCt,
|
|
|
449
449
|
];
|
|
450
450
|
exports.StreamCallEventsInput$ = [3, n1, _SCEI,
|
|
451
451
|
0,
|
|
452
|
-
[_cI, _compa
|
|
453
|
-
[[0, 1], [0, { [_hQ]: _compa }]
|
|
452
|
+
[_cI, _compa],
|
|
453
|
+
[[0, 1], [0, { [_hQ]: _compa }]], 1
|
|
454
454
|
];
|
|
455
455
|
exports.StreamCallEventsOutput$ = [3, n1, _SCEO,
|
|
456
456
|
0,
|
|
@@ -539,7 +539,7 @@ exports.VoiceCallStartedEvent$ = [3, n1, _VCSEo,
|
|
|
539
539
|
];
|
|
540
540
|
exports.VoiceCallToolEvent$ = [3, n1, _VCTE,
|
|
541
541
|
0,
|
|
542
|
-
[
|
|
542
|
+
[_tCI, _tN, _ph, _sM],
|
|
543
543
|
[0, 0, 0, 0], 3
|
|
544
544
|
];
|
|
545
545
|
exports.VoiceCallTranscriptionEvent$ = [3, n1, _VCTEo,
|
|
@@ -566,7 +566,6 @@ var LanguageCodeList = 64 | 0;
|
|
|
566
566
|
var VoicePronunciationList = [1, n2, _VPL,
|
|
567
567
|
0, () => exports.VoicePronunciation$
|
|
568
568
|
];
|
|
569
|
-
var VoiceCallEventIncludeList = 64 | 0;
|
|
570
569
|
var VoiceList = [1, n1, _VL,
|
|
571
570
|
0, () => exports.Voice$
|
|
572
571
|
];
|
package/dist-es/models/enums.js
CHANGED
|
@@ -141,7 +141,6 @@ const _iM = "initialMessage";
|
|
|
141
141
|
const _iMn = "inputMode";
|
|
142
142
|
const _iWE = "interruptionWebsocketEvent";
|
|
143
143
|
const _in = "interruptible";
|
|
144
|
-
const _inc = "include";
|
|
145
144
|
const _int = "interruption";
|
|
146
145
|
const _l = "language";
|
|
147
146
|
const _la = "languages";
|
|
@@ -181,6 +180,7 @@ const _sp = "speech";
|
|
|
181
180
|
const _st = "streaming";
|
|
182
181
|
const _sta = "started";
|
|
183
182
|
const _t = "type";
|
|
183
|
+
const _tCI = "toolCallId";
|
|
184
184
|
const _tI = "traceId";
|
|
185
185
|
const _tN = "toolName";
|
|
186
186
|
const _tWC = "transferWebsocketCommand";
|
|
@@ -445,8 +445,8 @@ export var StopWebsocketCommand$ = [3, n1, _SWCt,
|
|
|
445
445
|
];
|
|
446
446
|
export var StreamCallEventsInput$ = [3, n1, _SCEI,
|
|
447
447
|
0,
|
|
448
|
-
[_cI, _compa
|
|
449
|
-
[[0, 1], [0, { [_hQ]: _compa }]
|
|
448
|
+
[_cI, _compa],
|
|
449
|
+
[[0, 1], [0, { [_hQ]: _compa }]], 1
|
|
450
450
|
];
|
|
451
451
|
export var StreamCallEventsOutput$ = [3, n1, _SCEO,
|
|
452
452
|
0,
|
|
@@ -535,7 +535,7 @@ export var VoiceCallStartedEvent$ = [3, n1, _VCSEo,
|
|
|
535
535
|
];
|
|
536
536
|
export var VoiceCallToolEvent$ = [3, n1, _VCTE,
|
|
537
537
|
0,
|
|
538
|
-
[
|
|
538
|
+
[_tCI, _tN, _ph, _sM],
|
|
539
539
|
[0, 0, 0, 0], 3
|
|
540
540
|
];
|
|
541
541
|
export var VoiceCallTranscriptionEvent$ = [3, n1, _VCTEo,
|
|
@@ -562,7 +562,6 @@ var LanguageCodeList = 64 | 0;
|
|
|
562
562
|
var VoicePronunciationList = [1, n2, _VPL,
|
|
563
563
|
0, () => VoicePronunciation$
|
|
564
564
|
];
|
|
565
|
-
var VoiceCallEventIncludeList = 64 | 0;
|
|
566
565
|
var VoiceList = [1, n1, _VL,
|
|
567
566
|
0, () => Voice$
|
|
568
567
|
];
|
|
@@ -292,7 +292,7 @@ declare const DescribeVoiceProtocolCommand_base: {
|
|
|
292
292
|
* // reason: "STRING_VALUE", // required
|
|
293
293
|
* // },
|
|
294
294
|
* // tool: { // VoiceCallToolEvent
|
|
295
|
-
* //
|
|
295
|
+
* // toolCallId: "STRING_VALUE", // required
|
|
296
296
|
* // toolName: "STRING_VALUE", // required
|
|
297
297
|
* // phase: "started" || "finished", // required
|
|
298
298
|
* // startMessage: "STRING_VALUE",
|
|
@@ -28,7 +28,7 @@ declare const StreamCallEventsCommand_base: {
|
|
|
28
28
|
getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
|
|
29
29
|
};
|
|
30
30
|
/**
|
|
31
|
-
* Tails a live call's events as Server-Sent Events (`text/event-stream`): the caller's recognised speech, the agent's spoken sentences, playback, interruptions, language switches and the session lifecycle. Live only — nothing before the subscription is replayed, and the stream is not a record of the call (the session trace is). Ends after an `ended` event whose reason is not `transfer`; after a transfer it stays open briefly for the next session of the same call. `
|
|
31
|
+
* Tails a live call's events as Server-Sent Events (`text/event-stream`): the caller's recognised speech, the agent's spoken sentences, playback, interruptions, language switches and the session lifecycle. Live only — nothing before the subscription is replayed, and the stream is not a record of the call (the session trace is). Ends after an `ended` event whose reason is not `transfer`; after a transfer it stays open briefly for the next session of the same call. What the stream carries is decided HERE, by who is asking, and is not a request parameter: a caller signed in to the system receives everything, including the agent's own commands (`reply`, `say`, `playback`, `interruption`) and its tool calls, and chooses for itself what to show; a guest receives the transcript alone (`started`, `transcription`, `agentTranscription`, `language`, `ended`).
|
|
32
32
|
* @example
|
|
33
33
|
* Use a bare-bones client and the command you need to make an API call.
|
|
34
34
|
* ```javascript
|
|
@@ -40,9 +40,6 @@ declare const StreamCallEventsCommand_base: {
|
|
|
40
40
|
* const input = { // StreamCallEventsInput
|
|
41
41
|
* callId: "STRING_VALUE", // required
|
|
42
42
|
* company: "STRING_VALUE",
|
|
43
|
-
* include: [ // VoiceCallEventIncludeList
|
|
44
|
-
* "commands" || "tools",
|
|
45
|
-
* ],
|
|
46
43
|
* };
|
|
47
44
|
* const command = new StreamCallEventsCommand(input);
|
|
48
45
|
* const response = await client.send(command);
|
|
@@ -145,15 +145,3 @@ export declare const VoiceCommandType: {
|
|
|
145
145
|
* @public
|
|
146
146
|
*/
|
|
147
147
|
export type VoiceCommandType = (typeof VoiceCommandType)[keyof typeof VoiceCommandType];
|
|
148
|
-
/**
|
|
149
|
-
* @public
|
|
150
|
-
* @enum
|
|
151
|
-
*/
|
|
152
|
-
export declare const VoiceCallEventInclude: {
|
|
153
|
-
readonly COMMANDS: "commands";
|
|
154
|
-
readonly TOOLS: "tools";
|
|
155
|
-
};
|
|
156
|
-
/**
|
|
157
|
-
* @public
|
|
158
|
-
*/
|
|
159
|
-
export type VoiceCallEventInclude = (typeof VoiceCallEventInclude)[keyof typeof VoiceCallEventInclude];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { DocumentType as __DocumentType, StreamingBlobTypes } from "@smithy/types";
|
|
2
|
-
import type { VoiceAudioEncoding, VoiceCallEndReason,
|
|
2
|
+
import type { VoiceAudioEncoding, VoiceCallEndReason, VoiceCallToolPhase, VoiceCommandType, VoiceControlAction, VoiceEventType, VoiceInputMode, VoicePronunciationEncoding } from "./enums";
|
|
3
3
|
/**
|
|
4
4
|
* A pronunciation rule for one phrase. Belongs to a LANGUAGE, not to the agent: 'Wildix' is
|
|
5
5
|
* respelled differently for an Italian and a German voice, so one list shared ACROSS languages
|
|
@@ -46,7 +46,7 @@ export interface AgentTranscriptionEvent {
|
|
|
46
46
|
*/
|
|
47
47
|
confidence?: number | undefined;
|
|
48
48
|
/**
|
|
49
|
-
* True when this is the final transcript for the utterance rather than an interim hypothesis.
|
|
49
|
+
* True when this is the final transcript for the utterance rather than an interim hypothesis. An absent value is read as final, as on `TranscriptionEvent`.
|
|
50
50
|
* @public
|
|
51
51
|
*/
|
|
52
52
|
final?: boolean | undefined;
|
|
@@ -165,9 +165,20 @@ export interface DescribeVoiceProtocolInput {
|
|
|
165
165
|
* @public
|
|
166
166
|
*/
|
|
167
167
|
export interface VoiceCallAgentTranscriptionEvent {
|
|
168
|
+
/**
|
|
169
|
+
* Identifier of a transcription chunk within a session.
|
|
170
|
+
* @public
|
|
171
|
+
*/
|
|
168
172
|
id: string;
|
|
169
173
|
text: string;
|
|
170
174
|
final: boolean;
|
|
175
|
+
/**
|
|
176
|
+
* BCP-47 language tag, optionally with a region subtag: 'en', 'en-US', 'pt-BR'. Deliberately a
|
|
177
|
+
* constrained string rather than an enum: the offerable set is a property of the selected
|
|
178
|
+
* recogniser and changes with it, so an enumeration here would cap the set at whatever was known
|
|
179
|
+
* when the model was released.
|
|
180
|
+
* @public
|
|
181
|
+
*/
|
|
171
182
|
language?: string | undefined;
|
|
172
183
|
time?: number | undefined;
|
|
173
184
|
}
|
|
@@ -188,6 +199,10 @@ export interface VoiceCallEndedEvent {
|
|
|
188
199
|
* @public
|
|
189
200
|
*/
|
|
190
201
|
export interface VoiceCallInterruptionEvent {
|
|
202
|
+
/**
|
|
203
|
+
* Correlates a caller phrase, the agent reply it produced, and the playback/interruption of that reply.
|
|
204
|
+
* @public
|
|
205
|
+
*/
|
|
191
206
|
replyId?: string | undefined;
|
|
192
207
|
playedText?: string | undefined;
|
|
193
208
|
originalText?: string | undefined;
|
|
@@ -197,7 +212,21 @@ export interface VoiceCallInterruptionEvent {
|
|
|
197
212
|
* @public
|
|
198
213
|
*/
|
|
199
214
|
export interface VoiceCallLanguageEvent {
|
|
215
|
+
/**
|
|
216
|
+
* BCP-47 language tag, optionally with a region subtag: 'en', 'en-US', 'pt-BR'. Deliberately a
|
|
217
|
+
* constrained string rather than an enum: the offerable set is a property of the selected
|
|
218
|
+
* recogniser and changes with it, so an enumeration here would cap the set at whatever was known
|
|
219
|
+
* when the model was released.
|
|
220
|
+
* @public
|
|
221
|
+
*/
|
|
200
222
|
from?: string | undefined;
|
|
223
|
+
/**
|
|
224
|
+
* BCP-47 language tag, optionally with a region subtag: 'en', 'en-US', 'pt-BR'. Deliberately a
|
|
225
|
+
* constrained string rather than an enum: the offerable set is a property of the selected
|
|
226
|
+
* recogniser and changes with it, so an enumeration here would cap the set at whatever was known
|
|
227
|
+
* when the model was released.
|
|
228
|
+
* @public
|
|
229
|
+
*/
|
|
201
230
|
to: string;
|
|
202
231
|
reason: string;
|
|
203
232
|
}
|
|
@@ -206,6 +235,10 @@ export interface VoiceCallLanguageEvent {
|
|
|
206
235
|
* @public
|
|
207
236
|
*/
|
|
208
237
|
export interface VoiceCallPlaybackEvent {
|
|
238
|
+
/**
|
|
239
|
+
* Correlates a caller phrase, the agent reply it produced, and the playback/interruption of that reply.
|
|
240
|
+
* @public
|
|
241
|
+
*/
|
|
209
242
|
replyId: string;
|
|
210
243
|
complete: boolean;
|
|
211
244
|
}
|
|
@@ -214,8 +247,19 @@ export interface VoiceCallPlaybackEvent {
|
|
|
214
247
|
* @public
|
|
215
248
|
*/
|
|
216
249
|
export interface VoiceCallReplyEvent {
|
|
250
|
+
/**
|
|
251
|
+
* Correlates a caller phrase, the agent reply it produced, and the playback/interruption of that reply.
|
|
252
|
+
* @public
|
|
253
|
+
*/
|
|
217
254
|
id: string;
|
|
218
255
|
text: string;
|
|
256
|
+
/**
|
|
257
|
+
* BCP-47 language tag, optionally with a region subtag: 'en', 'en-US', 'pt-BR'. Deliberately a
|
|
258
|
+
* constrained string rather than an enum: the offerable set is a property of the selected
|
|
259
|
+
* recogniser and changes with it, so an enumeration here would cap the set at whatever was known
|
|
260
|
+
* when the model was released.
|
|
261
|
+
* @public
|
|
262
|
+
*/
|
|
219
263
|
language?: string | undefined;
|
|
220
264
|
}
|
|
221
265
|
/**
|
|
@@ -223,6 +267,10 @@ export interface VoiceCallReplyEvent {
|
|
|
223
267
|
* @public
|
|
224
268
|
*/
|
|
225
269
|
export interface VoiceCallSayEvent {
|
|
270
|
+
/**
|
|
271
|
+
* Correlates a caller phrase, the agent reply it produced, and the playback/interruption of that reply.
|
|
272
|
+
* @public
|
|
273
|
+
*/
|
|
226
274
|
replyId: string;
|
|
227
275
|
text: string;
|
|
228
276
|
interruptible: boolean;
|
|
@@ -261,11 +309,15 @@ export interface VoiceCallStartedEvent {
|
|
|
261
309
|
language?: string | undefined;
|
|
262
310
|
}
|
|
263
311
|
/**
|
|
264
|
-
* A tool call the agent made during a turn. Name and phase only — arguments and results live in the trace. Sent
|
|
312
|
+
* A tool call the agent made during a turn. Name and phase only — arguments and results live in the trace. Sent to a caller signed in to the system; never to a guest.
|
|
265
313
|
* @public
|
|
266
314
|
*/
|
|
267
315
|
export interface VoiceCallToolEvent {
|
|
268
|
-
|
|
316
|
+
/**
|
|
317
|
+
* Identifies the tool call inside the turn — the model's own call id, not the PBX call this stream follows.
|
|
318
|
+
* @public
|
|
319
|
+
*/
|
|
320
|
+
toolCallId: string;
|
|
269
321
|
toolName: string;
|
|
270
322
|
phase: VoiceCallToolPhase;
|
|
271
323
|
/**
|
|
@@ -279,9 +331,20 @@ export interface VoiceCallToolEvent {
|
|
|
279
331
|
* @public
|
|
280
332
|
*/
|
|
281
333
|
export interface VoiceCallTranscriptionEvent {
|
|
334
|
+
/**
|
|
335
|
+
* Identifier of a transcription chunk within a session.
|
|
336
|
+
* @public
|
|
337
|
+
*/
|
|
282
338
|
id: string;
|
|
283
339
|
text: string;
|
|
284
340
|
final: boolean;
|
|
341
|
+
/**
|
|
342
|
+
* BCP-47 language tag, optionally with a region subtag: 'en', 'en-US', 'pt-BR'. Deliberately a
|
|
343
|
+
* constrained string rather than an enum: the offerable set is a property of the selected
|
|
344
|
+
* recogniser and changes with it, so an enumeration here would cap the set at whatever was known
|
|
345
|
+
* when the model was released.
|
|
346
|
+
* @public
|
|
347
|
+
*/
|
|
285
348
|
language?: string | undefined;
|
|
286
349
|
/**
|
|
287
350
|
* Milliseconds since the call started, as the PBX stamps it.
|
|
@@ -290,7 +353,7 @@ export interface VoiceCallTranscriptionEvent {
|
|
|
290
353
|
time?: number | undefined;
|
|
291
354
|
}
|
|
292
355
|
/**
|
|
293
|
-
* One event on a live call. The SSE frame's `event:` is the member name and `data:` the member's
|
|
356
|
+
* One event on a live call. The SSE frame's `event:` is the member name and `data:` this whole union document, so a frame reads `data: \{"say": \{...\}\}` — never the member's payload on its own.
|
|
294
357
|
* @public
|
|
295
358
|
*/
|
|
296
359
|
export type VoiceCallEvent = VoiceCallEvent.AgentTranscriptionMember | VoiceCallEvent.EndedMember | VoiceCallEvent.InterruptionMember | VoiceCallEvent.LanguageMember | VoiceCallEvent.PlaybackMember | VoiceCallEvent.ReplyMember | VoiceCallEvent.SayMember | VoiceCallEvent.StartedMember | VoiceCallEvent.ToolMember | VoiceCallEvent.TranscriptionMember | VoiceCallEvent.$UnknownMember;
|
|
@@ -435,7 +498,7 @@ export declare namespace VoiceCallEvent {
|
|
|
435
498
|
$unknown?: never;
|
|
436
499
|
}
|
|
437
500
|
/**
|
|
438
|
-
* A tool call the agent made during a turn. Name and phase only — arguments and results live in the trace. Sent
|
|
501
|
+
* A tool call the agent made during a turn. Name and phase only — arguments and results live in the trace. Sent to a caller signed in to the system; never to a guest.
|
|
439
502
|
* @public
|
|
440
503
|
*/
|
|
441
504
|
interface ToolMember {
|
|
@@ -1068,7 +1131,7 @@ export interface TranscriptionEvent {
|
|
|
1068
1131
|
*/
|
|
1069
1132
|
confidence?: number | undefined;
|
|
1070
1133
|
/**
|
|
1071
|
-
* True when this is the final transcript for the utterance rather than an interim hypothesis.
|
|
1134
|
+
* True when this is the final transcript for the utterance rather than an interim hypothesis. An absent value is read as final: a client that does not distinguish interim results sends none.
|
|
1072
1135
|
* @public
|
|
1073
1136
|
*/
|
|
1074
1137
|
final?: boolean | undefined;
|
|
@@ -1407,7 +1470,6 @@ export interface StreamCallEventsInput {
|
|
|
1407
1470
|
* @public
|
|
1408
1471
|
*/
|
|
1409
1472
|
company?: string | undefined;
|
|
1410
|
-
include?: VoiceCallEventInclude[] | undefined;
|
|
1411
1473
|
}
|
|
1412
1474
|
/**
|
|
1413
1475
|
* @public
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wildix/wilma-voice-client",
|
|
3
3
|
"description": "@wildix/wilma-voice-client client",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.36",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "tsc -p tsconfig.cjs.json",
|