Interface FilterCondition

filter condition for content selection

defines a single filter constraint on a field. supports three condition types: Match (exact match), Range (numeric range), and GeoRadius (geographic proximity).

interface FilterCondition {
    field: string;
    condition:
        | {
            type: "Match";
            value: string | number | boolean;
        }
        | {
            type: "Range";
            value: {
                gte?: number;
                lte?: number;
                gt?: number;
                lt?: number;
            };
        }
        | {
            type: "DatetimeRange";
            value: {
                gte?: string;
                lte?: string;
                gt?: string;
                lt?: string;
            };
        }
        | {
            type: "GeoRadius";
            value: {
                lat: number;
                lon: number;
                radius: number;
            };
        };
}

Properties

Properties

field: string

field name to filter on

condition:
    | {
        type: "Match";
        value: string | number | boolean;
    }
    | {
        type: "Range";
        value: {
            gte?: number;
            lte?: number;
            gt?: number;
            lt?: number;
        };
    }
    | {
        type: "DatetimeRange";
        value: {
            gte?: string;
            lte?: string;
            gt?: string;
            lt?: string;
        };
    }
    | {
        type: "GeoRadius";
        value: {
            lat: number;
            lon: number;
            radius: number;
        };
    }

filter condition (Match, Range, DatetimeRange, or GeoRadius)