@openrouter/sdk 1.5.140 → 1.5.142

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.
@@ -30,6 +30,7 @@ async function $do(client, request, options) {
30
30
  const body = null;
31
31
  const path = pathToFunc("/keys")();
32
32
  const query = encodeFormQuery({
33
+ "creator_user_id": payload?.creator_user_id,
33
34
  "include_disabled": payload?.include_disabled,
34
35
  "include_expired": payload?.include_expired,
35
36
  "offset": payload?.offset,
@@ -93,7 +93,7 @@ async function $do(client, request, options) {
93
93
  const responseFields = {
94
94
  HttpMeta: { Response: response, Request: req },
95
95
  };
96
- const [result] = await M.match(M.json(200, models_BatchDeletedObject$inboundSchema), M.jsonErr([401, 404, 409, 429], errors_BatchErrorResponse$inboundSchema), M.jsonErr([500, 502], errors_BatchErrorResponse$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
96
+ const [result] = await M.match(M.json(200, models_BatchDeletedObject$inboundSchema), M.jsonErr([401, 404, 409, 429], errors_BatchErrorResponse$inboundSchema), M.jsonErr([500, 502, 503], errors_BatchErrorResponse$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
97
97
  if (!result.ok) {
98
98
  return [result, { status: "complete", request: req, response }];
99
99
  }
@@ -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.5.140";
52
+ readonly sdkVersion: "1.5.142";
53
53
  readonly genVersion: "2.960.8";
54
- readonly userAgent: "speakeasy-sdk/typescript 1.5.140 2.960.8 1.0.0 @openrouter/sdk";
54
+ readonly userAgent: "speakeasy-sdk/typescript 1.5.142 2.960.8 1.0.0 @openrouter/sdk";
55
55
  };
56
56
  //# sourceMappingURL=config.d.ts.map
package/esm/lib/config.js CHANGED
@@ -25,8 +25,8 @@ export function serverURLFromOptions(options) {
25
25
  export const SDK_METADATA = {
26
26
  language: "typescript",
27
27
  openapiDocVersion: "1.0.0",
28
- sdkVersion: "1.5.140",
28
+ sdkVersion: "1.5.142",
29
29
  genVersion: "2.960.8",
30
- userAgent: "speakeasy-sdk/typescript 1.5.140 2.960.8 1.0.0 @openrouter/sdk",
30
+ userAgent: "speakeasy-sdk/typescript 1.5.142 2.960.8 1.0.0 @openrouter/sdk",
31
31
  };
32
32
  //# sourceMappingURL=config.js.map
@@ -58,6 +58,10 @@ export type ListRequest = {
58
58
  * Filter API keys by workspace ID. By default an organization-scoped management key gets the default workspace; a workspace-scoped management key always gets its own workspace and cannot list another.
59
59
  */
60
60
  workspaceId?: string | undefined;
61
+ /**
62
+ * Only return API keys created by this user ID (the `creator_user_id` on each key). Requires a management key that can view key creators.
63
+ */
64
+ creatorUserId?: string | undefined;
61
65
  };
62
66
  export type ListData = {
63
67
  /**
@@ -174,6 +178,7 @@ export type ListRequest$Outbound = {
174
178
  include_expired?: boolean | undefined;
175
179
  offset?: number | null | undefined;
176
180
  workspace_id?: string | undefined;
181
+ creator_user_id?: string | undefined;
177
182
  };
178
183
  /** @internal */
179
184
  export declare const ListRequest$outboundSchema: z.ZodType<ListRequest$Outbound, ListRequest>;
@@ -13,12 +13,14 @@ export const ListRequest$outboundSchema = z.object({
13
13
  includeExpired: z.boolean().optional(),
14
14
  offset: z.nullable(z.int()).optional(),
15
15
  workspaceId: z.string().optional(),
16
+ creatorUserId: z.string().optional(),
16
17
  }).transform((v) => {
17
18
  return remap$(v, {
18
19
  httpReferer: "HTTP-Referer",
19
20
  includeDisabled: "include_disabled",
20
21
  includeExpired: "include_expired",
21
22
  workspaceId: "workspace_id",
23
+ creatorUserId: "creator_user_id",
22
24
  });
23
25
  });
24
26
  export function listRequestToJSON(listRequest) {
package/jsr.json CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  {
4
4
  "name": "@openrouter/sdk",
5
- "version": "1.5.140",
5
+ "version": "1.5.142",
6
6
  "exports": {
7
7
  ".": "./src/index.ts",
8
8
  "./models/errors": "./src/models/errors/index.ts",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openrouter/sdk",
3
- "version": "1.5.140",
3
+ "version": "1.5.142",
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": "node --max-old-space-size=8192 ./node_modules/typescript/bin/tsc && node scripts/unbarrel-imports.js",
75
75
  "prepublishOnly": "npm run build",
76
- "compile": "node --max-old-space-size=8192 ./node_modules/typescript/bin/tsc && node scripts/unbarrel-imports.js",
77
- "test:e2e": "vitest --run --project e2e",
76
+ "postinstall": "node scripts/check-types.js || true",
78
77
  "test:transit": "exit 0",
78
+ "test:watch": "vitest --watch --project unit",
79
79
  "typecheck:transit": "exit 0",
80
- "postinstall": "node scripts/check-types.js || true",
80
+ "compile": "node --max-old-space-size=8192 ./node_modules/typescript/bin/tsc && node scripts/unbarrel-imports.js",
81
81
  "prepare": "npm run build",
82
82
  "test": "vitest --run --project unit",
83
- "test:watch": "vitest --watch --project unit",
83
+ "test:e2e": "vitest --run --project e2e",
84
84
  "typecheck": "tsc --noEmit"
85
85
  },
86
86
  "peerDependencies": {