@inixiative/json-rules 3.21.0 → 3.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -529,6 +529,7 @@ type AggregateRule<TRuleValue = RuleValue, TDateValue = DateRuleValue> = WindowF
529
529
  condition?: Condition<TRuleValue, TDateValue>;
530
530
  operator: Operator;
531
531
  error?: string;
532
+ coerceType?: FieldKind;
532
533
  } & ValueSourceFields<number | [number, number]>;
533
534
  type Rule<TValue = RuleValue> = ValueSourceFields<TValue> & {
534
535
  field: string;
@@ -655,9 +656,10 @@ type ListBindingsOptions = {
655
656
  declare const listBindings: (condition: Condition, { required }?: ListBindingsOptions) => string[];
656
657
  /**
657
658
  * The paths a rule reads from the row it is checked on, sorted: each leaf's `field` and each
658
- * `{ path }` on its value side. A relation node (`arrayOperator`, `aggregate`) contributes its own
659
- * field; what its `condition` / `filter` read is relative to the related rows, so it is not listed.
660
- * For a caller that must load what a rule reads before checking it (a hydrator).
659
+ * `{ path }` on its value side, scope prefix dropped. Inside a relation node (`arrayOperator`,
660
+ * `aggregate`) a bare `field` reads the related row and is not listed, while a bare value path and
661
+ * a scope ref that climbs back to the row (`$$.` one relation down, `$$$.` two down) are. For a
662
+ * caller that must load what a rule reads before checking it (a hydrator).
661
663
  */
662
664
  declare const listFields: (condition: Condition) => string[];
663
665
  /**
package/dist/index.d.ts CHANGED
@@ -529,6 +529,7 @@ type AggregateRule<TRuleValue = RuleValue, TDateValue = DateRuleValue> = WindowF
529
529
  condition?: Condition<TRuleValue, TDateValue>;
530
530
  operator: Operator;
531
531
  error?: string;
532
+ coerceType?: FieldKind;
532
533
  } & ValueSourceFields<number | [number, number]>;
533
534
  type Rule<TValue = RuleValue> = ValueSourceFields<TValue> & {
534
535
  field: string;
@@ -655,9 +656,10 @@ type ListBindingsOptions = {
655
656
  declare const listBindings: (condition: Condition, { required }?: ListBindingsOptions) => string[];
656
657
  /**
657
658
  * The paths a rule reads from the row it is checked on, sorted: each leaf's `field` and each
658
- * `{ path }` on its value side. A relation node (`arrayOperator`, `aggregate`) contributes its own
659
- * field; what its `condition` / `filter` read is relative to the related rows, so it is not listed.
660
- * For a caller that must load what a rule reads before checking it (a hydrator).
659
+ * `{ path }` on its value side, scope prefix dropped. Inside a relation node (`arrayOperator`,
660
+ * `aggregate`) a bare `field` reads the related row and is not listed, while a bare value path and
661
+ * a scope ref that climbs back to the row (`$$.` one relation down, `$$$.` two down) are. For a
662
+ * caller that must load what a rule reads before checking it (a hydrator).
661
663
  */
662
664
  declare const listFields: (condition: Condition) => string[];
663
665
  /**