import { APIResourceType, APIResourceLocale, type APIResource } from '../../api';
import { Branded } from '../../utils/branded';
import { type Action, type UnknownAction } from '../actions';
type CompositeResourceId = Branded<string, 'CompositeResourceId'>;
export type State = Map<APIResourceType, Map<CompositeResourceId, APIResource | null>>;
export type SerializedState = {
    [key in APIResourceType]?: {
        id: string;
        value: Extract<APIResource, {
            __typename: key;
        }> | null;
        locale?: APIResourceLocale<key>;
    }[];
};
export declare function getInitialState(serializedState?: SerializedState): State;
export declare function getSerializedState(state: State): SerializedState;
export declare function getHasAPIResource<T extends APIResourceType>(state: State, resourceType: T, resourceId: string, locale?: APIResourceLocale<T>): boolean;
export declare function getAPIResource<T extends APIResourceType>(state: State, resourceType: T, resourceId: string, locale?: APIResourceLocale<T>): Extract<APIResource, {
    __typename: T;
}> | null;
export declare function reducer(state: State | undefined, action: Action | UnknownAction): State;
export {};
//# sourceMappingURL=api-resources.d.ts.map