import type { TMachineState, TPatchEntry, TPatchState, TPendingState, TRefreshErrorState, TRefreshingState, TRetrying, TSuccessState } from "../../../query/types/index.js"; export type TDataState = TSuccessState | TRefreshingState | TRefreshErrorState; export declare function hasData(state: TMachineState): state is TDataState; /** No retry in flight: the shape of a first load or a plain refresh. */ export declare const NOT_RETRYING: TRetrying; /** * The retry bookkeeping of an in-flight machine state as the {@link TRetrying} * union, for the derived (agent / lite) states. The cast is sound per the * mapError contract: the machine only holds errors already normalized to * `TError` at the queryFn boundary. */ export declare function retryingOf(state: TPendingState | TRefreshingState): TRetrying; export declare function buildDataState(status: "success" | "refreshing" | "refresh-error", base: TMachineState, data: TData, patchState: TPatchState | null, updatedAt?: number): TDataState; export declare function withDataState(currentState: TMachineState, data: TData, patchState: TPatchState | null): TDataState; export declare function consistencyViolation(currentState: TMachineState): TDataState; export declare function replayPatches(currentState: TMachineState, targetStatus: "success" | "refreshing" | "refresh-error", baseData: TData, patches: TPatchEntry[], updatedAt?: number): TDataState; export declare function processPatches(currentState: TMachineState, patchState: TPatchState): TDataState; export declare function processAllPatches(currentState: TMachineState, patchState: TPatchState): TDataState;