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