@openrouter/sdk 0.0.1-beta.5 → 0.0.1-beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/models/index.d.ts +7 -0
- package/models/index.js +7 -0
- package/models/openresponsesinputitem.d.ts +8 -461
- package/models/openresponsesinputitem.js +18 -466
- package/models/openresponseswebsearchpreview20250311tool.d.ts +11 -65
- package/models/openresponseswebsearchpreview20250311tool.js +18 -65
- package/models/openresponseswebsearchpreviewtool.d.ts +11 -65
- package/models/openresponseswebsearchpreviewtool.js +17 -66
- package/models/responsesimagegenerationcall.d.ts +58 -0
- package/models/responsesimagegenerationcall.js +55 -0
- package/models/responsesoutputitem.d.ts +8 -461
- package/models/responsesoutputitem.js +18 -464
- package/models/responsesoutputitemfilesearchcall.d.ts +58 -0
- package/models/responsesoutputitemfilesearchcall.js +55 -0
- package/models/responsesoutputitemfunctioncall.d.ts +59 -0
- package/models/responsesoutputitemfunctioncall.js +65 -0
- package/models/responsesoutputitemreasoning.d.ts +61 -0
- package/models/responsesoutputitemreasoning.js +67 -0
- package/models/responsesoutputmessage.d.ts +191 -0
- package/models/responsesoutputmessage.js +189 -0
- package/models/responseswebsearchcalloutput.d.ts +56 -0
- package/models/responseswebsearchcalloutput.js +53 -0
- package/models/websearchpreviewtooluserlocation.d.ts +59 -0
- package/models/websearchpreviewtooluserlocation.js +56 -0
- package/package.json +1 -1
|
@@ -5,80 +5,32 @@ import * as z from "zod/v3";
|
|
|
5
5
|
import { remap as remap$ } from "../lib/primitives.js";
|
|
6
6
|
import { safeParse } from "../lib/schemas.js";
|
|
7
7
|
import { ResponsesSearchContextSize$inboundSchema, ResponsesSearchContextSize$outboundSchema, } from "./responsessearchcontextsize.js";
|
|
8
|
-
|
|
8
|
+
import { WebSearchPreviewToolUserLocation$inboundSchema, WebSearchPreviewToolUserLocation$outboundSchema, } from "./websearchpreviewtooluserlocation.js";
|
|
9
|
+
export const OpenResponsesWebSearchPreview20250311ToolType = {
|
|
9
10
|
WebSearchPreview20250311: "web_search_preview_2025_03_11",
|
|
10
11
|
};
|
|
11
|
-
export const OpenResponsesWebSearchPreview20250311ToolTypeApproximate = {
|
|
12
|
-
Approximate: "approximate",
|
|
13
|
-
};
|
|
14
12
|
/** @internal */
|
|
15
|
-
export const
|
|
13
|
+
export const OpenResponsesWebSearchPreview20250311ToolType$inboundSchema = z
|
|
14
|
+
.nativeEnum(OpenResponsesWebSearchPreview20250311ToolType);
|
|
16
15
|
/** @internal */
|
|
17
|
-
export const
|
|
16
|
+
export const OpenResponsesWebSearchPreview20250311ToolType$outboundSchema = OpenResponsesWebSearchPreview20250311ToolType$inboundSchema;
|
|
18
17
|
/**
|
|
19
18
|
* @internal
|
|
20
19
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
21
20
|
*/
|
|
22
|
-
export var
|
|
23
|
-
(function (
|
|
24
|
-
/** @deprecated use `
|
|
25
|
-
|
|
26
|
-
/** @deprecated use `
|
|
27
|
-
|
|
28
|
-
})(
|
|
29
|
-
/** @internal */
|
|
30
|
-
export const OpenResponsesWebSearchPreview20250311ToolTypeApproximate$inboundSchema = z.nativeEnum(OpenResponsesWebSearchPreview20250311ToolTypeApproximate);
|
|
31
|
-
/** @internal */
|
|
32
|
-
export const OpenResponsesWebSearchPreview20250311ToolTypeApproximate$outboundSchema = OpenResponsesWebSearchPreview20250311ToolTypeApproximate$inboundSchema;
|
|
33
|
-
/**
|
|
34
|
-
* @internal
|
|
35
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
36
|
-
*/
|
|
37
|
-
export var OpenResponsesWebSearchPreview20250311ToolTypeApproximate$;
|
|
38
|
-
(function (OpenResponsesWebSearchPreview20250311ToolTypeApproximate$) {
|
|
39
|
-
/** @deprecated use `OpenResponsesWebSearchPreview20250311ToolTypeApproximate$inboundSchema` instead. */
|
|
40
|
-
OpenResponsesWebSearchPreview20250311ToolTypeApproximate$.inboundSchema = OpenResponsesWebSearchPreview20250311ToolTypeApproximate$inboundSchema;
|
|
41
|
-
/** @deprecated use `OpenResponsesWebSearchPreview20250311ToolTypeApproximate$outboundSchema` instead. */
|
|
42
|
-
OpenResponsesWebSearchPreview20250311ToolTypeApproximate$.outboundSchema = OpenResponsesWebSearchPreview20250311ToolTypeApproximate$outboundSchema;
|
|
43
|
-
})(OpenResponsesWebSearchPreview20250311ToolTypeApproximate$ || (OpenResponsesWebSearchPreview20250311ToolTypeApproximate$ = {}));
|
|
44
|
-
/** @internal */
|
|
45
|
-
export const OpenResponsesWebSearchPreview20250311ToolUserLocation$inboundSchema = z.object({
|
|
46
|
-
type: OpenResponsesWebSearchPreview20250311ToolTypeApproximate$inboundSchema,
|
|
47
|
-
city: z.nullable(z.string()).optional(),
|
|
48
|
-
country: z.nullable(z.string()).optional(),
|
|
49
|
-
region: z.nullable(z.string()).optional(),
|
|
50
|
-
timezone: z.nullable(z.string()).optional(),
|
|
51
|
-
});
|
|
52
|
-
/** @internal */
|
|
53
|
-
export const OpenResponsesWebSearchPreview20250311ToolUserLocation$outboundSchema = z.object({
|
|
54
|
-
type: OpenResponsesWebSearchPreview20250311ToolTypeApproximate$outboundSchema,
|
|
55
|
-
city: z.nullable(z.string()).optional(),
|
|
56
|
-
country: z.nullable(z.string()).optional(),
|
|
57
|
-
region: z.nullable(z.string()).optional(),
|
|
58
|
-
timezone: z.nullable(z.string()).optional(),
|
|
59
|
-
});
|
|
60
|
-
/**
|
|
61
|
-
* @internal
|
|
62
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
63
|
-
*/
|
|
64
|
-
export var OpenResponsesWebSearchPreview20250311ToolUserLocation$;
|
|
65
|
-
(function (OpenResponsesWebSearchPreview20250311ToolUserLocation$) {
|
|
66
|
-
/** @deprecated use `OpenResponsesWebSearchPreview20250311ToolUserLocation$inboundSchema` instead. */
|
|
67
|
-
OpenResponsesWebSearchPreview20250311ToolUserLocation$.inboundSchema = OpenResponsesWebSearchPreview20250311ToolUserLocation$inboundSchema;
|
|
68
|
-
/** @deprecated use `OpenResponsesWebSearchPreview20250311ToolUserLocation$outboundSchema` instead. */
|
|
69
|
-
OpenResponsesWebSearchPreview20250311ToolUserLocation$.outboundSchema = OpenResponsesWebSearchPreview20250311ToolUserLocation$outboundSchema;
|
|
70
|
-
})(OpenResponsesWebSearchPreview20250311ToolUserLocation$ || (OpenResponsesWebSearchPreview20250311ToolUserLocation$ = {}));
|
|
71
|
-
export function openResponsesWebSearchPreview20250311ToolUserLocationToJSON(openResponsesWebSearchPreview20250311ToolUserLocation) {
|
|
72
|
-
return JSON.stringify(OpenResponsesWebSearchPreview20250311ToolUserLocation$outboundSchema.parse(openResponsesWebSearchPreview20250311ToolUserLocation));
|
|
73
|
-
}
|
|
74
|
-
export function openResponsesWebSearchPreview20250311ToolUserLocationFromJSON(jsonString) {
|
|
75
|
-
return safeParse(jsonString, (x) => OpenResponsesWebSearchPreview20250311ToolUserLocation$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OpenResponsesWebSearchPreview20250311ToolUserLocation' from JSON`);
|
|
76
|
-
}
|
|
21
|
+
export var OpenResponsesWebSearchPreview20250311ToolType$;
|
|
22
|
+
(function (OpenResponsesWebSearchPreview20250311ToolType$) {
|
|
23
|
+
/** @deprecated use `OpenResponsesWebSearchPreview20250311ToolType$inboundSchema` instead. */
|
|
24
|
+
OpenResponsesWebSearchPreview20250311ToolType$.inboundSchema = OpenResponsesWebSearchPreview20250311ToolType$inboundSchema;
|
|
25
|
+
/** @deprecated use `OpenResponsesWebSearchPreview20250311ToolType$outboundSchema` instead. */
|
|
26
|
+
OpenResponsesWebSearchPreview20250311ToolType$.outboundSchema = OpenResponsesWebSearchPreview20250311ToolType$outboundSchema;
|
|
27
|
+
})(OpenResponsesWebSearchPreview20250311ToolType$ || (OpenResponsesWebSearchPreview20250311ToolType$ = {}));
|
|
77
28
|
/** @internal */
|
|
78
29
|
export const OpenResponsesWebSearchPreview20250311Tool$inboundSchema = z.object({
|
|
79
|
-
type:
|
|
30
|
+
type: OpenResponsesWebSearchPreview20250311ToolType$inboundSchema,
|
|
80
31
|
search_context_size: ResponsesSearchContextSize$inboundSchema.optional(),
|
|
81
|
-
user_location: z.nullable(
|
|
32
|
+
user_location: z.nullable(WebSearchPreviewToolUserLocation$inboundSchema)
|
|
33
|
+
.optional(),
|
|
82
34
|
}).transform((v) => {
|
|
83
35
|
return remap$(v, {
|
|
84
36
|
"search_context_size": "searchContextSize",
|
|
@@ -87,9 +39,10 @@ export const OpenResponsesWebSearchPreview20250311Tool$inboundSchema = z.object(
|
|
|
87
39
|
});
|
|
88
40
|
/** @internal */
|
|
89
41
|
export const OpenResponsesWebSearchPreview20250311Tool$outboundSchema = z.object({
|
|
90
|
-
type:
|
|
42
|
+
type: OpenResponsesWebSearchPreview20250311ToolType$outboundSchema,
|
|
91
43
|
searchContextSize: ResponsesSearchContextSize$outboundSchema.optional(),
|
|
92
|
-
userLocation: z.nullable(
|
|
44
|
+
userLocation: z.nullable(WebSearchPreviewToolUserLocation$outboundSchema)
|
|
45
|
+
.optional(),
|
|
93
46
|
}).transform((v) => {
|
|
94
47
|
return remap$(v, {
|
|
95
48
|
searchContextSize: "search_context_size",
|
|
@@ -3,101 +3,47 @@ import { ClosedEnum } from "../types/enums.js";
|
|
|
3
3
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
4
4
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
5
5
|
import { ResponsesSearchContextSize } from "./responsessearchcontextsize.js";
|
|
6
|
-
|
|
6
|
+
import { WebSearchPreviewToolUserLocation, WebSearchPreviewToolUserLocation$Outbound } from "./websearchpreviewtooluserlocation.js";
|
|
7
|
+
export declare const OpenResponsesWebSearchPreviewToolType: {
|
|
7
8
|
readonly WebSearchPreview: "web_search_preview";
|
|
8
9
|
};
|
|
9
|
-
export type
|
|
10
|
-
export declare const OpenResponsesWebSearchPreviewToolTypeApproximate: {
|
|
11
|
-
readonly Approximate: "approximate";
|
|
12
|
-
};
|
|
13
|
-
export type OpenResponsesWebSearchPreviewToolTypeApproximate = ClosedEnum<typeof OpenResponsesWebSearchPreviewToolTypeApproximate>;
|
|
14
|
-
export type OpenResponsesWebSearchPreviewToolUserLocation = {
|
|
15
|
-
type: OpenResponsesWebSearchPreviewToolTypeApproximate;
|
|
16
|
-
city?: string | null | undefined;
|
|
17
|
-
country?: string | null | undefined;
|
|
18
|
-
region?: string | null | undefined;
|
|
19
|
-
timezone?: string | null | undefined;
|
|
20
|
-
};
|
|
10
|
+
export type OpenResponsesWebSearchPreviewToolType = ClosedEnum<typeof OpenResponsesWebSearchPreviewToolType>;
|
|
21
11
|
/**
|
|
22
12
|
* Web search preview tool configuration
|
|
23
13
|
*/
|
|
24
14
|
export type OpenResponsesWebSearchPreviewTool = {
|
|
25
|
-
type:
|
|
15
|
+
type: OpenResponsesWebSearchPreviewToolType;
|
|
26
16
|
/**
|
|
27
17
|
* Size of the search context for web search tools
|
|
28
18
|
*/
|
|
29
19
|
searchContextSize?: ResponsesSearchContextSize | undefined;
|
|
30
|
-
userLocation?:
|
|
20
|
+
userLocation?: WebSearchPreviewToolUserLocation | null | undefined;
|
|
31
21
|
};
|
|
32
22
|
/** @internal */
|
|
33
|
-
export declare const
|
|
23
|
+
export declare const OpenResponsesWebSearchPreviewToolType$inboundSchema: z.ZodNativeEnum<typeof OpenResponsesWebSearchPreviewToolType>;
|
|
34
24
|
/** @internal */
|
|
35
|
-
export declare const
|
|
25
|
+
export declare const OpenResponsesWebSearchPreviewToolType$outboundSchema: z.ZodNativeEnum<typeof OpenResponsesWebSearchPreviewToolType>;
|
|
36
26
|
/**
|
|
37
27
|
* @internal
|
|
38
28
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
39
29
|
*/
|
|
40
|
-
export declare namespace
|
|
41
|
-
/** @deprecated use `
|
|
30
|
+
export declare namespace OpenResponsesWebSearchPreviewToolType$ {
|
|
31
|
+
/** @deprecated use `OpenResponsesWebSearchPreviewToolType$inboundSchema` instead. */
|
|
42
32
|
const inboundSchema: z.ZodNativeEnum<{
|
|
43
33
|
readonly WebSearchPreview: "web_search_preview";
|
|
44
34
|
}>;
|
|
45
|
-
/** @deprecated use `
|
|
35
|
+
/** @deprecated use `OpenResponsesWebSearchPreviewToolType$outboundSchema` instead. */
|
|
46
36
|
const outboundSchema: z.ZodNativeEnum<{
|
|
47
37
|
readonly WebSearchPreview: "web_search_preview";
|
|
48
38
|
}>;
|
|
49
39
|
}
|
|
50
40
|
/** @internal */
|
|
51
|
-
export declare const OpenResponsesWebSearchPreviewToolTypeApproximate$inboundSchema: z.ZodNativeEnum<typeof OpenResponsesWebSearchPreviewToolTypeApproximate>;
|
|
52
|
-
/** @internal */
|
|
53
|
-
export declare const OpenResponsesWebSearchPreviewToolTypeApproximate$outboundSchema: z.ZodNativeEnum<typeof OpenResponsesWebSearchPreviewToolTypeApproximate>;
|
|
54
|
-
/**
|
|
55
|
-
* @internal
|
|
56
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
57
|
-
*/
|
|
58
|
-
export declare namespace OpenResponsesWebSearchPreviewToolTypeApproximate$ {
|
|
59
|
-
/** @deprecated use `OpenResponsesWebSearchPreviewToolTypeApproximate$inboundSchema` instead. */
|
|
60
|
-
const inboundSchema: z.ZodNativeEnum<{
|
|
61
|
-
readonly Approximate: "approximate";
|
|
62
|
-
}>;
|
|
63
|
-
/** @deprecated use `OpenResponsesWebSearchPreviewToolTypeApproximate$outboundSchema` instead. */
|
|
64
|
-
const outboundSchema: z.ZodNativeEnum<{
|
|
65
|
-
readonly Approximate: "approximate";
|
|
66
|
-
}>;
|
|
67
|
-
}
|
|
68
|
-
/** @internal */
|
|
69
|
-
export declare const OpenResponsesWebSearchPreviewToolUserLocation$inboundSchema: z.ZodType<OpenResponsesWebSearchPreviewToolUserLocation, z.ZodTypeDef, unknown>;
|
|
70
|
-
/** @internal */
|
|
71
|
-
export type OpenResponsesWebSearchPreviewToolUserLocation$Outbound = {
|
|
72
|
-
type: string;
|
|
73
|
-
city?: string | null | undefined;
|
|
74
|
-
country?: string | null | undefined;
|
|
75
|
-
region?: string | null | undefined;
|
|
76
|
-
timezone?: string | null | undefined;
|
|
77
|
-
};
|
|
78
|
-
/** @internal */
|
|
79
|
-
export declare const OpenResponsesWebSearchPreviewToolUserLocation$outboundSchema: z.ZodType<OpenResponsesWebSearchPreviewToolUserLocation$Outbound, z.ZodTypeDef, OpenResponsesWebSearchPreviewToolUserLocation>;
|
|
80
|
-
/**
|
|
81
|
-
* @internal
|
|
82
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
83
|
-
*/
|
|
84
|
-
export declare namespace OpenResponsesWebSearchPreviewToolUserLocation$ {
|
|
85
|
-
/** @deprecated use `OpenResponsesWebSearchPreviewToolUserLocation$inboundSchema` instead. */
|
|
86
|
-
const inboundSchema: z.ZodType<OpenResponsesWebSearchPreviewToolUserLocation, z.ZodTypeDef, unknown>;
|
|
87
|
-
/** @deprecated use `OpenResponsesWebSearchPreviewToolUserLocation$outboundSchema` instead. */
|
|
88
|
-
const outboundSchema: z.ZodType<OpenResponsesWebSearchPreviewToolUserLocation$Outbound, z.ZodTypeDef, OpenResponsesWebSearchPreviewToolUserLocation>;
|
|
89
|
-
/** @deprecated use `OpenResponsesWebSearchPreviewToolUserLocation$Outbound` instead. */
|
|
90
|
-
type Outbound = OpenResponsesWebSearchPreviewToolUserLocation$Outbound;
|
|
91
|
-
}
|
|
92
|
-
export declare function openResponsesWebSearchPreviewToolUserLocationToJSON(openResponsesWebSearchPreviewToolUserLocation: OpenResponsesWebSearchPreviewToolUserLocation): string;
|
|
93
|
-
export declare function openResponsesWebSearchPreviewToolUserLocationFromJSON(jsonString: string): SafeParseResult<OpenResponsesWebSearchPreviewToolUserLocation, SDKValidationError>;
|
|
94
|
-
/** @internal */
|
|
95
41
|
export declare const OpenResponsesWebSearchPreviewTool$inboundSchema: z.ZodType<OpenResponsesWebSearchPreviewTool, z.ZodTypeDef, unknown>;
|
|
96
42
|
/** @internal */
|
|
97
43
|
export type OpenResponsesWebSearchPreviewTool$Outbound = {
|
|
98
44
|
type: string;
|
|
99
45
|
search_context_size?: string | undefined;
|
|
100
|
-
user_location?:
|
|
46
|
+
user_location?: WebSearchPreviewToolUserLocation$Outbound | null | undefined;
|
|
101
47
|
};
|
|
102
48
|
/** @internal */
|
|
103
49
|
export declare const OpenResponsesWebSearchPreviewTool$outboundSchema: z.ZodType<OpenResponsesWebSearchPreviewTool$Outbound, z.ZodTypeDef, OpenResponsesWebSearchPreviewTool>;
|
|
@@ -5,81 +5,31 @@ import * as z from "zod/v3";
|
|
|
5
5
|
import { remap as remap$ } from "../lib/primitives.js";
|
|
6
6
|
import { safeParse } from "../lib/schemas.js";
|
|
7
7
|
import { ResponsesSearchContextSize$inboundSchema, ResponsesSearchContextSize$outboundSchema, } from "./responsessearchcontextsize.js";
|
|
8
|
-
|
|
8
|
+
import { WebSearchPreviewToolUserLocation$inboundSchema, WebSearchPreviewToolUserLocation$outboundSchema, } from "./websearchpreviewtooluserlocation.js";
|
|
9
|
+
export const OpenResponsesWebSearchPreviewToolType = {
|
|
9
10
|
WebSearchPreview: "web_search_preview",
|
|
10
11
|
};
|
|
11
|
-
export const OpenResponsesWebSearchPreviewToolTypeApproximate = {
|
|
12
|
-
Approximate: "approximate",
|
|
13
|
-
};
|
|
14
12
|
/** @internal */
|
|
15
|
-
export const
|
|
13
|
+
export const OpenResponsesWebSearchPreviewToolType$inboundSchema = z.nativeEnum(OpenResponsesWebSearchPreviewToolType);
|
|
16
14
|
/** @internal */
|
|
17
|
-
export const
|
|
15
|
+
export const OpenResponsesWebSearchPreviewToolType$outboundSchema = OpenResponsesWebSearchPreviewToolType$inboundSchema;
|
|
18
16
|
/**
|
|
19
17
|
* @internal
|
|
20
18
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
21
19
|
*/
|
|
22
|
-
export var
|
|
23
|
-
(function (
|
|
24
|
-
/** @deprecated use `
|
|
25
|
-
|
|
26
|
-
/** @deprecated use `
|
|
27
|
-
|
|
28
|
-
})(
|
|
29
|
-
/** @internal */
|
|
30
|
-
export const OpenResponsesWebSearchPreviewToolTypeApproximate$inboundSchema = z
|
|
31
|
-
.nativeEnum(OpenResponsesWebSearchPreviewToolTypeApproximate);
|
|
32
|
-
/** @internal */
|
|
33
|
-
export const OpenResponsesWebSearchPreviewToolTypeApproximate$outboundSchema = OpenResponsesWebSearchPreviewToolTypeApproximate$inboundSchema;
|
|
34
|
-
/**
|
|
35
|
-
* @internal
|
|
36
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
37
|
-
*/
|
|
38
|
-
export var OpenResponsesWebSearchPreviewToolTypeApproximate$;
|
|
39
|
-
(function (OpenResponsesWebSearchPreviewToolTypeApproximate$) {
|
|
40
|
-
/** @deprecated use `OpenResponsesWebSearchPreviewToolTypeApproximate$inboundSchema` instead. */
|
|
41
|
-
OpenResponsesWebSearchPreviewToolTypeApproximate$.inboundSchema = OpenResponsesWebSearchPreviewToolTypeApproximate$inboundSchema;
|
|
42
|
-
/** @deprecated use `OpenResponsesWebSearchPreviewToolTypeApproximate$outboundSchema` instead. */
|
|
43
|
-
OpenResponsesWebSearchPreviewToolTypeApproximate$.outboundSchema = OpenResponsesWebSearchPreviewToolTypeApproximate$outboundSchema;
|
|
44
|
-
})(OpenResponsesWebSearchPreviewToolTypeApproximate$ || (OpenResponsesWebSearchPreviewToolTypeApproximate$ = {}));
|
|
45
|
-
/** @internal */
|
|
46
|
-
export const OpenResponsesWebSearchPreviewToolUserLocation$inboundSchema = z.object({
|
|
47
|
-
type: OpenResponsesWebSearchPreviewToolTypeApproximate$inboundSchema,
|
|
48
|
-
city: z.nullable(z.string()).optional(),
|
|
49
|
-
country: z.nullable(z.string()).optional(),
|
|
50
|
-
region: z.nullable(z.string()).optional(),
|
|
51
|
-
timezone: z.nullable(z.string()).optional(),
|
|
52
|
-
});
|
|
53
|
-
/** @internal */
|
|
54
|
-
export const OpenResponsesWebSearchPreviewToolUserLocation$outboundSchema = z.object({
|
|
55
|
-
type: OpenResponsesWebSearchPreviewToolTypeApproximate$outboundSchema,
|
|
56
|
-
city: z.nullable(z.string()).optional(),
|
|
57
|
-
country: z.nullable(z.string()).optional(),
|
|
58
|
-
region: z.nullable(z.string()).optional(),
|
|
59
|
-
timezone: z.nullable(z.string()).optional(),
|
|
60
|
-
});
|
|
61
|
-
/**
|
|
62
|
-
* @internal
|
|
63
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
64
|
-
*/
|
|
65
|
-
export var OpenResponsesWebSearchPreviewToolUserLocation$;
|
|
66
|
-
(function (OpenResponsesWebSearchPreviewToolUserLocation$) {
|
|
67
|
-
/** @deprecated use `OpenResponsesWebSearchPreviewToolUserLocation$inboundSchema` instead. */
|
|
68
|
-
OpenResponsesWebSearchPreviewToolUserLocation$.inboundSchema = OpenResponsesWebSearchPreviewToolUserLocation$inboundSchema;
|
|
69
|
-
/** @deprecated use `OpenResponsesWebSearchPreviewToolUserLocation$outboundSchema` instead. */
|
|
70
|
-
OpenResponsesWebSearchPreviewToolUserLocation$.outboundSchema = OpenResponsesWebSearchPreviewToolUserLocation$outboundSchema;
|
|
71
|
-
})(OpenResponsesWebSearchPreviewToolUserLocation$ || (OpenResponsesWebSearchPreviewToolUserLocation$ = {}));
|
|
72
|
-
export function openResponsesWebSearchPreviewToolUserLocationToJSON(openResponsesWebSearchPreviewToolUserLocation) {
|
|
73
|
-
return JSON.stringify(OpenResponsesWebSearchPreviewToolUserLocation$outboundSchema.parse(openResponsesWebSearchPreviewToolUserLocation));
|
|
74
|
-
}
|
|
75
|
-
export function openResponsesWebSearchPreviewToolUserLocationFromJSON(jsonString) {
|
|
76
|
-
return safeParse(jsonString, (x) => OpenResponsesWebSearchPreviewToolUserLocation$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OpenResponsesWebSearchPreviewToolUserLocation' from JSON`);
|
|
77
|
-
}
|
|
20
|
+
export var OpenResponsesWebSearchPreviewToolType$;
|
|
21
|
+
(function (OpenResponsesWebSearchPreviewToolType$) {
|
|
22
|
+
/** @deprecated use `OpenResponsesWebSearchPreviewToolType$inboundSchema` instead. */
|
|
23
|
+
OpenResponsesWebSearchPreviewToolType$.inboundSchema = OpenResponsesWebSearchPreviewToolType$inboundSchema;
|
|
24
|
+
/** @deprecated use `OpenResponsesWebSearchPreviewToolType$outboundSchema` instead. */
|
|
25
|
+
OpenResponsesWebSearchPreviewToolType$.outboundSchema = OpenResponsesWebSearchPreviewToolType$outboundSchema;
|
|
26
|
+
})(OpenResponsesWebSearchPreviewToolType$ || (OpenResponsesWebSearchPreviewToolType$ = {}));
|
|
78
27
|
/** @internal */
|
|
79
28
|
export const OpenResponsesWebSearchPreviewTool$inboundSchema = z.object({
|
|
80
|
-
type:
|
|
29
|
+
type: OpenResponsesWebSearchPreviewToolType$inboundSchema,
|
|
81
30
|
search_context_size: ResponsesSearchContextSize$inboundSchema.optional(),
|
|
82
|
-
user_location: z.nullable(
|
|
31
|
+
user_location: z.nullable(WebSearchPreviewToolUserLocation$inboundSchema)
|
|
32
|
+
.optional(),
|
|
83
33
|
}).transform((v) => {
|
|
84
34
|
return remap$(v, {
|
|
85
35
|
"search_context_size": "searchContextSize",
|
|
@@ -88,9 +38,10 @@ export const OpenResponsesWebSearchPreviewTool$inboundSchema = z.object({
|
|
|
88
38
|
});
|
|
89
39
|
/** @internal */
|
|
90
40
|
export const OpenResponsesWebSearchPreviewTool$outboundSchema = z.object({
|
|
91
|
-
type:
|
|
41
|
+
type: OpenResponsesWebSearchPreviewToolType$outboundSchema,
|
|
92
42
|
searchContextSize: ResponsesSearchContextSize$outboundSchema.optional(),
|
|
93
|
-
userLocation: z.nullable(
|
|
43
|
+
userLocation: z.nullable(WebSearchPreviewToolUserLocation$outboundSchema)
|
|
44
|
+
.optional(),
|
|
94
45
|
}).transform((v) => {
|
|
95
46
|
return remap$(v, {
|
|
96
47
|
searchContextSize: "search_context_size",
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import * as z from "zod/v3";
|
|
2
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
3
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
4
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
5
|
+
import { ImageGenerationStatus } from "./imagegenerationstatus.js";
|
|
6
|
+
export declare const ResponsesImageGenerationCallType: {
|
|
7
|
+
readonly ImageGenerationCall: "image_generation_call";
|
|
8
|
+
};
|
|
9
|
+
export type ResponsesImageGenerationCallType = ClosedEnum<typeof ResponsesImageGenerationCallType>;
|
|
10
|
+
export type ResponsesImageGenerationCall = {
|
|
11
|
+
type: ResponsesImageGenerationCallType;
|
|
12
|
+
id: string;
|
|
13
|
+
result: string | null;
|
|
14
|
+
status: ImageGenerationStatus;
|
|
15
|
+
};
|
|
16
|
+
/** @internal */
|
|
17
|
+
export declare const ResponsesImageGenerationCallType$inboundSchema: z.ZodNativeEnum<typeof ResponsesImageGenerationCallType>;
|
|
18
|
+
/** @internal */
|
|
19
|
+
export declare const ResponsesImageGenerationCallType$outboundSchema: z.ZodNativeEnum<typeof ResponsesImageGenerationCallType>;
|
|
20
|
+
/**
|
|
21
|
+
* @internal
|
|
22
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
23
|
+
*/
|
|
24
|
+
export declare namespace ResponsesImageGenerationCallType$ {
|
|
25
|
+
/** @deprecated use `ResponsesImageGenerationCallType$inboundSchema` instead. */
|
|
26
|
+
const inboundSchema: z.ZodNativeEnum<{
|
|
27
|
+
readonly ImageGenerationCall: "image_generation_call";
|
|
28
|
+
}>;
|
|
29
|
+
/** @deprecated use `ResponsesImageGenerationCallType$outboundSchema` instead. */
|
|
30
|
+
const outboundSchema: z.ZodNativeEnum<{
|
|
31
|
+
readonly ImageGenerationCall: "image_generation_call";
|
|
32
|
+
}>;
|
|
33
|
+
}
|
|
34
|
+
/** @internal */
|
|
35
|
+
export declare const ResponsesImageGenerationCall$inboundSchema: z.ZodType<ResponsesImageGenerationCall, z.ZodTypeDef, unknown>;
|
|
36
|
+
/** @internal */
|
|
37
|
+
export type ResponsesImageGenerationCall$Outbound = {
|
|
38
|
+
type: string;
|
|
39
|
+
id: string;
|
|
40
|
+
result: string | null;
|
|
41
|
+
status: string;
|
|
42
|
+
};
|
|
43
|
+
/** @internal */
|
|
44
|
+
export declare const ResponsesImageGenerationCall$outboundSchema: z.ZodType<ResponsesImageGenerationCall$Outbound, z.ZodTypeDef, ResponsesImageGenerationCall>;
|
|
45
|
+
/**
|
|
46
|
+
* @internal
|
|
47
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
48
|
+
*/
|
|
49
|
+
export declare namespace ResponsesImageGenerationCall$ {
|
|
50
|
+
/** @deprecated use `ResponsesImageGenerationCall$inboundSchema` instead. */
|
|
51
|
+
const inboundSchema: z.ZodType<ResponsesImageGenerationCall, z.ZodTypeDef, unknown>;
|
|
52
|
+
/** @deprecated use `ResponsesImageGenerationCall$outboundSchema` instead. */
|
|
53
|
+
const outboundSchema: z.ZodType<ResponsesImageGenerationCall$Outbound, z.ZodTypeDef, ResponsesImageGenerationCall>;
|
|
54
|
+
/** @deprecated use `ResponsesImageGenerationCall$Outbound` instead. */
|
|
55
|
+
type Outbound = ResponsesImageGenerationCall$Outbound;
|
|
56
|
+
}
|
|
57
|
+
export declare function responsesImageGenerationCallToJSON(responsesImageGenerationCall: ResponsesImageGenerationCall): string;
|
|
58
|
+
export declare function responsesImageGenerationCallFromJSON(jsonString: string): SafeParseResult<ResponsesImageGenerationCall, SDKValidationError>;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
import * as z from "zod/v3";
|
|
5
|
+
import { safeParse } from "../lib/schemas.js";
|
|
6
|
+
import { ImageGenerationStatus$inboundSchema, ImageGenerationStatus$outboundSchema, } from "./imagegenerationstatus.js";
|
|
7
|
+
export const ResponsesImageGenerationCallType = {
|
|
8
|
+
ImageGenerationCall: "image_generation_call",
|
|
9
|
+
};
|
|
10
|
+
/** @internal */
|
|
11
|
+
export const ResponsesImageGenerationCallType$inboundSchema = z.nativeEnum(ResponsesImageGenerationCallType);
|
|
12
|
+
/** @internal */
|
|
13
|
+
export const ResponsesImageGenerationCallType$outboundSchema = ResponsesImageGenerationCallType$inboundSchema;
|
|
14
|
+
/**
|
|
15
|
+
* @internal
|
|
16
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
17
|
+
*/
|
|
18
|
+
export var ResponsesImageGenerationCallType$;
|
|
19
|
+
(function (ResponsesImageGenerationCallType$) {
|
|
20
|
+
/** @deprecated use `ResponsesImageGenerationCallType$inboundSchema` instead. */
|
|
21
|
+
ResponsesImageGenerationCallType$.inboundSchema = ResponsesImageGenerationCallType$inboundSchema;
|
|
22
|
+
/** @deprecated use `ResponsesImageGenerationCallType$outboundSchema` instead. */
|
|
23
|
+
ResponsesImageGenerationCallType$.outboundSchema = ResponsesImageGenerationCallType$outboundSchema;
|
|
24
|
+
})(ResponsesImageGenerationCallType$ || (ResponsesImageGenerationCallType$ = {}));
|
|
25
|
+
/** @internal */
|
|
26
|
+
export const ResponsesImageGenerationCall$inboundSchema = z.object({
|
|
27
|
+
type: ResponsesImageGenerationCallType$inboundSchema,
|
|
28
|
+
id: z.string(),
|
|
29
|
+
result: z.nullable(z.string()),
|
|
30
|
+
status: ImageGenerationStatus$inboundSchema,
|
|
31
|
+
});
|
|
32
|
+
/** @internal */
|
|
33
|
+
export const ResponsesImageGenerationCall$outboundSchema = z.object({
|
|
34
|
+
type: ResponsesImageGenerationCallType$outboundSchema,
|
|
35
|
+
id: z.string(),
|
|
36
|
+
result: z.nullable(z.string()),
|
|
37
|
+
status: ImageGenerationStatus$outboundSchema,
|
|
38
|
+
});
|
|
39
|
+
/**
|
|
40
|
+
* @internal
|
|
41
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
42
|
+
*/
|
|
43
|
+
export var ResponsesImageGenerationCall$;
|
|
44
|
+
(function (ResponsesImageGenerationCall$) {
|
|
45
|
+
/** @deprecated use `ResponsesImageGenerationCall$inboundSchema` instead. */
|
|
46
|
+
ResponsesImageGenerationCall$.inboundSchema = ResponsesImageGenerationCall$inboundSchema;
|
|
47
|
+
/** @deprecated use `ResponsesImageGenerationCall$outboundSchema` instead. */
|
|
48
|
+
ResponsesImageGenerationCall$.outboundSchema = ResponsesImageGenerationCall$outboundSchema;
|
|
49
|
+
})(ResponsesImageGenerationCall$ || (ResponsesImageGenerationCall$ = {}));
|
|
50
|
+
export function responsesImageGenerationCallToJSON(responsesImageGenerationCall) {
|
|
51
|
+
return JSON.stringify(ResponsesImageGenerationCall$outboundSchema.parse(responsesImageGenerationCall));
|
|
52
|
+
}
|
|
53
|
+
export function responsesImageGenerationCallFromJSON(jsonString) {
|
|
54
|
+
return safeParse(jsonString, (x) => ResponsesImageGenerationCall$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResponsesImageGenerationCall' from JSON`);
|
|
55
|
+
}
|