@openrouter/sdk 1.2.19 → 1.2.21
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/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/models/codeinterpretercallcodedeltaevent.d.ts +17 -0
- package/esm/models/codeinterpretercallcodedeltaevent.js +25 -0
- package/esm/models/codeinterpretercallcodedoneevent.d.ts +17 -0
- package/esm/models/codeinterpretercallcodedoneevent.js +25 -0
- package/esm/models/codeinterpretercallcompletedevent.d.ts +16 -0
- package/esm/models/codeinterpretercallcompletedevent.js +24 -0
- package/esm/models/codeinterpretercallinprogressevent.d.ts +16 -0
- package/esm/models/codeinterpretercallinprogressevent.js +24 -0
- package/esm/models/codeinterpretercallinterpretingevent.d.ts +16 -0
- package/esm/models/codeinterpretercallinterpretingevent.js +24 -0
- package/esm/models/codeinterpreterfileoutput.d.ts +47 -0
- package/esm/models/codeinterpreterfileoutput.js +56 -0
- package/esm/models/codeinterpreterimageoutput.d.ts +19 -0
- package/esm/models/codeinterpreterimageoutput.js +23 -0
- package/esm/models/codeinterpreterlogsoutput.d.ts +19 -0
- package/esm/models/codeinterpreterlogsoutput.js +23 -0
- package/esm/models/index.d.ts +8 -0
- package/esm/models/index.js +8 -0
- package/esm/models/inputsunion.d.ts +4 -4
- package/esm/models/inputsunion.js +2 -2
- package/esm/models/outputcodeinterpretercallitem.d.ts +35 -47
- package/esm/models/outputcodeinterpretercallitem.js +56 -67
- package/esm/models/outputfusionservertoolitem.d.ts +1 -1
- package/esm/models/outputwebsearchcallitem.d.ts +4 -0
- package/esm/models/outputwebsearchcallitem.js +12 -3
- package/esm/models/streamevents.d.ts +6 -1
- package/esm/models/streamevents.js +10 -0
- package/jsr.json +1 -1
- package/package.json +5 -5
package/esm/lib/config.d.ts
CHANGED
|
@@ -49,8 +49,8 @@ export declare function serverURLFromOptions(options: SDKOptions): URL | null;
|
|
|
49
49
|
export declare const SDK_METADATA: {
|
|
50
50
|
readonly language: "typescript";
|
|
51
51
|
readonly openapiDocVersion: "1.0.0";
|
|
52
|
-
readonly sdkVersion: "1.2.
|
|
52
|
+
readonly sdkVersion: "1.2.21";
|
|
53
53
|
readonly genVersion: "2.914.0";
|
|
54
|
-
readonly userAgent: "speakeasy-sdk/typescript 1.2.
|
|
54
|
+
readonly userAgent: "speakeasy-sdk/typescript 1.2.21 2.914.0 1.0.0 @openrouter/sdk";
|
|
55
55
|
};
|
|
56
56
|
//# sourceMappingURL=config.d.ts.map
|
package/esm/lib/config.js
CHANGED
|
@@ -26,8 +26,8 @@ export function serverURLFromOptions(options) {
|
|
|
26
26
|
export const SDK_METADATA = {
|
|
27
27
|
language: "typescript",
|
|
28
28
|
openapiDocVersion: "1.0.0",
|
|
29
|
-
sdkVersion: "1.2.
|
|
29
|
+
sdkVersion: "1.2.21",
|
|
30
30
|
genVersion: "2.914.0",
|
|
31
|
-
userAgent: "speakeasy-sdk/typescript 1.2.
|
|
31
|
+
userAgent: "speakeasy-sdk/typescript 1.2.21 2.914.0 1.0.0 @openrouter/sdk",
|
|
32
32
|
};
|
|
33
33
|
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
|
+
/**
|
|
5
|
+
* Incremental chunk of code being streamed for a `code_interpreter_call`.
|
|
6
|
+
*/
|
|
7
|
+
export type CodeInterpreterCallCodeDeltaEvent = {
|
|
8
|
+
delta: string;
|
|
9
|
+
itemId: string;
|
|
10
|
+
outputIndex: number;
|
|
11
|
+
sequenceNumber: number;
|
|
12
|
+
type: "response.code_interpreter_call_code.delta";
|
|
13
|
+
};
|
|
14
|
+
/** @internal */
|
|
15
|
+
export declare const CodeInterpreterCallCodeDeltaEvent$inboundSchema: z.ZodType<CodeInterpreterCallCodeDeltaEvent, unknown>;
|
|
16
|
+
export declare function codeInterpreterCallCodeDeltaEventFromJSON(jsonString: string): SafeParseResult<CodeInterpreterCallCodeDeltaEvent, SDKValidationError>;
|
|
17
|
+
//# sourceMappingURL=codeinterpretercallcodedeltaevent.d.ts.map
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 1db134a3edf6
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../lib/schemas.js";
|
|
8
|
+
/** @internal */
|
|
9
|
+
export const CodeInterpreterCallCodeDeltaEvent$inboundSchema = z.object({
|
|
10
|
+
delta: z.string(),
|
|
11
|
+
item_id: z.string(),
|
|
12
|
+
output_index: z.int(),
|
|
13
|
+
sequence_number: z.int(),
|
|
14
|
+
type: z.literal("response.code_interpreter_call_code.delta"),
|
|
15
|
+
}).transform((v) => {
|
|
16
|
+
return remap$(v, {
|
|
17
|
+
"item_id": "itemId",
|
|
18
|
+
"output_index": "outputIndex",
|
|
19
|
+
"sequence_number": "sequenceNumber",
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
export function codeInterpreterCallCodeDeltaEventFromJSON(jsonString) {
|
|
23
|
+
return safeParse(jsonString, (x) => CodeInterpreterCallCodeDeltaEvent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CodeInterpreterCallCodeDeltaEvent' from JSON`);
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=codeinterpretercallcodedeltaevent.js.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
|
+
/**
|
|
5
|
+
* Emitted when code streaming completes for a `code_interpreter_call`.
|
|
6
|
+
*/
|
|
7
|
+
export type CodeInterpreterCallCodeDoneEvent = {
|
|
8
|
+
code: string;
|
|
9
|
+
itemId: string;
|
|
10
|
+
outputIndex: number;
|
|
11
|
+
sequenceNumber: number;
|
|
12
|
+
type: "response.code_interpreter_call_code.done";
|
|
13
|
+
};
|
|
14
|
+
/** @internal */
|
|
15
|
+
export declare const CodeInterpreterCallCodeDoneEvent$inboundSchema: z.ZodType<CodeInterpreterCallCodeDoneEvent, unknown>;
|
|
16
|
+
export declare function codeInterpreterCallCodeDoneEventFromJSON(jsonString: string): SafeParseResult<CodeInterpreterCallCodeDoneEvent, SDKValidationError>;
|
|
17
|
+
//# sourceMappingURL=codeinterpretercallcodedoneevent.d.ts.map
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: cae4088ec7c1
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../lib/schemas.js";
|
|
8
|
+
/** @internal */
|
|
9
|
+
export const CodeInterpreterCallCodeDoneEvent$inboundSchema = z.object({
|
|
10
|
+
code: z.string(),
|
|
11
|
+
item_id: z.string(),
|
|
12
|
+
output_index: z.int(),
|
|
13
|
+
sequence_number: z.int(),
|
|
14
|
+
type: z.literal("response.code_interpreter_call_code.done"),
|
|
15
|
+
}).transform((v) => {
|
|
16
|
+
return remap$(v, {
|
|
17
|
+
"item_id": "itemId",
|
|
18
|
+
"output_index": "outputIndex",
|
|
19
|
+
"sequence_number": "sequenceNumber",
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
export function codeInterpreterCallCodeDoneEventFromJSON(jsonString) {
|
|
23
|
+
return safeParse(jsonString, (x) => CodeInterpreterCallCodeDoneEvent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CodeInterpreterCallCodeDoneEvent' from JSON`);
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=codeinterpretercallcodedoneevent.js.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
|
+
/**
|
|
5
|
+
* Code interpreter call completed
|
|
6
|
+
*/
|
|
7
|
+
export type CodeInterpreterCallCompletedEvent = {
|
|
8
|
+
itemId: string;
|
|
9
|
+
outputIndex: number;
|
|
10
|
+
sequenceNumber: number;
|
|
11
|
+
type: "response.code_interpreter_call.completed";
|
|
12
|
+
};
|
|
13
|
+
/** @internal */
|
|
14
|
+
export declare const CodeInterpreterCallCompletedEvent$inboundSchema: z.ZodType<CodeInterpreterCallCompletedEvent, unknown>;
|
|
15
|
+
export declare function codeInterpreterCallCompletedEventFromJSON(jsonString: string): SafeParseResult<CodeInterpreterCallCompletedEvent, SDKValidationError>;
|
|
16
|
+
//# sourceMappingURL=codeinterpretercallcompletedevent.d.ts.map
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 267055f103eb
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../lib/schemas.js";
|
|
8
|
+
/** @internal */
|
|
9
|
+
export const CodeInterpreterCallCompletedEvent$inboundSchema = z.object({
|
|
10
|
+
item_id: z.string(),
|
|
11
|
+
output_index: z.int(),
|
|
12
|
+
sequence_number: z.int(),
|
|
13
|
+
type: z.literal("response.code_interpreter_call.completed"),
|
|
14
|
+
}).transform((v) => {
|
|
15
|
+
return remap$(v, {
|
|
16
|
+
"item_id": "itemId",
|
|
17
|
+
"output_index": "outputIndex",
|
|
18
|
+
"sequence_number": "sequenceNumber",
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
export function codeInterpreterCallCompletedEventFromJSON(jsonString) {
|
|
22
|
+
return safeParse(jsonString, (x) => CodeInterpreterCallCompletedEvent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CodeInterpreterCallCompletedEvent' from JSON`);
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=codeinterpretercallcompletedevent.js.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
|
+
/**
|
|
5
|
+
* Code interpreter call in progress
|
|
6
|
+
*/
|
|
7
|
+
export type CodeInterpreterCallInProgressEvent = {
|
|
8
|
+
itemId: string;
|
|
9
|
+
outputIndex: number;
|
|
10
|
+
sequenceNumber: number;
|
|
11
|
+
type: "response.code_interpreter_call.in_progress";
|
|
12
|
+
};
|
|
13
|
+
/** @internal */
|
|
14
|
+
export declare const CodeInterpreterCallInProgressEvent$inboundSchema: z.ZodType<CodeInterpreterCallInProgressEvent, unknown>;
|
|
15
|
+
export declare function codeInterpreterCallInProgressEventFromJSON(jsonString: string): SafeParseResult<CodeInterpreterCallInProgressEvent, SDKValidationError>;
|
|
16
|
+
//# sourceMappingURL=codeinterpretercallinprogressevent.d.ts.map
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 171bc7eda480
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../lib/schemas.js";
|
|
8
|
+
/** @internal */
|
|
9
|
+
export const CodeInterpreterCallInProgressEvent$inboundSchema = z.object({
|
|
10
|
+
item_id: z.string(),
|
|
11
|
+
output_index: z.int(),
|
|
12
|
+
sequence_number: z.int(),
|
|
13
|
+
type: z.literal("response.code_interpreter_call.in_progress"),
|
|
14
|
+
}).transform((v) => {
|
|
15
|
+
return remap$(v, {
|
|
16
|
+
"item_id": "itemId",
|
|
17
|
+
"output_index": "outputIndex",
|
|
18
|
+
"sequence_number": "sequenceNumber",
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
export function codeInterpreterCallInProgressEventFromJSON(jsonString) {
|
|
22
|
+
return safeParse(jsonString, (x) => CodeInterpreterCallInProgressEvent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CodeInterpreterCallInProgressEvent' from JSON`);
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=codeinterpretercallinprogressevent.js.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
|
+
/**
|
|
5
|
+
* Code interpreter is executing the code
|
|
6
|
+
*/
|
|
7
|
+
export type CodeInterpreterCallInterpretingEvent = {
|
|
8
|
+
itemId: string;
|
|
9
|
+
outputIndex: number;
|
|
10
|
+
sequenceNumber: number;
|
|
11
|
+
type: "response.code_interpreter_call.interpreting";
|
|
12
|
+
};
|
|
13
|
+
/** @internal */
|
|
14
|
+
export declare const CodeInterpreterCallInterpretingEvent$inboundSchema: z.ZodType<CodeInterpreterCallInterpretingEvent, unknown>;
|
|
15
|
+
export declare function codeInterpreterCallInterpretingEventFromJSON(jsonString: string): SafeParseResult<CodeInterpreterCallInterpretingEvent, SDKValidationError>;
|
|
16
|
+
//# sourceMappingURL=codeinterpretercallinterpretingevent.d.ts.map
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 4ae310e8fd22
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../lib/schemas.js";
|
|
8
|
+
/** @internal */
|
|
9
|
+
export const CodeInterpreterCallInterpretingEvent$inboundSchema = z.object({
|
|
10
|
+
item_id: z.string(),
|
|
11
|
+
output_index: z.int(),
|
|
12
|
+
sequence_number: z.int(),
|
|
13
|
+
type: z.literal("response.code_interpreter_call.interpreting"),
|
|
14
|
+
}).transform((v) => {
|
|
15
|
+
return remap$(v, {
|
|
16
|
+
"item_id": "itemId",
|
|
17
|
+
"output_index": "outputIndex",
|
|
18
|
+
"sequence_number": "sequenceNumber",
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
export function codeInterpreterCallInterpretingEventFromJSON(jsonString) {
|
|
22
|
+
return safeParse(jsonString, (x) => CodeInterpreterCallInterpretingEvent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CodeInterpreterCallInterpretingEvent' from JSON`);
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=codeinterpretercallinterpretingevent.js.map
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
|
+
export type CodeInterpreterFileOutput = {
|
|
5
|
+
/**
|
|
6
|
+
* Provider-issued download URL for the generated file. Typically signed and time-limited (see `expires_at`); fetch promptly rather than persisting the URL.
|
|
7
|
+
*/
|
|
8
|
+
downloadUrl?: string | undefined;
|
|
9
|
+
/**
|
|
10
|
+
* Provider error code when generating or persisting the file failed; null or absent on success.
|
|
11
|
+
*/
|
|
12
|
+
errorCode?: string | null | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* When the `download_url` stops working, as an ISO 8601 timestamp. After this time the file must be regenerated.
|
|
15
|
+
*/
|
|
16
|
+
expiresAt?: string | undefined;
|
|
17
|
+
filename?: string | undefined;
|
|
18
|
+
id?: string | undefined;
|
|
19
|
+
mediaType?: string | undefined;
|
|
20
|
+
sha256?: string | undefined;
|
|
21
|
+
sizeBytes?: number | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* Provider-reported readiness of the generated file (e.g. `ready`). Values other than `ready` indicate the artifact may not be downloadable.
|
|
24
|
+
*/
|
|
25
|
+
status?: string | undefined;
|
|
26
|
+
type: "file";
|
|
27
|
+
};
|
|
28
|
+
/** @internal */
|
|
29
|
+
export declare const CodeInterpreterFileOutput$inboundSchema: z.ZodType<CodeInterpreterFileOutput, unknown>;
|
|
30
|
+
/** @internal */
|
|
31
|
+
export type CodeInterpreterFileOutput$Outbound = {
|
|
32
|
+
download_url?: string | undefined;
|
|
33
|
+
error_code?: string | null | undefined;
|
|
34
|
+
expires_at?: string | undefined;
|
|
35
|
+
filename?: string | undefined;
|
|
36
|
+
id?: string | undefined;
|
|
37
|
+
media_type?: string | undefined;
|
|
38
|
+
sha256?: string | undefined;
|
|
39
|
+
size_bytes?: number | undefined;
|
|
40
|
+
status?: string | undefined;
|
|
41
|
+
type: "file";
|
|
42
|
+
};
|
|
43
|
+
/** @internal */
|
|
44
|
+
export declare const CodeInterpreterFileOutput$outboundSchema: z.ZodType<CodeInterpreterFileOutput$Outbound, CodeInterpreterFileOutput>;
|
|
45
|
+
export declare function codeInterpreterFileOutputToJSON(codeInterpreterFileOutput: CodeInterpreterFileOutput): string;
|
|
46
|
+
export declare function codeInterpreterFileOutputFromJSON(jsonString: string): SafeParseResult<CodeInterpreterFileOutput, SDKValidationError>;
|
|
47
|
+
//# sourceMappingURL=codeinterpreterfileoutput.d.ts.map
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: a06a3be07341
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../lib/schemas.js";
|
|
8
|
+
/** @internal */
|
|
9
|
+
export const CodeInterpreterFileOutput$inboundSchema = z.object({
|
|
10
|
+
download_url: z.string().optional(),
|
|
11
|
+
error_code: z.nullable(z.string()).optional(),
|
|
12
|
+
expires_at: z.string().optional(),
|
|
13
|
+
filename: z.string().optional(),
|
|
14
|
+
id: z.string().optional(),
|
|
15
|
+
media_type: z.string().optional(),
|
|
16
|
+
sha256: z.string().optional(),
|
|
17
|
+
size_bytes: z.int().optional(),
|
|
18
|
+
status: z.string().optional(),
|
|
19
|
+
type: z.literal("file"),
|
|
20
|
+
}).transform((v) => {
|
|
21
|
+
return remap$(v, {
|
|
22
|
+
"download_url": "downloadUrl",
|
|
23
|
+
"error_code": "errorCode",
|
|
24
|
+
"expires_at": "expiresAt",
|
|
25
|
+
"media_type": "mediaType",
|
|
26
|
+
"size_bytes": "sizeBytes",
|
|
27
|
+
});
|
|
28
|
+
});
|
|
29
|
+
/** @internal */
|
|
30
|
+
export const CodeInterpreterFileOutput$outboundSchema = z.object({
|
|
31
|
+
downloadUrl: z.string().optional(),
|
|
32
|
+
errorCode: z.nullable(z.string()).optional(),
|
|
33
|
+
expiresAt: z.string().optional(),
|
|
34
|
+
filename: z.string().optional(),
|
|
35
|
+
id: z.string().optional(),
|
|
36
|
+
mediaType: z.string().optional(),
|
|
37
|
+
sha256: z.string().optional(),
|
|
38
|
+
sizeBytes: z.int().optional(),
|
|
39
|
+
status: z.string().optional(),
|
|
40
|
+
type: z.literal("file"),
|
|
41
|
+
}).transform((v) => {
|
|
42
|
+
return remap$(v, {
|
|
43
|
+
downloadUrl: "download_url",
|
|
44
|
+
errorCode: "error_code",
|
|
45
|
+
expiresAt: "expires_at",
|
|
46
|
+
mediaType: "media_type",
|
|
47
|
+
sizeBytes: "size_bytes",
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
export function codeInterpreterFileOutputToJSON(codeInterpreterFileOutput) {
|
|
51
|
+
return JSON.stringify(CodeInterpreterFileOutput$outboundSchema.parse(codeInterpreterFileOutput));
|
|
52
|
+
}
|
|
53
|
+
export function codeInterpreterFileOutputFromJSON(jsonString) {
|
|
54
|
+
return safeParse(jsonString, (x) => CodeInterpreterFileOutput$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CodeInterpreterFileOutput' from JSON`);
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=codeinterpreterfileoutput.js.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
|
+
export type CodeInterpreterImageOutput = {
|
|
5
|
+
type: "image";
|
|
6
|
+
url: string;
|
|
7
|
+
};
|
|
8
|
+
/** @internal */
|
|
9
|
+
export declare const CodeInterpreterImageOutput$inboundSchema: z.ZodType<CodeInterpreterImageOutput, unknown>;
|
|
10
|
+
/** @internal */
|
|
11
|
+
export type CodeInterpreterImageOutput$Outbound = {
|
|
12
|
+
type: "image";
|
|
13
|
+
url: string;
|
|
14
|
+
};
|
|
15
|
+
/** @internal */
|
|
16
|
+
export declare const CodeInterpreterImageOutput$outboundSchema: z.ZodType<CodeInterpreterImageOutput$Outbound, CodeInterpreterImageOutput>;
|
|
17
|
+
export declare function codeInterpreterImageOutputToJSON(codeInterpreterImageOutput: CodeInterpreterImageOutput): string;
|
|
18
|
+
export declare function codeInterpreterImageOutputFromJSON(jsonString: string): SafeParseResult<CodeInterpreterImageOutput, SDKValidationError>;
|
|
19
|
+
//# sourceMappingURL=codeinterpreterimageoutput.d.ts.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 30383bd386a1
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
/** @internal */
|
|
8
|
+
export const CodeInterpreterImageOutput$inboundSchema = z.object({
|
|
9
|
+
type: z.literal("image"),
|
|
10
|
+
url: z.string(),
|
|
11
|
+
});
|
|
12
|
+
/** @internal */
|
|
13
|
+
export const CodeInterpreterImageOutput$outboundSchema = z.object({
|
|
14
|
+
type: z.literal("image"),
|
|
15
|
+
url: z.string(),
|
|
16
|
+
});
|
|
17
|
+
export function codeInterpreterImageOutputToJSON(codeInterpreterImageOutput) {
|
|
18
|
+
return JSON.stringify(CodeInterpreterImageOutput$outboundSchema.parse(codeInterpreterImageOutput));
|
|
19
|
+
}
|
|
20
|
+
export function codeInterpreterImageOutputFromJSON(jsonString) {
|
|
21
|
+
return safeParse(jsonString, (x) => CodeInterpreterImageOutput$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CodeInterpreterImageOutput' from JSON`);
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=codeinterpreterimageoutput.js.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
|
+
export type CodeInterpreterLogsOutput = {
|
|
5
|
+
logs: string;
|
|
6
|
+
type: "logs";
|
|
7
|
+
};
|
|
8
|
+
/** @internal */
|
|
9
|
+
export declare const CodeInterpreterLogsOutput$inboundSchema: z.ZodType<CodeInterpreterLogsOutput, unknown>;
|
|
10
|
+
/** @internal */
|
|
11
|
+
export type CodeInterpreterLogsOutput$Outbound = {
|
|
12
|
+
logs: string;
|
|
13
|
+
type: "logs";
|
|
14
|
+
};
|
|
15
|
+
/** @internal */
|
|
16
|
+
export declare const CodeInterpreterLogsOutput$outboundSchema: z.ZodType<CodeInterpreterLogsOutput$Outbound, CodeInterpreterLogsOutput>;
|
|
17
|
+
export declare function codeInterpreterLogsOutputToJSON(codeInterpreterLogsOutput: CodeInterpreterLogsOutput): string;
|
|
18
|
+
export declare function codeInterpreterLogsOutputFromJSON(jsonString: string): SafeParseResult<CodeInterpreterLogsOutput, SDKValidationError>;
|
|
19
|
+
//# sourceMappingURL=codeinterpreterlogsoutput.d.ts.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: d91c0ced3c74
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
/** @internal */
|
|
8
|
+
export const CodeInterpreterLogsOutput$inboundSchema = z.object({
|
|
9
|
+
logs: z.string(),
|
|
10
|
+
type: z.literal("logs"),
|
|
11
|
+
});
|
|
12
|
+
/** @internal */
|
|
13
|
+
export const CodeInterpreterLogsOutput$outboundSchema = z.object({
|
|
14
|
+
logs: z.string(),
|
|
15
|
+
type: z.literal("logs"),
|
|
16
|
+
});
|
|
17
|
+
export function codeInterpreterLogsOutputToJSON(codeInterpreterLogsOutput) {
|
|
18
|
+
return JSON.stringify(CodeInterpreterLogsOutput$outboundSchema.parse(codeInterpreterLogsOutput));
|
|
19
|
+
}
|
|
20
|
+
export function codeInterpreterLogsOutputFromJSON(jsonString) {
|
|
21
|
+
return safeParse(jsonString, (x) => CodeInterpreterLogsOutput$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CodeInterpreterLogsOutput' from JSON`);
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=codeinterpreterlogsoutput.js.map
|
package/esm/models/index.d.ts
CHANGED
|
@@ -134,6 +134,14 @@ export * from "./chattoolmessage.js";
|
|
|
134
134
|
export * from "./chatusage.js";
|
|
135
135
|
export * from "./chatusermessage.js";
|
|
136
136
|
export * from "./chatwebsearchshorthand.js";
|
|
137
|
+
export * from "./codeinterpretercallcodedeltaevent.js";
|
|
138
|
+
export * from "./codeinterpretercallcodedoneevent.js";
|
|
139
|
+
export * from "./codeinterpretercallcompletedevent.js";
|
|
140
|
+
export * from "./codeinterpretercallinprogressevent.js";
|
|
141
|
+
export * from "./codeinterpretercallinterpretingevent.js";
|
|
142
|
+
export * from "./codeinterpreterfileoutput.js";
|
|
143
|
+
export * from "./codeinterpreterimageoutput.js";
|
|
144
|
+
export * from "./codeinterpreterlogsoutput.js";
|
|
137
145
|
export * from "./codeinterpreterservertool.js";
|
|
138
146
|
export * from "./codexlocalshelltool.js";
|
|
139
147
|
export * from "./compactionitem.js";
|
package/esm/models/index.js
CHANGED
|
@@ -138,6 +138,14 @@ export * from "./chattoolmessage.js";
|
|
|
138
138
|
export * from "./chatusage.js";
|
|
139
139
|
export * from "./chatusermessage.js";
|
|
140
140
|
export * from "./chatwebsearchshorthand.js";
|
|
141
|
+
export * from "./codeinterpretercallcodedeltaevent.js";
|
|
142
|
+
export * from "./codeinterpretercallcodedoneevent.js";
|
|
143
|
+
export * from "./codeinterpretercallcompletedevent.js";
|
|
144
|
+
export * from "./codeinterpretercallinprogressevent.js";
|
|
145
|
+
export * from "./codeinterpretercallinterpretingevent.js";
|
|
146
|
+
export * from "./codeinterpreterfileoutput.js";
|
|
147
|
+
export * from "./codeinterpreterimageoutput.js";
|
|
148
|
+
export * from "./codeinterpreterlogsoutput.js";
|
|
141
149
|
export * from "./codeinterpreterservertool.js";
|
|
142
150
|
export * from "./codexlocalshelltool.js";
|
|
143
151
|
export * from "./compactionitem.js";
|
|
@@ -134,11 +134,11 @@ export type InputsMessage = {
|
|
|
134
134
|
status?: InputsStatusCompleted1 | InputsStatusIncomplete1 | InputsStatusInProgress1 | undefined;
|
|
135
135
|
type?: InputsTypeMessage | undefined;
|
|
136
136
|
};
|
|
137
|
-
export type InputsUnion1 =
|
|
137
|
+
export type InputsUnion1 = FunctionCallItem | LocalShellCallItem | McpApprovalRequestItem | McpCallItem | ApplyPatchCallItem | OutputFunctionCallItem | OutputCustomToolCallItem | OutputFileSearchCallItem | OutputComputerCallItem | OutputDatetimeItem | McpListToolsItem | CustomToolCallItem | AgentMessageItem | ReasoningItem | FunctionCallOutputItem | ApplyPatchCallOutputItem | InputsMessage | InputsReasoning | OutputWebSearchCallItem | OutputImageGenerationCallItem | OutputCodeInterpreterCallItem | LocalShellCallOutputItem | ShellCallItem | ShellCallOutputItem | McpApprovalResponseItem | CustomToolCallOutputItem | AdditionalToolsItem | OutputWebSearchServerToolItem | OutputCodeInterpreterServerToolItem | OutputFileSearchServerToolItem | OutputImageGenerationServerToolItem | OutputBrowserUseServerToolItem | OutputBashServerToolItem | OutputTextEditorServerToolItem | OutputApplyPatchServerToolItem | OutputWebFetchServerToolItem | OutputToolSearchServerToolItem | OutputMemoryServerToolItem | OutputMcpServerToolItem | OutputSearchModelsServerToolItem | OutputFusionServerToolItem | OutputAdvisorServerToolItem | OutputSubagentServerToolItem | OutputFilesServerToolItem | CompactionItem | ItemReferenceItem | EasyInputMessage | InputMessageItem | ContextCompactionItem;
|
|
138
138
|
/**
|
|
139
139
|
* Input for a response request - can be a string or array of items
|
|
140
140
|
*/
|
|
141
|
-
export type InputsUnion = string | Array<
|
|
141
|
+
export type InputsUnion = string | Array<FunctionCallItem | LocalShellCallItem | McpApprovalRequestItem | McpCallItem | ApplyPatchCallItem | OutputFunctionCallItem | OutputCustomToolCallItem | OutputFileSearchCallItem | OutputComputerCallItem | OutputDatetimeItem | McpListToolsItem | CustomToolCallItem | AgentMessageItem | ReasoningItem | FunctionCallOutputItem | ApplyPatchCallOutputItem | InputsMessage | InputsReasoning | OutputWebSearchCallItem | OutputImageGenerationCallItem | OutputCodeInterpreterCallItem | LocalShellCallOutputItem | ShellCallItem | ShellCallOutputItem | McpApprovalResponseItem | CustomToolCallOutputItem | AdditionalToolsItem | OutputWebSearchServerToolItem | OutputCodeInterpreterServerToolItem | OutputFileSearchServerToolItem | OutputImageGenerationServerToolItem | OutputBrowserUseServerToolItem | OutputBashServerToolItem | OutputTextEditorServerToolItem | OutputApplyPatchServerToolItem | OutputWebFetchServerToolItem | OutputToolSearchServerToolItem | OutputMemoryServerToolItem | OutputMcpServerToolItem | OutputSearchModelsServerToolItem | OutputFusionServerToolItem | OutputAdvisorServerToolItem | OutputSubagentServerToolItem | OutputFilesServerToolItem | CompactionItem | ItemReferenceItem | EasyInputMessage | InputMessageItem | ContextCompactionItem>;
|
|
142
142
|
/** @internal */
|
|
143
143
|
export declare const InputsStatusInProgress2$outboundSchema: z.ZodEnum<typeof InputsStatusInProgress2>;
|
|
144
144
|
/** @internal */
|
|
@@ -213,12 +213,12 @@ export type InputsMessage$Outbound = {
|
|
|
213
213
|
export declare const InputsMessage$outboundSchema: z.ZodType<InputsMessage$Outbound, InputsMessage>;
|
|
214
214
|
export declare function inputsMessageToJSON(inputsMessage: InputsMessage): string;
|
|
215
215
|
/** @internal */
|
|
216
|
-
export type InputsUnion1$Outbound =
|
|
216
|
+
export type InputsUnion1$Outbound = FunctionCallItem$Outbound | LocalShellCallItem$Outbound | McpApprovalRequestItem$Outbound | McpCallItem$Outbound | ApplyPatchCallItem$Outbound | OutputFunctionCallItem$Outbound | OutputCustomToolCallItem$Outbound | OutputFileSearchCallItem$Outbound | OutputComputerCallItem$Outbound | OutputDatetimeItem$Outbound | McpListToolsItem$Outbound | CustomToolCallItem$Outbound | AgentMessageItem$Outbound | ReasoningItem$Outbound | FunctionCallOutputItem$Outbound | ApplyPatchCallOutputItem$Outbound | InputsMessage$Outbound | InputsReasoning$Outbound | OutputWebSearchCallItem$Outbound | OutputImageGenerationCallItem$Outbound | OutputCodeInterpreterCallItem$Outbound | LocalShellCallOutputItem$Outbound | ShellCallItem$Outbound | ShellCallOutputItem$Outbound | McpApprovalResponseItem$Outbound | CustomToolCallOutputItem$Outbound | AdditionalToolsItem$Outbound | OutputWebSearchServerToolItem$Outbound | OutputCodeInterpreterServerToolItem$Outbound | OutputFileSearchServerToolItem$Outbound | OutputImageGenerationServerToolItem$Outbound | OutputBrowserUseServerToolItem$Outbound | OutputBashServerToolItem$Outbound | OutputTextEditorServerToolItem$Outbound | OutputApplyPatchServerToolItem$Outbound | OutputWebFetchServerToolItem$Outbound | OutputToolSearchServerToolItem$Outbound | OutputMemoryServerToolItem$Outbound | OutputMcpServerToolItem$Outbound | OutputSearchModelsServerToolItem$Outbound | OutputFusionServerToolItem$Outbound | OutputAdvisorServerToolItem$Outbound | OutputSubagentServerToolItem$Outbound | OutputFilesServerToolItem$Outbound | CompactionItem$Outbound | ItemReferenceItem$Outbound | EasyInputMessage$Outbound | InputMessageItem$Outbound | ContextCompactionItem$Outbound;
|
|
217
217
|
/** @internal */
|
|
218
218
|
export declare const InputsUnion1$outboundSchema: z.ZodType<InputsUnion1$Outbound, InputsUnion1>;
|
|
219
219
|
export declare function inputsUnion1ToJSON(inputsUnion1: InputsUnion1): string;
|
|
220
220
|
/** @internal */
|
|
221
|
-
export type InputsUnion$Outbound = string | Array<
|
|
221
|
+
export type InputsUnion$Outbound = string | Array<FunctionCallItem$Outbound | LocalShellCallItem$Outbound | McpApprovalRequestItem$Outbound | McpCallItem$Outbound | ApplyPatchCallItem$Outbound | OutputFunctionCallItem$Outbound | OutputCustomToolCallItem$Outbound | OutputFileSearchCallItem$Outbound | OutputComputerCallItem$Outbound | OutputDatetimeItem$Outbound | McpListToolsItem$Outbound | CustomToolCallItem$Outbound | AgentMessageItem$Outbound | ReasoningItem$Outbound | FunctionCallOutputItem$Outbound | ApplyPatchCallOutputItem$Outbound | InputsMessage$Outbound | InputsReasoning$Outbound | OutputWebSearchCallItem$Outbound | OutputImageGenerationCallItem$Outbound | OutputCodeInterpreterCallItem$Outbound | LocalShellCallOutputItem$Outbound | ShellCallItem$Outbound | ShellCallOutputItem$Outbound | McpApprovalResponseItem$Outbound | CustomToolCallOutputItem$Outbound | AdditionalToolsItem$Outbound | OutputWebSearchServerToolItem$Outbound | OutputCodeInterpreterServerToolItem$Outbound | OutputFileSearchServerToolItem$Outbound | OutputImageGenerationServerToolItem$Outbound | OutputBrowserUseServerToolItem$Outbound | OutputBashServerToolItem$Outbound | OutputTextEditorServerToolItem$Outbound | OutputApplyPatchServerToolItem$Outbound | OutputWebFetchServerToolItem$Outbound | OutputToolSearchServerToolItem$Outbound | OutputMemoryServerToolItem$Outbound | OutputMcpServerToolItem$Outbound | OutputSearchModelsServerToolItem$Outbound | OutputFusionServerToolItem$Outbound | OutputAdvisorServerToolItem$Outbound | OutputSubagentServerToolItem$Outbound | OutputFilesServerToolItem$Outbound | CompactionItem$Outbound | ItemReferenceItem$Outbound | EasyInputMessage$Outbound | InputMessageItem$Outbound | ContextCompactionItem$Outbound>;
|
|
222
222
|
/** @internal */
|
|
223
223
|
export declare const InputsUnion$outboundSchema: z.ZodType<InputsUnion$Outbound, InputsUnion>;
|
|
224
224
|
export declare function inputsUnionToJSON(inputsUnion: InputsUnion): string;
|
|
@@ -205,7 +205,6 @@ export function inputsMessageToJSON(inputsMessage) {
|
|
|
205
205
|
}
|
|
206
206
|
/** @internal */
|
|
207
207
|
export const InputsUnion1$outboundSchema = z.union([
|
|
208
|
-
OutputCodeInterpreterCallItem$outboundSchema,
|
|
209
208
|
FunctionCallItem$outboundSchema,
|
|
210
209
|
LocalShellCallItem$outboundSchema,
|
|
211
210
|
McpApprovalRequestItem$outboundSchema,
|
|
@@ -226,6 +225,7 @@ export const InputsUnion1$outboundSchema = z.union([
|
|
|
226
225
|
z.lazy(() => InputsReasoning$outboundSchema),
|
|
227
226
|
OutputWebSearchCallItem$outboundSchema,
|
|
228
227
|
OutputImageGenerationCallItem$outboundSchema,
|
|
228
|
+
OutputCodeInterpreterCallItem$outboundSchema,
|
|
229
229
|
LocalShellCallOutputItem$outboundSchema,
|
|
230
230
|
ShellCallItem$outboundSchema,
|
|
231
231
|
ShellCallOutputItem$outboundSchema,
|
|
@@ -262,7 +262,6 @@ export function inputsUnion1ToJSON(inputsUnion1) {
|
|
|
262
262
|
export const InputsUnion$outboundSchema = z.union([
|
|
263
263
|
z.string(),
|
|
264
264
|
z.array(z.union([
|
|
265
|
-
OutputCodeInterpreterCallItem$outboundSchema,
|
|
266
265
|
FunctionCallItem$outboundSchema,
|
|
267
266
|
LocalShellCallItem$outboundSchema,
|
|
268
267
|
McpApprovalRequestItem$outboundSchema,
|
|
@@ -283,6 +282,7 @@ export const InputsUnion$outboundSchema = z.union([
|
|
|
283
282
|
z.lazy(() => InputsReasoning$outboundSchema),
|
|
284
283
|
OutputWebSearchCallItem$outboundSchema,
|
|
285
284
|
OutputImageGenerationCallItem$outboundSchema,
|
|
285
|
+
OutputCodeInterpreterCallItem$outboundSchema,
|
|
286
286
|
LocalShellCallOutputItem$outboundSchema,
|
|
287
287
|
ShellCallItem$outboundSchema,
|
|
288
288
|
ShellCallOutputItem$outboundSchema,
|
|
@@ -1,77 +1,65 @@
|
|
|
1
1
|
import * as z from "zod/v4";
|
|
2
2
|
import * as discriminatedUnionTypes from "../types/discriminatedUnion.js";
|
|
3
|
-
import { ClosedEnum } from "../types/enums.js";
|
|
3
|
+
import { ClosedEnum, OpenEnum } from "../types/enums.js";
|
|
4
4
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
5
|
+
import { CodeInterpreterFileOutput, CodeInterpreterFileOutput$Outbound } from "./codeinterpreterfileoutput.js";
|
|
6
|
+
import { CodeInterpreterImageOutput, CodeInterpreterImageOutput$Outbound } from "./codeinterpreterimageoutput.js";
|
|
7
|
+
import { CodeInterpreterLogsOutput, CodeInterpreterLogsOutput$Outbound } from "./codeinterpreterlogsoutput.js";
|
|
5
8
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
6
|
-
|
|
7
|
-
export
|
|
8
|
-
|
|
9
|
-
|
|
9
|
+
export type OutputCodeInterpreterCallItemOutput = CodeInterpreterFileOutput | CodeInterpreterImageOutput | CodeInterpreterLogsOutput | discriminatedUnionTypes.Unknown<"type">;
|
|
10
|
+
export declare const OutputCodeInterpreterCallItemStatus: {
|
|
11
|
+
readonly InProgress: "in_progress";
|
|
12
|
+
readonly Completed: "completed";
|
|
13
|
+
readonly Incomplete: "incomplete";
|
|
14
|
+
readonly Interpreting: "interpreting";
|
|
15
|
+
readonly Failed: "failed";
|
|
10
16
|
};
|
|
11
|
-
export type
|
|
12
|
-
|
|
13
|
-
url: string;
|
|
14
|
-
};
|
|
15
|
-
export type OutputCodeInterpreterCallItemOutputUnion = OutputImage | OutputLogs | discriminatedUnionTypes.Unknown<"type">;
|
|
16
|
-
export declare const TypeCodeInterpreterCall: {
|
|
17
|
+
export type OutputCodeInterpreterCallItemStatus = OpenEnum<typeof OutputCodeInterpreterCallItemStatus>;
|
|
18
|
+
export declare const OutputCodeInterpreterCallItemType: {
|
|
17
19
|
readonly CodeInterpreterCall: "code_interpreter_call";
|
|
18
20
|
};
|
|
19
|
-
export type
|
|
21
|
+
export type OutputCodeInterpreterCallItemType = ClosedEnum<typeof OutputCodeInterpreterCallItemType>;
|
|
20
22
|
/**
|
|
21
23
|
* A code interpreter execution call with outputs
|
|
22
24
|
*/
|
|
23
25
|
export type OutputCodeInterpreterCallItem = {
|
|
24
|
-
code
|
|
25
|
-
containerId
|
|
26
|
+
code?: string | null | undefined;
|
|
27
|
+
containerId?: string | undefined;
|
|
26
28
|
id: string;
|
|
27
|
-
outputs
|
|
28
|
-
status:
|
|
29
|
-
type:
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
/** @internal */
|
|
34
|
-
export type OutputLogs$Outbound = {
|
|
35
|
-
logs: string;
|
|
36
|
-
type: "logs";
|
|
29
|
+
outputs?: Array<CodeInterpreterFileOutput | CodeInterpreterImageOutput | CodeInterpreterLogsOutput | discriminatedUnionTypes.Unknown<"type">> | null | undefined;
|
|
30
|
+
status: OutputCodeInterpreterCallItemStatus;
|
|
31
|
+
type: OutputCodeInterpreterCallItemType;
|
|
32
|
+
additionalProperties?: {
|
|
33
|
+
[k: string]: any;
|
|
34
|
+
} | undefined;
|
|
37
35
|
};
|
|
38
36
|
/** @internal */
|
|
39
|
-
export declare const
|
|
40
|
-
export declare function outputLogsToJSON(outputLogs: OutputLogs): string;
|
|
41
|
-
export declare function outputLogsFromJSON(jsonString: string): SafeParseResult<OutputLogs, SDKValidationError>;
|
|
42
|
-
/** @internal */
|
|
43
|
-
export declare const OutputImage$inboundSchema: z.ZodType<OutputImage, unknown>;
|
|
44
|
-
/** @internal */
|
|
45
|
-
export type OutputImage$Outbound = {
|
|
46
|
-
type: "image";
|
|
47
|
-
url: string;
|
|
48
|
-
};
|
|
37
|
+
export declare const OutputCodeInterpreterCallItemOutput$inboundSchema: z.ZodType<OutputCodeInterpreterCallItemOutput, unknown>;
|
|
49
38
|
/** @internal */
|
|
50
|
-
export
|
|
51
|
-
export declare function outputImageToJSON(outputImage: OutputImage): string;
|
|
52
|
-
export declare function outputImageFromJSON(jsonString: string): SafeParseResult<OutputImage, SDKValidationError>;
|
|
39
|
+
export type OutputCodeInterpreterCallItemOutput$Outbound = CodeInterpreterFileOutput$Outbound | CodeInterpreterImageOutput$Outbound | CodeInterpreterLogsOutput$Outbound;
|
|
53
40
|
/** @internal */
|
|
54
|
-
export declare const
|
|
41
|
+
export declare const OutputCodeInterpreterCallItemOutput$outboundSchema: z.ZodType<OutputCodeInterpreterCallItemOutput$Outbound, OutputCodeInterpreterCallItemOutput>;
|
|
42
|
+
export declare function outputCodeInterpreterCallItemOutputToJSON(outputCodeInterpreterCallItemOutput: OutputCodeInterpreterCallItemOutput): string;
|
|
43
|
+
export declare function outputCodeInterpreterCallItemOutputFromJSON(jsonString: string): SafeParseResult<OutputCodeInterpreterCallItemOutput, SDKValidationError>;
|
|
55
44
|
/** @internal */
|
|
56
|
-
export
|
|
45
|
+
export declare const OutputCodeInterpreterCallItemStatus$inboundSchema: z.ZodType<OutputCodeInterpreterCallItemStatus, unknown>;
|
|
57
46
|
/** @internal */
|
|
58
|
-
export declare const
|
|
59
|
-
export declare function outputCodeInterpreterCallItemOutputUnionToJSON(outputCodeInterpreterCallItemOutputUnion: OutputCodeInterpreterCallItemOutputUnion): string;
|
|
60
|
-
export declare function outputCodeInterpreterCallItemOutputUnionFromJSON(jsonString: string): SafeParseResult<OutputCodeInterpreterCallItemOutputUnion, SDKValidationError>;
|
|
47
|
+
export declare const OutputCodeInterpreterCallItemStatus$outboundSchema: z.ZodType<string, OutputCodeInterpreterCallItemStatus>;
|
|
61
48
|
/** @internal */
|
|
62
|
-
export declare const
|
|
49
|
+
export declare const OutputCodeInterpreterCallItemType$inboundSchema: z.ZodEnum<typeof OutputCodeInterpreterCallItemType>;
|
|
63
50
|
/** @internal */
|
|
64
|
-
export declare const
|
|
51
|
+
export declare const OutputCodeInterpreterCallItemType$outboundSchema: z.ZodEnum<typeof OutputCodeInterpreterCallItemType>;
|
|
65
52
|
/** @internal */
|
|
66
53
|
export declare const OutputCodeInterpreterCallItem$inboundSchema: z.ZodType<OutputCodeInterpreterCallItem, unknown>;
|
|
67
54
|
/** @internal */
|
|
68
55
|
export type OutputCodeInterpreterCallItem$Outbound = {
|
|
69
|
-
code
|
|
70
|
-
container_id
|
|
56
|
+
code?: string | null | undefined;
|
|
57
|
+
container_id?: string | undefined;
|
|
71
58
|
id: string;
|
|
72
|
-
outputs
|
|
59
|
+
outputs?: Array<CodeInterpreterFileOutput$Outbound | CodeInterpreterImageOutput$Outbound | CodeInterpreterLogsOutput$Outbound> | null | undefined;
|
|
73
60
|
status: string;
|
|
74
61
|
type: string;
|
|
62
|
+
[additionalProperties: string]: unknown;
|
|
75
63
|
};
|
|
76
64
|
/** @internal */
|
|
77
65
|
export declare const OutputCodeInterpreterCallItem$outboundSchema: z.ZodType<OutputCodeInterpreterCallItem$Outbound, OutputCodeInterpreterCallItem>;
|
|
@@ -4,97 +4,86 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import * as z from "zod/v4";
|
|
6
6
|
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
-
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
import { collectExtraKeys as collectExtraKeys$, safeParse, } from "../lib/schemas.js";
|
|
8
8
|
import { discriminatedUnion } from "../types/discriminatedUnion.js";
|
|
9
|
-
import
|
|
10
|
-
|
|
9
|
+
import * as openEnums from "../types/enums.js";
|
|
10
|
+
import { CodeInterpreterFileOutput$inboundSchema, CodeInterpreterFileOutput$outboundSchema, } from "./codeinterpreterfileoutput.js";
|
|
11
|
+
import { CodeInterpreterImageOutput$inboundSchema, CodeInterpreterImageOutput$outboundSchema, } from "./codeinterpreterimageoutput.js";
|
|
12
|
+
import { CodeInterpreterLogsOutput$inboundSchema, CodeInterpreterLogsOutput$outboundSchema, } from "./codeinterpreterlogsoutput.js";
|
|
13
|
+
export const OutputCodeInterpreterCallItemStatus = {
|
|
14
|
+
InProgress: "in_progress",
|
|
15
|
+
Completed: "completed",
|
|
16
|
+
Incomplete: "incomplete",
|
|
17
|
+
Interpreting: "interpreting",
|
|
18
|
+
Failed: "failed",
|
|
19
|
+
};
|
|
20
|
+
export const OutputCodeInterpreterCallItemType = {
|
|
11
21
|
CodeInterpreterCall: "code_interpreter_call",
|
|
12
22
|
};
|
|
13
23
|
/** @internal */
|
|
14
|
-
export const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
});
|
|
19
|
-
/** @internal */
|
|
20
|
-
export const OutputLogs$outboundSchema = z.object({
|
|
21
|
-
logs: z.string(),
|
|
22
|
-
type: z.literal("logs"),
|
|
23
|
-
});
|
|
24
|
-
export function outputLogsToJSON(outputLogs) {
|
|
25
|
-
return JSON.stringify(OutputLogs$outboundSchema.parse(outputLogs));
|
|
26
|
-
}
|
|
27
|
-
export function outputLogsFromJSON(jsonString) {
|
|
28
|
-
return safeParse(jsonString, (x) => OutputLogs$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OutputLogs' from JSON`);
|
|
29
|
-
}
|
|
30
|
-
/** @internal */
|
|
31
|
-
export const OutputImage$inboundSchema = z
|
|
32
|
-
.object({
|
|
33
|
-
type: z.literal("image"),
|
|
34
|
-
url: z.string(),
|
|
24
|
+
export const OutputCodeInterpreterCallItemOutput$inboundSchema = discriminatedUnion("type", {
|
|
25
|
+
file: CodeInterpreterFileOutput$inboundSchema,
|
|
26
|
+
image: CodeInterpreterImageOutput$inboundSchema,
|
|
27
|
+
logs: CodeInterpreterLogsOutput$inboundSchema,
|
|
35
28
|
});
|
|
36
29
|
/** @internal */
|
|
37
|
-
export const
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
30
|
+
export const OutputCodeInterpreterCallItemOutput$outboundSchema = z.union([
|
|
31
|
+
CodeInterpreterFileOutput$outboundSchema,
|
|
32
|
+
CodeInterpreterImageOutput$outboundSchema,
|
|
33
|
+
CodeInterpreterLogsOutput$outboundSchema,
|
|
34
|
+
]);
|
|
35
|
+
export function outputCodeInterpreterCallItemOutputToJSON(outputCodeInterpreterCallItemOutput) {
|
|
36
|
+
return JSON.stringify(OutputCodeInterpreterCallItemOutput$outboundSchema.parse(outputCodeInterpreterCallItemOutput));
|
|
43
37
|
}
|
|
44
|
-
export function
|
|
45
|
-
return safeParse(jsonString, (x) =>
|
|
38
|
+
export function outputCodeInterpreterCallItemOutputFromJSON(jsonString) {
|
|
39
|
+
return safeParse(jsonString, (x) => OutputCodeInterpreterCallItemOutput$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OutputCodeInterpreterCallItemOutput' from JSON`);
|
|
46
40
|
}
|
|
47
41
|
/** @internal */
|
|
48
|
-
export const
|
|
49
|
-
image: z.lazy(() => OutputImage$inboundSchema),
|
|
50
|
-
logs: z.lazy(() => OutputLogs$inboundSchema),
|
|
51
|
-
});
|
|
42
|
+
export const OutputCodeInterpreterCallItemStatus$inboundSchema = openEnums.inboundSchema(OutputCodeInterpreterCallItemStatus);
|
|
52
43
|
/** @internal */
|
|
53
|
-
export const
|
|
54
|
-
z.lazy(() => OutputImage$outboundSchema),
|
|
55
|
-
z.lazy(() => OutputLogs$outboundSchema),
|
|
56
|
-
]);
|
|
57
|
-
export function outputCodeInterpreterCallItemOutputUnionToJSON(outputCodeInterpreterCallItemOutputUnion) {
|
|
58
|
-
return JSON.stringify(OutputCodeInterpreterCallItemOutputUnion$outboundSchema.parse(outputCodeInterpreterCallItemOutputUnion));
|
|
59
|
-
}
|
|
60
|
-
export function outputCodeInterpreterCallItemOutputUnionFromJSON(jsonString) {
|
|
61
|
-
return safeParse(jsonString, (x) => OutputCodeInterpreterCallItemOutputUnion$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OutputCodeInterpreterCallItemOutputUnion' from JSON`);
|
|
62
|
-
}
|
|
44
|
+
export const OutputCodeInterpreterCallItemStatus$outboundSchema = openEnums.outboundSchema(OutputCodeInterpreterCallItemStatus);
|
|
63
45
|
/** @internal */
|
|
64
|
-
export const
|
|
46
|
+
export const OutputCodeInterpreterCallItemType$inboundSchema = z.enum(OutputCodeInterpreterCallItemType);
|
|
65
47
|
/** @internal */
|
|
66
|
-
export const
|
|
48
|
+
export const OutputCodeInterpreterCallItemType$outboundSchema = OutputCodeInterpreterCallItemType$inboundSchema;
|
|
67
49
|
/** @internal */
|
|
68
|
-
export const OutputCodeInterpreterCallItem$inboundSchema = z.object({
|
|
69
|
-
code: z.nullable(z.string()),
|
|
70
|
-
container_id: z.string(),
|
|
50
|
+
export const OutputCodeInterpreterCallItem$inboundSchema = collectExtraKeys$(z.object({
|
|
51
|
+
code: z.nullable(z.string()).optional(),
|
|
52
|
+
container_id: z.string().optional(),
|
|
71
53
|
id: z.string(),
|
|
72
54
|
outputs: z.nullable(z.array(discriminatedUnion("type", {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
55
|
+
file: CodeInterpreterFileOutput$inboundSchema,
|
|
56
|
+
image: CodeInterpreterImageOutput$inboundSchema,
|
|
57
|
+
logs: CodeInterpreterLogsOutput$inboundSchema,
|
|
58
|
+
}))).optional(),
|
|
59
|
+
status: OutputCodeInterpreterCallItemStatus$inboundSchema,
|
|
60
|
+
type: OutputCodeInterpreterCallItemType$inboundSchema,
|
|
61
|
+
}).catchall(z.any()), "additionalProperties", true).transform((v) => {
|
|
79
62
|
return remap$(v, {
|
|
80
63
|
"container_id": "containerId",
|
|
81
64
|
});
|
|
82
65
|
});
|
|
83
66
|
/** @internal */
|
|
84
67
|
export const OutputCodeInterpreterCallItem$outboundSchema = z.object({
|
|
85
|
-
code: z.nullable(z.string()),
|
|
86
|
-
containerId: z.string(),
|
|
68
|
+
code: z.nullable(z.string()).optional(),
|
|
69
|
+
containerId: z.string().optional(),
|
|
87
70
|
id: z.string(),
|
|
88
71
|
outputs: z.nullable(z.array(z.union([
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
72
|
+
CodeInterpreterFileOutput$outboundSchema,
|
|
73
|
+
CodeInterpreterImageOutput$outboundSchema,
|
|
74
|
+
CodeInterpreterLogsOutput$outboundSchema,
|
|
75
|
+
]))).optional(),
|
|
76
|
+
status: OutputCodeInterpreterCallItemStatus$outboundSchema,
|
|
77
|
+
type: OutputCodeInterpreterCallItemType$outboundSchema,
|
|
78
|
+
additionalProperties: z.record(z.string(), z.any()).optional(),
|
|
94
79
|
}).transform((v) => {
|
|
95
|
-
return
|
|
96
|
-
|
|
97
|
-
|
|
80
|
+
return {
|
|
81
|
+
...v.additionalProperties,
|
|
82
|
+
...remap$(v, {
|
|
83
|
+
containerId: "container_id",
|
|
84
|
+
additionalProperties: null,
|
|
85
|
+
}),
|
|
86
|
+
};
|
|
98
87
|
});
|
|
99
88
|
export function outputCodeInterpreterCallItemToJSON(outputCodeInterpreterCallItem) {
|
|
100
89
|
return JSON.stringify(OutputCodeInterpreterCallItem$outboundSchema.parse(outputCodeInterpreterCallItem));
|
|
@@ -44,7 +44,7 @@ export type OutputFusionServerToolItem = {
|
|
|
44
44
|
*/
|
|
45
45
|
failedModels?: Array<FailedModel> | undefined;
|
|
46
46
|
/**
|
|
47
|
-
* Typed failure reason when the fusion run failed. Possible values include: all_panels_failed, insufficient_credits, rate_limited, judge_not_valid_json, judge_schema_mismatch, judge_upstream_error, judge_empty_completion. The four analysis-stage codes keep their pre-rename `judge_` spelling so existing consumers keep matching.
|
|
47
|
+
* Typed failure reason when the fusion run failed. Possible values include: all_panels_failed, insufficient_credits, rate_limited, invalid_model, judge_not_valid_json, judge_schema_mismatch, judge_upstream_error, judge_empty_completion. The four analysis-stage codes keep their pre-rename `judge_` spelling so existing consumers keep matching.
|
|
48
48
|
*/
|
|
49
49
|
failureReason?: string | undefined;
|
|
50
50
|
id?: string | undefined;
|
|
@@ -30,6 +30,9 @@ export type OutputWebSearchCallItem = {
|
|
|
30
30
|
id: string;
|
|
31
31
|
status: WebSearchStatus;
|
|
32
32
|
type: TypeWebSearchCall;
|
|
33
|
+
additionalProperties?: {
|
|
34
|
+
[k: string]: any;
|
|
35
|
+
} | undefined;
|
|
33
36
|
};
|
|
34
37
|
/** @internal */
|
|
35
38
|
export declare const ActionFindInPage$inboundSchema: z.ZodType<ActionFindInPage, unknown>;
|
|
@@ -87,6 +90,7 @@ export type OutputWebSearchCallItem$Outbound = {
|
|
|
87
90
|
id: string;
|
|
88
91
|
status: string;
|
|
89
92
|
type: string;
|
|
93
|
+
[additionalProperties: string]: unknown;
|
|
90
94
|
};
|
|
91
95
|
/** @internal */
|
|
92
96
|
export declare const OutputWebSearchCallItem$outboundSchema: z.ZodType<OutputWebSearchCallItem$Outbound, OutputWebSearchCallItem>;
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
* @generated-id: b4585d176186
|
|
4
4
|
*/
|
|
5
5
|
import * as z from "zod/v4";
|
|
6
|
-
import {
|
|
6
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
+
import { collectExtraKeys as collectExtraKeys$, safeParse, } from "../lib/schemas.js";
|
|
7
8
|
import { discriminatedUnion } from "../types/discriminatedUnion.js";
|
|
8
9
|
import { WebSearchSource$inboundSchema, WebSearchSource$outboundSchema, } from "./websearchsource.js";
|
|
9
10
|
import { WebSearchStatus$inboundSchema, WebSearchStatus$outboundSchema, } from "./websearchstatus.js";
|
|
@@ -88,7 +89,7 @@ export const TypeWebSearchCall$inboundSchema = z.enum(TypeWebSearchCall);
|
|
|
88
89
|
/** @internal */
|
|
89
90
|
export const TypeWebSearchCall$outboundSchema = TypeWebSearchCall$inboundSchema;
|
|
90
91
|
/** @internal */
|
|
91
|
-
export const OutputWebSearchCallItem$inboundSchema = z.object({
|
|
92
|
+
export const OutputWebSearchCallItem$inboundSchema = collectExtraKeys$(z.object({
|
|
92
93
|
action: discriminatedUnion("type", {
|
|
93
94
|
search: z.lazy(() => OutputWebSearchCallItemActionSearch$inboundSchema),
|
|
94
95
|
open_page: z.lazy(() => ActionOpenPage$inboundSchema),
|
|
@@ -97,7 +98,7 @@ export const OutputWebSearchCallItem$inboundSchema = z.object({
|
|
|
97
98
|
id: z.string(),
|
|
98
99
|
status: WebSearchStatus$inboundSchema,
|
|
99
100
|
type: TypeWebSearchCall$inboundSchema,
|
|
100
|
-
});
|
|
101
|
+
}).catchall(z.any()), "additionalProperties", true);
|
|
101
102
|
/** @internal */
|
|
102
103
|
export const OutputWebSearchCallItem$outboundSchema = z.object({
|
|
103
104
|
action: z.union([
|
|
@@ -108,6 +109,14 @@ export const OutputWebSearchCallItem$outboundSchema = z.object({
|
|
|
108
109
|
id: z.string(),
|
|
109
110
|
status: WebSearchStatus$outboundSchema,
|
|
110
111
|
type: TypeWebSearchCall$outboundSchema,
|
|
112
|
+
additionalProperties: z.record(z.string(), z.any()).optional(),
|
|
113
|
+
}).transform((v) => {
|
|
114
|
+
return {
|
|
115
|
+
...v.additionalProperties,
|
|
116
|
+
...remap$(v, {
|
|
117
|
+
additionalProperties: null,
|
|
118
|
+
}),
|
|
119
|
+
};
|
|
111
120
|
});
|
|
112
121
|
export function outputWebSearchCallItemToJSON(outputWebSearchCallItem) {
|
|
113
122
|
return JSON.stringify(OutputWebSearchCallItem$outboundSchema.parse(outputWebSearchCallItem));
|
|
@@ -4,6 +4,11 @@ import { Result as SafeParseResult } from "../types/fp.js";
|
|
|
4
4
|
import { AnnotationAddedEvent } from "./annotationaddedevent.js";
|
|
5
5
|
import { ApplyPatchCallOperationDiffDeltaEvent } from "./applypatchcalloperationdiffdeltaevent.js";
|
|
6
6
|
import { ApplyPatchCallOperationDiffDoneEvent } from "./applypatchcalloperationdiffdoneevent.js";
|
|
7
|
+
import { CodeInterpreterCallCodeDeltaEvent } from "./codeinterpretercallcodedeltaevent.js";
|
|
8
|
+
import { CodeInterpreterCallCodeDoneEvent } from "./codeinterpretercallcodedoneevent.js";
|
|
9
|
+
import { CodeInterpreterCallCompletedEvent } from "./codeinterpretercallcompletedevent.js";
|
|
10
|
+
import { CodeInterpreterCallInProgressEvent } from "./codeinterpretercallinprogressevent.js";
|
|
11
|
+
import { CodeInterpreterCallInterpretingEvent } from "./codeinterpretercallinterpretingevent.js";
|
|
7
12
|
import { ContentPartAddedEvent } from "./contentpartaddedevent.js";
|
|
8
13
|
import { ContentPartDoneEvent } from "./contentpartdoneevent.js";
|
|
9
14
|
import { CustomToolCallInputDeltaEvent } from "./customtoolcallinputdeltaevent.js";
|
|
@@ -49,7 +54,7 @@ import { WebSearchCallSearchingEvent } from "./websearchcallsearchingevent.js";
|
|
|
49
54
|
/**
|
|
50
55
|
* Union of all possible event types emitted during response streaming
|
|
51
56
|
*/
|
|
52
|
-
export type StreamEvents = ErrorEvent | ApplyPatchCallOperationDiffDeltaEvent | ApplyPatchCallOperationDiffDoneEvent | StreamEventsResponseCompleted | ContentPartAddedEvent | ContentPartDoneEvent | OpenResponsesCreatedEvent | CustomToolCallInputDeltaEvent | CustomToolCallInputDoneEvent | DebugEvent | StreamEventsResponseFailed | FunctionCallArgsDeltaEvent | FunctionCallArgsDoneEvent | FusionCallAnalysisCompletedEvent | FusionCallAnalysisInProgressEvent | FusionCallCompletedEvent | FusionCallInProgressEvent | FusionCallPanelAddedEvent | FusionCallPanelCompletedEvent | FusionCallPanelDeltaEvent | FusionCallPanelFailedEvent | FusionCallPanelReasoningDeltaEvent | ImageGenCallCompletedEvent | ImageGenCallGeneratingEvent | ImageGenCallInProgressEvent | ImageGenCallPartialImageEvent | OpenResponsesInProgressEvent | StreamEventsResponseIncomplete | StreamEventsResponseOutputItemAdded | StreamEventsResponseOutputItemDone | AnnotationAddedEvent | TextDeltaEvent | TextDoneEvent | ReasoningSummaryPartAddedEvent | ReasoningSummaryPartDoneEvent | ReasoningSummaryTextDeltaEvent | ReasoningSummaryTextDoneEvent | ReasoningDeltaEvent | ReasoningDoneEvent | RefusalDeltaEvent | RefusalDoneEvent | WebSearchCallCompletedEvent | WebSearchCallInProgressEvent | WebSearchCallSearchingEvent | discriminatedUnionTypes.Unknown<"type">;
|
|
57
|
+
export type StreamEvents = ErrorEvent | ApplyPatchCallOperationDiffDeltaEvent | ApplyPatchCallOperationDiffDoneEvent | CodeInterpreterCallCodeDeltaEvent | CodeInterpreterCallCodeDoneEvent | CodeInterpreterCallCompletedEvent | CodeInterpreterCallInProgressEvent | CodeInterpreterCallInterpretingEvent | StreamEventsResponseCompleted | ContentPartAddedEvent | ContentPartDoneEvent | OpenResponsesCreatedEvent | CustomToolCallInputDeltaEvent | CustomToolCallInputDoneEvent | DebugEvent | StreamEventsResponseFailed | FunctionCallArgsDeltaEvent | FunctionCallArgsDoneEvent | FusionCallAnalysisCompletedEvent | FusionCallAnalysisInProgressEvent | FusionCallCompletedEvent | FusionCallInProgressEvent | FusionCallPanelAddedEvent | FusionCallPanelCompletedEvent | FusionCallPanelDeltaEvent | FusionCallPanelFailedEvent | FusionCallPanelReasoningDeltaEvent | ImageGenCallCompletedEvent | ImageGenCallGeneratingEvent | ImageGenCallInProgressEvent | ImageGenCallPartialImageEvent | OpenResponsesInProgressEvent | StreamEventsResponseIncomplete | StreamEventsResponseOutputItemAdded | StreamEventsResponseOutputItemDone | AnnotationAddedEvent | TextDeltaEvent | TextDoneEvent | ReasoningSummaryPartAddedEvent | ReasoningSummaryPartDoneEvent | ReasoningSummaryTextDeltaEvent | ReasoningSummaryTextDoneEvent | ReasoningDeltaEvent | ReasoningDoneEvent | RefusalDeltaEvent | RefusalDoneEvent | WebSearchCallCompletedEvent | WebSearchCallInProgressEvent | WebSearchCallSearchingEvent | discriminatedUnionTypes.Unknown<"type">;
|
|
53
58
|
/** @internal */
|
|
54
59
|
export declare const StreamEvents$inboundSchema: z.ZodType<StreamEvents, unknown>;
|
|
55
60
|
export declare function streamEventsFromJSON(jsonString: string): SafeParseResult<StreamEvents, SDKValidationError>;
|
|
@@ -7,6 +7,11 @@ import { discriminatedUnion } from "../types/discriminatedUnion.js";
|
|
|
7
7
|
import { AnnotationAddedEvent$inboundSchema, } from "./annotationaddedevent.js";
|
|
8
8
|
import { ApplyPatchCallOperationDiffDeltaEvent$inboundSchema, } from "./applypatchcalloperationdiffdeltaevent.js";
|
|
9
9
|
import { ApplyPatchCallOperationDiffDoneEvent$inboundSchema, } from "./applypatchcalloperationdiffdoneevent.js";
|
|
10
|
+
import { CodeInterpreterCallCodeDeltaEvent$inboundSchema, } from "./codeinterpretercallcodedeltaevent.js";
|
|
11
|
+
import { CodeInterpreterCallCodeDoneEvent$inboundSchema, } from "./codeinterpretercallcodedoneevent.js";
|
|
12
|
+
import { CodeInterpreterCallCompletedEvent$inboundSchema, } from "./codeinterpretercallcompletedevent.js";
|
|
13
|
+
import { CodeInterpreterCallInProgressEvent$inboundSchema, } from "./codeinterpretercallinprogressevent.js";
|
|
14
|
+
import { CodeInterpreterCallInterpretingEvent$inboundSchema, } from "./codeinterpretercallinterpretingevent.js";
|
|
10
15
|
import { ContentPartAddedEvent$inboundSchema, } from "./contentpartaddedevent.js";
|
|
11
16
|
import { ContentPartDoneEvent$inboundSchema, } from "./contentpartdoneevent.js";
|
|
12
17
|
import { CustomToolCallInputDeltaEvent$inboundSchema, } from "./customtoolcallinputdeltaevent.js";
|
|
@@ -53,6 +58,11 @@ export const StreamEvents$inboundSchema = discriminatedUnion("type", {
|
|
|
53
58
|
error: ErrorEvent$inboundSchema,
|
|
54
59
|
["response.apply_patch_call_operation_diff.delta"]: ApplyPatchCallOperationDiffDeltaEvent$inboundSchema,
|
|
55
60
|
["response.apply_patch_call_operation_diff.done"]: ApplyPatchCallOperationDiffDoneEvent$inboundSchema,
|
|
61
|
+
["response.code_interpreter_call_code.delta"]: CodeInterpreterCallCodeDeltaEvent$inboundSchema,
|
|
62
|
+
["response.code_interpreter_call_code.done"]: CodeInterpreterCallCodeDoneEvent$inboundSchema,
|
|
63
|
+
["response.code_interpreter_call.completed"]: CodeInterpreterCallCompletedEvent$inboundSchema,
|
|
64
|
+
["response.code_interpreter_call.in_progress"]: CodeInterpreterCallInProgressEvent$inboundSchema,
|
|
65
|
+
["response.code_interpreter_call.interpreting"]: CodeInterpreterCallInterpretingEvent$inboundSchema,
|
|
56
66
|
["response.completed"]: StreamEventsResponseCompleted$inboundSchema,
|
|
57
67
|
["response.content_part.added"]: ContentPartAddedEvent$inboundSchema,
|
|
58
68
|
["response.content_part.done"]: ContentPartDoneEvent$inboundSchema,
|
package/jsr.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openrouter/sdk",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.21",
|
|
4
4
|
"author": "OpenRouter",
|
|
5
5
|
"description": "The OpenRouter TypeScript SDK is a type-safe toolkit for building AI applications with access to 400+ language models through a unified API.",
|
|
6
6
|
"keywords": [
|
|
@@ -73,14 +73,14 @@
|
|
|
73
73
|
"lint": "eslint --cache --max-warnings=0 src",
|
|
74
74
|
"build": "tsc",
|
|
75
75
|
"prepublishOnly": "npm run build",
|
|
76
|
-
"compile": "tsc",
|
|
77
76
|
"prepare": "npm run build",
|
|
78
|
-
"test:
|
|
77
|
+
"test:e2e": "vitest --run --project e2e",
|
|
78
|
+
"test:transit": "exit 0",
|
|
79
79
|
"typecheck:transit": "exit 0",
|
|
80
|
+
"compile": "tsc",
|
|
80
81
|
"postinstall": "node scripts/check-types.js || true",
|
|
81
82
|
"test": "vitest --run --project unit",
|
|
82
|
-
"test:
|
|
83
|
-
"test:transit": "exit 0",
|
|
83
|
+
"test:watch": "vitest --watch --project unit",
|
|
84
84
|
"typecheck": "tsc --noEmit"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {},
|