@orq-ai/node 4.11.0-rc.5 → 4.11.0-rc.7
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 +3 -3
- package/lib/config.js +3 -3
- 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/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/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/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/createrouterresponse.d.ts +127 -57
- package/models/operations/createrouterresponse.d.ts.map +1 -1
- package/models/operations/createrouterresponse.js +142 -61
- package/models/operations/createrouterresponse.js.map +1 -1
- package/models/operations/createtool.js +6 -6
- package/models/operations/getalltools.js +6 -6
- package/models/operations/getevals.js +16 -16
- package/models/operations/getv2humanevalsets.js +2 -2
- package/models/operations/getv2humanevalsetsid.js +2 -2
- package/models/operations/listdatasetdatapoints.js +4 -4
- package/models/operations/listdatasets.js +1 -1
- package/models/operations/listdatasources.js +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/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.js +1 -1
- package/models/operations/streamrunagent.js +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/updatetool.js +7 -7
- package/package.json +5 -5
- package/sdk/feedback.d.ts +1 -1
- package/sdk/feedback.js +1 -1
- package/src/lib/config.ts +3 -3
- package/src/models/components/index.ts +23 -0
- package/src/models/components/publicresponseresource.ts +196 -0
- 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/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/createrouterresponse.ts +468 -101
- package/src/models/operations/createtool.ts +6 -6
- package/src/models/operations/getalltools.ts +6 -6
- package/src/models/operations/getevals.ts +16 -16
- package/src/models/operations/getv2humanevalsets.ts +2 -2
- package/src/models/operations/getv2humanevalsetsid.ts +2 -2
- 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/patchv2humanevalsetsid.ts +2 -2
- package/src/models/operations/postv2feedbackevaluation.ts +3 -3
- package/src/models/operations/postv2humanevalsets.ts +2 -2
- 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 +1 -1
- package/src/models/operations/streamrunagent.ts +1 -1
- 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/updatetool.ts +7 -7
- package/src/sdk/feedback.ts +1 -1
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import {
|
|
8
|
+
collectExtraKeys as collectExtraKeys$,
|
|
9
|
+
safeParse,
|
|
10
|
+
} from "../../lib/schemas.js";
|
|
11
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
12
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
13
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* The event type. Matches the SSE `event` field.
|
|
17
|
+
*/
|
|
18
|
+
export const ResponseOutputTextDoneStreamEventType = {
|
|
19
|
+
ResponseOutputTextDone: "response.output_text.done",
|
|
20
|
+
} as const;
|
|
21
|
+
/**
|
|
22
|
+
* The event type. Matches the SSE `event` field.
|
|
23
|
+
*/
|
|
24
|
+
export type ResponseOutputTextDoneStreamEventType = ClosedEnum<
|
|
25
|
+
typeof ResponseOutputTextDoneStreamEventType
|
|
26
|
+
>;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* The event payload.
|
|
30
|
+
*/
|
|
31
|
+
export type ResponseOutputTextDoneStreamEventData = {
|
|
32
|
+
/**
|
|
33
|
+
* Index of the content part within the output item.
|
|
34
|
+
*/
|
|
35
|
+
contentIndex: number;
|
|
36
|
+
/**
|
|
37
|
+
* ID of the output item this event refers to.
|
|
38
|
+
*/
|
|
39
|
+
itemId: string;
|
|
40
|
+
/**
|
|
41
|
+
* Log probability information for the emitted tokens.
|
|
42
|
+
*/
|
|
43
|
+
logprobs: Array<{ [k: string]: any }>;
|
|
44
|
+
/**
|
|
45
|
+
* Index of the output item in the response output array.
|
|
46
|
+
*/
|
|
47
|
+
outputIndex: number;
|
|
48
|
+
/**
|
|
49
|
+
* Monotonically increasing sequence number for ordering events.
|
|
50
|
+
*/
|
|
51
|
+
sequenceNumber: number;
|
|
52
|
+
/**
|
|
53
|
+
* The completed output text.
|
|
54
|
+
*/
|
|
55
|
+
text: string;
|
|
56
|
+
/**
|
|
57
|
+
* The event type. Matches the SSE `event` field.
|
|
58
|
+
*/
|
|
59
|
+
type: ResponseOutputTextDoneStreamEventType;
|
|
60
|
+
additionalProperties?: { [k: string]: any } | undefined;
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
export type ResponseOutputTextDoneStreamEvent = {
|
|
64
|
+
/**
|
|
65
|
+
* The event payload.
|
|
66
|
+
*/
|
|
67
|
+
data: ResponseOutputTextDoneStreamEventData;
|
|
68
|
+
/**
|
|
69
|
+
* The SSE event name, equal to the payload's `type`.
|
|
70
|
+
*/
|
|
71
|
+
event: "response.output_text.done";
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
/** @internal */
|
|
75
|
+
export const ResponseOutputTextDoneStreamEventType$inboundSchema:
|
|
76
|
+
z.ZodNativeEnum<typeof ResponseOutputTextDoneStreamEventType> = z.nativeEnum(
|
|
77
|
+
ResponseOutputTextDoneStreamEventType,
|
|
78
|
+
);
|
|
79
|
+
|
|
80
|
+
/** @internal */
|
|
81
|
+
export const ResponseOutputTextDoneStreamEventData$inboundSchema: z.ZodType<
|
|
82
|
+
ResponseOutputTextDoneStreamEventData,
|
|
83
|
+
z.ZodTypeDef,
|
|
84
|
+
unknown
|
|
85
|
+
> = collectExtraKeys$(
|
|
86
|
+
z.object({
|
|
87
|
+
content_index: z.number().int(),
|
|
88
|
+
item_id: z.string(),
|
|
89
|
+
logprobs: z.array(z.record(z.any())),
|
|
90
|
+
output_index: z.number().int(),
|
|
91
|
+
sequence_number: z.number().int(),
|
|
92
|
+
text: z.string(),
|
|
93
|
+
type: ResponseOutputTextDoneStreamEventType$inboundSchema,
|
|
94
|
+
}).catchall(z.any()),
|
|
95
|
+
"additionalProperties",
|
|
96
|
+
true,
|
|
97
|
+
).transform((v) => {
|
|
98
|
+
return remap$(v, {
|
|
99
|
+
"content_index": "contentIndex",
|
|
100
|
+
"item_id": "itemId",
|
|
101
|
+
"output_index": "outputIndex",
|
|
102
|
+
"sequence_number": "sequenceNumber",
|
|
103
|
+
});
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
export function responseOutputTextDoneStreamEventDataFromJSON(
|
|
107
|
+
jsonString: string,
|
|
108
|
+
): SafeParseResult<ResponseOutputTextDoneStreamEventData, SDKValidationError> {
|
|
109
|
+
return safeParse(
|
|
110
|
+
jsonString,
|
|
111
|
+
(x) =>
|
|
112
|
+
ResponseOutputTextDoneStreamEventData$inboundSchema.parse(JSON.parse(x)),
|
|
113
|
+
`Failed to parse 'ResponseOutputTextDoneStreamEventData' from JSON`,
|
|
114
|
+
);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/** @internal */
|
|
118
|
+
export const ResponseOutputTextDoneStreamEvent$inboundSchema: z.ZodType<
|
|
119
|
+
ResponseOutputTextDoneStreamEvent,
|
|
120
|
+
z.ZodTypeDef,
|
|
121
|
+
unknown
|
|
122
|
+
> = z.object({
|
|
123
|
+
data: z.unknown().transform((v, ctx) => {
|
|
124
|
+
if (typeof v !== "string") return v;
|
|
125
|
+
try {
|
|
126
|
+
return JSON.parse(v);
|
|
127
|
+
} catch (err) {
|
|
128
|
+
ctx.addIssue({ code: "custom", message: `malformed json: ${err}` });
|
|
129
|
+
return z.NEVER;
|
|
130
|
+
}
|
|
131
|
+
}).pipe(z.lazy(() => ResponseOutputTextDoneStreamEventData$inboundSchema)),
|
|
132
|
+
event: z.literal("response.output_text.done"),
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
export function responseOutputTextDoneStreamEventFromJSON(
|
|
136
|
+
jsonString: string,
|
|
137
|
+
): SafeParseResult<ResponseOutputTextDoneStreamEvent, SDKValidationError> {
|
|
138
|
+
return safeParse(
|
|
139
|
+
jsonString,
|
|
140
|
+
(x) => ResponseOutputTextDoneStreamEvent$inboundSchema.parse(JSON.parse(x)),
|
|
141
|
+
`Failed to parse 'ResponseOutputTextDoneStreamEvent' from JSON`,
|
|
142
|
+
);
|
|
143
|
+
}
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import {
|
|
8
|
+
collectExtraKeys as collectExtraKeys$,
|
|
9
|
+
safeParse,
|
|
10
|
+
} from "../../lib/schemas.js";
|
|
11
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
12
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
13
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* The event type. Matches the SSE `event` field.
|
|
17
|
+
*/
|
|
18
|
+
export const ResponseReasoningDeltaStreamEventType = {
|
|
19
|
+
ResponseReasoningDelta: "response.reasoning.delta",
|
|
20
|
+
ResponseReasoningTextDelta: "response.reasoning_text.delta",
|
|
21
|
+
} as const;
|
|
22
|
+
/**
|
|
23
|
+
* The event type. Matches the SSE `event` field.
|
|
24
|
+
*/
|
|
25
|
+
export type ResponseReasoningDeltaStreamEventType = ClosedEnum<
|
|
26
|
+
typeof ResponseReasoningDeltaStreamEventType
|
|
27
|
+
>;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* The event payload.
|
|
31
|
+
*/
|
|
32
|
+
export type ResponseReasoningDeltaStreamEventData = {
|
|
33
|
+
/**
|
|
34
|
+
* Index of the content part within the output item.
|
|
35
|
+
*/
|
|
36
|
+
contentIndex: number;
|
|
37
|
+
/**
|
|
38
|
+
* Incremental text or argument chunk.
|
|
39
|
+
*/
|
|
40
|
+
delta: string;
|
|
41
|
+
/**
|
|
42
|
+
* ID of the output item this event refers to.
|
|
43
|
+
*/
|
|
44
|
+
itemId: string;
|
|
45
|
+
/**
|
|
46
|
+
* Obfuscation padding accompanying the delta, when present.
|
|
47
|
+
*/
|
|
48
|
+
obfuscation?: string | undefined;
|
|
49
|
+
/**
|
|
50
|
+
* Index of the output item in the response output array.
|
|
51
|
+
*/
|
|
52
|
+
outputIndex: number;
|
|
53
|
+
/**
|
|
54
|
+
* Monotonically increasing sequence number for ordering events.
|
|
55
|
+
*/
|
|
56
|
+
sequenceNumber: number;
|
|
57
|
+
/**
|
|
58
|
+
* The event type. Matches the SSE `event` field.
|
|
59
|
+
*/
|
|
60
|
+
type: ResponseReasoningDeltaStreamEventType;
|
|
61
|
+
additionalProperties?: { [k: string]: any } | undefined;
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* The SSE event name, equal to the payload's `type`.
|
|
66
|
+
*/
|
|
67
|
+
export const ResponseReasoningDeltaStreamEventEvent = {
|
|
68
|
+
ResponseReasoningDelta: "response.reasoning.delta",
|
|
69
|
+
ResponseReasoningTextDelta: "response.reasoning_text.delta",
|
|
70
|
+
} as const;
|
|
71
|
+
/**
|
|
72
|
+
* The SSE event name, equal to the payload's `type`.
|
|
73
|
+
*/
|
|
74
|
+
export type ResponseReasoningDeltaStreamEventEvent = ClosedEnum<
|
|
75
|
+
typeof ResponseReasoningDeltaStreamEventEvent
|
|
76
|
+
>;
|
|
77
|
+
|
|
78
|
+
export type ResponseReasoningDeltaStreamEvent = {
|
|
79
|
+
/**
|
|
80
|
+
* The event payload.
|
|
81
|
+
*/
|
|
82
|
+
data: ResponseReasoningDeltaStreamEventData;
|
|
83
|
+
/**
|
|
84
|
+
* The SSE event name, equal to the payload's `type`.
|
|
85
|
+
*/
|
|
86
|
+
event: ResponseReasoningDeltaStreamEventEvent;
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
/** @internal */
|
|
90
|
+
export const ResponseReasoningDeltaStreamEventType$inboundSchema:
|
|
91
|
+
z.ZodNativeEnum<typeof ResponseReasoningDeltaStreamEventType> = z.nativeEnum(
|
|
92
|
+
ResponseReasoningDeltaStreamEventType,
|
|
93
|
+
);
|
|
94
|
+
|
|
95
|
+
/** @internal */
|
|
96
|
+
export const ResponseReasoningDeltaStreamEventData$inboundSchema: z.ZodType<
|
|
97
|
+
ResponseReasoningDeltaStreamEventData,
|
|
98
|
+
z.ZodTypeDef,
|
|
99
|
+
unknown
|
|
100
|
+
> = collectExtraKeys$(
|
|
101
|
+
z.object({
|
|
102
|
+
content_index: z.number().int(),
|
|
103
|
+
delta: z.string(),
|
|
104
|
+
item_id: z.string(),
|
|
105
|
+
obfuscation: z.string().optional(),
|
|
106
|
+
output_index: z.number().int(),
|
|
107
|
+
sequence_number: z.number().int(),
|
|
108
|
+
type: ResponseReasoningDeltaStreamEventType$inboundSchema,
|
|
109
|
+
}).catchall(z.any()),
|
|
110
|
+
"additionalProperties",
|
|
111
|
+
true,
|
|
112
|
+
).transform((v) => {
|
|
113
|
+
return remap$(v, {
|
|
114
|
+
"content_index": "contentIndex",
|
|
115
|
+
"item_id": "itemId",
|
|
116
|
+
"output_index": "outputIndex",
|
|
117
|
+
"sequence_number": "sequenceNumber",
|
|
118
|
+
});
|
|
119
|
+
});
|
|
120
|
+
|
|
121
|
+
export function responseReasoningDeltaStreamEventDataFromJSON(
|
|
122
|
+
jsonString: string,
|
|
123
|
+
): SafeParseResult<ResponseReasoningDeltaStreamEventData, SDKValidationError> {
|
|
124
|
+
return safeParse(
|
|
125
|
+
jsonString,
|
|
126
|
+
(x) =>
|
|
127
|
+
ResponseReasoningDeltaStreamEventData$inboundSchema.parse(JSON.parse(x)),
|
|
128
|
+
`Failed to parse 'ResponseReasoningDeltaStreamEventData' from JSON`,
|
|
129
|
+
);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/** @internal */
|
|
133
|
+
export const ResponseReasoningDeltaStreamEventEvent$inboundSchema:
|
|
134
|
+
z.ZodNativeEnum<typeof ResponseReasoningDeltaStreamEventEvent> = z.nativeEnum(
|
|
135
|
+
ResponseReasoningDeltaStreamEventEvent,
|
|
136
|
+
);
|
|
137
|
+
|
|
138
|
+
/** @internal */
|
|
139
|
+
export const ResponseReasoningDeltaStreamEvent$inboundSchema: z.ZodType<
|
|
140
|
+
ResponseReasoningDeltaStreamEvent,
|
|
141
|
+
z.ZodTypeDef,
|
|
142
|
+
unknown
|
|
143
|
+
> = z.object({
|
|
144
|
+
data: z.unknown().transform((v, ctx) => {
|
|
145
|
+
if (typeof v !== "string") return v;
|
|
146
|
+
try {
|
|
147
|
+
return JSON.parse(v);
|
|
148
|
+
} catch (err) {
|
|
149
|
+
ctx.addIssue({ code: "custom", message: `malformed json: ${err}` });
|
|
150
|
+
return z.NEVER;
|
|
151
|
+
}
|
|
152
|
+
}).pipe(z.lazy(() => ResponseReasoningDeltaStreamEventData$inboundSchema)),
|
|
153
|
+
event: ResponseReasoningDeltaStreamEventEvent$inboundSchema,
|
|
154
|
+
});
|
|
155
|
+
|
|
156
|
+
export function responseReasoningDeltaStreamEventFromJSON(
|
|
157
|
+
jsonString: string,
|
|
158
|
+
): SafeParseResult<ResponseReasoningDeltaStreamEvent, SDKValidationError> {
|
|
159
|
+
return safeParse(
|
|
160
|
+
jsonString,
|
|
161
|
+
(x) => ResponseReasoningDeltaStreamEvent$inboundSchema.parse(JSON.parse(x)),
|
|
162
|
+
`Failed to parse 'ResponseReasoningDeltaStreamEvent' from JSON`,
|
|
163
|
+
);
|
|
164
|
+
}
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import {
|
|
8
|
+
collectExtraKeys as collectExtraKeys$,
|
|
9
|
+
safeParse,
|
|
10
|
+
} from "../../lib/schemas.js";
|
|
11
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
12
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
13
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* The event type. Matches the SSE `event` field.
|
|
17
|
+
*/
|
|
18
|
+
export const ResponseReasoningDoneStreamEventType = {
|
|
19
|
+
ResponseReasoningDone: "response.reasoning.done",
|
|
20
|
+
ResponseReasoningTextDone: "response.reasoning_text.done",
|
|
21
|
+
} as const;
|
|
22
|
+
/**
|
|
23
|
+
* The event type. Matches the SSE `event` field.
|
|
24
|
+
*/
|
|
25
|
+
export type ResponseReasoningDoneStreamEventType = ClosedEnum<
|
|
26
|
+
typeof ResponseReasoningDoneStreamEventType
|
|
27
|
+
>;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* The event payload.
|
|
31
|
+
*/
|
|
32
|
+
export type ResponseReasoningDoneStreamEventData = {
|
|
33
|
+
/**
|
|
34
|
+
* Index of the content part within the output item.
|
|
35
|
+
*/
|
|
36
|
+
contentIndex: number;
|
|
37
|
+
/**
|
|
38
|
+
* ID of the output item this event refers to.
|
|
39
|
+
*/
|
|
40
|
+
itemId: string;
|
|
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 completed reasoning text.
|
|
51
|
+
*/
|
|
52
|
+
text: string;
|
|
53
|
+
/**
|
|
54
|
+
* The event type. Matches the SSE `event` field.
|
|
55
|
+
*/
|
|
56
|
+
type: ResponseReasoningDoneStreamEventType;
|
|
57
|
+
additionalProperties?: { [k: string]: any } | undefined;
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* The SSE event name, equal to the payload's `type`.
|
|
62
|
+
*/
|
|
63
|
+
export const ResponseReasoningDoneStreamEventEvent = {
|
|
64
|
+
ResponseReasoningDone: "response.reasoning.done",
|
|
65
|
+
ResponseReasoningTextDone: "response.reasoning_text.done",
|
|
66
|
+
} as const;
|
|
67
|
+
/**
|
|
68
|
+
* The SSE event name, equal to the payload's `type`.
|
|
69
|
+
*/
|
|
70
|
+
export type ResponseReasoningDoneStreamEventEvent = ClosedEnum<
|
|
71
|
+
typeof ResponseReasoningDoneStreamEventEvent
|
|
72
|
+
>;
|
|
73
|
+
|
|
74
|
+
export type ResponseReasoningDoneStreamEvent = {
|
|
75
|
+
/**
|
|
76
|
+
* The event payload.
|
|
77
|
+
*/
|
|
78
|
+
data: ResponseReasoningDoneStreamEventData;
|
|
79
|
+
/**
|
|
80
|
+
* The SSE event name, equal to the payload's `type`.
|
|
81
|
+
*/
|
|
82
|
+
event: ResponseReasoningDoneStreamEventEvent;
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
/** @internal */
|
|
86
|
+
export const ResponseReasoningDoneStreamEventType$inboundSchema:
|
|
87
|
+
z.ZodNativeEnum<typeof ResponseReasoningDoneStreamEventType> = z.nativeEnum(
|
|
88
|
+
ResponseReasoningDoneStreamEventType,
|
|
89
|
+
);
|
|
90
|
+
|
|
91
|
+
/** @internal */
|
|
92
|
+
export const ResponseReasoningDoneStreamEventData$inboundSchema: z.ZodType<
|
|
93
|
+
ResponseReasoningDoneStreamEventData,
|
|
94
|
+
z.ZodTypeDef,
|
|
95
|
+
unknown
|
|
96
|
+
> = collectExtraKeys$(
|
|
97
|
+
z.object({
|
|
98
|
+
content_index: z.number().int(),
|
|
99
|
+
item_id: z.string(),
|
|
100
|
+
output_index: z.number().int(),
|
|
101
|
+
sequence_number: z.number().int(),
|
|
102
|
+
text: z.string(),
|
|
103
|
+
type: ResponseReasoningDoneStreamEventType$inboundSchema,
|
|
104
|
+
}).catchall(z.any()),
|
|
105
|
+
"additionalProperties",
|
|
106
|
+
true,
|
|
107
|
+
).transform((v) => {
|
|
108
|
+
return remap$(v, {
|
|
109
|
+
"content_index": "contentIndex",
|
|
110
|
+
"item_id": "itemId",
|
|
111
|
+
"output_index": "outputIndex",
|
|
112
|
+
"sequence_number": "sequenceNumber",
|
|
113
|
+
});
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
export function responseReasoningDoneStreamEventDataFromJSON(
|
|
117
|
+
jsonString: string,
|
|
118
|
+
): SafeParseResult<ResponseReasoningDoneStreamEventData, SDKValidationError> {
|
|
119
|
+
return safeParse(
|
|
120
|
+
jsonString,
|
|
121
|
+
(x) =>
|
|
122
|
+
ResponseReasoningDoneStreamEventData$inboundSchema.parse(JSON.parse(x)),
|
|
123
|
+
`Failed to parse 'ResponseReasoningDoneStreamEventData' from JSON`,
|
|
124
|
+
);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/** @internal */
|
|
128
|
+
export const ResponseReasoningDoneStreamEventEvent$inboundSchema:
|
|
129
|
+
z.ZodNativeEnum<typeof ResponseReasoningDoneStreamEventEvent> = z.nativeEnum(
|
|
130
|
+
ResponseReasoningDoneStreamEventEvent,
|
|
131
|
+
);
|
|
132
|
+
|
|
133
|
+
/** @internal */
|
|
134
|
+
export const ResponseReasoningDoneStreamEvent$inboundSchema: z.ZodType<
|
|
135
|
+
ResponseReasoningDoneStreamEvent,
|
|
136
|
+
z.ZodTypeDef,
|
|
137
|
+
unknown
|
|
138
|
+
> = z.object({
|
|
139
|
+
data: z.unknown().transform((v, ctx) => {
|
|
140
|
+
if (typeof v !== "string") return v;
|
|
141
|
+
try {
|
|
142
|
+
return JSON.parse(v);
|
|
143
|
+
} catch (err) {
|
|
144
|
+
ctx.addIssue({ code: "custom", message: `malformed json: ${err}` });
|
|
145
|
+
return z.NEVER;
|
|
146
|
+
}
|
|
147
|
+
}).pipe(z.lazy(() => ResponseReasoningDoneStreamEventData$inboundSchema)),
|
|
148
|
+
event: ResponseReasoningDoneStreamEventEvent$inboundSchema,
|
|
149
|
+
});
|
|
150
|
+
|
|
151
|
+
export function responseReasoningDoneStreamEventFromJSON(
|
|
152
|
+
jsonString: string,
|
|
153
|
+
): SafeParseResult<ResponseReasoningDoneStreamEvent, SDKValidationError> {
|
|
154
|
+
return safeParse(
|
|
155
|
+
jsonString,
|
|
156
|
+
(x) => ResponseReasoningDoneStreamEvent$inboundSchema.parse(JSON.parse(x)),
|
|
157
|
+
`Failed to parse 'ResponseReasoningDoneStreamEvent' from JSON`,
|
|
158
|
+
);
|
|
159
|
+
}
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import {
|
|
8
|
+
collectExtraKeys as collectExtraKeys$,
|
|
9
|
+
safeParse,
|
|
10
|
+
} from "../../lib/schemas.js";
|
|
11
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
12
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
13
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* The event type. Matches the SSE `event` field.
|
|
17
|
+
*/
|
|
18
|
+
export const ResponseReasoningSummaryPartStreamEventType = {
|
|
19
|
+
ResponseReasoningSummaryPartAdded: "response.reasoning_summary_part.added",
|
|
20
|
+
ResponseReasoningSummaryPartDone: "response.reasoning_summary_part.done",
|
|
21
|
+
} as const;
|
|
22
|
+
/**
|
|
23
|
+
* The event type. Matches the SSE `event` field.
|
|
24
|
+
*/
|
|
25
|
+
export type ResponseReasoningSummaryPartStreamEventType = ClosedEnum<
|
|
26
|
+
typeof ResponseReasoningSummaryPartStreamEventType
|
|
27
|
+
>;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* The event payload.
|
|
31
|
+
*/
|
|
32
|
+
export type ResponseReasoningSummaryPartStreamEventData = {
|
|
33
|
+
/**
|
|
34
|
+
* ID of the output item this event refers to.
|
|
35
|
+
*/
|
|
36
|
+
itemId: string;
|
|
37
|
+
/**
|
|
38
|
+
* Index of the output item in the response output array.
|
|
39
|
+
*/
|
|
40
|
+
outputIndex: number;
|
|
41
|
+
/**
|
|
42
|
+
* The reasoning summary part.
|
|
43
|
+
*/
|
|
44
|
+
part: { [k: string]: any };
|
|
45
|
+
/**
|
|
46
|
+
* Monotonically increasing sequence number for ordering events.
|
|
47
|
+
*/
|
|
48
|
+
sequenceNumber: number;
|
|
49
|
+
/**
|
|
50
|
+
* Index of the reasoning summary part.
|
|
51
|
+
*/
|
|
52
|
+
summaryIndex: number;
|
|
53
|
+
/**
|
|
54
|
+
* The event type. Matches the SSE `event` field.
|
|
55
|
+
*/
|
|
56
|
+
type: ResponseReasoningSummaryPartStreamEventType;
|
|
57
|
+
additionalProperties?: { [k: string]: any } | undefined;
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* The SSE event name, equal to the payload's `type`.
|
|
62
|
+
*/
|
|
63
|
+
export const ResponseReasoningSummaryPartStreamEventEvent = {
|
|
64
|
+
ResponseReasoningSummaryPartAdded: "response.reasoning_summary_part.added",
|
|
65
|
+
ResponseReasoningSummaryPartDone: "response.reasoning_summary_part.done",
|
|
66
|
+
} as const;
|
|
67
|
+
/**
|
|
68
|
+
* The SSE event name, equal to the payload's `type`.
|
|
69
|
+
*/
|
|
70
|
+
export type ResponseReasoningSummaryPartStreamEventEvent = ClosedEnum<
|
|
71
|
+
typeof ResponseReasoningSummaryPartStreamEventEvent
|
|
72
|
+
>;
|
|
73
|
+
|
|
74
|
+
export type ResponseReasoningSummaryPartStreamEvent = {
|
|
75
|
+
/**
|
|
76
|
+
* The event payload.
|
|
77
|
+
*/
|
|
78
|
+
data: ResponseReasoningSummaryPartStreamEventData;
|
|
79
|
+
/**
|
|
80
|
+
* The SSE event name, equal to the payload's `type`.
|
|
81
|
+
*/
|
|
82
|
+
event: ResponseReasoningSummaryPartStreamEventEvent;
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
/** @internal */
|
|
86
|
+
export const ResponseReasoningSummaryPartStreamEventType$inboundSchema:
|
|
87
|
+
z.ZodNativeEnum<typeof ResponseReasoningSummaryPartStreamEventType> = z
|
|
88
|
+
.nativeEnum(ResponseReasoningSummaryPartStreamEventType);
|
|
89
|
+
|
|
90
|
+
/** @internal */
|
|
91
|
+
export const ResponseReasoningSummaryPartStreamEventData$inboundSchema:
|
|
92
|
+
z.ZodType<
|
|
93
|
+
ResponseReasoningSummaryPartStreamEventData,
|
|
94
|
+
z.ZodTypeDef,
|
|
95
|
+
unknown
|
|
96
|
+
> = collectExtraKeys$(
|
|
97
|
+
z.object({
|
|
98
|
+
item_id: z.string(),
|
|
99
|
+
output_index: z.number().int(),
|
|
100
|
+
part: z.record(z.any()),
|
|
101
|
+
sequence_number: z.number().int(),
|
|
102
|
+
summary_index: z.number().int(),
|
|
103
|
+
type: ResponseReasoningSummaryPartStreamEventType$inboundSchema,
|
|
104
|
+
}).catchall(z.any()),
|
|
105
|
+
"additionalProperties",
|
|
106
|
+
true,
|
|
107
|
+
).transform((v) => {
|
|
108
|
+
return remap$(v, {
|
|
109
|
+
"item_id": "itemId",
|
|
110
|
+
"output_index": "outputIndex",
|
|
111
|
+
"sequence_number": "sequenceNumber",
|
|
112
|
+
"summary_index": "summaryIndex",
|
|
113
|
+
});
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
export function responseReasoningSummaryPartStreamEventDataFromJSON(
|
|
117
|
+
jsonString: string,
|
|
118
|
+
): SafeParseResult<
|
|
119
|
+
ResponseReasoningSummaryPartStreamEventData,
|
|
120
|
+
SDKValidationError
|
|
121
|
+
> {
|
|
122
|
+
return safeParse(
|
|
123
|
+
jsonString,
|
|
124
|
+
(x) =>
|
|
125
|
+
ResponseReasoningSummaryPartStreamEventData$inboundSchema.parse(
|
|
126
|
+
JSON.parse(x),
|
|
127
|
+
),
|
|
128
|
+
`Failed to parse 'ResponseReasoningSummaryPartStreamEventData' from JSON`,
|
|
129
|
+
);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/** @internal */
|
|
133
|
+
export const ResponseReasoningSummaryPartStreamEventEvent$inboundSchema:
|
|
134
|
+
z.ZodNativeEnum<typeof ResponseReasoningSummaryPartStreamEventEvent> = z
|
|
135
|
+
.nativeEnum(ResponseReasoningSummaryPartStreamEventEvent);
|
|
136
|
+
|
|
137
|
+
/** @internal */
|
|
138
|
+
export const ResponseReasoningSummaryPartStreamEvent$inboundSchema: z.ZodType<
|
|
139
|
+
ResponseReasoningSummaryPartStreamEvent,
|
|
140
|
+
z.ZodTypeDef,
|
|
141
|
+
unknown
|
|
142
|
+
> = z.object({
|
|
143
|
+
data: z.unknown().transform((v, ctx) => {
|
|
144
|
+
if (typeof v !== "string") return v;
|
|
145
|
+
try {
|
|
146
|
+
return JSON.parse(v);
|
|
147
|
+
} catch (err) {
|
|
148
|
+
ctx.addIssue({ code: "custom", message: `malformed json: ${err}` });
|
|
149
|
+
return z.NEVER;
|
|
150
|
+
}
|
|
151
|
+
}).pipe(
|
|
152
|
+
z.lazy(() => ResponseReasoningSummaryPartStreamEventData$inboundSchema),
|
|
153
|
+
),
|
|
154
|
+
event: ResponseReasoningSummaryPartStreamEventEvent$inboundSchema,
|
|
155
|
+
});
|
|
156
|
+
|
|
157
|
+
export function responseReasoningSummaryPartStreamEventFromJSON(
|
|
158
|
+
jsonString: string,
|
|
159
|
+
): SafeParseResult<
|
|
160
|
+
ResponseReasoningSummaryPartStreamEvent,
|
|
161
|
+
SDKValidationError
|
|
162
|
+
> {
|
|
163
|
+
return safeParse(
|
|
164
|
+
jsonString,
|
|
165
|
+
(x) =>
|
|
166
|
+
ResponseReasoningSummaryPartStreamEvent$inboundSchema.parse(
|
|
167
|
+
JSON.parse(x),
|
|
168
|
+
),
|
|
169
|
+
`Failed to parse 'ResponseReasoningSummaryPartStreamEvent' from JSON`,
|
|
170
|
+
);
|
|
171
|
+
}
|