import { type Principal, type PrincipalId } from "@awp/contracts";
import type { SessionRecord, UnitOfWork } from "@awp/application";
export interface OperatorSessionManagerOptions {
    readonly passwordHash: string;
    readonly principalId?: PrincipalId;
    readonly now?: () => Date;
    readonly verifyPassword?: (hashed: string, password: string) => Promise<boolean>;
}
export interface CreatedOperatorSession {
    readonly token: string;
    readonly session: SessionRecord;
}
export declare class OperatorSessionManager {
    private readonly uow;
    private readonly options;
    private readonly principal;
    private readonly now;
    private readonly credentialVersionDigest;
    private readonly verifyPassword;
    constructor(uow: UnitOfWork, options: OperatorSessionManagerOptions);
    login(password: string, userAgent?: string): Promise<CreatedOperatorSession | undefined>;
    resolve(token: string): Promise<Principal | undefined>;
    revoke(token: string): Promise<boolean>;
    revokeAll(): Promise<number>;
}
export declare function tokenDigest(token: string): string;
export declare function userAgentDigest(userAgent: string): string;
//# sourceMappingURL=operator-session.d.ts.map