@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
|
@@ -0,0 +1,56 @@
|
|
|
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 { WebSearchStatus } from "./websearchstatus.js";
|
|
6
|
+
export declare const ResponsesWebSearchCallOutputType: {
|
|
7
|
+
readonly WebSearchCall: "web_search_call";
|
|
8
|
+
};
|
|
9
|
+
export type ResponsesWebSearchCallOutputType = ClosedEnum<typeof ResponsesWebSearchCallOutputType>;
|
|
10
|
+
export type ResponsesWebSearchCallOutput = {
|
|
11
|
+
type: ResponsesWebSearchCallOutputType;
|
|
12
|
+
id: string;
|
|
13
|
+
status: WebSearchStatus;
|
|
14
|
+
};
|
|
15
|
+
/** @internal */
|
|
16
|
+
export declare const ResponsesWebSearchCallOutputType$inboundSchema: z.ZodNativeEnum<typeof ResponsesWebSearchCallOutputType>;
|
|
17
|
+
/** @internal */
|
|
18
|
+
export declare const ResponsesWebSearchCallOutputType$outboundSchema: z.ZodNativeEnum<typeof ResponsesWebSearchCallOutputType>;
|
|
19
|
+
/**
|
|
20
|
+
* @internal
|
|
21
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
22
|
+
*/
|
|
23
|
+
export declare namespace ResponsesWebSearchCallOutputType$ {
|
|
24
|
+
/** @deprecated use `ResponsesWebSearchCallOutputType$inboundSchema` instead. */
|
|
25
|
+
const inboundSchema: z.ZodNativeEnum<{
|
|
26
|
+
readonly WebSearchCall: "web_search_call";
|
|
27
|
+
}>;
|
|
28
|
+
/** @deprecated use `ResponsesWebSearchCallOutputType$outboundSchema` instead. */
|
|
29
|
+
const outboundSchema: z.ZodNativeEnum<{
|
|
30
|
+
readonly WebSearchCall: "web_search_call";
|
|
31
|
+
}>;
|
|
32
|
+
}
|
|
33
|
+
/** @internal */
|
|
34
|
+
export declare const ResponsesWebSearchCallOutput$inboundSchema: z.ZodType<ResponsesWebSearchCallOutput, z.ZodTypeDef, unknown>;
|
|
35
|
+
/** @internal */
|
|
36
|
+
export type ResponsesWebSearchCallOutput$Outbound = {
|
|
37
|
+
type: string;
|
|
38
|
+
id: string;
|
|
39
|
+
status: string;
|
|
40
|
+
};
|
|
41
|
+
/** @internal */
|
|
42
|
+
export declare const ResponsesWebSearchCallOutput$outboundSchema: z.ZodType<ResponsesWebSearchCallOutput$Outbound, z.ZodTypeDef, ResponsesWebSearchCallOutput>;
|
|
43
|
+
/**
|
|
44
|
+
* @internal
|
|
45
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
46
|
+
*/
|
|
47
|
+
export declare namespace ResponsesWebSearchCallOutput$ {
|
|
48
|
+
/** @deprecated use `ResponsesWebSearchCallOutput$inboundSchema` instead. */
|
|
49
|
+
const inboundSchema: z.ZodType<ResponsesWebSearchCallOutput, z.ZodTypeDef, unknown>;
|
|
50
|
+
/** @deprecated use `ResponsesWebSearchCallOutput$outboundSchema` instead. */
|
|
51
|
+
const outboundSchema: z.ZodType<ResponsesWebSearchCallOutput$Outbound, z.ZodTypeDef, ResponsesWebSearchCallOutput>;
|
|
52
|
+
/** @deprecated use `ResponsesWebSearchCallOutput$Outbound` instead. */
|
|
53
|
+
type Outbound = ResponsesWebSearchCallOutput$Outbound;
|
|
54
|
+
}
|
|
55
|
+
export declare function responsesWebSearchCallOutputToJSON(responsesWebSearchCallOutput: ResponsesWebSearchCallOutput): string;
|
|
56
|
+
export declare function responsesWebSearchCallOutputFromJSON(jsonString: string): SafeParseResult<ResponsesWebSearchCallOutput, SDKValidationError>;
|
|
@@ -0,0 +1,53 @@
|
|
|
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 { WebSearchStatus$inboundSchema, WebSearchStatus$outboundSchema, } from "./websearchstatus.js";
|
|
7
|
+
export const ResponsesWebSearchCallOutputType = {
|
|
8
|
+
WebSearchCall: "web_search_call",
|
|
9
|
+
};
|
|
10
|
+
/** @internal */
|
|
11
|
+
export const ResponsesWebSearchCallOutputType$inboundSchema = z.nativeEnum(ResponsesWebSearchCallOutputType);
|
|
12
|
+
/** @internal */
|
|
13
|
+
export const ResponsesWebSearchCallOutputType$outboundSchema = ResponsesWebSearchCallOutputType$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 ResponsesWebSearchCallOutputType$;
|
|
19
|
+
(function (ResponsesWebSearchCallOutputType$) {
|
|
20
|
+
/** @deprecated use `ResponsesWebSearchCallOutputType$inboundSchema` instead. */
|
|
21
|
+
ResponsesWebSearchCallOutputType$.inboundSchema = ResponsesWebSearchCallOutputType$inboundSchema;
|
|
22
|
+
/** @deprecated use `ResponsesWebSearchCallOutputType$outboundSchema` instead. */
|
|
23
|
+
ResponsesWebSearchCallOutputType$.outboundSchema = ResponsesWebSearchCallOutputType$outboundSchema;
|
|
24
|
+
})(ResponsesWebSearchCallOutputType$ || (ResponsesWebSearchCallOutputType$ = {}));
|
|
25
|
+
/** @internal */
|
|
26
|
+
export const ResponsesWebSearchCallOutput$inboundSchema = z.object({
|
|
27
|
+
type: ResponsesWebSearchCallOutputType$inboundSchema,
|
|
28
|
+
id: z.string(),
|
|
29
|
+
status: WebSearchStatus$inboundSchema,
|
|
30
|
+
});
|
|
31
|
+
/** @internal */
|
|
32
|
+
export const ResponsesWebSearchCallOutput$outboundSchema = z.object({
|
|
33
|
+
type: ResponsesWebSearchCallOutputType$outboundSchema,
|
|
34
|
+
id: z.string(),
|
|
35
|
+
status: WebSearchStatus$outboundSchema,
|
|
36
|
+
});
|
|
37
|
+
/**
|
|
38
|
+
* @internal
|
|
39
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
40
|
+
*/
|
|
41
|
+
export var ResponsesWebSearchCallOutput$;
|
|
42
|
+
(function (ResponsesWebSearchCallOutput$) {
|
|
43
|
+
/** @deprecated use `ResponsesWebSearchCallOutput$inboundSchema` instead. */
|
|
44
|
+
ResponsesWebSearchCallOutput$.inboundSchema = ResponsesWebSearchCallOutput$inboundSchema;
|
|
45
|
+
/** @deprecated use `ResponsesWebSearchCallOutput$outboundSchema` instead. */
|
|
46
|
+
ResponsesWebSearchCallOutput$.outboundSchema = ResponsesWebSearchCallOutput$outboundSchema;
|
|
47
|
+
})(ResponsesWebSearchCallOutput$ || (ResponsesWebSearchCallOutput$ = {}));
|
|
48
|
+
export function responsesWebSearchCallOutputToJSON(responsesWebSearchCallOutput) {
|
|
49
|
+
return JSON.stringify(ResponsesWebSearchCallOutput$outboundSchema.parse(responsesWebSearchCallOutput));
|
|
50
|
+
}
|
|
51
|
+
export function responsesWebSearchCallOutputFromJSON(jsonString) {
|
|
52
|
+
return safeParse(jsonString, (x) => ResponsesWebSearchCallOutput$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResponsesWebSearchCallOutput' from JSON`);
|
|
53
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
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
|
+
export declare const WebSearchPreviewToolUserLocationType: {
|
|
6
|
+
readonly Approximate: "approximate";
|
|
7
|
+
};
|
|
8
|
+
export type WebSearchPreviewToolUserLocationType = ClosedEnum<typeof WebSearchPreviewToolUserLocationType>;
|
|
9
|
+
export type WebSearchPreviewToolUserLocation = {
|
|
10
|
+
type: WebSearchPreviewToolUserLocationType;
|
|
11
|
+
city?: string | null | undefined;
|
|
12
|
+
country?: string | null | undefined;
|
|
13
|
+
region?: string | null | undefined;
|
|
14
|
+
timezone?: string | null | undefined;
|
|
15
|
+
};
|
|
16
|
+
/** @internal */
|
|
17
|
+
export declare const WebSearchPreviewToolUserLocationType$inboundSchema: z.ZodNativeEnum<typeof WebSearchPreviewToolUserLocationType>;
|
|
18
|
+
/** @internal */
|
|
19
|
+
export declare const WebSearchPreviewToolUserLocationType$outboundSchema: z.ZodNativeEnum<typeof WebSearchPreviewToolUserLocationType>;
|
|
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 WebSearchPreviewToolUserLocationType$ {
|
|
25
|
+
/** @deprecated use `WebSearchPreviewToolUserLocationType$inboundSchema` instead. */
|
|
26
|
+
const inboundSchema: z.ZodNativeEnum<{
|
|
27
|
+
readonly Approximate: "approximate";
|
|
28
|
+
}>;
|
|
29
|
+
/** @deprecated use `WebSearchPreviewToolUserLocationType$outboundSchema` instead. */
|
|
30
|
+
const outboundSchema: z.ZodNativeEnum<{
|
|
31
|
+
readonly Approximate: "approximate";
|
|
32
|
+
}>;
|
|
33
|
+
}
|
|
34
|
+
/** @internal */
|
|
35
|
+
export declare const WebSearchPreviewToolUserLocation$inboundSchema: z.ZodType<WebSearchPreviewToolUserLocation, z.ZodTypeDef, unknown>;
|
|
36
|
+
/** @internal */
|
|
37
|
+
export type WebSearchPreviewToolUserLocation$Outbound = {
|
|
38
|
+
type: string;
|
|
39
|
+
city?: string | null | undefined;
|
|
40
|
+
country?: string | null | undefined;
|
|
41
|
+
region?: string | null | undefined;
|
|
42
|
+
timezone?: string | null | undefined;
|
|
43
|
+
};
|
|
44
|
+
/** @internal */
|
|
45
|
+
export declare const WebSearchPreviewToolUserLocation$outboundSchema: z.ZodType<WebSearchPreviewToolUserLocation$Outbound, z.ZodTypeDef, WebSearchPreviewToolUserLocation>;
|
|
46
|
+
/**
|
|
47
|
+
* @internal
|
|
48
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
49
|
+
*/
|
|
50
|
+
export declare namespace WebSearchPreviewToolUserLocation$ {
|
|
51
|
+
/** @deprecated use `WebSearchPreviewToolUserLocation$inboundSchema` instead. */
|
|
52
|
+
const inboundSchema: z.ZodType<WebSearchPreviewToolUserLocation, z.ZodTypeDef, unknown>;
|
|
53
|
+
/** @deprecated use `WebSearchPreviewToolUserLocation$outboundSchema` instead. */
|
|
54
|
+
const outboundSchema: z.ZodType<WebSearchPreviewToolUserLocation$Outbound, z.ZodTypeDef, WebSearchPreviewToolUserLocation>;
|
|
55
|
+
/** @deprecated use `WebSearchPreviewToolUserLocation$Outbound` instead. */
|
|
56
|
+
type Outbound = WebSearchPreviewToolUserLocation$Outbound;
|
|
57
|
+
}
|
|
58
|
+
export declare function webSearchPreviewToolUserLocationToJSON(webSearchPreviewToolUserLocation: WebSearchPreviewToolUserLocation): string;
|
|
59
|
+
export declare function webSearchPreviewToolUserLocationFromJSON(jsonString: string): SafeParseResult<WebSearchPreviewToolUserLocation, SDKValidationError>;
|
|
@@ -0,0 +1,56 @@
|
|
|
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
|
+
export const WebSearchPreviewToolUserLocationType = {
|
|
7
|
+
Approximate: "approximate",
|
|
8
|
+
};
|
|
9
|
+
/** @internal */
|
|
10
|
+
export const WebSearchPreviewToolUserLocationType$inboundSchema = z.nativeEnum(WebSearchPreviewToolUserLocationType);
|
|
11
|
+
/** @internal */
|
|
12
|
+
export const WebSearchPreviewToolUserLocationType$outboundSchema = WebSearchPreviewToolUserLocationType$inboundSchema;
|
|
13
|
+
/**
|
|
14
|
+
* @internal
|
|
15
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
16
|
+
*/
|
|
17
|
+
export var WebSearchPreviewToolUserLocationType$;
|
|
18
|
+
(function (WebSearchPreviewToolUserLocationType$) {
|
|
19
|
+
/** @deprecated use `WebSearchPreviewToolUserLocationType$inboundSchema` instead. */
|
|
20
|
+
WebSearchPreviewToolUserLocationType$.inboundSchema = WebSearchPreviewToolUserLocationType$inboundSchema;
|
|
21
|
+
/** @deprecated use `WebSearchPreviewToolUserLocationType$outboundSchema` instead. */
|
|
22
|
+
WebSearchPreviewToolUserLocationType$.outboundSchema = WebSearchPreviewToolUserLocationType$outboundSchema;
|
|
23
|
+
})(WebSearchPreviewToolUserLocationType$ || (WebSearchPreviewToolUserLocationType$ = {}));
|
|
24
|
+
/** @internal */
|
|
25
|
+
export const WebSearchPreviewToolUserLocation$inboundSchema = z.object({
|
|
26
|
+
type: WebSearchPreviewToolUserLocationType$inboundSchema,
|
|
27
|
+
city: z.nullable(z.string()).optional(),
|
|
28
|
+
country: z.nullable(z.string()).optional(),
|
|
29
|
+
region: z.nullable(z.string()).optional(),
|
|
30
|
+
timezone: z.nullable(z.string()).optional(),
|
|
31
|
+
});
|
|
32
|
+
/** @internal */
|
|
33
|
+
export const WebSearchPreviewToolUserLocation$outboundSchema = z.object({
|
|
34
|
+
type: WebSearchPreviewToolUserLocationType$outboundSchema,
|
|
35
|
+
city: z.nullable(z.string()).optional(),
|
|
36
|
+
country: z.nullable(z.string()).optional(),
|
|
37
|
+
region: z.nullable(z.string()).optional(),
|
|
38
|
+
timezone: z.nullable(z.string()).optional(),
|
|
39
|
+
});
|
|
40
|
+
/**
|
|
41
|
+
* @internal
|
|
42
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
43
|
+
*/
|
|
44
|
+
export var WebSearchPreviewToolUserLocation$;
|
|
45
|
+
(function (WebSearchPreviewToolUserLocation$) {
|
|
46
|
+
/** @deprecated use `WebSearchPreviewToolUserLocation$inboundSchema` instead. */
|
|
47
|
+
WebSearchPreviewToolUserLocation$.inboundSchema = WebSearchPreviewToolUserLocation$inboundSchema;
|
|
48
|
+
/** @deprecated use `WebSearchPreviewToolUserLocation$outboundSchema` instead. */
|
|
49
|
+
WebSearchPreviewToolUserLocation$.outboundSchema = WebSearchPreviewToolUserLocation$outboundSchema;
|
|
50
|
+
})(WebSearchPreviewToolUserLocation$ || (WebSearchPreviewToolUserLocation$ = {}));
|
|
51
|
+
export function webSearchPreviewToolUserLocationToJSON(webSearchPreviewToolUserLocation) {
|
|
52
|
+
return JSON.stringify(WebSearchPreviewToolUserLocation$outboundSchema.parse(webSearchPreviewToolUserLocation));
|
|
53
|
+
}
|
|
54
|
+
export function webSearchPreviewToolUserLocationFromJSON(jsonString) {
|
|
55
|
+
return safeParse(jsonString, (x) => WebSearchPreviewToolUserLocation$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'WebSearchPreviewToolUserLocation' from JSON`);
|
|
56
|
+
}
|