Skip to content

ConditionJSON

ConditionJSON = ConditionLeaf | ConditionCombinator | ConditionFn | string

Defined in: src/types/ICondition.ts:46

A declarative condition attached to a grant. May be:

  • a comparison leaf ([lhs, op, rhs]),
  • a combinator object ({ and | or | not }),
  • a custom-fn reference ({ fn, args }),
  • or the string sugar form (e.g. '$.order.value > 100000') which compiles to the canonical JSON above.

Note: evaluation is implemented in a later phase; the type is defined now so the grant model can carry/serialize conditions.