@wildix/wim-voicebots-client 1.0.22 → 1.0.24

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.
Files changed (43) hide show
  1. package/dist-cjs/VoiceBots.js +4 -0
  2. package/dist-cjs/VoiceBotsClient.js +4 -5
  3. package/dist-cjs/commands/SendPlayCommand.js +21 -0
  4. package/dist-cjs/commands/SendStopCommand.js +21 -0
  5. package/dist-cjs/commands/index.js +2 -0
  6. package/dist-cjs/models/models_0.js +28 -22
  7. package/dist-cjs/protocols/Aws_restJson1.js +108 -85
  8. package/dist-cjs/runtimeConfig.browser.js +1 -1
  9. package/dist-cjs/runtimeConfig.js +4 -3
  10. package/dist-cjs/runtimeExtensions.js +2 -10
  11. package/dist-es/VoiceBots.js +4 -0
  12. package/dist-es/VoiceBotsClient.js +4 -5
  13. package/dist-es/commands/SendPlayCommand.js +17 -0
  14. package/dist-es/commands/SendStopCommand.js +17 -0
  15. package/dist-es/commands/index.js +2 -0
  16. package/dist-es/models/models_0.js +16 -10
  17. package/dist-es/protocols/Aws_restJson1.js +72 -53
  18. package/dist-es/runtimeConfig.browser.js +2 -2
  19. package/dist-es/runtimeConfig.js +5 -4
  20. package/dist-es/runtimeExtensions.js +2 -10
  21. package/dist-types/VoiceBots.d.ts +14 -0
  22. package/dist-types/VoiceBotsClient.d.ts +5 -3
  23. package/dist-types/commands/CreateVoiceBotCommand.d.ts +16 -0
  24. package/dist-types/commands/DeleteVoiceBotCommand.d.ts +12 -0
  25. package/dist-types/commands/DescribeEventCommand.d.ts +74 -23
  26. package/dist-types/commands/GetTraceCommand.d.ts +33 -8
  27. package/dist-types/commands/GetVoiceBotCommand.d.ts +14 -0
  28. package/dist-types/commands/ListTracesCommand.d.ts +12 -0
  29. package/dist-types/commands/ListVoiceBotsCommand.d.ts +14 -0
  30. package/dist-types/commands/ListVoiceBotsNamesCommand.d.ts +12 -0
  31. package/dist-types/commands/SendHangupCommand.d.ts +12 -0
  32. package/dist-types/commands/SendPlayCommand.d.ts +79 -0
  33. package/dist-types/commands/SendSayCommand.d.ts +16 -0
  34. package/dist-types/commands/SendStopCommand.d.ts +76 -0
  35. package/dist-types/commands/SendTransferCommand.d.ts +12 -0
  36. package/dist-types/commands/UpdateVoiceBotCommand.d.ts +16 -0
  37. package/dist-types/commands/index.d.ts +2 -0
  38. package/dist-types/models/models_0.d.ts +221 -109
  39. package/dist-types/protocols/Aws_restJson1.d.ts +18 -0
  40. package/dist-types/runtimeConfig.browser.d.ts +3 -2
  41. package/dist-types/runtimeConfig.d.ts +3 -2
  42. package/dist-types/runtimeConfig.native.d.ts +3 -2
  43. package/package.json +38 -34
