import { InferEntityType } from "../dml"; import { Dictionary, FilterQuery, Order } from "./utils"; export { FilterQuery, OperatorMap } from "./utils"; /** * @interface * * An object used to allow specifying flexible queries with and/or conditions. */ export interface BaseFilterable { /** * An array of filters to apply on the entity, where each item in the array is joined with an "and" condition. */ $and?: (T | BaseFilterable)[]; /** * An array of filters to apply on the entity, where each item in the array is joined with an "or" condition. */ $or?: (T | BaseFilterable)[]; } /** * The options to apply when retrieving an item. */ export interface OptionsQuery { /** * Relations to populate in the retrieved items. */ populate?: string[]; /** * Fields to sort-order items by. */ orderBy?: Order | Order[]; /** * Limit the number of items retrieved in the list. */ limit?: number; /** * The number of items to skip before the retrieved items in the list. */ offset?: number; /** * The fields to include in each of the items. */ fields?: string[]; /** * Group results by a field or set of fields. */ groupBy?: string | string[]; /** * Filters to apply on the retrieved items. */ filters?: Dictionary | string[] | boolean; /** * Load strategy (e.g for mikro orm it accept select-in or joined) */ strategy?: "select-in" | "joined" | (string & {}); } /** * @interface * * An object used to specify filters and options on a list of items. */ export type FindOptions = { /** * The filters to apply on the items. */ where: FilterQuery> & BaseFilterable>>; /** * The options to apply when retrieving the items. */ options?: OptionsQuery>; }; /** * @interface * * An object used to specify the configuration of how the upsert should be performed. */ export type UpsertWithReplaceConfig = { /** * The relationships that will be updated/created/deleted as part of the upsert */ relations?: (keyof T)[]; }; export * from "./repository-service"; export * from "./entity"; //# sourceMappingURL=index.d.ts.map