import type { Dialect } from '@enbox/dwn-sql-store'; /** * A registered WebAuthn credential (passkey) for admin access. */ export type AdminPasskeyRecord = { /** Base64url-encoded credential ID. */ id: string; /** Human-readable name for the passkey (e.g. "MacBook Touch ID"). */ name: string; /** Base64url-encoded COSE public key. */ publicKey: string; /** Monotonically increasing counter for replay protection. */ counter: number; /** WebAuthn transports the credential supports (JSON-encoded string array). */ transports: string; /** ISO-8601 timestamp when the passkey was registered. */ createdAt: string; /** ISO-8601 timestamp of the most recent successful authentication. */ lastUsedAt: string | null; }; /** * SQL-backed credential store for WebAuthn passkeys used by the admin panel. * * Follows the same Kysely + Dialect pattern as {@link AuditLog} and * {@link WebhookManager}. The `adminPasskeys` table is created automatically * on first use. * * Future: migrate to DID/DWN-based auth (see https://github.com/enboxorg/enbox/issues/546). */ export declare class AdminPasskeyStore { #private; private constructor(); /** * Creates and initializes an `AdminPasskeyStore` instance. * Creates the `adminPasskeys` table if it does not already exist. */ static create(dialect: Dialect): Promise; /** * Stores a new passkey credential. */ save(record: AdminPasskeyRecord): Promise; /** * Retrieves a passkey by its credential ID. */ getById(id: string): Promise; /** * Returns all registered passkeys, ordered by creation date (newest first). */ list(): Promise; /** * Returns the count of registered passkeys. */ count(): Promise; /** * Updates the counter and last-used timestamp after a successful authentication. */ updateCounter(id: string, counter: number): Promise; /** * Deletes a passkey by its credential ID. * @returns `true` if the passkey was found and deleted. */ delete(id: string): Promise; /** * Closes the underlying database connection. */ close(): Promise; } //# sourceMappingURL=admin-passkey-store.d.ts.map