import { ModuleJoinerConfig, RemoteExpandProperty, RemoteJoinerOptions, RemoteJoinerQuery } from "@medusajs/types";
export type RemoteFetchDataCallback = (expand: RemoteExpandProperty, keyField: string, ids?: (unknown | unknown[])[], relationship?: any) => Promise<{
    data: unknown[] | {
        [path: string]: unknown;
    };
    path?: string;
}>;
export declare class RemoteJoiner {
    private remoteFetchData;
    private options;
    private serviceConfigCache;
    private entityMap;
    private static filterFields;
    private static getNestedItems;
    private static createRelatedDataMap;
    private computeIdsForRelationship;
    private assignRelatedToItems;
    static parseQuery(graphqlQuery: string, variables?: Record<string, unknown>): RemoteJoinerQuery;
    constructor(serviceConfigs: ModuleJoinerConfig[], remoteFetchData: RemoteFetchDataCallback, options?: {
        autoCreateServiceNameAlias?: boolean;
        entitiesMap?: Map<string, any>;
    });
    setFetchDataCallback(remoteFetchData: RemoteFetchDataCallback): void;
    private buildReferences;
    private mergeFieldAlias;
    private getServiceConfig;
    private cacheServiceConfig;
    private fetchData;
    private checkIfKeysExist;
    private handleFieldAliases;
    private handleExpands;
    private getEntityRelationship;
    private parseExpands;
    private buildQueryPlan;
    private parseProperties;
    private getEntity;
    private parseAlias;
    private groupExpands;
    private createFilterFromInitialData;
    private mergeInitialData;
    query(queryObj: RemoteJoinerQuery, options?: RemoteJoinerOptions): Promise<any>;
}
//# sourceMappingURL=remote-joiner.d.ts.map