@better-auth/api-key 1.7.0-rc.4 → 1.7.0-rc.5
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
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as ApiKeyConfigurationOptions, r as ApiKeyOptions, t as ApiKey } from "./types-BLGcz4fR.mjs";
|
|
2
|
-
import { i as API_KEY_ERROR_CODES, n as apiKey } from "./index-
|
|
2
|
+
import { i as API_KEY_ERROR_CODES, n as apiKey } from "./index-CWMXfmdp.mjs";
|
|
3
3
|
//#region src/client.d.ts
|
|
4
4
|
declare const apiKeyClient: () => {
|
|
5
5
|
id: "api-key";
|
package/dist/client.mjs
CHANGED
|
@@ -84,7 +84,7 @@ declare function apiKey(_configurations?: (ApiKeyConfigurationOptions & ApiKeyOp
|
|
|
84
84
|
hooks: {
|
|
85
85
|
before: {
|
|
86
86
|
matcher: (ctx: HookEndpointContext) => boolean;
|
|
87
|
-
handler: (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
87
|
+
handler: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
88
88
|
user: {
|
|
89
89
|
id: string;
|
|
90
90
|
createdAt: Date;
|
|
@@ -105,10 +105,7 @@ declare function apiKey(_configurations?: (ApiKeyConfigurationOptions & ApiKeyOp
|
|
|
105
105
|
expiresAt: Date;
|
|
106
106
|
};
|
|
107
107
|
} | {
|
|
108
|
-
context: import("better-call").MiddlewareContext<import("better-call").MiddlewareOptions, {
|
|
109
|
-
returned?: unknown | undefined;
|
|
110
|
-
responseHeaders?: Headers | undefined;
|
|
111
|
-
} & import("better-auth").PluginContext<import("better-auth").BetterAuthOptions> & import("better-auth").InfoContext & {
|
|
108
|
+
context: import("better-call").MiddlewareContext<import("better-call").MiddlewareOptions, import("better-auth").PluginContext<import("better-auth").BetterAuthOptions> & import("better-auth").InfoContext & {
|
|
112
109
|
options: import("better-auth").BetterAuthOptions;
|
|
113
110
|
trustedOrigins: string[];
|
|
114
111
|
trustedProviders: string[];
|
|
@@ -234,8 +231,11 @@ declare function apiKey(_configurations?: (ApiKeyConfigurationOptions & ApiKeyOp
|
|
|
234
231
|
skipCSRFCheck: boolean;
|
|
235
232
|
runInBackground: (promise: Promise<unknown>) => void;
|
|
236
233
|
runInBackgroundOrAwait: (promise: Promise<unknown> | void) => import("better-auth").Awaitable<unknown>;
|
|
234
|
+
} & {
|
|
235
|
+
returned?: unknown | undefined;
|
|
236
|
+
responseHeaders?: Headers | undefined;
|
|
237
237
|
}>;
|
|
238
|
-
}
|
|
238
|
+
}>>;
|
|
239
239
|
}[];
|
|
240
240
|
};
|
|
241
241
|
endpoints: {
|
|
@@ -492,7 +492,7 @@ declare function apiKey(_configurations?: (ApiKeyConfigurationOptions & ApiKeyOp
|
|
|
492
492
|
configId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
493
493
|
id: import("zod").ZodString;
|
|
494
494
|
}, import("zod/v4/core").$strip>;
|
|
495
|
-
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
495
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
496
496
|
session: {
|
|
497
497
|
session: Record<string, any> & {
|
|
498
498
|
id: string;
|
|
@@ -514,7 +514,7 @@ declare function apiKey(_configurations?: (ApiKeyConfigurationOptions & ApiKeyOp
|
|
|
514
514
|
image?: string | null | undefined;
|
|
515
515
|
};
|
|
516
516
|
};
|
|
517
|
-
}
|
|
517
|
+
}>>[];
|
|
518
518
|
metadata: {
|
|
519
519
|
openapi: {
|
|
520
520
|
description: string;
|
|
@@ -859,7 +859,7 @@ declare function apiKey(_configurations?: (ApiKeyConfigurationOptions & ApiKeyOp
|
|
|
859
859
|
configId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
860
860
|
keyId: import("zod").ZodString;
|
|
861
861
|
}, import("zod/v4/core").$strip>;
|
|
862
|
-
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
862
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
863
863
|
session: {
|
|
864
864
|
session: Record<string, any> & {
|
|
865
865
|
id: string;
|
|
@@ -881,7 +881,7 @@ declare function apiKey(_configurations?: (ApiKeyConfigurationOptions & ApiKeyOp
|
|
|
881
881
|
image?: string | null | undefined;
|
|
882
882
|
};
|
|
883
883
|
};
|
|
884
|
-
}
|
|
884
|
+
}>>[];
|
|
885
885
|
metadata: {
|
|
886
886
|
openapi: {
|
|
887
887
|
description: string;
|
|
@@ -942,7 +942,7 @@ declare function apiKey(_configurations?: (ApiKeyConfigurationOptions & ApiKeyOp
|
|
|
942
942
|
*/
|
|
943
943
|
listApiKeys: import("better-call").StrictEndpoint<"/api-key/list", {
|
|
944
944
|
method: "GET";
|
|
945
|
-
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
945
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
946
946
|
session: {
|
|
947
947
|
session: Record<string, any> & {
|
|
948
948
|
id: string;
|
|
@@ -964,7 +964,7 @@ declare function apiKey(_configurations?: (ApiKeyConfigurationOptions & ApiKeyOp
|
|
|
964
964
|
image?: string | null | undefined;
|
|
965
965
|
};
|
|
966
966
|
};
|
|
967
|
-
}
|
|
967
|
+
}>>[];
|
|
968
968
|
query: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
969
969
|
configId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
970
970
|
organizationId: import("zod").ZodOptional<import("zod").ZodString>;
|
package/dist/index.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { n as ApiKeyConfigurationOptions, r as ApiKeyOptions, t as ApiKey } from "./types-BLGcz4fR.mjs";
|
|
2
|
-
import { i as API_KEY_ERROR_CODES, n as apiKey, r as defaultKeyHasher, t as API_KEY_TABLE_NAME } from "./index-
|
|
2
|
+
import { i as API_KEY_ERROR_CODES, n as apiKey, r as defaultKeyHasher, t as API_KEY_TABLE_NAME } from "./index-CWMXfmdp.mjs";
|
|
3
3
|
export { API_KEY_ERROR_CODES, API_KEY_TABLE_NAME, type ApiKey, type ApiKeyConfigurationOptions, type ApiKeyOptions, apiKey, defaultKeyHasher };
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as API_KEY_ERROR_CODES, t as PACKAGE_VERSION } from "./version-
|
|
1
|
+
import { n as API_KEY_ERROR_CODES, t as PACKAGE_VERSION } from "./version-02DBVaKF.mjs";
|
|
2
2
|
import { createAuthEndpoint, createAuthMiddleware } from "@better-auth/core/api";
|
|
3
3
|
import { getIP } from "@better-auth/core/utils/ip";
|
|
4
4
|
import { base64Url } from "@better-auth/utils/base64";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@better-auth/api-key",
|
|
3
|
-
"version": "1.7.0-rc.
|
|
3
|
+
"version": "1.7.0-rc.5",
|
|
4
4
|
"description": "API Key plugin for Better Auth.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -61,14 +61,14 @@
|
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
63
|
"tsdown": "0.22.7",
|
|
64
|
-
"@better-auth/core": "1.7.0-rc.
|
|
65
|
-
"better-auth": "1.7.0-rc.
|
|
64
|
+
"@better-auth/core": "1.7.0-rc.5",
|
|
65
|
+
"better-auth": "1.7.0-rc.5"
|
|
66
66
|
},
|
|
67
67
|
"peerDependencies": {
|
|
68
68
|
"@better-auth/utils": "0.4.2",
|
|
69
|
-
"better-call": "1.
|
|
70
|
-
"@better-auth/core": "^1.7.0-rc.
|
|
71
|
-
"better-auth": "^1.7.0-rc.
|
|
69
|
+
"better-call": "1.4.0",
|
|
70
|
+
"@better-auth/core": "^1.7.0-rc.5",
|
|
71
|
+
"better-auth": "^1.7.0-rc.5"
|
|
72
72
|
},
|
|
73
73
|
"scripts": {
|
|
74
74
|
"build": "tsdown",
|