@better-auth/api-key 1.6.26 → 1.6.27

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-BYqswa0N.mjs";
2
- import { i as API_KEY_ERROR_CODES, n as apiKey } from "./index-CgPDayNk.mjs";
2
+ import { i as API_KEY_ERROR_CODES, n as apiKey } from "./index-5ylKSUSG.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-vgVyvied.mjs";
1
+ import { n as API_KEY_ERROR_CODES, t as PACKAGE_VERSION } from "./version-BQwkRUb6.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[];
@@ -233,8 +230,11 @@ declare function apiKey(_configurations?: (ApiKeyConfigurationOptions & ApiKeyOp
233
230
  skipCSRFCheck: boolean;
234
231
  runInBackground: (promise: Promise<unknown>) => void;
235
232
  runInBackgroundOrAwait: (promise: Promise<unknown> | void) => import("better-auth").Awaitable<unknown>;
233
+ } & {
234
+ returned?: unknown | undefined;
235
+ responseHeaders?: Headers | undefined;
236
236
  }>;
237
- }>;
237
+ }>>;
238
238
  }[];
239
239
  };
240
240
  endpoints: {
@@ -491,7 +491,7 @@ declare function apiKey(_configurations?: (ApiKeyConfigurationOptions & ApiKeyOp
491
491
  configId: import("zod").ZodOptional<import("zod").ZodString>;
492
492
  id: import("zod").ZodString;
493
493
  }, import("zod/v4/core").$strip>;
494
- use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
494
+ use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
495
495
  session: {
496
496
  session: Record<string, any> & {
497
497
  id: string;
@@ -513,7 +513,7 @@ declare function apiKey(_configurations?: (ApiKeyConfigurationOptions & ApiKeyOp
513
513
  image?: string | null | undefined;
514
514
  };
515
515
  };
516
- }>)[];
516
+ }>>[];
517
517
  metadata: {
518
518
  openapi: {
519
519
  description: string;
@@ -858,7 +858,7 @@ declare function apiKey(_configurations?: (ApiKeyConfigurationOptions & ApiKeyOp
858
858
  configId: import("zod").ZodOptional<import("zod").ZodString>;
859
859
  keyId: import("zod").ZodString;
860
860
  }, import("zod/v4/core").$strip>;
861
- use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
861
+ use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
862
862
  session: {
863
863
  session: Record<string, any> & {
864
864
  id: string;
@@ -880,7 +880,7 @@ declare function apiKey(_configurations?: (ApiKeyConfigurationOptions & ApiKeyOp
880
880
  image?: string | null | undefined;
881
881
  };
882
882
  };
883
- }>)[];
883
+ }>>[];
884
884
  metadata: {
885
885
  openapi: {
886
886
  description: string;
@@ -941,7 +941,7 @@ declare function apiKey(_configurations?: (ApiKeyConfigurationOptions & ApiKeyOp
941
941
  */
942
942
  listApiKeys: import("better-call").StrictEndpoint<"/api-key/list", {
943
943
  method: "GET";
944
- use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
944
+ use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
945
945
  session: {
946
946
  session: Record<string, any> & {
947
947
  id: string;
@@ -963,7 +963,7 @@ declare function apiKey(_configurations?: (ApiKeyConfigurationOptions & ApiKeyOp
963
963
  image?: string | null | undefined;
964
964
  };
965
965
  };
966
- }>)[];
966
+ }>>[];
967
967
  query: import("zod").ZodOptional<import("zod").ZodObject<{
968
968
  configId: import("zod").ZodOptional<import("zod").ZodString>;
969
969
  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-BYqswa0N.mjs";
2
- import { i as API_KEY_ERROR_CODES, n as apiKey, r as defaultKeyHasher, t as API_KEY_TABLE_NAME } from "./index-CgPDayNk.mjs";
2
+ import { i as API_KEY_ERROR_CODES, n as apiKey, r as defaultKeyHasher, t as API_KEY_TABLE_NAME } from "./index-5ylKSUSG.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-vgVyvied.mjs";
1
+ import { n as API_KEY_ERROR_CODES, t as PACKAGE_VERSION } from "./version-BQwkRUb6.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.6.26";
38
+ const PACKAGE_VERSION = "1.6.27";
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.6.26",
3
+ "version": "1.6.27",
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.6.26",
65
- "better-auth": "1.6.26"
64
+ "@better-auth/core": "1.6.27",
65
+ "better-auth": "1.6.27"
66
66
  },
67
67
  "peerDependencies": {
68
68
  "@better-auth/utils": "0.4.2",
69
- "better-call": "1.3.7",
70
- "@better-auth/core": "^1.6.26",
71
- "better-auth": "^1.6.26"
69
+ "better-call": "1.4.0",
70
+ "@better-auth/core": "^1.6.27",
71
+ "better-auth": "^1.6.27"
72
72
  },
73
73
  "scripts": {
74
74
  "build": "tsdown",