@better-auth/api-key 1.7.0-rc.3 → 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-BX4nCO8Y.mjs";
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
@@ -1,4 +1,4 @@
1
- import { n as API_KEY_ERROR_CODES, t as PACKAGE_VERSION } from "./version-iCenOgx3.mjs";
1
+ import { n as API_KEY_ERROR_CODES, t as PACKAGE_VERSION } from "./version-02DBVaKF.mjs";
2
2
  //#region src/client.ts
3
3
  const apiKeyClient = () => {
4
4
  return {
@@ -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[];
@@ -200,6 +197,7 @@ declare function apiKey(_configurations?: (ApiKeyConfigurationOptions & ApiKeyOp
200
197
  updateAge: number;
201
198
  expiresIn: number;
202
199
  freshAge: number;
200
+ cookieCacheSigner?: import("better-auth").CookieCacheSigner | undefined;
203
201
  cookieRefreshCache: false | {
204
202
  enabled: true;
205
203
  updateAge: number;
@@ -233,8 +231,11 @@ declare function apiKey(_configurations?: (ApiKeyConfigurationOptions & ApiKeyOp
233
231
  skipCSRFCheck: boolean;
234
232
  runInBackground: (promise: Promise<unknown>) => void;
235
233
  runInBackgroundOrAwait: (promise: Promise<unknown> | void) => import("better-auth").Awaitable<unknown>;
234
+ } & {
235
+ returned?: unknown | undefined;
236
+ responseHeaders?: Headers | undefined;
236
237
  }>;
237
- }>;
238
+ }>>;
238
239
  }[];
239
240
  };
240
241
  endpoints: {
@@ -491,7 +492,7 @@ declare function apiKey(_configurations?: (ApiKeyConfigurationOptions & ApiKeyOp
491
492
  configId: import("zod").ZodOptional<import("zod").ZodString>;
492
493
  id: import("zod").ZodString;
493
494
  }, import("zod/v4/core").$strip>;
494
- 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<{
495
496
  session: {
496
497
  session: Record<string, any> & {
497
498
  id: string;
@@ -513,7 +514,7 @@ declare function apiKey(_configurations?: (ApiKeyConfigurationOptions & ApiKeyOp
513
514
  image?: string | null | undefined;
514
515
  };
515
516
  };
516
- }>)[];
517
+ }>>[];
517
518
  metadata: {
518
519
  openapi: {
519
520
  description: string;
@@ -858,7 +859,7 @@ declare function apiKey(_configurations?: (ApiKeyConfigurationOptions & ApiKeyOp
858
859
  configId: import("zod").ZodOptional<import("zod").ZodString>;
859
860
  keyId: import("zod").ZodString;
860
861
  }, import("zod/v4/core").$strip>;
861
- 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<{
862
863
  session: {
863
864
  session: Record<string, any> & {
864
865
  id: string;
@@ -880,7 +881,7 @@ declare function apiKey(_configurations?: (ApiKeyConfigurationOptions & ApiKeyOp
880
881
  image?: string | null | undefined;
881
882
  };
882
883
  };
883
- }>)[];
884
+ }>>[];
884
885
  metadata: {
885
886
  openapi: {
886
887
  description: string;
@@ -941,7 +942,7 @@ declare function apiKey(_configurations?: (ApiKeyConfigurationOptions & ApiKeyOp
941
942
  */
942
943
  listApiKeys: import("better-call").StrictEndpoint<"/api-key/list", {
943
944
  method: "GET";
944
- 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<{
945
946
  session: {
946
947
  session: Record<string, any> & {
947
948
  id: string;
@@ -963,7 +964,7 @@ declare function apiKey(_configurations?: (ApiKeyConfigurationOptions & ApiKeyOp
963
964
  image?: string | null | undefined;
964
965
  };
965
966
  };
966
- }>)[];
967
+ }>>[];
967
968
  query: import("zod").ZodOptional<import("zod").ZodObject<{
968
969
  configId: import("zod").ZodOptional<import("zod").ZodString>;
969
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-BX4nCO8Y.mjs";
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-iCenOgx3.mjs";
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";
@@ -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-rc.3";
38
+ const PACKAGE_VERSION = "1.7.0-rc.5";
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-rc.3",
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.3",
65
- "better-auth": "1.7.0-rc.3"
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.3.7",
70
- "@better-auth/core": "^1.7.0-rc.3",
71
- "better-auth": "^1.7.0-rc.3"
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",