From b0664526b0ded74caed07ef2e1310f2407526daf Mon Sep 17 00:00:00 2001 From: Maxwell <145994855+ping-maxwell@users.noreply.github.com> Date: Fri, 3 Oct 2025 18:48:19 +1000 Subject: [PATCH] chore: fix api-key types issue (#5065) --- .../better-auth/src/plugins/api-key/types.ts | 91 ------------------- 1 file changed, 91 deletions(-) diff --git a/packages/better-auth/src/plugins/api-key/types.ts b/packages/better-auth/src/plugins/api-key/types.ts index 192a92a8..ac93c67a 100644 --- a/packages/better-auth/src/plugins/api-key/types.ts +++ b/packages/better-auth/src/plugins/api-key/types.ts @@ -287,95 +287,4 @@ export type ApiKey = { permissions?: { [key: string]: string[]; } | null; - /** - * ID - */ - id: string; - /** - * The name of the key - */ - name: string | null; - /** - * Shows the first few characters of the API key, including the prefix. - * This allows you to show those few characters in the UI to make it easier for users to identify the API key. - */ - start: string | null; - /** - * The API Key prefix. Stored as plain text. - */ - prefix: string | null; - /** - * The hashed API key value - */ - key: string; - /** - * The owner of the user id - */ - userId: string; - /** - * The interval in which the `remaining` count is refilled by day - * - * @example 1 // every day - */ - refillInterval: number | null; - /** - * The amount to refill - */ - refillAmount: number | null; - /** - * The last refill date - */ - lastRefillAt: Date | null; - /** - * Sets if key is enabled or disabled - * - * @default true - */ - enabled: boolean; - /** - * Whether the key has rate limiting enabled. - */ - rateLimitEnabled: boolean; - /** - * The duration in milliseconds - */ - rateLimitTimeWindow: number | null; - /** - * Maximum amount of requests allowed within a window - */ - rateLimitMax: number | null; - /** - * The number of requests made within the rate limit time window - */ - requestCount: number; - /** - * Remaining requests (every time API key is used this should updated and should be updated on refill as well) - */ - remaining: number | null; - /** - * When last request occurred - */ - lastRequest: Date | null; - /** - * Expiry date of a key - */ - expiresAt: Date | null; - /** - * created at - */ - createdAt: Date; - /** - * updated at - */ - updatedAt: Date; - /** - * Extra metadata about the apiKey - */ - metadata: Record | null; - /** - * Permissions for the API key - */ - permissions?: { - [key: string]: string[]; - } | null; };