@inixiative/json-rules 2.23.0 → 2.25.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.cjs +5 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +56 -17
- package/dist/index.d.ts +56 -17
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.d.cts
CHANGED
|
@@ -587,20 +587,21 @@ type ModelDefaultNarrowing = {
|
|
|
587
587
|
* Per-field eligibility over THIS model — decorates a field's option picker.
|
|
588
588
|
* A bare `Condition` is the eligibility `where`: the field's selectable values =
|
|
589
589
|
* DISTINCT(field) over this model filtered by `where` (plus the model's own
|
|
590
|
-
* narrowing). A `SourceSpec` adds an optional `label` — a sibling column
|
|
591
|
-
*
|
|
592
|
-
* sets need no special form: declare
|
|
593
|
-
* node and it compiles over whatever
|
|
594
|
-
* composes AND-only across layers (general
|
|
595
|
-
* `root`/`relations`); a later layer's `label` wins.
|
|
590
|
+
* narrowing). A `SourceSpec` adds an optional `label` — a sibling column, or a
|
|
591
|
+
* dotted to-one path ending on a scalar (like `groupBy`), co-selected as each
|
|
592
|
+
* value's display label. Referenced-model option sets need no special form: declare
|
|
593
|
+
* the source at a relation-traversed narrowing node and it compiles over whatever
|
|
594
|
+
* model that path resolves to. The `where` composes AND-only across layers (general
|
|
595
|
+
* via `mapDefaults`, path-specific via `root`/`relations`); a later layer's `label` wins.
|
|
596
596
|
*/
|
|
597
597
|
sources?: Record<string, SourceValue>;
|
|
598
598
|
};
|
|
599
599
|
/**
|
|
600
|
-
* A sourced field's eligibility `where` plus an optional
|
|
601
|
-
*
|
|
602
|
-
*
|
|
603
|
-
*
|
|
600
|
+
* A sourced field's eligibility `where` plus an optional display-label column — a
|
|
601
|
+
* sibling, or a dotted to-one path ending on a scalar, resolved exactly like a
|
|
602
|
+
* `groupBy` axis — and an optional `groupBy`: a dotted path (to-one hops only, ending
|
|
603
|
+
* on a scalar) whose value partitions the option set. Grouped options carry `group`;
|
|
604
|
+
* the classic flat set is the ungrouped case. At least one key is required — `{}` is not a
|
|
604
605
|
* Condition; the unconstrained spelling is `true`.
|
|
605
606
|
*/
|
|
606
607
|
type SourceSpec = {
|
|
@@ -674,6 +675,31 @@ declare const resolveLensBindings: (lensOrNarrowing: Lens | LensNarrowing, bindi
|
|
|
674
675
|
*/
|
|
675
676
|
declare const validateBindNames: (narrowing: LensNarrowing) => string[];
|
|
676
677
|
|
|
678
|
+
type LensPathHop = {
|
|
679
|
+
field: string;
|
|
680
|
+
entry: FieldMapEntry;
|
|
681
|
+
mapName: string;
|
|
682
|
+
modelName: string;
|
|
683
|
+
/** The relation path from the lens anchor to the model this hop reads. */
|
|
684
|
+
relPath: string[];
|
|
685
|
+
};
|
|
686
|
+
/**
|
|
687
|
+
* Where a dotted path lands through the lens, hop by hop. `hidden` is a field the model has but
|
|
688
|
+
* the narrowing does not expose at this visit; `missing` is a field the model does not have (or a
|
|
689
|
+
* model the map does not have); `pastScalar` is a segment after a scalar. A path that continues
|
|
690
|
+
* below a Json column resolves at the column with the remainder in `jsonSubPath`.
|
|
691
|
+
*/
|
|
692
|
+
type LensPathResolution = {
|
|
693
|
+
outcome: 'resolved';
|
|
694
|
+
hops: LensPathHop[];
|
|
695
|
+
terminal: LensPathHop;
|
|
696
|
+
jsonSubPath: string[];
|
|
697
|
+
} | {
|
|
698
|
+
outcome: 'hidden' | 'missing' | 'pastScalar';
|
|
699
|
+
index: number;
|
|
700
|
+
hops: LensPathHop[];
|
|
701
|
+
};
|
|
702
|
+
|
|
677
703
|
type RuleLensViolation = {
|
|
678
704
|
path: string;
|
|
679
705
|
reason: string;
|
|
@@ -707,7 +733,8 @@ type ProjectedVisit = {
|
|
|
707
733
|
whereClauses: Condition[];
|
|
708
734
|
/** Per-field source eligibility wheres, composed across layers (general + path). */
|
|
709
735
|
sources: Record<string, Condition[]>;
|
|
710
|
-
/** Per-field display
|
|
736
|
+
/** Per-field display label for a sourced field (from a SourceSpec's `label`): a sibling
|
|
737
|
+
* column or a dotted to-one path. */
|
|
711
738
|
sourceLabels: Record<string, string>;
|
|
712
739
|
/** Per-field option-partition axes for a sourced field (from a SourceSpec's `groupBy`). */
|
|
713
740
|
sourceGroupBys: Record<string, string[]>;
|
|
@@ -735,6 +762,15 @@ declare const exposedSurface: (lensOrNarrowing: Lens | LensNarrowing, opts?: Pro
|
|
|
735
762
|
|
|
736
763
|
declare const validateNarrowing: (narrowing: LensNarrowing) => void;
|
|
737
764
|
|
|
765
|
+
/**
|
|
766
|
+
* Resolve one dotted path through a lens, hop by hop, verifying as it walks: every hop is checked
|
|
767
|
+
* against the narrowing at that visit, so a relation the narrowing dropped is `hidden`, a column the
|
|
768
|
+
* model lacks is `missing`, and a segment past a scalar is `pastScalar`. This is the walk
|
|
769
|
+
* `checkRuleAgainstLens` gates a rule's field with, exposed for consumers that resolve paths of their
|
|
770
|
+
* own (template tokens, loop bindings, presence guards).
|
|
771
|
+
*/
|
|
772
|
+
declare const resolveLensPath: (lensOrNarrowing: Lens | LensNarrowing, path: string) => LensPathResolution;
|
|
773
|
+
|
|
738
774
|
/**
|
|
739
775
|
* The values one rule compares at one declared source — keyed the way `projectByPath`
|
|
740
776
|
* keys a source (`path` + `field`), so the caller can join it back to the source's
|
|
@@ -802,7 +838,9 @@ type SourceQuery = {
|
|
|
802
838
|
mapName: string;
|
|
803
839
|
model: string;
|
|
804
840
|
field: string;
|
|
805
|
-
/**
|
|
841
|
+
/** Co-selected as each value's display label (from a SourceSpec's `label`): a sibling
|
|
842
|
+
* column, or a dotted to-one path like a groupBy axis — then selected nested in prisma
|
|
843
|
+
* and aliased `__label` in sql. */
|
|
806
844
|
label?: string;
|
|
807
845
|
/** Option-partition axes (from a SourceSpec's `groupBy`, normalized); each axis
|
|
808
846
|
* column is selected nested in prisma and aliased `__group_i` in sql. */
|
|
@@ -827,9 +865,9 @@ type SourceRowShape = 'prisma' | 'sql';
|
|
|
827
865
|
* Materialize one compiled `SourceQuery`'s fetched rows into its `SourceValues` —
|
|
828
866
|
* the executor-side counterpart of `sourceQueries`, so apps never hand-map rows.
|
|
829
867
|
* `rowShape` names the wire format: prisma rows (default) nest each `groupBy` axis
|
|
830
|
-
* as related objects; sql rows carry them flat under the
|
|
831
|
-
* aliases. Grouped queries fetch without
|
|
832
|
-
* happens here.
|
|
868
|
+
* (and a dotted `label`) as related objects; sql rows carry them flat under the
|
|
869
|
+
* statement's `__group_i` / `__label` aliases. Grouped queries fetch without
|
|
870
|
+
* DISTINCT, so dedup per (groups, value) happens here.
|
|
833
871
|
*/
|
|
834
872
|
declare const sourceValuesFromQueryRows: (query: SourceQuery, rows: readonly Row$1[], opts?: {
|
|
835
873
|
rowShape?: SourceRowShape;
|
|
@@ -843,7 +881,8 @@ type Row = Record<string, unknown>;
|
|
|
843
881
|
* the collection fetched UNDER the lens (relations inline), so they are already
|
|
844
882
|
* lens-scoped: eligibility here is the field's source `where` only, evaluated via
|
|
845
883
|
* `check()` (`options` feeds `{bind}` clauses). Scalar-list fields contribute one
|
|
846
|
-
* option per element, labels take the first non-null
|
|
884
|
+
* option per element, labels take the first non-null value of the label column
|
|
885
|
+
* (a sibling, or a dotted to-one path read through the nested rows), and sorting is
|
|
847
886
|
* numeric-aware in a fixed locale. Feed the result to `exposedSurface` /
|
|
848
887
|
* `projectByPath` as `{ sourceValues }`.
|
|
849
888
|
*/
|
|
@@ -950,4 +989,4 @@ declare const assertValidRule: (condition: unknown, options?: {
|
|
|
950
989
|
target?: RuleTarget;
|
|
951
990
|
}) => asserts condition is Condition;
|
|
952
991
|
|
|
953
|
-
export { AGGREGATE_OPERATORS, ALL_KINDS, ARRAY_OPERATOR_CATALOG, type AggregateMode, type AggregateRule, type All, type Any, type ArrayCatalogEntry, ArrayOperator, type ArrayRule, type Bridge, type BridgeCardinality, type BridgeDictionary, type BridgeEndpoint, type BuildOptions, type CatalogEntry, type CheckOptions, type Condition, type CreateLensInput, DATE_OPERATOR_CATALOG, type DateConfig, type DateExpr, type DateInputOrExpr, type DateInputValue, DateOperator, type DateRule, type DateRuleValue, EQUATABLE_KINDS, type EdgeExpr, type EngineGlobalsState, type EnumNarrowing, FIELD_OPERATOR_CATALOG, FieldKind, type FieldMap, type FieldMapEntry, type FieldMapSet, type FuzzyConfig, type GroupByStep, type IfThenElse, type Lens, type LensNarrowing, type ModelDefaultNarrowing, type ModelNarrowing, NULLABLE_KINDS, NUMERIC_KINDS, type NarrowingDefaults, ORDERABLE_KINDS, Operator, type OrderBy, type OrderedRuleValue, type PathProjection, type PeriodExpr, type PeriodUnit, type PrismaProvider, type PrismaStep, type PrismaWhere, type ProjectOptions, type ProjectedVisit, type RelativeUnits, type RollingExpr, type Rule, type RuleDescription, type RuleLensCheck, type RuleLensViolation, type RuleScalar, type RuleSourceValues, RuleTarget, type RuleValue, STRINGY_KINDS, type ScopeOutOfBounds, type ScopeRef, type ScopedRef, type SortDir, type SourceOption, type SourcePrismaQuery, type SourceQuery, type SourceRowShape, type SourceSpec, type SourceSqlQuery, type SourceValue, type SourceValues, type SqlResult, type StepRef, type StrictAggregateRule, type StrictAll, type StrictAny, type StrictArrayCountRule, type StrictArrayPredicateRule, type StrictArrayPresenceRule, type StrictArrayRule, type StrictCondition, type StrictContainsRule, type StrictDateComparisonRule, type StrictDateDayRule, type StrictDateRangeRule, type StrictDateRule, type StrictEqualityRule, type StrictIfThenElse, type StrictMembershipRule, type StrictOrderedComparisonRule, type StrictPatternRule, type StrictPresenceRule, type StrictRangeRule, type StrictRule, type StrictStringBoundaryRule, type TimeZoneConfig, type ToPrismaResult, type ValidationIssue, type ValidationResult, ValueShape, WINDOW_SELECTOR, type WeekStart, type WhereStep, type WindowFields, type WindowRuleType, WindowSupport, applyLens, assertValidRule, bindingNames, buildBridgeDictionary, check, checkRuleAgainstLens, createLens, describeRule, engineGlobals, executePrismaQueryPlan, exposedSurface, fuzzyContains, getAggregateOperators, getArrayOperators, getOperatorsForKind, getValueShape, getWindowSupport, isAggregateRangeOperator, isAggregateSingleOperator, isOperatorSupportedForTarget, lensRequiredBindings, maxFuzzyDistance, parseScopeRef, projectByPath, requiredBindings, resolveBindings, resolveCaseInsensitive, resolveFuzzy, resolveLensBindings, resolveScopeRef, ruleSourceValues, sourceQueries, sourceValuesFromQueryRows, sourceValuesFromRows, stampCoercions, stitchFieldMaps, supportsQueryMode, toPrisma, toSql, validateBindNames, validateFieldMap, validateFieldMapSet, validateNarrowing, validateRule };
|
|
992
|
+
export { AGGREGATE_OPERATORS, ALL_KINDS, ARRAY_OPERATOR_CATALOG, type AggregateMode, type AggregateRule, type All, type Any, type ArrayCatalogEntry, ArrayOperator, type ArrayRule, type Bridge, type BridgeCardinality, type BridgeDictionary, type BridgeEndpoint, type BuildOptions, type CatalogEntry, type CheckOptions, type Condition, type CreateLensInput, DATE_OPERATOR_CATALOG, type DateConfig, type DateExpr, type DateInputOrExpr, type DateInputValue, DateOperator, type DateRule, type DateRuleValue, EQUATABLE_KINDS, type EdgeExpr, type EngineGlobalsState, type EnumNarrowing, FIELD_OPERATOR_CATALOG, FieldKind, type FieldMap, type FieldMapEntry, type FieldMapSet, type FuzzyConfig, type GroupByStep, type IfThenElse, type Lens, type LensNarrowing, type LensPathHop, type LensPathResolution, type ModelDefaultNarrowing, type ModelNarrowing, NULLABLE_KINDS, NUMERIC_KINDS, type NarrowingDefaults, ORDERABLE_KINDS, Operator, type OrderBy, type OrderedRuleValue, type PathProjection, type PeriodExpr, type PeriodUnit, type PrismaProvider, type PrismaStep, type PrismaWhere, type ProjectOptions, type ProjectedVisit, type RelativeUnits, type RollingExpr, type Rule, type RuleDescription, type RuleLensCheck, type RuleLensViolation, type RuleScalar, type RuleSourceValues, RuleTarget, type RuleValue, STRINGY_KINDS, type ScopeOutOfBounds, type ScopeRef, type ScopedRef, type SortDir, type SourceOption, type SourcePrismaQuery, type SourceQuery, type SourceRowShape, type SourceSpec, type SourceSqlQuery, type SourceValue, type SourceValues, type SqlResult, type StepRef, type StrictAggregateRule, type StrictAll, type StrictAny, type StrictArrayCountRule, type StrictArrayPredicateRule, type StrictArrayPresenceRule, type StrictArrayRule, type StrictCondition, type StrictContainsRule, type StrictDateComparisonRule, type StrictDateDayRule, type StrictDateRangeRule, type StrictDateRule, type StrictEqualityRule, type StrictIfThenElse, type StrictMembershipRule, type StrictOrderedComparisonRule, type StrictPatternRule, type StrictPresenceRule, type StrictRangeRule, type StrictRule, type StrictStringBoundaryRule, type TimeZoneConfig, type ToPrismaResult, type ValidationIssue, type ValidationResult, ValueShape, WINDOW_SELECTOR, type WeekStart, type WhereStep, type WindowFields, type WindowRuleType, WindowSupport, applyLens, assertValidRule, bindingNames, buildBridgeDictionary, check, checkRuleAgainstLens, createLens, describeRule, engineGlobals, executePrismaQueryPlan, exposedSurface, fuzzyContains, getAggregateOperators, getArrayOperators, getOperatorsForKind, getValueShape, getWindowSupport, isAggregateRangeOperator, isAggregateSingleOperator, isOperatorSupportedForTarget, lensRequiredBindings, maxFuzzyDistance, parseScopeRef, projectByPath, requiredBindings, resolveBindings, resolveCaseInsensitive, resolveFuzzy, resolveLensBindings, resolveLensPath, resolveScopeRef, ruleSourceValues, sourceQueries, sourceValuesFromQueryRows, sourceValuesFromRows, stampCoercions, stitchFieldMaps, supportsQueryMode, toPrisma, toSql, validateBindNames, validateFieldMap, validateFieldMapSet, validateNarrowing, validateRule };
|
package/dist/index.d.ts
CHANGED
|
@@ -587,20 +587,21 @@ type ModelDefaultNarrowing = {
|
|
|
587
587
|
* Per-field eligibility over THIS model — decorates a field's option picker.
|
|
588
588
|
* A bare `Condition` is the eligibility `where`: the field's selectable values =
|
|
589
589
|
* DISTINCT(field) over this model filtered by `where` (plus the model's own
|
|
590
|
-
* narrowing). A `SourceSpec` adds an optional `label` — a sibling column
|
|
591
|
-
*
|
|
592
|
-
* sets need no special form: declare
|
|
593
|
-
* node and it compiles over whatever
|
|
594
|
-
* composes AND-only across layers (general
|
|
595
|
-
* `root`/`relations`); a later layer's `label` wins.
|
|
590
|
+
* narrowing). A `SourceSpec` adds an optional `label` — a sibling column, or a
|
|
591
|
+
* dotted to-one path ending on a scalar (like `groupBy`), co-selected as each
|
|
592
|
+
* value's display label. Referenced-model option sets need no special form: declare
|
|
593
|
+
* the source at a relation-traversed narrowing node and it compiles over whatever
|
|
594
|
+
* model that path resolves to. The `where` composes AND-only across layers (general
|
|
595
|
+
* via `mapDefaults`, path-specific via `root`/`relations`); a later layer's `label` wins.
|
|
596
596
|
*/
|
|
597
597
|
sources?: Record<string, SourceValue>;
|
|
598
598
|
};
|
|
599
599
|
/**
|
|
600
|
-
* A sourced field's eligibility `where` plus an optional
|
|
601
|
-
*
|
|
602
|
-
*
|
|
603
|
-
*
|
|
600
|
+
* A sourced field's eligibility `where` plus an optional display-label column — a
|
|
601
|
+
* sibling, or a dotted to-one path ending on a scalar, resolved exactly like a
|
|
602
|
+
* `groupBy` axis — and an optional `groupBy`: a dotted path (to-one hops only, ending
|
|
603
|
+
* on a scalar) whose value partitions the option set. Grouped options carry `group`;
|
|
604
|
+
* the classic flat set is the ungrouped case. At least one key is required — `{}` is not a
|
|
604
605
|
* Condition; the unconstrained spelling is `true`.
|
|
605
606
|
*/
|
|
606
607
|
type SourceSpec = {
|
|
@@ -674,6 +675,31 @@ declare const resolveLensBindings: (lensOrNarrowing: Lens | LensNarrowing, bindi
|
|
|
674
675
|
*/
|
|
675
676
|
declare const validateBindNames: (narrowing: LensNarrowing) => string[];
|
|
676
677
|
|
|
678
|
+
type LensPathHop = {
|
|
679
|
+
field: string;
|
|
680
|
+
entry: FieldMapEntry;
|
|
681
|
+
mapName: string;
|
|
682
|
+
modelName: string;
|
|
683
|
+
/** The relation path from the lens anchor to the model this hop reads. */
|
|
684
|
+
relPath: string[];
|
|
685
|
+
};
|
|
686
|
+
/**
|
|
687
|
+
* Where a dotted path lands through the lens, hop by hop. `hidden` is a field the model has but
|
|
688
|
+
* the narrowing does not expose at this visit; `missing` is a field the model does not have (or a
|
|
689
|
+
* model the map does not have); `pastScalar` is a segment after a scalar. A path that continues
|
|
690
|
+
* below a Json column resolves at the column with the remainder in `jsonSubPath`.
|
|
691
|
+
*/
|
|
692
|
+
type LensPathResolution = {
|
|
693
|
+
outcome: 'resolved';
|
|
694
|
+
hops: LensPathHop[];
|
|
695
|
+
terminal: LensPathHop;
|
|
696
|
+
jsonSubPath: string[];
|
|
697
|
+
} | {
|
|
698
|
+
outcome: 'hidden' | 'missing' | 'pastScalar';
|
|
699
|
+
index: number;
|
|
700
|
+
hops: LensPathHop[];
|
|
701
|
+
};
|
|
702
|
+
|
|
677
703
|
type RuleLensViolation = {
|
|
678
704
|
path: string;
|
|
679
705
|
reason: string;
|
|
@@ -707,7 +733,8 @@ type ProjectedVisit = {
|
|
|
707
733
|
whereClauses: Condition[];
|
|
708
734
|
/** Per-field source eligibility wheres, composed across layers (general + path). */
|
|
709
735
|
sources: Record<string, Condition[]>;
|
|
710
|
-
/** Per-field display
|
|
736
|
+
/** Per-field display label for a sourced field (from a SourceSpec's `label`): a sibling
|
|
737
|
+
* column or a dotted to-one path. */
|
|
711
738
|
sourceLabels: Record<string, string>;
|
|
712
739
|
/** Per-field option-partition axes for a sourced field (from a SourceSpec's `groupBy`). */
|
|
713
740
|
sourceGroupBys: Record<string, string[]>;
|
|
@@ -735,6 +762,15 @@ declare const exposedSurface: (lensOrNarrowing: Lens | LensNarrowing, opts?: Pro
|
|
|
735
762
|
|
|
736
763
|
declare const validateNarrowing: (narrowing: LensNarrowing) => void;
|
|
737
764
|
|
|
765
|
+
/**
|
|
766
|
+
* Resolve one dotted path through a lens, hop by hop, verifying as it walks: every hop is checked
|
|
767
|
+
* against the narrowing at that visit, so a relation the narrowing dropped is `hidden`, a column the
|
|
768
|
+
* model lacks is `missing`, and a segment past a scalar is `pastScalar`. This is the walk
|
|
769
|
+
* `checkRuleAgainstLens` gates a rule's field with, exposed for consumers that resolve paths of their
|
|
770
|
+
* own (template tokens, loop bindings, presence guards).
|
|
771
|
+
*/
|
|
772
|
+
declare const resolveLensPath: (lensOrNarrowing: Lens | LensNarrowing, path: string) => LensPathResolution;
|
|
773
|
+
|
|
738
774
|
/**
|
|
739
775
|
* The values one rule compares at one declared source — keyed the way `projectByPath`
|
|
740
776
|
* keys a source (`path` + `field`), so the caller can join it back to the source's
|
|
@@ -802,7 +838,9 @@ type SourceQuery = {
|
|
|
802
838
|
mapName: string;
|
|
803
839
|
model: string;
|
|
804
840
|
field: string;
|
|
805
|
-
/**
|
|
841
|
+
/** Co-selected as each value's display label (from a SourceSpec's `label`): a sibling
|
|
842
|
+
* column, or a dotted to-one path like a groupBy axis — then selected nested in prisma
|
|
843
|
+
* and aliased `__label` in sql. */
|
|
806
844
|
label?: string;
|
|
807
845
|
/** Option-partition axes (from a SourceSpec's `groupBy`, normalized); each axis
|
|
808
846
|
* column is selected nested in prisma and aliased `__group_i` in sql. */
|
|
@@ -827,9 +865,9 @@ type SourceRowShape = 'prisma' | 'sql';
|
|
|
827
865
|
* Materialize one compiled `SourceQuery`'s fetched rows into its `SourceValues` —
|
|
828
866
|
* the executor-side counterpart of `sourceQueries`, so apps never hand-map rows.
|
|
829
867
|
* `rowShape` names the wire format: prisma rows (default) nest each `groupBy` axis
|
|
830
|
-
* as related objects; sql rows carry them flat under the
|
|
831
|
-
* aliases. Grouped queries fetch without
|
|
832
|
-
* happens here.
|
|
868
|
+
* (and a dotted `label`) as related objects; sql rows carry them flat under the
|
|
869
|
+
* statement's `__group_i` / `__label` aliases. Grouped queries fetch without
|
|
870
|
+
* DISTINCT, so dedup per (groups, value) happens here.
|
|
833
871
|
*/
|
|
834
872
|
declare const sourceValuesFromQueryRows: (query: SourceQuery, rows: readonly Row$1[], opts?: {
|
|
835
873
|
rowShape?: SourceRowShape;
|
|
@@ -843,7 +881,8 @@ type Row = Record<string, unknown>;
|
|
|
843
881
|
* the collection fetched UNDER the lens (relations inline), so they are already
|
|
844
882
|
* lens-scoped: eligibility here is the field's source `where` only, evaluated via
|
|
845
883
|
* `check()` (`options` feeds `{bind}` clauses). Scalar-list fields contribute one
|
|
846
|
-
* option per element, labels take the first non-null
|
|
884
|
+
* option per element, labels take the first non-null value of the label column
|
|
885
|
+
* (a sibling, or a dotted to-one path read through the nested rows), and sorting is
|
|
847
886
|
* numeric-aware in a fixed locale. Feed the result to `exposedSurface` /
|
|
848
887
|
* `projectByPath` as `{ sourceValues }`.
|
|
849
888
|
*/
|
|
@@ -950,4 +989,4 @@ declare const assertValidRule: (condition: unknown, options?: {
|
|
|
950
989
|
target?: RuleTarget;
|
|
951
990
|
}) => asserts condition is Condition;
|
|
952
991
|
|
|
953
|
-
export { AGGREGATE_OPERATORS, ALL_KINDS, ARRAY_OPERATOR_CATALOG, type AggregateMode, type AggregateRule, type All, type Any, type ArrayCatalogEntry, ArrayOperator, type ArrayRule, type Bridge, type BridgeCardinality, type BridgeDictionary, type BridgeEndpoint, type BuildOptions, type CatalogEntry, type CheckOptions, type Condition, type CreateLensInput, DATE_OPERATOR_CATALOG, type DateConfig, type DateExpr, type DateInputOrExpr, type DateInputValue, DateOperator, type DateRule, type DateRuleValue, EQUATABLE_KINDS, type EdgeExpr, type EngineGlobalsState, type EnumNarrowing, FIELD_OPERATOR_CATALOG, FieldKind, type FieldMap, type FieldMapEntry, type FieldMapSet, type FuzzyConfig, type GroupByStep, type IfThenElse, type Lens, type LensNarrowing, type ModelDefaultNarrowing, type ModelNarrowing, NULLABLE_KINDS, NUMERIC_KINDS, type NarrowingDefaults, ORDERABLE_KINDS, Operator, type OrderBy, type OrderedRuleValue, type PathProjection, type PeriodExpr, type PeriodUnit, type PrismaProvider, type PrismaStep, type PrismaWhere, type ProjectOptions, type ProjectedVisit, type RelativeUnits, type RollingExpr, type Rule, type RuleDescription, type RuleLensCheck, type RuleLensViolation, type RuleScalar, type RuleSourceValues, RuleTarget, type RuleValue, STRINGY_KINDS, type ScopeOutOfBounds, type ScopeRef, type ScopedRef, type SortDir, type SourceOption, type SourcePrismaQuery, type SourceQuery, type SourceRowShape, type SourceSpec, type SourceSqlQuery, type SourceValue, type SourceValues, type SqlResult, type StepRef, type StrictAggregateRule, type StrictAll, type StrictAny, type StrictArrayCountRule, type StrictArrayPredicateRule, type StrictArrayPresenceRule, type StrictArrayRule, type StrictCondition, type StrictContainsRule, type StrictDateComparisonRule, type StrictDateDayRule, type StrictDateRangeRule, type StrictDateRule, type StrictEqualityRule, type StrictIfThenElse, type StrictMembershipRule, type StrictOrderedComparisonRule, type StrictPatternRule, type StrictPresenceRule, type StrictRangeRule, type StrictRule, type StrictStringBoundaryRule, type TimeZoneConfig, type ToPrismaResult, type ValidationIssue, type ValidationResult, ValueShape, WINDOW_SELECTOR, type WeekStart, type WhereStep, type WindowFields, type WindowRuleType, WindowSupport, applyLens, assertValidRule, bindingNames, buildBridgeDictionary, check, checkRuleAgainstLens, createLens, describeRule, engineGlobals, executePrismaQueryPlan, exposedSurface, fuzzyContains, getAggregateOperators, getArrayOperators, getOperatorsForKind, getValueShape, getWindowSupport, isAggregateRangeOperator, isAggregateSingleOperator, isOperatorSupportedForTarget, lensRequiredBindings, maxFuzzyDistance, parseScopeRef, projectByPath, requiredBindings, resolveBindings, resolveCaseInsensitive, resolveFuzzy, resolveLensBindings, resolveScopeRef, ruleSourceValues, sourceQueries, sourceValuesFromQueryRows, sourceValuesFromRows, stampCoercions, stitchFieldMaps, supportsQueryMode, toPrisma, toSql, validateBindNames, validateFieldMap, validateFieldMapSet, validateNarrowing, validateRule };
|
|
992
|
+
export { AGGREGATE_OPERATORS, ALL_KINDS, ARRAY_OPERATOR_CATALOG, type AggregateMode, type AggregateRule, type All, type Any, type ArrayCatalogEntry, ArrayOperator, type ArrayRule, type Bridge, type BridgeCardinality, type BridgeDictionary, type BridgeEndpoint, type BuildOptions, type CatalogEntry, type CheckOptions, type Condition, type CreateLensInput, DATE_OPERATOR_CATALOG, type DateConfig, type DateExpr, type DateInputOrExpr, type DateInputValue, DateOperator, type DateRule, type DateRuleValue, EQUATABLE_KINDS, type EdgeExpr, type EngineGlobalsState, type EnumNarrowing, FIELD_OPERATOR_CATALOG, FieldKind, type FieldMap, type FieldMapEntry, type FieldMapSet, type FuzzyConfig, type GroupByStep, type IfThenElse, type Lens, type LensNarrowing, type LensPathHop, type LensPathResolution, type ModelDefaultNarrowing, type ModelNarrowing, NULLABLE_KINDS, NUMERIC_KINDS, type NarrowingDefaults, ORDERABLE_KINDS, Operator, type OrderBy, type OrderedRuleValue, type PathProjection, type PeriodExpr, type PeriodUnit, type PrismaProvider, type PrismaStep, type PrismaWhere, type ProjectOptions, type ProjectedVisit, type RelativeUnits, type RollingExpr, type Rule, type RuleDescription, type RuleLensCheck, type RuleLensViolation, type RuleScalar, type RuleSourceValues, RuleTarget, type RuleValue, STRINGY_KINDS, type ScopeOutOfBounds, type ScopeRef, type ScopedRef, type SortDir, type SourceOption, type SourcePrismaQuery, type SourceQuery, type SourceRowShape, type SourceSpec, type SourceSqlQuery, type SourceValue, type SourceValues, type SqlResult, type StepRef, type StrictAggregateRule, type StrictAll, type StrictAny, type StrictArrayCountRule, type StrictArrayPredicateRule, type StrictArrayPresenceRule, type StrictArrayRule, type StrictCondition, type StrictContainsRule, type StrictDateComparisonRule, type StrictDateDayRule, type StrictDateRangeRule, type StrictDateRule, type StrictEqualityRule, type StrictIfThenElse, type StrictMembershipRule, type StrictOrderedComparisonRule, type StrictPatternRule, type StrictPresenceRule, type StrictRangeRule, type StrictRule, type StrictStringBoundaryRule, type TimeZoneConfig, type ToPrismaResult, type ValidationIssue, type ValidationResult, ValueShape, WINDOW_SELECTOR, type WeekStart, type WhereStep, type WindowFields, type WindowRuleType, WindowSupport, applyLens, assertValidRule, bindingNames, buildBridgeDictionary, check, checkRuleAgainstLens, createLens, describeRule, engineGlobals, executePrismaQueryPlan, exposedSurface, fuzzyContains, getAggregateOperators, getArrayOperators, getOperatorsForKind, getValueShape, getWindowSupport, isAggregateRangeOperator, isAggregateSingleOperator, isOperatorSupportedForTarget, lensRequiredBindings, maxFuzzyDistance, parseScopeRef, projectByPath, requiredBindings, resolveBindings, resolveCaseInsensitive, resolveFuzzy, resolveLensBindings, resolveLensPath, resolveScopeRef, ruleSourceValues, sourceQueries, sourceValuesFromQueryRows, sourceValuesFromRows, stampCoercions, stitchFieldMaps, supportsQueryMode, toPrisma, toSql, validateBindNames, validateFieldMap, validateFieldMapSet, validateNarrowing, validateRule };
|