@orq-ai/node 4.11.0-rc.4 → 4.11.0-rc.6
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/jsr.json +1 -1
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/models/components/index.d.ts +23 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +23 -0
- package/models/components/index.js.map +1 -1
- package/models/components/modelmetadata.d.ts +2 -0
- package/models/components/modelmetadata.d.ts.map +1 -1
- package/models/components/modelmetadata.js +4 -0
- package/models/components/modelmetadata.js.map +1 -1
- package/models/components/publicresponseresource.d.ts +105 -0
- package/models/components/publicresponseresource.d.ts.map +1 -0
- package/models/components/publicresponseresource.js +138 -0
- package/models/components/publicresponseresource.js.map +1 -0
- package/models/components/reasoning.d.ts +40 -2
- package/models/components/reasoning.d.ts.map +1 -1
- package/models/components/reasoning.js +26 -3
- package/models/components/reasoning.js.map +1 -1
- package/models/components/reasoningparam.d.ts +40 -2
- package/models/components/reasoningparam.d.ts.map +1 -1
- package/models/components/reasoningparam.js +28 -3
- package/models/components/reasoningparam.js.map +1 -1
- package/models/components/reasoningpart.js +1 -1
- package/models/components/responsecodeinterpretercodedeltastreamevent.d.ts +61 -0
- package/models/components/responsecodeinterpretercodedeltastreamevent.d.ts.map +1 -0
- package/models/components/responsecodeinterpretercodedeltastreamevent.js +89 -0
- package/models/components/responsecodeinterpretercodedeltastreamevent.js.map +1 -0
- package/models/components/responsecodeinterpretercodedonestreamevent.d.ts +61 -0
- package/models/components/responsecodeinterpretercodedonestreamevent.d.ts.map +1 -0
- package/models/components/responsecodeinterpretercodedonestreamevent.js +89 -0
- package/models/components/responsecodeinterpretercodedonestreamevent.js.map +1 -0
- package/models/components/responsecontentpartstreamevent.d.ts +81 -0
- package/models/components/responsecontentpartstreamevent.d.ts.map +1 -0
- package/models/components/responsecontentpartstreamevent.js +100 -0
- package/models/components/responsecontentpartstreamevent.js.map +1 -0
- package/models/components/responseerrorstreamevent.d.ts +51 -0
- package/models/components/responseerrorstreamevent.d.ts.map +1 -0
- package/models/components/responseerrorstreamevent.js +85 -0
- package/models/components/responseerrorstreamevent.js.map +1 -0
- package/models/components/responsefunctioncallargumentsdeltastreamevent.d.ts +65 -0
- package/models/components/responsefunctioncallargumentsdeltastreamevent.d.ts.map +1 -0
- package/models/components/responsefunctioncallargumentsdeltastreamevent.js +90 -0
- package/models/components/responsefunctioncallargumentsdeltastreamevent.js.map +1 -0
- package/models/components/responsefunctioncallargumentsdonestreamevent.d.ts +61 -0
- package/models/components/responsefunctioncallargumentsdonestreamevent.d.ts.map +1 -0
- package/models/components/responsefunctioncallargumentsdonestreamevent.js +89 -0
- package/models/components/responsefunctioncallargumentsdonestreamevent.js.map +1 -0
- package/models/components/responsehostedtoolcallstreamevent.d.ts +97 -0
- package/models/components/responsehostedtoolcallstreamevent.d.ts.map +1 -0
- package/models/components/responsehostedtoolcallstreamevent.js +123 -0
- package/models/components/responsehostedtoolcallstreamevent.js.map +1 -0
- package/models/components/responseimagegenerationpartialimagestreamevent.d.ts +65 -0
- package/models/components/responseimagegenerationpartialimagestreamevent.d.ts.map +1 -0
- package/models/components/responseimagegenerationpartialimagestreamevent.js +92 -0
- package/models/components/responseimagegenerationpartialimagestreamevent.js.map +1 -0
- package/models/components/responselifecyclestreamevent.d.ts +73 -0
- package/models/components/responselifecyclestreamevent.d.ts.map +1 -0
- package/models/components/responselifecyclestreamevent.js +103 -0
- package/models/components/responselifecyclestreamevent.js.map +1 -0
- package/models/components/responsemcpcallargumentsdeltastreamevent.d.ts +61 -0
- package/models/components/responsemcpcallargumentsdeltastreamevent.d.ts.map +1 -0
- package/models/components/responsemcpcallargumentsdeltastreamevent.js +89 -0
- package/models/components/responsemcpcallargumentsdeltastreamevent.js.map +1 -0
- package/models/components/responsemcpcallargumentsdonestreamevent.d.ts +61 -0
- package/models/components/responsemcpcallargumentsdonestreamevent.d.ts.map +1 -0
- package/models/components/responsemcpcallargumentsdonestreamevent.js +89 -0
- package/models/components/responsemcpcallargumentsdonestreamevent.js.map +1 -0
- package/models/components/responseoutputitemstreamevent.d.ts +73 -0
- package/models/components/responseoutputitemstreamevent.d.ts.map +1 -0
- package/models/components/responseoutputitemstreamevent.js +96 -0
- package/models/components/responseoutputitemstreamevent.js.map +1 -0
- package/models/components/responseoutputtextannotationaddedstreamevent.d.ts +71 -0
- package/models/components/responseoutputtextannotationaddedstreamevent.d.ts.map +1 -0
- package/models/components/responseoutputtextannotationaddedstreamevent.js +93 -0
- package/models/components/responseoutputtextannotationaddedstreamevent.js.map +1 -0
- package/models/components/responseoutputtextdeltastreamevent.d.ts +75 -0
- package/models/components/responseoutputtextdeltastreamevent.d.ts.map +1 -0
- package/models/components/responseoutputtextdeltastreamevent.js +92 -0
- package/models/components/responseoutputtextdeltastreamevent.js.map +1 -0
- package/models/components/responseoutputtextdonestreamevent.d.ts +71 -0
- package/models/components/responseoutputtextdonestreamevent.d.ts.map +1 -0
- package/models/components/responseoutputtextdonestreamevent.js +91 -0
- package/models/components/responseoutputtextdonestreamevent.js.map +1 -0
- package/models/components/responsereasoningdeltastreamevent.d.ts +83 -0
- package/models/components/responsereasoningdeltastreamevent.d.ts.map +1 -0
- package/models/components/responsereasoningdeltastreamevent.js +101 -0
- package/models/components/responsereasoningdeltastreamevent.js.map +1 -0
- package/models/components/responsereasoningdonestreamevent.d.ts +79 -0
- package/models/components/responsereasoningdonestreamevent.d.ts.map +1 -0
- package/models/components/responsereasoningdonestreamevent.js +100 -0
- package/models/components/responsereasoningdonestreamevent.js.map +1 -0
- package/models/components/responsereasoningsummarypartstreamevent.d.ts +81 -0
- package/models/components/responsereasoningsummarypartstreamevent.d.ts.map +1 -0
- package/models/components/responsereasoningsummarypartstreamevent.js +102 -0
- package/models/components/responsereasoningsummarypartstreamevent.js.map +1 -0
- package/models/components/responsereasoningsummarytextdeltastreamevent.d.ts +69 -0
- package/models/components/responsereasoningsummarytextdeltastreamevent.d.ts.map +1 -0
- package/models/components/responsereasoningsummarytextdeltastreamevent.js +92 -0
- package/models/components/responsereasoningsummarytextdeltastreamevent.js.map +1 -0
- package/models/components/responsereasoningsummarytextdonestreamevent.d.ts +65 -0
- package/models/components/responsereasoningsummarytextdonestreamevent.d.ts.map +1 -0
- package/models/components/responsereasoningsummarytextdonestreamevent.js +91 -0
- package/models/components/responsereasoningsummarytextdonestreamevent.js.map +1 -0
- package/models/components/responserefusaldeltastreamevent.d.ts +65 -0
- package/models/components/responserefusaldeltastreamevent.d.ts.map +1 -0
- package/models/components/responserefusaldeltastreamevent.js +90 -0
- package/models/components/responserefusaldeltastreamevent.js.map +1 -0
- package/models/components/responserefusaldonestreamevent.d.ts +65 -0
- package/models/components/responserefusaldonestreamevent.d.ts.map +1 -0
- package/models/components/responserefusaldonestreamevent.js +90 -0
- package/models/components/responserefusaldonestreamevent.js.map +1 -0
- package/models/operations/createagentrequest.d.ts +298 -4
- package/models/operations/createagentrequest.d.ts.map +1 -1
- package/models/operations/createagentrequest.js +163 -9
- package/models/operations/createagentrequest.js.map +1 -1
- package/models/operations/createchatcompletion.d.ts +81 -4
- package/models/operations/createchatcompletion.d.ts.map +1 -1
- package/models/operations/createchatcompletion.js +45 -7
- package/models/operations/createchatcompletion.js.map +1 -1
- package/models/operations/createdataset.js +1 -1
- package/models/operations/createdatasetitem.js +4 -4
- package/models/operations/createdatasource.js +1 -1
- package/models/operations/createeval.js +16 -16
- package/models/operations/createprompt.d.ts +225 -12
- package/models/operations/createprompt.d.ts.map +1 -1
- package/models/operations/createprompt.js +124 -13
- package/models/operations/createprompt.js.map +1 -1
- package/models/operations/createrouterresponse.d.ts +476 -61
- package/models/operations/createrouterresponse.d.ts.map +1 -1
- package/models/operations/createrouterresponse.js +332 -60
- package/models/operations/createrouterresponse.js.map +1 -1
- package/models/operations/createtool.js +6 -6
- package/models/operations/deploymentgetconfig.d.ts +70 -4
- package/models/operations/deploymentgetconfig.d.ts.map +1 -1
- package/models/operations/deploymentgetconfig.js +43 -8
- package/models/operations/deploymentgetconfig.js.map +1 -1
- package/models/operations/deployments.d.ts +74 -8
- package/models/operations/deployments.d.ts.map +1 -1
- package/models/operations/deployments.js +43 -8
- package/models/operations/deployments.js.map +1 -1
- package/models/operations/getallprompts.d.ts +140 -4
- package/models/operations/getallprompts.d.ts.map +1 -1
- package/models/operations/getallprompts.js +79 -6
- package/models/operations/getallprompts.js.map +1 -1
- package/models/operations/getalltools.js +6 -6
- package/models/operations/getevals.js +16 -16
- package/models/operations/getoneprompt.d.ts +140 -4
- package/models/operations/getoneprompt.d.ts.map +1 -1
- package/models/operations/getoneprompt.js +79 -6
- package/models/operations/getoneprompt.js.map +1 -1
- package/models/operations/getpromptversion.d.ts +140 -4
- package/models/operations/getpromptversion.d.ts.map +1 -1
- package/models/operations/getpromptversion.js +78 -6
- package/models/operations/getpromptversion.js.map +1 -1
- package/models/operations/getv2humanevalsets.js +2 -2
- package/models/operations/getv2humanevalsetsid.js +2 -2
- package/models/operations/listagents.d.ts +140 -0
- package/models/operations/listagents.d.ts.map +1 -1
- package/models/operations/listagents.js +79 -3
- package/models/operations/listagents.js.map +1 -1
- package/models/operations/listdatasetdatapoints.js +4 -4
- package/models/operations/listdatasets.js +1 -1
- package/models/operations/listdatasources.js +1 -1
- package/models/operations/listknowledgebases.d.ts +3 -0
- package/models/operations/listknowledgebases.d.ts.map +1 -1
- package/models/operations/listknowledgebases.js +1 -1
- package/models/operations/listknowledgebases.js.map +1 -1
- package/models/operations/listpromptversions.d.ts +140 -4
- package/models/operations/listpromptversions.d.ts.map +1 -1
- package/models/operations/listpromptversions.js +79 -6
- package/models/operations/listpromptversions.js.map +1 -1
- package/models/operations/patchv2humanevalsetsid.js +2 -2
- package/models/operations/postv2feedbackevaluation.js +3 -3
- package/models/operations/postv2humanevalsets.js +2 -2
- package/models/operations/retrieveagentrequest.d.ts +140 -0
- package/models/operations/retrieveagentrequest.d.ts.map +1 -1
- package/models/operations/retrieveagentrequest.js +81 -2
- package/models/operations/retrieveagentrequest.js.map +1 -1
- package/models/operations/retrievedatapoint.js +4 -4
- package/models/operations/retrievedataset.js +1 -1
- package/models/operations/retrievedatasource.js +1 -1
- package/models/operations/retrievetool.js +6 -6
- package/models/operations/runagent.d.ts +154 -0
- package/models/operations/runagent.d.ts.map +1 -1
- package/models/operations/runagent.js +80 -5
- package/models/operations/runagent.js.map +1 -1
- package/models/operations/streamrunagent.d.ts +154 -0
- package/models/operations/streamrunagent.d.ts.map +1 -1
- package/models/operations/streamrunagent.js +82 -4
- package/models/operations/streamrunagent.js.map +1 -1
- package/models/operations/updateagent.d.ts +298 -4
- package/models/operations/updateagent.d.ts.map +1 -1
- package/models/operations/updateagent.js +162 -9
- package/models/operations/updateagent.js.map +1 -1
- package/models/operations/updatedatapoint.js +4 -4
- package/models/operations/updatedataset.js +1 -1
- package/models/operations/updatedatasource.js +1 -1
- package/models/operations/updateeval.js +16 -16
- package/models/operations/updateprompt.d.ts +225 -12
- package/models/operations/updateprompt.d.ts.map +1 -1
- package/models/operations/updateprompt.js +125 -14
- package/models/operations/updateprompt.js.map +1 -1
- package/models/operations/updatetool.js +7 -7
- package/package.json +3 -3
- package/sdk/feedback.d.ts +2 -2
- package/sdk/feedback.js +2 -2
- package/src/lib/config.ts +2 -2
- package/src/models/components/index.ts +23 -0
- package/src/models/components/modelmetadata.ts +6 -0
- package/src/models/components/publicresponseresource.ts +196 -0
- package/src/models/components/reasoning.ts +50 -4
- package/src/models/components/reasoningparam.ts +48 -4
- package/src/models/components/reasoningpart.ts +1 -1
- package/src/models/components/responsecodeinterpretercodedeltastreamevent.ts +149 -0
- package/src/models/components/responsecodeinterpretercodedonestreamevent.ts +146 -0
- package/src/models/components/responsecontentpartstreamevent.ts +157 -0
- package/src/models/components/responseerrorstreamevent.ts +116 -0
- package/src/models/components/responsefunctioncallargumentsdeltastreamevent.ts +153 -0
- package/src/models/components/responsefunctioncallargumentsdonestreamevent.ts +148 -0
- package/src/models/components/responsehostedtoolcallstreamevent.ts +186 -0
- package/src/models/components/responseimagegenerationpartialimagestreamevent.ts +156 -0
- package/src/models/components/responselifecyclestreamevent.ts +145 -0
- package/src/models/components/responsemcpcallargumentsdeltastreamevent.ts +145 -0
- package/src/models/components/responsemcpcallargumentsdonestreamevent.ts +145 -0
- package/src/models/components/responseoutputitemstreamevent.ts +144 -0
- package/src/models/components/responseoutputtextannotationaddedstreamevent.ts +160 -0
- package/src/models/components/responseoutputtextdeltastreamevent.ts +149 -0
- package/src/models/components/responseoutputtextdonestreamevent.ts +143 -0
- package/src/models/components/responsereasoningdeltastreamevent.ts +164 -0
- package/src/models/components/responsereasoningdonestreamevent.ts +159 -0
- package/src/models/components/responsereasoningsummarypartstreamevent.ts +171 -0
- package/src/models/components/responsereasoningsummarytextdeltastreamevent.ts +159 -0
- package/src/models/components/responsereasoningsummarytextdonestreamevent.ts +154 -0
- package/src/models/components/responserefusaldeltastreamevent.ts +137 -0
- package/src/models/components/responserefusaldonestreamevent.ts +137 -0
- package/src/models/operations/createagentrequest.ts +460 -8
- package/src/models/operations/createchatcompletion.ts +129 -10
- package/src/models/operations/createdataset.ts +1 -1
- package/src/models/operations/createdatasetitem.ts +4 -4
- package/src/models/operations/createdatasource.ts +1 -1
- package/src/models/operations/createeval.ts +16 -16
- package/src/models/operations/createprompt.ts +356 -27
- package/src/models/operations/createrouterresponse.ts +1000 -109
- package/src/models/operations/createtool.ts +6 -6
- package/src/models/operations/deploymentgetconfig.ts +105 -8
- package/src/models/operations/deployments.ts +113 -16
- package/src/models/operations/getallprompts.ts +210 -8
- package/src/models/operations/getalltools.ts +6 -6
- package/src/models/operations/getevals.ts +16 -16
- package/src/models/operations/getoneprompt.ts +208 -8
- package/src/models/operations/getpromptversion.ts +212 -8
- package/src/models/operations/getv2humanevalsets.ts +2 -2
- package/src/models/operations/getv2humanevalsetsid.ts +2 -2
- package/src/models/operations/listagents.ts +215 -0
- package/src/models/operations/listdatasetdatapoints.ts +4 -4
- package/src/models/operations/listdatasets.ts +1 -1
- package/src/models/operations/listdatasources.ts +1 -1
- package/src/models/operations/listknowledgebases.ts +4 -1
- package/src/models/operations/listpromptversions.ts +212 -8
- package/src/models/operations/patchv2humanevalsetsid.ts +2 -2
- package/src/models/operations/postv2feedbackevaluation.ts +3 -3
- package/src/models/operations/postv2humanevalsets.ts +2 -2
- package/src/models/operations/retrieveagentrequest.ts +222 -0
- package/src/models/operations/retrievedatapoint.ts +4 -4
- package/src/models/operations/retrievedataset.ts +1 -1
- package/src/models/operations/retrievedatasource.ts +1 -1
- package/src/models/operations/retrievetool.ts +6 -6
- package/src/models/operations/runagent.ts +236 -1
- package/src/models/operations/streamrunagent.ts +242 -1
- package/src/models/operations/updateagent.ts +464 -9
- package/src/models/operations/updatedatapoint.ts +4 -4
- package/src/models/operations/updatedataset.ts +1 -1
- package/src/models/operations/updatedatasource.ts +1 -1
- package/src/models/operations/updateeval.ts +16 -16
- package/src/models/operations/updateprompt.ts +356 -27
- package/src/models/operations/updatetool.ts +7 -7
- package/src/sdk/feedback.ts +2 -2
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.ResponseOutputTextAnnotationAddedStreamEvent$inboundSchema = exports.ResponseOutputTextAnnotationAddedStreamEventData$inboundSchema = exports.ResponseOutputTextAnnotationAddedStreamEventType$inboundSchema = exports.ResponseOutputTextAnnotationAddedStreamEventType = void 0;
|
|
40
|
+
exports.responseOutputTextAnnotationAddedStreamEventDataFromJSON = responseOutputTextAnnotationAddedStreamEventDataFromJSON;
|
|
41
|
+
exports.responseOutputTextAnnotationAddedStreamEventFromJSON = responseOutputTextAnnotationAddedStreamEventFromJSON;
|
|
42
|
+
const z = __importStar(require("zod/v3"));
|
|
43
|
+
const primitives_js_1 = require("../../lib/primitives.js");
|
|
44
|
+
const schemas_js_1 = require("../../lib/schemas.js");
|
|
45
|
+
/**
|
|
46
|
+
* The event type. Matches the SSE `event` field.
|
|
47
|
+
*/
|
|
48
|
+
exports.ResponseOutputTextAnnotationAddedStreamEventType = {
|
|
49
|
+
ResponseOutputTextAnnotationAdded: "response.output_text.annotation.added",
|
|
50
|
+
};
|
|
51
|
+
/** @internal */
|
|
52
|
+
exports.ResponseOutputTextAnnotationAddedStreamEventType$inboundSchema = z
|
|
53
|
+
.nativeEnum(exports.ResponseOutputTextAnnotationAddedStreamEventType);
|
|
54
|
+
/** @internal */
|
|
55
|
+
exports.ResponseOutputTextAnnotationAddedStreamEventData$inboundSchema = (0, schemas_js_1.collectExtraKeys)(z.object({
|
|
56
|
+
annotation: z.record(z.any()),
|
|
57
|
+
annotation_index: z.number().int(),
|
|
58
|
+
content_index: z.number().int(),
|
|
59
|
+
item_id: z.string(),
|
|
60
|
+
output_index: z.number().int(),
|
|
61
|
+
sequence_number: z.number().int(),
|
|
62
|
+
type: exports.ResponseOutputTextAnnotationAddedStreamEventType$inboundSchema,
|
|
63
|
+
}).catchall(z.any()), "additionalProperties", true).transform((v) => {
|
|
64
|
+
return (0, primitives_js_1.remap)(v, {
|
|
65
|
+
"annotation_index": "annotationIndex",
|
|
66
|
+
"content_index": "contentIndex",
|
|
67
|
+
"item_id": "itemId",
|
|
68
|
+
"output_index": "outputIndex",
|
|
69
|
+
"sequence_number": "sequenceNumber",
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
|
+
function responseOutputTextAnnotationAddedStreamEventDataFromJSON(jsonString) {
|
|
73
|
+
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ResponseOutputTextAnnotationAddedStreamEventData$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResponseOutputTextAnnotationAddedStreamEventData' from JSON`);
|
|
74
|
+
}
|
|
75
|
+
/** @internal */
|
|
76
|
+
exports.ResponseOutputTextAnnotationAddedStreamEvent$inboundSchema = z.object({
|
|
77
|
+
data: z.unknown().transform((v, ctx) => {
|
|
78
|
+
if (typeof v !== "string")
|
|
79
|
+
return v;
|
|
80
|
+
try {
|
|
81
|
+
return JSON.parse(v);
|
|
82
|
+
}
|
|
83
|
+
catch (err) {
|
|
84
|
+
ctx.addIssue({ code: "custom", message: `malformed json: ${err}` });
|
|
85
|
+
return z.NEVER;
|
|
86
|
+
}
|
|
87
|
+
}).pipe(z.lazy(() => exports.ResponseOutputTextAnnotationAddedStreamEventData$inboundSchema)),
|
|
88
|
+
event: z.literal("response.output_text.annotation.added"),
|
|
89
|
+
});
|
|
90
|
+
function responseOutputTextAnnotationAddedStreamEventFromJSON(jsonString) {
|
|
91
|
+
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ResponseOutputTextAnnotationAddedStreamEvent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResponseOutputTextAnnotationAddedStreamEvent' from JSON`);
|
|
92
|
+
}
|
|
93
|
+
//# sourceMappingURL=responseoutputtextannotationaddedstreamevent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"responseoutputtextannotationaddedstreamevent.js","sourceRoot":"","sources":["../../src/models/components/responseoutputtextannotationaddedstreamevent.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwGH,4HAcC;AAyBD,oHAcC;AA3JD,0CAA4B;AAC5B,2DAA0D;AAC1D,qDAG8B;AAK9B;;GAEG;AACU,QAAA,gDAAgD,GAAG;IAC9D,iCAAiC,EAAE,uCAAuC;CAClE,CAAC;AAsDX,gBAAgB;AACH,QAAA,8DAA8D,GACE,CAAC;KACzE,UAAU,CAAC,wDAAgD,CAAC,CAAC;AAElE,gBAAgB;AACH,QAAA,8DAA8D,GAKrE,IAAA,6BAAiB,EACnB,CAAC,CAAC,MAAM,CAAC;IACP,UAAU,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC;IAC7B,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;IAClC,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;IAC/B,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,YAAY,EAA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AC,IAAI,CAAC,GAAG,EAAE,CACV,sEAA8D,CAC/D,CACF;IACD,KAAK,EAAE,CAAC,CAAC,OAAO,CAAC,uCAAuC,CAAC;CAC1D,CAAC,CAAC;AAEL,SAAgB,oDAAoD,CAClE,UAAkB;IAKlB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CACJ,kEAA0D,CAAC,KAAK,CAC9D,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CACd,EACH,0EAA0E,CAC3E,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import * as z from "zod/v3";
|
|
2
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
3
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
4
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
5
|
+
/**
|
|
6
|
+
* The event type. Matches the SSE `event` field.
|
|
7
|
+
*/
|
|
8
|
+
export declare const ResponseOutputTextDeltaStreamEventType: {
|
|
9
|
+
readonly ResponseOutputTextDelta: "response.output_text.delta";
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* The event type. Matches the SSE `event` field.
|
|
13
|
+
*/
|
|
14
|
+
export type ResponseOutputTextDeltaStreamEventType = ClosedEnum<typeof ResponseOutputTextDeltaStreamEventType>;
|
|
15
|
+
/**
|
|
16
|
+
* The event payload.
|
|
17
|
+
*/
|
|
18
|
+
export type ResponseOutputTextDeltaStreamEventData = {
|
|
19
|
+
/**
|
|
20
|
+
* Index of the content part within the output item.
|
|
21
|
+
*/
|
|
22
|
+
contentIndex: number;
|
|
23
|
+
/**
|
|
24
|
+
* Incremental text or argument chunk.
|
|
25
|
+
*/
|
|
26
|
+
delta: string;
|
|
27
|
+
/**
|
|
28
|
+
* ID of the output item this event refers to.
|
|
29
|
+
*/
|
|
30
|
+
itemId: string;
|
|
31
|
+
/**
|
|
32
|
+
* Log probability information for the emitted tokens.
|
|
33
|
+
*/
|
|
34
|
+
logprobs: Array<{
|
|
35
|
+
[k: string]: any;
|
|
36
|
+
}>;
|
|
37
|
+
/**
|
|
38
|
+
* Obfuscation padding accompanying the delta, when present.
|
|
39
|
+
*/
|
|
40
|
+
obfuscation?: string | undefined;
|
|
41
|
+
/**
|
|
42
|
+
* Index of the output item in the response output array.
|
|
43
|
+
*/
|
|
44
|
+
outputIndex: number;
|
|
45
|
+
/**
|
|
46
|
+
* Monotonically increasing sequence number for ordering events.
|
|
47
|
+
*/
|
|
48
|
+
sequenceNumber: number;
|
|
49
|
+
/**
|
|
50
|
+
* The event type. Matches the SSE `event` field.
|
|
51
|
+
*/
|
|
52
|
+
type: ResponseOutputTextDeltaStreamEventType;
|
|
53
|
+
additionalProperties?: {
|
|
54
|
+
[k: string]: any;
|
|
55
|
+
} | undefined;
|
|
56
|
+
};
|
|
57
|
+
export type ResponseOutputTextDeltaStreamEvent = {
|
|
58
|
+
/**
|
|
59
|
+
* The event payload.
|
|
60
|
+
*/
|
|
61
|
+
data: ResponseOutputTextDeltaStreamEventData;
|
|
62
|
+
/**
|
|
63
|
+
* The SSE event name, equal to the payload's `type`.
|
|
64
|
+
*/
|
|
65
|
+
event: "response.output_text.delta";
|
|
66
|
+
};
|
|
67
|
+
/** @internal */
|
|
68
|
+
export declare const ResponseOutputTextDeltaStreamEventType$inboundSchema: z.ZodNativeEnum<typeof ResponseOutputTextDeltaStreamEventType>;
|
|
69
|
+
/** @internal */
|
|
70
|
+
export declare const ResponseOutputTextDeltaStreamEventData$inboundSchema: z.ZodType<ResponseOutputTextDeltaStreamEventData, z.ZodTypeDef, unknown>;
|
|
71
|
+
export declare function responseOutputTextDeltaStreamEventDataFromJSON(jsonString: string): SafeParseResult<ResponseOutputTextDeltaStreamEventData, SDKValidationError>;
|
|
72
|
+
/** @internal */
|
|
73
|
+
export declare const ResponseOutputTextDeltaStreamEvent$inboundSchema: z.ZodType<ResponseOutputTextDeltaStreamEvent, z.ZodTypeDef, unknown>;
|
|
74
|
+
export declare function responseOutputTextDeltaStreamEventFromJSON(jsonString: string): SafeParseResult<ResponseOutputTextDeltaStreamEvent, SDKValidationError>;
|
|
75
|
+
//# sourceMappingURL=responseoutputtextdeltastreamevent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"responseoutputtextdeltastreamevent.d.ts","sourceRoot":"","sources":["../../src/models/components/responseoutputtextdeltastreamevent.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAM5B,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE;;GAEG;AACH,eAAO,MAAM,sCAAsC;;CAEzC,CAAC;AACX;;GAEG;AACH,MAAM,MAAM,sCAAsC,GAAG,UAAU,CAC7D,OAAO,sCAAsC,CAC9C,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,sCAAsC,GAAG;IACnD;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC;QAAE,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC,CAAC;IACtC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,IAAI,EAAE,sCAAsC,CAAC;IAC7C,oBAAoB,CAAC,EAAE;QAAE,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,GAAG,SAAS,CAAC;CACzD,CAAC;AAEF,MAAM,MAAM,kCAAkC,GAAG;IAC/C;;OAEG;IACH,IAAI,EAAE,sCAAsC,CAAC;IAC7C;;OAEG;IACH,KAAK,EAAE,4BAA4B,CAAC;CACrC,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,oDAAoD,EAC/D,CAAC,CAAC,aAAa,CAAC,OAAO,sCAAsC,CAE5D,CAAC;AAEJ,gBAAgB;AAChB,eAAO,MAAM,oDAAoD,EAAE,CAAC,CAAC,OAAO,CAC1E,sCAAsC,EACtC,CAAC,CAAC,UAAU,EACZ,OAAO,CAqBP,CAAC;AAEH,wBAAgB,8CAA8C,CAC5D,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,sCAAsC,EAAE,kBAAkB,CAAC,CAO7E;AAED,gBAAgB;AAChB,eAAO,MAAM,gDAAgD,EAAE,CAAC,CAAC,OAAO,CACtE,kCAAkC,EAClC,CAAC,CAAC,UAAU,EACZ,OAAO,CAYP,CAAC;AAEH,wBAAgB,0CAA0C,CACxD,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,kCAAkC,EAAE,kBAAkB,CAAC,CAOzE"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.ResponseOutputTextDeltaStreamEvent$inboundSchema = exports.ResponseOutputTextDeltaStreamEventData$inboundSchema = exports.ResponseOutputTextDeltaStreamEventType$inboundSchema = exports.ResponseOutputTextDeltaStreamEventType = void 0;
|
|
40
|
+
exports.responseOutputTextDeltaStreamEventDataFromJSON = responseOutputTextDeltaStreamEventDataFromJSON;
|
|
41
|
+
exports.responseOutputTextDeltaStreamEventFromJSON = responseOutputTextDeltaStreamEventFromJSON;
|
|
42
|
+
const z = __importStar(require("zod/v3"));
|
|
43
|
+
const primitives_js_1 = require("../../lib/primitives.js");
|
|
44
|
+
const schemas_js_1 = require("../../lib/schemas.js");
|
|
45
|
+
/**
|
|
46
|
+
* The event type. Matches the SSE `event` field.
|
|
47
|
+
*/
|
|
48
|
+
exports.ResponseOutputTextDeltaStreamEventType = {
|
|
49
|
+
ResponseOutputTextDelta: "response.output_text.delta",
|
|
50
|
+
};
|
|
51
|
+
/** @internal */
|
|
52
|
+
exports.ResponseOutputTextDeltaStreamEventType$inboundSchema = z.nativeEnum(exports.ResponseOutputTextDeltaStreamEventType);
|
|
53
|
+
/** @internal */
|
|
54
|
+
exports.ResponseOutputTextDeltaStreamEventData$inboundSchema = (0, schemas_js_1.collectExtraKeys)(z.object({
|
|
55
|
+
content_index: z.number().int(),
|
|
56
|
+
delta: z.string(),
|
|
57
|
+
item_id: z.string(),
|
|
58
|
+
logprobs: z.array(z.record(z.any())),
|
|
59
|
+
obfuscation: z.string().optional(),
|
|
60
|
+
output_index: z.number().int(),
|
|
61
|
+
sequence_number: z.number().int(),
|
|
62
|
+
type: exports.ResponseOutputTextDeltaStreamEventType$inboundSchema,
|
|
63
|
+
}).catchall(z.any()), "additionalProperties", true).transform((v) => {
|
|
64
|
+
return (0, primitives_js_1.remap)(v, {
|
|
65
|
+
"content_index": "contentIndex",
|
|
66
|
+
"item_id": "itemId",
|
|
67
|
+
"output_index": "outputIndex",
|
|
68
|
+
"sequence_number": "sequenceNumber",
|
|
69
|
+
});
|
|
70
|
+
});
|
|
71
|
+
function responseOutputTextDeltaStreamEventDataFromJSON(jsonString) {
|
|
72
|
+
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ResponseOutputTextDeltaStreamEventData$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResponseOutputTextDeltaStreamEventData' from JSON`);
|
|
73
|
+
}
|
|
74
|
+
/** @internal */
|
|
75
|
+
exports.ResponseOutputTextDeltaStreamEvent$inboundSchema = z.object({
|
|
76
|
+
data: z.unknown().transform((v, ctx) => {
|
|
77
|
+
if (typeof v !== "string")
|
|
78
|
+
return v;
|
|
79
|
+
try {
|
|
80
|
+
return JSON.parse(v);
|
|
81
|
+
}
|
|
82
|
+
catch (err) {
|
|
83
|
+
ctx.addIssue({ code: "custom", message: `malformed json: ${err}` });
|
|
84
|
+
return z.NEVER;
|
|
85
|
+
}
|
|
86
|
+
}).pipe(z.lazy(() => exports.ResponseOutputTextDeltaStreamEventData$inboundSchema)),
|
|
87
|
+
event: z.literal("response.output_text.delta"),
|
|
88
|
+
});
|
|
89
|
+
function responseOutputTextDeltaStreamEventFromJSON(jsonString) {
|
|
90
|
+
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ResponseOutputTextDeltaStreamEvent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResponseOutputTextDeltaStreamEvent' from JSON`);
|
|
91
|
+
}
|
|
92
|
+
//# sourceMappingURL=responseoutputtextdeltastreamevent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"responseoutputtextdeltastreamevent.js","sourceRoot":"","sources":["../../src/models/components/responseoutputtextdeltastreamevent.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4GH,wGASC;AAoBD,gGASC;AAhJD,0CAA4B;AAC5B,2DAA0D;AAC1D,qDAG8B;AAK9B;;GAEG;AACU,QAAA,sCAAsC,GAAG;IACpD,uBAAuB,EAAE,4BAA4B;CAC7C,CAAC;AA0DX,gBAAgB;AACH,QAAA,oDAAoD,GACE,CAAC,CAAC,UAAU,CAC3E,8CAAsC,CACvC,CAAC;AAEJ,gBAAgB;AACH,QAAA,oDAAoD,GAI7D,IAAA,6BAAiB,EACnB,CAAC,CAAC,MAAM,CAAC;IACP,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;IAC/B,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;IACpC,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClC,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GA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E,KAAK,EAAE,CAAC,CAAC,OAAO,CAAC,4BAA4B,CAAC;CAC/C,CAAC,CAAC;AAEH,SAAgB,0CAA0C,CACxD,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CACJ,wDAAgD,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACvE,gEAAgE,CACjE,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import * as z from "zod/v3";
|
|
2
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
3
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
4
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
5
|
+
/**
|
|
6
|
+
* The event type. Matches the SSE `event` field.
|
|
7
|
+
*/
|
|
8
|
+
export declare const ResponseOutputTextDoneStreamEventType: {
|
|
9
|
+
readonly ResponseOutputTextDone: "response.output_text.done";
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* The event type. Matches the SSE `event` field.
|
|
13
|
+
*/
|
|
14
|
+
export type ResponseOutputTextDoneStreamEventType = ClosedEnum<typeof ResponseOutputTextDoneStreamEventType>;
|
|
15
|
+
/**
|
|
16
|
+
* The event payload.
|
|
17
|
+
*/
|
|
18
|
+
export type ResponseOutputTextDoneStreamEventData = {
|
|
19
|
+
/**
|
|
20
|
+
* Index of the content part within the output item.
|
|
21
|
+
*/
|
|
22
|
+
contentIndex: number;
|
|
23
|
+
/**
|
|
24
|
+
* ID of the output item this event refers to.
|
|
25
|
+
*/
|
|
26
|
+
itemId: string;
|
|
27
|
+
/**
|
|
28
|
+
* Log probability information for the emitted tokens.
|
|
29
|
+
*/
|
|
30
|
+
logprobs: Array<{
|
|
31
|
+
[k: string]: any;
|
|
32
|
+
}>;
|
|
33
|
+
/**
|
|
34
|
+
* Index of the output item in the response output array.
|
|
35
|
+
*/
|
|
36
|
+
outputIndex: number;
|
|
37
|
+
/**
|
|
38
|
+
* Monotonically increasing sequence number for ordering events.
|
|
39
|
+
*/
|
|
40
|
+
sequenceNumber: number;
|
|
41
|
+
/**
|
|
42
|
+
* The completed output text.
|
|
43
|
+
*/
|
|
44
|
+
text: string;
|
|
45
|
+
/**
|
|
46
|
+
* The event type. Matches the SSE `event` field.
|
|
47
|
+
*/
|
|
48
|
+
type: ResponseOutputTextDoneStreamEventType;
|
|
49
|
+
additionalProperties?: {
|
|
50
|
+
[k: string]: any;
|
|
51
|
+
} | undefined;
|
|
52
|
+
};
|
|
53
|
+
export type ResponseOutputTextDoneStreamEvent = {
|
|
54
|
+
/**
|
|
55
|
+
* The event payload.
|
|
56
|
+
*/
|
|
57
|
+
data: ResponseOutputTextDoneStreamEventData;
|
|
58
|
+
/**
|
|
59
|
+
* The SSE event name, equal to the payload's `type`.
|
|
60
|
+
*/
|
|
61
|
+
event: "response.output_text.done";
|
|
62
|
+
};
|
|
63
|
+
/** @internal */
|
|
64
|
+
export declare const ResponseOutputTextDoneStreamEventType$inboundSchema: z.ZodNativeEnum<typeof ResponseOutputTextDoneStreamEventType>;
|
|
65
|
+
/** @internal */
|
|
66
|
+
export declare const ResponseOutputTextDoneStreamEventData$inboundSchema: z.ZodType<ResponseOutputTextDoneStreamEventData, z.ZodTypeDef, unknown>;
|
|
67
|
+
export declare function responseOutputTextDoneStreamEventDataFromJSON(jsonString: string): SafeParseResult<ResponseOutputTextDoneStreamEventData, SDKValidationError>;
|
|
68
|
+
/** @internal */
|
|
69
|
+
export declare const ResponseOutputTextDoneStreamEvent$inboundSchema: z.ZodType<ResponseOutputTextDoneStreamEvent, z.ZodTypeDef, unknown>;
|
|
70
|
+
export declare function responseOutputTextDoneStreamEventFromJSON(jsonString: string): SafeParseResult<ResponseOutputTextDoneStreamEvent, SDKValidationError>;
|
|
71
|
+
//# sourceMappingURL=responseoutputtextdonestreamevent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"responseoutputtextdonestreamevent.d.ts","sourceRoot":"","sources":["../../src/models/components/responseoutputtextdonestreamevent.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAM5B,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE;;GAEG;AACH,eAAO,MAAM,qCAAqC;;CAExC,CAAC;AACX;;GAEG;AACH,MAAM,MAAM,qCAAqC,GAAG,UAAU,CAC5D,OAAO,qCAAqC,CAC7C,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,qCAAqC,GAAG;IAClD;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC;QAAE,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC,CAAC;IACtC;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,IAAI,EAAE,qCAAqC,CAAC;IAC5C,oBAAoB,CAAC,EAAE;QAAE,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,GAAG,SAAS,CAAC;CACzD,CAAC;AAEF,MAAM,MAAM,iCAAiC,GAAG;IAC9C;;OAEG;IACH,IAAI,EAAE,qCAAqC,CAAC;IAC5C;;OAEG;IACH,KAAK,EAAE,2BAA2B,CAAC;CACpC,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,mDAAmD,EAC9D,CAAC,CAAC,aAAa,CAAC,OAAO,qCAAqC,CAE3D,CAAC;AAEJ,gBAAgB;AAChB,eAAO,MAAM,mDAAmD,EAAE,CAAC,CAAC,OAAO,CACzE,qCAAqC,EACrC,CAAC,CAAC,UAAU,EACZ,OAAO,CAoBP,CAAC;AAEH,wBAAgB,6CAA6C,CAC3D,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,qCAAqC,EAAE,kBAAkB,CAAC,CAO5E;AAED,gBAAgB;AAChB,eAAO,MAAM,+CAA+C,EAAE,CAAC,CAAC,OAAO,CACrE,iCAAiC,EACjC,CAAC,CAAC,UAAU,EACZ,OAAO,CAYP,CAAC;AAEH,wBAAgB,yCAAyC,CACvD,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,iCAAiC,EAAE,kBAAkB,CAAC,CAMxE"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.ResponseOutputTextDoneStreamEvent$inboundSchema = exports.ResponseOutputTextDoneStreamEventData$inboundSchema = exports.ResponseOutputTextDoneStreamEventType$inboundSchema = exports.ResponseOutputTextDoneStreamEventType = void 0;
|
|
40
|
+
exports.responseOutputTextDoneStreamEventDataFromJSON = responseOutputTextDoneStreamEventDataFromJSON;
|
|
41
|
+
exports.responseOutputTextDoneStreamEventFromJSON = responseOutputTextDoneStreamEventFromJSON;
|
|
42
|
+
const z = __importStar(require("zod/v3"));
|
|
43
|
+
const primitives_js_1 = require("../../lib/primitives.js");
|
|
44
|
+
const schemas_js_1 = require("../../lib/schemas.js");
|
|
45
|
+
/**
|
|
46
|
+
* The event type. Matches the SSE `event` field.
|
|
47
|
+
*/
|
|
48
|
+
exports.ResponseOutputTextDoneStreamEventType = {
|
|
49
|
+
ResponseOutputTextDone: "response.output_text.done",
|
|
50
|
+
};
|
|
51
|
+
/** @internal */
|
|
52
|
+
exports.ResponseOutputTextDoneStreamEventType$inboundSchema = z.nativeEnum(exports.ResponseOutputTextDoneStreamEventType);
|
|
53
|
+
/** @internal */
|
|
54
|
+
exports.ResponseOutputTextDoneStreamEventData$inboundSchema = (0, schemas_js_1.collectExtraKeys)(z.object({
|
|
55
|
+
content_index: z.number().int(),
|
|
56
|
+
item_id: z.string(),
|
|
57
|
+
logprobs: z.array(z.record(z.any())),
|
|
58
|
+
output_index: z.number().int(),
|
|
59
|
+
sequence_number: z.number().int(),
|
|
60
|
+
text: z.string(),
|
|
61
|
+
type: exports.ResponseOutputTextDoneStreamEventType$inboundSchema,
|
|
62
|
+
}).catchall(z.any()), "additionalProperties", true).transform((v) => {
|
|
63
|
+
return (0, primitives_js_1.remap)(v, {
|
|
64
|
+
"content_index": "contentIndex",
|
|
65
|
+
"item_id": "itemId",
|
|
66
|
+
"output_index": "outputIndex",
|
|
67
|
+
"sequence_number": "sequenceNumber",
|
|
68
|
+
});
|
|
69
|
+
});
|
|
70
|
+
function responseOutputTextDoneStreamEventDataFromJSON(jsonString) {
|
|
71
|
+
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ResponseOutputTextDoneStreamEventData$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResponseOutputTextDoneStreamEventData' from JSON`);
|
|
72
|
+
}
|
|
73
|
+
/** @internal */
|
|
74
|
+
exports.ResponseOutputTextDoneStreamEvent$inboundSchema = z.object({
|
|
75
|
+
data: z.unknown().transform((v, ctx) => {
|
|
76
|
+
if (typeof v !== "string")
|
|
77
|
+
return v;
|
|
78
|
+
try {
|
|
79
|
+
return JSON.parse(v);
|
|
80
|
+
}
|
|
81
|
+
catch (err) {
|
|
82
|
+
ctx.addIssue({ code: "custom", message: `malformed json: ${err}` });
|
|
83
|
+
return z.NEVER;
|
|
84
|
+
}
|
|
85
|
+
}).pipe(z.lazy(() => exports.ResponseOutputTextDoneStreamEventData$inboundSchema)),
|
|
86
|
+
event: z.literal("response.output_text.done"),
|
|
87
|
+
});
|
|
88
|
+
function responseOutputTextDoneStreamEventFromJSON(jsonString) {
|
|
89
|
+
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ResponseOutputTextDoneStreamEvent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResponseOutputTextDoneStreamEvent' from JSON`);
|
|
90
|
+
}
|
|
91
|
+
//# sourceMappingURL=responseoutputtextdonestreamevent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"responseoutputtextdonestreamevent.js","sourceRoot":"","sources":["../../src/models/components/responseoutputtextdonestreamevent.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuGH,sGASC;AAoBD,8FAQC;AA1ID,0CAA4B;AAC5B,2DAA0D;AAC1D,qDAG8B;AAK9B;;GAEG;AACU,QAAA,qCAAqC,GAAG;IACnD,sBAAsB,EAAE,2BAA2B;CAC3C,CAAC;AAsDX,gBAAgB;AACH,QAAA,mDAAmD,GACE,CAAC,CAAC,UAAU,CAC1E,6CAAqC,CACtC,CAAC;AAEJ,gBAAgB;AACH,QAAA,mDAAmD,GAI5D,IAAA,6BAAiB,EACnB,CAAC,CAAC,MAAM,CAAC;IACP,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;IAC/B,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;IACpC,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;IAC9B,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;IACjC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,IAAI,EAAE,2DAAmD;CAC1D,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,EACpB,sBAAsB,EACtB,IAAI,CACL,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IAChB,OAAO,IAAA,qBAAM,EAAC,CAAC,EAAE;QACf,eAAe,EAAE,cAAc;QAC/B,SAAS,EAAE,QAAQ;QACnB,cAAc,EAAE,aAAa;QAC7B,iBAAiB,EAAE,gBAA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.js";
|
|
3
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
4
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
5
|
+
/**
|
|
6
|
+
* The event type. Matches the SSE `event` field.
|
|
7
|
+
*/
|
|
8
|
+
export declare const ResponseReasoningDeltaStreamEventType: {
|
|
9
|
+
readonly ResponseReasoningDelta: "response.reasoning.delta";
|
|
10
|
+
readonly ResponseReasoningTextDelta: "response.reasoning_text.delta";
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* The event type. Matches the SSE `event` field.
|
|
14
|
+
*/
|
|
15
|
+
export type ResponseReasoningDeltaStreamEventType = ClosedEnum<typeof ResponseReasoningDeltaStreamEventType>;
|
|
16
|
+
/**
|
|
17
|
+
* The event payload.
|
|
18
|
+
*/
|
|
19
|
+
export type ResponseReasoningDeltaStreamEventData = {
|
|
20
|
+
/**
|
|
21
|
+
* Index of the content part within the output item.
|
|
22
|
+
*/
|
|
23
|
+
contentIndex: number;
|
|
24
|
+
/**
|
|
25
|
+
* Incremental text or argument chunk.
|
|
26
|
+
*/
|
|
27
|
+
delta: string;
|
|
28
|
+
/**
|
|
29
|
+
* ID of the output item this event refers to.
|
|
30
|
+
*/
|
|
31
|
+
itemId: string;
|
|
32
|
+
/**
|
|
33
|
+
* Obfuscation padding accompanying the delta, when present.
|
|
34
|
+
*/
|
|
35
|
+
obfuscation?: string | undefined;
|
|
36
|
+
/**
|
|
37
|
+
* Index of the output item in the response output array.
|
|
38
|
+
*/
|
|
39
|
+
outputIndex: number;
|
|
40
|
+
/**
|
|
41
|
+
* Monotonically increasing sequence number for ordering events.
|
|
42
|
+
*/
|
|
43
|
+
sequenceNumber: number;
|
|
44
|
+
/**
|
|
45
|
+
* The event type. Matches the SSE `event` field.
|
|
46
|
+
*/
|
|
47
|
+
type: ResponseReasoningDeltaStreamEventType;
|
|
48
|
+
additionalProperties?: {
|
|
49
|
+
[k: string]: any;
|
|
50
|
+
} | undefined;
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* The SSE event name, equal to the payload's `type`.
|
|
54
|
+
*/
|
|
55
|
+
export declare const ResponseReasoningDeltaStreamEventEvent: {
|
|
56
|
+
readonly ResponseReasoningDelta: "response.reasoning.delta";
|
|
57
|
+
readonly ResponseReasoningTextDelta: "response.reasoning_text.delta";
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* The SSE event name, equal to the payload's `type`.
|
|
61
|
+
*/
|
|
62
|
+
export type ResponseReasoningDeltaStreamEventEvent = ClosedEnum<typeof ResponseReasoningDeltaStreamEventEvent>;
|
|
63
|
+
export type ResponseReasoningDeltaStreamEvent = {
|
|
64
|
+
/**
|
|
65
|
+
* The event payload.
|
|
66
|
+
*/
|
|
67
|
+
data: ResponseReasoningDeltaStreamEventData;
|
|
68
|
+
/**
|
|
69
|
+
* The SSE event name, equal to the payload's `type`.
|
|
70
|
+
*/
|
|
71
|
+
event: ResponseReasoningDeltaStreamEventEvent;
|
|
72
|
+
};
|
|
73
|
+
/** @internal */
|
|
74
|
+
export declare const ResponseReasoningDeltaStreamEventType$inboundSchema: z.ZodNativeEnum<typeof ResponseReasoningDeltaStreamEventType>;
|
|
75
|
+
/** @internal */
|
|
76
|
+
export declare const ResponseReasoningDeltaStreamEventData$inboundSchema: z.ZodType<ResponseReasoningDeltaStreamEventData, z.ZodTypeDef, unknown>;
|
|
77
|
+
export declare function responseReasoningDeltaStreamEventDataFromJSON(jsonString: string): SafeParseResult<ResponseReasoningDeltaStreamEventData, SDKValidationError>;
|
|
78
|
+
/** @internal */
|
|
79
|
+
export declare const ResponseReasoningDeltaStreamEventEvent$inboundSchema: z.ZodNativeEnum<typeof ResponseReasoningDeltaStreamEventEvent>;
|
|
80
|
+
/** @internal */
|
|
81
|
+
export declare const ResponseReasoningDeltaStreamEvent$inboundSchema: z.ZodType<ResponseReasoningDeltaStreamEvent, z.ZodTypeDef, unknown>;
|
|
82
|
+
export declare function responseReasoningDeltaStreamEventFromJSON(jsonString: string): SafeParseResult<ResponseReasoningDeltaStreamEvent, SDKValidationError>;
|
|
83
|
+
//# sourceMappingURL=responsereasoningdeltastreamevent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"responsereasoningdeltastreamevent.d.ts","sourceRoot":"","sources":["../../src/models/components/responsereasoningdeltastreamevent.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAM5B,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE;;GAEG;AACH,eAAO,MAAM,qCAAqC;;;CAGxC,CAAC;AACX;;GAEG;AACH,MAAM,MAAM,qCAAqC,GAAG,UAAU,CAC5D,OAAO,qCAAqC,CAC7C,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,qCAAqC,GAAG;IAClD;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,IAAI,EAAE,qCAAqC,CAAC;IAC5C,oBAAoB,CAAC,EAAE;QAAE,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,GAAG,SAAS,CAAC;CACzD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,sCAAsC;;;CAGzC,CAAC;AACX;;GAEG;AACH,MAAM,MAAM,sCAAsC,GAAG,UAAU,CAC7D,OAAO,sCAAsC,CAC9C,CAAC;AAEF,MAAM,MAAM,iCAAiC,GAAG;IAC9C;;OAEG;IACH,IAAI,EAAE,qCAAqC,CAAC;IAC5C;;OAEG;IACH,KAAK,EAAE,sCAAsC,CAAC;CAC/C,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,mDAAmD,EAC9D,CAAC,CAAC,aAAa,CAAC,OAAO,qCAAqC,CAE3D,CAAC;AAEJ,gBAAgB;AAChB,eAAO,MAAM,mDAAmD,EAAE,CAAC,CAAC,OAAO,CACzE,qCAAqC,EACrC,CAAC,CAAC,UAAU,EACZ,OAAO,CAoBP,CAAC;AAEH,wBAAgB,6CAA6C,CAC3D,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,qCAAqC,EAAE,kBAAkB,CAAC,CAO5E;AAED,gBAAgB;AAChB,eAAO,MAAM,oDAAoD,EAC/D,CAAC,CAAC,aAAa,CAAC,OAAO,sCAAsC,CAE5D,CAAC;AAEJ,gBAAgB;AAChB,eAAO,MAAM,+CAA+C,EAAE,CAAC,CAAC,OAAO,CACrE,iCAAiC,EACjC,CAAC,CAAC,UAAU,EACZ,OAAO,CAYP,CAAC;AAEH,wBAAgB,yCAAyC,CACvD,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,iCAAiC,EAAE,kBAAkB,CAAC,CAMxE"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.ResponseReasoningDeltaStreamEvent$inboundSchema = exports.ResponseReasoningDeltaStreamEventEvent$inboundSchema = exports.ResponseReasoningDeltaStreamEventData$inboundSchema = exports.ResponseReasoningDeltaStreamEventType$inboundSchema = exports.ResponseReasoningDeltaStreamEventEvent = exports.ResponseReasoningDeltaStreamEventType = void 0;
|
|
40
|
+
exports.responseReasoningDeltaStreamEventDataFromJSON = responseReasoningDeltaStreamEventDataFromJSON;
|
|
41
|
+
exports.responseReasoningDeltaStreamEventFromJSON = responseReasoningDeltaStreamEventFromJSON;
|
|
42
|
+
const z = __importStar(require("zod/v3"));
|
|
43
|
+
const primitives_js_1 = require("../../lib/primitives.js");
|
|
44
|
+
const schemas_js_1 = require("../../lib/schemas.js");
|
|
45
|
+
/**
|
|
46
|
+
* The event type. Matches the SSE `event` field.
|
|
47
|
+
*/
|
|
48
|
+
exports.ResponseReasoningDeltaStreamEventType = {
|
|
49
|
+
ResponseReasoningDelta: "response.reasoning.delta",
|
|
50
|
+
ResponseReasoningTextDelta: "response.reasoning_text.delta",
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* The SSE event name, equal to the payload's `type`.
|
|
54
|
+
*/
|
|
55
|
+
exports.ResponseReasoningDeltaStreamEventEvent = {
|
|
56
|
+
ResponseReasoningDelta: "response.reasoning.delta",
|
|
57
|
+
ResponseReasoningTextDelta: "response.reasoning_text.delta",
|
|
58
|
+
};
|
|
59
|
+
/** @internal */
|
|
60
|
+
exports.ResponseReasoningDeltaStreamEventType$inboundSchema = z.nativeEnum(exports.ResponseReasoningDeltaStreamEventType);
|
|
61
|
+
/** @internal */
|
|
62
|
+
exports.ResponseReasoningDeltaStreamEventData$inboundSchema = (0, schemas_js_1.collectExtraKeys)(z.object({
|
|
63
|
+
content_index: z.number().int(),
|
|
64
|
+
delta: z.string(),
|
|
65
|
+
item_id: z.string(),
|
|
66
|
+
obfuscation: z.string().optional(),
|
|
67
|
+
output_index: z.number().int(),
|
|
68
|
+
sequence_number: z.number().int(),
|
|
69
|
+
type: exports.ResponseReasoningDeltaStreamEventType$inboundSchema,
|
|
70
|
+
}).catchall(z.any()), "additionalProperties", true).transform((v) => {
|
|
71
|
+
return (0, primitives_js_1.remap)(v, {
|
|
72
|
+
"content_index": "contentIndex",
|
|
73
|
+
"item_id": "itemId",
|
|
74
|
+
"output_index": "outputIndex",
|
|
75
|
+
"sequence_number": "sequenceNumber",
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
function responseReasoningDeltaStreamEventDataFromJSON(jsonString) {
|
|
79
|
+
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ResponseReasoningDeltaStreamEventData$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResponseReasoningDeltaStreamEventData' from JSON`);
|
|
80
|
+
}
|
|
81
|
+
/** @internal */
|
|
82
|
+
exports.ResponseReasoningDeltaStreamEventEvent$inboundSchema = z.nativeEnum(exports.ResponseReasoningDeltaStreamEventEvent);
|
|
83
|
+
/** @internal */
|
|
84
|
+
exports.ResponseReasoningDeltaStreamEvent$inboundSchema = z.object({
|
|
85
|
+
data: z.unknown().transform((v, ctx) => {
|
|
86
|
+
if (typeof v !== "string")
|
|
87
|
+
return v;
|
|
88
|
+
try {
|
|
89
|
+
return JSON.parse(v);
|
|
90
|
+
}
|
|
91
|
+
catch (err) {
|
|
92
|
+
ctx.addIssue({ code: "custom", message: `malformed json: ${err}` });
|
|
93
|
+
return z.NEVER;
|
|
94
|
+
}
|
|
95
|
+
}).pipe(z.lazy(() => exports.ResponseReasoningDeltaStreamEventData$inboundSchema)),
|
|
96
|
+
event: exports.ResponseReasoningDeltaStreamEventEvent$inboundSchema,
|
|
97
|
+
});
|
|
98
|
+
function responseReasoningDeltaStreamEventFromJSON(jsonString) {
|
|
99
|
+
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ResponseReasoningDeltaStreamEvent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResponseReasoningDeltaStreamEvent' from JSON`);
|
|
100
|
+
}
|
|
101
|
+
//# sourceMappingURL=responsereasoningdeltastreamevent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"responsereasoningdeltastreamevent.js","sourceRoot":"","sources":["../../src/models/components/responsereasoningdeltastreamevent.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsHH,sGASC;AA0BD,8FAQC;AA/JD,0CAA4B;AAC5B,2DAA0D;AAC1D,qDAG8B;AAK9B;;GAEG;AACU,QAAA,qCAAqC,GAAG;IACnD,sBAAsB,EAAE,0BAA0B;IAClD,0BAA0B,EAAE,+BAA+B;CACnD,CAAC;AA2CX;;GAEG;AAC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