@@ -28,6 +28,7 @@ export declare class ForbiddenException extends __BaseException {
28
28
  * @enum
29
29
  */
30
30
  export declare const VoiceBotEventType: {
31
+ readonly AUDIO: "audio";
31
32
  readonly COMPLETE: "complete";
32
33
  readonly ENDED: "ended";
33
34
  readonly INTERRUPTION: "interruption";
@@ -40,6 +41,27 @@ export declare const VoiceBotEventType: {
40
41
  * @public
41
42
  */
42
43
  export type VoiceBotEventType = typeof VoiceBotEventType[keyof typeof VoiceBotEventType];
44
+ /**
45
+ * @public
46
+ */
47
+ export interface AudioEvent {
48
+ type: VoiceBotEventType;
49
+ /**
50
+ * Audio chunk with a specified sample rate defined in the session.
51
+ * @public
52
+ */
53
+ data: string;
54
+ }
55
+ /**
56
+ * @public
57
+ */
58
+ export interface AudioWebhookEvent {
59
+ sessionId: string;
60
+ botId: string;
61
+ callId: string;
62
+ flowIndex: number;
63
+ event: AudioEvent;
64
+ }
43
65
  /**
44
66
  * @public
45
67
  */
@@ -114,7 +136,7 @@ export interface VoiceBotEmbeddedTool {
114
136
  * The parameters the functions accepts.
115
137
  * @public
116
138
  */
117
- parameters?: __DocumentType;
139
+ parameters?: __DocumentType | undefined;
118
140
  }
119
141
  /**
120
142
  * @public
@@ -136,7 +158,7 @@ export interface VoiceBotFunctionIntegrationWebhookAuthorizationOAuth {
136
158
  clientId: string;
137
159
  clientSecret: string;
138
160
  endpointUrl: string;
139
- scope?: string;
161
+ scope?: string | undefined;
140
162
  }
141
163
  /**
142
164
  * @public
@@ -208,11 +230,21 @@ export type VoiceBotFunctionIntegrationMethod = typeof VoiceBotFunctionIntegrati
208
230
  */
209
231
  export interface VoiceBotFunctionIntegrationWebhook {
210
232
  url: string;
211
- method?: VoiceBotFunctionIntegrationMethod;
212
- async?: boolean;
213
- authorization?: VoiceBotFunctionIntegrationWebhookAuthorization;
214
- headers?: (VoiceBotFunctionIntegrationWebhookHeader)[];
215
- parameters?: __DocumentType;
233
+ method?: VoiceBotFunctionIntegrationMethod | undefined;
234
+ async?: boolean | undefined;
235
+ authorization?: VoiceBotFunctionIntegrationWebhookAuthorization | undefined;
236
+ headers?: (VoiceBotFunctionIntegrationWebhookHeader)[] | undefined;
237
+ /**
238
+ * Timeout in milliseconds for the webhook request.
239
+ * @public
240
+ */
241
+ timeout?: number | undefined;
242
+ /**
243
+ * Message spoken when the function call starts.
244
+ * @public
245
+ */
246
+ startMessage?: string | undefined;
247
+ parameters?: __DocumentType | undefined;
216
248
  }
217
249
  /**
218
250
  * @public
@@ -252,13 +284,13 @@ export interface VoiceBotFunctionDefinition {
252
284
  * A description of what the function does, used by the model to choose when and how to call the function.
253
285
  * @public
254
286
  */
255
- description?: string;
287
+ description?: string | undefined;
256
288
  /**
257
289
  * The parameters the functions accepts, described as a JSON Schema object.
258
290
  * @public
259
291
  */
260
- parameters?: __DocumentType;
261
- integration?: VoiceBotFunctionIntegration;
292
+ parameters?: __DocumentType | undefined;
293
+ integration?: VoiceBotFunctionIntegration | undefined;
262
294
  }
263
295
  /**
264
296
  * @public
@@ -276,7 +308,7 @@ export type VoiceBotToolType = typeof VoiceBotToolType[keyof typeof VoiceBotTool
276
308
  */
277
309
  export interface VoiceBotTool {
278
310
  type: VoiceBotToolType;
279
- function?: VoiceBotFunctionDefinition;
311
+ function?: VoiceBotFunctionDefinition | undefined;
280
312
  }
281
313
  /**
282
314
  * @public
@@ -287,12 +319,12 @@ export interface VoiceBotLlmEndpoint {
287
319
  * Embedded functions to use within voice session.
288
320
  * @public
289
321
  */
290
- embeddedTools?: (VoiceBotEmbeddedTool)[];
322
+ embeddedTools?: (VoiceBotEmbeddedTool)[] | undefined;
291
323
  /**
292
324
  * Custom tools to be used within voice session.
293
325
  * @public
294
326
  */
295
- tools?: (VoiceBotTool)[];
327
+ tools?: (VoiceBotTool)[] | undefined;
296
328
  }
297
329
  /**
298
330
  * @public
@@ -438,37 +470,37 @@ export interface VoiceBotPipelineSettings {
438
470
  * If enabled the user can interrupt the the bot playback.
439
471
  * @public
440
472
  */
441
- interuptionsEnabled?: boolean;
473
+ interuptionsEnabled?: boolean | undefined;
442
474
  /**
443
475
  * The maximum number of seconds a call will last.
444
476
  * @public
445
477
  */
446
- maximumDuration?: number;
478
+ maximumDuration?: number | undefined;
447
479
  /**
448
480
  * An action that should be performed when max duration reached.
449
481
  * @public
450
482
  */
451
- maximumDurationAction?: VoiceBotPipelineTerminateAction;
483
+ maximumDurationAction?: VoiceBotPipelineTerminateAction | undefined;
452
484
  /**
453
485
  * How long to wait before a call is automatically ended due to inactivity.
454
486
  * @public
455
487
  */
456
- silenceTimeout?: number;
488
+ silenceTimeout?: number | undefined;
457
489
  /**
458
490
  * An action that should be performed when silence timeout reached.
459
491
  * @public
460
492
  */
461
- silenceTimeoutAction?: VoiceBotPipelineTerminateAction;
493
+ silenceTimeoutAction?: VoiceBotPipelineTerminateAction | undefined;
462
494
  /**
463
495
  * If enabled the bot can hangup the call.
464
496
  * @public
465
497
  */
466
- endCallEnabled?: boolean;
498
+ endCallEnabled?: boolean | undefined;
467
499
  /**
468
500
  * A list of phases separated by comma, which will end the call matched.
469
501
  * @public
470
502
  */
471
- endCallPhases?: string;
503
+ endCallPhases?: string | undefined;
472
504
  }
