@wildix/wim-voicebots-client 1.0.17 → 1.0.19
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 +26 -0
- package/dist-types/commands/GetTraceCommand.d.ts +36 -0
- package/dist-types/models/models_0.d.ts +90 -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)
|
|
@@ -44,6 +44,7 @@ declare const DescribeEventCommand_base: {
|
|
|
44
44
|
* // type: "started" || "ended" || "reply" || "playback" || "transcription" || "interruption" || "complete", // required
|
|
45
45
|
* // id: "STRING_VALUE", // required
|
|
46
46
|
* // text: "STRING_VALUE", // required
|
|
47
|
+
* // final: true || false,
|
|
47
48
|
* // time: Number("long"), // required
|
|
48
49
|
* // },
|
|
49
50
|
* // },
|
|
@@ -141,6 +142,7 @@ declare const DescribeEventCommand_base: {
|
|
|
141
142
|
* // type: "started" || "ended" || "reply" || "playback" || "transcription" || "interruption" || "complete", // required
|
|
142
143
|
* // id: "STRING_VALUE", // required
|
|
143
144
|
* // text: "STRING_VALUE", // required
|
|
145
|
+
* // final: true || false,
|
|
144
146
|
* // time: Number("long"), // required
|
|
145
147
|
* // },
|
|
146
148
|
* // },
|
|
@@ -267,6 +269,7 @@ declare const DescribeEventCommand_base: {
|
|
|
267
269
|
* // type: "started" || "ended" || "reply" || "playback" || "transcription" || "interruption" || "complete", // required
|
|
268
270
|
* // id: "STRING_VALUE", // required
|
|
269
271
|
* // text: "STRING_VALUE", // required
|
|
272
|
+
* // final: true || false,
|
|
270
273
|
* // time: Number("long"), // required
|
|
271
274
|
* // },
|
|
272
275
|
* // },
|
|
@@ -310,6 +313,17 @@ declare const DescribeEventCommand_base: {
|
|
|
310
313
|
* // },
|
|
311
314
|
* // start: Number("double"), // required
|
|
312
315
|
* // duration: Number("int"),
|
|
316
|
+
* // usage: { // TraceUsage
|
|
317
|
+
* // generations: { // TraceGenerationUsage
|
|
318
|
+
* // tokens: Number("int"),
|
|
319
|
+
* // },
|
|
320
|
+
* // transcribe: { // TraceTranscribeUsage
|
|
321
|
+
* // seconds: Number("int"),
|
|
322
|
+
* // },
|
|
323
|
+
* // playback: { // TracePlaybackUsage
|
|
324
|
+
* // chars: Number("int"),
|
|
325
|
+
* // },
|
|
326
|
+
* // },
|
|
313
327
|
* // },
|
|
314
328
|
* // segment: { // TraceSegment
|
|
315
329
|
* // id: "STRING_VALUE", // required
|
|
@@ -415,6 +429,18 @@ declare const DescribeEventCommand_base: {
|
|
|
415
429
|
* // endpointUrl: "STRING_VALUE",
|
|
416
430
|
* // scope: "STRING_VALUE",
|
|
417
431
|
* // },
|
|
432
|
+
* // generic: { // TraceGenericInput
|
|
433
|
+
* // title: "STRING_VALUE", // required
|
|
434
|
+
* // blocks: [ // TraceGenericInputBlocksList
|
|
435
|
+
* // { // TraceGenericInputBlock
|
|
436
|
+
* // title: "STRING_VALUE", // required
|
|
437
|
+
* // content: { // TraceGenericInputBlockContent Union: only one key present
|
|
438
|
+
* // text: "STRING_VALUE",
|
|
439
|
+
* // json: "DOCUMENT_VALUE",
|
|
440
|
+
* // },
|
|
441
|
+
* // },
|
|
442
|
+
* // ],
|
|
443
|
+
* // },
|
|
418
444
|
* // },
|
|
419
445
|
* // result: { // TraceSegmentResult Union: only one key present
|
|
420
446
|
* // error: {
|
|
@@ -115,6 +115,7 @@ declare const GetTraceCommand_base: {
|
|
|
115
115
|
* // type: "started" || "ended" || "reply" || "playback" || "transcription" || "interruption" || "complete", // required
|
|
116
116
|
* // id: "STRING_VALUE", // required
|
|
117
117
|
* // text: "STRING_VALUE", // required
|
|
118
|
+
* // final: true || false,
|
|
118
119
|
* // time: Number("long"), // required
|
|
119
120
|
* // },
|
|
120
121
|
* // },
|
|
@@ -158,6 +159,17 @@ declare const GetTraceCommand_base: {
|
|
|
158
159
|
* // },
|
|
159
160
|
* // start: Number("double"), // required
|
|
160
161
|
* // duration: Number("int"),
|
|
162
|
+
* // usage: { // TraceUsage
|
|
163
|
+
* // generations: { // TraceGenerationUsage
|
|
164
|
+
* // tokens: Number("int"),
|
|
165
|
+
* // },
|
|
166
|
+
* // transcribe: { // TraceTranscribeUsage
|
|
167
|
+
* // seconds: Number("int"),
|
|
168
|
+
* // },
|
|
169
|
+
* // playback: { // TracePlaybackUsage
|
|
170
|
+
* // chars: Number("int"),
|
|
171
|
+
* // },
|
|
172
|
+
* // },
|
|
161
173
|
* // },
|
|
162
174
|
* // ],
|
|
163
175
|
* // segments: [ // TraceSegmentsList // required
|
|
@@ -265,6 +277,18 @@ declare const GetTraceCommand_base: {
|
|
|
265
277
|
* // endpointUrl: "STRING_VALUE",
|
|
266
278
|
* // scope: "STRING_VALUE",
|
|
267
279
|
* // },
|
|
280
|
+
* // generic: { // TraceGenericInput
|
|
281
|
+
* // title: "STRING_VALUE", // required
|
|
282
|
+
* // blocks: [ // TraceGenericInputBlocksList
|
|
283
|
+
* // { // TraceGenericInputBlock
|
|
284
|
+
* // title: "STRING_VALUE", // required
|
|
285
|
+
* // content: { // TraceGenericInputBlockContent Union: only one key present
|
|
286
|
+
* // text: "STRING_VALUE",
|
|
287
|
+
* // json: "DOCUMENT_VALUE",
|
|
288
|
+
* // },
|
|
289
|
+
* // },
|
|
290
|
+
* // ],
|
|
291
|
+
* // },
|
|
268
292
|
* // },
|
|
269
293
|
* // result: { // TraceSegmentResult Union: only one key present
|
|
270
294
|
* // error: {
|
|
@@ -281,6 +305,18 @@ declare const GetTraceCommand_base: {
|
|
|
281
305
|
* // duration: Number("int"),
|
|
282
306
|
* // },
|
|
283
307
|
* // ],
|
|
308
|
+
* // usage: {
|
|
309
|
+
* // generations: {
|
|
310
|
+
* // tokens: Number("int"),
|
|
311
|
+
* // },
|
|
312
|
+
* // transcribe: {
|
|
313
|
+
* // seconds: Number("int"),
|
|
314
|
+
* // },
|
|
315
|
+
* // playback: {
|
|
316
|
+
* // chars: Number("int"),
|
|
317
|
+
* // },
|
|
318
|
+
* // },
|
|
319
|
+
* // cost: Number("float"),
|
|
284
320
|
* // },
|
|
285
321
|
* // };
|
|
286
322
|
*
|
|
@@ -675,6 +675,7 @@ export interface TranscriptionEvent {
|
|
|
675
675
|
type: VoiceBotEventType;
|
|
676
676
|
id: string;
|
|
677
677
|
text: string;
|
|
678
|
+
final?: boolean;
|
|
678
679
|
time: number;
|
|
679
680
|
}
|
|
680
681
|
/**
|
|
@@ -922,6 +923,32 @@ export declare namespace TraceActivityTrigger {
|
|
|
922
923
|
}
|
|
923
924
|
const visit: <T>(value: TraceActivityTrigger, visitor: Visitor<T>) => T;
|
|
924
925
|
}
|
|
926
|
+
/**
|
|
927
|
+
* @public
|
|
928
|
+
*/
|
|
929
|
+
export interface TraceGenerationUsage {
|
|
930
|
+
tokens?: number;
|
|
931
|
+
}
|
|
932
|
+
/**
|
|
933
|
+
* @public
|
|
934
|
+
*/
|
|
935
|
+
export interface TracePlaybackUsage {
|
|
936
|
+
chars?: number;
|
|
937
|
+
}
|
|
938
|
+
/**
|
|
939
|
+
* @public
|
|
940
|
+
*/
|
|
941
|
+
export interface TraceTranscribeUsage {
|
|
942
|
+
seconds?: number;
|
|
943
|
+
}
|
|
944
|
+
/**
|
|
945
|
+
* @public
|
|
946
|
+
*/
|
|
947
|
+
export interface TraceUsage {
|
|
948
|
+
generations?: TraceGenerationUsage;
|
|
949
|
+
transcribe?: TraceTranscribeUsage;
|
|
950
|
+
playback?: TracePlaybackUsage;
|
|
951
|
+
}
|
|
925
952
|
/**
|
|
926
953
|
* @public
|
|
927
954
|
*/
|
|
@@ -933,6 +960,7 @@ export interface TraceActivity {
|
|
|
933
960
|
result?: TraceActivityResult;
|
|
934
961
|
start: number;
|
|
935
962
|
duration?: number;
|
|
963
|
+
usage?: TraceUsage;
|
|
936
964
|
}
|
|
937
965
|
/**
|
|
938
966
|
* @public
|
|
@@ -1123,6 +1151,53 @@ export interface TraceSegmentCompletionInput {
|
|
|
1123
1151
|
instructions: string;
|
|
1124
1152
|
messages: (TraceSegmentCompletionMessageItem)[];
|
|
1125
1153
|
}
|
|
1154
|
+
/**
|
|
1155
|
+
* @public
|
|
1156
|
+
*/
|
|
1157
|
+
export type TraceGenericInputBlockContent = TraceGenericInputBlockContent.JsonMember | TraceGenericInputBlockContent.TextMember | TraceGenericInputBlockContent.$UnknownMember;
|
|
1158
|
+
/**
|
|
1159
|
+
* @public
|
|
1160
|
+
*/
|
|
1161
|
+
export declare namespace TraceGenericInputBlockContent {
|
|
1162
|
+
interface TextMember {
|
|
1163
|
+
text: string;
|
|
1164
|
+
json?: never;
|
|
1165
|
+
$unknown?: never;
|
|
1166
|
+
}
|
|
1167
|
+
interface JsonMember {
|
|
1168
|
+
text?: never;
|
|
1169
|
+
json: __DocumentType;
|
|
1170
|
+
$unknown?: never;
|
|
1171
|
+
}
|
|
1172
|
+
/**
|
|
1173
|
+
* @public
|
|
1174
|
+
*/
|
|
1175
|
+
interface $UnknownMember {
|
|
1176
|
+
text?: never;
|
|
1177
|
+
json?: never;
|
|
1178
|
+
$unknown: [string, any];
|
|
1179
|
+
}
|
|
1180
|
+
interface Visitor<T> {
|
|
1181
|
+
text: (value: string) => T;
|
|
1182
|
+
json: (value: __DocumentType) => T;
|
|
1183
|
+
_: (name: string, value: any) => T;
|
|
1184
|
+
}
|
|
1185
|
+
const visit: <T>(value: TraceGenericInputBlockContent, visitor: Visitor<T>) => T;
|
|
1186
|
+
}
|
|
1187
|
+
/**
|
|
1188
|
+
* @public
|
|
1189
|
+
*/
|
|
1190
|
+
export interface TraceGenericInputBlock {
|
|
1191
|
+
title: string;
|
|
1192
|
+
content: TraceGenericInputBlockContent;
|
|
1193
|
+
}
|
|
1194
|
+
/**
|
|
1195
|
+
* @public
|
|
1196
|
+
*/
|
|
1197
|
+
export interface TraceGenericInput {
|
|
1198
|
+
title: string;
|
|
1199
|
+
blocks?: (TraceGenericInputBlock)[];
|
|
1200
|
+
}
|
|
1126
1201
|
/**
|
|
1127
1202
|
* @public
|
|
1128
1203
|
*/
|
|
@@ -1135,7 +1210,7 @@ export interface TraceOAuthInput {
|
|
|
1135
1210
|
/**
|
|
1136
1211
|
* @public
|
|
1137
1212
|
*/
|
|
1138
|
-
export type TraceSegmentInput = TraceSegmentInput.CompletionMember | TraceSegmentInput.OauthMember | TraceSegmentInput.ToolMember | TraceSegmentInput.$UnknownMember;
|
|
1213
|
+
export type TraceSegmentInput = TraceSegmentInput.CompletionMember | TraceSegmentInput.GenericMember | TraceSegmentInput.OauthMember | TraceSegmentInput.ToolMember | TraceSegmentInput.$UnknownMember;
|
|
1139
1214
|
/**
|
|
1140
1215
|
* @public
|
|
1141
1216
|
*/
|
|
@@ -1144,18 +1219,28 @@ export declare namespace TraceSegmentInput {
|
|
|
1144
1219
|
completion: TraceSegmentCompletionInput;
|
|
1145
1220
|
tool?: never;
|
|
1146
1221
|
oauth?: never;
|
|
1222
|
+
generic?: never;
|
|
1147
1223
|
$unknown?: never;
|
|
1148
1224
|
}
|
|
1149
1225
|
interface ToolMember {
|
|
1150
1226
|
completion?: never;
|
|
1151
1227
|
tool: TraceToolCall;
|
|
1152
1228
|
oauth?: never;
|
|
1229
|
+
generic?: never;
|
|
1153
1230
|
$unknown?: never;
|
|
1154
1231
|
}
|
|
1155
1232
|
interface OauthMember {
|
|
1156
1233
|
completion?: never;
|
|
1157
1234
|
tool?: never;
|
|
1158
1235
|
oauth: TraceOAuthInput;
|
|
1236
|
+
generic?: never;
|
|
1237
|
+
$unknown?: never;
|
|
1238
|
+
}
|
|
1239
|
+
interface GenericMember {
|
|
1240
|
+
completion?: never;
|
|
1241
|
+
tool?: never;
|
|
1242
|
+
oauth?: never;
|
|
1243
|
+
generic: TraceGenericInput;
|
|
1159
1244
|
$unknown?: never;
|
|
1160
1245
|
}
|
|
1161
1246
|
/**
|
|
@@ -1165,12 +1250,14 @@ export declare namespace TraceSegmentInput {
|
|
|
1165
1250
|
completion?: never;
|
|
1166
1251
|
tool?: never;
|
|
1167
1252
|
oauth?: never;
|
|
1253
|
+
generic?: never;
|
|
1168
1254
|
$unknown: [string, any];
|
|
1169
1255
|
}
|
|
1170
1256
|
interface Visitor<T> {
|
|
1171
1257
|
completion: (value: TraceSegmentCompletionInput) => T;
|
|
1172
1258
|
tool: (value: TraceToolCall) => T;
|
|
1173
1259
|
oauth: (value: TraceOAuthInput) => T;
|
|
1260
|
+
generic: (value: TraceGenericInput) => T;
|
|
1174
1261
|
_: (name: string, value: any) => T;
|
|
1175
1262
|
}
|
|
1176
1263
|
const visit: <T>(value: TraceSegmentInput, visitor: Visitor<T>) => T;
|
|
@@ -1431,6 +1518,8 @@ export interface Trace {
|
|
|
1431
1518
|
session: TraceSession;
|
|
1432
1519
|
activities: (TraceActivity)[];
|
|
1433
1520
|
segments: (TraceSegment)[];
|
|
1521
|
+
usage?: TraceUsage;
|
|
1522
|
+
cost?: number;
|
|
1434
1523
|
}
|
|
1435
1524
|
/**
|
|
1436
1525
|
* @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.19",
|
|
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",
|