@dudousxd/nestjs-filter 1.24.0 → 1.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/runner.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import { type Type } from '@nestjs/common';
2
2
  import { ModuleRef } from '@nestjs/core';
3
- import type { FilterAdapter } from './adapter/adapter.js';
3
+ import type { FieldExtent, FilterAdapter } from './adapter/adapter.js';
4
4
  import type { ContextAccessor } from './context-accessor.js';
5
- import type { ComputedSource, CursorPage, EntityDescription, FilterContext, FilterModuleOptions, GroupByCountResult, SortItem } from './types.js';
5
+ import type { ComputedSource, CursorPage, EntityDescription, FieldHistogram, FilterContext, FilterModuleOptions, GroupByCountResult, SortItem } from './types.js';
6
6
  /**
7
7
  * One resolved entry of the computed-field registry: the dev-provided SQL
8
8
  * `source` plus the runtime flags carried by the declaration (the inline
@@ -163,6 +163,7 @@ export declare class FilterRunner {
163
163
  private applyProjectedComputed;
164
164
  apply<F extends object, Q>(FilterClass: Type<F>, input: unknown, qb: Q, context?: FilterContext, internal?: {
165
165
  native?: boolean;
166
+ distinctOrder?: boolean | undefined;
166
167
  }): Promise<Q>;
167
168
  private resolveFilter;
168
169
  private runSetup;
@@ -280,6 +281,7 @@ export declare class FilterRunner {
280
281
  applyDynamic<Q>(entity: Type<unknown>, input: unknown, qb: Q, context?: FilterContext, internal?: {
281
282
  skipSortAndPagination?: boolean;
282
283
  native?: boolean;
284
+ distinctOrder?: boolean | undefined;
283
285
  }): Promise<Q>;
284
286
  /**
285
287
  * Runs a dynamic query and **executes** it, returning the page of rows plus
@@ -359,6 +361,269 @@ export declare class FilterRunner {
359
361
  * group-by-count rather than emitting a divide-by-zero or nonsensical width.
360
362
  */
361
363
  private parseGroupByCount;
