Skip to content

Type Alias: ConstraintDto

@kortexya/reasoninglayer


@kortexya/reasoninglayer / ConstraintDto

ConstraintDto = { type: "Integer"; } | { type: "String"; } | { type: "Boolean"; } | { type: "Real"; } | { type: "IntegerRange"; value: { max: number; min: number; }; } | { type: "RealRange"; value: { max: number; min: number; }; } | { type: "StringPattern"; value: string; } | { type: "Enum"; value: ValueDto[]; } | { type: "OrderedEnum"; value: ValueDto[]; } | { type: "DateRange"; value: { end: string; start: string; }; } | { type: "TimestampBefore"; value: string; } | { type: "TimestampAfter"; value: string; } | { type: "PathEquation"; value: { path1: string[]; path2: string[]; }; } | { type: "FuzzyRange"; value: { center: number; tolerance: number; }; } | { type: "FuzzyLinguistic"; value: { term: string; variable: string; }; } | { type: "FuzzyPathSimilarity"; value: { minSimilarity: number; path1: string[]; path2: string[]; }; } | { type: "PathLessThan"; value: { path1: string[]; path2: string[]; }; } | { type: "PathLessOrEqual"; value: { path1: string[]; path2: string[]; }; }

Defined in: src/types/sorts.ts:40

Constraint on a feature within a sort’s feature descriptor.

Tagged union discriminated by "type". Contains 17 variants covering type constraints, range constraints, pattern constraints, path equations, fuzzy constraints, and temporal constraints.

{ type: "Integer"; }


{ type: "String"; }


{ type: "Boolean"; }


{ type: "Real"; }


{ type: "IntegerRange"; value: { max: number; min: number; }; }


{ type: "RealRange"; value: { max: number; min: number; }; }

A closed interval over the reals, the Real twin of IntegerRange.


{ type: "StringPattern"; value: string; }


{ type: "Enum"; value: ValueDto[]; }


{ type: "OrderedEnum"; value: ValueDto[]; }

An enum whose values form a scale, in the order listed (small < medium < large).


{ type: "DateRange"; value: { end: string; start: string; }; }


{ type: "TimestampBefore"; value: string; }


{ type: "TimestampAfter"; value: string; }


{ type: "PathEquation"; value: { path1: string[]; path2: string[]; }; }


{ type: "FuzzyRange"; value: { center: number; tolerance: number; }; }


{ type: "FuzzyLinguistic"; value: { term: string; variable: string; }; }


{ type: "FuzzyPathSimilarity"; value: { minSimilarity: number; path1: string[]; path2: string[]; }; }


{ type: "PathLessThan"; value: { path1: string[]; path2: string[]; }; }


{ type: "PathLessOrEqual"; value: { path1: string[]; path2: string[]; }; }