import { Repository, SelectQueryBuilder } from "typeorm"; import { FindWithoutRelationsOptions } from "../repositories/customer-group"; /** * Custom query entity, it is part of the creation of a custom findWithRelationsAndCount needs. * Allow to query the relations for the specified entity ids * @param repository * @param entityIds * @param groupedRelations * @param withDeleted * @param select */ export declare function queryEntityWithIds(repository: Repository, entityIds: string[], groupedRelations: { [toplevel: string]: string[]; }, withDeleted?: boolean, select?: (keyof T)[]): Promise; /** * Custom query entity without relations, it is part of the creation of a custom findWithRelationsAndCount needs. * Allow to query the entities without taking into account the relations. The relations will be queried separately * using the queryEntityWithIds util * @param repository * @param optionsWithoutRelations * @param shouldCount * @param customJoinBuilders */ export declare function queryEntityWithoutRelations(repository: Repository, optionsWithoutRelations: FindWithoutRelationsOptions, shouldCount?: boolean, customJoinBuilders?: ((qb: SelectQueryBuilder, alias: string) => void)[]): Promise<[T[], number]>; /** * Grouped the relation to the top level entity * @param relations */ export declare function getGroupedRelations(relations: string[]): { [toplevel: string]: string[]; }; /** * Merged the entities and relations that composed by the result of queryEntityWithIds and queryEntityWithoutRelations * call * @param entitiesAndRelations */ export declare function mergeEntitiesWithRelations(entitiesAndRelations: Array>): T[];