@wildix/wilma-voice-client 0.0.40 → 0.0.42

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.
@@ -6,6 +6,7 @@ import { type RetryInputConfig, type RetryResolvedConfig } from "@smithy/core/re
6
6
  import type { BodyLengthCalculator as __BodyLengthCalculator, CheckOptionalClientConfig as __CheckOptionalClientConfig, ChecksumConstructor as __ChecksumConstructor, Decoder as __Decoder, Encoder as __Encoder, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, Logger as __Logger, Provider as __Provider, SdkStreamMixinInjector as __SdkStreamMixinInjector, StreamCollector as __StreamCollector, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@smithy/types";
7
7
  import { type HttpAuthSchemeInputConfig, type HttpAuthSchemeResolvedConfig } from "./auth/httpAuthSchemeProvider";
8
8
  import type { DescribeVoiceProtocolCommandInput, DescribeVoiceProtocolCommandOutput } from "./commands/DescribeVoiceProtocolCommand";
9
+ import type { GetVoiceDefaultsCommandInput, GetVoiceDefaultsCommandOutput } from "./commands/GetVoiceDefaultsCommand";
9
10
  import type { ListVoicesCommandInput, ListVoicesCommandOutput } from "./commands/ListVoicesCommand";
10
11
  import type { SendHangupCommandInput, SendHangupCommandOutput } from "./commands/SendHangupCommand";
11
12
  import type { SendPlayCommandInput, SendPlayCommandOutput } from "./commands/SendPlayCommand";
@@ -20,11 +21,11 @@ export { __Client };
20
21
  /**
21
22
  * @public
22
23
  */
23
- export type ServiceInputTypes = DescribeVoiceProtocolCommandInput | ListVoicesCommandInput | SendHangupCommandInput | SendPlayCommandInput | SendSayCommandInput | SendStopCommandInput | SendTransferCommandInput | StreamCallEventsCommandInput | TextToSpeechCommandInput;
24
+ export type ServiceInputTypes = DescribeVoiceProtocolCommandInput | GetVoiceDefaultsCommandInput | ListVoicesCommandInput | SendHangupCommandInput | SendPlayCommandInput | SendSayCommandInput | SendStopCommandInput | SendTransferCommandInput | StreamCallEventsCommandInput | TextToSpeechCommandInput;
24
25
  /**
25
26
  * @public
26
27
  */
27
- export type ServiceOutputTypes = DescribeVoiceProtocolCommandOutput | ListVoicesCommandOutput | SendHangupCommandOutput | SendPlayCommandOutput | SendSayCommandOutput | SendStopCommandOutput | SendTransferCommandOutput | StreamCallEventsCommandOutput | TextToSpeechCommandOutput;
28
+ export type ServiceOutputTypes = DescribeVoiceProtocolCommandOutput | GetVoiceDefaultsCommandOutput | ListVoicesCommandOutput | SendHangupCommandOutput | SendPlayCommandOutput | SendSayCommandOutput | SendStopCommandOutput | SendTransferCommandOutput | StreamCallEventsCommandOutput | TextToSpeechCommandOutput;
28
29
  /**
29
30
  * @public
30
31
  */
@@ -167,11 +168,13 @@ export interface WilmaVoiceClientResolvedConfig extends WilmaVoiceClientResolved
167
168
  * On the WebSocket (transport host `wilma-voice-ws.wildix.com`), PBX clients transcribe caller
168
169
  * speech themselves and send `transcription` / `reply` text, while web/app clients connect with
169
170
  * inputMode=AUDIO and push raw caller `audio` chunks that the service transcribes server-side;
170
- * the service returns `say` / `play` / `stop` / `hangup` / `transfer`. Every WebSocket message
171
- * shape (connect params, events and commands) is declared as a structure and enumerated by
172
- * DescribeVoiceProtocol so the generated SDKs carry the types and (de)serializers; the WebSocket
173
- * transport itself is hand-coded. The HTTP Send* operations push the same commands into a live
174
- * session out-of-band.
171
+ * the service returns `say` / `play` / `stop` / `hangup` / `transfer`. On the PBX media socket
172
+ * (`/v2/voice/media/ws`, subprotocol `wilma-media-v2`), the PBX sends raw caller audio and the
173
+ * service answers with audio and the text frames listed under DescribeVoiceProtocol `media`.
174
+ * Every WebSocket message shape (connect params, events and commands) is declared as a structure
175
+ * and enumerated by DescribeVoiceProtocol so the generated SDKs carry the types and
176
+ * (de)serializers; the WebSocket transport itself is hand-coded. The HTTP Send* operations push
177
+ * the same commands into a live session out-of-band.
175
178
  *
176
179
  * Session observability and history are recorded in wilma-traces; this service does not expose
177
180
  * bot configuration, traces or listing.
@@ -27,7 +27,7 @@ declare const DescribeVoiceProtocolCommand_base: {
27
27
  getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
28
28
  };
29
29
  /**
30
- * Describes the WebSocket connect parameters, events and commands of the voice protocol. Utility method; the generated shapes are the source of truth for building a WebSocket client or server by hand.
30
+ * Describes the WebSocket connect parameters, events and commands of the voice protocol, and the messages of the PBX media socket. Utility method; the generated shapes are the source of truth for building a WebSocket client or server by hand.
31
31
  * @example
32
32
  * Use a bare-bones client and the command you need to make an API call.
33
33
  * ```javascript
@@ -259,6 +259,7 @@ declare const DescribeVoiceProtocolCommand_base: {
259
259
  * // final: true || false, // required
260
260
  * // language: "STRING_VALUE",
261
261
  * // time: Number("long"),
262
+ * // dropped: "low_confidence" || "other_speaker",
262
263
  * // },
263
264
  * // agentTranscription: { // VoiceCallAgentTranscriptionEvent
264
265
  * // id: "STRING_VALUE", // required
@@ -302,6 +303,141 @@ declare const DescribeVoiceProtocolCommand_base: {
302
303
  * // reason: "hangup" || "transfer" || "timeout" || "error" || "complete", // required
303
304
  * // },
304
305
  * // },
306
+ * // media: { // MediaProtocolFrames
307
+ * // pbx: { // MediaPbxFrames
308
+ * // start: { // MediaStartFrame
309
+ * // type: "start", // required
310
+ * // purpose: "agent" || "transcription", // required
311
+ * // callId: "STRING_VALUE", // required
312
+ * // flowIndex: Number("int"), // required
313
+ * // sessionId: "STRING_VALUE", // required
314
+ * // resume: true || false, // required
315
+ * // resumeAtMs: Number("int"), // required
316
+ * // audio: { // MediaAudioFormat
317
+ * // encoding: "pcm_s16le", // required
318
+ * // sampleRate: Number("int"), // required
319
+ * // channels: Number("int"), // required
320
+ * // },
321
+ * // agent: { // MediaStartAgent
322
+ * // id: "STRING_VALUE", // required
323
+ * // draft: true || false,
324
+ * // version: Number("int"),
325
+ * // },
326
+ * // languages: [ // MediaStartLanguageList
327
+ * // "STRING_VALUE",
328
+ * // ],
329
+ * // preferredLanguage: "STRING_VALUE",
330
+ * // autoDetect: true || false,
331
+ * // caller: { // MediaStartCaller
332
+ * // name: "STRING_VALUE",
333
+ * // number: "STRING_VALUE",
334
+ * // email: "STRING_VALUE",
335
+ * // company: "STRING_VALUE",
336
+ * // },
337
+ * // dialedNumber: "STRING_VALUE",
338
+ * // variables: "STRING_VALUE",
339
+ * // },
340
+ * // audio: new Uint8Array(),
341
+ * // vad: { // MediaVadFrame
342
+ * // type: "vad", // required
343
+ * // party: "caller" || "callee", // required
344
+ * // speaking: true || false, // required
345
+ * // energyDb: Number("double"), // required
346
+ * // atMs: Number("int"), // required
347
+ * // },
348
+ * // dtmf: { // MediaDtmfFrame
349
+ * // type: "dtmf", // required
350
+ * // id: "STRING_VALUE", // required
351
+ * // digits: "STRING_VALUE", // required
352
+ * // },
353
+ * // playback: { // MediaPlaybackFrame
354
+ * // type: "playback", // required
355
+ * // replyId: "STRING_VALUE", // required
356
+ * // streamId: "STRING_VALUE", // required
357
+ * // event: "started" || "finished" || "stopped", // required
358
+ * // atMs: Number("int"), // required
359
+ * // playedMs: Number("int"),
360
+ * // cause: "cloud" || "caller" || "drop",
361
+ * // },
362
+ * // finish: { // MediaFinishFrame
363
+ * // type: "finish", // required
364
+ * // reason: "caller-hangup" || "callee-hangup" || "agent-hangup" || "agent-transfer" || "timeout", // required
365
+ * // },
366
+ * // },
367
+ * // cloud: { // MediaCloudFrames
368
+ * // started: { // MediaStartedFrame
369
+ * // type: "started", // required
370
+ * // streamId: "STRING_VALUE", // required
371
+ * // agent: { // MediaStartedAgent
372
+ * // name: "STRING_VALUE", // required
373
+ * // },
374
+ * // groupId: "STRING_VALUE",
375
+ * // backgroundSound: "STRING_VALUE",
376
+ * // voiceDetection: { // MediaVoiceDetection
377
+ * // silenceMs: Number("int"), // required
378
+ * // silenceLevelDb: Number("int"), // required
379
+ * // speechLevelDb: Number("int"), // required
380
+ * // },
381
+ * // },
382
+ * // transcription: { // MediaTranscriptionFrame
383
+ * // type: "transcription", // required
384
+ * // party: "caller" || "callee", // required
385
+ * // id: "STRING_VALUE", // required
386
+ * // final: true || false, // required
387
+ * // text: "STRING_VALUE", // required
388
+ * // startMs: Number("int"), // required
389
+ * // endMs: Number("int"), // required
390
+ * // language: "STRING_VALUE", // required
391
+ * // confidence: Number("double"),
392
+ * // },
393
+ * // audioBegin: { // MediaAudioBeginFrame
394
+ * // type: "audio.begin", // required
395
+ * // replyId: "STRING_VALUE", // required
396
+ * // streamId: "STRING_VALUE", // required
397
+ * // sampleRate: Number("int"), // required
398
+ * // },
399
+ * // audio: new Uint8Array(),
400
+ * // audioEnd: { // MediaAudioEndFrame
401
+ * // type: "audio.end", // required
402
+ * // streamId: "STRING_VALUE", // required
403
+ * // },
404
+ * // stop: { // MediaStopFrame
405
+ * // type: "stop", // required
406
+ * // },
407
+ * // duck: { // MediaDuckFrame
408
+ * // type: "duck", // required
409
+ * // replyId: "STRING_VALUE", // required
410
+ * // volumeDb: Number("int"), // required
411
+ * // rampMs: Number("int"), // required
412
+ * // },
413
+ * // restore: { // MediaRestoreFrame
414
+ * // type: "restore", // required
415
+ * // replyId: "STRING_VALUE", // required
416
+ * // rampMs: Number("int"), // required
417
+ * // },
418
+ * // language: { // MediaLanguageFrame
419
+ * // type: "language", // required
420
+ * // language: "STRING_VALUE", // required
421
+ * // },
422
+ * // transfer: { // MediaTransferFrame
423
+ * // type: "transfer", // required
424
+ * // context: "STRING_VALUE", // required
425
+ * // extension: "STRING_VALUE", // required
426
+ * // },
427
+ * // hangup: { // MediaHangupFrame
428
+ * // type: "hangup", // required
429
+ * // },
430
+ * // error: { // MediaErrorFrame
431
+ * // type: "error", // required
432
+ * // code: "STRING_VALUE", // required
433
+ * // retryable: true || false, // required
434
+ * // message: "STRING_VALUE", // required
435
+ * // },
436
+ * // finished: { // MediaFinishedFrame
437
+ * // type: "finished", // required
438
+ * // },
439
+ * // },
440
+ * // },
305
441
  * // };
306
442
  *
307
443
  * ```
@@ -0,0 +1,90 @@
1
+ import { Command as $Command } from "@smithy/core/client";
2
+ import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
3
+ import type { GetVoiceDefaultsInput, GetVoiceDefaultsOutput } 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 GetVoiceDefaultsCommand}.
14
+ */
15
+ export interface GetVoiceDefaultsCommandInput extends GetVoiceDefaultsInput {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link GetVoiceDefaultsCommand}.
21
+ */
22
+ export interface GetVoiceDefaultsCommandOutput extends GetVoiceDefaultsOutput, __MetadataBearer {
23
+ }
24
+ declare const GetVoiceDefaultsCommand_base: {
25
+ new (input: GetVoiceDefaultsCommandInput): import("@smithy/core/client").CommandImpl<GetVoiceDefaultsCommandInput, GetVoiceDefaultsCommandOutput, WilmaVoiceClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
+ new (...[input]: [] | [GetVoiceDefaultsCommandInput]): import("@smithy/core/client").CommandImpl<GetVoiceDefaultsCommandInput, GetVoiceDefaultsCommandOutput, WilmaVoiceClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
+ getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
28
+ };
29
+ /**
30
+ * Returns the voice channel tuning that applies to a call when the agent sets no value. The values can change without an agent change.
31
+ * @example
32
+ * Use a bare-bones client and the command you need to make an API call.
33
+ * ```javascript
34
+ * import { WilmaVoiceClient, GetVoiceDefaultsCommand } from "@wildix/wilma-voice-client"; // ES Modules import
35
+ * // const { WilmaVoiceClient, GetVoiceDefaultsCommand } = require("@wildix/wilma-voice-client"); // CommonJS import
36
+ * // import type { WilmaVoiceClientConfig } from "@wildix/wilma-voice-client";
37
+ * const config = {}; // type is WilmaVoiceClientConfig
38
+ * const client = new WilmaVoiceClient(config);
39
+ * const input = {};
40
+ * const command = new GetVoiceDefaultsCommand(input);
41
+ * const response = await client.send(command);
42
+ * // { // GetVoiceDefaultsOutput
43
+ * // voiceDetection: { // VoiceDetectionDefaults
44
+ * // silenceMs: Number("int"), // required
45
+ * // silenceLevelDb: Number("int"), // required
46
+ * // speechLevelDb: Number("int"), // required
47
+ * // },
48
+ * // interruptions: { // VoiceInterruptionDefaults
49
+ * // minWords: Number("int"), // required
50
+ * // minConfidence: Number("double"), // required
51
+ * // duckAfterMs: Number("int"), // required
52
+ * // duckVolumeDb: Number("int"), // required
53
+ * // restoreAfterMs: Number("int"), // required
54
+ * // },
55
+ * // turnEnd: { // VoiceTurnEndDefaults
56
+ * // holdMs: Number("int"), // required
57
+ * // },
58
+ * // };
59
+ *
60
+ * ```
61
+ *
62
+ * @param GetVoiceDefaultsCommandInput - {@link GetVoiceDefaultsCommandInput}
63
+ * @returns {@link GetVoiceDefaultsCommandOutput}
64
+ * @see {@link GetVoiceDefaultsCommandInput} for command's `input` shape.
65
+ * @see {@link GetVoiceDefaultsCommandOutput} for command's `response` shape.
66
+ * @see {@link WilmaVoiceClientResolvedConfig | config} for WilmaVoiceClient's `config` shape.
67
+ *
68
+ * @throws {@link ValidationException} (client fault)
69
+ *
70
+ * @throws {@link ForbiddenException} (client fault)
71
+ *
72
+ * @throws {@link WilmaVoiceServiceException}
73
+ * <p>Base exception class for all service exceptions from WilmaVoice service.</p>
74
+ *
75
+ *
76
+ * @public
77
+ */
78
+ export declare class GetVoiceDefaultsCommand extends GetVoiceDefaultsCommand_base {
79
+ /** @internal type navigation helper, not in runtime. */
80
+ protected static __types: {
81
+ api: {
82
+ input: {};
83
+ output: GetVoiceDefaultsOutput;
84
+ };
85
+ sdk: {
86
+ input: GetVoiceDefaultsCommandInput;
87
+ output: GetVoiceDefaultsCommandOutput;
88
+ };
89
+ };
90
+ }
@@ -1,4 +1,5 @@
1
1
  export * from "./DescribeVoiceProtocolCommand";
2
+ export * from "./GetVoiceDefaultsCommand";
2
3
  export * from "./ListVoicesCommand";
3
4
  export * from "./SendHangupCommand";
4
5
  export * from "./SendPlayCommand";
@@ -8,11 +8,13 @@
8
8
  * On the WebSocket (transport host `wilma-voice-ws.wildix.com`), PBX clients transcribe caller
9
9
  * speech themselves and send `transcription` / `reply` text, while web/app clients connect with
10
10
  * inputMode=AUDIO and push raw caller `audio` chunks that the service transcribes server-side;
11
- * the service returns `say` / `play` / `stop` / `hangup` / `transfer`. Every WebSocket message
12
- * shape (connect params, events and commands) is declared as a structure and enumerated by
13
- * DescribeVoiceProtocol so the generated SDKs carry the types and (de)serializers; the WebSocket
14
- * transport itself is hand-coded. The HTTP Send* operations push the same commands into a live
15
- * session out-of-band.
11
+ * the service returns `say` / `play` / `stop` / `hangup` / `transfer`. On the PBX media socket
12
+ * (`/v2/voice/media/ws`, subprotocol `wilma-media-v2`), the PBX sends raw caller audio and the
13
+ * service answers with audio and the text frames listed under DescribeVoiceProtocol `media`.
14
+ * Every WebSocket message shape (connect params, events and commands) is declared as a structure
15
+ * and enumerated by DescribeVoiceProtocol so the generated SDKs carry the types and
16
+ * (de)serializers; the WebSocket transport itself is hand-coded. The HTTP Send* operations push
17
+ * the same commands into a live session out-of-band.
16
18
  *
17
19
  * Session observability and history are recorded in wilma-traces; this service does not expose
18
20
  * bot configuration, traces or listing.
@@ -86,6 +86,24 @@ export declare const VoiceCallToolPhase: {
86
86
  * @public
87
87
  */
88
88
  export type VoiceCallToolPhase = (typeof VoiceCallToolPhase)[keyof typeof VoiceCallToolPhase];
89
+ /**
90
+ * @public
91
+ * @enum
92
+ */
93
+ export declare const VoiceTranscriptionDropReason: {
94
+ /**
95
+ * The recognition confidence was below the minimum confidence of the call.
96
+ */
97
+ readonly LOW_CONFIDENCE: "low_confidence";
98
+ /**
99
+ * The recogniser labelled the words with a speaker other than the caller.
100
+ */
101
+ readonly OTHER_SPEAKER: "other_speaker";
102
+ };
103
+ /**
104
+ * @public
105
+ */
106
+ export type VoiceTranscriptionDropReason = (typeof VoiceTranscriptionDropReason)[keyof typeof VoiceTranscriptionDropReason];
89
107
  /**
90
108
  * @public
91
109
  * @enum
@@ -145,3 +163,305 @@ export declare const VoiceCommandType: {
145
163
  * @public
146
164
  */
147
165
  export type VoiceCommandType = (typeof VoiceCommandType)[keyof typeof VoiceCommandType];
166
+ /**
167
+ * @public
168
+ * @enum
169
+ */
170
+ export declare const MediaAudioBeginFrameType: {
171
+ readonly AUDIO_BEGIN: "audio.begin";
172
+ };
173
+ /**
174
+ * @public
175
+ */
176
+ export type MediaAudioBeginFrameType = (typeof MediaAudioBeginFrameType)[keyof typeof MediaAudioBeginFrameType];
177
+ /**
178
+ * @public
179
+ * @enum
180
+ */
181
+ export declare const MediaAudioEndFrameType: {
182
+ readonly AUDIO_END: "audio.end";
183
+ };
184
+ /**
185
+ * @public
186
+ */
187
+ export type MediaAudioEndFrameType = (typeof MediaAudioEndFrameType)[keyof typeof MediaAudioEndFrameType];
188
+ /**
189
+ * @public
190
+ * @enum
191
+ */
192
+ export declare const MediaDuckFrameType: {
193
+ readonly DUCK: "duck";
194
+ };
195
+ /**
196
+ * @public
197
+ */
198
+ export type MediaDuckFrameType = (typeof MediaDuckFrameType)[keyof typeof MediaDuckFrameType];
199
+ /**
200
+ * @public
201
+ * @enum
202
+ */
203
+ export declare const MediaErrorFrameType: {
204
+ readonly ERROR: "error";
205
+ };
206
+ /**
207
+ * @public
208
+ */
209
+ export type MediaErrorFrameType = (typeof MediaErrorFrameType)[keyof typeof MediaErrorFrameType];
210
+ /**
211
+ * @public
212
+ * @enum
213
+ */
214
+ export declare const MediaFinishedFrameType: {
215
+ readonly FINISHED: "finished";
216
+ };
217
+ /**
218
+ * @public
219
+ */
220
+ export type MediaFinishedFrameType = (typeof MediaFinishedFrameType)[keyof typeof MediaFinishedFrameType];
221
+ /**
222
+ * @public
223
+ * @enum
224
+ */
225
+ export declare const MediaHangupFrameType: {
226
+ readonly HANGUP: "hangup";
227
+ };
228
+ /**
229
+ * @public
230
+ */
231
+ export type MediaHangupFrameType = (typeof MediaHangupFrameType)[keyof typeof MediaHangupFrameType];
232
+ /**
233
+ * @public
234
+ * @enum
235
+ */
236
+ export declare const MediaLanguageFrameType: {
237
+ readonly LANGUAGE: "language";
238
+ };
239
+ /**
240
+ * @public
241
+ */
242
+ export type MediaLanguageFrameType = (typeof MediaLanguageFrameType)[keyof typeof MediaLanguageFrameType];
243
+ /**
244
+ * @public
245
+ * @enum
246
+ */
247
+ export declare const MediaRestoreFrameType: {
248
+ readonly RESTORE: "restore";
249
+ };
250
+ /**
251
+ * @public
252
+ */
253
+ export type MediaRestoreFrameType = (typeof MediaRestoreFrameType)[keyof typeof MediaRestoreFrameType];
254
+ /**
255
+ * @public
256
+ * @enum
257
+ */
258
+ export declare const MediaStartedFrameType: {
259
+ readonly STARTED: "started";
260
+ };
261
+ /**
262
+ * @public
263
+ */
264
+ export type MediaStartedFrameType = (typeof MediaStartedFrameType)[keyof typeof MediaStartedFrameType];
265
+ /**
266
+ * @public
267
+ * @enum
268
+ */
269
+ export declare const MediaStopFrameType: {
270
+ readonly STOP: "stop";
271
+ };
272
+ /**
273
+ * @public
274
+ */
275
+ export type MediaStopFrameType = (typeof MediaStopFrameType)[keyof typeof MediaStopFrameType];
276
+ /**
277
+ * @public
278
+ * @enum
279
+ */
280
+ export declare const MediaParty: {
281
+ readonly CALLEE: "callee";
282
+ readonly CALLER: "caller";
283
+ };
284
+ /**
285
+ * @public
286
+ */
287
+ export type MediaParty = (typeof MediaParty)[keyof typeof MediaParty];
288
+ /**
289
+ * @public
290
+ * @enum
291
+ */
292
+ export declare const MediaTranscriptionFrameType: {
293
+ readonly TRANSCRIPTION: "transcription";
294
+ };
295
+ /**
296
+ * @public
297
+ */
298
+ export type MediaTranscriptionFrameType = (typeof MediaTranscriptionFrameType)[keyof typeof MediaTranscriptionFrameType];
299
+ /**
300
+ * @public
301
+ * @enum
302
+ */
303
+ export declare const MediaTransferFrameType: {
304
+ readonly TRANSFER: "transfer";
305
+ };
306
+ /**
307
+ * @public
308
+ */
309
+ export type MediaTransferFrameType = (typeof MediaTransferFrameType)[keyof typeof MediaTransferFrameType];
310
+ /**
311
+ * @public
312
+ * @enum
313
+ */
314
+ export declare const MediaDtmfFrameType: {
315
+ readonly DTMF: "dtmf";
316
+ };
317
+ /**
318
+ * @public
319
+ */
320
+ export type MediaDtmfFrameType = (typeof MediaDtmfFrameType)[keyof typeof MediaDtmfFrameType];
321
+ /**
322
+ * @public
323
+ * @enum
324
+ */
325
+ export declare const MediaFinishReason: {
326
+ /**
327
+ * The PBX ran the agent's `hangup`.
328
+ */
329
+ readonly AGENT_HANGUP: "agent-hangup";
330
+ /**
331
+ * The PBX ran the agent's `transfer`, or tried to and the target does not exist.
332
+ */
333
+ readonly AGENT_TRANSFER: "agent-transfer";
334
+ /**
335
+ * The callee hung up.
336
+ */
337
+ readonly CALLEE_HANGUP: "callee-hangup";
338
+ /**
339
+ * The caller hung up.
340
+ */
341
+ readonly CALLER_HANGUP: "caller-hangup";
342
+ /**
343
+ * The PBX got no agent reply in time.
344
+ */
345
+ readonly TIMEOUT: "timeout";
346
+ };
347
+ /**
348
+ * @public
349
+ */
350
+ export type MediaFinishReason = (typeof MediaFinishReason)[keyof typeof MediaFinishReason];
351
+ /**
352
+ * @public
353
+ * @enum
354
+ */
355
+ export declare const MediaFinishFrameType: {
356
+ readonly FINISH: "finish";
357
+ };
358
+ /**
359
+ * @public
360
+ */
361
+ export type MediaFinishFrameType = (typeof MediaFinishFrameType)[keyof typeof MediaFinishFrameType];
362
+ /**
363
+ * @public
364
+ * @enum
365
+ */
366
+ export declare const MediaPlaybackStopCause: {
367
+ /**
368
+ * The caller hung up or the run ended.
369
+ */
370
+ readonly CALLER: "caller";
371
+ /**
372
+ * A `stop` frame from the cloud.
373
+ */
374
+ readonly CLOUD: "cloud";
375
+ /**
376
+ * The PBX dropped the stream, for example at its queue limit.
377
+ */
378
+ readonly DROP: "drop";
379
+ };
380
+ /**
381
+ * @public
382
+ */
383
+ export type MediaPlaybackStopCause = (typeof MediaPlaybackStopCause)[keyof typeof MediaPlaybackStopCause];
384
+ /**
385
+ * @public
386
+ * @enum
387
+ */
388
+ export declare const MediaPlaybackEvent: {
389
+ /**
390
+ * The stream played to its end.
391
+ */
392
+ readonly FINISHED: "finished";
393
+ /**
394
+ * The stream started to play.
395
+ */
396
+ readonly STARTED: "started";
397
+ /**
398
+ * The stream stopped before its end.
399
+ */
400
+ readonly STOPPED: "stopped";
401
+ };
402
+ /**
403
+ * @public
404
+ */
405
+ export type MediaPlaybackEvent = (typeof MediaPlaybackEvent)[keyof typeof MediaPlaybackEvent];
406
+ /**
407
+ * @public
408
+ * @enum
409
+ */
410
+ export declare const MediaPlaybackFrameType: {
411
+ readonly PLAYBACK: "playback";
412
+ };
413
+ /**
414
+ * @public
415
+ */
416
+ export type MediaPlaybackFrameType = (typeof MediaPlaybackFrameType)[keyof typeof MediaPlaybackFrameType];
417
+ /**
418
+ * @public
419
+ * @enum
420
+ */
421
+ export declare const MediaAudioEncoding: {
422
+ readonly PCM_S16LE: "pcm_s16le";
423
+ };
424
+ /**
425
+ * @public
426
+ */
427
+ export type MediaAudioEncoding = (typeof MediaAudioEncoding)[keyof typeof MediaAudioEncoding];
428
+ /**
429
+ * @public
430
+ * @enum
431
+ */
432
+ export declare const MediaRunPurpose: {
433
+ /**
434
+ * A voice agent answers the call.
435
+ */
436
+ readonly AGENT: "agent";
437
+ /**
438
+ * The cloud transcribes the call and sends no audio.
439
+ */
440
+ readonly TRANSCRIPTION: "transcription";
441
+ };
442
+ /**
443
+ * @public
444
+ */
445
+ export type MediaRunPurpose = (typeof MediaRunPurpose)[keyof typeof MediaRunPurpose];
446
+ /**
447
+ * @public
448
+ * @enum
449
+ */
450
+ export declare const MediaStartFrameType: {
451
+ readonly START: "start";
452
+ };
453
+ /**
454
+ * @public
455
+ */
456
+ export type MediaStartFrameType = (typeof MediaStartFrameType)[keyof typeof MediaStartFrameType];
457
+ /**
458
+ * @public
459
+ * @enum
460
+ */
461
+ export declare const MediaVadFrameType: {
462
+ readonly VAD: "vad";
463
+ };
464
+ /**
465
+ * @public
466
+ */
467
+ export type MediaVadFrameType = (typeof MediaVadFrameType)[keyof typeof MediaVadFrameType];