import type { AutoCrudHttp } from '@wix/auto-crud';
import type { FiltersMap, OptionalFiltersMap } from '../model';
import type { CollectionState } from '../state';
import type { CollectionConfigWithConditionals } from './collectionConfigPartials';
import type { CursorQuery } from '.';
export type TransformPlatformizedQuery = (platformizedQuery: PlatformizedQuery, wixPatternsQuery: CursorQuery) => PlatformizedQuery | Promise<PlatformizedQuery>;
export type AmbassadorCollectionConfig<T, F extends FiltersMap = OptionalFiltersMap> = Omit<CollectionConfigWithConditionals<T, F>, 'fetchData' | 'paginationMode' | 'queryName'> & AmbassadorCollectionConfigI<T>;
export interface AmbassadorCollectionConfigI<T> {
    /**
     * CRUD subpackage of a metro Ambassador package.
     */
    ambassador: Required<Pick<AutoCrudHttp<T>, 'queryEntities' | 'fqdn'>>;
    /**
     *  A function to transform the cairo query to a PlatformizedQuery object (which will be used to fetch data from the server):
     * - `platformizedQuery`: PlatformizedQuery
     * - `wixPatternsQuery`: CursorQuery
     * The function should return a PlatformizedQuery instance or a promise of PlatformizedQuery
     */
    transformPlatformizedQuery?: TransformPlatformizedQuery;
    /**
     * The query name used for cache purposes. This should be a unique value per API endpoint.
     * @default ambassador.fqdn
     */
    queryName?: string;
}
type PlatformizedFilter = {
    [filter: string]: any;
};
type PlatformizedSorting = {
    fieldName: string;
    order: 'ASC' | 'DESC';
};
type PlatformizedCursorPaging = {
    limit: number;
    cursor?: string | null;
};
type PlatformizedQuery = {
    filter?: PlatformizedFilter;
    sort?: PlatformizedSorting[];
    cursorPaging?: PlatformizedCursorPaging;
};
export type AmbassadorCollectionFactory = <T, F extends FiltersMap = OptionalFiltersMap>(config: AmbassadorCollectionConfig<T, F>) => CollectionState<T, F>;
export declare function useCreateAmbassadorCollection(): AmbassadorCollectionFactory;
export declare function useAmbassadorCollection<T, F extends FiltersMap = OptionalFiltersMap>(config: AmbassadorCollectionConfig<T, F>): CollectionState<T, F>;
export {};
//# sourceMappingURL=useAmbassadorCollection.d.ts.map