@wildix/wim-voicebots-client 1.0.18 → 1.0.20
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 +13 -1
- package/dist-cjs/protocols/Aws_restJson1.js +37 -0
- package/dist-es/models/models_0.js +12 -0
- package/dist-es/protocols/Aws_restJson1.js +38 -1
- package/dist-types/commands/DescribeEventCommand.d.ts +25 -0
- package/dist-types/commands/GetTraceCommand.d.ts +39 -0
- package/dist-types/models/models_0.d.ts +91 -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.TraceSegmentCompletionMessageItem = exports.TraceSegmentCompletionMessage = exports.TraceToolCall = exports.TraceActivityTrigger = exports.TraceActivityStatus = exports.TraceActivityResult = exports.VoiceBotCommandType = exports.VoiceBotEndpoint = exports.VoiceBotToolType = exports.VoiceBotFunctionIntegration = exports.VoiceBotFunctionIntegrationMethod = exports.VoiceBotFunctionIntegrationWebhookAuthorization = exports.VoiceBotEmbeddedToolType = exports.VoiceBotEventType = exports.ForbiddenException = exports.ValidationException = 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.VoiceBotEndpoint = exports.VoiceBotToolType = exports.VoiceBotFunctionIntegration = exports.VoiceBotFunctionIntegrationMethod = exports.VoiceBotFunctionIntegrationWebhookAuthorization = exports.VoiceBotEmbeddedToolType = exports.VoiceBotEventType = exports.ForbiddenException = exports.ValidationException = void 0;
|
|
4
4
|
const VoiceBotsServiceException_1 = require("./VoiceBotsServiceException");
|
|
5
5
|
class ValidationException extends VoiceBotsServiceException_1.VoiceBotsServiceException {
|
|
6
6
|
constructor(opts) {
|
|
@@ -176,6 +176,16 @@ var TraceSegmentCompletionMessageItem;
|
|
|
176
176
|
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
177
177
|
};
|
|
178
178
|
})(TraceSegmentCompletionMessageItem = exports.TraceSegmentCompletionMessageItem || (exports.TraceSegmentCompletionMessageItem = {}));
|
|
179
|
+
var TraceGenericInputBlockContent;
|
|
180
|
+
(function (TraceGenericInputBlockContent) {
|
|
181
|
+
TraceGenericInputBlockContent.visit = (value, visitor) => {
|
|
182
|
+
if (value.text !== undefined)
|
|
183
|
+
return visitor.text(value.text);
|
|
184
|
+
if (value.json !== undefined)
|
|
185
|
+
return visitor.json(value.json);
|
|
186
|
+
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
187
|
+
};
|
|
188
|
+
})(TraceGenericInputBlockContent = exports.TraceGenericInputBlockContent || (exports.TraceGenericInputBlockContent = {}));
|
|
179
189
|
var TraceSegmentInput;
|
|
180
190
|
(function (TraceSegmentInput) {
|
|
181
191
|
TraceSegmentInput.visit = (value, visitor) => {
|
|
@@ -185,6 +195,8 @@ var TraceSegmentInput;
|
|
|
185
195
|
return visitor.tool(value.tool);
|
|
186
196
|
if (value.oauth !== undefined)
|
|
187
197
|
return visitor.oauth(value.oauth);
|
|
198
|
+
if (value.generic !== undefined)
|
|
199
|
+
return visitor.generic(value.generic);
|
|
188
200
|
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
189
201
|
};
|
|
190
202
|
})(TraceSegmentInput = exports.TraceSegmentInput || (exports.TraceSegmentInput = {}));
|
|
@@ -581,8 +581,10 @@ const de_PubSubBroadcastWebsocketEvent = (output, context) => {
|
|
|
581
581
|
const de_Trace = (output, context) => {
|
|
582
582
|
return (0, smithy_client_1.take)(output, {
|
|
583
583
|
'activities': (_) => de_TraceActivitiesList(_, context),
|
|
584
|
+
'cost': smithy_client_1.limitedParseFloat32,
|
|
584
585
|
'segments': (_) => de_TraceSegmentsList(_, context),
|
|
585
586
|
'session': (_) => de_TraceSession(_, context),
|
|
587
|
+
'usage': smithy_client_1._json,
|
|
586
588
|
});
|
|
587
589
|
};
|
|
588
590
|
const de_TraceActivitiesList = (output, context) => {
|
|
@@ -599,6 +601,7 @@ const de_TraceActivity = (output, context) => {
|
|
|
599
601
|
'start': smithy_client_1.limitedParseDouble,
|
|
600
602
|
'status': smithy_client_1.expectString,
|
|
601
603
|
'trigger': (_) => de_TraceActivityTrigger((0, smithy_client_1.expectUnion)(_), context),
|
|
604
|
+
'usage': smithy_client_1._json,
|
|
602
605
|
'version': smithy_client_1.expectInt32,
|
|
603
606
|
});
|
|
604
607
|
};
|
|
@@ -680,6 +683,35 @@ const de_TraceDurationTimeoutTaskTrigger = (output, context) => {
|
|
|
680
683
|
'parameters': (_) => de_Document(_, context),
|
|
681
684
|
});
|
|
682
685
|
};
|
|
686
|
+
const de_TraceGenericInput = (output, context) => {
|
|
687
|
+
return (0, smithy_client_1.take)(output, {
|
|
688
|
+
'blocks': (_) => de_TraceGenericInputBlocksList(_, context),
|
|
689
|
+
'title': smithy_client_1.expectString,
|
|
690
|
+
});
|
|
691
|
+
};
|
|
692
|
+
const de_TraceGenericInputBlock = (output, context) => {
|
|
693
|
+
return (0, smithy_client_1.take)(output, {
|
|
694
|
+
'content': (_) => de_TraceGenericInputBlockContent((0, smithy_client_1.expectUnion)(_), context),
|
|
695
|
+
'title': smithy_client_1.expectString,
|
|
696
|
+
});
|
|
697
|
+
};
|
|
698
|
+
const de_TraceGenericInputBlockContent = (output, context) => {
|
|
699
|
+
if (output.json != null) {
|
|
700
|
+
return {
|
|
701
|
+
json: de_Document(output.json, context)
|
|
702
|
+
};
|
|
703
|
+
}
|
|
704
|
+
if ((0, smithy_client_1.expectString)(output.text) !== undefined) {
|
|
705
|
+
return { text: (0, smithy_client_1.expectString)(output.text) };
|
|
706
|
+
}
|
|
707
|
+
return { $unknown: Object.entries(output)[0] };
|
|
708
|
+
};
|
|
709
|
+
const de_TraceGenericInputBlocksList = (output, context) => {
|
|
710
|
+
const retVal = (output || []).filter((e) => e != null).map((entry) => {
|
|
711
|
+
return de_TraceGenericInputBlock(entry, context);
|
|
712
|
+
});
|
|
713
|
+
return retVal;
|
|
714
|
+
};
|
|
683
715
|
const de_TraceSegment = (output, context) => {
|
|
684
716
|
return (0, smithy_client_1.take)(output, {
|
|
685
717
|
'activityId': smithy_client_1.expectString,
|
|
@@ -698,6 +730,11 @@ const de_TraceSegmentInput = (output, context) => {
|
|
|
698
730
|
completion: (0, smithy_client_1._json)(output.completion)
|
|
699
731
|
};
|
|
700
732
|
}
|
|
733
|
+
if (output.generic != null) {
|
|
734
|
+
return {
|
|
735
|
+
generic: de_TraceGenericInput(output.generic, context)
|
|
736
|
+
};
|
|
737
|
+
}
|
|
701
738
|
if (output.oauth != null) {
|
|
702
739
|
return {
|
|
703
740
|
oauth: (0, smithy_client_1._json)(output.oauth)
|
|
@@ -171,6 +171,16 @@ export var TraceSegmentCompletionMessageItem;
|
|
|
171
171
|
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
172
172
|
};
|
|
173
173
|
})(TraceSegmentCompletionMessageItem || (TraceSegmentCompletionMessageItem = {}));
|
|
174
|
+
export var TraceGenericInputBlockContent;
|
|
175
|
+
(function (TraceGenericInputBlockContent) {
|
|
176
|
+
TraceGenericInputBlockContent.visit = (value, visitor) => {
|
|
177
|
+
if (value.text !== undefined)
|
|
178
|
+
return visitor.text(value.text);
|
|
179
|
+
if (value.json !== undefined)
|
|
180
|
+
return visitor.json(value.json);
|
|
181
|
+
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
182
|
+
};
|
|
183
|
+
})(TraceGenericInputBlockContent || (TraceGenericInputBlockContent = {}));
|
|
174
184
|
export var TraceSegmentInput;
|
|
175
185
|
(function (TraceSegmentInput) {
|
|
176
186
|
TraceSegmentInput.visit = (value, visitor) => {
|
|
@@ -180,6 +190,8 @@ export var TraceSegmentInput;
|
|
|
180
190
|
return visitor.tool(value.tool);
|
|
181
191
|
if (value.oauth !== undefined)
|
|
182
192
|
return visitor.oauth(value.oauth);
|
|
193
|
+
if (value.generic !== undefined)
|
|
194
|
+
return visitor.generic(value.generic);
|
|
183
195
|
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
184
196
|
};
|
|
185
197
|
})(TraceSegmentInput || (TraceSegmentInput = {}));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { VoiceBotsServiceException as __BaseException } from "../models/VoiceBotsServiceException";
|
|
2
2
|
import { ForbiddenException, ValidationException, VoiceBotEndpoint, VoiceBotFunctionIntegration, VoiceBotNotFoundException, VoiceSessionNotFoundException, } from "../models/models_0";
|
|
3
3
|
import { requestBuilder as rb } from "@smithy/core";
|
|
4
|
-
import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, expectUnion as __expectUnion, limitedParseDouble as __limitedParseDouble, _json, collectBody, map, take, withBaseException, } from "@smithy/smithy-client";
|
|
4
|
+
import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, expectUnion as __expectUnion, limitedParseDouble as __limitedParseDouble, limitedParseFloat32 as __limitedParseFloat32, _json, collectBody, map, take, withBaseException, } from "@smithy/smithy-client";
|
|
5
5
|
export const se_CreateVoiceBotCommand = async (input, context) => {
|
|
6
6
|
const b = rb(input, context);
|
|
7
7
|
const headers = {
|
|
@@ -554,8 +554,10 @@ const de_PubSubBroadcastWebsocketEvent = (output, context) => {
|
|
|
554
554
|
const de_Trace = (output, context) => {
|
|
555
555
|
return take(output, {
|
|
556
556
|
'activities': (_) => de_TraceActivitiesList(_, context),
|
|
557
|
+
'cost': __limitedParseFloat32,
|
|
557
558
|
'segments': (_) => de_TraceSegmentsList(_, context),
|
|
558
559
|
'session': (_) => de_TraceSession(_, context),
|
|
560
|
+
'usage': _json,
|
|
559
561
|
});
|
|
560
562
|
};
|
|
561
563
|
const de_TraceActivitiesList = (output, context) => {
|
|
@@ -572,6 +574,7 @@ const de_TraceActivity = (output, context) => {
|
|
|
572
574
|
'start': __limitedParseDouble,
|
|
573
575
|
'status': __expectString,
|
|
574
576
|
'trigger': (_) => de_TraceActivityTrigger(__expectUnion(_), context),
|
|
577
|
+
'usage': _json,
|
|
575
578
|
'version': __expectInt32,
|
|
576
579
|
});
|
|
577
580
|
};
|
|
@@ -653,6 +656,35 @@ const de_TraceDurationTimeoutTaskTrigger = (output, context) => {
|
|
|
653
656
|
'parameters': (_) => de_Document(_, context),
|
|
654
657
|
});
|
|
655
658
|
};
|
|
659
|
+
const de_TraceGenericInput = (output, context) => {
|
|
660
|
+
return take(output, {
|
|
661
|
+
'blocks': (_) => de_TraceGenericInputBlocksList(_, context),
|
|
662
|
+
'title': __expectString,
|
|
663
|
+
});
|
|
664
|
+
};
|
|
665
|
+
const de_TraceGenericInputBlock = (output, context) => {
|
|
666
|
+
return take(output, {
|
|
667
|
+
'content': (_) => de_TraceGenericInputBlockContent(__expectUnion(_), context),
|
|
668
|
+
'title': __expectString,
|
|
669
|
+
});
|
|
670
|
+
};
|
|
671
|
+
const de_TraceGenericInputBlockContent = (output, context) => {
|
|
672
|
+
if (output.json != null) {
|
|
673
|
+
return {
|
|
674
|
+
json: de_Document(output.json, context)
|
|
675
|
+
};
|
|
676
|
+
}
|
|
677
|
+
if (__expectString(output.text) !== undefined) {
|
|
678
|
+
return { text: __expectString(output.text) };
|
|
679
|
+
}
|
|
680
|
+
return { $unknown: Object.entries(output)[0] };
|
|
681
|
+
};
|
|
682
|
+
const de_TraceGenericInputBlocksList = (output, context) => {
|
|
683
|
+
const retVal = (output || []).filter((e) => e != null).map((entry) => {
|
|
684
|
+
return de_TraceGenericInputBlock(entry, context);
|
|
685
|
+
});
|
|
686
|
+
return retVal;
|
|
687
|
+
};
|
|
656
688
|
const de_TraceSegment = (output, context) => {
|
|
657
689
|
return take(output, {
|
|
658
690
|
'activityId': __expectString,
|
|
@@ -671,6 +703,11 @@ const de_TraceSegmentInput = (output, context) => {
|
|
|
671
703
|
completion: _json(output.completion)
|
|
672
704
|
};
|
|
673
705
|
}
|
|
706
|
+
if (output.generic != null) {
|
|
707
|
+
return {
|
|
708
|
+
generic: de_TraceGenericInput(output.generic, context)
|
|
709
|
+
};
|
|
710
|
+
}
|
|
674
711
|
if (output.oauth != null) {
|
|
675
712
|
return {
|
|
676
713
|
oauth: _json(output.oauth)
|
|
@@ -313,6 +313,19 @@ declare const DescribeEventCommand_base: {
|
|
|
313
313
|
* // },
|
|
314
314
|
* // start: Number("double"), // required
|
|
315
315
|
* // duration: Number("int"),
|
|
316
|
+
* // usage: { // TraceUsage
|
|
317
|
+
* // generation: { // TraceGenerationUsage
|
|
318
|
+
* // tokens: Number("int"),
|
|
319
|
+
* // outputTokens: Number("int"),
|
|
320
|
+
* // inputTokens: Number("int"),
|
|
321
|
+
* // },
|
|
322
|
+
* // transcribe: { // TraceTranscribeUsage
|
|
323
|
+
* // seconds: Number("int"),
|
|
324
|
+
* // },
|
|
325
|
+
* // playback: { // TracePlaybackUsage
|
|
326
|
+
* // chars: Number("int"),
|
|
327
|
+
* // },
|
|
328
|
+
* // },
|
|
316
329
|
* // },
|
|
317
330
|
* // segment: { // TraceSegment
|
|
318
331
|
* // id: "STRING_VALUE", // required
|
|
@@ -418,6 +431,18 @@ declare const DescribeEventCommand_base: {
|
|
|
418
431
|
* // endpointUrl: "STRING_VALUE",
|
|
419
432
|
* // scope: "STRING_VALUE",
|
|
420
433
|
* // },
|
|
434
|
+
* // generic: { // TraceGenericInput
|
|
435
|
+
* // title: "STRING_VALUE", // required
|
|
436
|
+
* // blocks: [ // TraceGenericInputBlocksList
|
|
437
|
+
* // { // TraceGenericInputBlock
|
|
438
|
+
* // title: "STRING_VALUE", // required
|
|
439
|
+
* // content: { // TraceGenericInputBlockContent Union: only one key present
|
|
440
|
+
* // text: "STRING_VALUE",
|
|
441
|
+
* // json: "DOCUMENT_VALUE",
|
|
442
|
+
* // },
|
|
443
|
+
* // },
|
|
444
|
+
* // ],
|
|
445
|
+
* // },
|
|
421
446
|
* // },
|
|
422
447
|
* // result: { // TraceSegmentResult Union: only one key present
|
|
423
448
|
* // error: {
|
|
@@ -159,6 +159,19 @@ declare const GetTraceCommand_base: {
|
|
|
159
159
|
* // },
|
|
160
160
|
* // start: Number("double"), // required
|
|
161
161
|
* // duration: Number("int"),
|
|
162
|
+
* // usage: { // TraceUsage
|
|
163
|
+
* // generation: { // TraceGenerationUsage
|
|
164
|
+
* // tokens: Number("int"),
|
|
165
|
+
* // outputTokens: Number("int"),
|
|
166
|
+
* // inputTokens: Number("int"),
|
|
167
|
+
* // },
|
|
168
|
+
* // transcribe: { // TraceTranscribeUsage
|
|
169
|
+
* // seconds: Number("int"),
|
|
170
|
+
* // },
|
|
171
|
+
* // playback: { // TracePlaybackUsage
|
|
172
|
+
* // chars: Number("int"),
|
|
173
|
+
* // },
|
|
174
|
+
* // },
|
|
162
175
|
* // },
|
|
163
176
|
* // ],
|
|
164
177
|
* // segments: [ // TraceSegmentsList // required
|
|
@@ -266,6 +279,18 @@ declare const GetTraceCommand_base: {
|
|
|
266
279
|
* // endpointUrl: "STRING_VALUE",
|
|
267
280
|
* // scope: "STRING_VALUE",
|
|
268
281
|
* // },
|
|
282
|
+
* // generic: { // TraceGenericInput
|
|
283
|
+
* // title: "STRING_VALUE", // required
|
|
284
|
+
* // blocks: [ // TraceGenericInputBlocksList
|
|
285
|
+
* // { // TraceGenericInputBlock
|
|
286
|
+
* // title: "STRING_VALUE", // required
|
|
287
|
+
* // content: { // TraceGenericInputBlockContent Union: only one key present
|
|
288
|
+
* // text: "STRING_VALUE",
|
|
289
|
+
* // json: "DOCUMENT_VALUE",
|
|
290
|
+
* // },
|
|
291
|
+
* // },
|
|
292
|
+
* // ],
|
|
293
|
+
* // },
|
|
269
294
|
* // },
|
|
270
295
|
* // result: { // TraceSegmentResult Union: only one key present
|
|
271
296
|
* // error: {
|
|
@@ -282,6 +307,20 @@ declare const GetTraceCommand_base: {
|
|
|
282
307
|
* // duration: Number("int"),
|
|
283
308
|
* // },
|
|
284
309
|
* // ],
|
|
310
|
+
* // usage: {
|
|
311
|
+
* // generation: {
|
|
312
|
+
* // tokens: Number("int"),
|
|
313
|
+
* // outputTokens: Number("int"),
|
|
314
|
+
* // inputTokens: Number("int"),
|
|
315
|
+
* // },
|
|
316
|
+
* // transcribe: {
|
|
317
|
+
* // seconds: Number("int"),
|
|
318
|
+
* // },
|
|
319
|
+
* // playback: {
|
|
320
|
+
* // chars: Number("int"),
|
|
321
|
+
* // },
|
|
322
|
+
* // },
|
|
323
|
+
* // cost: Number("float"),
|
|
285
324
|
* // },
|
|
286
325
|
* // };
|
|
287
326
|
*
|
|
@@ -923,6 +923,34 @@ export declare namespace TraceActivityTrigger {
|
|
|
923
923
|
}
|
|
924
924
|
const visit: <T>(value: TraceActivityTrigger, visitor: Visitor<T>) => T;
|
|
925
925
|
}
|
|
926
|
+
/**
|
|
927
|
+
* @public
|
|
928
|
+
*/
|
|
929
|
+
export interface TraceGenerationUsage {
|
|
930
|
+
tokens?: number;
|
|
931
|
+
outputTokens?: number;
|
|
932
|
+
inputTokens?: number;
|
|
933
|
+
}
|
|
934
|
+
/**
|
|
935
|
+
* @public
|
|
936
|
+
*/
|
|
937
|
+
export interface TracePlaybackUsage {
|
|
938
|
+
chars?: number;
|
|
939
|
+
}
|
|
940
|
+
/**
|
|
941
|
+
* @public
|
|
942
|
+
*/
|
|
943
|
+
export interface TraceTranscribeUsage {
|
|
944
|
+
seconds?: number;
|
|
945
|
+
}
|
|
946
|
+
/**
|
|
947
|
+
* @public
|
|
948
|
+
*/
|
|
949
|
+
export interface TraceUsage {
|
|
950
|
+
generation?: TraceGenerationUsage;
|
|
951
|
+
transcribe?: TraceTranscribeUsage;
|
|
952
|
+
playback?: TracePlaybackUsage;
|
|
953
|
+
}
|
|
926
954
|
/**
|
|
927
955
|
* @public
|
|
928
956
|
*/
|
|
@@ -934,6 +962,7 @@ export interface TraceActivity {
|
|
|
934
962
|
result?: TraceActivityResult;
|
|
935
963
|
start: number;
|
|
936
964
|
duration?: number;
|
|
965
|
+
usage?: TraceUsage;
|
|
937
966
|
}
|
|
938
967
|
/**
|
|
939
968
|
* @public
|
|
@@ -1124,6 +1153,53 @@ export interface TraceSegmentCompletionInput {
|
|
|
1124
1153
|
instructions: string;
|
|
1125
1154
|
messages: (TraceSegmentCompletionMessageItem)[];
|
|
1126
1155
|
}
|
|
1156
|
+
/**
|
|
1157
|
+
* @public
|
|
1158
|
+
*/
|
|
1159
|
+
export type TraceGenericInputBlockContent = TraceGenericInputBlockContent.JsonMember | TraceGenericInputBlockContent.TextMember | TraceGenericInputBlockContent.$UnknownMember;
|
|
1160
|
+
/**
|
|
1161
|
+
* @public
|
|
1162
|
+
*/
|
|
1163
|
+
export declare namespace TraceGenericInputBlockContent {
|
|
1164
|
+
interface TextMember {
|
|
1165
|
+
text: string;
|
|
1166
|
+
json?: never;
|
|
1167
|
+
$unknown?: never;
|
|
1168
|
+
}
|
|
1169
|
+
interface JsonMember {
|
|
1170
|
+
text?: never;
|
|
1171
|
+
json: __DocumentType;
|
|
1172
|
+
$unknown?: never;
|
|
1173
|
+
}
|
|
1174
|
+
/**
|
|
1175
|
+
* @public
|
|
1176
|
+
*/
|
|
1177
|
+
interface $UnknownMember {
|
|
1178
|
+
text?: never;
|
|
1179
|
+
json?: never;
|
|
1180
|
+
$unknown: [string, any];
|
|
1181
|
+
}
|
|
1182
|
+
interface Visitor<T> {
|
|
1183
|
+
text: (value: string) => T;
|
|
1184
|
+
json: (value: __DocumentType) => T;
|
|
1185
|
+
_: (name: string, value: any) => T;
|
|
1186
|
+
}
|
|
1187
|
+
const visit: <T>(value: TraceGenericInputBlockContent, visitor: Visitor<T>) => T;
|
|
1188
|
+
}
|
|
1189
|
+
/**
|
|
1190
|
+
* @public
|
|
1191
|
+
*/
|
|
1192
|
+
export interface TraceGenericInputBlock {
|
|
1193
|
+
title: string;
|
|
1194
|
+
content: TraceGenericInputBlockContent;
|
|
1195
|
+
}
|
|
1196
|
+
/**
|
|
1197
|
+
* @public
|
|
1198
|
+
*/
|
|
1199
|
+
export interface TraceGenericInput {
|
|
1200
|
+
title: string;
|
|
1201
|
+
blocks?: (TraceGenericInputBlock)[];
|
|
1202
|
+
}
|
|
1127
1203
|
/**
|
|
1128
1204
|
* @public
|
|
1129
1205
|
*/
|
|
@@ -1136,7 +1212,7 @@ export interface TraceOAuthInput {
|
|
|
1136
1212
|
/**
|
|
1137
1213
|
* @public
|
|
1138
1214
|
*/
|
|
1139
|
-
export type TraceSegmentInput = TraceSegmentInput.CompletionMember | TraceSegmentInput.OauthMember | TraceSegmentInput.ToolMember | TraceSegmentInput.$UnknownMember;
|
|
1215
|
+
export type TraceSegmentInput = TraceSegmentInput.CompletionMember | TraceSegmentInput.GenericMember | TraceSegmentInput.OauthMember | TraceSegmentInput.ToolMember | TraceSegmentInput.$UnknownMember;
|
|
1140
1216
|
/**
|
|
1141
1217
|
* @public
|
|
1142
1218
|
*/
|
|
@@ -1145,18 +1221,28 @@ export declare namespace TraceSegmentInput {
|
|
|
1145
1221
|
completion: TraceSegmentCompletionInput;
|
|
1146
1222
|
tool?: never;
|
|
1147
1223
|
oauth?: never;
|
|
1224
|
+
generic?: never;
|
|
1148
1225
|
$unknown?: never;
|
|
1149
1226
|
}
|
|
1150
1227
|
interface ToolMember {
|
|
1151
1228
|
completion?: never;
|
|
1152
1229
|
tool: TraceToolCall;
|
|
1153
1230
|
oauth?: never;
|
|
1231
|
+
generic?: never;
|
|
1154
1232
|
$unknown?: never;
|
|
1155
1233
|
}
|
|
1156
1234
|
interface OauthMember {
|
|
1157
1235
|
completion?: never;
|
|
1158
1236
|
tool?: never;
|
|
1159
1237
|
oauth: TraceOAuthInput;
|
|
1238
|
+
generic?: never;
|
|
1239
|
+
$unknown?: never;
|
|
1240
|
+
}
|
|
1241
|
+
interface GenericMember {
|
|
1242
|
+
completion?: never;
|
|
1243
|
+
tool?: never;
|
|
1244
|
+
oauth?: never;
|
|
1245
|
+
generic: TraceGenericInput;
|
|
1160
1246
|
$unknown?: never;
|
|
1161
1247
|
}
|
|
1162
1248
|
/**
|
|
@@ -1166,12 +1252,14 @@ export declare namespace TraceSegmentInput {
|
|
|
1166
1252
|
completion?: never;
|
|
1167
1253
|
tool?: never;
|
|
1168
1254
|
oauth?: never;
|
|
1255
|
+
generic?: never;
|
|
1169
1256
|
$unknown: [string, any];
|
|
1170
1257
|
}
|
|
1171
1258
|
interface Visitor<T> {
|
|
1172
1259
|
completion: (value: TraceSegmentCompletionInput) => T;
|
|
1173
1260
|
tool: (value: TraceToolCall) => T;
|
|
1174
1261
|
oauth: (value: TraceOAuthInput) => T;
|
|
1262
|
+
generic: (value: TraceGenericInput) => T;
|
|
1175
1263
|
_: (name: string, value: any) => T;
|
|
1176
1264
|
}
|
|
1177
1265
|
const visit: <T>(value: TraceSegmentInput, visitor: Visitor<T>) => T;
|
|
@@ -1432,6 +1520,8 @@ export interface Trace {
|
|
|
1432
1520
|
session: TraceSession;
|
|
1433
1521
|
activities: (TraceActivity)[];
|
|
1434
1522
|
segments: (TraceSegment)[];
|
|
1523
|
+
usage?: TraceUsage;
|
|
1524
|
+
cost?: number;
|
|
1435
1525
|
}
|
|
1436
1526
|
/**
|
|
1437
1527
|
* @public
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wildix/wim-voicebots-client",
|
|
3
3
|
"description": "@wildix/wim-voicebots-client client",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.20",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "tsc -p tsconfig.cjs.json",
|