import { DataType, Property, PropertyType, SavedViewTableOptions } from '@parlor/common/amplify-schema';
import { LoadSelectOptions, ModelWithId } from '@parlor/components/select';
export type QueryResult<Node extends ModelWithId = ModelWithId> = {
    data: {
        edges: {
            node: Node;
        }[];
        pageInfo: {
            endCursor: string;
            hasNextPage: boolean;
        };
        totalCount?: number;
    };
};
export type DistinctPropertyQueryResult = {
    data: {
        count: number;
        returnedProperties: Property[];
    };
};
export type NodeFrom<T extends QueryResult> = T['data']['edges'][number]['node'];
export type LoadOptionFn<T extends QueryResult = QueryResult, F extends Record<any, any> = Record<any, any>> = LoadSelectOptions<NodeFrom<T>, F>;
export type LoadInboxOptionFn<T extends QueryResult = QueryResult> = (options: {
    inboxId?: string;
    searchTerm?: string;
    topicId?: string;
}) => LoadSelectOptions<NodeFrom<T>>;
export type LoadSavedViewOptionFn<T extends QueryResult = QueryResult> = (options: {
    adminId?: string;
    inboxId?: string;
    tableType?: SavedViewTableOptions;
}) => LoadSelectOptions<NodeFrom<T>>;
export type LoadPropertySelectOptions<T extends Record<'id', string> = Record<'id', string>> = (options?: {
    customObjectName?: string;
    key?: PropertyType;
    nextToken?: string | number;
    searchTerm?: string;
    type?: string;
}) => Promise<{
    data: T[];
    nextToken?: string;
}>;
export type LoadPropertyOptionFn<T extends QueryResult = QueryResult> = LoadPropertySelectOptions<NodeFrom<T>>;
export type LoadDistinctPropertySelectOptions = (options: {
    dataType?: DataType;
    parlorKey: string;
    searchTerm?: string;
    skip?: number;
    take?: number;
}) => Promise<DistinctPropertyQueryResult['data']>;
export type LoadFilterPropertySelectOptions<T extends QueryResult = QueryResult> = (options: {
    dataType?: DataType;
    nextToken?: string;
    parlorKey?: string;
    searchTerm?: string;
}) => LoadSelectOptions<NodeFrom<T>>;
