@dudousxd/nestjs-durable-dashboard 0.46.0 → 0.47.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.
@@ -282,7 +282,9 @@ declare class DurableApiController {
282
282
  * so a picker never offers a value whose result set is empty.
283
283
  *
284
284
  * `limit` matters rather than being a nicety — tag and attribute cardinality grows with the data
285
- * (a `singleton:<key>` tag is minted per key), so the unbounded answer is a listing.
285
+ * (a `singleton:<key>` tag is minted per key), so the unbounded answer is a listing. `offset` and
286
+ * `search` are what make that bound livable: a picker pages as it scrolls and narrows as the
287
+ * operator types, both server-side, so a value outside the first page is still reachable.
286
288
  */
287
289
  values(query: Record<string, unknown>): Promise<_dudousxd_nestjs_filter.GroupByCountResult>;
288
290
  /** Prometheus-text metrics (runs/steps by outcome, per-workflow counts) for a scrape. */
@@ -282,7 +282,9 @@ declare class DurableApiController {
282
282
  * so a picker never offers a value whose result set is empty.
283
283
  *
284
284
  * `limit` matters rather than being a nicety — tag and attribute cardinality grows with the data
285
- * (a `singleton:<key>` tag is minted per key), so the unbounded answer is a listing.
285
+ * (a `singleton:<key>` tag is minted per key), so the unbounded answer is a listing. `offset` and
286
+ * `search` are what make that bound livable: a picker pages as it scrolls and narrows as the
287
+ * operator types, both server-side, so a value outside the first page is still reachable.
286
288
  */
287
289
  values(query: Record<string, unknown>): Promise<_dudousxd_nestjs_filter.GroupByCountResult>;
288
290
  /** Prometheus-text metrics (runs/steps by outcome, per-workflow counts) for a scrape. */
@@ -625,7 +625,9 @@ var RunQueryAdapter = class {
625
625
  /**
626
626
  * The distinct values of one field over the runs the active predicates select — the console's
627
627
  * pickers. `limit` is honoured because it has to be: tag and search-attribute cardinality grows
628
- * with the data, so the unbounded answer is a listing rather than an aggregate.
628
+ * with the data, so the unbounded answer is a listing rather than an aggregate. `offset` and
629
+ * `search` are what keep that bound from becoming a ceiling — the picker pages as it scrolls and
630
+ * narrows as the operator types, both against the whole matching set rather than the fetched page.
629
631
  */
630
632
  async groupByCount(qb, field, entity, opts) {
631
633
  this.assertDurableRun(entity);
@@ -640,7 +642,13 @@ var RunQueryAdapter = class {
640
642
  throw new BadRequestException(`The durable run list cannot enumerate values of \`${field}\`.`);
641
643
  }
642
644
  const rows = await this.gateway.runValueFacets(axis, this.draft(qb).facetQuery(), {
643
- limit: opts?.limit ?? RUN_VALUE_FACET_LIMIT
645
+ limit: opts?.limit ?? RUN_VALUE_FACET_LIMIT,
646
+ ...opts?.offset !== void 0 && {
647
+ offset: opts.offset
648
+ },
649
+ ...opts?.search !== void 0 && {
650
+ search: opts.search
651
+ }
644
652
  });
645
653
  return rows.map((row) => ({
646
654
  value: row.value,
@@ -942,7 +950,9 @@ var DurableApiController = class {
942
950
  * so a picker never offers a value whose result set is empty.
943
951
  *
944
952
  * `limit` matters rather than being a nicety — tag and attribute cardinality grows with the data
945
- * (a `singleton:<key>` tag is minted per key), so the unbounded answer is a listing.
953
+ * (a `singleton:<key>` tag is minted per key), so the unbounded answer is a listing. `offset` and
954
+ * `search` are what make that bound livable: a picker pages as it scrolls and narrows as the
955
+ * operator types, both server-side, so a value outside the first page is still reachable.
946
956
  */
947
957
  values(query) {
948
958
  return this.runner.groupByCount(DurableRun, query, {