/** * A pending action stored against a confirmation token. * Encodes the exact operation parameters to prevent tampering. */ export interface PendingAction { type: string; userId: string; params: Record; summary: string; createdAt: number; } export interface IConfirmationTokenService { generateToken(action: PendingAction): string; consumeToken(token: string, userId: string): PendingAction | null; } /** * Confirmation Token Service * * In-memory token store for two-step confirmation flows. * Mutating tools generate a preview + token; a confirm step consumes the token to execute. * Tokens are single-use, user-scoped, and expire after TTL. */ export declare class ConfirmationTokenService implements IConfirmationTokenService { private pending; private ttlMs; constructor(ttlMs?: number); /** * Generate a confirmation token for a pending action. * Returns a 32-char hex string. */ generateToken(action: PendingAction): string; /** * Consume a confirmation token. * Returns the pending action if valid, null otherwise. * Tokens are single-use — consumed on retrieval. * Validates userId matches the original initiator. */ consumeToken(token: string, userId: string): PendingAction | null; /** * Lazy cleanup of expired tokens. */ private cleanup; } //# sourceMappingURL=confirmation-token.service.d.ts.map