@wildix/wilma-voice-client 0.0.31 → 0.0.34
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/WilmaVoice.js +2 -0
- package/dist-cjs/commands/StreamCallEventsCommand.js +20 -0
- package/dist-cjs/commands/index.js +1 -0
- package/dist-cjs/models/enums.js +17 -1
- package/dist-cjs/runtimeConfig.shared.js +1 -0
- package/dist-cjs/schemas/schemas_0.js +139 -17
- package/dist-es/WilmaVoice.js +2 -0
- package/dist-es/commands/StreamCallEventsCommand.js +16 -0
- package/dist-es/commands/index.js +1 -0
- package/dist-es/models/enums.js +16 -0
- package/dist-es/runtimeConfig.shared.js +2 -1
- package/dist-es/schemas/schemas_0.js +137 -15
- package/dist-types/WilmaVoice.d.ts +7 -0
- package/dist-types/WilmaVoiceClient.d.ts +9 -3
- package/dist-types/commands/DescribeVoiceProtocolCommand.d.ts +83 -10
- package/dist-types/commands/StreamCallEventsCommand.d.ts +91 -0
- package/dist-types/commands/index.d.ts +1 -0
- package/dist-types/models/enums.d.ts +40 -0
- package/dist-types/models/models_0.d.ts +437 -3
- package/dist-types/runtimeConfig.browser.d.ts +1 -0
- package/dist-types/runtimeConfig.d.ts +1 -0
- package/dist-types/runtimeConfig.native.d.ts +1 -0
- package/dist-types/runtimeConfig.shared.d.ts +1 -0
- package/dist-types/schemas/schemas_0.d.ts +17 -1
- package/package.json +1 -1
package/dist-cjs/WilmaVoice.js
CHANGED
|
@@ -9,6 +9,7 @@ const SendPlayCommand_1 = require("./commands/SendPlayCommand");
|
|
|
9
9
|
const SendSayCommand_1 = require("./commands/SendSayCommand");
|
|
10
10
|
const SendStopCommand_1 = require("./commands/SendStopCommand");
|
|
11
11
|
const SendTransferCommand_1 = require("./commands/SendTransferCommand");
|
|
12
|
+
const StreamCallEventsCommand_1 = require("./commands/StreamCallEventsCommand");
|
|
12
13
|
const TextToSpeechCommand_1 = require("./commands/TextToSpeechCommand");
|
|
13
14
|
const WilmaVoiceClient_1 = require("./WilmaVoiceClient");
|
|
14
15
|
const commands = {
|
|
@@ -19,6 +20,7 @@ const commands = {
|
|
|
19
20
|
SendSayCommand: SendSayCommand_1.SendSayCommand,
|
|
20
21
|
SendStopCommand: SendStopCommand_1.SendStopCommand,
|
|
21
22
|
SendTransferCommand: SendTransferCommand_1.SendTransferCommand,
|
|
23
|
+
StreamCallEventsCommand: StreamCallEventsCommand_1.StreamCallEventsCommand,
|
|
22
24
|
TextToSpeechCommand: TextToSpeechCommand_1.TextToSpeechCommand,
|
|
23
25
|
};
|
|
24
26
|
class WilmaVoice extends WilmaVoiceClient_1.WilmaVoiceClient {
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.StreamCallEventsCommand = exports.$Command = void 0;
|
|
4
|
+
const client_1 = require("@smithy/core/client");
|
|
5
|
+
Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return client_1.Command; } });
|
|
6
|
+
const endpoints_1 = require("@smithy/core/endpoints");
|
|
7
|
+
const EndpointParameters_1 = require("../endpoint/EndpointParameters");
|
|
8
|
+
const schemas_0_1 = require("../schemas/schemas_0");
|
|
9
|
+
class StreamCallEventsCommand extends client_1.Command
|
|
10
|
+
.classBuilder()
|
|
11
|
+
.ep(EndpointParameters_1.commonParams)
|
|
12
|
+
.m(function (Command, cs, config, o) {
|
|
13
|
+
return [(0, endpoints_1.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())];
|
|
14
|
+
})
|
|
15
|
+
.s("WilmaVoice", "StreamCallEvents", {})
|
|
16
|
+
.n("WilmaVoiceClient", "StreamCallEventsCommand")
|
|
17
|
+
.sc(schemas_0_1.StreamCallEvents$)
|
|
18
|
+
.build() {
|
|
19
|
+
}
|
|
20
|
+
exports.StreamCallEventsCommand = StreamCallEventsCommand;
|
|
@@ -8,4 +8,5 @@ tslib_1.__exportStar(require("./SendPlayCommand"), exports);
|
|
|
8
8
|
tslib_1.__exportStar(require("./SendSayCommand"), exports);
|
|
9
9
|
tslib_1.__exportStar(require("./SendStopCommand"), exports);
|
|
10
10
|
tslib_1.__exportStar(require("./SendTransferCommand"), exports);
|
|
11
|
+
tslib_1.__exportStar(require("./StreamCallEventsCommand"), exports);
|
|
11
12
|
tslib_1.__exportStar(require("./TextToSpeechCommand"), exports);
|
package/dist-cjs/models/enums.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.VoiceCommandType = exports.VoiceInputMode = exports.VoiceAudioEncoding = exports.VoiceControlAction = exports.VoiceEventType = exports.VoicePronunciationEncoding = void 0;
|
|
3
|
+
exports.VoiceCallEventInclude = 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",
|
|
7
7
|
};
|
|
8
8
|
exports.VoiceEventType = {
|
|
9
|
+
AGENT_TRANSCRIPTION: "agentTranscription",
|
|
9
10
|
AUDIO: "audio",
|
|
10
11
|
COMPLETE: "complete",
|
|
11
12
|
CONTROL: "control",
|
|
@@ -22,6 +23,17 @@ exports.VoiceControlAction = {
|
|
|
22
23
|
END_OF_TURN: "end_of_turn",
|
|
23
24
|
KEEPALIVE: "keepalive",
|
|
24
25
|
};
|
|
26
|
+
exports.VoiceCallEndReason = {
|
|
27
|
+
COMPLETE: "complete",
|
|
28
|
+
ERROR: "error",
|
|
29
|
+
HANGUP: "hangup",
|
|
30
|
+
TIMEOUT: "timeout",
|
|
31
|
+
TRANSFER: "transfer",
|
|
32
|
+
};
|
|
33
|
+
exports.VoiceCallToolPhase = {
|
|
34
|
+
FINISHED: "finished",
|
|
35
|
+
STARTED: "started",
|
|
36
|
+
};
|
|
25
37
|
exports.VoiceAudioEncoding = {
|
|
26
38
|
ALAW: "alaw",
|
|
27
39
|
MULAW: "mulaw",
|
|
@@ -39,3 +51,7 @@ exports.VoiceCommandType = {
|
|
|
39
51
|
STOP: "stop",
|
|
40
52
|
TRANSFER: "transfer",
|
|
41
53
|
};
|
|
54
|
+
exports.VoiceCallEventInclude = {
|
|
55
|
+
COMMANDS: "commands",
|
|
56
|
+
TOOLS: "tools",
|
|
57
|
+
};
|
|
@@ -53,6 +53,7 @@ const getRuntimeConfig = (config) => {
|
|
|
53
53
|
version: "v2",
|
|
54
54
|
serviceTarget: "WilmaVoice",
|
|
55
55
|
},
|
|
56
|
+
sdkStreamMixin: config?.sdkStreamMixin ?? serde_1.sdkStreamMixin,
|
|
56
57
|
urlParser: config?.urlParser ?? protocols_2.parseUrl,
|
|
57
58
|
utf8Decoder: config?.utf8Decoder ?? serde_1.fromUtf8,
|
|
58
59
|
utf8Encoder: config?.utf8Encoder ?? serde_1.toUtf8,
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.TextToSpeech$ = exports.SendTransfer$ = exports.SendStop$ = exports.SendSay$ = exports.SendPlay$ = exports.SendHangup$ = exports.ListVoices$ = exports.DescribeVoiceProtocol$ = exports.VoiceSpeechPayload$ = exports.VoiceErrorEvent$ = exports.VoiceConnectParams$ = exports.VoiceAudioFormat$ = exports.Voice$ = exports.TransferWebsocketCommand$ = exports.TransferCommandData$ = void 0;
|
|
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;
|
|
5
5
|
const _AE = "AudioEvent";
|
|
6
|
+
const _ATE = "AgentTranscriptionEvent";
|
|
7
|
+
const _ATWE = "AgentTranscriptionWebsocketEvent";
|
|
6
8
|
const _AWE = "AudioWebsocketEvent";
|
|
7
9
|
const _CE = "CompleteEvent";
|
|
8
10
|
const _CEo = "ControlEvent";
|
|
11
|
+
const _CT = "Content-Type";
|
|
9
12
|
const _CWE = "CompleteWebsocketEvent";
|
|
10
13
|
const _CWEo = "ControlWebsocketEvent";
|
|
11
14
|
const _DVP = "DescribeVoiceProtocol";
|
|
@@ -31,6 +34,9 @@ const _RWE = "ReplyWebsocketEvent";
|
|
|
31
34
|
const _SCAO = "SayCommandAudioOptions";
|
|
32
35
|
const _SCD = "SayCommandData";
|
|
33
36
|
const _SCDt = "StopCommandData";
|
|
37
|
+
const _SCE = "StreamCallEvents";
|
|
38
|
+
const _SCEI = "StreamCallEventsInput";
|
|
39
|
+
const _SCEO = "StreamCallEventsOutput";
|
|
34
40
|
const _SEE = "SessionEndedEvent";
|
|
35
41
|
const _SEWE = "SessionEndedWebsocketEvent";
|
|
36
42
|
const _SH = "SendHangup";
|
|
@@ -61,7 +67,19 @@ const _TWC = "TransferWebsocketCommand";
|
|
|
61
67
|
const _TWE = "TranscriptionWebsocketEvent";
|
|
62
68
|
const _V = "Voice";
|
|
63
69
|
const _VAF = "VoiceAudioFormat";
|
|
70
|
+
const _VCATE = "VoiceCallAgentTranscriptionEvent";
|
|
71
|
+
const _VCE = "VoiceCallEvent";
|
|
72
|
+
const _VCEE = "VoiceCallEndedEvent";
|
|
73
|
+
const _VCESB = "VoiceCallEventStreamBody";
|
|
74
|
+
const _VCIE = "VoiceCallInterruptionEvent";
|
|
75
|
+
const _VCLE = "VoiceCallLanguageEvent";
|
|
64
76
|
const _VCP = "VoiceConnectParams";
|
|
77
|
+
const _VCPE = "VoiceCallPlaybackEvent";
|
|
78
|
+
const _VCRE = "VoiceCallReplyEvent";
|
|
79
|
+
const _VCSE = "VoiceCallSayEvent";
|
|
80
|
+
const _VCSEo = "VoiceCallStartedEvent";
|
|
81
|
+
const _VCTE = "VoiceCallToolEvent";
|
|
82
|
+
const _VCTEo = "VoiceCallTranscriptionEvent";
|
|
65
83
|
const _VE = "ValidationException";
|
|
66
84
|
const _VEE = "VoiceErrorEvent";
|
|
67
85
|
const _VL = "VoiceList";
|
|
@@ -73,6 +91,8 @@ const _aD = "agentDraft";
|
|
|
73
91
|
const _aDu = "autoDetect";
|
|
74
92
|
const _aI = "agentId";
|
|
75
93
|
const _aN = "agentName";
|
|
94
|
+
const _aT = "agentTranscription";
|
|
95
|
+
const _aTWE = "agentTranscriptionWebsocketEvent";
|
|
76
96
|
const _aV = "agentVersion";
|
|
77
97
|
const _aWE = "audioWebsocketEvent";
|
|
78
98
|
const _ac = "action";
|
|
@@ -81,33 +101,42 @@ const _au = "audio";
|
|
|
81
101
|
const _bS = "backgroundSound";
|
|
82
102
|
const _c = "client";
|
|
83
103
|
const _cC = "callerCompany";
|
|
84
|
-
const _cE = "
|
|
104
|
+
const _cE = "callEvent";
|
|
105
|
+
const _cEa = "callerEmail";
|
|
85
106
|
const _cI = "callId";
|
|
86
107
|
const _cN = "callerName";
|
|
87
108
|
const _cNa = "callerNumber";
|
|
88
109
|
const _cP = "connectParams";
|
|
110
|
+
const _cT = "contentType";
|
|
89
111
|
const _cWE = "completeWebsocketEvent";
|
|
90
112
|
const _cWEo = "controlWebsocketEvent";
|
|
91
113
|
const _ca = "category";
|
|
92
114
|
const _ch = "channels";
|
|
93
|
-
const _co = "
|
|
115
|
+
const _co = "confidence";
|
|
94
116
|
const _cod = "code";
|
|
95
|
-
const _com = "
|
|
117
|
+
const _com = "command";
|
|
118
|
+
const _comp = "complete";
|
|
119
|
+
const _compa = "company";
|
|
96
120
|
const _con = "context";
|
|
97
|
-
const _conf = "confidence";
|
|
98
121
|
const _cr = "credential";
|
|
99
122
|
const _d = "data";
|
|
123
|
+
const _dN = "dialedNumber";
|
|
100
124
|
const _e = "error";
|
|
101
125
|
const _eT = "endTime";
|
|
102
126
|
const _eWE = "errorWebsocketEvent";
|
|
103
127
|
const _en = "encoding";
|
|
128
|
+
const _end = "ended";
|
|
104
129
|
const _eng = "engine";
|
|
105
130
|
const _ev = "event";
|
|
131
|
+
const _eve = "events";
|
|
106
132
|
const _ex = "extension";
|
|
107
133
|
const _f = "final";
|
|
134
|
+
const _fI = "flowIndex";
|
|
135
|
+
const _fr = "from";
|
|
108
136
|
const _gI = "groupId";
|
|
109
137
|
const _h = "http";
|
|
110
138
|
const _hE = "httpError";
|
|
139
|
+
const _hH = "httpHeader";
|
|
111
140
|
const _hQ = "httpQuery";
|
|
112
141
|
const _hWC = "hangupWebsocketCommand";
|
|
113
142
|
const _i = "id";
|
|
@@ -116,6 +145,8 @@ const _iM = "initialMessage";
|
|
|
116
145
|
const _iMn = "inputMode";
|
|
117
146
|
const _iWE = "interruptionWebsocketEvent";
|
|
118
147
|
const _in = "interruptible";
|
|
148
|
+
const _inc = "include";
|
|
149
|
+
const _int = "interruption";
|
|
119
150
|
const _l = "language";
|
|
120
151
|
const _la = "languages";
|
|
121
152
|
const _m = "message";
|
|
@@ -130,28 +161,39 @@ const _pT = "playedText";
|
|
|
130
161
|
const _pV = "protocolVersion";
|
|
131
162
|
const _pWC = "playWebsocketCommand";
|
|
132
163
|
const _pWE = "playbackWebsocketEvent";
|
|
164
|
+
const _ph = "phase";
|
|
165
|
+
const _pl = "playback";
|
|
133
166
|
const _pr = "provider";
|
|
134
167
|
const _pro = "pronunciations";
|
|
135
168
|
const _r = "reason";
|
|
136
169
|
const _rI = "replyId";
|
|
137
170
|
const _rWE = "replyWebsocketEvent";
|
|
171
|
+
const _re = "reply";
|
|
138
172
|
const _s = "smithy.ts.sdk.synthetic.wildix.wilma.voice";
|
|
139
173
|
const _sEWE = "sessionEndedWebsocketEvent";
|
|
140
174
|
const _sI = "streamId";
|
|
141
175
|
const _sIe = "sessionId";
|
|
176
|
+
const _sM = "startMessage";
|
|
142
177
|
const _sR = "sampleRate";
|
|
143
178
|
const _sSWE = "sessionStartedWebsocketEvent";
|
|
144
179
|
const _sT = "startTime";
|
|
145
180
|
const _sWC = "sayWebsocketCommand";
|
|
146
181
|
const _sWCt = "stopWebsocketCommand";
|
|
182
|
+
const _sa = "say";
|
|
147
183
|
const _se = "seq";
|
|
148
184
|
const _sp = "speech";
|
|
185
|
+
const _st = "streaming";
|
|
186
|
+
const _sta = "started";
|
|
149
187
|
const _t = "type";
|
|
150
188
|
const _tI = "traceId";
|
|
189
|
+
const _tN = "toolName";
|
|
151
190
|
const _tWC = "transferWebsocketCommand";
|
|
152
191
|
const _tWE = "transcriptionWebsocketEvent";
|
|
153
192
|
const _te = "text";
|
|
154
193
|
const _ti = "time";
|
|
194
|
+
const _to = "to";
|
|
195
|
+
const _too = "tool";
|
|
196
|
+
const _tr = "transcription";
|
|
155
197
|
const _u = "uri";
|
|
156
198
|
const _v = "voices";
|
|
157
199
|
const _va = "variables";
|
|
@@ -189,11 +231,22 @@ exports.errorTypeRegistries = [
|
|
|
189
231
|
n0_registry,
|
|
190
232
|
];
|
|
191
233
|
var Mp3Audio = [0, n1, _MA, { [_mT]: _a }, 21];
|
|
234
|
+
var VoiceCallEventStreamBody = [0, n1, _VCESB, { [_st]: 1 }, 42];
|
|
192
235
|
exports.VoicePronunciation$ = [3, n2, _VP,
|
|
193
236
|
0,
|
|
194
237
|
[_p, _as, _en],
|
|
195
238
|
[0, 0, 0], 2
|
|
196
239
|
];
|
|
240
|
+
exports.AgentTranscriptionEvent$ = [3, n1, _ATE,
|
|
241
|
+
0,
|
|
242
|
+
[_t, _i, _te, _ti, _co, _f, _l],
|
|
243
|
+
[0, 0, 0, 1, 1, 2, 0], 4
|
|
244
|
+
];
|
|
245
|
+
exports.AgentTranscriptionWebsocketEvent$ = [3, n1, _ATWE,
|
|
246
|
+
0,
|
|
247
|
+
[_t, _ev],
|
|
248
|
+
[0, () => exports.AgentTranscriptionEvent$], 2
|
|
249
|
+
];
|
|
197
250
|
exports.AudioEvent$ = [3, n1, _AE,
|
|
198
251
|
0,
|
|
199
252
|
[_t, _d, _se],
|
|
@@ -231,8 +284,8 @@ exports.DescribeVoiceProtocolInput$ = [3, n1, _DVPI,
|
|
|
231
284
|
];
|
|
232
285
|
exports.DescribeVoiceProtocolOutput$ = [3, n1, _DVPO,
|
|
233
286
|
0,
|
|
234
|
-
[_cP, _aWE, _tWE, _rWE, _pWE, _iWE, _cWE, _cWEo, _sSWE, _sEWE, _eWE, _sWC, _pWC, _sWCt, _hWC, _tWC],
|
|
235
|
-
[() => exports.VoiceConnectParams$, () => exports.AudioWebsocketEvent$, () => exports.TranscriptionWebsocketEvent$, () => exports.ReplyWebsocketEvent$, () => exports.PlaybackWebsocketEvent$, () => exports.InterruptionWebsocketEvent$, () => exports.CompleteWebsocketEvent$, () => exports.ControlWebsocketEvent$, () => exports.SessionStartedWebsocketEvent$, () => exports.SessionEndedWebsocketEvent$, () => exports.ErrorWebsocketEvent$, () => exports.SayWebsocketCommand$, () => exports.PlayWebsocketCommand$, () => exports.StopWebsocketCommand$, () => exports.HangupWebsocketCommand$, () => exports.TransferWebsocketCommand$]
|
|
287
|
+
[_cP, _aWE, _tWE, _aTWE, _rWE, _pWE, _iWE, _cWE, _cWEo, _sSWE, _sEWE, _eWE, _sWC, _pWC, _sWCt, _hWC, _tWC, _cE],
|
|
288
|
+
[() => exports.VoiceConnectParams$, () => exports.AudioWebsocketEvent$, () => exports.TranscriptionWebsocketEvent$, () => exports.AgentTranscriptionWebsocketEvent$, () => exports.ReplyWebsocketEvent$, () => exports.PlaybackWebsocketEvent$, () => exports.InterruptionWebsocketEvent$, () => exports.CompleteWebsocketEvent$, () => exports.ControlWebsocketEvent$, () => exports.SessionStartedWebsocketEvent$, () => exports.SessionEndedWebsocketEvent$, () => exports.ErrorWebsocketEvent$, () => exports.SayWebsocketCommand$, () => exports.PlayWebsocketCommand$, () => exports.StopWebsocketCommand$, () => exports.HangupWebsocketCommand$, () => exports.TransferWebsocketCommand$, () => exports.VoiceCallEvent$]
|
|
236
289
|
];
|
|
237
290
|
exports.ErrorWebsocketEvent$ = [3, n1, _EWE,
|
|
238
291
|
0,
|
|
@@ -246,7 +299,7 @@ exports.HangupCommandData$ = [3, n1, _HCD,
|
|
|
246
299
|
];
|
|
247
300
|
exports.HangupWebsocketCommand$ = [3, n1, _HWC,
|
|
248
301
|
0,
|
|
249
|
-
[_t,
|
|
302
|
+
[_t, _com],
|
|
250
303
|
[0, () => exports.HangupCommandData$], 2
|
|
251
304
|
];
|
|
252
305
|
exports.InterruptionEvent$ = [3, n1, _IE,
|
|
@@ -271,7 +324,7 @@ exports.ListVoicesOutput$ = [3, n1, _LVO,
|
|
|
271
324
|
];
|
|
272
325
|
exports.PlaybackEvent$ = [3, n1, _PE,
|
|
273
326
|
0,
|
|
274
|
-
[_t, _rI, _te,
|
|
327
|
+
[_t, _rI, _te, _comp, _sT, _eT],
|
|
275
328
|
[0, 0, 0, 2, 1, 1], 5
|
|
276
329
|
];
|
|
277
330
|
exports.PlaybackWebsocketEvent$ = [3, n1, _PWE,
|
|
@@ -286,7 +339,7 @@ exports.PlayCommandData$ = [3, n1, _PCD,
|
|
|
286
339
|
];
|
|
287
340
|
exports.PlayWebsocketCommand$ = [3, n1, _PWC,
|
|
288
341
|
0,
|
|
289
|
-
[_t,
|
|
342
|
+
[_t, _com],
|
|
290
343
|
[0, () => exports.PlayCommandData$], 2
|
|
291
344
|
];
|
|
292
345
|
exports.ReplyEvent$ = [3, n1, _RE,
|
|
@@ -311,7 +364,7 @@ exports.SayCommandData$ = [3, n1, _SCD,
|
|
|
311
364
|
];
|
|
312
365
|
exports.SayWebsocketCommand$ = [3, n1, _SWC,
|
|
313
366
|
0,
|
|
314
|
-
[_t,
|
|
367
|
+
[_t, _com],
|
|
315
368
|
[0, () => exports.SayCommandData$], 2
|
|
316
369
|
];
|
|
317
370
|
exports.SendHangupInput$ = [3, n1, _SHI,
|
|
@@ -391,9 +444,19 @@ exports.StopCommandData$ = [3, n1, _SCDt,
|
|
|
391
444
|
];
|
|
392
445
|
exports.StopWebsocketCommand$ = [3, n1, _SWCt,
|
|
393
446
|
0,
|
|
394
|
-
[_t,
|
|
447
|
+
[_t, _com],
|
|
395
448
|
[0, () => exports.StopCommandData$], 2
|
|
396
449
|
];
|
|
450
|
+
exports.StreamCallEventsInput$ = [3, n1, _SCEI,
|
|
451
|
+
0,
|
|
452
|
+
[_cI, _compa, _inc],
|
|
453
|
+
[[0, 1], [0, { [_hQ]: _compa }], [64 | 0, { [_hQ]: _inc }]], 1
|
|
454
|
+
];
|
|
455
|
+
exports.StreamCallEventsOutput$ = [3, n1, _SCEO,
|
|
456
|
+
0,
|
|
457
|
+
[_eve, _cT],
|
|
458
|
+
[[() => VoiceCallEventStreamBody, 16], [0, { [_hH]: _CT }]], 2
|
|
459
|
+
];
|
|
397
460
|
exports.TextToSpeechInput$ = [3, n1, _TTSI,
|
|
398
461
|
0,
|
|
399
462
|
[_vo, _l, _te, _pro],
|
|
@@ -406,7 +469,7 @@ exports.TextToSpeechOutput$ = [3, n1, _TTSO,
|
|
|
406
469
|
];
|
|
407
470
|
exports.TranscriptionEvent$ = [3, n1, _TE,
|
|
408
471
|
0,
|
|
409
|
-
[_t, _i, _te, _ti,
|
|
472
|
+
[_t, _i, _te, _ti, _co, _f, _l],
|
|
410
473
|
[0, 0, 0, 1, 1, 2, 0], 4
|
|
411
474
|
];
|
|
412
475
|
exports.TranscriptionWebsocketEvent$ = [3, n1, _TWE,
|
|
@@ -421,7 +484,7 @@ exports.TransferCommandData$ = [3, n1, _TCD,
|
|
|
421
484
|
];
|
|
422
485
|
exports.TransferWebsocketCommand$ = [3, n1, _TWC,
|
|
423
486
|
0,
|
|
424
|
-
[_t,
|
|
487
|
+
[_t, _com],
|
|
425
488
|
[0, () => exports.TransferCommandData$], 2
|
|
426
489
|
];
|
|
427
490
|
exports.Voice$ = [3, n1, _V,
|
|
@@ -434,10 +497,60 @@ exports.VoiceAudioFormat$ = [3, n1, _VAF,
|
|
|
434
497
|
[_en, _sR, _ch],
|
|
435
498
|
[0, 1, 1], 2
|
|
436
499
|
];
|
|
500
|
+
exports.VoiceCallAgentTranscriptionEvent$ = [3, n1, _VCATE,
|
|
501
|
+
0,
|
|
502
|
+
[_i, _te, _f, _l, _ti],
|
|
503
|
+
[0, 0, 2, 0, 1], 3
|
|
504
|
+
];
|
|
505
|
+
exports.VoiceCallEndedEvent$ = [3, n1, _VCEE,
|
|
506
|
+
0,
|
|
507
|
+
[_sIe, _r],
|
|
508
|
+
[0, 0], 2
|
|
509
|
+
];
|
|
510
|
+
exports.VoiceCallInterruptionEvent$ = [3, n1, _VCIE,
|
|
511
|
+
0,
|
|
512
|
+
[_rI, _pT, _oT],
|
|
513
|
+
[0, 0, 0]
|
|
514
|
+
];
|
|
515
|
+
exports.VoiceCallLanguageEvent$ = [3, n1, _VCLE,
|
|
516
|
+
0,
|
|
517
|
+
[_to, _r, _fr],
|
|
518
|
+
[0, 0, 0], 2
|
|
519
|
+
];
|
|
520
|
+
exports.VoiceCallPlaybackEvent$ = [3, n1, _VCPE,
|
|
521
|
+
0,
|
|
522
|
+
[_rI, _comp],
|
|
523
|
+
[0, 2], 2
|
|
524
|
+
];
|
|
525
|
+
exports.VoiceCallReplyEvent$ = [3, n1, _VCRE,
|
|
526
|
+
0,
|
|
527
|
+
[_i, _te, _l],
|
|
528
|
+
[0, 0, 0], 2
|
|
529
|
+
];
|
|
530
|
+
exports.VoiceCallSayEvent$ = [3, n1, _VCSE,
|
|
531
|
+
0,
|
|
532
|
+
[_rI, _te, _in],
|
|
533
|
+
[0, 0, 2], 3
|
|
534
|
+
];
|
|
535
|
+
exports.VoiceCallStartedEvent$ = [3, n1, _VCSEo,
|
|
536
|
+
0,
|
|
537
|
+
[_sIe, _aI, _tI, _aN, _aV, _aD, _l],
|
|
538
|
+
[0, 0, 0, 0, 1, 2, 0], 2
|
|
539
|
+
];
|
|
540
|
+
exports.VoiceCallToolEvent$ = [3, n1, _VCTE,
|
|
541
|
+
0,
|
|
542
|
+
[_cI, _tN, _ph, _sM],
|
|
543
|
+
[0, 0, 0, 0], 3
|
|
544
|
+
];
|
|
545
|
+
exports.VoiceCallTranscriptionEvent$ = [3, n1, _VCTEo,
|
|
546
|
+
0,
|
|
547
|
+
[_i, _te, _f, _l, _ti],
|
|
548
|
+
[0, 0, 2, 0, 1], 3
|
|
549
|
+
];
|
|
437
550
|
exports.VoiceConnectParams$ = [3, n1, _VCP,
|
|
438
551
|
0,
|
|
439
|
-
[_sIe, _aI, _pV, _aV, _aD, _cI, _l, _cN, _cNa,
|
|
440
|
-
[0, 0, 1, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, () => exports.VoiceAudioFormat$, () => exports.VoiceAudioFormat$], 2
|
|
552
|
+
[_sIe, _aI, _pV, _aV, _aD, _cI, _fI, _dN, _l, _cN, _cNa, _cEa, _cC, _vo, _iM, _va, _iMn, _iA, _oA],
|
|
553
|
+
[0, 0, 1, 1, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, () => exports.VoiceAudioFormat$, () => exports.VoiceAudioFormat$], 2
|
|
441
554
|
];
|
|
442
555
|
exports.VoiceErrorEvent$ = [3, n1, _VEE,
|
|
443
556
|
0,
|
|
@@ -453,9 +566,15 @@ var LanguageCodeList = 64 | 0;
|
|
|
453
566
|
var VoicePronunciationList = [1, n2, _VPL,
|
|
454
567
|
0, () => exports.VoicePronunciation$
|
|
455
568
|
];
|
|
569
|
+
var VoiceCallEventIncludeList = 64 | 0;
|
|
456
570
|
var VoiceList = [1, n1, _VL,
|
|
457
571
|
0, () => exports.Voice$
|
|
458
572
|
];
|
|
573
|
+
exports.VoiceCallEvent$ = [4, n1, _VCE,
|
|
574
|
+
0,
|
|
575
|
+
[_sta, _tr, _aT, _re, _sa, _pl, _int, _l, _too, _end],
|
|
576
|
+
[() => exports.VoiceCallStartedEvent$, () => exports.VoiceCallTranscriptionEvent$, () => exports.VoiceCallAgentTranscriptionEvent$, () => exports.VoiceCallReplyEvent$, () => exports.VoiceCallSayEvent$, () => exports.VoiceCallPlaybackEvent$, () => exports.VoiceCallInterruptionEvent$, () => exports.VoiceCallLanguageEvent$, () => exports.VoiceCallToolEvent$, () => exports.VoiceCallEndedEvent$]
|
|
577
|
+
];
|
|
459
578
|
exports.DescribeVoiceProtocol$ = [9, n1, _DVP,
|
|
460
579
|
{ [_h]: ["POST", "/v2/voice/describe", 200] }, () => exports.DescribeVoiceProtocolInput$, () => exports.DescribeVoiceProtocolOutput$
|
|
461
580
|
];
|
|
@@ -477,6 +596,9 @@ exports.SendStop$ = [9, n1, _SSe,
|
|
|
477
596
|
exports.SendTransfer$ = [9, n1, _ST,
|
|
478
597
|
{ [_h]: ["POST", "/v2/voice/sessions/{sessionId}/transfer", 200] }, () => exports.SendTransferInput$, () => exports.SendTransferOutput$
|
|
479
598
|
];
|
|
599
|
+
exports.StreamCallEvents$ = [9, n1, _SCE,
|
|
600
|
+
{ [_h]: ["GET", "/v2/voice/calls/{callId}/events", 200] }, () => exports.StreamCallEventsInput$, () => exports.StreamCallEventsOutput$
|
|
601
|
+
];
|
|
480
602
|
exports.TextToSpeech$ = [9, n1, _TTS,
|
|
481
603
|
{ [_h]: ["POST", "/v2/voice/text-to-speech", 200] }, () => exports.TextToSpeechInput$, () => exports.TextToSpeechOutput$
|
|
482
604
|
];
|
package/dist-es/WilmaVoice.js
CHANGED
|
@@ -6,6 +6,7 @@ import { SendPlayCommand } from "./commands/SendPlayCommand";
|
|
|
6
6
|
import { SendSayCommand } from "./commands/SendSayCommand";
|
|
7
7
|
import { SendStopCommand } from "./commands/SendStopCommand";
|
|
8
8
|
import { SendTransferCommand, } from "./commands/SendTransferCommand";
|
|
9
|
+
import { StreamCallEventsCommand, } from "./commands/StreamCallEventsCommand";
|
|
9
10
|
import { TextToSpeechCommand, } from "./commands/TextToSpeechCommand";
|
|
10
11
|
import { WilmaVoiceClient } from "./WilmaVoiceClient";
|
|
11
12
|
const commands = {
|
|
@@ -16,6 +17,7 @@ const commands = {
|
|
|
16
17
|
SendSayCommand,
|
|
17
18
|
SendStopCommand,
|
|
18
19
|
SendTransferCommand,
|
|
20
|
+
StreamCallEventsCommand,
|
|
19
21
|
TextToSpeechCommand,
|
|
20
22
|
};
|
|
21
23
|
export class WilmaVoice extends WilmaVoiceClient {
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Command as $Command } from "@smithy/core/client";
|
|
2
|
+
import { getEndpointPlugin } from "@smithy/core/endpoints";
|
|
3
|
+
import { commonParams } from "../endpoint/EndpointParameters";
|
|
4
|
+
import { StreamCallEvents$ } from "../schemas/schemas_0";
|
|
5
|
+
export { $Command };
|
|
6
|
+
export class StreamCallEventsCommand extends $Command
|
|
7
|
+
.classBuilder()
|
|
8
|
+
.ep(commonParams)
|
|
9
|
+
.m(function (Command, cs, config, o) {
|
|
10
|
+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
11
|
+
})
|
|
12
|
+
.s("WilmaVoice", "StreamCallEvents", {})
|
|
13
|
+
.n("WilmaVoiceClient", "StreamCallEventsCommand")
|
|
14
|
+
.sc(StreamCallEvents$)
|
|
15
|
+
.build() {
|
|
16
|
+
}
|
package/dist-es/models/enums.js
CHANGED
|
@@ -3,6 +3,7 @@ export const VoicePronunciationEncoding = {
|
|
|
3
3
|
IPA: "ipa",
|
|
4
4
|
};
|
|
5
5
|
export const VoiceEventType = {
|
|
6
|
+
AGENT_TRANSCRIPTION: "agentTranscription",
|
|
6
7
|
AUDIO: "audio",
|
|
7
8
|
COMPLETE: "complete",
|
|
8
9
|
CONTROL: "control",
|
|
@@ -19,6 +20,17 @@ export const VoiceControlAction = {
|
|
|
19
20
|
END_OF_TURN: "end_of_turn",
|
|
20
21
|
KEEPALIVE: "keepalive",
|
|
21
22
|
};
|
|
23
|
+
export const VoiceCallEndReason = {
|
|
24
|
+
COMPLETE: "complete",
|
|
25
|
+
ERROR: "error",
|
|
26
|
+
HANGUP: "hangup",
|
|
27
|
+
TIMEOUT: "timeout",
|
|
28
|
+
TRANSFER: "transfer",
|
|
29
|
+
};
|
|
30
|
+
export const VoiceCallToolPhase = {
|
|
31
|
+
FINISHED: "finished",
|
|
32
|
+
STARTED: "started",
|
|
33
|
+
};
|
|
22
34
|
export const VoiceAudioEncoding = {
|
|
23
35
|
ALAW: "alaw",
|
|
24
36
|
MULAW: "mulaw",
|
|
@@ -36,3 +48,7 @@ export const VoiceCommandType = {
|
|
|
36
48
|
STOP: "stop",
|
|
37
49
|
TRANSFER: "transfer",
|
|
38
50
|
};
|
|
51
|
+
export const VoiceCallEventInclude = {
|
|
52
|
+
COMMANDS: "commands",
|
|
53
|
+
TOOLS: "tools",
|
|
54
|
+
};
|
|
@@ -2,7 +2,7 @@ import { AwsRestJsonProtocol } from "@aws-sdk/core/protocols";
|
|
|
2
2
|
import { HttpBearerAuthSigner } from "@smithy/core";
|
|
3
3
|
import { NoOpLogger } from "@smithy/core/client";
|
|
4
4
|
import { parseUrl } from "@smithy/core/protocols";
|
|
5
|
-
import { fromBase64, fromUtf8, toBase64, toUtf8 } from "@smithy/core/serde";
|
|
5
|
+
import { fromBase64, fromUtf8, sdkStreamMixin, toBase64, toUtf8 } from "@smithy/core/serde";
|
|
6
6
|
import { defaultWilmaVoiceHttpAuthSchemeProvider } from "./auth/httpAuthSchemeProvider";
|
|
7
7
|
import { defaultEndpointResolver } from "./endpoint/endpointResolver";
|
|
8
8
|
import { errorTypeRegistries } from "./schemas/schemas_0";
|
|
@@ -50,6 +50,7 @@ export const getRuntimeConfig = (config) => {
|
|
|
50
50
|
version: "v2",
|
|
51
51
|
serviceTarget: "WilmaVoice",
|
|
52
52
|
},
|
|
53
|
+
sdkStreamMixin: config?.sdkStreamMixin ?? sdkStreamMixin,
|
|
53
54
|
urlParser: config?.urlParser ?? parseUrl,
|
|
54
55
|
utf8Decoder: config?.utf8Decoder ?? fromUtf8,
|
|
55
56
|
utf8Encoder: config?.utf8Encoder ?? toUtf8,
|