473
505
  /**
474
506
  * @public
@@ -479,14 +511,14 @@ export interface CreateVoiceBotInput {
479
511
  * The initial message that will be played at the start of the session.
480
512
  * @public
481
513
  */
482
- message?: string;
483
- pipeline?: VoiceBotPipelineSettings;
514
+ message?: string | undefined;
515
+ pipeline?: VoiceBotPipelineSettings | undefined;
484
516
  /**
485
517
  * An endpoint to use to generate replies during voice bot session.
486
518
  * @public
487
519
  */
488
520
  endpoint: VoiceBotEndpoint;
489
- company?: string;
521
+ company?: string | undefined;
490
522
  }
491
523
  /**
492
524
  * @public
@@ -497,8 +529,8 @@ export interface VoiceBot {
497
529
  * The initial message that will be played at the start of the session.
498
530
  * @public
499
531
  */
500
- message?: string;
501
- pipeline?: VoiceBotPipelineSettings;
532
+ message?: string | undefined;
533
+ pipeline?: VoiceBotPipelineSettings | undefined;
502
534
  /**
503
535
  * An endpoint to use to generate replies during voice bot session.
504
536
  * @public
@@ -506,7 +538,7 @@ export interface VoiceBot {
506
538
  endpoint: VoiceBotEndpoint;
507
539
  id: string;
508
540
  createdAt: string;
509
- updatedAt?: string;
541
+ updatedAt?: string | undefined;
510
542
  }
511
543
  /**
512
544
  * @public
@@ -520,7 +552,7 @@ export interface CreateVoiceBotOutput {
520
552
  export declare class VoiceBotNonUniqueNameException extends __BaseException {
521
553
  readonly name: "VoiceBotNonUniqueNameException";
522
554
  readonly $fault: "client";
523
- type?: string;
555
+ type?: string | undefined;
524
556
  /**
525
557
  * @internal
526
558
  */
