Type Alias: ActionParamRule
@kortexya/reasoninglayer / ActionParamRule
Type Alias: ActionParamRule
Section titled “Type Alias: ActionParamRule”ActionParamRule = {
param:string;rule:"non_empty_string"; } | {max:number;min:number;param:string;rule:"int_range"; } | {max:number;min:number;param:string;rule:"real_range"; } | {allowed:string[];param:string;rule:"one_of"; }
Defined in: src/types/actions.ts:40
A validation rule over an action’s parameters.
Union Members
Section titled “Union Members”Type Literal
Section titled “Type Literal”{ param: string; rule: "non_empty_string"; }
param:
string
Parameter the rule applies to.
rule:
"non_empty_string"
String parameter, when present, must be non-empty.
Type Literal
Section titled “Type Literal”{ max: number; min: number; param: string; rule: "int_range"; }
max:
number
Inclusive upper bound.
min:
number
Inclusive lower bound.
param:
string
Parameter the rule applies to.
rule:
"int_range"
Integer parameter, when present, in [min, max].
Type Literal
Section titled “Type Literal”{ max: number; min: number; param: string; rule: "real_range"; }
max:
number
Inclusive upper bound.
min:
number
Inclusive lower bound.
param:
string
Parameter the rule applies to.
rule:
"real_range"
Real parameter, when present, in [min, max].
Type Literal
Section titled “Type Literal”{ allowed: string[]; param: string; rule: "one_of"; }
allowed
Section titled “allowed”allowed:
string[]
Permitted values.
param:
string
Parameter the rule applies to.
rule:
"one_of"
String parameter, when present, must be one of allowed.
Remarks
Section titled “Remarks”Tagged discriminated union with rule as the discriminant. The wire shape
(ActionParamRuleDto) is externally tagged by rule name
(non_empty_string, int_range, real_range, one_of).