364
+ /**
365
+ * **Field extent**: the `MIN`/`MAX` of the requested field(s) over the rows
366
+ * the active `where`/`search` select — what a range control (numeric slider,
367
+ * date-range calendar) needs before it can place its endpoints. Reads the
368
+ * `extent` structured key (`{ extent: ['price', 'createdAt'] }`, or the
369
+ * comma-separated string a GET route carries, parsed exactly like `distinct`).
370
+ *
371
+ * Unlike {@link groupByCount} this is NOT terminal — it measures the same
372
+ * filtered set the rows come from, so a route answers with rows AND extent
373
+ * from two builders. Sort/pagination/distinct/select are not part of the
374
+ * question and are not applied (`skipSortAndPagination`).
375
+ *
376
+ * **Why this lives in the runner and not in the route.** Reading
377
+ * `@Body('extent')` and handing it straight to `adapter.fieldExtent` bypasses
378
+ * the filter class's field governance: `static distinct` narrowing, the
379
+ * entity-metadata check that rejects a bare relation or an unknown
380
+ * identifier, and the alias remapping every other key gets. That is not an
381
+ * injection hole — the adapter resolves names through ORM metadata — but it
382
+ * IS a surface leak: a caller could measure a column the filter class
383
+ * deliberately does not expose. Routing every requested field through
384
+ * {@link validateDistinct} here closes it, and it is also the only place
385
+ * that can tell a computed alias from a typo (see below).
386
+ *
387
+ * **Allowlist.** The same one `distinct` uses: the filter class's static
388
+ * `distinct` list when `opts.filterClass` declares one, else the entity's
389
+ * columns via adapter metadata. `distinct` and `extent` answer the same
390
+ * question about a column — what values can this control offer — so a class
391
+ * that has already narrowed which columns a control may read must narrow
392
+ * this too, or `extent` becomes the way around that narrowing.
393
+ *
394
+ * **Disallowed/unknown fields are DROPPED**, and the request still answers
395
+ * for the fields that survived — matching `distinct` (which drops an invalid
396
+ * projected field rather than failing the query) rather than `groupByCount`
397
+ * (which always rejects, because there the field IS the whole query). Under
398
+ * the ambient `throwOnInvalid` policy the drop becomes a
399
+ * `BadRequestException`, again as `distinct`. A dropped field is simply
400
+ * absent from the result, which the `fieldExtent` contract already defines as
401
+ * "not measured" — the caller cannot tell it apart from a field the adapter
402
+ * could not resolve, and does not need to.
403
+ *
404
+ * **Computed members** route as `{ alias, source }` rather than a bare name,
405
+ * mirroring {@link groupByCount}'s grouping field: the adapter measures the
406
+ * dev-provided expression instead of resolving a column that does not exist.
407
+ * The registry comes from `opts.filterClass` when given, else from
408
+ * `@Filterable` metadata on the entity itself. Computed aliases bypass column
409
+ * validation — dev-declared, never client input — exactly like computed
410
+ * sort/distinct.
411
+ *
412
+ * Requires an adapter implementing the optional `fieldExtent` method; when
413
+ * absent, a clear error is thrown rather than a silent empty answer, which a
414
+ * range control would render as a collapsed (0, 0) span.
415
+ *
416
+ * @returns One entry per measured field keyed by field name (or computed
417
+ * alias). `{}` when the request named no extent fields at all.
418
+ */
419
+ fieldExtent<E>(entity: Type<E>, input: unknown, opts?: {
420
+ qb?: unknown;
421
+ context?: FilterContext;
422
+ filterClass?: Type<object>;
423
+ }): Promise<Record<string, FieldExtent>>;
424
+ /**
425
+ * Resolves ONE requested field to the shape an adapter measurement takes: the
426
+ * `{ alias, source }` pair of a computed member, or the validated column
427
+ * name. `null` when it is neither.
428
+ *
429
+ * Shared by {@link fieldExtent} and {@link fieldHistogram} so both obey the
430
+ * same allowlist, and so the one judgement nothing outside the runner can
431
+ * make — computed alias, or typo? both are strings no column matches — is
432
+ * made once. What the two callers differ on is only what `null` MEANS (a
433
+ * dropped field there, a rejected request here), which is why that decision
434
+ * stays with them.
435
+ *
436
+ * Validation runs with `throwOnInvalid: false` unconditionally: the caller
437
+ * words its own rejection for the key the client actually sent, rather than
438
+ * surfacing `Invalid distinct field` for a request that never said `distinct`.
439
+ */
440
+ private resolveMeasurableField;
441
+ /**
442
+ * A fresh builder carrying the request's WHERE/search and nothing else — the
443
+ * scope every measurement in this file asks its question over.
444
+ *
445
+ * `skipSortAndPagination` is the load-bearing part: an aggregate over a
446
+ * LIMITed builder answers for a page and looks exactly like an answer for the
447
+ * set, and an ORDER BY on a column an aggregate SELECT no longer projects is
448
+ * MySQL error 3065.
449
+ */
450
+ private buildFilteredQb;
451
+ /**
452
+ * The static `distinct` allowlist declared on a filter class, if any — the
453
+ * one {@link applyProjection} gates the DISTINCT projection with, reused by
454
+ * {@link fieldExtent} so both reads of a column obey the same narrowing.
455
+ *
456
+ * Read defensively rather than through a cast: `static distinct` is a plain
457
+ * class property no type checks, so a class can carry anything under that
458
+ * name. A non-array (or a list holding non-strings) yields `undefined`/the
459
+ * string entries, which degrades to entity-metadata validation instead of
460
+ * silently comparing field names against garbage and refusing everything.
461
+ */
462
+ private resolveDistinctAllowlist;
463
+ /**
464
+ * **Field histogram**: one numeric field's extent AND its bucketed
465
+ * distribution over the same filtered set — the two halves of a faceted range
466
+ * control, from one request. Reads the `histogram` structured key
467
+ * (`{ histogram: { field: 'price', buckets: 20 } }`).
468
+ *
469
+ * **Why this is a method and not two calls in a route.** The halves already
470
+ * exist — {@link fieldExtent} places a slider's endpoints,
471
+ * {@link FilterAdapter.groupByCount}'s bucketed variant draws the
472
+ * distribution behind them — but they are circular for the caller: the
473
+ * bucketed variant needs a WIDTH, and a width that is not derived from the
474
+ * data is either arbitrary (a hardcoded 1000 that yields two bars on one
475
+ * filter and four hundred on the next) or requires the extent the caller is
476
+ * asking for in the same breath. Nobody can break that cycle from outside:
477
+ * you must measure, then divide. So the runner measures, then divides.
478
+ *
479
+ * **Two round trips, and it cannot be one.** The width is a function of the
480
+ * first query's OUTPUT, so the second query's text does not exist until the
481
+ * first has returned. Folding them into one statement means either a
482
+ * correlated `(SELECT MAX(col)) - (SELECT MIN(col))` inside the bucket
483
+ * expression — the same scan twice, once per row-group, to avoid a round trip
484
+ * — or window functions the adapter contract does not have. Two plain
485
+ * aggregate queries over an indexable column is the cheaper shape, and it
486
+ * keeps this a composition of capabilities adapters already implement.
487
+ *
488
+ * **Not on the adapter contract, deliberately.** Every optional method added
489
+ * to `FilterAdapter` is a cost each adapter author pays forever, and this one
490
+ * would buy nothing: it is arithmetic between two existing calls, identical
491
+ * for every ORM. An adapter implementing `fieldExtent` and `groupByCount`
492
+ * gets this for free, and one implementing neither is told which is missing.
493
+ *
494
+ * **No `opts.qb`**, unlike its neighbours. Two passes need two builders — the
495
+ * first is consumed by an aggregate SELECT — and a single caller-supplied
496
+ * builder can only serve one of them. Silently creating a fresh builder for
497
+ * the second pass would drop whatever pre-scoping the caller put on theirs,
498
+ * so the distribution would describe a WIDER set than the extent: a chart
499
+ * with bars outside its own axis, and nothing to make it obvious.
500
+ *
501
+ * Field governance is {@link fieldExtent}'s, through the same
502
+ * {@link resolveMeasurableField}: alias remapping, the filter class's static
503
+ * `distinct` allowlist (else entity metadata), and computed members routed as
504
+ * `{ alias, source }`. The one divergence is what an invalid field means —
505
+ * rejected here, as in {@link groupByCount}, because the field IS the query
506
+ * and there is no partial answer to fall back to.
507
+ *
508
+ * **Dates are refused, not bucketed.** `fieldExtent` supports DATE columns on
509
+ * purpose, but bucketing is `FLOOR(value / width)`, and a date divided by a
510
+ * number is nonsense that no database announces: MySQL coerces the column to
511
+ * `20240131` and buckets THAT, which produces plausible-looking bars over an
512
+ * axis that skips two thirds of every year. See {@link assertBucketable}.
513
+ *
514
+ * @returns `{ min, max, bucketWidth, buckets }` — null ends and an empty
515
+ * bucket list when no row in scope carries a value.
516
+ */
517
+ fieldHistogram<E>(entity: Type<E>, input: unknown, opts?: {
518
+ context?: FilterContext;
519
+ filterClass?: Type<object>;
520
+ }): Promise<FieldHistogram>;
521
+ /**
522
+ * Parses the raw `histogram` block into a canonical `{ field, buckets }`.
523
+ * `null` when no usable `field` is present — the caller rejects, since a
524
+ * histogram of nothing has no meaningful empty answer.
525
+ *
526
+ * `buckets` accepts a numeric string as well as a number: on a GET route
527
+ * `?histogram[buckets]=20` arrives as text, and rejecting it there while
528
+ * accepting `20` from a POST body would make the two transports disagree
529
+ * about the same request. Anything unusable (absent, zero, negative, NaN,
530
+ * an object) degrades to the default rather than 400ing: it is a rendering
531
+ * hint, and a request that says nothing about bar count still has an answer.
532
+ */
533
+ private parseHistogram;
534
+ /**
535
+ * Refuses a field whose column type cannot survive `FLOOR(value / width)`,
536
+ * BEFORE either query runs.
537
+ *
538
+ * A DATE column is the case this exists for. `fieldExtent` supports dates
539
+ * deliberately (a calendar sizes itself from one), so `extent` and
540
+ * `histogram` accept the same field names right up to this point — and the
541
+ * failure mode without the check is not an error but a wrong answer: MySQL
542
+ * coerces a date to `20240131` before dividing, so the query succeeds and
543
+ * returns bars over an axis where two thirds of every year does not exist.
544
+ *
545
+ * Only ROOT-column metadata can answer this, so anything it cannot type — a
546
+ * relation path, a JSON sub-path, a computed source — passes here and is
547
+ * caught by {@link toBucketableNumber} once the extent comes back with actual
548
+ * values. Refusing everything untypeable instead would reject `author.age`,
549
+ * which `where`, `sort` and `distinct` all accept.
550
+ */
551
+ private assertBucketable;
552
+ /**
553
+ * Coerces one measured extent end to the number the width arithmetic needs,
554
+ * or `null` for "no row carries a value".
555
+ *
556
+ * Not a `typeof value === 'number'` check, in either direction:
557
+ *
558
+ * - a DECIMAL column hydrates to a STRING on mysql2 and pg, so the strict
559
+ * check would refuse the most ordinary histogram there is — a price;
560
+ * - `Number(new Date())` is a finite epoch, so a bare numeric coercion would
561
+ * wave a date extent straight through into `FLOOR(ms / width)`. Dates are
562
+ * therefore tested for FIRST, by identity, not by what they coerce to.
563
+ *
564
+ * This is the net under {@link assertBucketable}, which only sees root-column
565
+ * metadata: a computed source, a relation path or a JSON sub-path is typed by
566
+ * nothing until its value arrives here.
567
+ */
568
+ private toBucketableNumber;
569
+ /**
570
+ * Derives a bucket width from the measured span and the desired bar count,
571
+ * snapped to the nearest 1/2/5 × 10ⁿ step.
572
+ *
573
+ * The raw `span / desired` is the arithmetically correct width and the wrong
574
+ * answer for a control. Two reasons, both visible to a user:
575
+ *
576
+ * - buckets are anchored at multiples of the width (`FLOOR(col / w) * w`,
577
+ * which the adapter capability defines and which is what lets the grouping
578
+ * be one expression), so an ugly width means ugly edges: a span of
579
+ * 499–128000 over 10 gives 12750.1, and axis labels at 12750.1, 25500.2,
580
+ * 38250.3;
581
+ * - a raw width changes on every row inserted, so the bars re-partition and
582
+ * visibly jump whenever the filtered set shifts slightly. A snapped width
583
+ * holds still across a range of spans, which is the hysteresis a facet
584
+ * that redraws on every keystroke needs.
585
+ *
586
+ * Snapped to the NEAREST step in log space (the √2 / √10 / √50 thresholds),
587
+ * not upward: rounding up turns a span of 101 over 10 buckets into a width of
588
+ * 20 and six bars, which is a worse lie about the request than eleven bars.
589
+ * The count therefore lands within about √2 of `desired` in either direction
590
+ * — `buckets` is a target, and the returned `bucketWidth` is authoritative.
591
+ *
592
+ * `span` is strictly positive here: the `min === max` case never reaches this.
593
+ */
594
+ private niceBucketWidth;
595
+ /**
596
+ * Turns the adapter's sparse `{ value, count }` groups into the contiguous
597
+ * ascending bucket list a chart draws.
598
+ *
599
+ * Three things the raw groups get wrong for this purpose:
600
+ *
601
+ * - **Nulls.** A row whose column is null groups under `FLOOR(NULL / w)`,
602
+ * which is NULL — and `Number(null)` is 0, so passing the groups through
603
+ * unfiltered plants a phantom bar at zero holding every null row.
604
+ * - **Order.** `GROUP BY` has no defined output order. A histogram is a
605
+ * sequence, and bars drawn in the order MySQL happened to hash them are
606
+ * not a distribution.
607
+ * - **Gaps.** Empty buckets produce no group at all, so a sparse list renders
608
+ * as evenly spaced bars that lie about where the data sits. They are
609
+ * filled with zero-count entries, which is bounded work: the bucket count
610
+ * is `span / width`, and the width came from a clamped desired count.
611
+ *
612
+ * Groups are matched to buckets by INDEX rather than by comparing the
613
+ * returned `value` to a computed edge: for a width like 0.1 the database's
614
+ * `FLOOR(x / 0.1) * 0.1` and this code's `i * 0.1` differ in the last bits,
615
+ * and an equality match would silently drop those buckets to zero.
616
+ */
617
+ private assembleBuckets;
618
+ /**
619
+ * Rounds a bucket edge to the decimal precision its width implies. Every edge
620
+ * is an exact multiple of a 1/2/5 × 10ⁿ width, so this cannot move one onto a
621
+ * different bucket — it only sheds the binary-float residue that otherwise
622
+ * labels an axis `0.30000000000000004`. Skipped entirely for widths outside
623
+ * `toFixed`'s useful range, where rounding would destroy information rather
624
+ * than tidy it.
625
+ */
626
+ private snapEdge;
362
627
  /**
363
628
  * Runs a dynamic query with **keyset (cursor) pagination** and executes it,
364
629
  * returning a stable, non-overlapping page plus opaque forward/backward
@@ -504,6 +769,23 @@ export declare class FilterRunner {
504
769
  * option. Returns undefined when neither is set.
505
770
  */
