@wildix/wim-voicebots-client 1.0.22 → 1.0.23
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/VoiceBots.js +4 -0
- package/dist-cjs/VoiceBotsClient.js +4 -5
- package/dist-cjs/commands/SendPlayCommand.js +21 -0
- package/dist-cjs/commands/SendStopCommand.js +21 -0
- package/dist-cjs/commands/index.js +2 -0
- package/dist-cjs/models/models_0.js +28 -22
- package/dist-cjs/protocols/Aws_restJson1.js +104 -85
- package/dist-cjs/runtimeConfig.browser.js +1 -1
- package/dist-cjs/runtimeConfig.js +4 -3
- package/dist-cjs/runtimeExtensions.js +2 -10
- package/dist-es/VoiceBots.js +4 -0
- package/dist-es/VoiceBotsClient.js +4 -5
- package/dist-es/commands/SendPlayCommand.js +17 -0
- package/dist-es/commands/SendStopCommand.js +17 -0
- package/dist-es/commands/index.js +2 -0
- package/dist-es/models/models_0.js +16 -10
- package/dist-es/protocols/Aws_restJson1.js +68 -53
- package/dist-es/runtimeConfig.browser.js +2 -2
- package/dist-es/runtimeConfig.js +5 -4
- package/dist-es/runtimeExtensions.js +2 -10
- package/dist-types/VoiceBots.d.ts +14 -0
- package/dist-types/VoiceBotsClient.d.ts +5 -3
- package/dist-types/commands/CreateVoiceBotCommand.d.ts +12 -0
- package/dist-types/commands/DeleteVoiceBotCommand.d.ts +12 -0
- package/dist-types/commands/DescribeEventCommand.d.ts +74 -23
- package/dist-types/commands/GetTraceCommand.d.ts +33 -8
- package/dist-types/commands/GetVoiceBotCommand.d.ts +12 -0
- package/dist-types/commands/ListTracesCommand.d.ts +12 -0
- package/dist-types/commands/ListVoiceBotsCommand.d.ts +12 -0
- package/dist-types/commands/ListVoiceBotsNamesCommand.d.ts +12 -0
- package/dist-types/commands/SendHangupCommand.d.ts +12 -0
- package/dist-types/commands/SendPlayCommand.d.ts +79 -0
- package/dist-types/commands/SendSayCommand.d.ts +16 -0
- package/dist-types/commands/SendStopCommand.d.ts +76 -0
- package/dist-types/commands/SendTransferCommand.d.ts +12 -0
- package/dist-types/commands/UpdateVoiceBotCommand.d.ts +12 -0
- package/dist-types/commands/index.d.ts +2 -0
- package/dist-types/models/models_0.d.ts +211 -109
- package/dist-types/protocols/Aws_restJson1.d.ts +18 -0
- package/dist-types/runtimeConfig.browser.d.ts +3 -2
- package/dist-types/runtimeConfig.d.ts +3 -2
- package/dist-types/runtimeConfig.native.d.ts +3 -2
- package/package.json +37 -33
|
@@ -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,11 @@ 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
|
+
parameters?: __DocumentType | undefined;
|
|
216
238
|
}
|
|
217
239
|
/**
|
|
218
240
|
* @public
|
|
@@ -252,13 +274,13 @@ export interface VoiceBotFunctionDefinition {
|
|
|
252
274
|
* A description of what the function does, used by the model to choose when and how to call the function.
|
|
253
275
|
* @public
|
|
254
276
|
*/
|
|
255
|
-
description?: string;
|
|
277
|
+
description?: string | undefined;
|
|
256
278
|
/**
|
|
257
279
|
* The parameters the functions accepts, described as a JSON Schema object.
|
|
258
280
|
* @public
|
|
259
281
|
*/
|
|
260
|
-
parameters?: __DocumentType;
|
|
261
|
-
integration?: VoiceBotFunctionIntegration;
|
|
282
|
+
parameters?: __DocumentType | undefined;
|
|
283
|
+
integration?: VoiceBotFunctionIntegration | undefined;
|
|
262
284
|
}
|
|
263
285
|
/**
|
|
264
286
|
* @public
|
|
@@ -276,7 +298,7 @@ export type VoiceBotToolType = typeof VoiceBotToolType[keyof typeof VoiceBotTool
|
|
|
276
298
|
*/
|
|
277
299
|
export interface VoiceBotTool {
|
|
278
300
|
type: VoiceBotToolType;
|
|
279
|
-
function?: VoiceBotFunctionDefinition;
|
|
301
|
+
function?: VoiceBotFunctionDefinition | undefined;
|
|
280
302
|
}
|
|
281
303
|
/**
|
|
282
304
|
* @public
|
|
@@ -287,12 +309,12 @@ export interface VoiceBotLlmEndpoint {
|
|
|
287
309
|
* Embedded functions to use within voice session.
|
|
288
310
|
* @public
|
|
289
311
|
*/
|
|
290
|
-
embeddedTools?: (VoiceBotEmbeddedTool)[];
|
|
312
|
+
embeddedTools?: (VoiceBotEmbeddedTool)[] | undefined;
|
|
291
313
|
/**
|
|
292
314
|
* Custom tools to be used within voice session.
|
|
293
315
|
* @public
|
|
294
316
|
*/
|
|
295
|
-
tools?: (VoiceBotTool)[];
|
|
317
|
+
tools?: (VoiceBotTool)[] | undefined;
|
|
296
318
|
}
|
|
297
319
|
/**
|
|
298
320
|
* @public
|
|
@@ -438,37 +460,37 @@ export interface VoiceBotPipelineSettings {
|
|
|
438
460
|
* If enabled the user can interrupt the the bot playback.
|
|
439
461
|
* @public
|
|
440
462
|
*/
|
|
441
|
-
interuptionsEnabled?: boolean;
|
|
463
|
+
interuptionsEnabled?: boolean | undefined;
|
|
442
464
|
/**
|
|
443
465
|
* The maximum number of seconds a call will last.
|
|
444
466
|
* @public
|
|
445
467
|
*/
|
|
446
|
-
maximumDuration?: number;
|
|
468
|
+
maximumDuration?: number | undefined;
|
|
447
469
|
/**
|
|
448
470
|
* An action that should be performed when max duration reached.
|
|
449
471
|
* @public
|
|
450
472
|
*/
|
|
451
|
-
maximumDurationAction?: VoiceBotPipelineTerminateAction;
|
|
473
|
+
maximumDurationAction?: VoiceBotPipelineTerminateAction | undefined;
|
|
452
474
|
/**
|
|
453
475
|
* How long to wait before a call is automatically ended due to inactivity.
|
|
454
476
|
* @public
|
|
455
477
|
*/
|
|
456
|
-
silenceTimeout?: number;
|
|
478
|
+
silenceTimeout?: number | undefined;
|
|
457
479
|
/**
|
|
458
480
|
* An action that should be performed when silence timeout reached.
|
|
459
481
|
* @public
|
|
460
482
|
*/
|
|
461
|
-
silenceTimeoutAction?: VoiceBotPipelineTerminateAction;
|
|
483
|
+
silenceTimeoutAction?: VoiceBotPipelineTerminateAction | undefined;
|
|
462
484
|
/**
|
|
463
485
|
* If enabled the bot can hangup the call.
|
|
464
486
|
* @public
|
|
465
487
|
*/
|
|
466
|
-
endCallEnabled?: boolean;
|
|
488
|
+
endCallEnabled?: boolean | undefined;
|
|
467
489
|
/**
|
|
468
490
|
* A list of phases separated by comma, which will end the call matched.
|
|
469
491
|
* @public
|
|
470
492
|
*/
|
|
471
|
-
endCallPhases?: string;
|
|
493
|
+
endCallPhases?: string | undefined;
|
|
472
494
|
}
|
|
473
495
|
/**
|
|
474
496
|
* @public
|
|
@@ -479,14 +501,14 @@ export interface CreateVoiceBotInput {
|
|
|
479
501
|
* The initial message that will be played at the start of the session.
|
|
480
502
|
* @public
|
|
481
503
|
*/
|
|
482
|
-
message?: string;
|
|
483
|
-
pipeline?: VoiceBotPipelineSettings;
|
|
504
|
+
message?: string | undefined;
|
|
505
|
+
pipeline?: VoiceBotPipelineSettings | undefined;
|
|
484
506
|
/**
|
|
485
507
|
* An endpoint to use to generate replies during voice bot session.
|
|
486
508
|
* @public
|
|
487
509
|
*/
|
|
488
510
|
endpoint: VoiceBotEndpoint;
|
|
489
|
-
company?: string;
|
|
511
|
+
company?: string | undefined;
|
|
490
512
|
}
|
|
491
513
|
/**
|
|
492
514
|
* @public
|
|
@@ -497,8 +519,8 @@ export interface VoiceBot {
|
|
|
497
519
|
* The initial message that will be played at the start of the session.
|
|
498
520
|
* @public
|
|
499
521
|
*/
|
|
500
|
-
message?: string;
|
|
501
|
-
pipeline?: VoiceBotPipelineSettings;
|
|
522
|
+
message?: string | undefined;
|
|
523
|
+
pipeline?: VoiceBotPipelineSettings | undefined;
|
|
502
524
|
/**
|
|
503
525
|
* An endpoint to use to generate replies during voice bot session.
|
|
504
526
|
* @public
|
|
@@ -506,7 +528,7 @@ export interface VoiceBot {
|
|
|
506
528
|
endpoint: VoiceBotEndpoint;
|
|
507
529
|
id: string;
|
|
508
530
|
createdAt: string;
|
|
509
|
-
updatedAt?: string;
|
|
531
|
+
updatedAt?: string | undefined;
|
|
510
532
|
}
|
|
511
533
|
/**
|
|
512
534
|
* @public
|
|
@@ -520,7 +542,7 @@ export interface CreateVoiceBotOutput {
|
|
|
520
542
|
export declare class VoiceBotNonUniqueNameException extends __BaseException {
|
|
521
543
|
readonly name: "VoiceBotNonUniqueNameException";
|
|
522
544
|
readonly $fault: "client";
|
|
523
|
-
type?: string;
|
|
545
|
+
type?: string | undefined;
|
|
524
546
|
/**
|
|
525
547
|
* @internal
|
|
526
548
|
*/
|
|
@@ -530,7 +552,7 @@ export declare class VoiceBotNonUniqueNameException extends __BaseException {
|
|
|
530
552
|
* @public
|
|
531
553
|
*/
|
|
532
554
|
export interface DeleteVoiceBotInput {
|
|
533
|
-
company?: string;
|
|
555
|
+
company?: string | undefined;
|
|
534
556
|
botId: string;
|
|
535
557
|
}
|
|
536
558
|
/**
|
|
@@ -549,7 +571,9 @@ export interface DescribeEventInput {
|
|
|
549
571
|
*/
|
|
550
572
|
export declare const VoiceBotCommandType: {
|
|
551
573
|
readonly HANGUP: "hangup";
|
|
574
|
+
readonly PLAY: "play";
|
|
552
575
|
readonly SAY: "say";
|
|
576
|
+
readonly STOP: "stop";
|
|
553
577
|
readonly TRANSFER: "transfer";
|
|
554
578
|
};
|
|
555
579
|
/**
|
|
@@ -560,7 +584,7 @@ export type VoiceBotCommandType = typeof VoiceBotCommandType[keyof typeof VoiceB
|
|
|
560
584
|
* @public
|
|
561
585
|
*/
|
|
562
586
|
export interface HangupWebsocketCommandData {
|
|
563
|
-
reason?: string;
|
|
587
|
+
reason?: string | undefined;
|
|
564
588
|
type: VoiceBotCommandType;
|
|
565
589
|
}
|
|
566
590
|
/**
|
|
@@ -606,7 +630,7 @@ export interface PlaybackEvent {
|
|
|
606
630
|
text: string;
|
|
607
631
|
complete: boolean;
|
|
608
632
|
startTime: number;
|
|
609
|
-
endTime?: number;
|
|
633
|
+
endTime?: number | undefined;
|
|
610
634
|
}
|
|
611
635
|
/**
|
|
612
636
|
* @public
|
|
@@ -625,6 +649,26 @@ export interface PlaybackWebsocketEvent {
|
|
|
625
649
|
type: string;
|
|
626
650
|
event: PlaybackEvent;
|
|
627
651
|
}
|
|
652
|
+
/**
|
|
653
|
+
* @public
|
|
654
|
+
*/
|
|
655
|
+
export interface PlayWebsocketCommandData {
|
|
656
|
+
replyId: string;
|
|
657
|
+
streamId: string;
|
|
658
|
+
/**
|
|
659
|
+
* 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.
|
|
660
|
+
* @public
|
|
661
|
+
*/
|
|
662
|
+
data: string;
|
|
663
|
+
type: VoiceBotCommandType;
|
|
664
|
+
}
|
|
665
|
+
/**
|
|
666
|
+
* @public
|
|
667
|
+
*/
|
|
668
|
+
export interface PlayWebsocketCommand {
|
|
669
|
+
type: string;
|
|
670
|
+
command: PlayWebsocketCommandData;
|
|
671
|
+
}
|
|
628
672
|
/**
|
|
629
673
|
* @public
|
|
630
674
|
*/
|
|
@@ -683,19 +727,19 @@ export type TraceActivityStatus = typeof TraceActivityStatus[keyof typeof TraceA
|
|
|
683
727
|
* @public
|
|
684
728
|
*/
|
|
685
729
|
export interface TraceConnectEventTrigger {
|
|
686
|
-
parameters?: __DocumentType;
|
|
730
|
+
parameters?: __DocumentType | undefined;
|
|
687
731
|
}
|
|
688
732
|
/**
|
|
689
733
|
* @public
|
|
690
734
|
*/
|
|
691
735
|
export interface TraceDisconnectEventTrigger {
|
|
692
|
-
parameters?: __DocumentType;
|
|
736
|
+
parameters?: __DocumentType | undefined;
|
|
693
737
|
}
|
|
694
738
|
/**
|
|
695
739
|
* @public
|
|
696
740
|
*/
|
|
697
741
|
export interface TraceDurationTimeoutTaskTrigger {
|
|
698
|
-
parameters?: __DocumentType;
|
|
742
|
+
parameters?: __DocumentType | undefined;
|
|
699
743
|
}
|
|
700
744
|
/**
|
|
701
745
|
* @public
|
|
@@ -714,13 +758,21 @@ export interface ReplyWebsocketEvent {
|
|
|
714
758
|
type: string;
|
|
715
759
|
event: ReplyEvent;
|
|
716
760
|
}
|
|
761
|
+
/**
|
|
762
|
+
* @public
|
|
763
|
+
*/
|
|
764
|
+
export interface SayCommandAudioOptions {
|
|
765
|
+
streamId: string;
|
|
766
|
+
sampleRate: number;
|
|
767
|
+
}
|
|
717
768
|
/**
|
|
718
769
|
* @public
|
|
719
770
|
*/
|
|
720
771
|
export interface SayWebsocketCommandData {
|
|
721
772
|
text: string;
|
|
722
773
|
replyId: string;
|
|
723
|
-
interruptible?: boolean;
|
|
774
|
+
interruptible?: boolean | undefined;
|
|
775
|
+
audio?: SayCommandAudioOptions | undefined;
|
|
724
776
|
type: VoiceBotCommandType;
|
|
725
777
|
}
|
|
726
778
|
/**
|
|
@@ -734,7 +786,7 @@ export interface SayWebsocketCommand {
|
|
|
734
786
|
* @public
|
|
735
787
|
*/
|
|
736
788
|
export interface TraceSilenceTimeoutTaskTrigger {
|
|
737
|
-
parameters?: __DocumentType;
|
|
789
|
+
parameters?: __DocumentType | undefined;
|
|
738
790
|
}
|
|
739
791
|
/**
|
|
740
792
|
* @public
|
|
@@ -743,7 +795,7 @@ export interface TranscriptionEvent {
|
|
|
743
795
|
type: VoiceBotEventType;
|
|
744
796
|
id: string;
|
|
745
797
|
text: string;
|
|
746
|
-
final?: boolean;
|
|
798
|
+
final?: boolean | undefined;
|
|
747
799
|
time: number;
|
|
748
800
|
}
|
|
749
801
|
/**
|
|
@@ -995,29 +1047,32 @@ export declare namespace TraceActivityTrigger {
|
|
|
995
1047
|
* @public
|
|
996
1048
|
*/
|
|
997
1049
|
export interface TraceGenerationUsage {
|
|
998
|
-
tokens?: number;
|
|
999
|
-
outputTokens?: number;
|
|
1000
|
-
inputTokens?: number;
|
|
1050
|
+
tokens?: number | undefined;
|
|
1051
|
+
outputTokens?: number | undefined;
|
|
1052
|
+
inputTokens?: number | undefined;
|
|
1053
|
+
category?: string | undefined;
|
|
1001
1054
|
}
|
|
1002
1055
|
/**
|
|
1003
1056
|
* @public
|
|
1004
1057
|
*/
|
|
1005
1058
|
export interface TracePlaybackUsage {
|
|
1006
|
-
chars?: number;
|
|
1059
|
+
chars?: number | undefined;
|
|
1060
|
+
category?: string | undefined;
|
|
1007
1061
|
}
|
|
1008
1062
|
/**
|
|
1009
1063
|
* @public
|
|
1010
1064
|
*/
|
|
1011
1065
|
export interface TraceTranscribeUsage {
|
|
1012
|
-
seconds?: number;
|
|
1066
|
+
seconds?: number | undefined;
|
|
1067
|
+
category?: string | undefined;
|
|
1013
1068
|
}
|
|
1014
1069
|
/**
|
|
1015
1070
|
* @public
|
|
1016
1071
|
*/
|
|
1017
1072
|
export interface TraceUsage {
|
|
1018
|
-
generation?: TraceGenerationUsage;
|
|
1019
|
-
transcribe?: TraceTranscribeUsage;
|
|
1020
|
-
playback?: TracePlaybackUsage;
|
|
1073
|
+
generation?: TraceGenerationUsage | undefined;
|
|
1074
|
+
transcribe?: TraceTranscribeUsage | undefined;
|
|
1075
|
+
playback?: TracePlaybackUsage | undefined;
|
|
1021
1076
|
}
|
|
1022
1077
|
/**
|
|
1023
1078
|
* @public
|
|
@@ -1027,33 +1082,34 @@ export interface TraceActivity {
|
|
|
1027
1082
|
version: number;
|
|
1028
1083
|
status: TraceActivityStatus;
|
|
1029
1084
|
trigger: TraceActivityTrigger;
|
|
1030
|
-
result?: TraceActivityResult;
|
|
1085
|
+
result?: TraceActivityResult | undefined;
|
|
1031
1086
|
start: number;
|
|
1032
|
-
duration?: number;
|
|
1033
|
-
|
|
1087
|
+
duration?: number | undefined;
|
|
1088
|
+
timings?: Record<string, number> | undefined;
|
|
1089
|
+
usage?: TraceUsage | undefined;
|
|
1034
1090
|
}
|
|
1035
1091
|
/**
|
|
1036
1092
|
* @public
|
|
1037
1093
|
*/
|
|
1038
1094
|
export interface TraceDelegationToolCall {
|
|
1039
|
-
id?: string;
|
|
1095
|
+
id?: string | undefined;
|
|
1040
1096
|
}
|
|
1041
1097
|
/**
|
|
1042
1098
|
* @public
|
|
1043
1099
|
*/
|
|
1044
1100
|
export interface TraceFunctionToolCallRequest {
|
|
1045
|
-
url?: string;
|
|
1046
|
-
method?: string;
|
|
1047
|
-
headers?: Record<string, string
|
|
1048
|
-
body?: string;
|
|
1101
|
+
url?: string | undefined;
|
|
1102
|
+
method?: string | undefined;
|
|
1103
|
+
headers?: Record<string, string> | undefined;
|
|
1104
|
+
body?: string | undefined;
|
|
1049
1105
|
}
|
|
1050
1106
|
/**
|
|
1051
1107
|
* @public
|
|
1052
1108
|
*/
|
|
1053
1109
|
export interface TraceFunctionToolCall {
|
|
1054
|
-
name?: string;
|
|
1055
|
-
args?: string;
|
|
1056
|
-
request?: TraceFunctionToolCallRequest;
|
|
1110
|
+
name?: string | undefined;
|
|
1111
|
+
args?: string | undefined;
|
|
1112
|
+
request?: TraceFunctionToolCallRequest | undefined;
|
|
1057
1113
|
}
|
|
1058
1114
|
/**
|
|
1059
1115
|
* @public
|
|
@@ -1064,8 +1120,8 @@ export interface TraceHangupToolCall {
|
|
|
1064
1120
|
* @public
|
|
1065
1121
|
*/
|
|
1066
1122
|
export interface TraceTransferToolCall {
|
|
1067
|
-
context?: string;
|
|
1068
|
-
extension?: string;
|
|
1123
|
+
context?: string | undefined;
|
|
1124
|
+
extension?: string | undefined;
|
|
1069
1125
|
}
|
|
1070
1126
|
/**
|
|
1071
1127
|
* @public
|
|
@@ -1145,8 +1201,8 @@ export declare namespace TraceToolCall {
|
|
|
1145
1201
|
* @public
|
|
1146
1202
|
*/
|
|
1147
1203
|
export interface TraceSegmentCompletionToolMessage {
|
|
1148
|
-
call?: TraceToolCall;
|
|
1149
|
-
result?: string;
|
|
1204
|
+
call?: TraceToolCall | undefined;
|
|
1205
|
+
result?: string | undefined;
|
|
1150
1206
|
}
|
|
1151
1207
|
/**
|
|
1152
1208
|
* @public
|
|
@@ -1266,16 +1322,16 @@ export interface TraceGenericInputBlock {
|
|
|
1266
1322
|
*/
|
|
1267
1323
|
export interface TraceGenericInput {
|
|
1268
1324
|
title: string;
|
|
1269
|
-
blocks?: (TraceGenericInputBlock)[];
|
|
1325
|
+
blocks?: (TraceGenericInputBlock)[] | undefined;
|
|
1270
1326
|
}
|
|
1271
1327
|
/**
|
|
1272
1328
|
* @public
|
|
1273
1329
|
*/
|
|
1274
1330
|
export interface TraceOAuthInput {
|
|
1275
|
-
clientId?: string;
|
|
1276
|
-
clientSecret?: string;
|
|
1277
|
-
endpointUrl?: string;
|
|
1278
|
-
scope?: string;
|
|
1331
|
+
clientId?: string | undefined;
|
|
1332
|
+
clientSecret?: string | undefined;
|
|
1333
|
+
endpointUrl?: string | undefined;
|
|
1334
|
+
scope?: string | undefined;
|
|
1279
1335
|
}
|
|
1280
1336
|
/**
|
|
1281
1337
|
* @public
|
|
@@ -1409,9 +1465,9 @@ export interface TraceSegment {
|
|
|
1409
1465
|
version: number;
|
|
1410
1466
|
status: TraceSegmentStatus;
|
|
1411
1467
|
input: TraceSegmentInput;
|
|
1412
|
-
result?: TraceSegmentResult;
|
|
1468
|
+
result?: TraceSegmentResult | undefined;
|
|
1413
1469
|
start: number;
|
|
1414
|
-
duration?: number;
|
|
1470
|
+
duration?: number | undefined;
|
|
1415
1471
|
}
|
|
1416
1472
|
/**
|
|
1417
1473
|
* @public
|
|
@@ -1437,21 +1493,21 @@ export interface TraceSession {
|
|
|
1437
1493
|
botName: string;
|
|
1438
1494
|
callId: string;
|
|
1439
1495
|
flowIndex: number;
|
|
1440
|
-
language?: string;
|
|
1441
|
-
callerName?: string;
|
|
1442
|
-
callerNumber?: string;
|
|
1496
|
+
language?: string | undefined;
|
|
1497
|
+
callerName?: string | undefined;
|
|
1498
|
+
callerNumber?: string | undefined;
|
|
1443
1499
|
status: TraceSessionStatus;
|
|
1444
1500
|
start: number;
|
|
1445
|
-
duration?: number;
|
|
1501
|
+
duration?: number | undefined;
|
|
1446
1502
|
}
|
|
1447
1503
|
/**
|
|
1448
1504
|
* @public
|
|
1449
1505
|
*/
|
|
1450
1506
|
export interface PubSubBroadcastItem {
|
|
1451
|
-
session?: TraceSession;
|
|
1452
|
-
sessionId?: string;
|
|
1453
|
-
activity?: TraceActivity;
|
|
1454
|
-
segment?: TraceSegment;
|
|
1507
|
+
session?: TraceSession | undefined;
|
|
1508
|
+
sessionId?: string | undefined;
|
|
1509
|
+
activity?: TraceActivity | undefined;
|
|
1510
|
+
segment?: TraceSegment | undefined;
|
|
1455
1511
|
}
|
|
1456
1512
|
/**
|
|
1457
1513
|
* @public
|
|
@@ -1504,7 +1560,7 @@ export interface ReplyWebhookEvent {
|
|
|
1504
1560
|
*/
|
|
1505
1561
|
export interface SessionEndedEvent {
|
|
1506
1562
|
type: VoiceBotEventType;
|
|
1507
|
-
error?: string;
|
|
1563
|
+
error?: string | undefined;
|
|
1508
1564
|
time: number;
|
|
1509
1565
|
}
|
|
1510
1566
|
/**
|
|
@@ -1539,6 +1595,19 @@ export interface SessionStartedWebhookEvent {
|
|
|
1539
1595
|
flowIndex: number;
|
|
1540
1596
|
event: SessionStartedEvent;
|
|
1541
1597
|
}
|
|
1598
|
+
/**
|
|
1599
|
+
* @public
|
|
1600
|
+
*/
|
|
1601
|
+
export interface StopWebsocketCommandData {
|
|
1602
|
+
type: VoiceBotCommandType;
|
|
1603
|
+
}
|
|
1604
|
+
/**
|
|
1605
|
+
* @public
|
|
1606
|
+
*/
|
|
1607
|
+
export interface StopWebsocketCommand {
|
|
1608
|
+
type: string;
|
|
1609
|
+
command: StopWebsocketCommandData;
|
|
1610
|
+
}
|
|
1542
1611
|
/**
|
|
1543
1612
|
* @public
|
|
1544
1613
|
*/
|
|
@@ -1553,32 +1622,35 @@ export interface TranscriptionWebhookEvent {
|
|
|
1553
1622
|
* @public
|
|
1554
1623
|
*/
|
|
1555
1624
|
export interface DescribeEventOutput {
|
|
1556
|
-
TranscriptionWebsocketEvent?: TranscriptionWebsocketEvent;
|
|
1557
|
-
ReplyWebsocketEvent?: ReplyWebsocketEvent;
|
|
1558
|
-
PlaybackWebsocketEvent?: PlaybackWebsocketEvent;
|
|
1559
|
-
InterruptionWebsocketEvent?: InterruptionWebsocketEvent;
|
|
1560
|
-
CompleteWebsocketEvent?: CompleteWebsocketEvent;
|
|
1561
|
-
SayWebsocketCommand?: SayWebsocketCommand;
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1625
|
+
TranscriptionWebsocketEvent?: TranscriptionWebsocketEvent | undefined;
|
|
1626
|
+
ReplyWebsocketEvent?: ReplyWebsocketEvent | undefined;
|
|
1627
|
+
PlaybackWebsocketEvent?: PlaybackWebsocketEvent | undefined;
|
|
1628
|
+
InterruptionWebsocketEvent?: InterruptionWebsocketEvent | undefined;
|
|
1629
|
+
CompleteWebsocketEvent?: CompleteWebsocketEvent | undefined;
|
|
1630
|
+
SayWebsocketCommand?: SayWebsocketCommand | undefined;
|
|
1631
|
+
PlayWebsocketCommand?: PlayWebsocketCommand | undefined;
|
|
1632
|
+
StopWebsocketCommand?: StopWebsocketCommand | undefined;
|
|
1633
|
+
HangupWebsocketCommand?: HangupWebsocketCommand | undefined;
|
|
1634
|
+
TransferWebsocketCommand?: TransferWebsocketCommand | undefined;
|
|
1635
|
+
SessionStartedWebhookEvent?: SessionStartedWebhookEvent | undefined;
|
|
1636
|
+
SessionEndedWebhookEvent?: SessionEndedWebhookEvent | undefined;
|
|
1637
|
+
TranscriptionWebhookEvent?: TranscriptionWebhookEvent | undefined;
|
|
1638
|
+
AudioWebhookEvent?: AudioWebhookEvent | undefined;
|
|
1639
|
+
ReplyWebhookEvent?: ReplyWebhookEvent | undefined;
|
|
1640
|
+
PlaybackWebhookEvent?: PlaybackWebhookEvent | undefined;
|
|
1641
|
+
InterruptionWebhookEvent?: InterruptionWebhookEvent | undefined;
|
|
1642
|
+
CompleteWebhookEvent?: CompleteWebhookEvent | undefined;
|
|
1643
|
+
PubSubBroadcastWebsocketEvent?: PubSubBroadcastWebsocketEvent | undefined;
|
|
1644
|
+
PubSubSubscribeWebsocketCommand?: PubSubSubscribeWebsocketCommand | undefined;
|
|
1645
|
+
PubSubSubscribedWebsocketEvent?: PubSubSubscribedWebsocketEvent | undefined;
|
|
1646
|
+
PubSubUnsubscribeWebsocketCommand?: PubSubUnsubscribeWebsocketCommand | undefined;
|
|
1647
|
+
PubSubUnsubscribedWebsocketEvent?: PubSubUnsubscribedWebsocketEvent | undefined;
|
|
1576
1648
|
}
|
|
1577
1649
|
/**
|
|
1578
1650
|
* @public
|
|
1579
1651
|
*/
|
|
1580
1652
|
export interface GetTraceInput {
|
|
1581
|
-
company?: string;
|
|
1653
|
+
company?: string | undefined;
|
|
1582
1654
|
sessionId: string;
|
|
1583
1655
|
}
|
|
1584
1656
|
/**
|
|
@@ -1588,8 +1660,8 @@ export interface Trace {
|
|
|
1588
1660
|
session: TraceSession;
|
|
1589
1661
|
activities: (TraceActivity)[];
|
|
1590
1662
|
segments: (TraceSegment)[];
|
|
1591
|
-
usage?: TraceUsage;
|
|
1592
|
-
cost?: number;
|
|
1663
|
+
usage?: TraceUsage | undefined;
|
|
1664
|
+
cost?: number | undefined;
|
|
1593
1665
|
}
|
|
1594
1666
|
/**
|
|
1595
1667
|
* @public
|
|
@@ -1603,7 +1675,7 @@ export interface GetTraceOutput {
|
|
|
1603
1675
|
export declare class VoiceBotNotFoundException extends __BaseException {
|
|
1604
1676
|
readonly name: "VoiceBotNotFoundException";
|
|
1605
1677
|
readonly $fault: "client";
|
|
1606
|
-
type?: string;
|
|
1678
|
+
type?: string | undefined;
|
|
1607
1679
|
/**
|
|
1608
1680
|
* @internal
|
|
1609
1681
|
*/
|
|
@@ -1613,7 +1685,7 @@ export declare class VoiceBotNotFoundException extends __BaseException {
|
|
|
1613
1685
|
* @public
|
|
1614
1686
|
*/
|
|
1615
1687
|
export interface GetVoiceBotInput {
|
|
1616
|
-
company?: string;
|
|
1688
|
+
company?: string | undefined;
|
|
1617
1689
|
botId: string;
|
|
1618
1690
|
}
|
|
1619
1691
|
/**
|
|
@@ -1626,7 +1698,7 @@ export interface GetVoiceBotOutput {
|
|
|
1626
1698
|
* @public
|
|
1627
1699
|
*/
|
|
1628
1700
|
export interface ListTracesInput {
|
|
1629
|
-
company?: string;
|
|
1701
|
+
company?: string | undefined;
|
|
1630
1702
|
}
|
|
1631
1703
|
/**
|
|
1632
1704
|
* @public
|
|
@@ -1638,7 +1710,7 @@ export interface ListTracesOutput {
|
|
|
1638
1710
|
* @public
|
|
1639
1711
|
*/
|
|
1640
1712
|
export interface ListVoiceBotsInput {
|
|
1641
|
-
company?: string;
|
|
1713
|
+
company?: string | undefined;
|
|
1642
1714
|
}
|
|
1643
1715
|
/**
|
|
1644
1716
|
* @public
|
|
@@ -1650,7 +1722,7 @@ export interface ListVoiceBotsOutput {
|
|
|
1650
1722
|
* @public
|
|
1651
1723
|
*/
|
|
1652
1724
|
export interface ListVoiceBotsNamesInput {
|
|
1653
|
-
company?: string;
|
|
1725
|
+
company?: string | undefined;
|
|
1654
1726
|
}
|
|
1655
1727
|
/**
|
|
1656
1728
|
* @public
|
|
@@ -1669,7 +1741,7 @@ export interface ListVoiceBotsNamesOutput {
|
|
|
1669
1741
|
* @public
|
|
1670
1742
|
*/
|
|
1671
1743
|
export interface SendHangupInput {
|
|
1672
|
-
reason?: string;
|
|
1744
|
+
reason?: string | undefined;
|
|
1673
1745
|
sessionId: string;
|
|
1674
1746
|
}
|
|
1675
1747
|
/**
|
|
@@ -1683,19 +1755,38 @@ export interface SendHangupOutput {
|
|
|
1683
1755
|
export declare class VoiceSessionNotFoundException extends __BaseException {
|
|
1684
1756
|
readonly name: "VoiceSessionNotFoundException";
|
|
1685
1757
|
readonly $fault: "client";
|
|
1686
|
-
type?: string;
|
|
1758
|
+
type?: string | undefined;
|
|
1687
1759
|
/**
|
|
1688
1760
|
* @internal
|
|
1689
1761
|
*/
|
|
1690
1762
|
constructor(opts: __ExceptionOptionType<VoiceSessionNotFoundException, __BaseException>);
|
|
1691
1763
|
}
|
|
1764
|
+
/**
|
|
1765
|
+
* @public
|
|
1766
|
+
*/
|
|
1767
|
+
export interface SendPlayInput {
|
|
1768
|
+
replyId: string;
|
|
1769
|
+
streamId: string;
|
|
1770
|
+
/**
|
|
1771
|
+
* 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.
|
|
1772
|
+
* @public
|
|
1773
|
+
*/
|
|
1774
|
+
data: string;
|
|
1775
|
+
sessionId: string;
|
|
1776
|
+
}
|
|
1777
|
+
/**
|
|
1778
|
+
* @public
|
|
1779
|
+
*/
|
|
1780
|
+
export interface SendPlayOutput {
|
|
1781
|
+
}
|
|
1692
1782
|
/**
|
|
1693
1783
|
* @public
|
|
1694
1784
|
*/
|
|
1695
1785
|
export interface SendSayInput {
|
|
1696
1786
|
text: string;
|
|
1697
1787
|
replyId: string;
|
|
1698
|
-
interruptible?: boolean;
|
|
1788
|
+
interruptible?: boolean | undefined;
|
|
1789
|
+
audio?: SayCommandAudioOptions | undefined;
|
|
1699
1790
|
sessionId: string;
|
|
1700
1791
|
}
|
|
1701
1792
|
/**
|
|
@@ -1703,6 +1794,17 @@ export interface SendSayInput {
|
|
|
1703
1794
|
*/
|
|
1704
1795
|
export interface SendSayOutput {
|
|
1705
1796
|
}
|
|
1797
|
+
/**
|
|
1798
|
+
* @public
|
|
1799
|
+
*/
|
|
1800
|
+
export interface SendStopInput {
|
|
1801
|
+
sessionId: string;
|
|
1802
|
+
}
|
|
1803
|
+
/**
|
|
1804
|
+
* @public
|
|
1805
|
+
*/
|
|
1806
|
+
export interface SendStopOutput {
|
|
1807
|
+
}
|
|
1706
1808
|
/**
|
|
1707
1809
|
* @public
|
|
1708
1810
|
*/
|
|
@@ -1725,14 +1827,14 @@ export interface UpdateVoiceBotInput {
|
|
|
1725
1827
|
* The initial message that will be played at the start of the session.
|
|
1726
1828
|
* @public
|
|
1727
1829
|
*/
|
|
1728
|
-
message?: string;
|
|
1729
|
-
pipeline?: VoiceBotPipelineSettings;
|
|
1830
|
+
message?: string | undefined;
|
|
1831
|
+
pipeline?: VoiceBotPipelineSettings | undefined;
|
|
1730
1832
|
/**
|
|
1731
1833
|
* An endpoint to use to generate replies during voice bot session.
|
|
1732
1834
|
* @public
|
|
1733
1835
|
*/
|
|
1734
1836
|
endpoint: VoiceBotEndpoint;
|
|
1735
|
-
company?: string;
|
|
1837
|
+
company?: string | undefined;
|
|
1736
1838
|
botId: string;
|
|
1737
1839
|
}
|
|
1738
1840
|
/**
|