@openrouter/sdk 1.2.53 → 1.2.55
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/funcs/containersDownloadContainerFileContent.d.ts +18 -0
- package/esm/funcs/containersDownloadContainerFileContent.js +107 -0
- package/esm/funcs/containersGetContainerFile.d.ts +19 -0
- package/esm/funcs/containersGetContainerFile.js +107 -0
- package/esm/funcs/containersListContainerFiles.d.ts +19 -0
- package/esm/funcs/containersListContainerFiles.js +108 -0
- package/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/models/additionaltoolsitem.d.ts +10 -4
- package/esm/models/additionaltoolsitem.js +8 -0
- package/esm/models/containerfile.d.ts +53 -0
- package/esm/models/containerfile.js +40 -0
- package/esm/models/containerfilelistresponse.d.ts +25 -0
- package/esm/models/containerfilelistresponse.js +31 -0
- package/esm/models/index.d.ts +4 -0
- package/esm/models/index.js +4 -0
- package/esm/models/messagesrequest.d.ts +5 -4
- package/esm/models/messagesrequest.js +3 -0
- package/esm/models/openresponsesresult.d.ts +4 -0
- package/esm/models/openresponsesresult.js +5 -0
- package/esm/models/operations/downloadcontainerfilecontent.d.ts +63 -0
- package/esm/models/operations/downloadcontainerfilecontent.js +24 -0
- package/esm/models/operations/getcontainerfile.d.ts +63 -0
- package/esm/models/operations/getcontainerfile.js +24 -0
- package/esm/models/operations/index.d.ts +3 -0
- package/esm/models/operations/index.js +3 -0
- package/esm/models/operations/listcontainerfiles.d.ts +68 -0
- package/esm/models/operations/listcontainerfiles.js +24 -0
- package/esm/models/responsesrequest.d.ts +14 -0
- package/esm/models/responsesrequest.js +8 -0
- package/esm/models/toolsearchservertool.d.ts +28 -0
- package/esm/models/toolsearchservertool.js +20 -0
- package/esm/models/toolsearchservertoolconfig.d.ts +18 -0
- package/esm/models/toolsearchservertoolconfig.js +18 -0
- package/esm/sdk/containers.d.ts +27 -0
- package/esm/sdk/containers.js +39 -0
- package/esm/sdk/sdk.d.ts +3 -0
- package/esm/sdk/sdk.js +4 -0
- package/jsr.json +1 -1
- package/package.json +5 -5
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: cd3efc23b324
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
+
/** @internal */
|
|
8
|
+
export const ToolSearchServerToolConfig$outboundSchema = z.object({
|
|
9
|
+
maxResults: z.int().optional(),
|
|
10
|
+
}).transform((v) => {
|
|
11
|
+
return remap$(v, {
|
|
12
|
+
maxResults: "max_results",
|
|
13
|
+
});
|
|
14
|
+
});
|
|
15
|
+
export function toolSearchServerToolConfigToJSON(toolSearchServerToolConfig) {
|
|
16
|
+
return JSON.stringify(ToolSearchServerToolConfig$outboundSchema.parse(toolSearchServerToolConfig));
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=toolsearchservertoolconfig.js.map
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
2
|
+
import * as models from "../models/index.js";
|
|
3
|
+
import * as operations from "../models/operations/index.js";
|
|
4
|
+
export declare class Containers extends ClientSDK {
|
|
5
|
+
/**
|
|
6
|
+
* List container files
|
|
7
|
+
*
|
|
8
|
+
* @remarks
|
|
9
|
+
* Lists the files under a sandbox session prefix, in lexicographic path order. A restarted session is a separate container with its own session id. Paginate with `limit` and `after` (pass the previous page’s `last_id`); `has_more: true` always means the next page is fetchable that way.
|
|
10
|
+
*/
|
|
11
|
+
listContainerFiles(request: operations.ListContainerFilesRequest, options?: RequestOptions): Promise<models.ContainerFileListResponse>;
|
|
12
|
+
/**
|
|
13
|
+
* Retrieve a container file
|
|
14
|
+
*
|
|
15
|
+
* @remarks
|
|
16
|
+
* Returns the metadata of a single file under a sandbox session prefix.
|
|
17
|
+
*/
|
|
18
|
+
getContainerFile(request: operations.GetContainerFileRequest, options?: RequestOptions): Promise<models.ContainerFile>;
|
|
19
|
+
/**
|
|
20
|
+
* Download container file content
|
|
21
|
+
*
|
|
22
|
+
* @remarks
|
|
23
|
+
* Streams the raw bytes of a file under a sandbox session prefix.
|
|
24
|
+
*/
|
|
25
|
+
downloadContainerFileContent(request: operations.DownloadContainerFileContentRequest, options?: RequestOptions): Promise<ReadableStream<Uint8Array>>;
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=containers.d.ts.map
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: f772470024e6
|
|
4
|
+
*/
|
|
5
|
+
import { containersDownloadContainerFileContent } from "../funcs/containersDownloadContainerFileContent.js";
|
|
6
|
+
import { containersGetContainerFile } from "../funcs/containersGetContainerFile.js";
|
|
7
|
+
import { containersListContainerFiles } from "../funcs/containersListContainerFiles.js";
|
|
8
|
+
import { ClientSDK } from "../lib/sdks.js";
|
|
9
|
+
import { unwrapAsync } from "../types/fp.js";
|
|
10
|
+
export class Containers extends ClientSDK {
|
|
11
|
+
/**
|
|
12
|
+
* List container files
|
|
13
|
+
*
|
|
14
|
+
* @remarks
|
|
15
|
+
* Lists the files under a sandbox session prefix, in lexicographic path order. A restarted session is a separate container with its own session id. Paginate with `limit` and `after` (pass the previous page’s `last_id`); `has_more: true` always means the next page is fetchable that way.
|
|
16
|
+
*/
|
|
17
|
+
async listContainerFiles(request, options) {
|
|
18
|
+
return unwrapAsync(containersListContainerFiles(this, request, options));
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Retrieve a container file
|
|
22
|
+
*
|
|
23
|
+
* @remarks
|
|
24
|
+
* Returns the metadata of a single file under a sandbox session prefix.
|
|
25
|
+
*/
|
|
26
|
+
async getContainerFile(request, options) {
|
|
27
|
+
return unwrapAsync(containersGetContainerFile(this, request, options));
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Download container file content
|
|
31
|
+
*
|
|
32
|
+
* @remarks
|
|
33
|
+
* Streams the raw bytes of a file under a sandbox session prefix.
|
|
34
|
+
*/
|
|
35
|
+
async downloadContainerFileContent(request, options) {
|
|
36
|
+
return unwrapAsync(containersDownloadContainerFileContent(this, request, options));
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=containers.js.map
|
package/esm/sdk/sdk.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ import { Beta } from "./beta.js";
|
|
|
6
6
|
import { BYOK } from "./byok.js";
|
|
7
7
|
import { Chat } from "./chat.js";
|
|
8
8
|
import { Classifications } from "./classifications.js";
|
|
9
|
+
import { Containers } from "./containers.js";
|
|
9
10
|
import { Credits } from "./credits.js";
|
|
10
11
|
import { Datasets } from "./datasets.js";
|
|
11
12
|
import { Embeddings } from "./embeddings.js";
|
|
@@ -50,6 +51,8 @@ export declare class OpenRouter extends ClientSDK {
|
|
|
50
51
|
get chat(): Chat;
|
|
51
52
|
private _classifications?;
|
|
52
53
|
get classifications(): Classifications;
|
|
54
|
+
private _containers?;
|
|
55
|
+
get containers(): Containers;
|
|
53
56
|
private _credits?;
|
|
54
57
|
get credits(): Credits;
|
|
55
58
|
private _datasets?;
|
package/esm/sdk/sdk.js
CHANGED
|
@@ -10,6 +10,7 @@ import { Beta } from "./beta.js";
|
|
|
10
10
|
import { BYOK } from "./byok.js";
|
|
11
11
|
import { Chat } from "./chat.js";
|
|
12
12
|
import { Classifications } from "./classifications.js";
|
|
13
|
+
import { Containers } from "./containers.js";
|
|
13
14
|
import { Credits } from "./credits.js";
|
|
14
15
|
import { Datasets } from "./datasets.js";
|
|
15
16
|
import { Embeddings } from "./embeddings.js";
|
|
@@ -60,6 +61,9 @@ export class OpenRouter extends ClientSDK {
|
|
|
60
61
|
get classifications() {
|
|
61
62
|
return (this._classifications ?? (this._classifications = new Classifications(this._options)));
|
|
62
63
|
}
|
|
64
|
+
get containers() {
|
|
65
|
+
return (this._containers ?? (this._containers = new Containers(this._options)));
|
|
66
|
+
}
|
|
63
67
|
get credits() {
|
|
64
68
|
return (this._credits ?? (this._credits = new Credits(this._options)));
|
|
65
69
|
}
|
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.55",
|
|
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,15 +73,15 @@
|
|
|
73
73
|
"lint": "eslint --cache --max-warnings=0 src",
|
|
74
74
|
"build": "tsc",
|
|
75
75
|
"prepublishOnly": "npm run build",
|
|
76
|
-
"compile": "tsc",
|
|
77
76
|
"postinstall": "node scripts/check-types.js || true",
|
|
78
77
|
"prepare": "npm run build",
|
|
79
78
|
"test": "vitest --run --project unit",
|
|
80
|
-
"test:
|
|
79
|
+
"test:transit": "exit 0",
|
|
81
80
|
"test:watch": "vitest --watch --project unit",
|
|
82
81
|
"typecheck": "tsc --noEmit",
|
|
83
|
-
"
|
|
84
|
-
"
|
|
82
|
+
"typecheck:transit": "exit 0",
|
|
83
|
+
"compile": "tsc",
|
|
84
|
+
"test:e2e": "vitest --run --project e2e"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {},
|
|
87
87
|
"devDependencies": {
|