interface UIRequest { order: number; finished: Promise; finish: () => void; } export declare const beginUIRequest: (flow: string) => UIRequest; export declare const finishUIRequest: (flow: string, request: UIRequest) => void; export declare const registerUIResponse: (flow: string, request: UIRequest, response: unknown) => void; /** Keep the final eligibility check and mutation together so newer requests cannot interleave. */ export declare const applyUIResponse: (flow: string, response: unknown, apply: () => void) => void | Promise; export {};