import { type InviteRow, type UserRole } from './accounts-store.js'; export declare function runWithAccountUser(userId: string, fn: () => T): T; export declare function currentAccountUserId(): string | undefined; export interface PublicUser { id: string; username: string; displayName: string; role: UserRole; createdAt: number; disabled: boolean; } export interface CreatedSession { raw: string; expiresAt: number; user: PublicUser; } export interface CreatedInvite { id: string; raw: string; usesLeft: number; expiresAt: number | null; monthlyLimit: number | null; createdAt: number; } export declare function normalizeUsername(raw: string): string; export declare function validateUsername(raw: string): string | null; export declare function validatePassword(raw: string): string | null; export declare function hasAnyUser(): boolean; /** Single enabled account — typical upgraded single-operator box. */ export declare function getSoleEnabledUser(): PublicUser | null; export declare function countUsers(): number; export declare function getUserById(id: string): PublicUser | null; export declare function getUserByUsername(username: string): PublicUser | null; export declare function listUsers(): PublicUser[]; export declare function registerUser(input: { username: string; password: string; inviteRaw?: string; }): { user: PublicUser; session: CreatedSession; }; export declare function loginUser(input: { username: string; password: string; }): CreatedSession; export declare function verifyLoginSession(raw: string): PublicUser | null; export declare function revokeLoginSession(raw: string): boolean; export declare function setUserDisabled(userId: string, disabled: boolean): PublicUser | null; export declare function setUserRole(userId: string, role: UserRole): PublicUser | null; export declare function generateInviteRaw(): string; export declare function normalizeInviteRaw(raw: string): string; export declare function createInvite(opts: { createdBy: string; uses?: number; expiresInDays?: number; monthlyLimit?: number; }): CreatedInvite; export declare function listInvites(): Array>; export declare function revokeInvite(id: string): boolean; export declare function peekInviteValid(raw: string): boolean; export declare function monthStartMs(at: number): number; //# sourceMappingURL=accounts.d.ts.map