506
771
  private resolveDefaultSort;
772
+ /**
773
+ * Resolves the effective `distinctOrder`: the ROUTE's own
774
+ * `@ApplyFilter({ distinctOrder })` wins over the filter class's
775
+ * `@Filterable({ distinctOrder })`, and absent both it is off.
776
+ *
777
+ * There is deliberately no module-level knob. Whether a `SELECT DISTINCT`
778
+ * wants an ORDER BY is a property of the endpoint reading it — one filter
779
+ * class typically serves a rows route that orders itself and a distinct route
780
+ * that does not — so an app-wide switch would be answering a question at the
781
+ * wrong altitude, and silently, for queries whose cost it cannot see.
782
+ *
783
+ * Off unless asked for, for the same reason: ordering a projection the caller
784
+ * never asked to order is a clause this library would be inventing, and on a
785
+ * large distinct with no index on the projected column that clause is a
786
+ * filesort nobody signed up for. See {@link FilterableOptions.distinctOrder}.
787
+ */
788
+ private resolveDistinctOrder;
507
789
  private handleUnknownKey;
508
790
  /**
509
791
  * Parses raw sort input into an array of SortItem objects.
@@ -1 +1 @@
1
- {"version":3,"file":"runner.d.ts","sourceRoot":"","sources":["../src/runner.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,IAAI,EACV,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,KAAK,EAAmB,aAAa,EAAqB,MAAM,sBAAsB,CAAC;AAI9F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AA8B7D,OAAO,KAAK,EAEV,cAAc,EACd,UAAU,EACV,iBAAiB,EAEjB,aAAa,EAEb,mBAAmB,EAGnB,kBAAkB,EAGlB,QAAQ,EACT,MAAM,YAAY,CAAC;AAWpB;;;;;;;;;GASG;AACH,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,cAAc,CAAC;IACvB,OAAO,EAAE,OAAO,CAAC;CAClB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,qBAAqB,CACnC,WAAW,EAAE,QAAQ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