@openrouter/sdk 1.4.17 → 1.4.18
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/apiKeysUpdate.d.ts +4 -0
- package/esm/funcs/apiKeysUpdate.js +4 -0
- package/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/sdk/apikeys.d.ts +4 -0
- package/esm/sdk/apikeys.js +4 -0
- package/jsr.json +1 -1
- package/package.json +5 -5
|
@@ -13,6 +13,10 @@ import { Result } from "../types/fp.js";
|
|
|
13
13
|
*
|
|
14
14
|
* @remarks
|
|
15
15
|
* Update an existing API key. Authenticate with a [management key](/docs/guides/overview/auth/management-api-keys).
|
|
16
|
+
*
|
|
17
|
+
* <Warning>
|
|
18
|
+
* You can't change `workspace_id` through the API. The request body accepts only the fields listed below, and unrecognized fields are ignored. To move a key to another workspace, use the OpenRouter dashboard. If the body contains none of the accepted fields, the request fails with `400` and the message `No update fields provided`.
|
|
19
|
+
* </Warning>
|
|
16
20
|
*/
|
|
17
21
|
export declare function apiKeysUpdate(client: OpenRouterCore, request: operations.UpdateKeysRequest, options?: RequestOptions): APIPromise<Result<operations.UpdateKeysResponse, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.NotFoundResponseError | errors.TooManyRequestsResponseError | errors.InternalServerResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
18
22
|
//# sourceMappingURL=apiKeysUpdate.d.ts.map
|
|
@@ -17,6 +17,10 @@ import { APIPromise } from "../types/async.js";
|
|
|
17
17
|
*
|
|
18
18
|
* @remarks
|
|
19
19
|
* Update an existing API key. Authenticate with a [management key](/docs/guides/overview/auth/management-api-keys).
|
|
20
|
+
*
|
|
21
|
+
* <Warning>
|
|
22
|
+
* You can't change `workspace_id` through the API. The request body accepts only the fields listed below, and unrecognized fields are ignored. To move a key to another workspace, use the OpenRouter dashboard. If the body contains none of the accepted fields, the request fails with `400` and the message `No update fields provided`.
|
|
23
|
+
* </Warning>
|
|
20
24
|
*/
|
|
21
25
|
export function apiKeysUpdate(client, request, options) {
|
|
22
26
|
return new APIPromise($do(client, request, options));
|
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.4.
|
|
53
|
+
readonly sdkVersion: "1.4.18";
|
|
54
54
|
readonly genVersion: "2.914.0";
|
|
55
|
-
readonly userAgent: "speakeasy-sdk/typescript 1.4.
|
|
55
|
+
readonly userAgent: "speakeasy-sdk/typescript 1.4.18 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.4.
|
|
32
|
+
sdkVersion: "1.4.18",
|
|
33
33
|
genVersion: "2.914.0",
|
|
34
|
-
userAgent: "speakeasy-sdk/typescript 1.4.
|
|
34
|
+
userAgent: "speakeasy-sdk/typescript 1.4.18 2.914.0 1.0.0 @openrouter/sdk",
|
|
35
35
|
};
|
|
36
36
|
//# sourceMappingURL=config.js.map
|
package/esm/sdk/apikeys.d.ts
CHANGED
|
@@ -41,6 +41,10 @@ export declare class APIKeys extends ClientSDK {
|
|
|
41
41
|
*
|
|
42
42
|
* @remarks
|
|
43
43
|
* Update an existing API key. Authenticate with a [management key](/docs/guides/overview/auth/management-api-keys).
|
|
44
|
+
*
|
|
45
|
+
* <Warning>
|
|
46
|
+
* You can't change `workspace_id` through the API. The request body accepts only the fields listed below, and unrecognized fields are ignored. To move a key to another workspace, use the OpenRouter dashboard. If the body contains none of the accepted fields, the request fails with `400` and the message `No update fields provided`.
|
|
47
|
+
* </Warning>
|
|
44
48
|
*/
|
|
45
49
|
update(request: operations.UpdateKeysRequest, options?: RequestOptions): Promise<operations.UpdateKeysResponse>;
|
|
46
50
|
}
|
package/esm/sdk/apikeys.js
CHANGED
|
@@ -61,6 +61,10 @@ export class APIKeys extends ClientSDK {
|
|
|
61
61
|
*
|
|
62
62
|
* @remarks
|
|
63
63
|
* Update an existing API key. Authenticate with a [management key](/docs/guides/overview/auth/management-api-keys).
|
|
64
|
+
*
|
|
65
|
+
* <Warning>
|
|
66
|
+
* You can't change `workspace_id` through the API. The request body accepts only the fields listed below, and unrecognized fields are ignored. To move a key to another workspace, use the OpenRouter dashboard. If the body contains none of the accepted fields, the request fails with `400` and the message `No update fields provided`.
|
|
67
|
+
* </Warning>
|
|
64
68
|
*/
|
|
65
69
|
async update(request, options) {
|
|
66
70
|
return unwrapAsync(apiKeysUpdate(this, request, options));
|
package/jsr.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openrouter/sdk",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.18",
|
|
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 && node scripts/unbarrel-imports.js",
|
|
75
75
|
"prepublishOnly": "npm run build",
|
|
76
|
-
"
|
|
76
|
+
"typecheck": "tsc --noEmit",
|
|
77
|
+
"compile": "tsc && node scripts/unbarrel-imports.js",
|
|
77
78
|
"test:watch": "vitest --watch --project unit",
|
|
78
79
|
"typecheck:transit": "exit 0",
|
|
79
80
|
"postinstall": "node scripts/check-types.js || true",
|
|
80
81
|
"prepare": "npm run build",
|
|
82
|
+
"test": "vitest --run --project unit",
|
|
81
83
|
"test:e2e": "vitest --run --project e2e",
|
|
82
|
-
"
|
|
83
|
-
"compile": "tsc && node scripts/unbarrel-imports.js",
|
|
84
|
-
"test": "vitest --run --project unit"
|
|
84
|
+
"test:transit": "exit 0"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {
|
|
87
87
|
|