@better-auth/api-key 1.7.0-beta.0 → 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.
- package/dist/client.d.mts +2 -2
- package/dist/client.mjs +1 -1
- package/dist/{index-CajK1bx0.d.mts → index-K0I_tcSP.d.mts} +15 -851
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +374 -198
- package/dist/{types-CCe5L05Y.d.mts → types-CbtANSbR.d.mts} +2 -14
- package/dist/types.d.mts +1 -1
- package/dist/{version-B1Zw_NlB.mjs → version--lF5Z0S8.mjs} +1 -1
- package/package.json +7 -6
|
@@ -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-
|
|
1
|
+
import { n as ApiKeyConfigurationOptions, r as ApiKeyOptions, t as ApiKey } from "./types-CbtANSbR.mjs";
|
|
2
2
|
export { ApiKey, ApiKeyConfigurationOptions, ApiKeyOptions };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@better-auth/api-key",
|
|
3
|
-
"version": "1.7.0-beta.
|
|
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.
|
|
65
|
-
"better-auth": "1.7.0-beta.
|
|
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.
|
|
69
|
-
"
|
|
70
|
-
"better-auth": "^1.7.0-beta.
|
|
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",
|