Variable: dashboardFilterSchema
const dashboardFilterSchema: ZodDiscriminatedUnion<[ZodObject<{
field: ZodString;
id: ZodString;
kind: ZodLiteral<"date-range">;
label: ZodString;
}, $strip>, ZodObject<{
field: ZodString;
id: ZodString;
kind: ZodLiteral<"select">;
label: ZodString;
multiple: ZodOptional<ZodBoolean>;
searchable: ZodOptional<ZodBoolean>;
}, $strip>, ZodObject<{
defaultOperator: ZodOptional<ZodEnum<{
eq: "eq";
gt: "gt";
gte: "gte";
lt: "lt";
lte: "lte";
}>>;
field: ZodString;
format: ZodOptional<ZodEnum<{
currency: "currency";
number: "number";
}>>;
id: ZodString;
kind: ZodLiteral<"measure">;
label: ZodString;
operators: ZodOptional<ZodArray<ZodEnum<{
eq: "eq";
gt: "gt";
gte: "gte";
lt: "lt";
lte: "lte";
}>>>;
}, $strip>, ZodObject<{
field: ZodString;
id: ZodString;
kind: ZodLiteral<"search">;
label: ZodString;
}, $strip>], "kind">;Defined in: shared/insights/types/dashboard-filter.ts:94
The available filter controls, discriminated on kind. Each targets one
logical field and compiles to a single ConditionLeaf:
date-range— a from/to picker on a temporal field.betweenwhen both bounds are set,gte/ltefor a half-open range.select— a dimension (enum/string) picker.eqfor a single choice,inwhenmultiple. Its choices are resolved from the data server-side (see DashboardFilterOption), not authored on the descriptor.measure— a numeric comparison (= > < ≥ ≤) on a number/money field.operatorsnarrows the offered set;defaultOperatorpreselects one.search— acontainstext match on a string field.