@openrouter/sdk 1.2.85 → 1.2.86
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
CHANGED
|
@@ -50,8 +50,8 @@ export declare function serverURLFromOptions(options: SDKOptions): URL | null;
|
|
|
50
50
|
export declare const SDK_METADATA: {
|
|
51
51
|
readonly language: "typescript";
|
|
52
52
|
readonly openapiDocVersion: "1.0.0";
|
|
53
|
-
readonly sdkVersion: "1.2.
|
|
53
|
+
readonly sdkVersion: "1.2.86";
|
|
54
54
|
readonly genVersion: "2.914.0";
|
|
55
|
-
readonly userAgent: "speakeasy-sdk/typescript 1.2.
|
|
55
|
+
readonly userAgent: "speakeasy-sdk/typescript 1.2.86 2.914.0 1.0.0 @openrouter/sdk";
|
|
56
56
|
};
|
|
57
57
|
//# sourceMappingURL=config.d.ts.map
|
package/esm/lib/config.js
CHANGED
|
@@ -29,8 +29,8 @@ export function serverURLFromOptions(options) {
|
|
|
29
29
|
export const SDK_METADATA = {
|
|
30
30
|
language: "typescript",
|
|
31
31
|
openapiDocVersion: "1.0.0",
|
|
32
|
-
sdkVersion: "1.2.
|
|
32
|
+
sdkVersion: "1.2.86",
|
|
33
33
|
genVersion: "2.914.0",
|
|
34
|
-
userAgent: "speakeasy-sdk/typescript 1.2.
|
|
34
|
+
userAgent: "speakeasy-sdk/typescript 1.2.86 2.914.0 1.0.0 @openrouter/sdk",
|
|
35
35
|
};
|
|
36
36
|
//# sourceMappingURL=config.js.map
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import * as z from "zod/v4";
|
|
2
|
-
import { ClosedEnum } from "../types/enums.js";
|
|
2
|
+
import { ClosedEnum, OpenEnum } from "../types/enums.js";
|
|
3
3
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
4
4
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
5
|
+
export declare const OutputCustomToolCallItemStatus: {
|
|
6
|
+
readonly InProgress: "in_progress";
|
|
7
|
+
readonly Completed: "completed";
|
|
8
|
+
readonly Incomplete: "incomplete";
|
|
9
|
+
};
|
|
10
|
+
export type OutputCustomToolCallItemStatus = OpenEnum<typeof OutputCustomToolCallItemStatus>;
|
|
5
11
|
export declare const OutputCustomToolCallItemType: {
|
|
6
12
|
readonly CustomToolCall: "custom_tool_call";
|
|
7
13
|
};
|
|
@@ -18,9 +24,14 @@ export type OutputCustomToolCallItem = {
|
|
|
18
24
|
* Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)
|
|
19
25
|
*/
|
|
20
26
|
namespace?: string | undefined;
|
|
27
|
+
status?: OutputCustomToolCallItemStatus | undefined;
|
|
21
28
|
type: OutputCustomToolCallItemType;
|
|
22
29
|
};
|
|
23
30
|
/** @internal */
|
|
31
|
+
export declare const OutputCustomToolCallItemStatus$inboundSchema: z.ZodType<OutputCustomToolCallItemStatus, unknown>;
|
|
32
|
+
/** @internal */
|
|
33
|
+
export declare const OutputCustomToolCallItemStatus$outboundSchema: z.ZodType<string, OutputCustomToolCallItemStatus>;
|
|
34
|
+
/** @internal */
|
|
24
35
|
export declare const OutputCustomToolCallItemType$inboundSchema: z.ZodEnum<typeof OutputCustomToolCallItemType>;
|
|
25
36
|
/** @internal */
|
|
26
37
|
export declare const OutputCustomToolCallItemType$outboundSchema: z.ZodEnum<typeof OutputCustomToolCallItemType>;
|
|
@@ -33,6 +44,7 @@ export type OutputCustomToolCallItem$Outbound = {
|
|
|
33
44
|
input: string;
|
|
34
45
|
name: string;
|
|
35
46
|
namespace?: string | undefined;
|
|
47
|
+
status?: string | undefined;
|
|
36
48
|
type: string;
|
|
37
49
|
};
|
|
38
50
|
/** @internal */
|
|
@@ -5,10 +5,20 @@
|
|
|
5
5
|
import * as z from "zod/v4";
|
|
6
6
|
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
7
|
import { safeParse } from "../lib/schemas.js";
|
|
8
|
+
import * as openEnums from "../types/enums.js";
|
|
9
|
+
export const OutputCustomToolCallItemStatus = {
|
|
10
|
+
InProgress: "in_progress",
|
|
11
|
+
Completed: "completed",
|
|
12
|
+
Incomplete: "incomplete",
|
|
13
|
+
};
|
|
8
14
|
export const OutputCustomToolCallItemType = {
|
|
9
15
|
CustomToolCall: "custom_tool_call",
|
|
10
16
|
};
|
|
11
17
|
/** @internal */
|
|
18
|
+
export const OutputCustomToolCallItemStatus$inboundSchema = openEnums.inboundSchema(OutputCustomToolCallItemStatus);
|
|
19
|
+
/** @internal */
|
|
20
|
+
export const OutputCustomToolCallItemStatus$outboundSchema = openEnums.outboundSchema(OutputCustomToolCallItemStatus);
|
|
21
|
+
/** @internal */
|
|
12
22
|
export const OutputCustomToolCallItemType$inboundSchema = z.enum(OutputCustomToolCallItemType);
|
|
13
23
|
/** @internal */
|
|
14
24
|
export const OutputCustomToolCallItemType$outboundSchema = OutputCustomToolCallItemType$inboundSchema;
|
|
@@ -19,6 +29,7 @@ export const OutputCustomToolCallItem$inboundSchema = z.object({
|
|
|
19
29
|
input: z.string(),
|
|
20
30
|
name: z.string(),
|
|
21
31
|
namespace: z.string().optional(),
|
|
32
|
+
status: OutputCustomToolCallItemStatus$inboundSchema.optional(),
|
|
22
33
|
type: OutputCustomToolCallItemType$inboundSchema,
|
|
23
34
|
}).transform((v) => {
|
|
24
35
|
return remap$(v, {
|
|
@@ -32,6 +43,7 @@ export const OutputCustomToolCallItem$outboundSchema = z.object({
|
|
|
32
43
|
input: z.string(),
|
|
33
44
|
name: z.string(),
|
|
34
45
|
namespace: z.string().optional(),
|
|
46
|
+
status: OutputCustomToolCallItemStatus$outboundSchema.optional(),
|
|
35
47
|
type: OutputCustomToolCallItemType$outboundSchema,
|
|
36
48
|
}).transform((v) => {
|
|
37
49
|
return remap$(v, {
|
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.86",
|
|
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
|
+
"test": "vitest --run --project unit",
|
|
76
77
|
"test:e2e": "vitest --run --project e2e",
|
|
78
|
+
"test:watch": "vitest --watch --project unit",
|
|
77
79
|
"typecheck": "tsc --noEmit",
|
|
80
|
+
"typecheck:transit": "exit 0",
|
|
78
81
|
"compile": "tsc",
|
|
79
|
-
"postinstall": "node scripts/check-types.js || true",
|
|
80
|
-
"test": "vitest --run --project unit",
|
|
81
82
|
"test:transit": "exit 0",
|
|
82
|
-
"
|
|
83
|
-
"typecheck:transit": "exit 0",
|
|
83
|
+
"postinstall": "node scripts/check-types.js || true",
|
|
84
84
|
"prepare": "npm run build"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {},
|