@better-auth/api-key 1.7.0-beta.1 → 1.7.0-beta.10

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.
@@ -1,6 +1,7 @@
1
1
  import * as better_auth0 from "better-auth";
2
2
  import { Statements } from "better-auth/plugins/access";
3
3
  import { Awaitable, GenericEndpointContext, HookEndpointContext, LiteralString } from "@better-auth/core";
4
+ import { SecondaryStorage } from "@better-auth/core/db";
4
5
  import { InferOptionSchema } from "better-auth/types";
5
6
 
6
7
  //#region src/schema.d.ts
@@ -417,20 +418,7 @@ interface ApiKeyConfigurationOptions {
417
418
  * Useful when you want to use a different storage backend specifically for API keys,
418
419
  * or when you need custom logic for storage operations.
419
420
  */
420
- customStorage?: {
421
- /**
422
- * Get a value from storage
423
- */
424
- get: (key: string) => Awaitable<unknown>;
425
- /**
426
- * Set a value in storage
427
- */
428
- set: (key: string, value: string, ttl?: number | undefined) => Awaitable<void | null | unknown>;
429
- /**
430
- * Delete a value from storage
431
- */
432
- delete: (key: string) => Awaitable<void | null | string>;
433
- } | undefined;
421
+ customStorage?: SecondaryStorage | undefined;
434
422
  /**
435
423
  * Defer non-critical updates (rate limiting counters, timestamps, remaining count)
436
424
  * to run after the response is sent using the global `advanced.backgroundTasks` handler.
package/dist/types.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- import { n as ApiKeyConfigurationOptions, r as ApiKeyOptions, t as ApiKey } from "./types-CCe5L05Y.mjs";
1
+ import { n as ApiKeyConfigurationOptions, r as ApiKeyOptions, t as ApiKey } from "./types-CbtANSbR.mjs";
2
2
  export { ApiKey, ApiKeyConfigurationOptions, ApiKeyOptions };
@@ -35,6 +35,6 @@ const API_KEY_ERROR_CODES = defineErrorCodes({
35
35
  });
36
36
  //#endregion
37
37
  //#region src/version.ts
38
- const PACKAGE_VERSION = "1.7.0-beta.1";
38
+ const PACKAGE_VERSION = "1.7.0-beta.10";
39
39
  //#endregion
40
40
  export { API_KEY_ERROR_CODES as n, PACKAGE_VERSION as t };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@better-auth/api-key",
3
- "version": "1.7.0-beta.1",
3
+ "version": "1.7.0-beta.10",
4
4
  "description": "API Key plugin for Better Auth.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -61,13 +61,14 @@
61
61
  },
62
62
  "devDependencies": {
63
63
  "tsdown": "0.21.1",
64
- "@better-auth/core": "1.7.0-beta.1",
65
- "better-auth": "1.7.0-beta.1"
64
+ "@better-auth/core": "1.7.0-beta.10",
65
+ "better-auth": "1.7.0-beta.10"
66
66
  },
67
67
  "peerDependencies": {
68
- "@better-auth/utils": "0.4.0",
69
- "@better-auth/core": "^1.7.0-beta.1",
70
- "better-auth": "^1.7.0-beta.1"
68
+ "@better-auth/utils": "0.4.2",
69
+ "better-call": "1.3.7",
70
+ "@better-auth/core": "^1.7.0-beta.10",
71
+ "better-auth": "^1.7.0-beta.10"
71
72
  },
72
73
  "scripts": {
73
74
  "build": "tsdown",