import { Constructor } from "../modules-sdk"; export type Dictionary = { [k: string]: T; }; type Query = T extends object ? T extends Scalar ? never : FilterQuery : FilterValue; type ExpandScalar = null | (T extends string ? string | RegExp : T extends Date ? Date | string : T); type Scalar = boolean | number | string | bigint | symbol | Date | RegExp | Buffer | { toHexString(): string; }; type ReadonlyPrimary = T extends any[] ? Readonly : T; declare const PrimaryKeyType: unique symbol; type Primary = T extends { [PrimaryKeyType]?: infer PK; } ? ReadonlyPrimary : T extends { _id?: infer PK; } ? ReadonlyPrimary | string : T extends { uuid?: infer PK; } ? ReadonlyPrimary : T extends { id?: infer PK; } ? ReadonlyPrimary : never; export type OperatorMap = { $and?: Query[]; $or?: Query[]; $eq?: ExpandScalar | ExpandScalar[]; $ne?: ExpandScalar; $in?: ExpandScalar[]; $nin?: ExpandScalar[]; $not?: Query; $gt?: ExpandScalar; $gte?: ExpandScalar; $lt?: ExpandScalar; $lte?: ExpandScalar; $like?: string; $re?: string; $ilike?: string; $fulltext?: string; $overlap?: string[]; $contains?: string[]; $contained?: string[]; $exists?: boolean; }; type FilterValue2 = T | ExpandScalar | Primary; type FilterValue = OperatorMap> | FilterValue2 | FilterValue2[] | null; type PrevLimit = [never, 0, 1, 2]; export type FilterQueryProperties = { [Key in keyof T]?: T[Key] extends boolean | number | string | bigint | symbol | Date ? T[Key] | OperatorMap : T[Key] extends infer U ? U extends { [x: number]: infer V; } ? V extends object ? FilterQuery, PrevLimit[Prev]> : never : never : never; }; export type FilterQuery = Prev extends never ? never : T extends Constructor ? FilterQueryProperties : FilterQueryProperties; export type Order = { [key in keyof T]?: "ASC" | "DESC" | Order ? T[key][0] : T[key]>; }; export {}; //# sourceMappingURL=utils.d.ts.map