import { DocumentNode } from '@apollo/client';
import { ModelWithId } from '@parlor/components/select';
import { SortDirection } from '../../API';
import { BaseModel, ModelInput } from './common';
export declare namespace IApolloService {
    /**
     * Example:
     * ```ts
     *  const exampleQuery = gl`query GetInbox(id: 1){
     *   getInbox(id: $id) {}
     *
     * }`
     * ```
     *  1  query = exampleQuery
     *  2. queryName = `GetInbox`
     *  3. responseKey = `getInbox`
     *  4. variables = { id: 1 }
     */
    interface ICacheData {
        isItemOfList?: <T extends Partial<BaseModel>>(model: T) => boolean;
        query: DocumentNode;
        queryName: string;
        responseKey: string;
        variables: IListVariables;
    }
    type ICache = Record<string, ICacheData[]>;
    interface ISetCacheOptions {
        deletePaginatedQueries?: boolean;
    }
    interface MoveModelOptions {
        to?: string;
    }
    type Edge = {
        cursor?: string;
        node: ModelWithId;
    };
    type ICacheList = {
        edges: Edge[];
        totalCount?: number;
    };
    type FilterMethod = <T extends keyof ModelInput>(model: Record<string, any>, key: string, filterValue: ModelInput[T]) => boolean;
    interface ISortOption {
        direction?: SortDirection | null;
        field?: any;
    }
    interface IFilter extends Record<string, any> {
        [x: string]: ModelInput | any;
    }
    interface IListVariables extends Record<string, any> {
        filter?: IFilter;
        from?: number | null;
        limit?: number | null;
        nextToken?: string | null;
        sorting?: Array<ISortOption | null> | null;
    }
}
