///
import { ClientResponse } from './client';
export declare type PublicRequestState = Readonly<{
data: R | null;
loading: boolean;
isCalled: boolean;
isCanceled?: boolean;
response?: ClientResponse;
fetchError?: Error;
}>;
export declare type RequestState = PublicRequestState & Readonly<{
prevHeaders?: Record;
prevVariables?: Record;
prevParams?: Record;
}>;
export declare type RequestAction = {
type: 'call';
headers: Record;
variables: Record;
params?: Record;
} | {
type: 'success';
response: ClientResponse;
} | {
type: 'failure';
response: ClientResponse;
} | {
type: 'cancel';
};
export declare type RequestReducer = React.Reducer, RequestAction>;
export declare function requestReducer(state: RequestState, action: RequestAction): RequestState;