@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
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { Command as $Command } from "@smithy/core/client";
|
|
2
|
+
import type { MetadataBearer as __MetadataBearer, StreamingBlobPayloadOutputTypes } from "@smithy/types";
|
|
3
|
+
import type { StreamCallEventsInput, StreamCallEventsOutput } from "../models/models_0";
|
|
4
|
+
import type { ServiceInputTypes, ServiceOutputTypes, WilmaVoiceClientResolvedConfig } from "../WilmaVoiceClient";
|
|
5
|
+
/**
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export type { __MetadataBearer };
|
|
9
|
+
export { $Command };
|
|
10
|
+
/**
|
|
11
|
+
* @public
|
|
12
|
+
*
|
|
13
|
+
* The input for {@link StreamCallEventsCommand}.
|
|
14
|
+
*/
|
|
15
|
+
export interface StreamCallEventsCommandInput extends StreamCallEventsInput {
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @public
|
|
19
|
+
*
|
|
20
|
+
* The output of {@link StreamCallEventsCommand}.
|
|
21
|
+
*/
|
|
22
|
+
export interface StreamCallEventsCommandOutput extends Omit<StreamCallEventsOutput, "events">, __MetadataBearer {
|
|
23
|
+
events: StreamingBlobPayloadOutputTypes;
|
|
24
|
+
}
|
|
25
|
+
declare const StreamCallEventsCommand_base: {
|
|
26
|
+
new (input: StreamCallEventsCommandInput): import("@smithy/core/client").CommandImpl<StreamCallEventsCommandInput, StreamCallEventsCommandOutput, WilmaVoiceClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
27
|
+
new (input: StreamCallEventsCommandInput): import("@smithy/core/client").CommandImpl<StreamCallEventsCommandInput, StreamCallEventsCommandOutput, WilmaVoiceClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
28
|
+
getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
|
|
29
|
+
};
|
|
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. `include=tools` adds tool events and is honoured only for management-class callers.
|
|
32
|
+
* @example
|
|
33
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
34
|
+
* ```javascript
|
|
35
|
+
* import { WilmaVoiceClient, StreamCallEventsCommand } from "@wildix/wilma-voice-client"; // ES Modules import
|
|
36
|
+
* // const { WilmaVoiceClient, StreamCallEventsCommand } = require("@wildix/wilma-voice-client"); // CommonJS import
|
|
37
|
+
* // import type { WilmaVoiceClientConfig } from "@wildix/wilma-voice-client";
|
|
38
|
+
* const config = {}; // type is WilmaVoiceClientConfig
|
|
39
|
+
* const client = new WilmaVoiceClient(config);
|
|
40
|
+
* const input = { // StreamCallEventsInput
|
|
41
|
+
* callId: "STRING_VALUE", // required
|
|
42
|
+
* company: "STRING_VALUE",
|
|
43
|
+
* include: [ // VoiceCallEventIncludeList
|
|
44
|
+
* "commands" || "tools",
|
|
45
|
+
* ],
|
|
46
|
+
* };
|
|
47
|
+
* const command = new StreamCallEventsCommand(input);
|
|
48
|
+
* const response = await client.send(command);
|
|
49
|
+
* // consume or destroy the stream to free the socket.
|
|
50
|
+
* const bytes = await response.events.transformToByteArray();
|
|
51
|
+
* // const str = await response.events.transformToString();
|
|
52
|
+
* // response.events.destroy(); // only applicable to Node.js Readable streams.
|
|
53
|
+
*
|
|
54
|
+
* // { // StreamCallEventsOutput
|
|
55
|
+
* // events: "<SdkStream>", // see \@smithy/types -> StreamingBlobPayloadOutputTypes // required
|
|
56
|
+
* // contentType: "STRING_VALUE", // required
|
|
57
|
+
* // };
|
|
58
|
+
*
|
|
59
|
+
* ```
|
|
60
|
+
*
|
|
61
|
+
* @param StreamCallEventsCommandInput - {@link StreamCallEventsCommandInput}
|
|
62
|
+
* @returns {@link StreamCallEventsCommandOutput}
|
|
63
|
+
* @see {@link StreamCallEventsCommandInput} for command's `input` shape.
|
|
64
|
+
* @see {@link StreamCallEventsCommandOutput} for command's `response` shape.
|
|
65
|
+
* @see {@link WilmaVoiceClientResolvedConfig | config} for WilmaVoiceClient's `config` shape.
|
|
66
|
+
*
|
|
67
|
+
* @throws {@link NotFoundException} (client fault)
|
|
68
|
+
*
|
|
69
|
+
* @throws {@link ValidationException} (client fault)
|
|
70
|
+
*
|
|
71
|
+
* @throws {@link ForbiddenException} (client fault)
|
|
72
|
+
*
|
|
73
|
+
* @throws {@link WilmaVoiceServiceException}
|
|
74
|
+
* <p>Base exception class for all service exceptions from WilmaVoice service.</p>
|
|
75
|
+
*
|
|
76
|
+
*
|
|
77
|
+
* @public
|
|
78
|
+
*/
|
|
79
|
+
export declare class StreamCallEventsCommand extends StreamCallEventsCommand_base {
|
|
80
|
+
/** @internal type navigation helper, not in runtime. */
|
|
81
|
+
protected static __types: {
|
|
82
|
+
api: {
|
|
83
|
+
input: StreamCallEventsInput;
|
|
84
|
+
output: StreamCallEventsOutput;
|
|
85
|
+
};
|
|
86
|
+
sdk: {
|
|
87
|
+
input: StreamCallEventsCommandInput;
|
|
88
|
+
output: StreamCallEventsCommandOutput;
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
}
|
|
@@ -21,6 +21,7 @@ export type VoicePronunciationEncoding = (typeof VoicePronunciationEncoding)[key
|
|
|
21
21
|
* @enum
|
|
22
22
|
*/
|
|
23
23
|
export declare const VoiceEventType: {
|
|
24
|
+
readonly AGENT_TRANSCRIPTION: "agentTranscription";
|
|
24
25
|
readonly AUDIO: "audio";
|
|
25
26
|
readonly COMPLETE: "complete";
|
|
26
27
|
readonly CONTROL: "control";
|
|
@@ -58,6 +59,33 @@ export declare const VoiceControlAction: {
|
|
|
58
59
|
* @public
|
|
59
60
|
*/
|
|
60
61
|
export type VoiceControlAction = (typeof VoiceControlAction)[keyof typeof VoiceControlAction];
|
|
62
|
+
/**
|
|
63
|
+
* @public
|
|
64
|
+
* @enum
|
|
65
|
+
*/
|
|
66
|
+
export declare const VoiceCallEndReason: {
|
|
67
|
+
readonly COMPLETE: "complete";
|
|
68
|
+
readonly ERROR: "error";
|
|
69
|
+
readonly HANGUP: "hangup";
|
|
70
|
+
readonly TIMEOUT: "timeout";
|
|
71
|
+
readonly TRANSFER: "transfer";
|
|
72
|
+
};
|
|
73
|
+
/**
|
|
74
|
+
* @public
|
|
75
|
+
*/
|
|
76
|
+
export type VoiceCallEndReason = (typeof VoiceCallEndReason)[keyof typeof VoiceCallEndReason];
|
|
77
|
+
/**
|
|
78
|
+
* @public
|
|
79
|
+
* @enum
|
|
80
|
+
*/
|
|
81
|
+
export declare const VoiceCallToolPhase: {
|
|
82
|
+
readonly FINISHED: "finished";
|
|
83
|
+
readonly STARTED: "started";
|
|
84
|
+
};
|
|
85
|
+
/**
|
|
86
|
+
* @public
|
|
87
|
+
*/
|
|
88
|
+
export type VoiceCallToolPhase = (typeof VoiceCallToolPhase)[keyof typeof VoiceCallToolPhase];
|
|
61
89
|
/**
|
|
62
90
|
* @public
|
|
63
91
|
* @enum
|
|
@@ -117,3 +145,15 @@ export declare const VoiceCommandType: {
|
|
|
117
145
|
* @public
|
|
118
146
|
*/
|
|
119
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
|
-
import type { DocumentType as __DocumentType } from "@smithy/types";
|
|
2
|
-
import type { VoiceAudioEncoding, VoiceCommandType, VoiceControlAction, VoiceEventType, VoiceInputMode, VoicePronunciationEncoding } from "./enums";
|
|
1
|
+
import type { DocumentType as __DocumentType, StreamingBlobTypes } from "@smithy/types";
|
|
2
|
+
import type { VoiceAudioEncoding, VoiceCallEndReason, VoiceCallEventInclude, 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
|
|
@@ -24,6 +24,51 @@ export interface VoicePronunciation {
|
|
|
24
24
|
*/
|
|
25
25
|
encoding?: VoicePronunciationEncoding | undefined;
|
|
26
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* A recogniser result for the agent's own leg — what the caller hears. Sent by the PBX for new-stack agents only, from the same dual-channel stream that transcribes the caller. Never starts a turn.
|
|
29
|
+
* @public
|
|
30
|
+
*/
|
|
31
|
+
export interface AgentTranscriptionEvent {
|
|
32
|
+
/**
|
|
33
|
+
* Discriminator for the inner payload of an `event` frame.
|
|
34
|
+
* @public
|
|
35
|
+
*/
|
|
36
|
+
type: VoiceEventType;
|
|
37
|
+
/**
|
|
38
|
+
* Identifier of a transcription chunk within a session.
|
|
39
|
+
* @public
|
|
40
|
+
*/
|
|
41
|
+
id: string;
|
|
42
|
+
text: string;
|
|
43
|
+
/**
|
|
44
|
+
* Transcription confidence score (accuracy level) in range from 0.0 to 1.0. Value -1.0 indicates confidence is unavailable.
|
|
45
|
+
* @public
|
|
46
|
+
*/
|
|
47
|
+
confidence?: number | undefined;
|
|
48
|
+
/**
|
|
49
|
+
* True when this is the final transcript for the utterance rather than an interim hypothesis.
|
|
50
|
+
* @public
|
|
51
|
+
*/
|
|
52
|
+
final?: boolean | undefined;
|
|
53
|
+
/**
|
|
54
|
+
* Language the recogniser identified for this chunk. Recorded in the trace only — it drives no behavior.
|
|
55
|
+
* @public
|
|
56
|
+
*/
|
|
57
|
+
language?: string | undefined;
|
|
58
|
+
time: number;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Envelope of a WebSocket event frame: `\{ "type": "event", "event": \{ ... \} \}`.
|
|
62
|
+
* @public
|
|
63
|
+
*/
|
|
64
|
+
export interface AgentTranscriptionWebsocketEvent {
|
|
65
|
+
type: string;
|
|
66
|
+
/**
|
|
67
|
+
* A recogniser result for the agent's own leg — what the caller hears. Sent by the PBX for new-stack agents only, from the same dual-channel stream that transcribes the caller. Never starts a turn.
|
|
68
|
+
* @public
|
|
69
|
+
*/
|
|
70
|
+
event: AgentTranscriptionEvent;
|
|
71
|
+
}
|
|
27
72
|
/**
|
|
28
73
|
* A chunk of raw caller audio, base64-encoded in the session's negotiated input format
|
|
29
74
|
* (inputAudio from the connect handshake). Used by web/app clients in AUDIO input mode; the
|
|
@@ -115,6 +160,348 @@ export interface ControlWebsocketEvent {
|
|
|
115
160
|
*/
|
|
116
161
|
export interface DescribeVoiceProtocolInput {
|
|
117
162
|
}
|
|
163
|
+
/**
|
|
164
|
+
* A recogniser result for the AGENT's own leg — what the caller actually heard. Same semantics as VoiceCallTranscriptionEvent; an interrupted reply simply stops.
|
|
165
|
+
* @public
|
|
166
|
+
*/
|
|
167
|
+
export interface VoiceCallAgentTranscriptionEvent {
|
|
168
|
+
id: string;
|
|
169
|
+
text: string;
|
|
170
|
+
final: boolean;
|
|
171
|
+
language?: string | undefined;
|
|
172
|
+
time?: number | undefined;
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* The session ended. After `transfer` another session of the same call may follow with its own `started`.
|
|
176
|
+
* @public
|
|
177
|
+
*/
|
|
178
|
+
export interface VoiceCallEndedEvent {
|
|
179
|
+
/**
|
|
180
|
+
* Caller-facing voice session identifier, unique per connection. Supplied by the client at connect (the PBX call/session id, or a client-generated id for web sessions).
|
|
181
|
+
* @public
|
|
182
|
+
*/
|
|
183
|
+
sessionId: string;
|
|
184
|
+
reason: VoiceCallEndReason;
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* The caller talked over the agent. `playedText` is what they heard before the cut.
|
|
188
|
+
* @public
|
|
189
|
+
*/
|
|
190
|
+
export interface VoiceCallInterruptionEvent {
|
|
191
|
+
replyId?: string | undefined;
|
|
192
|
+
playedText?: string | undefined;
|
|
193
|
+
originalText?: string | undefined;
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* The conversation language changed on a recognised utterance.
|
|
197
|
+
* @public
|
|
198
|
+
*/
|
|
199
|
+
export interface VoiceCallLanguageEvent {
|
|
200
|
+
from?: string | undefined;
|
|
201
|
+
to: string;
|
|
202
|
+
reason: string;
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* The PBX finished (or abandoned) playing a reply.
|
|
206
|
+
* @public
|
|
207
|
+
*/
|
|
208
|
+
export interface VoiceCallPlaybackEvent {
|
|
209
|
+
replyId: string;
|
|
210
|
+
complete: boolean;
|
|
211
|
+
}
|
|
212
|
+
/**
|
|
213
|
+
* The caller's completed utterance that started a turn — after the runtime's filler and duplicate filter.
|
|
214
|
+
* @public
|
|
215
|
+
*/
|
|
216
|
+
export interface VoiceCallReplyEvent {
|
|
217
|
+
id: string;
|
|
218
|
+
text: string;
|
|
219
|
+
language?: string | undefined;
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* One sentence the agent speaks, as it is handed to the PBX (after playback sanitizing). Sentences of one reply share `replyId`.
|
|
223
|
+
* @public
|
|
224
|
+
*/
|
|
225
|
+
export interface VoiceCallSayEvent {
|
|
226
|
+
replyId: string;
|
|
227
|
+
text: string;
|
|
228
|
+
interruptible: boolean;
|
|
229
|
+
}
|
|
230
|
+
/**
|
|
231
|
+
* The session that answered the call, sent once per session of the call (a transfer starts another).
|
|
232
|
+
* @public
|
|
233
|
+
*/
|
|
234
|
+
export interface VoiceCallStartedEvent {
|
|
235
|
+
/**
|
|
236
|
+
* Caller-facing voice session identifier, unique per connection. Supplied by the client at connect (the PBX call/session id, or a client-generated id for web sessions).
|
|
237
|
+
* @public
|
|
238
|
+
*/
|
|
239
|
+
sessionId: string;
|
|
240
|
+
/**
|
|
241
|
+
* The session's trace, for the LLM-level detail this stream deliberately omits. Absent for a built-in agent, whose trace is not the tenant's to read.
|
|
242
|
+
* @public
|
|
243
|
+
*/
|
|
244
|
+
traceId?: string | undefined;
|
|
245
|
+
agentId: string;
|
|
246
|
+
agentName?: string | undefined;
|
|
247
|
+
/**
|
|
248
|
+
* Published agent version number. Monotonic within an agent's version history, starting at 1.
|
|
249
|
+
* @public
|
|
250
|
+
*/
|
|
251
|
+
agentVersion?: number | undefined;
|
|
252
|
+
/**
|
|
253
|
+
* True when the session runs the agent's draft.
|
|
254
|
+
* @public
|
|
255
|
+
*/
|
|
256
|
+
agentDraft?: boolean | undefined;
|
|
257
|
+
/**
|
|
258
|
+
* BCP-47 language the call started in.
|
|
259
|
+
* @public
|
|
260
|
+
*/
|
|
261
|
+
language?: string | undefined;
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
* A tool call the agent made during a turn. Name and phase only — arguments and results live in the trace. Sent only to management callers that asked for `include=tools`.
|
|
265
|
+
* @public
|
|
266
|
+
*/
|
|
267
|
+
export interface VoiceCallToolEvent {
|
|
268
|
+
callId: string;
|
|
269
|
+
toolName: string;
|
|
270
|
+
phase: VoiceCallToolPhase;
|
|
271
|
+
/**
|
|
272
|
+
* The phrase spoken while the tool runs, when the capability configures one.
|
|
273
|
+
* @public
|
|
274
|
+
*/
|
|
275
|
+
startMessage?: string | undefined;
|
|
276
|
+
}
|
|
277
|
+
/**
|
|
278
|
+
* A recogniser result for the caller's speech. Interim results (`final: false`) are replaced by the final one with the same `id`.
|
|
279
|
+
* @public
|
|
280
|
+
*/
|
|
281
|
+
export interface VoiceCallTranscriptionEvent {
|
|
282
|
+
id: string;
|
|
283
|
+
text: string;
|
|
284
|
+
final: boolean;
|
|
285
|
+
language?: string | undefined;
|
|
286
|
+
/**
|
|
287
|
+
* Milliseconds since the call started, as the PBX stamps it.
|
|
288
|
+
* @public
|
|
289
|
+
*/
|
|
290
|
+
time?: number | undefined;
|
|
291
|
+
}
|
|
292
|
+
/**
|
|
293
|
+
* One event on a live call. The SSE frame's `event:` is the member name and `data:` the member's JSON.
|
|
294
|
+
* @public
|
|
295
|
+
*/
|
|
296
|
+
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;
|
|
297
|
+
/**
|
|
298
|
+
* @public
|
|
299
|
+
*/
|
|
300
|
+
export declare namespace VoiceCallEvent {
|
|
301
|
+
/**
|
|
302
|
+
* The session that answered the call, sent once per session of the call (a transfer starts another).
|
|
303
|
+
* @public
|
|
304
|
+
*/
|
|
305
|
+
interface StartedMember {
|
|
306
|
+
started: VoiceCallStartedEvent;
|
|
307
|
+
transcription?: never;
|
|
308
|
+
agentTranscription?: never;
|
|
309
|
+
reply?: never;
|
|
310
|
+
say?: never;
|
|
311
|
+
playback?: never;
|
|
312
|
+
interruption?: never;
|
|
313
|
+
language?: never;
|
|
314
|
+
tool?: never;
|
|
315
|
+
ended?: never;
|
|
316
|
+
$unknown?: never;
|
|
317
|
+
}
|
|
318
|
+
/**
|
|
319
|
+
* A recogniser result for the caller's speech. Interim results (`final: false`) are replaced by the final one with the same `id`.
|
|
320
|
+
* @public
|
|
321
|
+
*/
|
|
322
|
+
interface TranscriptionMember {
|
|
323
|
+
started?: never;
|
|
324
|
+
transcription: VoiceCallTranscriptionEvent;
|
|
325
|
+
agentTranscription?: never;
|
|
326
|
+
reply?: never;
|
|
327
|
+
say?: never;
|
|
328
|
+
playback?: never;
|
|
329
|
+
interruption?: never;
|
|
330
|
+
language?: never;
|
|
331
|
+
tool?: never;
|
|
332
|
+
ended?: never;
|
|
333
|
+
$unknown?: never;
|
|
334
|
+
}
|
|
335
|
+
/**
|
|
336
|
+
* A recogniser result for the AGENT's own leg — what the caller actually heard. Same semantics as VoiceCallTranscriptionEvent; an interrupted reply simply stops.
|
|
337
|
+
* @public
|
|
338
|
+
*/
|
|
339
|
+
interface AgentTranscriptionMember {
|
|
340
|
+
started?: never;
|
|
341
|
+
transcription?: never;
|
|
342
|
+
agentTranscription: VoiceCallAgentTranscriptionEvent;
|
|
343
|
+
reply?: never;
|
|
344
|
+
say?: never;
|
|
345
|
+
playback?: never;
|
|
346
|
+
interruption?: never;
|
|
347
|
+
language?: never;
|
|
348
|
+
tool?: never;
|
|
349
|
+
ended?: never;
|
|
350
|
+
$unknown?: never;
|
|
351
|
+
}
|
|
352
|
+
/**
|
|
353
|
+
* The caller's completed utterance that started a turn — after the runtime's filler and duplicate filter.
|
|
354
|
+
* @public
|
|
355
|
+
*/
|
|
356
|
+
interface ReplyMember {
|
|
357
|
+
started?: never;
|
|
358
|
+
transcription?: never;
|
|
359
|
+
agentTranscription?: never;
|
|
360
|
+
reply: VoiceCallReplyEvent;
|
|
361
|
+
say?: never;
|
|
362
|
+
playback?: never;
|
|
363
|
+
interruption?: never;
|
|
364
|
+
language?: never;
|
|
365
|
+
tool?: never;
|
|
366
|
+
ended?: never;
|
|
367
|
+
$unknown?: never;
|
|
368
|
+
}
|
|
369
|
+
/**
|
|
370
|
+
* One sentence the agent speaks, as it is handed to the PBX (after playback sanitizing). Sentences of one reply share `replyId`.
|
|
371
|
+
* @public
|
|
372
|
+
*/
|
|
373
|
+
interface SayMember {
|
|
374
|
+
started?: never;
|
|
375
|
+
transcription?: never;
|
|
376
|
+
agentTranscription?: never;
|
|
377
|
+
reply?: never;
|
|
378
|
+
say: VoiceCallSayEvent;
|
|
379
|
+
playback?: never;
|
|
380
|
+
interruption?: never;
|
|
381
|
+
language?: never;
|
|
382
|
+
tool?: never;
|
|
383
|
+
ended?: never;
|
|
384
|
+
$unknown?: never;
|
|
385
|
+
}
|
|
386
|
+
/**
|
|
387
|
+
* The PBX finished (or abandoned) playing a reply.
|
|
388
|
+
* @public
|
|
389
|
+
*/
|
|
390
|
+
interface PlaybackMember {
|
|
391
|
+
started?: never;
|
|
392
|
+
transcription?: never;
|
|
393
|
+
agentTranscription?: never;
|
|
394
|
+
reply?: never;
|
|
395
|
+
say?: never;
|
|
396
|
+
playback: VoiceCallPlaybackEvent;
|
|
397
|
+
interruption?: never;
|
|
398
|
+
language?: never;
|
|
399
|
+
tool?: never;
|
|
400
|
+
ended?: never;
|
|
401
|
+
$unknown?: never;
|
|
402
|
+
}
|
|
403
|
+
/**
|
|
404
|
+
* The caller talked over the agent. `playedText` is what they heard before the cut.
|
|
405
|
+
* @public
|
|
406
|
+
*/
|
|
407
|
+
interface InterruptionMember {
|
|
408
|
+
started?: never;
|
|
409
|
+
transcription?: never;
|
|
410
|
+
agentTranscription?: never;
|
|
411
|
+
reply?: never;
|
|
412
|
+
say?: never;
|
|
413
|
+
playback?: never;
|
|
414
|
+
interruption: VoiceCallInterruptionEvent;
|
|
415
|
+
language?: never;
|
|
416
|
+
tool?: never;
|
|
417
|
+
ended?: never;
|
|
418
|
+
$unknown?: never;
|
|
419
|
+
}
|
|
420
|
+
/**
|
|
421
|
+
* The conversation language changed on a recognised utterance.
|
|
422
|
+
* @public
|
|
423
|
+
*/
|
|
424
|
+
interface LanguageMember {
|
|
425
|
+
started?: never;
|
|
426
|
+
transcription?: never;
|
|
427
|
+
agentTranscription?: never;
|
|
428
|
+
reply?: never;
|
|
429
|
+
say?: never;
|
|
430
|
+
playback?: never;
|
|
431
|
+
interruption?: never;
|
|
432
|
+
language: VoiceCallLanguageEvent;
|
|
433
|
+
tool?: never;
|
|
434
|
+
ended?: never;
|
|
435
|
+
$unknown?: never;
|
|
436
|
+
}
|
|
437
|
+
/**
|
|
438
|
+
* A tool call the agent made during a turn. Name and phase only — arguments and results live in the trace. Sent only to management callers that asked for `include=tools`.
|
|
439
|
+
* @public
|
|
440
|
+
*/
|
|
441
|
+
interface ToolMember {
|
|
442
|
+
started?: never;
|
|
443
|
+
transcription?: never;
|
|
444
|
+
agentTranscription?: never;
|
|
445
|
+
reply?: never;
|
|
446
|
+
say?: never;
|
|
447
|
+
playback?: never;
|
|
448
|
+
interruption?: never;
|
|
449
|
+
language?: never;
|
|
450
|
+
tool: VoiceCallToolEvent;
|
|
451
|
+
ended?: never;
|
|
452
|
+
$unknown?: never;
|
|
453
|
+
}
|
|
454
|
+
/**
|
|
455
|
+
* The session ended. After `transfer` another session of the same call may follow with its own `started`.
|
|
456
|
+
* @public
|
|
457
|
+
*/
|
|
458
|
+
interface EndedMember {
|
|
459
|
+
started?: never;
|
|
460
|
+
transcription?: never;
|
|
461
|
+
agentTranscription?: never;
|
|
462
|
+
reply?: never;
|
|
463
|
+
say?: never;
|
|
464
|
+
playback?: never;
|
|
465
|
+
interruption?: never;
|
|
466
|
+
language?: never;
|
|
467
|
+
tool?: never;
|
|
468
|
+
ended: VoiceCallEndedEvent;
|
|
469
|
+
$unknown?: never;
|
|
470
|
+
}
|
|
471
|
+
/**
|
|
472
|
+
* @public
|
|
473
|
+
*/
|
|
474
|
+
interface $UnknownMember {
|
|
475
|
+
started?: never;
|
|
476
|
+
transcription?: never;
|
|
477
|
+
agentTranscription?: never;
|
|
478
|
+
reply?: never;
|
|
479
|
+
say?: never;
|
|
480
|
+
playback?: never;
|
|
481
|
+
interruption?: never;
|
|
482
|
+
language?: never;
|
|
483
|
+
tool?: never;
|
|
484
|
+
ended?: never;
|
|
485
|
+
$unknown: [string, any];
|
|
486
|
+
}
|
|
487
|
+
/**
|
|
488
|
+
* @deprecated unused in schema-serde mode.
|
|
489
|
+
*
|
|
490
|
+
*/
|
|
491
|
+
interface Visitor<T> {
|
|
492
|
+
started: (value: VoiceCallStartedEvent) => T;
|
|
493
|
+
transcription: (value: VoiceCallTranscriptionEvent) => T;
|
|
494
|
+
agentTranscription: (value: VoiceCallAgentTranscriptionEvent) => T;
|
|
495
|
+
reply: (value: VoiceCallReplyEvent) => T;
|
|
496
|
+
say: (value: VoiceCallSayEvent) => T;
|
|
497
|
+
playback: (value: VoiceCallPlaybackEvent) => T;
|
|
498
|
+
interruption: (value: VoiceCallInterruptionEvent) => T;
|
|
499
|
+
language: (value: VoiceCallLanguageEvent) => T;
|
|
500
|
+
tool: (value: VoiceCallToolEvent) => T;
|
|
501
|
+
ended: (value: VoiceCallEndedEvent) => T;
|
|
502
|
+
_: (name: string, value: any) => T;
|
|
503
|
+
}
|
|
504
|
+
}
|
|
118
505
|
/**
|
|
119
506
|
* A PCM/compressed audio format description.
|
|
120
507
|
* @public
|
|
@@ -157,7 +544,7 @@ export interface VoiceConnectParams {
|
|
|
157
544
|
*/
|
|
158
545
|
agentId: string;
|
|
159
546
|
/**
|
|
160
|
-
* Published agent version to run. Mutually exclusive with agentDraft. When neither is set, the agent's deployment configuration selects the version.
|
|
547
|
+
* Published agent version to run. Mutually exclusive with agentDraft. When neither is set, the agent's deployment configuration selects the version. The PBX sends it only for a preview number (`<agentId>-vN`, WMS-27502); a customer call never carries it.
|
|
161
548
|
* @public
|
|
162
549
|
*/
|
|
163
550
|
agentVersion?: number | undefined;
|
|
@@ -171,6 +558,16 @@ export interface VoiceConnectParams {
|
|
|
171
558
|
* @public
|
|
172
559
|
*/
|
|
173
560
|
callId?: string | undefined;
|
|
561
|
+
/**
|
|
562
|
+
* Leg of the PBX call inside `callId` (pbx-data-engine's flow index). Kept on the session as metadata beside `callId` and `dialedNumber`; never interpreted by the runtime.
|
|
563
|
+
* @public
|
|
564
|
+
*/
|
|
565
|
+
flowIndex?: number | undefined;
|
|
566
|
+
/**
|
|
567
|
+
* The number the caller dialled to reach the agent. Kept on the session as metadata beside `callId` and `flowIndex`.
|
|
568
|
+
* @public
|
|
569
|
+
*/
|
|
570
|
+
dialedNumber?: string | undefined;
|
|
174
571
|
/**
|
|
175
572
|
* BCP-47 language of the conversation, e.g. 'en-US'.
|
|
176
573
|
* @public
|
|
@@ -738,6 +1135,11 @@ export interface DescribeVoiceProtocolOutput {
|
|
|
738
1135
|
* @public
|
|
739
1136
|
*/
|
|
740
1137
|
transcriptionWebsocketEvent?: TranscriptionWebsocketEvent | undefined;
|
|
1138
|
+
/**
|
|
1139
|
+
* Envelope of a WebSocket event frame: `\{ "type": "event", "event": \{ ... \} \}`.
|
|
1140
|
+
* @public
|
|
1141
|
+
*/
|
|
1142
|
+
agentTranscriptionWebsocketEvent?: AgentTranscriptionWebsocketEvent | undefined;
|
|
741
1143
|
/**
|
|
742
1144
|
* Envelope of a WebSocket event frame: `\{ "type": "event", "event": \{ ... \} \}`.
|
|
743
1145
|
* @public
|
|
@@ -803,6 +1205,11 @@ export interface DescribeVoiceProtocolOutput {
|
|
|
803
1205
|
* @public
|
|
804
1206
|
*/
|
|
805
1207
|
transferWebsocketCommand?: TransferWebsocketCommand | undefined;
|
|
1208
|
+
/**
|
|
1209
|
+
* One event of the StreamCallEvents SSE stream (`event:` is the member name, `data:` its JSON). Listed here so the generated SDKs carry the union; the stream body itself is an opaque byte stream.
|
|
1210
|
+
* @public
|
|
1211
|
+
*/
|
|
1212
|
+
callEvent?: VoiceCallEvent | undefined;
|
|
806
1213
|
}
|
|
807
1214
|
/**
|
|
808
1215
|
* @public
|
|
@@ -986,6 +1393,33 @@ export interface SendTransferInput {
|
|
|
986
1393
|
*/
|
|
987
1394
|
export interface SendTransferOutput {
|
|
988
1395
|
}
|
|
1396
|
+
/**
|
|
1397
|
+
* @public
|
|
1398
|
+
*/
|
|
1399
|
+
export interface StreamCallEventsInput {
|
|
1400
|
+
/**
|
|
1401
|
+
* The PBX call id (LinkedID) — `callId` of the voice session's connect query, and the SIP `X-Session-ID` header the caller's own leg received.
|
|
1402
|
+
* @public
|
|
1403
|
+
*/
|
|
1404
|
+
callId: string;
|
|
1405
|
+
/**
|
|
1406
|
+
* Owning company. Only S2S callers may set it; every other token carries its company.
|
|
1407
|
+
* @public
|
|
1408
|
+
*/
|
|
1409
|
+
company?: string | undefined;
|
|
1410
|
+
include?: VoiceCallEventInclude[] | undefined;
|
|
1411
|
+
}
|
|
1412
|
+
/**
|
|
1413
|
+
* @public
|
|
1414
|
+
*/
|
|
1415
|
+
export interface StreamCallEventsOutput {
|
|
1416
|
+
/**
|
|
1417
|
+
* Raw Server-Sent Events byte stream (`text/event-stream`). Each frame carries one VoiceCallEvent: `id:` is a per-connection counter (there is no replay), `event:` the union member name, `data:` the JSON document of the union value, e.g. `\{"say": \{...\}\}`.
|
|
1418
|
+
* @public
|
|
1419
|
+
*/
|
|
1420
|
+
events: StreamingBlobTypes;
|
|
1421
|
+
contentType: string;
|
|
1422
|
+
}
|
|
989
1423
|
/**
|
|
990
1424
|
* @public
|
|
991
1425
|
*/
|
|
@@ -29,6 +29,7 @@ export declare const getRuntimeConfig: (config: WilmaVoiceClientConfig) => {
|
|
|
29
29
|
profile?: string;
|
|
30
30
|
logger: import("@smithy/types").Logger;
|
|
31
31
|
extensions: import("./runtimeExtensions").RuntimeExtension[];
|
|
32
|
+
sdkStreamMixin: import("@smithy/types").SdkStreamMixinInjector;
|
|
32
33
|
customUserAgent?: string | import("@smithy/types").UserAgent;
|
|
33
34
|
userAgentAppId?: string | undefined | import("@smithy/types").Provider<string | undefined>;
|
|
34
35
|
retryStrategy?: import("@smithy/types").RetryStrategy | import("@smithy/types").RetryStrategyV2;
|
|
@@ -30,6 +30,7 @@ export declare const getRuntimeConfig: (config: WilmaVoiceClientConfig) => {
|
|
|
30
30
|
profile?: string;
|
|
31
31
|
logger: import("@smithy/types").Logger;
|
|
32
32
|
extensions: import("./runtimeExtensions").RuntimeExtension[];
|
|
33
|
+
sdkStreamMixin: import("@smithy/types").SdkStreamMixinInjector;
|
|
33
34
|
customUserAgent?: string | import("@smithy/types").UserAgent;
|
|
34
35
|
retryStrategy?: import("@smithy/types").RetryStrategy | import("@smithy/types").RetryStrategyV2;
|
|
35
36
|
endpoint?: ((string | import("@smithy/types").Endpoint | import("@smithy/types").Provider<import("@smithy/types").Endpoint> | import("@smithy/types").EndpointV2 | import("@smithy/types").Provider<import("@smithy/types").EndpointV2>) & (string | import("@smithy/types").Provider<string> | import("@smithy/types").Endpoint | import("@smithy/types").Provider<import("@smithy/types").Endpoint> | import("@smithy/types").EndpointV2 | import("@smithy/types").Provider<import("@smithy/types").EndpointV2>)) | undefined;
|
|
@@ -29,6 +29,7 @@ export declare const getRuntimeConfig: (config: WilmaVoiceClientConfig) => {
|
|
|
29
29
|
logger: import("@smithy/types").Logger;
|
|
30
30
|
extensions: import("./runtimeExtensions").RuntimeExtension[];
|
|
31
31
|
defaultsMode: import("@smithy/core/client").DefaultsMode | import("@smithy/types").Provider<import("@smithy/core/client").DefaultsMode>;
|
|
32
|
+
sdkStreamMixin: import("@smithy/types").SdkStreamMixinInjector;
|
|
32
33
|
customUserAgent?: string | import("@smithy/types").UserAgent;
|
|
33
34
|
userAgentAppId?: string | undefined | import("@smithy/types").Provider<string | undefined>;
|
|
34
35
|
retryStrategy?: import("@smithy/types").RetryStrategy | import("@smithy/types").RetryStrategyV2;
|
|
@@ -26,6 +26,7 @@ export declare const getRuntimeConfig: (config: WilmaVoiceClientConfig) => {
|
|
|
26
26
|
[setting: string]: unknown;
|
|
27
27
|
defaultNamespace?: string;
|
|
28
28
|
};
|
|
29
|
+
sdkStreamMixin: import("@smithy/types").SdkStreamMixinInjector;
|
|
29
30
|
urlParser: import("@smithy/types").UrlParser;
|
|
30
31
|
utf8Decoder: import("@smithy/types").Decoder;
|
|
31
32
|
utf8Encoder: (input: Uint8Array | string) => string;
|