@wildix/wim-voicebots-client 1.1.8 → 1.1.9
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/models/models_0.js +37 -1
- package/dist-cjs/protocols/Aws_restJson1.js +79 -3
- package/dist-es/models/models_0.js +36 -0
- package/dist-es/protocols/Aws_restJson1.js +80 -4
- package/dist-types/commands/CreateVoiceBotCommand.d.ts +132 -0
- package/dist-types/commands/DescribeEventCommand.d.ts +24 -0
- package/dist-types/commands/GetTraceCommand.d.ts +22 -0
- package/dist-types/commands/GetVoiceBotCommand.d.ts +66 -0
- package/dist-types/commands/ListVoiceBotsCommand.d.ts +66 -0
- package/dist-types/commands/UpdateVoiceBotCommand.d.ts +132 -0
- package/dist-types/models/models_0.d.ts +298 -1
- package/dist-types/runtimeConfig.browser.d.ts +1 -1
- package/dist-types/runtimeConfig.d.ts +1 -1
- package/dist-types/runtimeConfig.native.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.VoiceSessionNotFoundException = exports.VoiceBotNotFoundException = exports.TraceSessionStatus = exports.TraceSegmentStatus = exports.TraceSegmentResult = exports.TraceSegmentInput = exports.TraceGenericInputBlockContent = exports.TraceSegmentCompletionMessageItem = exports.TraceSegmentCompletionMessage = exports.TraceToolCall = exports.TraceActivityTrigger = exports.TraceActivityStatus = exports.TraceActivityResult = exports.VoiceBotCommandType = exports.VoiceBotNonUniqueNameException = exports.VoiceBotPipelineTerminateAction = exports.VoiceBotEndpoint = exports.VoiceBotToolType = exports.VoiceBotFunctionIntegration = exports.VoiceBotFunctionIntegrationMethod = exports.VoiceBotFunctionIntegrationWebhookAuthorization = exports.VoiceBotEmbeddedToolType = exports.VoiceBotCapability = exports.VoiceBotToolVariableHandler = exports.VoiceBotCapabilityToolPipelineType = exports.VoiceBotEventType = exports.ValidationException = exports.ForbiddenException = void 0;
|
|
3
|
+
exports.VoiceSessionNotFoundException = exports.VoiceBotNotFoundException = exports.TraceSessionStatus = exports.TraceSegmentStatus = exports.TraceSegmentResult = exports.TraceSegmentInput = exports.TraceGenericInputBlockContent = exports.TraceSegmentCompletionMessageItem = exports.TraceSegmentCompletionMessage = exports.TraceToolCall = exports.TraceActivityTrigger = exports.TraceActivityStatus = exports.TraceActivityResult = exports.VoiceBotCommandType = exports.VoiceBotNonUniqueNameException = exports.VoiceBotPipelineTerminateAction = exports.VoiceBotEndpoint = exports.VoiceBotToolType = exports.VoiceBotFunctionIntegration = exports.VoiceBotFunctionIntegrationMethod = exports.VoiceBotFunctionIntegrationWebhookAuthorization = exports.VoiceBotEmbeddedToolType = exports.VoiceBotCapability = exports.VoiceBotToolVariableHandler = exports.VoiceBotCapabilityToolPipelineType = exports.VoiceBotToolAnnotation = exports.VoiceBotEventType = exports.AnnotationSourceType = exports.AnnotationPayload = exports.ValidationException = exports.ForbiddenException = void 0;
|
|
4
4
|
const VoiceBotsServiceException_1 = require("./VoiceBotsServiceException");
|
|
5
5
|
class ForbiddenException extends VoiceBotsServiceException_1.VoiceBotsServiceException {
|
|
6
6
|
name = "ForbiddenException";
|
|
@@ -28,6 +28,26 @@ class ValidationException extends VoiceBotsServiceException_1.VoiceBotsServiceEx
|
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
exports.ValidationException = ValidationException;
|
|
31
|
+
var AnnotationPayload;
|
|
32
|
+
(function (AnnotationPayload) {
|
|
33
|
+
AnnotationPayload.visit = (value, visitor) => {
|
|
34
|
+
if (value.tag !== undefined)
|
|
35
|
+
return visitor.tag(value.tag);
|
|
36
|
+
if (value.text !== undefined)
|
|
37
|
+
return visitor.text(value.text);
|
|
38
|
+
if (value.variables !== undefined)
|
|
39
|
+
return visitor.variables(value.variables);
|
|
40
|
+
if (value.result !== undefined)
|
|
41
|
+
return visitor.result(value.result);
|
|
42
|
+
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
43
|
+
};
|
|
44
|
+
})(AnnotationPayload || (exports.AnnotationPayload = AnnotationPayload = {}));
|
|
45
|
+
exports.AnnotationSourceType = {
|
|
46
|
+
CHATBOT: "chatbot",
|
|
47
|
+
SYSTEM: "system",
|
|
48
|
+
USER: "user",
|
|
49
|
+
VOICEBOT: "voicebot",
|
|
50
|
+
};
|
|
31
51
|
exports.VoiceBotEventType = {
|
|
32
52
|
AUDIO: "audio",
|
|
33
53
|
COMPLETE: "complete",
|
|
@@ -38,6 +58,20 @@ exports.VoiceBotEventType = {
|
|
|
38
58
|
STARTED: "started",
|
|
39
59
|
TRANSCRIPTION: "transcription",
|
|
40
60
|
};
|
|
61
|
+
var VoiceBotToolAnnotation;
|
|
62
|
+
(function (VoiceBotToolAnnotation) {
|
|
63
|
+
VoiceBotToolAnnotation.visit = (value, visitor) => {
|
|
64
|
+
if (value.tag !== undefined)
|
|
65
|
+
return visitor.tag(value.tag);
|
|
66
|
+
if (value.comment !== undefined)
|
|
67
|
+
return visitor.comment(value.comment);
|
|
68
|
+
if (value.variables !== undefined)
|
|
69
|
+
return visitor.variables(value.variables);
|
|
70
|
+
if (value.result !== undefined)
|
|
71
|
+
return visitor.result(value.result);
|
|
72
|
+
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
73
|
+
};
|
|
74
|
+
})(VoiceBotToolAnnotation || (exports.VoiceBotToolAnnotation = VoiceBotToolAnnotation = {}));
|
|
41
75
|
exports.VoiceBotCapabilityToolPipelineType = {
|
|
42
76
|
ASYNC_REQUEST: "async_request",
|
|
43
77
|
ASYNC_REQUEST_GUIDED: "async_request_guided",
|
|
@@ -189,6 +223,8 @@ var TraceActivityTrigger;
|
|
|
189
223
|
return visitor.hangupCommand(value.hangupCommand);
|
|
190
224
|
if (value.transferCommand !== undefined)
|
|
191
225
|
return visitor.transferCommand(value.transferCommand);
|
|
226
|
+
if (value.annotationCommand !== undefined)
|
|
227
|
+
return visitor.annotationCommand(value.annotationCommand);
|
|
192
228
|
if (value.silenceTimeoutTask !== undefined)
|
|
193
229
|
return visitor.silenceTimeoutTask(value.silenceTimeoutTask);
|
|
194
230
|
if (value.durationTimeoutTask !== undefined)
|
|
@@ -305,8 +305,8 @@ const de_DescribeEventCommand = async (output, context) => {
|
|
|
305
305
|
'SessionEndedWebhookEvent': smithy_client_1._json,
|
|
306
306
|
'SessionStartedWebhookEvent': smithy_client_1._json,
|
|
307
307
|
'StopWebsocketCommand': smithy_client_1._json,
|
|
308
|
-
'TranscriptionWebhookEvent':
|
|
309
|
-
'TranscriptionWebsocketEvent':
|
|
308
|
+
'TranscriptionWebhookEvent': _ => de_TranscriptionWebhookEvent(_, context),
|
|
309
|
+
'TranscriptionWebsocketEvent': _ => de_TranscriptionWebsocketEvent(_, context),
|
|
310
310
|
'TransferWebsocketCommand': smithy_client_1._json,
|
|
311
311
|
});
|
|
312
312
|
Object.assign(contents, doc);
|
|
@@ -563,6 +563,7 @@ const se_Document = (input, context) => {
|
|
|
563
563
|
};
|
|
564
564
|
const se_VoiceBotEmbeddedTool = (input, context) => {
|
|
565
565
|
return (0, smithy_client_1.take)(input, {
|
|
566
|
+
'annotations': smithy_client_1._json,
|
|
566
567
|
'name': [],
|
|
567
568
|
'parameters': _ => se_Document(_, context),
|
|
568
569
|
'type': [],
|
|
@@ -623,6 +624,7 @@ const se_VoiceBotLlmEndpoint = (input, context) => {
|
|
|
623
624
|
};
|
|
624
625
|
const se_VoiceBotTool = (input, context) => {
|
|
625
626
|
return (0, smithy_client_1.take)(input, {
|
|
627
|
+
'annotations': smithy_client_1._json,
|
|
626
628
|
'function': _ => se_VoiceBotFunctionDefinition(_, context),
|
|
627
629
|
'type': [],
|
|
628
630
|
});
|
|
@@ -643,6 +645,43 @@ const se_BotDialogflowCxEndpoint = (input, context) => {
|
|
|
643
645
|
const de_Document = (output, context) => {
|
|
644
646
|
return output;
|
|
645
647
|
};
|
|
648
|
+
const de_Annotation = (output, context) => {
|
|
649
|
+
return (0, smithy_client_1.take)(output, {
|
|
650
|
+
'id': smithy_client_1.expectString,
|
|
651
|
+
'payload': (_) => de_AnnotationPayload((0, core_1.awsExpectUnion)(_), context),
|
|
652
|
+
'source': smithy_client_1._json,
|
|
653
|
+
'time': smithy_client_1.expectLong,
|
|
654
|
+
});
|
|
655
|
+
};
|
|
656
|
+
const de_AnnotationPayload = (output, context) => {
|
|
657
|
+
if (output.result != null) {
|
|
658
|
+
return {
|
|
659
|
+
result: de_AnnotationResultValue(output.result, context)
|
|
660
|
+
};
|
|
661
|
+
}
|
|
662
|
+
if ((0, smithy_client_1.expectString)(output.tag) !== undefined) {
|
|
663
|
+
return { tag: (0, smithy_client_1.expectString)(output.tag) };
|
|
664
|
+
}
|
|
665
|
+
if ((0, smithy_client_1.expectString)(output.text) !== undefined) {
|
|
666
|
+
return { text: (0, smithy_client_1.expectString)(output.text) };
|
|
667
|
+
}
|
|
668
|
+
if (output.variables != null) {
|
|
669
|
+
return {
|
|
670
|
+
variables: de_AnnotationVariablesValue(output.variables, context)
|
|
671
|
+
};
|
|
672
|
+
}
|
|
673
|
+
return { $unknown: Object.entries(output)[0] };
|
|
674
|
+
};
|
|
675
|
+
const de_AnnotationResultValue = (output, context) => {
|
|
676
|
+
return (0, smithy_client_1.take)(output, {
|
|
677
|
+
'value': (_) => de_Document(_, context),
|
|
678
|
+
});
|
|
679
|
+
};
|
|
680
|
+
const de_AnnotationVariablesValue = (output, context) => {
|
|
681
|
+
return (0, smithy_client_1.take)(output, {
|
|
682
|
+
'value': (_) => de_Document(_, context),
|
|
683
|
+
});
|
|
684
|
+
};
|
|
646
685
|
const de_PubSubBroadcastItem = (output, context) => {
|
|
647
686
|
return (0, smithy_client_1.take)(output, {
|
|
648
687
|
'activity': (_) => de_TraceActivity(_, context),
|
|
@@ -693,6 +732,11 @@ const de_TraceActivity = (output, context) => {
|
|
|
693
732
|
});
|
|
694
733
|
};
|
|
695
734
|
const de_TraceActivityTrigger = (output, context) => {
|
|
735
|
+
if (output.annotationCommand != null) {
|
|
736
|
+
return {
|
|
737
|
+
annotationCommand: de_TraceAnnotationCommand(output.annotationCommand, context)
|
|
738
|
+
};
|
|
739
|
+
}
|
|
696
740
|
if (output.completeEvent != null) {
|
|
697
741
|
return {
|
|
698
742
|
completeEvent: (0, smithy_client_1._json)(output.completeEvent)
|
|
@@ -745,7 +789,7 @@ const de_TraceActivityTrigger = (output, context) => {
|
|
|
745
789
|
}
|
|
746
790
|
if (output.transcriptionEvent != null) {
|
|
747
791
|
return {
|
|
748
|
-
transcriptionEvent: (
|
|
792
|
+
transcriptionEvent: de_TranscriptionWebsocketEvent(output.transcriptionEvent, context)
|
|
749
793
|
};
|
|
750
794
|
}
|
|
751
795
|
if (output.transferCommand != null) {
|
|
@@ -755,6 +799,11 @@ const de_TraceActivityTrigger = (output, context) => {
|
|
|
755
799
|
}
|
|
756
800
|
return { $unknown: Object.entries(output)[0] };
|
|
757
801
|
};
|
|
802
|
+
const de_TraceAnnotationCommand = (output, context) => {
|
|
803
|
+
return (0, smithy_client_1.take)(output, {
|
|
804
|
+
'annotation': (_) => de_Annotation(_, context),
|
|
805
|
+
});
|
|
806
|
+
};
|
|
758
807
|
const de_TraceConnectEventTrigger = (output, context) => {
|
|
759
808
|
return (0, smithy_client_1.take)(output, {
|
|
760
809
|
'parameters': (_) => de_Document(_, context),
|
|
@@ -898,6 +947,31 @@ const de_TraceTimings = (output, context) => {
|
|
|
898
947
|
return acc;
|
|
899
948
|
}, {});
|
|
900
949
|
};
|
|
950
|
+
const de_TranscriptionEvent = (output, context) => {
|
|
951
|
+
return (0, smithy_client_1.take)(output, {
|
|
952
|
+
'confidence': smithy_client_1.limitedParseDouble,
|
|
953
|
+
'final': smithy_client_1.expectBoolean,
|
|
954
|
+
'id': smithy_client_1.expectString,
|
|
955
|
+
'text': smithy_client_1.expectString,
|
|
956
|
+
'time': smithy_client_1.expectLong,
|
|
957
|
+
'type': smithy_client_1.expectString,
|
|
958
|
+
});
|
|
959
|
+
};
|
|
960
|
+
const de_TranscriptionWebhookEvent = (output, context) => {
|
|
961
|
+
return (0, smithy_client_1.take)(output, {
|
|
962
|
+
'botId': smithy_client_1.expectString,
|
|
963
|
+
'callId': smithy_client_1.expectString,
|
|
964
|
+
'event': (_) => de_TranscriptionEvent(_, context),
|
|
965
|
+
'flowIndex': smithy_client_1.expectInt32,
|
|
966
|
+
'sessionId': smithy_client_1.expectString,
|
|
967
|
+
});
|
|
968
|
+
};
|
|
969
|
+
const de_TranscriptionWebsocketEvent = (output, context) => {
|
|
970
|
+
return (0, smithy_client_1.take)(output, {
|
|
971
|
+
'event': (_) => de_TranscriptionEvent(_, context),
|
|
972
|
+
'type': smithy_client_1.expectString,
|
|
973
|
+
});
|
|
974
|
+
};
|
|
901
975
|
const de_VoiceBot = (output, context) => {
|
|
902
976
|
return (0, smithy_client_1.take)(output, {
|
|
903
977
|
'capabilities': smithy_client_1._json,
|
|
@@ -914,6 +988,7 @@ const de_VoiceBot = (output, context) => {
|
|
|
914
988
|
};
|
|
915
989
|
const de_VoiceBotEmbeddedTool = (output, context) => {
|
|
916
990
|
return (0, smithy_client_1.take)(output, {
|
|
991
|
+
'annotations': smithy_client_1._json,
|
|
917
992
|
'name': smithy_client_1.expectString,
|
|
918
993
|
'parameters': (_) => de_Document(_, context),
|
|
919
994
|
'type': smithy_client_1.expectString,
|
|
@@ -1001,6 +1076,7 @@ const de_VoiceBotsList = (output, context) => {
|
|
|
1001
1076
|
};
|
|
1002
1077
|
const de_VoiceBotTool = (output, context) => {
|
|
1003
1078
|
return (0, smithy_client_1.take)(output, {
|
|
1079
|
+
'annotations': smithy_client_1._json,
|
|
1004
1080
|
'function': (_) => de_VoiceBotFunctionDefinition(_, context),
|
|
1005
1081
|
'type': smithy_client_1.expectString,
|
|
1006
1082
|
});
|
|
@@ -23,6 +23,26 @@ export class ValidationException extends __BaseException {
|
|
|
23
23
|
Object.setPrototypeOf(this, ValidationException.prototype);
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
|
+
export var AnnotationPayload;
|
|
27
|
+
(function (AnnotationPayload) {
|
|
28
|
+
AnnotationPayload.visit = (value, visitor) => {
|
|
29
|
+
if (value.tag !== undefined)
|
|
30
|
+
return visitor.tag(value.tag);
|
|
31
|
+
if (value.text !== undefined)
|
|
32
|
+
return visitor.text(value.text);
|
|
33
|
+
if (value.variables !== undefined)
|
|
34
|
+
return visitor.variables(value.variables);
|
|
35
|
+
if (value.result !== undefined)
|
|
36
|
+
return visitor.result(value.result);
|
|
37
|
+
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
38
|
+
};
|
|
39
|
+
})(AnnotationPayload || (AnnotationPayload = {}));
|
|
40
|
+
export const AnnotationSourceType = {
|
|
41
|
+
CHATBOT: "chatbot",
|
|
42
|
+
SYSTEM: "system",
|
|
43
|
+
USER: "user",
|
|
44
|
+
VOICEBOT: "voicebot",
|
|
45
|
+
};
|
|
26
46
|
export const VoiceBotEventType = {
|
|
27
47
|
AUDIO: "audio",
|
|
28
48
|
COMPLETE: "complete",
|
|
@@ -33,6 +53,20 @@ export const VoiceBotEventType = {
|
|
|
33
53
|
STARTED: "started",
|
|
34
54
|
TRANSCRIPTION: "transcription",
|
|
35
55
|
};
|
|
56
|
+
export var VoiceBotToolAnnotation;
|
|
57
|
+
(function (VoiceBotToolAnnotation) {
|
|
58
|
+
VoiceBotToolAnnotation.visit = (value, visitor) => {
|
|
59
|
+
if (value.tag !== undefined)
|
|
60
|
+
return visitor.tag(value.tag);
|
|
61
|
+
if (value.comment !== undefined)
|
|
62
|
+
return visitor.comment(value.comment);
|
|
63
|
+
if (value.variables !== undefined)
|
|
64
|
+
return visitor.variables(value.variables);
|
|
65
|
+
if (value.result !== undefined)
|
|
66
|
+
return visitor.result(value.result);
|
|
67
|
+
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
68
|
+
};
|
|
69
|
+
})(VoiceBotToolAnnotation || (VoiceBotToolAnnotation = {}));
|
|
36
70
|
export const VoiceBotCapabilityToolPipelineType = {
|
|
37
71
|
ASYNC_REQUEST: "async_request",
|
|
38
72
|
ASYNC_REQUEST_GUIDED: "async_request_guided",
|
|
@@ -183,6 +217,8 @@ export var TraceActivityTrigger;
|
|
|
183
217
|
return visitor.hangupCommand(value.hangupCommand);
|
|
184
218
|
if (value.transferCommand !== undefined)
|
|
185
219
|
return visitor.transferCommand(value.transferCommand);
|
|
220
|
+
if (value.annotationCommand !== undefined)
|
|
221
|
+
return visitor.annotationCommand(value.annotationCommand);
|
|
186
222
|
if (value.silenceTimeoutTask !== undefined)
|
|
187
223
|
return visitor.silenceTimeoutTask(value.silenceTimeoutTask);
|
|
188
224
|
if (value.durationTimeoutTask !== undefined)
|
|
@@ -2,7 +2,7 @@ import { VoiceBotsServiceException as __BaseException } from "../models/VoiceBot
|
|
|
2
2
|
import { ForbiddenException, ValidationException, VoiceBotEndpoint, VoiceBotFunctionIntegration, VoiceBotNonUniqueNameException, VoiceBotNotFoundException, VoiceSessionNotFoundException, } from "../models/models_0";
|
|
3
3
|
import { awsExpectUnion as __expectUnion, loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody, } from "@aws-sdk/core";
|
|
4
4
|
import { requestBuilder as rb } from "@smithy/core";
|
|
5
|
-
import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, limitedParseDouble as __limitedParseDouble, limitedParseFloat32 as __limitedParseFloat32, _json, collectBody, map, take, withBaseException, } from "@smithy/smithy-client";
|
|
5
|
+
import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, limitedParseDouble as __limitedParseDouble, limitedParseFloat32 as __limitedParseFloat32, _json, collectBody, map, take, withBaseException, } from "@smithy/smithy-client";
|
|
6
6
|
export const se_CreateVoiceBotCommand = async (input, context) => {
|
|
7
7
|
const b = rb(input, context);
|
|
8
8
|
const headers = {
|
|
@@ -286,8 +286,8 @@ export const de_DescribeEventCommand = async (output, context) => {
|
|
|
286
286
|
'SessionEndedWebhookEvent': _json,
|
|
287
287
|
'SessionStartedWebhookEvent': _json,
|
|
288
288
|
'StopWebsocketCommand': _json,
|
|
289
|
-
'TranscriptionWebhookEvent':
|
|
290
|
-
'TranscriptionWebsocketEvent':
|
|
289
|
+
'TranscriptionWebhookEvent': _ => de_TranscriptionWebhookEvent(_, context),
|
|
290
|
+
'TranscriptionWebsocketEvent': _ => de_TranscriptionWebsocketEvent(_, context),
|
|
291
291
|
'TransferWebsocketCommand': _json,
|
|
292
292
|
});
|
|
293
293
|
Object.assign(contents, doc);
|
|
@@ -532,6 +532,7 @@ const se_Document = (input, context) => {
|
|
|
532
532
|
};
|
|
533
533
|
const se_VoiceBotEmbeddedTool = (input, context) => {
|
|
534
534
|
return take(input, {
|
|
535
|
+
'annotations': _json,
|
|
535
536
|
'name': [],
|
|
536
537
|
'parameters': _ => se_Document(_, context),
|
|
537
538
|
'type': [],
|
|
@@ -592,6 +593,7 @@ const se_VoiceBotLlmEndpoint = (input, context) => {
|
|
|
592
593
|
};
|
|
593
594
|
const se_VoiceBotTool = (input, context) => {
|
|
594
595
|
return take(input, {
|
|
596
|
+
'annotations': _json,
|
|
595
597
|
'function': _ => se_VoiceBotFunctionDefinition(_, context),
|
|
596
598
|
'type': [],
|
|
597
599
|
});
|
|
@@ -612,6 +614,43 @@ const se_BotDialogflowCxEndpoint = (input, context) => {
|
|
|
612
614
|
const de_Document = (output, context) => {
|
|
613
615
|
return output;
|
|
614
616
|
};
|
|
617
|
+
const de_Annotation = (output, context) => {
|
|
618
|
+
return take(output, {
|
|
619
|
+
'id': __expectString,
|
|
620
|
+
'payload': (_) => de_AnnotationPayload(__expectUnion(_), context),
|
|
621
|
+
'source': _json,
|
|
622
|
+
'time': __expectLong,
|
|
623
|
+
});
|
|
624
|
+
};
|
|
625
|
+
const de_AnnotationPayload = (output, context) => {
|
|
626
|
+
if (output.result != null) {
|
|
627
|
+
return {
|
|
628
|
+
result: de_AnnotationResultValue(output.result, context)
|
|
629
|
+
};
|
|
630
|
+
}
|
|
631
|
+
if (__expectString(output.tag) !== undefined) {
|
|
632
|
+
return { tag: __expectString(output.tag) };
|
|
633
|
+
}
|
|
634
|
+
if (__expectString(output.text) !== undefined) {
|
|
635
|
+
return { text: __expectString(output.text) };
|
|
636
|
+
}
|
|
637
|
+
if (output.variables != null) {
|
|
638
|
+
return {
|
|
639
|
+
variables: de_AnnotationVariablesValue(output.variables, context)
|
|
640
|
+
};
|
|
641
|
+
}
|
|
642
|
+
return { $unknown: Object.entries(output)[0] };
|
|
643
|
+
};
|
|
644
|
+
const de_AnnotationResultValue = (output, context) => {
|
|
645
|
+
return take(output, {
|
|
646
|
+
'value': (_) => de_Document(_, context),
|
|
647
|
+
});
|
|
648
|
+
};
|
|
649
|
+
const de_AnnotationVariablesValue = (output, context) => {
|
|
650
|
+
return take(output, {
|
|
651
|
+
'value': (_) => de_Document(_, context),
|
|
652
|
+
});
|
|
653
|
+
};
|
|
615
654
|
const de_PubSubBroadcastItem = (output, context) => {
|
|
616
655
|
return take(output, {
|
|
617
656
|
'activity': (_) => de_TraceActivity(_, context),
|
|
@@ -662,6 +701,11 @@ const de_TraceActivity = (output, context) => {
|
|
|
662
701
|
});
|
|
663
702
|
};
|
|
664
703
|
const de_TraceActivityTrigger = (output, context) => {
|
|
704
|
+
if (output.annotationCommand != null) {
|
|
705
|
+
return {
|
|
706
|
+
annotationCommand: de_TraceAnnotationCommand(output.annotationCommand, context)
|
|
707
|
+
};
|
|
708
|
+
}
|
|
665
709
|
if (output.completeEvent != null) {
|
|
666
710
|
return {
|
|
667
711
|
completeEvent: _json(output.completeEvent)
|
|
@@ -714,7 +758,7 @@ const de_TraceActivityTrigger = (output, context) => {
|
|
|
714
758
|
}
|
|
715
759
|
if (output.transcriptionEvent != null) {
|
|
716
760
|
return {
|
|
717
|
-
transcriptionEvent:
|
|
761
|
+
transcriptionEvent: de_TranscriptionWebsocketEvent(output.transcriptionEvent, context)
|
|
718
762
|
};
|
|
719
763
|
}
|
|
720
764
|
if (output.transferCommand != null) {
|
|
@@ -724,6 +768,11 @@ const de_TraceActivityTrigger = (output, context) => {
|
|
|
724
768
|
}
|
|
725
769
|
return { $unknown: Object.entries(output)[0] };
|
|
726
770
|
};
|
|
771
|
+
const de_TraceAnnotationCommand = (output, context) => {
|
|
772
|
+
return take(output, {
|
|
773
|
+
'annotation': (_) => de_Annotation(_, context),
|
|
774
|
+
});
|
|
775
|
+
};
|
|
727
776
|
const de_TraceConnectEventTrigger = (output, context) => {
|
|
728
777
|
return take(output, {
|
|
729
778
|
'parameters': (_) => de_Document(_, context),
|
|
@@ -867,6 +916,31 @@ const de_TraceTimings = (output, context) => {
|
|
|
867
916
|
return acc;
|
|
868
917
|
}, {});
|
|
869
918
|
};
|
|
919
|
+
const de_TranscriptionEvent = (output, context) => {
|
|
920
|
+
return take(output, {
|
|
921
|
+
'confidence': __limitedParseDouble,
|
|
922
|
+
'final': __expectBoolean,
|
|
923
|
+
'id': __expectString,
|
|
924
|
+
'text': __expectString,
|
|
925
|
+
'time': __expectLong,
|
|
926
|
+
'type': __expectString,
|
|
927
|
+
});
|
|
928
|
+
};
|
|
929
|
+
const de_TranscriptionWebhookEvent = (output, context) => {
|
|
930
|
+
return take(output, {
|
|
931
|
+
'botId': __expectString,
|
|
932
|
+
'callId': __expectString,
|
|
933
|
+
'event': (_) => de_TranscriptionEvent(_, context),
|
|
934
|
+
'flowIndex': __expectInt32,
|
|
935
|
+
'sessionId': __expectString,
|
|
936
|
+
});
|
|
937
|
+
};
|
|
938
|
+
const de_TranscriptionWebsocketEvent = (output, context) => {
|
|
939
|
+
return take(output, {
|
|
940
|
+
'event': (_) => de_TranscriptionEvent(_, context),
|
|
941
|
+
'type': __expectString,
|
|
942
|
+
});
|
|
943
|
+
};
|
|
870
944
|
const de_VoiceBot = (output, context) => {
|
|
871
945
|
return take(output, {
|
|
872
946
|
'capabilities': _json,
|
|
@@ -883,6 +957,7 @@ const de_VoiceBot = (output, context) => {
|
|
|
883
957
|
};
|
|
884
958
|
const de_VoiceBotEmbeddedTool = (output, context) => {
|
|
885
959
|
return take(output, {
|
|
960
|
+
'annotations': _json,
|
|
886
961
|
'name': __expectString,
|
|
887
962
|
'parameters': (_) => de_Document(_, context),
|
|
888
963
|
'type': __expectString,
|
|
@@ -970,6 +1045,7 @@ const de_VoiceBotsList = (output, context) => {
|
|
|
970
1045
|
};
|
|
971
1046
|
const de_VoiceBotTool = (output, context) => {
|
|
972
1047
|
return take(output, {
|
|
1048
|
+
'annotations': _json,
|
|
973
1049
|
'function': (_) => de_VoiceBotFunctionDefinition(_, context),
|
|
974
1050
|
'type': __expectString,
|
|
975
1051
|
});
|
|
@@ -89,6 +89,22 @@ declare const CreateVoiceBotCommand_base: {
|
|
|
89
89
|
* type: "HANGUP" || "TRANSFER" || "DELEGATE" || "WAIT", // required
|
|
90
90
|
* name: "STRING_VALUE", // required
|
|
91
91
|
* parameters: "DOCUMENT_VALUE",
|
|
92
|
+
* annotations: [ // VoiceBotToolAnnotationsList
|
|
93
|
+
* { // VoiceBotToolAnnotation Union: only one key present
|
|
94
|
+
* tag: { // VoiceBotToolTagAnnotation
|
|
95
|
+
* value: "STRING_VALUE",
|
|
96
|
+
* applyOnSuccess: true || false,
|
|
97
|
+
* applyOnFailure: true || false,
|
|
98
|
+
* },
|
|
99
|
+
* comment: { // VoiceBotToolCommentAnnotation
|
|
100
|
+
* value: "STRING_VALUE",
|
|
101
|
+
* applyOnSuccess: true || false,
|
|
102
|
+
* applyOnFailure: true || false,
|
|
103
|
+
* },
|
|
104
|
+
* variables: {},
|
|
105
|
+
* result: {},
|
|
106
|
+
* },
|
|
107
|
+
* ],
|
|
92
108
|
* },
|
|
93
109
|
* ],
|
|
94
110
|
* tools: [ // VoiceBotToolsList
|
|
@@ -130,6 +146,22 @@ declare const CreateVoiceBotCommand_base: {
|
|
|
130
146
|
* },
|
|
131
147
|
* },
|
|
132
148
|
* },
|
|
149
|
+
* annotations: [
|
|
150
|
+
* {// Union: only one key present
|
|
151
|
+
* tag: {
|
|
152
|
+
* value: "STRING_VALUE",
|
|
153
|
+
* applyOnSuccess: true || false,
|
|
154
|
+
* applyOnFailure: true || false,
|
|
155
|
+
* },
|
|
156
|
+
* comment: {
|
|
157
|
+
* value: "STRING_VALUE",
|
|
158
|
+
* applyOnSuccess: true || false,
|
|
159
|
+
* applyOnFailure: true || false,
|
|
160
|
+
* },
|
|
161
|
+
* variables: {},
|
|
162
|
+
* result: {},
|
|
163
|
+
* },
|
|
164
|
+
* ],
|
|
133
165
|
* },
|
|
134
166
|
* ],
|
|
135
167
|
* capabilities: [ // VoiceBotCapabilitiesList
|
|
@@ -155,10 +187,42 @@ declare const CreateVoiceBotCommand_base: {
|
|
|
155
187
|
* type: "blocking_request" || "blocking_request_guided" || "async_request" || "async_request_guided",
|
|
156
188
|
* instructions: "STRING_VALUE",
|
|
157
189
|
* },
|
|
190
|
+
* annotations: [
|
|
191
|
+
* {// Union: only one key present
|
|
192
|
+
* tag: {
|
|
193
|
+
* value: "STRING_VALUE",
|
|
194
|
+
* applyOnSuccess: true || false,
|
|
195
|
+
* applyOnFailure: true || false,
|
|
196
|
+
* },
|
|
197
|
+
* comment: {
|
|
198
|
+
* value: "STRING_VALUE",
|
|
199
|
+
* applyOnSuccess: true || false,
|
|
200
|
+
* applyOnFailure: true || false,
|
|
201
|
+
* },
|
|
202
|
+
* variables: {},
|
|
203
|
+
* result: {},
|
|
204
|
+
* },
|
|
205
|
+
* ],
|
|
158
206
|
* },
|
|
159
207
|
* kb: { // VoiceBotKnowledgeBase
|
|
160
208
|
* knowledgeBaseId: "STRING_VALUE",
|
|
161
209
|
* instructions: "STRING_VALUE",
|
|
210
|
+
* annotations: [
|
|
211
|
+
* {// Union: only one key present
|
|
212
|
+
* tag: {
|
|
213
|
+
* value: "STRING_VALUE",
|
|
214
|
+
* applyOnSuccess: true || false,
|
|
215
|
+
* applyOnFailure: true || false,
|
|
216
|
+
* },
|
|
217
|
+
* comment: {
|
|
218
|
+
* value: "STRING_VALUE",
|
|
219
|
+
* applyOnSuccess: true || false,
|
|
220
|
+
* applyOnFailure: true || false,
|
|
221
|
+
* },
|
|
222
|
+
* variables: {},
|
|
223
|
+
* result: {},
|
|
224
|
+
* },
|
|
225
|
+
* ],
|
|
162
226
|
* },
|
|
163
227
|
* },
|
|
164
228
|
* ],
|
|
@@ -211,10 +275,12 @@ declare const CreateVoiceBotCommand_base: {
|
|
|
211
275
|
* type: "blocking_request" || "blocking_request_guided" || "async_request" || "async_request_guided",
|
|
212
276
|
* instructions: "STRING_VALUE",
|
|
213
277
|
* },
|
|
278
|
+
* annotations: "<VoiceBotToolAnnotationsList>",
|
|
214
279
|
* },
|
|
215
280
|
* kb: {
|
|
216
281
|
* knowledgeBaseId: "STRING_VALUE",
|
|
217
282
|
* instructions: "STRING_VALUE",
|
|
283
|
+
* annotations: "<VoiceBotToolAnnotationsList>",
|
|
218
284
|
* },
|
|
219
285
|
* },
|
|
220
286
|
* ],
|
|
@@ -279,6 +345,22 @@ declare const CreateVoiceBotCommand_base: {
|
|
|
279
345
|
* // type: "HANGUP" || "TRANSFER" || "DELEGATE" || "WAIT", // required
|
|
280
346
|
* // name: "STRING_VALUE", // required
|
|
281
347
|
* // parameters: "DOCUMENT_VALUE",
|
|
348
|
+
* // annotations: [ // VoiceBotToolAnnotationsList
|
|
349
|
+
* // { // VoiceBotToolAnnotation Union: only one key present
|
|
350
|
+
* // tag: { // VoiceBotToolTagAnnotation
|
|
351
|
+
* // value: "STRING_VALUE",
|
|
352
|
+
* // applyOnSuccess: true || false,
|
|
353
|
+
* // applyOnFailure: true || false,
|
|
354
|
+
* // },
|
|
355
|
+
* // comment: { // VoiceBotToolCommentAnnotation
|
|
356
|
+
* // value: "STRING_VALUE",
|
|
357
|
+
* // applyOnSuccess: true || false,
|
|
358
|
+
* // applyOnFailure: true || false,
|
|
359
|
+
* // },
|
|
360
|
+
* // variables: {},
|
|
361
|
+
* // result: {},
|
|
362
|
+
* // },
|
|
363
|
+
* // ],
|
|
282
364
|
* // },
|
|
283
365
|
* // ],
|
|
284
366
|
* // tools: [ // VoiceBotToolsList
|
|
@@ -320,6 +402,22 @@ declare const CreateVoiceBotCommand_base: {
|
|
|
320
402
|
* // },
|
|
321
403
|
* // },
|
|
322
404
|
* // },
|
|
405
|
+
* // annotations: [
|
|
406
|
+
* // {// Union: only one key present
|
|
407
|
+
* // tag: {
|
|
408
|
+
* // value: "STRING_VALUE",
|
|
409
|
+
* // applyOnSuccess: true || false,
|
|
410
|
+
* // applyOnFailure: true || false,
|
|
411
|
+
* // },
|
|
412
|
+
* // comment: {
|
|
413
|
+
* // value: "STRING_VALUE",
|
|
414
|
+
* // applyOnSuccess: true || false,
|
|
415
|
+
* // applyOnFailure: true || false,
|
|
416
|
+
* // },
|
|
417
|
+
* // variables: {},
|
|
418
|
+
* // result: {},
|
|
419
|
+
* // },
|
|
420
|
+
* // ],
|
|
323
421
|
* // },
|
|
324
422
|
* // ],
|
|
325
423
|
* // capabilities: [ // VoiceBotCapabilitiesList
|
|
@@ -345,10 +443,42 @@ declare const CreateVoiceBotCommand_base: {
|
|
|
345
443
|
* // type: "blocking_request" || "blocking_request_guided" || "async_request" || "async_request_guided",
|
|
346
444
|
* // instructions: "STRING_VALUE",
|
|
347
445
|
* // },
|
|
446
|
+
* // annotations: [
|
|
447
|
+
* // {// Union: only one key present
|
|
448
|
+
* // tag: {
|
|
449
|
+
* // value: "STRING_VALUE",
|
|
450
|
+
* // applyOnSuccess: true || false,
|
|
451
|
+
* // applyOnFailure: true || false,
|
|
452
|
+
* // },
|
|
453
|
+
* // comment: {
|
|
454
|
+
* // value: "STRING_VALUE",
|
|
455
|
+
* // applyOnSuccess: true || false,
|
|
456
|
+
* // applyOnFailure: true || false,
|
|
457
|
+
* // },
|
|
458
|
+
* // variables: {},
|
|
459
|
+
* // result: {},
|
|
460
|
+
* // },
|
|
461
|
+
* // ],
|
|
348
462
|
* // },
|
|
349
463
|
* // kb: { // VoiceBotKnowledgeBase
|
|
350
464
|
* // knowledgeBaseId: "STRING_VALUE",
|
|
351
465
|
* // instructions: "STRING_VALUE",
|
|
466
|
+
* // annotations: [
|
|
467
|
+
* // {// Union: only one key present
|
|
468
|
+
* // tag: {
|
|
469
|
+
* // value: "STRING_VALUE",
|
|
470
|
+
* // applyOnSuccess: true || false,
|
|
471
|
+
* // applyOnFailure: true || false,
|
|
472
|
+
* // },
|
|
473
|
+
* // comment: {
|
|
474
|
+
* // value: "STRING_VALUE",
|
|
475
|
+
* // applyOnSuccess: true || false,
|
|
476
|
+
* // applyOnFailure: true || false,
|
|
477
|
+
* // },
|
|
478
|
+
* // variables: {},
|
|
479
|
+
* // result: {},
|
|
480
|
+
* // },
|
|
481
|
+
* // ],
|
|
352
482
|
* // },
|
|
353
483
|
* // },
|
|
354
484
|
* // ],
|
|
@@ -401,10 +531,12 @@ declare const CreateVoiceBotCommand_base: {
|
|
|
401
531
|
* // type: "blocking_request" || "blocking_request_guided" || "async_request" || "async_request_guided",
|
|
402
532
|
* // instructions: "STRING_VALUE",
|
|
403
533
|
* // },
|
|
534
|
+
* // annotations: "<VoiceBotToolAnnotationsList>",
|
|
404
535
|
* // },
|
|
405
536
|
* // kb: {
|
|
406
537
|
* // knowledgeBaseId: "STRING_VALUE",
|
|
407
538
|
* // instructions: "STRING_VALUE",
|
|
539
|
+
* // annotations: "<VoiceBotToolAnnotationsList>",
|
|
408
540
|
* // },
|
|
409
541
|
* // },
|
|
410
542
|
* // ],
|