/** The request header that marks a request read-only. Its one value is `1`. */ export declare const READ_ONLY_REQUEST_HEADER = "x-volter-read-only"; /** Whether a request carries the read-only marker. */ export declare function isReadOnlyRequest(request: Request | { headers: Headers; }): boolean; /** A write a read-only request attempted: refused before anything was written (rule D3's 405). */ export declare class ReadOnlyRequestError extends Error { readonly service: string; constructor(service: string); } /** Run `fn` as a read-only request: every write it attempts outside a vendor move is refused. The * answer says whether one was — also when the handler caught the refusal and answered something * else, so a caller can answer the refusal whatever the handler made of it. */ export declare function runAsReadOnlyRequest(fn: () => T | Promise): Promise<{ value: T; refused: undefined; } | { refused: ReadOnlyRequestError; }>; /** Run `fn` as the VENDOR's own move (a pack's catch-up): its writes land even under a read-only * request, and are recorded as the World's own moves, never as the caller's API call (inVendorMove). */ export declare function runAsVendorMove(fn: () => T): T; /** Whether this runs as the vendor's own move (runAsVendorMove). */ export declare function inVendorMove(): boolean; /** Whether a write attempted here would be refused. */ export declare function writesRefused(): boolean; /** The write seam's check: throws (and records) the refusal when a write attempted here is a * read-only request's. Called by every appender before it writes anything. */ export declare function refuseReadOnlyWrite(service: string): void; export declare function storageTenant(service: string): string | undefined; export declare function runWithStorageTenant(service: string, tenant: string | undefined, fn: () => T): T;