@openrouter/sdk 1.2.56 → 1.2.57

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.
@@ -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.56";
53
+ readonly sdkVersion: "1.2.57";
54
54
  readonly genVersion: "2.914.0";
55
- readonly userAgent: "speakeasy-sdk/typescript 1.2.56 2.914.0 1.0.0 @openrouter/sdk";
55
+ readonly userAgent: "speakeasy-sdk/typescript 1.2.57 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.56",
32
+ sdkVersion: "1.2.57",
33
33
  genVersion: "2.914.0",
34
- userAgent: "speakeasy-sdk/typescript 1.2.56 2.914.0 1.0.0 @openrouter/sdk",
34
+ userAgent: "speakeasy-sdk/typescript 1.2.57 2.914.0 1.0.0 @openrouter/sdk",
35
35
  };
36
36
  //# sourceMappingURL=config.js.map
@@ -44,6 +44,10 @@ export type CreateKeysRequestBody = {
44
44
  * Optional ISO 8601 UTC timestamp when the API key should expire. Must be UTC, other timezones will be rejected
45
45
  */
46
46
  expiresAt?: Date | null | undefined;
47
+ /**
48
+ * Optional partner-supplied API key. Stored as a SHA-256 hash and never returned. Accepted only when authenticating with a Connect client secret.
49
+ */
50
+ externalApiKey?: string | undefined;
47
51
  /**
48
52
  * Whether to include BYOK usage in the limit
49
53
  */
@@ -195,6 +199,7 @@ export declare const CreateKeysLimitReset$outboundSchema: z.ZodType<string, Crea
195
199
  export type CreateKeysRequestBody$Outbound = {
196
200
  creator_user_id?: string | null | undefined;
197
201
  expires_at?: string | null | undefined;
202
+ external_api_key?: string | undefined;
198
203
  include_byok_in_limit?: boolean | undefined;
199
204
  limit?: number | null | undefined;
200
205
  limit_reset?: string | null | undefined;
@@ -20,6 +20,7 @@ export const CreateKeysLimitReset$outboundSchema = openEnums.outboundSchema(Crea
20
20
  export const CreateKeysRequestBody$outboundSchema = z.object({
21
21
  creatorUserId: z.nullable(z.string()).optional(),
22
22
  expiresAt: z.nullable(z.date().transform(v => v.toISOString())).optional(),
23
+ externalApiKey: z.string().optional(),
23
24
  includeByokInLimit: z.boolean().optional(),
24
25
  limit: z.nullable(z.number()).optional(),
25
26
  limitReset: z.nullable(CreateKeysLimitReset$outboundSchema).optional(),
@@ -29,6 +30,7 @@ export const CreateKeysRequestBody$outboundSchema = z.object({
29
30
  return remap$(v, {
30
31
  creatorUserId: "creator_user_id",
31
32
  expiresAt: "expires_at",
33
+ externalApiKey: "external_api_key",
32
34
  includeByokInLimit: "include_byok_in_limit",
33
35
  limitReset: "limit_reset",
34
36
  workspaceId: "workspace_id",
package/jsr.json CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  {
4
4
  "name": "@openrouter/sdk",
5
- "version": "1.2.56",
5
+ "version": "1.2.57",
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.2.56",
3
+ "version": "1.2.57",
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
- "compile": "tsc",
77
- "prepare": "npm run build",
78
- "test:transit": "exit 0",
79
76
  "test:watch": "vitest --watch --project unit",
80
77
  "typecheck": "tsc --noEmit",
78
+ "prepare": "npm run build",
79
+ "test": "vitest --run --project unit",
80
+ "test:transit": "exit 0",
81
81
  "typecheck:transit": "exit 0",
82
+ "compile": "tsc",
82
83
  "postinstall": "node scripts/check-types.js || true",
83
- "test": "vitest --run --project unit",
84
84
  "test:e2e": "vitest --run --project e2e"
85
85
  },
86
86
  "peerDependencies": {},