import type { FieldValues } from "./filter/types/fields.js"; import type { FieldPath } from "./filter/types/path/eager.js"; /** * the function defaults to "eq", but has additional properties for notEq, in and notIn */ export interface WhereFilter extends ReturnType> { } export declare function makeWhereFilter(): WhereFilter; export interface WhereHelpers extends ReturnType> { } declare function makeHelpers_(): { in, V extends import("./filter/types/path/eager.js").PathValue>(this: void, path: TFieldName, value: readonly V[]): { key: TFieldName; value: readonly V[]; t: "in"; }; notIn, V_1 extends import("./filter/types/path/eager.js").PathValue>(this: void, path: TFieldName_1, value: readonly V_1[]): { key: TFieldName_1; value: readonly V_1[]; t: "not-in"; }; eq, V_2 extends import("./filter/types/path/eager.js").PathValue>(this: void, path: TFieldName_2, value: V_2): { key: TFieldName_2; value: V_2; t: "eq"; }; notEq, V_3 extends import("./filter/types/path/eager.js").PathValue>(this: void, path: TFieldName_3, value: V_3): { key: TFieldName_3; value: V_3; t: "not-eq"; }; }; declare function makeWhereFilter_(): (, V extends import("./filter/types/path/eager.js").PathValue>(this: void, path: TFieldName, value: V) => { key: TFieldName; value: V; t: "eq"; }) & WhereHelpers; export type WhereValue = { t: T; v: V; }; type SupportedValues = string | boolean | number | null; export type WhereIn = { t: T; v: Values; }; /** * @tsplus fluent Iterable $contains * @tsplus location "@effect-ts-app/boilerplate-infra/lib/filter" */ export declare function $contains(_: readonly A[], v: V): WhereValue<"contains", A, V>; /** * @tsplus fluent Iterable $notContains * @tsplus location "@effect-ts-app/boilerplate-infra/lib/filter" */ export declare function $notContains(_: readonly A[], v: V): WhereValue<"not-contains", A, V>; /** * @tsplus fluent string $in * @tsplus fluent boolean $in * @tsplus fluent number $in * @tsplus location "@effect-ts-app/boilerplate-infra/lib/filter" */ export declare function $in(_: A, ...v: Values): WhereIn<"in", A, Values>; /** * @tsplus fluent string $notIn * @tsplus fluent boolean $notIn * @tsplus fluent number $notIn * @tsplus location "@effect-ts-app/boilerplate-infra/lib/filter" */ export declare function $notIn(_: A, ...v: Values): WhereIn<"not-in", A, Values>; /** * @tsplus fluent string $is * @tsplus fluent boolean $is * @tsplus fluent number $is * @tsplus fluent Object $is * @tsplus location "@effect-ts-app/boilerplate-infra/lib/filter" */ export declare function $is(_: A, v: V): WhereValue<"eq", A, V>; /** * @tsplus fluent string $isnt * @tsplus fluent boolean $isnt * @tsplus fluent number $isnt * @tsplus fluent Object $isnt * @tsplus location "@effect-ts-app/boilerplate-infra/lib/filter" */ export declare function $isnt(_: A, v: V): WhereValue<"not-eq", A, V>; declare function $is__(v: V): (_: A) => WhereValue<"eq", A, V>; declare function $isnt__(v: V): (_: A) => WhereValue<"not-eq", A, V>; declare function $in__(...v: Values): (_: A) => WhereIn<"in", A, [...Values]>; declare function $notIn__(...v: Values): (_: A) => WhereIn<"not-in", A, [...Values]>; export declare const Filters: { $is: typeof $is__; $isnt: typeof $isnt__; $in: typeof $in__; $notIn: typeof $notIn__; }; /** * @tsplus fluent string $startsWith * @tsplus location "@effect-ts-app/boilerplate-infra/lib/filter" */ export declare function $startsWith(_: A, v: V): WhereValue<"starts-with", A, V>; /** * @tsplus fluent string $endsWith * @tsplus location "@effect-ts-app/boilerplate-infra/lib/filter" */ export declare function $endsWith(_: A, v: V): WhereValue<"ends-with", A, V>; /** * @tsplus fluent string $includes * @tsplus location "@effect-ts-app/boilerplate-infra/lib/filter" */ export declare function $includes(_: A, v: V): WhereValue<"includes", A, V>; type ValueType = { t: "in" | "not-in"; v: readonly V[]; } | { t: "eq" | "not-eq"; v: V; }; type TType = T extends ValueType ? T["t"] : never; type VType = T extends ValueType ? T["v"] : never; type FIL = { key: K; t: T; value: V; readonly S: S; }; export declare function makeFilters(): { , A extends import("./filter/types/path/eager.js").PathValue, Val>(path: TFieldName, value: (v: A) => Val): FIL, VType>; , A_1 extends import("./filter/types/path/eager.js").PathValue>(path: TFieldName_1, value: A_1): FIL; }; export {}; //# sourceMappingURL=filter.d.ts.map