@openrouter/sdk 1.4.24 → 1.4.25

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.4.24";
53
+ readonly sdkVersion: "1.4.25";
54
54
  readonly genVersion: "2.914.0";
55
- readonly userAgent: "speakeasy-sdk/typescript 1.4.24 2.914.0 1.0.0 @openrouter/sdk";
55
+ readonly userAgent: "speakeasy-sdk/typescript 1.4.25 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.24",
32
+ sdkVersion: "1.4.25",
33
33
  genVersion: "2.914.0",
34
- userAgent: "speakeasy-sdk/typescript 1.4.24 2.914.0 1.0.0 @openrouter/sdk",
34
+ userAgent: "speakeasy-sdk/typescript 1.4.25 2.914.0 1.0.0 @openrouter/sdk",
35
35
  };
36
36
  //# sourceMappingURL=config.js.map
@@ -156,6 +156,10 @@ export type CreateKeysData = {
156
156
  * Human-readable label for the API key
157
157
  */
158
158
  label: string;
159
+ /**
160
+ * ISO 8601 UTC timestamp of the most recent usage recorded for the API key, or null if no usage has been recorded since the end of 2025
161
+ */
162
+ lastUsedAt: Date | null;
159
163
  /**
160
164
  * Spending limit for the API key in USD
161
165
  */
@@ -80,6 +80,7 @@ export const CreateKeysData$inboundSchema = z.object({
80
80
  hash: z.string(),
81
81
  include_byok_in_limit: z.boolean(),
82
82
  label: z.string(),
83
+ last_used_at: z.nullable(z.iso.datetime({ offset: true }).transform(v => new Date(v))),
83
84
  limit: z.nullable(z.number()),
84
85
  limit_remaining: z.nullable(z.number()),
85
86
  limit_reset: z.nullable(z.string()),
@@ -101,6 +102,7 @@ export const CreateKeysData$inboundSchema = z.object({
101
102
  "expires_at": "expiresAt",
102
103
  "external_user": "externalUser",
103
104
  "include_byok_in_limit": "includeByokInLimit",
105
+ "last_used_at": "lastUsedAt",
104
106
  "limit_remaining": "limitRemaining",
105
107
  "limit_reset": "limitReset",
106
108
  "updated_at": "updatedAt",
@@ -99,6 +99,10 @@ export type GetKeyData = {
99
99
  * Human-readable label for the API key
100
100
  */
101
101
  label: string;
102
+ /**
103
+ * ISO 8601 UTC timestamp of the most recent usage recorded for the API key, or null if no usage has been recorded since the end of 2025
104
+ */
105
+ lastUsedAt: Date | null;
102
106
  /**
103
107
  * Spending limit for the API key in USD
104
108
  */
@@ -34,6 +34,7 @@ export const GetKeyData$inboundSchema = z
34
34
  hash: z.string(),
35
35
  include_byok_in_limit: z.boolean(),
36
36
  label: z.string(),
37
+ last_used_at: z.nullable(z.iso.datetime({ offset: true }).transform(v => new Date(v))),
37
38
  limit: z.nullable(z.number()),
38
39
  limit_remaining: z.nullable(z.number()),
39
40
  limit_reset: z.nullable(z.string()),
@@ -55,6 +56,7 @@ export const GetKeyData$inboundSchema = z
55
56
  "expires_at": "expiresAt",
56
57
  "external_user": "externalUser",
57
58
  "include_byok_in_limit": "includeByokInLimit",
59
+ "last_used_at": "lastUsedAt",
58
60
  "limit_remaining": "limitRemaining",
59
61
  "limit_reset": "limitReset",
60
62
  "updated_at": "updatedAt",
@@ -104,6 +104,10 @@ export type ListData = {
104
104
  * Human-readable label for the API key
105
105
  */
106
106
  label: string;
107
+ /**
108
+ * ISO 8601 UTC timestamp of the most recent usage recorded for the API key, or null if no usage has been recorded since the end of 2025
109
+ */
110
+ lastUsedAt: Date | null;
107
111
  /**
108
112
  * Spending limit for the API key in USD
109
113
  */
@@ -37,6 +37,7 @@ export const ListData$inboundSchema = z.object({
37
37
  hash: z.string(),
38
38
  include_byok_in_limit: z.boolean(),
39
39
  label: z.string(),
40
+ last_used_at: z.nullable(z.iso.datetime({ offset: true }).transform(v => new Date(v))),
40
41
  limit: z.nullable(z.number()),
41
42
  limit_remaining: z.nullable(z.number()),
42
43
  limit_reset: z.nullable(z.string()),
@@ -58,6 +59,7 @@ export const ListData$inboundSchema = z.object({
58
59
  "expires_at": "expiresAt",
59
60
  "external_user": "externalUser",
60
61
  "include_byok_in_limit": "includeByokInLimit",
62
+ "last_used_at": "lastUsedAt",
61
63
  "limit_remaining": "limitRemaining",
62
64
  "limit_reset": "limitReset",
63
65
  "updated_at": "updatedAt",
@@ -135,6 +135,10 @@ export type UpdateKeysData = {
135
135
  * Human-readable label for the API key
136
136
  */
137
137
  label: string;
138
+ /**
139
+ * ISO 8601 UTC timestamp of the most recent usage recorded for the API key, or null if no usage has been recorded since the end of 2025
140
+ */
141
+ lastUsedAt: Date | null;
138
142
  /**
139
143
  * Spending limit for the API key in USD
140
144
  */
@@ -62,6 +62,7 @@ export const UpdateKeysData$inboundSchema = z.object({
62
62
  hash: z.string(),
63
63
  include_byok_in_limit: z.boolean(),
64
64
  label: z.string(),
65
+ last_used_at: z.nullable(z.iso.datetime({ offset: true }).transform(v => new Date(v))),
65
66
  limit: z.nullable(z.number()),
66
67
  limit_remaining: z.nullable(z.number()),
67
68
  limit_reset: z.nullable(z.string()),
@@ -83,6 +84,7 @@ export const UpdateKeysData$inboundSchema = z.object({
83
84
  "expires_at": "expiresAt",
84
85
  "external_user": "externalUser",
85
86
  "include_byok_in_limit": "includeByokInLimit",
87
+ "last_used_at": "lastUsedAt",
86
88
  "limit_remaining": "limitRemaining",
87
89
  "limit_reset": "limitReset",
88
90
  "updated_at": "updatedAt",
package/jsr.json CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  {
4
4
  "name": "@openrouter/sdk",
5
- "version": "1.4.24",
5
+ "version": "1.4.25",
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.4.24",
3
+ "version": "1.4.25",
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
- "typecheck:transit": "exit 0",
77
76
  "compile": "tsc && node scripts/unbarrel-imports.js",
78
- "postinstall": "node scripts/check-types.js || true",
79
77
  "test": "vitest --run --project unit",
80
- "test:e2e": "vitest --run --project e2e",
81
- "test:transit": "exit 0",
82
- "prepare": "npm run build",
83
78
  "test:watch": "vitest --watch --project unit",
84
- "typecheck": "tsc --noEmit"
79
+ "typecheck": "tsc --noEmit",
80
+ "typecheck:transit": "exit 0",
81
+ "postinstall": "node scripts/check-types.js || true",
82
+ "prepare": "npm run build",
83
+ "test:e2e": "vitest --run --project e2e",
84
+ "test:transit": "exit 0"
85
85
  },
86
86
  "peerDependencies": {
87
87