@wildix/wilma-voice-client 0.0.35 → 0.0.37
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 +5 -5
- package/dist-cjs/schemas/schemas_0.js +18 -9
- package/dist-es/models/enums.js +4 -4
- package/dist-es/schemas/schemas_0.js +17 -8
- package/dist-types/commands/DescribeVoiceProtocolCommand.d.ts +8 -0
- package/dist-types/commands/StreamCallEventsCommand.d.ts +1 -4
- package/dist-types/models/enums.d.ts +12 -12
- package/dist-types/models/models_0.d.ts +89 -8
- package/dist-types/schemas/schemas_0.d.ts +1 -0
- package/package.json +2 -2
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.VoiceCallBackendTransport = exports.VoiceControlAction = exports.VoiceEventType = exports.VoicePronunciationEncoding = void 0;
|
|
4
4
|
exports.VoicePronunciationEncoding = {
|
|
5
5
|
ALIAS: "alias",
|
|
6
6
|
IPA: "ipa",
|
|
@@ -23,6 +23,10 @@ exports.VoiceControlAction = {
|
|
|
23
23
|
END_OF_TURN: "end_of_turn",
|
|
24
24
|
KEEPALIVE: "keepalive",
|
|
25
25
|
};
|
|
26
|
+
exports.VoiceCallBackendTransport = {
|
|
27
|
+
SQS: "sqs",
|
|
28
|
+
WEBHOOK: "webhook",
|
|
29
|
+
};
|
|
26
30
|
exports.VoiceCallEndReason = {
|
|
27
31
|
COMPLETE: "complete",
|
|
28
32
|
ERROR: "error",
|
|
@@ -51,7 +55,3 @@ exports.VoiceCommandType = {
|
|
|
51
55
|
STOP: "stop",
|
|
52
56
|
TRANSFER: "transfer",
|
|
53
57
|
};
|
|
54
|
-
exports.VoiceCallEventInclude = {
|
|
55
|
-
COMMANDS: "commands",
|
|
56
|
-
TOOLS: "tools",
|
|
57
|
-
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.StreamCallEventsOutput$ = exports.StreamCallEventsInput$ = exports.StopWebsocketCommand$ = exports.StopCommandData$ = exports.SessionStartedWebsocketEvent$ = exports.SessionStartedEvent$ = exports.SessionEndedWebsocketEvent$ = exports.SessionEndedEvent$ = exports.SendTransferOutput$ = exports.SendTransferInput$ = exports.SendStopOutput$ = exports.SendStopInput$ = exports.SendSayOutput$ = exports.SendSayInput$ = exports.SendPlayOutput$ = exports.SendPlayInput$ = exports.SendHangupOutput$ = exports.SendHangupInput$ = exports.SayWebsocketCommand$ = exports.SayCommandData$ = exports.SayCommandAudioOptions$ = exports.ReplyWebsocketEvent$ = exports.ReplyEvent$ = exports.PlayWebsocketCommand$ = exports.PlayCommandData$ = exports.PlaybackWebsocketEvent$ = exports.PlaybackEvent$ = exports.ListVoicesOutput$ = exports.ListVoicesInput$ = exports.InterruptionWebsocketEvent$ = exports.InterruptionEvent$ = exports.HangupWebsocketCommand$ = exports.HangupCommandData$ = exports.ErrorWebsocketEvent$ = exports.DescribeVoiceProtocolOutput$ = exports.DescribeVoiceProtocolInput$ = exports.ControlWebsocketEvent$ = exports.ControlEvent$ = exports.CompleteWebsocketEvent$ = exports.CompleteEvent$ = exports.AudioWebsocketEvent$ = exports.AudioEvent$ = exports.AgentTranscriptionWebsocketEvent$ = exports.AgentTranscriptionEvent$ = exports.VoicePronunciation$ = exports.errorTypeRegistries = exports.ValidationException$ = exports.NotFoundException$ = exports.ForbiddenException$ = exports.WilmaVoiceServiceException$ = void 0;
|
|
4
|
-
exports.TextToSpeech$ = exports.StreamCallEvents$ = exports.SendTransfer$ = exports.SendStop$ = exports.SendSay$ = exports.SendPlay$ = exports.SendHangup$ = exports.ListVoices$ = exports.DescribeVoiceProtocol$ = exports.VoiceCallEvent$ = exports.VoiceSpeechPayload$ = exports.VoiceErrorEvent$ = exports.VoiceConnectParams$ = exports.VoiceCallTranscriptionEvent$ = exports.VoiceCallToolEvent$ = exports.VoiceCallStartedEvent$ = exports.VoiceCallSayEvent$ = exports.VoiceCallReplyEvent$ = exports.VoiceCallPlaybackEvent$ = exports.VoiceCallLanguageEvent$ = exports.VoiceCallInterruptionEvent$ = exports.VoiceCallEndedEvent$ = exports.VoiceCallAgentTranscriptionEvent$ = exports.VoiceAudioFormat$ = exports.Voice$ = exports.TransferWebsocketCommand$ = exports.TransferCommandData$ = exports.TranscriptionWebsocketEvent$ = exports.TranscriptionEvent$ = exports.TextToSpeechOutput$ = exports.TextToSpeechInput$ = void 0;
|
|
4
|
+
exports.TextToSpeech$ = exports.StreamCallEvents$ = exports.SendTransfer$ = exports.SendStop$ = exports.SendSay$ = exports.SendPlay$ = exports.SendHangup$ = exports.ListVoices$ = exports.DescribeVoiceProtocol$ = exports.VoiceCallEvent$ = exports.VoiceSpeechPayload$ = exports.VoiceErrorEvent$ = exports.VoiceConnectParams$ = exports.VoiceCallTranscriptionEvent$ = exports.VoiceCallToolEvent$ = exports.VoiceCallStartedEvent$ = exports.VoiceCallSayEvent$ = exports.VoiceCallReplyEvent$ = exports.VoiceCallPlaybackEvent$ = exports.VoiceCallLanguageEvent$ = exports.VoiceCallInterruptionEvent$ = exports.VoiceCallEndedEvent$ = exports.VoiceCallBackendEvent$ = exports.VoiceCallAgentTranscriptionEvent$ = exports.VoiceAudioFormat$ = exports.Voice$ = exports.TransferWebsocketCommand$ = exports.TransferCommandData$ = exports.TranscriptionWebsocketEvent$ = exports.TranscriptionEvent$ = exports.TextToSpeechOutput$ = exports.TextToSpeechInput$ = void 0;
|
|
5
5
|
const _AE = "AudioEvent";
|
|
6
6
|
const _ATE = "AgentTranscriptionEvent";
|
|
7
7
|
const _ATWE = "AgentTranscriptionWebsocketEvent";
|
|
@@ -68,6 +68,7 @@ const _TWE = "TranscriptionWebsocketEvent";
|
|
|
68
68
|
const _V = "Voice";
|
|
69
69
|
const _VAF = "VoiceAudioFormat";
|
|
70
70
|
const _VCATE = "VoiceCallAgentTranscriptionEvent";
|
|
71
|
+
const _VCBE = "VoiceCallBackendEvent";
|
|
71
72
|
const _VCE = "VoiceCallEvent";
|
|
72
73
|
const _VCEE = "VoiceCallEndedEvent";
|
|
73
74
|
const _VCESB = "VoiceCallEventStreamBody";
|
|
@@ -98,6 +99,7 @@ const _aWE = "audioWebsocketEvent";
|
|
|
98
99
|
const _ac = "action";
|
|
99
100
|
const _as = "as";
|
|
100
101
|
const _au = "audio";
|
|
102
|
+
const _b = "backend";
|
|
101
103
|
const _bS = "backgroundSound";
|
|
102
104
|
const _c = "client";
|
|
103
105
|
const _cC = "callerCompany";
|
|
@@ -120,7 +122,9 @@ const _compa = "company";
|
|
|
120
122
|
const _con = "context";
|
|
121
123
|
const _cr = "credential";
|
|
122
124
|
const _d = "data";
|
|
125
|
+
const _dM = "durationMs";
|
|
123
126
|
const _dN = "dialedNumber";
|
|
127
|
+
const _de = "delivered";
|
|
124
128
|
const _e = "error";
|
|
125
129
|
const _eT = "endTime";
|
|
126
130
|
const _eWE = "errorWebsocketEvent";
|
|
@@ -145,7 +149,6 @@ const _iM = "initialMessage";
|
|
|
145
149
|
const _iMn = "inputMode";
|
|
146
150
|
const _iWE = "interruptionWebsocketEvent";
|
|
147
151
|
const _in = "interruptible";
|
|
148
|
-
const _inc = "include";
|
|
149
152
|
const _int = "interruption";
|
|
150
153
|
const _l = "language";
|
|
151
154
|
const _la = "languages";
|
|
@@ -183,7 +186,8 @@ const _sa = "say";
|
|
|
183
186
|
const _se = "seq";
|
|
184
187
|
const _sp = "speech";
|
|
185
188
|
const _st = "streaming";
|
|
186
|
-
const _sta = "
|
|
189
|
+
const _sta = "status";
|
|
190
|
+
const _star = "started";
|
|
187
191
|
const _t = "type";
|
|
188
192
|
const _tCI = "toolCallId";
|
|
189
193
|
const _tI = "traceId";
|
|
@@ -194,7 +198,8 @@ const _te = "text";
|
|
|
194
198
|
const _ti = "time";
|
|
195
199
|
const _to = "to";
|
|
196
200
|
const _too = "tool";
|
|
197
|
-
const _tr = "
|
|
201
|
+
const _tr = "transport";
|
|
202
|
+
const _tra = "transcription";
|
|
198
203
|
const _u = "uri";
|
|
199
204
|
const _v = "voices";
|
|
200
205
|
const _va = "variables";
|
|
@@ -450,8 +455,8 @@ exports.StopWebsocketCommand$ = [3, n1, _SWCt,
|
|
|
450
455
|
];
|
|
451
456
|
exports.StreamCallEventsInput$ = [3, n1, _SCEI,
|
|
452
457
|
0,
|
|
453
|
-
[_cI, _compa
|
|
454
|
-
[[0, 1], [0, { [_hQ]: _compa }]
|
|
458
|
+
[_cI, _compa],
|
|
459
|
+
[[0, 1], [0, { [_hQ]: _compa }]], 1
|
|
455
460
|
];
|
|
456
461
|
exports.StreamCallEventsOutput$ = [3, n1, _SCEO,
|
|
457
462
|
0,
|
|
@@ -503,6 +508,11 @@ exports.VoiceCallAgentTranscriptionEvent$ = [3, n1, _VCATE,
|
|
|
503
508
|
[_i, _te, _f, _l, _ti],
|
|
504
509
|
[0, 0, 2, 0, 1], 3
|
|
505
510
|
];
|
|
511
|
+
exports.VoiceCallBackendEvent$ = [3, n1, _VCBE,
|
|
512
|
+
0,
|
|
513
|
+
[_tr, _ev, _de, _sta, _dM, _e],
|
|
514
|
+
[0, 0, 2, 1, 1, 0], 3
|
|
515
|
+
];
|
|
506
516
|
exports.VoiceCallEndedEvent$ = [3, n1, _VCEE,
|
|
507
517
|
0,
|
|
508
518
|
[_sIe, _r],
|
|
@@ -567,14 +577,13 @@ var LanguageCodeList = 64 | 0;
|
|
|
567
577
|
var VoicePronunciationList = [1, n2, _VPL,
|
|
568
578
|
0, () => exports.VoicePronunciation$
|
|
569
579
|
];
|
|
570
|
-
var VoiceCallEventIncludeList = 64 | 0;
|
|
571
580
|
var VoiceList = [1, n1, _VL,
|
|
572
581
|
0, () => exports.Voice$
|
|
573
582
|
];
|
|
574
583
|
exports.VoiceCallEvent$ = [4, n1, _VCE,
|
|
575
584
|
0,
|
|
576
|
-
[
|
|
577
|
-
[() => exports.VoiceCallStartedEvent$, () => exports.VoiceCallTranscriptionEvent$, () => exports.VoiceCallAgentTranscriptionEvent$, () => exports.VoiceCallReplyEvent$, () => exports.VoiceCallSayEvent$, () => exports.VoiceCallPlaybackEvent$, () => exports.VoiceCallInterruptionEvent$, () => exports.VoiceCallLanguageEvent$, () => exports.VoiceCallToolEvent$, () => exports.VoiceCallEndedEvent$]
|
|
585
|
+
[_star, _tra, _aT, _re, _sa, _pl, _int, _l, _too, _b, _end],
|
|
586
|
+
[() => exports.VoiceCallStartedEvent$, () => exports.VoiceCallTranscriptionEvent$, () => exports.VoiceCallAgentTranscriptionEvent$, () => exports.VoiceCallReplyEvent$, () => exports.VoiceCallSayEvent$, () => exports.VoiceCallPlaybackEvent$, () => exports.VoiceCallInterruptionEvent$, () => exports.VoiceCallLanguageEvent$, () => exports.VoiceCallToolEvent$, () => exports.VoiceCallBackendEvent$, () => exports.VoiceCallEndedEvent$]
|
|
578
587
|
];
|
|
579
588
|
exports.DescribeVoiceProtocol$ = [9, n1, _DVP,
|
|
580
589
|
{ [_h]: ["POST", "/v2/voice/describe", 200] }, () => exports.DescribeVoiceProtocolInput$, () => exports.DescribeVoiceProtocolOutput$
|
package/dist-es/models/enums.js
CHANGED
|
@@ -20,6 +20,10 @@ export const VoiceControlAction = {
|
|
|
20
20
|
END_OF_TURN: "end_of_turn",
|
|
21
21
|
KEEPALIVE: "keepalive",
|
|
22
22
|
};
|
|
23
|
+
export const VoiceCallBackendTransport = {
|
|
24
|
+
SQS: "sqs",
|
|
25
|
+
WEBHOOK: "webhook",
|
|
26
|
+
};
|
|
23
27
|
export const VoiceCallEndReason = {
|
|
24
28
|
COMPLETE: "complete",
|
|
25
29
|
ERROR: "error",
|
|
@@ -48,7 +52,3 @@ export const VoiceCommandType = {
|
|
|
48
52
|
STOP: "stop",
|
|
49
53
|
TRANSFER: "transfer",
|
|
50
54
|
};
|
|
51
|
-
export const VoiceCallEventInclude = {
|
|
52
|
-
COMMANDS: "commands",
|
|
53
|
-
TOOLS: "tools",
|
|
54
|
-
};
|
|
@@ -64,6 +64,7 @@ const _TWE = "TranscriptionWebsocketEvent";
|
|
|
64
64
|
const _V = "Voice";
|
|
65
65
|
const _VAF = "VoiceAudioFormat";
|
|
66
66
|
const _VCATE = "VoiceCallAgentTranscriptionEvent";
|
|
67
|
+
const _VCBE = "VoiceCallBackendEvent";
|
|
67
68
|
const _VCE = "VoiceCallEvent";
|
|
68
69
|
const _VCEE = "VoiceCallEndedEvent";
|
|
69
70
|
const _VCESB = "VoiceCallEventStreamBody";
|
|
@@ -94,6 +95,7 @@ const _aWE = "audioWebsocketEvent";
|
|
|
94
95
|
const _ac = "action";
|
|
95
96
|
const _as = "as";
|
|
96
97
|
const _au = "audio";
|
|
98
|
+
const _b = "backend";
|
|
97
99
|
const _bS = "backgroundSound";
|
|
98
100
|
const _c = "client";
|
|
99
101
|
const _cC = "callerCompany";
|
|
@@ -116,7 +118,9 @@ const _compa = "company";
|
|
|
116
118
|
const _con = "context";
|
|
117
119
|
const _cr = "credential";
|
|
118
120
|
const _d = "data";
|
|
121
|
+
const _dM = "durationMs";
|
|
119
122
|
const _dN = "dialedNumber";
|
|
123
|
+
const _de = "delivered";
|
|
120
124
|
const _e = "error";
|
|
121
125
|
const _eT = "endTime";
|
|
122
126
|
const _eWE = "errorWebsocketEvent";
|
|
@@ -141,7 +145,6 @@ const _iM = "initialMessage";
|
|
|
141
145
|
const _iMn = "inputMode";
|
|
142
146
|
const _iWE = "interruptionWebsocketEvent";
|
|
143
147
|
const _in = "interruptible";
|
|
144
|
-
const _inc = "include";
|
|
145
148
|
const _int = "interruption";
|
|
146
149
|
const _l = "language";
|
|
147
150
|
const _la = "languages";
|
|
@@ -179,7 +182,8 @@ const _sa = "say";
|
|
|
179
182
|
const _se = "seq";
|
|
180
183
|
const _sp = "speech";
|
|
181
184
|
const _st = "streaming";
|
|
182
|
-
const _sta = "
|
|
185
|
+
const _sta = "status";
|
|
186
|
+
const _star = "started";
|
|
183
187
|
const _t = "type";
|
|
184
188
|
const _tCI = "toolCallId";
|
|
185
189
|
const _tI = "traceId";
|
|
@@ -190,7 +194,8 @@ const _te = "text";
|
|
|
190
194
|
const _ti = "time";
|
|
191
195
|
const _to = "to";
|
|
192
196
|
const _too = "tool";
|
|
193
|
-
const _tr = "
|
|
197
|
+
const _tr = "transport";
|
|
198
|
+
const _tra = "transcription";
|
|
194
199
|
const _u = "uri";
|
|
195
200
|
const _v = "voices";
|
|
196
201
|
const _va = "variables";
|
|
@@ -446,8 +451,8 @@ export var StopWebsocketCommand$ = [3, n1, _SWCt,
|
|
|
446
451
|
];
|
|
447
452
|
export var StreamCallEventsInput$ = [3, n1, _SCEI,
|
|
448
453
|
0,
|
|
449
|
-
[_cI, _compa
|
|
450
|
-
[[0, 1], [0, { [_hQ]: _compa }]
|
|
454
|
+
[_cI, _compa],
|
|
455
|
+
[[0, 1], [0, { [_hQ]: _compa }]], 1
|
|
451
456
|
];
|
|
452
457
|
export var StreamCallEventsOutput$ = [3, n1, _SCEO,
|
|
453
458
|
0,
|
|
@@ -499,6 +504,11 @@ export var VoiceCallAgentTranscriptionEvent$ = [3, n1, _VCATE,
|
|
|
499
504
|
[_i, _te, _f, _l, _ti],
|
|
500
505
|
[0, 0, 2, 0, 1], 3
|
|
501
506
|
];
|
|
507
|
+
export var VoiceCallBackendEvent$ = [3, n1, _VCBE,
|
|
508
|
+
0,
|
|
509
|
+
[_tr, _ev, _de, _sta, _dM, _e],
|
|
510
|
+
[0, 0, 2, 1, 1, 0], 3
|
|
511
|
+
];
|
|
502
512
|
export var VoiceCallEndedEvent$ = [3, n1, _VCEE,
|
|
503
513
|
0,
|
|
504
514
|
[_sIe, _r],
|
|
@@ -563,14 +573,13 @@ var LanguageCodeList = 64 | 0;
|
|
|
563
573
|
var VoicePronunciationList = [1, n2, _VPL,
|
|
564
574
|
0, () => VoicePronunciation$
|
|
565
575
|
];
|
|
566
|
-
var VoiceCallEventIncludeList = 64 | 0;
|
|
567
576
|
var VoiceList = [1, n1, _VL,
|
|
568
577
|
0, () => Voice$
|
|
569
578
|
];
|
|
570
579
|
export var VoiceCallEvent$ = [4, n1, _VCE,
|
|
571
580
|
0,
|
|
572
|
-
[
|
|
573
|
-
[() => VoiceCallStartedEvent$, () => VoiceCallTranscriptionEvent$, () => VoiceCallAgentTranscriptionEvent$, () => VoiceCallReplyEvent$, () => VoiceCallSayEvent$, () => VoiceCallPlaybackEvent$, () => VoiceCallInterruptionEvent$, () => VoiceCallLanguageEvent$, () => VoiceCallToolEvent$, () => VoiceCallEndedEvent$]
|
|
581
|
+
[_star, _tra, _aT, _re, _sa, _pl, _int, _l, _too, _b, _end],
|
|
582
|
+
[() => VoiceCallStartedEvent$, () => VoiceCallTranscriptionEvent$, () => VoiceCallAgentTranscriptionEvent$, () => VoiceCallReplyEvent$, () => VoiceCallSayEvent$, () => VoiceCallPlaybackEvent$, () => VoiceCallInterruptionEvent$, () => VoiceCallLanguageEvent$, () => VoiceCallToolEvent$, () => VoiceCallBackendEvent$, () => VoiceCallEndedEvent$]
|
|
574
583
|
];
|
|
575
584
|
export var DescribeVoiceProtocol$ = [9, n1, _DVP,
|
|
576
585
|
{ [_h]: ["POST", "/v2/voice/describe", 200] }, () => DescribeVoiceProtocolInput$, () => DescribeVoiceProtocolOutput$
|
|
@@ -297,6 +297,14 @@ declare const DescribeVoiceProtocolCommand_base: {
|
|
|
297
297
|
* // phase: "started" || "finished", // required
|
|
298
298
|
* // startMessage: "STRING_VALUE",
|
|
299
299
|
* // },
|
|
300
|
+
* // backend: { // VoiceCallBackendEvent
|
|
301
|
+
* // transport: "webhook" || "sqs", // required
|
|
302
|
+
* // event: "STRING_VALUE", // required
|
|
303
|
+
* // delivered: true || false, // required
|
|
304
|
+
* // status: Number("int"),
|
|
305
|
+
* // durationMs: Number("int"),
|
|
306
|
+
* // error: "STRING_VALUE",
|
|
307
|
+
* // },
|
|
300
308
|
* // ended: { // VoiceCallEndedEvent
|
|
301
309
|
* // sessionId: "STRING_VALUE", // required
|
|
302
310
|
* // reason: "hangup" || "transfer" || "timeout" || "error" || "complete", // required
|
|
@@ -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);
|
|
@@ -59,6 +59,18 @@ export declare const VoiceControlAction: {
|
|
|
59
59
|
* @public
|
|
60
60
|
*/
|
|
61
61
|
export type VoiceControlAction = (typeof VoiceControlAction)[keyof typeof VoiceControlAction];
|
|
62
|
+
/**
|
|
63
|
+
* @public
|
|
64
|
+
* @enum
|
|
65
|
+
*/
|
|
66
|
+
export declare const VoiceCallBackendTransport: {
|
|
67
|
+
readonly SQS: "sqs";
|
|
68
|
+
readonly WEBHOOK: "webhook";
|
|
69
|
+
};
|
|
70
|
+
/**
|
|
71
|
+
* @public
|
|
72
|
+
*/
|
|
73
|
+
export type VoiceCallBackendTransport = (typeof VoiceCallBackendTransport)[keyof typeof VoiceCallBackendTransport];
|
|
62
74
|
/**
|
|
63
75
|
* @public
|
|
64
76
|
* @enum
|
|
@@ -145,15 +157,3 @@ export declare const VoiceCommandType: {
|
|
|
145
157
|
* @public
|
|
146
158
|
*/
|
|
147
159
|
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,
|
|
2
|
+
import type { VoiceAudioEncoding, VoiceCallBackendTransport, 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;
|
|
@@ -182,6 +182,48 @@ export interface VoiceCallAgentTranscriptionEvent {
|
|
|
182
182
|
language?: string | undefined;
|
|
183
183
|
time?: number | undefined;
|
|
184
184
|
}
|
|
185
|
+
/**
|
|
186
|
+
* One delivery to the agent's external backend, for a call whose replies this platform does not
|
|
187
|
+
* produce.
|
|
188
|
+
*
|
|
189
|
+
* Without it such a call reads as a call where nothing happens: the transcript shows the greeting
|
|
190
|
+
* and then silence, and a backend that is unreachable, one that refuses, and one that answers 200
|
|
191
|
+
* and then says nothing are the same empty panel. Diagnosing that is one of the reasons the
|
|
192
|
+
* preview exists, so the delivery has to be visible where the call is watched rather than only in
|
|
193
|
+
* a service log.
|
|
194
|
+
*
|
|
195
|
+
* Carries no request body, no signature and no credential: the envelope holds the caller's words,
|
|
196
|
+
* and this stream is read by anyone who may watch the call.
|
|
197
|
+
* @public
|
|
198
|
+
*/
|
|
199
|
+
export interface VoiceCallBackendEvent {
|
|
200
|
+
/**
|
|
201
|
+
* Which transport carries an external backend's events.
|
|
202
|
+
* @public
|
|
203
|
+
*/
|
|
204
|
+
transport: VoiceCallBackendTransport;
|
|
205
|
+
/**
|
|
206
|
+
* The event delivered, by its name in the backend contract — `started`, `reply`, `playback`, `ended`.
|
|
207
|
+
* @public
|
|
208
|
+
*/
|
|
209
|
+
event: string;
|
|
210
|
+
delivered: boolean;
|
|
211
|
+
/**
|
|
212
|
+
* HTTP status for the webhook transport; absent for a queue send, which has none.
|
|
213
|
+
* @public
|
|
214
|
+
*/
|
|
215
|
+
status?: number | undefined;
|
|
216
|
+
/**
|
|
217
|
+
* How long the delivery took, in milliseconds.
|
|
218
|
+
* @public
|
|
219
|
+
*/
|
|
220
|
+
durationMs?: number | undefined;
|
|
221
|
+
/**
|
|
222
|
+
* Why the backend did not receive it, truncated. Absent when it did.
|
|
223
|
+
* @public
|
|
224
|
+
*/
|
|
225
|
+
error?: string | undefined;
|
|
226
|
+
}
|
|
185
227
|
/**
|
|
186
228
|
* The session ended. After `transfer` another session of the same call may follow with its own `started`.
|
|
187
229
|
* @public
|
|
@@ -309,7 +351,7 @@ export interface VoiceCallStartedEvent {
|
|
|
309
351
|
language?: string | undefined;
|
|
310
352
|
}
|
|
311
353
|
/**
|
|
312
|
-
* A tool call the agent made during a turn. Name and phase only — arguments and results live in the trace. Sent
|
|
354
|
+
* 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.
|
|
313
355
|
* @public
|
|
314
356
|
*/
|
|
315
357
|
export interface VoiceCallToolEvent {
|
|
@@ -353,10 +395,10 @@ export interface VoiceCallTranscriptionEvent {
|
|
|
353
395
|
time?: number | undefined;
|
|
354
396
|
}
|
|
355
397
|
/**
|
|
356
|
-
* One event on a live call. The SSE frame's `event:` is the member name and `data:` the member's
|
|
398
|
+
* 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.
|
|
357
399
|
* @public
|
|
358
400
|
*/
|
|
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;
|
|
401
|
+
export type VoiceCallEvent = VoiceCallEvent.AgentTranscriptionMember | VoiceCallEvent.BackendMember | VoiceCallEvent.EndedMember | VoiceCallEvent.InterruptionMember | VoiceCallEvent.LanguageMember | VoiceCallEvent.PlaybackMember | VoiceCallEvent.ReplyMember | VoiceCallEvent.SayMember | VoiceCallEvent.StartedMember | VoiceCallEvent.ToolMember | VoiceCallEvent.TranscriptionMember | VoiceCallEvent.$UnknownMember;
|
|
360
402
|
/**
|
|
361
403
|
* @public
|
|
362
404
|
*/
|
|
@@ -375,6 +417,7 @@ export declare namespace VoiceCallEvent {
|
|
|
375
417
|
interruption?: never;
|
|
376
418
|
language?: never;
|
|
377
419
|
tool?: never;
|
|
420
|
+
backend?: never;
|
|
378
421
|
ended?: never;
|
|
379
422
|
$unknown?: never;
|
|
380
423
|
}
|
|
@@ -392,6 +435,7 @@ export declare namespace VoiceCallEvent {
|
|
|
392
435
|
interruption?: never;
|
|
393
436
|
language?: never;
|
|
394
437
|
tool?: never;
|
|
438
|
+
backend?: never;
|
|
395
439
|
ended?: never;
|
|
396
440
|
$unknown?: never;
|
|
397
441
|
}
|
|
@@ -409,6 +453,7 @@ export declare namespace VoiceCallEvent {
|
|
|
409
453
|
interruption?: never;
|
|
410
454
|
language?: never;
|
|
411
455
|
tool?: never;
|
|
456
|
+
backend?: never;
|
|
412
457
|
ended?: never;
|
|
413
458
|
$unknown?: never;
|
|
414
459
|
}
|
|
@@ -426,6 +471,7 @@ export declare namespace VoiceCallEvent {
|
|
|
426
471
|
interruption?: never;
|
|
427
472
|
language?: never;
|
|
428
473
|
tool?: never;
|
|
474
|
+
backend?: never;
|
|
429
475
|
ended?: never;
|
|
430
476
|
$unknown?: never;
|
|
431
477
|
}
|
|
@@ -443,6 +489,7 @@ export declare namespace VoiceCallEvent {
|
|
|
443
489
|
interruption?: never;
|
|
444
490
|
language?: never;
|
|
445
491
|
tool?: never;
|
|
492
|
+
backend?: never;
|
|
446
493
|
ended?: never;
|
|
447
494
|
$unknown?: never;
|
|
448
495
|
}
|
|
@@ -460,6 +507,7 @@ export declare namespace VoiceCallEvent {
|
|
|
460
507
|
interruption?: never;
|
|
461
508
|
language?: never;
|
|
462
509
|
tool?: never;
|
|
510
|
+
backend?: never;
|
|
463
511
|
ended?: never;
|
|
464
512
|
$unknown?: never;
|
|
465
513
|
}
|
|
@@ -477,6 +525,7 @@ export declare namespace VoiceCallEvent {
|
|
|
477
525
|
interruption: VoiceCallInterruptionEvent;
|
|
478
526
|
language?: never;
|
|
479
527
|
tool?: never;
|
|
528
|
+
backend?: never;
|
|
480
529
|
ended?: never;
|
|
481
530
|
$unknown?: never;
|
|
482
531
|
}
|
|
@@ -494,11 +543,12 @@ export declare namespace VoiceCallEvent {
|
|
|
494
543
|
interruption?: never;
|
|
495
544
|
language: VoiceCallLanguageEvent;
|
|
496
545
|
tool?: never;
|
|
546
|
+
backend?: never;
|
|
497
547
|
ended?: never;
|
|
498
548
|
$unknown?: never;
|
|
499
549
|
}
|
|
500
550
|
/**
|
|
501
|
-
* A tool call the agent made during a turn. Name and phase only — arguments and results live in the trace. Sent
|
|
551
|
+
* 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.
|
|
502
552
|
* @public
|
|
503
553
|
*/
|
|
504
554
|
interface ToolMember {
|
|
@@ -511,6 +561,35 @@ export declare namespace VoiceCallEvent {
|
|
|
511
561
|
interruption?: never;
|
|
512
562
|
language?: never;
|
|
513
563
|
tool: VoiceCallToolEvent;
|
|
564
|
+
backend?: never;
|
|
565
|
+
ended?: never;
|
|
566
|
+
$unknown?: never;
|
|
567
|
+
}
|
|
568
|
+
/**
|
|
569
|
+
* One delivery to the agent's external backend, for a call whose replies this platform does not
|
|
570
|
+
* produce.
|
|
571
|
+
*
|
|
572
|
+
* Without it such a call reads as a call where nothing happens: the transcript shows the greeting
|
|
573
|
+
* and then silence, and a backend that is unreachable, one that refuses, and one that answers 200
|
|
574
|
+
* and then says nothing are the same empty panel. Diagnosing that is one of the reasons the
|
|
575
|
+
* preview exists, so the delivery has to be visible where the call is watched rather than only in
|
|
576
|
+
* a service log.
|
|
577
|
+
*
|
|
578
|
+
* Carries no request body, no signature and no credential: the envelope holds the caller's words,
|
|
579
|
+
* and this stream is read by anyone who may watch the call.
|
|
580
|
+
* @public
|
|
581
|
+
*/
|
|
582
|
+
interface BackendMember {
|
|
583
|
+
started?: never;
|
|
584
|
+
transcription?: never;
|
|
585
|
+
agentTranscription?: never;
|
|
586
|
+
reply?: never;
|
|
587
|
+
say?: never;
|
|
588
|
+
playback?: never;
|
|
589
|
+
interruption?: never;
|
|
590
|
+
language?: never;
|
|
591
|
+
tool?: never;
|
|
592
|
+
backend: VoiceCallBackendEvent;
|
|
514
593
|
ended?: never;
|
|
515
594
|
$unknown?: never;
|
|
516
595
|
}
|
|
@@ -528,6 +607,7 @@ export declare namespace VoiceCallEvent {
|
|
|
528
607
|
interruption?: never;
|
|
529
608
|
language?: never;
|
|
530
609
|
tool?: never;
|
|
610
|
+
backend?: never;
|
|
531
611
|
ended: VoiceCallEndedEvent;
|
|
532
612
|
$unknown?: never;
|
|
533
613
|
}
|
|
@@ -544,6 +624,7 @@ export declare namespace VoiceCallEvent {
|
|
|
544
624
|
interruption?: never;
|
|
545
625
|
language?: never;
|
|
546
626
|
tool?: never;
|
|
627
|
+
backend?: never;
|
|
547
628
|
ended?: never;
|
|
548
629
|
$unknown: [string, any];
|
|
549
630
|
}
|
|
@@ -561,6 +642,7 @@ export declare namespace VoiceCallEvent {
|
|
|
561
642
|
interruption: (value: VoiceCallInterruptionEvent) => T;
|
|
562
643
|
language: (value: VoiceCallLanguageEvent) => T;
|
|
563
644
|
tool: (value: VoiceCallToolEvent) => T;
|
|
645
|
+
backend: (value: VoiceCallBackendEvent) => T;
|
|
564
646
|
ended: (value: VoiceCallEndedEvent) => T;
|
|
565
647
|
_: (name: string, value: any) => T;
|
|
566
648
|
}
|
|
@@ -1131,7 +1213,7 @@ export interface TranscriptionEvent {
|
|
|
1131
1213
|
*/
|
|
1132
1214
|
confidence?: number | undefined;
|
|
1133
1215
|
/**
|
|
1134
|
-
* True when this is the final transcript for the utterance rather than an interim hypothesis.
|
|
1216
|
+
* 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.
|
|
1135
1217
|
* @public
|
|
1136
1218
|
*/
|
|
1137
1219
|
final?: boolean | undefined;
|
|
@@ -1470,7 +1552,6 @@ export interface StreamCallEventsInput {
|
|
|
1470
1552
|
* @public
|
|
1471
1553
|
*/
|
|
1472
1554
|
company?: string | undefined;
|
|
1473
|
-
include?: VoiceCallEventInclude[] | undefined;
|
|
1474
1555
|
}
|
|
1475
1556
|
/**
|
|
1476
1557
|
* @public
|
|
@@ -64,6 +64,7 @@ export declare var TransferWebsocketCommand$: StaticStructureSchema;
|
|
|
64
64
|
export declare var Voice$: StaticStructureSchema;
|
|
65
65
|
export declare var VoiceAudioFormat$: StaticStructureSchema;
|
|
66
66
|
export declare var VoiceCallAgentTranscriptionEvent$: StaticStructureSchema;
|
|
67
|
+
export declare var VoiceCallBackendEvent$: StaticStructureSchema;
|
|
67
68
|
export declare var VoiceCallEndedEvent$: StaticStructureSchema;
|
|
68
69
|
export declare var VoiceCallInterruptionEvent$: StaticStructureSchema;
|
|
69
70
|
export declare var VoiceCallLanguageEvent$: StaticStructureSchema;
|
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.37",
|
|
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",
|
|
@@ -56,4 +56,4 @@
|
|
|
56
56
|
"browser": {
|
|
57
57
|
"./dist-es/runtimeConfig": "./dist-es/runtimeConfig.browser"
|
|
58
58
|
}
|
|
59
|
-
}
|
|
59
|
+
}
|