/** * Repository for refresh token storage and lifecycle management. * Handles creation, lookup, and cleanup of JWT refresh tokens. */ export type RefreshTokenMeta = { ipAddress?: string; userAgent?: string; }; /** * Stores a new refresh token for a user. */ export declare function create(userId: string, tokenHash: string, expiresAt: Date, meta?: RefreshTokenMeta): Promise; /** * Finds a non-expired refresh token by its hash. */ export declare function findByTokenHash(tokenHash: string): Promise<{ user_id: string; } | null>; /** * Deletes a single refresh token by its hash (logout / rotation). */ export declare function deleteByTokenHash(tokenHash: string): Promise; /** * Deletes all refresh tokens for a user (e.g. on logout or password change). */ export declare function deleteByUserId(userId: string): Promise; /** * Removes all refresh tokens that have passed their expiration time. */ export declare function deleteExpired(): Promise; /** * Counts non-expired refresh tokens for a user (active sessions). */ export declare function countActiveByUserId(userId: string): Promise; /** * Deletes the oldest active refresh tokens for a user (session eviction). */ export declare function deleteOldestSessions(userId: string, count: number): Promise; //# sourceMappingURL=refreshTokenRepository.d.ts.map