@openrouter/sdk 1.2.33 → 1.2.35
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/datasetsGetAppRankings.d.ts +2 -0
- package/esm/funcs/datasetsGetAppRankings.js +2 -0
- package/esm/funcs/datasetsGetRankingsDaily.d.ts +2 -0
- package/esm/funcs/datasetsGetRankingsDaily.js +2 -0
- package/esm/funcs/datasetsGetSessionCost.d.ts +2 -0
- package/esm/funcs/datasetsGetSessionCost.js +2 -0
- package/esm/funcs/workspacesDelete.d.ts +1 -1
- package/esm/funcs/workspacesDelete.js +1 -1
- package/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/models/operations/deleteworkspace.d.ts +1 -1
- package/esm/sdk/datasets.d.ts +6 -0
- package/esm/sdk/datasets.js +6 -0
- package/esm/sdk/workspaces.d.ts +1 -1
- package/esm/sdk/workspaces.js +1 -1
- package/jsr.json +1 -1
- package/package.json +7 -7
|
@@ -36,6 +36,8 @@ import { PageIterator } from "../types/operations.js";
|
|
|
36
36
|
* Token counts come from each upstream provider's own tokenizer, so a token attributed
|
|
37
37
|
* to one app is not directly comparable to a token attributed to another app whose
|
|
38
38
|
* traffic flows through a different provider.
|
|
39
|
+
*
|
|
40
|
+
* Licensed under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/): reuse and republish with attribution to OpenRouter.
|
|
39
41
|
*/
|
|
40
42
|
export declare function datasetsGetAppRankings(client: OpenRouterCore, request?: operations.GetAppRankingsRequest | undefined, options?: RequestOptions): APIPromise<PageIterator<Result<operations.GetAppRankingsResponse, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.TooManyRequestsResponseError | errors.InternalServerResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>, {
|
|
41
43
|
offset: number;
|
|
@@ -40,6 +40,8 @@ import { createPageIterator, haltIterator, } from "../types/operations.js";
|
|
|
40
40
|
* Token counts come from each upstream provider's own tokenizer, so a token attributed
|
|
41
41
|
* to one app is not directly comparable to a token attributed to another app whose
|
|
42
42
|
* traffic flows through a different provider.
|
|
43
|
+
*
|
|
44
|
+
* Licensed under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/): reuse and republish with attribution to OpenRouter.
|
|
43
45
|
*/
|
|
44
46
|
export function datasetsGetAppRankings(client, request, options) {
|
|
45
47
|
return new APIPromise($do(client, request, options));
|
|
@@ -39,6 +39,8 @@ import { Result } from "../types/fp.js";
|
|
|
39
39
|
* are as reported by Anthropic, OpenAI counts are as reported by OpenAI, etc.), so
|
|
40
40
|
* a token in one row is not directly comparable to a token in another row from a
|
|
41
41
|
* different provider.
|
|
42
|
+
*
|
|
43
|
+
* Licensed under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/): reuse and republish with attribution to OpenRouter.
|
|
42
44
|
*/
|
|
43
45
|
export declare function datasetsGetRankingsDaily(client: OpenRouterCore, request?: operations.GetRankingsDailyRequest | undefined, options?: RequestOptions): APIPromise<Result<models.RankingsDailyResponse, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.TooManyRequestsResponseError | errors.InternalServerResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
44
46
|
//# sourceMappingURL=datasetsGetRankingsDaily.d.ts.map
|
|
@@ -43,6 +43,8 @@ import { APIPromise } from "../types/async.js";
|
|
|
43
43
|
* are as reported by Anthropic, OpenAI counts are as reported by OpenAI, etc.), so
|
|
44
44
|
* a token in one row is not directly comparable to a token in another row from a
|
|
45
45
|
* different provider.
|
|
46
|
+
*
|
|
47
|
+
* Licensed under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/): reuse and republish with attribution to OpenRouter.
|
|
46
48
|
*/
|
|
47
49
|
export function datasetsGetRankingsDaily(client, request, options) {
|
|
48
50
|
return new APIPromise($do(client, request, options));
|
|
@@ -20,6 +20,8 @@ import { PageIterator } from "../types/operations.js";
|
|
|
20
20
|
* Filter by `app_slug`, `model`, or `turn_range`. Filtering by `model` alone works across apps
|
|
21
21
|
* for harness-vs-harness comparison at a fixed model. Results refresh weekly and include the source snapshot
|
|
22
22
|
* window in `meta`.
|
|
23
|
+
*
|
|
24
|
+
* Licensed under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/): reuse and republish with attribution to OpenRouter.
|
|
23
25
|
*/
|
|
24
26
|
export declare function datasetsGetSessionCost(client: OpenRouterCore, request?: operations.GetSessionCostRequest | undefined, options?: RequestOptions): APIPromise<PageIterator<Result<operations.GetSessionCostResponse, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.TooManyRequestsResponseError | errors.InternalServerResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>, {
|
|
25
27
|
offset: number;
|
|
@@ -24,6 +24,8 @@ import { createPageIterator, haltIterator, } from "../types/operations.js";
|
|
|
24
24
|
* Filter by `app_slug`, `model`, or `turn_range`. Filtering by `model` alone works across apps
|
|
25
25
|
* for harness-vs-harness comparison at a fixed model. Results refresh weekly and include the source snapshot
|
|
26
26
|
* window in `meta`.
|
|
27
|
+
*
|
|
28
|
+
* Licensed under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/): reuse and republish with attribution to OpenRouter.
|
|
27
29
|
*/
|
|
28
30
|
export function datasetsGetSessionCost(client, request, options) {
|
|
29
31
|
return new APIPromise($do(client, request, options));
|
|
@@ -13,7 +13,7 @@ import { Result } from "../types/fp.js";
|
|
|
13
13
|
* Delete a workspace
|
|
14
14
|
*
|
|
15
15
|
* @remarks
|
|
16
|
-
* Delete an existing workspace. Workspaces with active API keys cannot be deleted; remove the keys first. Deleting the default workspace is
|
|
16
|
+
* Delete an existing workspace. Workspaces with active API keys cannot be deleted; remove the keys first. Deleting the default workspace is not yet generally available; callers not enabled for it receive a 403 while the capability rolls out. When permitted, it requires `confirm_default_settings_deletion=true` and additionally disables the account’s unscoped inference API keys; management (provisioning) keys are retained. Deleting any workspace permanently deletes its budgets and guardrails and disables its classifiers and broadcast destinations. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
17
17
|
*/
|
|
18
18
|
export declare function workspacesDelete(client: OpenRouterCore, request: operations.DeleteWorkspaceRequest, options?: RequestOptions): APIPromise<Result<models.DeleteWorkspaceResponse, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.ForbiddenResponseError | errors.NotFoundResponseError | errors.InternalServerResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
19
19
|
//# sourceMappingURL=workspacesDelete.d.ts.map
|
|
@@ -17,7 +17,7 @@ import { APIPromise } from "../types/async.js";
|
|
|
17
17
|
* Delete a workspace
|
|
18
18
|
*
|
|
19
19
|
* @remarks
|
|
20
|
-
* Delete an existing workspace. Workspaces with active API keys cannot be deleted; remove the keys first. Deleting the default workspace is
|
|
20
|
+
* Delete an existing workspace. Workspaces with active API keys cannot be deleted; remove the keys first. Deleting the default workspace is not yet generally available; callers not enabled for it receive a 403 while the capability rolls out. When permitted, it requires `confirm_default_settings_deletion=true` and additionally disables the account’s unscoped inference API keys; management (provisioning) keys are retained. Deleting any workspace permanently deletes its budgets and guardrails and disables its classifiers and broadcast destinations. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
21
21
|
*/
|
|
22
22
|
export function workspacesDelete(client, request, options) {
|
|
23
23
|
return new APIPromise($do(client, request, options));
|
package/esm/lib/config.d.ts
CHANGED
|
@@ -49,8 +49,8 @@ export declare function serverURLFromOptions(options: SDKOptions): URL | null;
|
|
|
49
49
|
export declare const SDK_METADATA: {
|
|
50
50
|
readonly language: "typescript";
|
|
51
51
|
readonly openapiDocVersion: "1.0.0";
|
|
52
|
-
readonly sdkVersion: "1.2.
|
|
52
|
+
readonly sdkVersion: "1.2.35";
|
|
53
53
|
readonly genVersion: "2.914.0";
|
|
54
|
-
readonly userAgent: "speakeasy-sdk/typescript 1.2.
|
|
54
|
+
readonly userAgent: "speakeasy-sdk/typescript 1.2.35 2.914.0 1.0.0 @openrouter/sdk";
|
|
55
55
|
};
|
|
56
56
|
//# sourceMappingURL=config.d.ts.map
|
package/esm/lib/config.js
CHANGED
|
@@ -26,8 +26,8 @@ export function serverURLFromOptions(options) {
|
|
|
26
26
|
export const SDK_METADATA = {
|
|
27
27
|
language: "typescript",
|
|
28
28
|
openapiDocVersion: "1.0.0",
|
|
29
|
-
sdkVersion: "1.2.
|
|
29
|
+
sdkVersion: "1.2.35",
|
|
30
30
|
genVersion: "2.914.0",
|
|
31
|
-
userAgent: "speakeasy-sdk/typescript 1.2.
|
|
31
|
+
userAgent: "speakeasy-sdk/typescript 1.2.35 2.914.0 1.0.0 @openrouter/sdk",
|
|
32
32
|
};
|
|
33
33
|
//# sourceMappingURL=config.js.map
|
|
@@ -45,7 +45,7 @@ export type DeleteWorkspaceRequest = {
|
|
|
45
45
|
*/
|
|
46
46
|
id: string;
|
|
47
47
|
/**
|
|
48
|
-
* Required to delete the default workspace (
|
|
48
|
+
* Required to delete the default workspace (not yet generally available; callers not enabled for it receive a 403 while the capability rolls out). Deleting it permanently disables the account’s unscoped inference API keys (management/provisioning keys are retained) and its budgets, guardrails, classifiers, and broadcast destinations. Ignored for non-default workspaces.
|
|
49
49
|
*/
|
|
50
50
|
confirmDefaultSettingsDeletion?: boolean | undefined;
|
|
51
51
|
};
|
package/esm/sdk/datasets.d.ts
CHANGED
|
@@ -30,6 +30,8 @@ export declare class Datasets extends ClientSDK {
|
|
|
30
30
|
* Token counts come from each upstream provider's own tokenizer, so a token attributed
|
|
31
31
|
* to one app is not directly comparable to a token attributed to another app whose
|
|
32
32
|
* traffic flows through a different provider.
|
|
33
|
+
*
|
|
34
|
+
* Licensed under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/): reuse and republish with attribution to OpenRouter.
|
|
33
35
|
*/
|
|
34
36
|
getAppRankings(request?: operations.GetAppRankingsRequest | undefined, options?: RequestOptions): Promise<PageIterator<operations.GetAppRankingsResponse, {
|
|
35
37
|
offset: number;
|
|
@@ -64,6 +66,8 @@ export declare class Datasets extends ClientSDK {
|
|
|
64
66
|
* are as reported by Anthropic, OpenAI counts are as reported by OpenAI, etc.), so
|
|
65
67
|
* a token in one row is not directly comparable to a token in another row from a
|
|
66
68
|
* different provider.
|
|
69
|
+
*
|
|
70
|
+
* Licensed under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/): reuse and republish with attribution to OpenRouter.
|
|
67
71
|
*/
|
|
68
72
|
getRankingsDaily(request?: operations.GetRankingsDailyRequest | undefined, options?: RequestOptions): Promise<models.RankingsDailyResponse>;
|
|
69
73
|
/**
|
|
@@ -77,6 +81,8 @@ export declare class Datasets extends ClientSDK {
|
|
|
77
81
|
* Filter by `app_slug`, `model`, or `turn_range`. Filtering by `model` alone works across apps
|
|
78
82
|
* for harness-vs-harness comparison at a fixed model. Results refresh weekly and include the source snapshot
|
|
79
83
|
* window in `meta`.
|
|
84
|
+
*
|
|
85
|
+
* Licensed under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/): reuse and republish with attribution to OpenRouter.
|
|
80
86
|
*/
|
|
81
87
|
getSessionCost(request?: operations.GetSessionCostRequest | undefined, options?: RequestOptions): Promise<PageIterator<operations.GetSessionCostResponse, {
|
|
82
88
|
offset: number;
|
package/esm/sdk/datasets.js
CHANGED
|
@@ -36,6 +36,8 @@ export class Datasets extends ClientSDK {
|
|
|
36
36
|
* Token counts come from each upstream provider's own tokenizer, so a token attributed
|
|
37
37
|
* to one app is not directly comparable to a token attributed to another app whose
|
|
38
38
|
* traffic flows through a different provider.
|
|
39
|
+
*
|
|
40
|
+
* Licensed under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/): reuse and republish with attribution to OpenRouter.
|
|
39
41
|
*/
|
|
40
42
|
async getAppRankings(request, options) {
|
|
41
43
|
return unwrapResultIterator(datasetsGetAppRankings(this, request, options));
|
|
@@ -70,6 +72,8 @@ export class Datasets extends ClientSDK {
|
|
|
70
72
|
* are as reported by Anthropic, OpenAI counts are as reported by OpenAI, etc.), so
|
|
71
73
|
* a token in one row is not directly comparable to a token in another row from a
|
|
72
74
|
* different provider.
|
|
75
|
+
*
|
|
76
|
+
* Licensed under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/): reuse and republish with attribution to OpenRouter.
|
|
73
77
|
*/
|
|
74
78
|
async getRankingsDaily(request, options) {
|
|
75
79
|
return unwrapAsync(datasetsGetRankingsDaily(this, request, options));
|
|
@@ -85,6 +89,8 @@ export class Datasets extends ClientSDK {
|
|
|
85
89
|
* Filter by `app_slug`, `model`, or `turn_range`. Filtering by `model` alone works across apps
|
|
86
90
|
* for harness-vs-harness comparison at a fixed model. Results refresh weekly and include the source snapshot
|
|
87
91
|
* window in `meta`.
|
|
92
|
+
*
|
|
93
|
+
* Licensed under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/): reuse and republish with attribution to OpenRouter.
|
|
88
94
|
*/
|
|
89
95
|
async getSessionCost(request, options) {
|
|
90
96
|
return unwrapResultIterator(datasetsGetSessionCost(this, request, options));
|
package/esm/sdk/workspaces.d.ts
CHANGED
|
@@ -23,7 +23,7 @@ export declare class Workspaces extends ClientSDK {
|
|
|
23
23
|
* Delete a workspace
|
|
24
24
|
*
|
|
25
25
|
* @remarks
|
|
26
|
-
* Delete an existing workspace. Workspaces with active API keys cannot be deleted; remove the keys first. Deleting the default workspace is
|
|
26
|
+
* Delete an existing workspace. Workspaces with active API keys cannot be deleted; remove the keys first. Deleting the default workspace is not yet generally available; callers not enabled for it receive a 403 while the capability rolls out. When permitted, it requires `confirm_default_settings_deletion=true` and additionally disables the account’s unscoped inference API keys; management (provisioning) keys are retained. Deleting any workspace permanently deletes its budgets and guardrails and disables its classifiers and broadcast destinations. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
27
27
|
*/
|
|
28
28
|
delete(request: operations.DeleteWorkspaceRequest, options?: RequestOptions): Promise<models.DeleteWorkspaceResponse>;
|
|
29
29
|
/**
|
package/esm/sdk/workspaces.js
CHANGED
|
@@ -40,7 +40,7 @@ export class Workspaces extends ClientSDK {
|
|
|
40
40
|
* Delete a workspace
|
|
41
41
|
*
|
|
42
42
|
* @remarks
|
|
43
|
-
* Delete an existing workspace. Workspaces with active API keys cannot be deleted; remove the keys first. Deleting the default workspace is
|
|
43
|
+
* Delete an existing workspace. Workspaces with active API keys cannot be deleted; remove the keys first. Deleting the default workspace is not yet generally available; callers not enabled for it receive a 403 while the capability rolls out. When permitted, it requires `confirm_default_settings_deletion=true` and additionally disables the account’s unscoped inference API keys; management (provisioning) keys are retained. Deleting any workspace permanently deletes its budgets and guardrails and disables its classifiers and broadcast destinations. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
44
44
|
*/
|
|
45
45
|
async delete(request, options) {
|
|
46
46
|
return unwrapAsync(workspacesDelete(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.2.
|
|
3
|
+
"version": "1.2.35",
|
|
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
|
+
"prepare": "npm run build",
|
|
76
78
|
"test:e2e": "vitest --run --project e2e",
|
|
77
|
-
"test:transit": "exit 0",
|
|
78
|
-
"test:watch": "vitest --watch --project unit",
|
|
79
79
|
"typecheck": "tsc --noEmit",
|
|
80
|
-
"typecheck:transit": "exit 0",
|
|
81
|
-
"compile": "tsc",
|
|
82
80
|
"postinstall": "node scripts/check-types.js || true",
|
|
83
|
-
"
|
|
84
|
-
"test": "
|
|
81
|
+
"test": "vitest --run --project unit",
|
|
82
|
+
"test:transit": "exit 0",
|
|
83
|
+
"test:watch": "vitest --watch --project unit",
|
|
84
|
+
"typecheck:transit": "exit 0"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {},
|
|
87
87
|
"devDependencies": {
|