import { ApolloQueryResult, OperationVariables } from '@apollo/client/core';
import { ApolloCache, OnSubscriptionDataOptions, MutationUpdaterFunction, DefaultContext } from '@apollo/client';
export declare type DataRow = {
    id: string;
};
export declare type PaginatedList = {
    rows: DataRow[];
    count: number;
};
export declare type GetListKeyFromDataTypeOptions = {
    suffix?: string;
    withGetPrefix?: boolean;
    variables?: OperationVariables;
};
export declare type ApolloState = {
    [k: string]: unknown;
} | DataRow[];
export declare type CachedObjectRef = {
    __ref: string;
};
export declare function getListKeyFromDataType(dataType: string, options?: GetListKeyFromDataTypeOptions): string;
export declare function getDataFromResponse<T = unknown>(dataType: string, options?: GetListKeyFromDataTypeOptions): (data: ApolloQueryResult<T>) => PaginatedList;
export declare function getDataFromSubscriptionEvent(dataType: string, options?: GetListKeyFromDataTypeOptions): (prev: ApolloState, { subscriptionData }: OnSubscriptionDataOptions) => ApolloState;
export declare function updateAfterMutation(dataType: string, listFieldName?: string): MutationUpdaterFunction<any, OperationVariables, DefaultContext, ApolloCache<any>>;
export declare type NestedKeyArgsArray<T> = Array<T | NestedKeyArgsArray<T>>;
export declare function getCacheKeyArgs(args: any): NestedKeyArgsArray<string>;
export declare const mergePaginatedList: {
    keyArgs: any;
    merge: (existing: PaginatedList, incoming: PaginatedList, context: any) => ApolloState;
};
export declare const mergeList: {
    keyArgs: any;
    merge: (existing: DataRow[], incoming: DataRow[], context: any) => ApolloState;
};
