import { Prettify } from "../common"; import { OperatorMap } from "../dal"; import { RemoteQueryEntryPoints } from "./remote-query-entry-points"; type ExcludedProps = "__typename"; type Depth = [never, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; type CleanupObject = Prettify, ExcludedProps>>; type OmitNever = { [K in keyof T as T[K] extends never ? never : K]: T[K]; }; type TypeOnly = Required>; type ExtractFiltersOperators> = { [Key in keyof T]?: Key extends Exclusion[number] ? never : Key extends ExcludedProps ? never : NonNullable extends string | number | boolean | Date ? T[Key] | T[Key][] | OperatorMap : T[Key] extends Array ? TypeOnly extends { __typename: any; } ? RemoteQueryFilters : R extends object ? CleanupObject : never : T[Key] extends { __typename: any; } ? RemoteQueryFilters : T[Key] extends object ? CleanupObject : never; }; type RemoteQueryFilterOperators = { $or?: (T & RemoteQueryFilterOperators)[]; $and?: (T & RemoteQueryFilterOperators)[]; $not?: T & RemoteQueryFilterOperators; }; /** * Extract all available filters from a remote entry point deeply */ export type InternalRemoteQueryFilters = Lim extends number ? TEntry extends keyof RemoteQueryEntryPointsLevel ? TypeOnly extends Array ? Prettify>> : Prettify>> : Record : never; export type RemoteQueryFilters = RemoteQueryFilterOperators> & InternalRemoteQueryFilters; export {}; //# sourceMappingURL=to-remote-query.d.ts.map