@@ -530,7 +562,7 @@ export declare class VoiceBotNonUniqueNameException extends __BaseException {
530
562
  * @public
531
563
  */
532
564
  export interface DeleteVoiceBotInput {
533
- company?: string;
565
+ company?: string | undefined;
534
566
  botId: string;
535
567
  }
536
568
  /**
@@ -549,7 +581,9 @@ export interface DescribeEventInput {
549
581
  */
550
582
  export declare const VoiceBotCommandType: {
551
583
  readonly HANGUP: "hangup";
584
+ readonly PLAY: "play";
552
585
  readonly SAY: "say";
586
+ readonly STOP: "stop";
553
587
  readonly TRANSFER: "transfer";
554
588
  };
555
589
  /**
@@ -560,7 +594,7 @@ export type VoiceBotCommandType = typeof VoiceBotCommandType[keyof typeof VoiceB
560
594
  * @public
561
595
  */
562
596
  export interface HangupWebsocketCommandData {
563
- reason?: string;
597
+ reason?: string | undefined;
564
598
  type: VoiceBotCommandType;
565
599
  }
566
600
  /**
@@ -606,7 +640,7 @@ export interface PlaybackEvent {
606
640
  text: string;
607
641
  complete: boolean;
608
642
  startTime: number;
609
- endTime?: number;
643
+ endTime?: number | undefined;
610
644
  }
611
645
  /**
612
646
  * @public
@@ -625,6 +659,26 @@ export interface PlaybackWebsocketEvent {
625
659
  type: string;
626
660
  event: PlaybackEvent;
627
661
  }
662
+ /**
663
+ * @public
664
+ */
665
+ export interface PlayWebsocketCommandData {
666
+ replyId: string;
667
+ streamId: string;
668
+ /**
669
+ * The audio chunk is encoded in base64 and should be played in the stream. The chunk must use the sample rate specified in the "say" command and be PCM encoded.
670
+ * @public
671
+ */
672
+ data: string;
673
+ type: VoiceBotCommandType;
674
+ }
675
+ /**
676
+ * @public
677
+ */
678
+ export interface PlayWebsocketCommand {
679
+ type: string;
680
+ command: PlayWebsocketCommandData;
681
+ }
628
682
  /**
629
683
  * @public
630
684
  */
@@ -683,19 +737,19 @@ export type TraceActivityStatus = typeof TraceActivityStatus[keyof typeof TraceA
683
737
  * @public
684
738
  */
685
739
  export interface TraceConnectEventTrigger {
686
- parameters?: __DocumentType;
740
+ parameters?: __DocumentType | undefined;
687
741
  }
688
742
  /**
689
743
  * @public
690
744
  */
691
745
  export interface TraceDisconnectEventTrigger {
692
- parameters?: __DocumentType;
746
+ parameters?: __DocumentType | undefined;
693
747
  }
694
748
  /**
695
749
  * @public
696
750
  */
697
751
  export interface TraceDurationTimeoutTaskTrigger {
698
- parameters?: __DocumentType;
752
+ parameters?: __DocumentType | undefined;
699
753
  }
700
754
  /**
701
755
  * @public
@@ -714,13 +768,21 @@ export interface ReplyWebsocketEvent {
714
768
  type: string;
715
769
  event: ReplyEvent;
716
770
  }
771
+ /**
772
+ * @public
773
+ */
774
+ export interface SayCommandAudioOptions {
775
+ streamId: string;
776
+ sampleRate: number;
777
+ }
717
778
  /**
718
779
  * @public
719
780
  */
720
781
  export interface SayWebsocketCommandData {
721
782
  text: string;
722
783
  replyId: string;
723
- interruptible?: boolean;
784
+ interruptible?: boolean | undefined;
785
+ audio?: SayCommandAudioOptions | undefined;
724
786
  type: VoiceBotCommandType;
725
787
  }
726
788
  /**
@@ -734,7 +796,7 @@ export interface SayWebsocketCommand {
734
796
  * @public
735
797
  */
736
798
  export interface TraceSilenceTimeoutTaskTrigger {
737
- parameters?: __DocumentType;
799
+ parameters?: __DocumentType | undefined;
738
800
  }
739
801
  /**
740
802
  * @public
@@ -743,7 +805,7 @@ export interface TranscriptionEvent {
743
805
  type: VoiceBotEventType;
744
806
  id: string;
745
807
  text: string;
746
- final?: boolean;
808
+ final?: boolean | undefined;
747
809
  time: number;
748
810
  }
749
811
  /**
@@ -995,29 +1057,32 @@ export declare namespace TraceActivityTrigger {
995
1057
  * @public
996
1058
  */
997
1059
  export interface TraceGenerationUsage {
998
- tokens?: number;
999
- outputTokens?: number;
1000
- inputTokens?: number;
1060
+ tokens?: number | undefined;
1061
+ outputTokens?: number | undefined;
1062
+ inputTokens?: number | undefined;
1063
+ category?: string | undefined;
1001
1064
  }
1002
1065
  /**
1003
1066
  * @public
1004
1067
  */
1005
1068
  export interface TracePlaybackUsage {
1006
- chars?: number;
1069
+ chars?: number | undefined;
1070
+ category?: string | undefined;
1007
1071
  }
1008
1072
  /**
1009
1073
  * @public
1010
1074
  */
1011
1075
  export interface TraceTranscribeUsage {
1012
- seconds?: number;
1076
+ seconds?: number | undefined;
1077
+ category?: string | undefined;
1013
1078
  }
1014
1079
  /**
1015
1080
  * @public
1016
1081
  */
1017
1082
  export interface TraceUsage {
1018
- generation?: TraceGenerationUsage;
1019
- transcribe?: TraceTranscribeUsage;
1020
- playback?: TracePlaybackUsage;
1083
+ generation?: TraceGenerationUsage | undefined;
1084
+ transcribe?: TraceTranscribeUsage | undefined;
1085
+ playback?: TracePlaybackUsage | undefined;
1021
1086
  }
1022
1087
  /**
1023
1088
  * @public
@@ -1027,33 +1092,34 @@ export interface TraceActivity {
1027
1092
  version: number;
1028
1093
  status: TraceActivityStatus;
1029
1094
  trigger: TraceActivityTrigger;
1030
- result?: TraceActivityResult;
1095
+ result?: TraceActivityResult | undefined;
1031
1096
  start: number;
1032
- duration?: number;
1033
- usage?: TraceUsage;
1097
+ duration?: number | undefined;
1098
+ timings?: Record<string, number> | undefined;
1099
+ usage?: TraceUsage | undefined;
1034
1100
  }
1035
1101
  /**
1036
1102
  * @public
1037
1103
  */
1038
1104
  export interface TraceDelegationToolCall {
1039
- id?: string;
1105
+ id?: string | undefined;
1040
1106
  }
1041
1107
  /**
1042
1108
  * @public
1043
1109
  */
1044
1110
  export interface TraceFunctionToolCallRequest {
1045
- url?: string;
1046
- method?: string;
1047
- headers?: Record<string, string>;
1048
- body?: string;
1111
+ url?: string | undefined;
1112
+ method?: string | undefined;
1113
+ headers?: Record<string, string> | undefined;
1114
+ body?: string | undefined;
1049
1115
  }
1050
1116
  /**
1051
1117
  * @public
1052
1118
  */
1053
1119
  export interface TraceFunctionToolCall {
1054
- name?: string;
1055
- args?: string;
1056
- request?: TraceFunctionToolCallRequest;
1120
+ name?: string | undefined;
1121
+ args?: string | undefined;
1122
+ request?: TraceFunctionToolCallRequest | undefined;
1057
1123
  }
1058
1124
  /**
1059
1125
  * @public
@@ -1064,8 +1130,8 @@ export interface TraceHangupToolCall {
1064
1130
  * @public
1065
1131
  */
1066
1132
  export interface TraceTransferToolCall {
1067
- context?: string;
1068
- extension?: string;
1133
+ context?: string | undefined;
1134
+ extension?: string | undefined;
1069
1135
  }
1070
1136
  /**
1071
1137
  * @public
@@ -1145,8 +1211,8 @@ export declare namespace TraceToolCall {
1145
1211
  * @public
1146
1212
  */
1147
1213
  export interface TraceSegmentCompletionToolMessage {
1148
- call?: TraceToolCall;
1149
- result?: string;
1214
+ call?: TraceToolCall | undefined;
1215
+ result?: string | undefined;
1150
1216
  }
1151
1217
  /**
1152
1218
  * @public
@@ -1266,16 +1332,16 @@ export interface TraceGenericInputBlock {
1266
1332
  */
1267
1333
  export interface TraceGenericInput {
1268
1334
  title: string;
1269
- blocks?: (TraceGenericInputBlock)[];
1335
+ blocks?: (TraceGenericInputBlock)[] | undefined;
1270
1336
  }
1271
1337
  /**
1272
1338
  * @public
1273
1339
  */
1274
1340
  export interface TraceOAuthInput {
1275
- clientId?: string;
1276
- clientSecret?: string;
1277
- endpointUrl?: string;
1278
- scope?: string;
1341
+ clientId?: string | undefined;
1342
+ clientSecret?: string | undefined;
1343
+ endpointUrl?: string | undefined;
1344
+ scope?: string | undefined;
1279
1345
  }
1280
1346
  /**
1281
1347
  * @public
@@ -1409,9 +1475,9 @@ export interface TraceSegment {
1409
1475
  version: number;
1410
1476
  status: TraceSegmentStatus;
1411
1477
  input: TraceSegmentInput;
1412
- result?: TraceSegmentResult;
1478
+ result?: TraceSegmentResult | undefined;
1413
1479
  start: number;
1414
- duration?: number;
1480
+ duration?: number | undefined;
1415
1481
  }
1416
1482
  /**
1417
1483
  * @public
@@ -1437,21 +1503,21 @@ export interface TraceSession {
1437
1503
  botName: string;
1438
1504
  callId: string;
1439
1505
  flowIndex: number;
1440
- language?: string;
1441
- callerName?: string;
1442
- callerNumber?: string;
1506
+ language?: string | undefined;
1507
+ callerName?: string | undefined;
1508
+ callerNumber?: string | undefined;
1443
1509
  status: TraceSessionStatus;
1444
1510
  start: number;
1445
- duration?: number;
1511
+ duration?: number | undefined;
1446
1512
  }
1447
1513
  /**
1448
1514
  * @public
1449
1515
  */
1450
1516
  export interface PubSubBroadcastItem {
1451
- session?: TraceSession;
1452
- sessionId?: string;
1453
- activity?: TraceActivity;
1454
- segment?: TraceSegment;
1517
+ session?: TraceSession | undefined;
1518
+ sessionId?: string | undefined;
1519
+ activity?: TraceActivity | undefined;
1520
+ segment?: TraceSegment | undefined;
1455
1521
  }
1456
1522
  /**
1457
1523
  * @public
@@ -1504,7 +1570,7 @@ export interface ReplyWebhookEvent {
1504
1570
  */
1505
1571
  export interface SessionEndedEvent {
1506
1572
  type: VoiceBotEventType;
1507
- error?: string;
1573
+ error?: string | undefined;
1508
1574
  time: number;
1509
1575
  }
1510
1576
  /**
@@ -1539,6 +1605,19 @@ export interface SessionStartedWebhookEvent {
1539
1605
  flowIndex: number;
1540
1606
  event: SessionStartedEvent;
1541
1607
  }
1608
+ /**
1609
+ * @public
1610
+ */
1611
+ export interface StopWebsocketCommandData {
1612
+ type: VoiceBotCommandType;
1613
+ }
1614
+ /**
1615
+ * @public
1616
+ */
1617
+ export interface StopWebsocketCommand {
1618
+ type: string;
1619
+ command: StopWebsocketCommandData;
1620
+ }
1542
1621
  /**
1543
1622
  * @public
1544
1623
  */
@@ -1553,32 +1632,35 @@ export interface TranscriptionWebhookEvent {
1553
1632
  * @public
1554
1633
  */
1555
1634
  export interface DescribeEventOutput {
1556
- TranscriptionWebsocketEvent?: TranscriptionWebsocketEvent;
1557
- ReplyWebsocketEvent?: ReplyWebsocketEvent;
1558
- PlaybackWebsocketEvent?: PlaybackWebsocketEvent;
1559
- InterruptionWebsocketEvent?: InterruptionWebsocketEvent;
1560
- CompleteWebsocketEvent?: CompleteWebsocketEvent;
1561
- SayWebsocketCommand?: SayWebsocketCommand;
1562
- HangupWebsocketCommand?: HangupWebsocketCommand;
1563
- TransferWebsocketCommand?: TransferWebsocketCommand;
1564
- SessionStartedWebhookEvent?: SessionStartedWebhookEvent;
1565
- SessionEndedWebhookEvent?: SessionEndedWebhookEvent;
1566
- TranscriptionWebhookEvent?: TranscriptionWebhookEvent;
1567
- ReplyWebhookEvent?: ReplyWebhookEvent;
1568
- PlaybackWebhookEvent?: PlaybackWebhookEvent;
1569
- InterruptionWebhookEvent?: InterruptionWebhookEvent;
1570
- CompleteWebhookEvent?: CompleteWebhookEvent;
1571
- PubSubBroadcastWebsocketEvent?: PubSubBroadcastWebsocketEvent;
1572
- PubSubSubscribeWebsocketCommand?: PubSubSubscribeWebsocketCommand;
1573
- PubSubSubscribedWebsocketEvent?: PubSubSubscribedWebsocketEvent;
1574
- PubSubUnsubscribeWebsocketCommand?: PubSubUnsubscribeWebsocketCommand;
1575
- PubSubUnsubscribedWebsocketEvent?: PubSubUnsubscribedWebsocketEvent;
1635
+ TranscriptionWebsocketEvent?: TranscriptionWebsocketEvent | undefined;
1636
+ ReplyWebsocketEvent?: ReplyWebsocketEvent | undefined;
1637
+ PlaybackWebsocketEvent?: PlaybackWebsocketEvent | undefined;
1638
+ InterruptionWebsocketEvent?: InterruptionWebsocketEvent | undefined;
1639
+ CompleteWebsocketEvent?: CompleteWebsocketEvent | undefined;
1640
+ SayWebsocketCommand?: SayWebsocketCommand | undefined;
1641
+ PlayWebsocketCommand?: PlayWebsocketCommand | undefined;
1642
+ StopWebsocketCommand?: StopWebsocketCommand | undefined;
1643
+ HangupWebsocketCommand?: HangupWebsocketCommand | undefined;
1644
+ TransferWebsocketCommand?: TransferWebsocketCommand | undefined;
1645
+ SessionStartedWebhookEvent?: SessionStartedWebhookEvent | undefined;
1646
+ SessionEndedWebhookEvent?: SessionEndedWebhookEvent | undefined;
1647
+ TranscriptionWebhookEvent?: TranscriptionWebhookEvent | undefined;
1648
+ AudioWebhookEvent?: AudioWebhookEvent | undefined;
1649
+ ReplyWebhookEvent?: ReplyWebhookEvent | undefined;
1650
+ PlaybackWebhookEvent?: PlaybackWebhookEvent | undefined;
1651
+ InterruptionWebhookEvent?: InterruptionWebhookEvent | undefined;
1652
+ CompleteWebhookEvent?: CompleteWebhookEvent | undefined;
1653
+ PubSubBroadcastWebsocketEvent?: PubSubBroadcastWebsocketEvent | undefined;
1654
+ PubSubSubscribeWebsocketCommand?: PubSubSubscribeWebsocketCommand | undefined;
1655
+ PubSubSubscribedWebsocketEvent?: PubSubSubscribedWebsocketEvent | undefined;
1656
+ PubSubUnsubscribeWebsocketCommand?: PubSubUnsubscribeWebsocketCommand | undefined;
1657
+ PubSubUnsubscribedWebsocketEvent?: PubSubUnsubscribedWebsocketEvent | undefined;
1576
1658
  }
1577
1659
  /**
1578
1660
  * @public
1579
1661
  */
1580
1662
  export interface GetTraceInput {
1581
- company?: string;
1663
+ company?: string | undefined;
1582
1664
  sessionId: string;
1583
1665
  }
1584
1666
  /**
@@ -1588,8 +1670,8 @@ export interface Trace {
1588
1670
  session: TraceSession;
1589
1671
  activities: (TraceActivity)[];
1590
1672
  segments: (TraceSegment)[];
1591
- usage?: TraceUsage;
1592
- cost?: number;
1673
+ usage?: TraceUsage | undefined;
1674
+ cost?: number | undefined;
1593
1675
  }
1594
1676
  /**
1595
1677
  * @public
@@ -1603,7 +1685,7 @@ export interface GetTraceOutput {
1603
1685
  export declare class VoiceBotNotFoundException extends __BaseException {
1604
1686
  readonly name: "VoiceBotNotFoundException";
1605
1687
  readonly $fault: "client";
1606
- type?: string;
1688
+ type?: string | undefined;
1607
1689
  /**
1608
1690
  * @internal
1609
1691
  */
@@ -1613,7 +1695,7 @@ export declare class VoiceBotNotFoundException extends __BaseException {
1613
1695
  * @public
1614
1696
  */
1615
1697
  export interface GetVoiceBotInput {
1616
- company?: string;
1698
+ company?: string | undefined;
1617
1699
  botId: string;
1618
1700
  }
1619
1701
  /**
@@ -1626,7 +1708,7 @@ export interface GetVoiceBotOutput {
1626
1708
  * @public
1627
1709
  */
1628
1710
  export interface ListTracesInput {
1629
- company?: string;
1711
+ company?: string | undefined;
1630
1712
  }
1631
1713
  /**
1632
1714
  * @public
@@ -1638,7 +1720,7 @@ export interface ListTracesOutput {
1638
1720
  * @public
1639
1721
  */
1640
1722
  export interface ListVoiceBotsInput {
1641
- company?: string;
1723
+ company?: string | undefined;
1642
1724
  }
1643
1725
  /**
1644
1726
  * @public
@@ -1650,7 +1732,7 @@ export interface ListVoiceBotsOutput {
1650
1732
  * @public
1651
1733
  */
1652
1734
  export interface ListVoiceBotsNamesInput {
1653
- company?: string;
1735
+ company?: string | undefined;
1654
1736
  }
1655
1737
  /**
1656
1738
  * @public
@@ -1669,7 +1751,7 @@ export interface ListVoiceBotsNamesOutput {
1669
1751
  * @public
1670
1752
  */
1671
1753
  export interface SendHangupInput {
1672
- reason?: string;
1754
+ reason?: string | undefined;
1673
1755
  sessionId: string;
1674
1756
  }
1675
1757
  /**
@@ -1683,19 +1765,38 @@ export interface SendHangupOutput {
1683
1765
  export declare class VoiceSessionNotFoundException extends __BaseException {
1684
1766
  readonly name: "VoiceSessionNotFoundException";
1685
1767
  readonly $fault: "client";
1686
- type?: string;
1768
+ type?: string | undefined;
1687
1769
  /**
1688
1770
  * @internal
1689
1771
  */
1690
1772
  constructor(opts: __ExceptionOptionType<VoiceSessionNotFoundException, __BaseException>);
1691
1773
  }
1774
+ /**
1775
+ * @public
1776
+ */
1777
+ export interface SendPlayInput {
1778
+ replyId: string;
1779
+ streamId: string;
1780
+ /**
1781
+ * The audio chunk is encoded in base64 and should be played in the stream. The chunk must use the sample rate specified in the "say" command and be PCM encoded.
1782
+ * @public
1783
+ */
1784
+ data: string;
1785
+ sessionId: string;
1786
+ }
1787
+ /**
1788
+ * @public
1789
+ */
1790
+ export interface SendPlayOutput {
1791
+ }
1692
1792
  /**
1693
1793
  * @public
1694
1794
  */
1695
1795
  export interface SendSayInput {
1696
1796
  text: string;
1697
1797
  replyId: string;
1698
- interruptible?: boolean;
1798
+ interruptible?: boolean | undefined;
1799
+ audio?: SayCommandAudioOptions | undefined;
1699
1800
  sessionId: string;
1700
1801
  }
1701
1802
  /**
@@ -1703,6 +1804,17 @@ export interface SendSayInput {
1703
1804
  */
1704
1805
  export interface SendSayOutput {
1705
1806
  }
1807
+ /**
1808
+ * @public
1809
+ */
1810
+ export interface SendStopInput {
1811
+ sessionId: string;
1812
+ }
1813
+ /**
1814
+ * @public
1815
+ */
1816
+ export interface SendStopOutput {
1817
+ }
1706
1818
  /**
1707
1819
  * @public
1708
1820
  */
@@ -1725,14 +1837,14 @@ export interface UpdateVoiceBotInput {
1725
1837
  * The initial message that will be played at the start of the session.
1726
1838
  * @public
1727
1839
  */
1728
- message?: string;
1729
- pipeline?: VoiceBotPipelineSettings;
1840
+ message?: string | undefined;
1841
+ pipeline?: VoiceBotPipelineSettings | undefined;
1730
1842
  /**
1731
1843
  * An endpoint to use to generate replies during voice bot session.
1732
1844
  * @public
1733
1845
  */
1734
1846
  endpoint: VoiceBotEndpoint;
1735
- company?: string;
1847
+ company?: string | undefined;
1736
1848
  botId: string;
1737
1849
  }
1738
1850
  /**