@dudousxd/nestjs-durable 0.42.0 → 0.43.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 CHANGED
@@ -646,6 +646,9 @@ function unavailableRunGateway() {
646
646
  runFacets(_query) {
647
647
  return tenantGatewayUnavailable("runFacets");
648
648
  },
649
+ runValueFacets(_axis, _query, _opts) {
650
+ return tenantGatewayUnavailable("runValueFacets");
651
+ },
649
652
  waitingFor(_runIds) {
650
653
  return tenantGatewayUnavailable("waitingFor");
651
654
  },
@@ -1075,6 +1078,16 @@ var ProxyRunGateway = class {
1075
1078
  query
1076
1079
  });
1077
1080
  }
1081
+ /** Enumerated on the operator, over the same tenant-scoped predicates its `listRuns` reply obeys —
1082
+ * so a tenant's pickers offer its own tenants/tags/attributes and never another's. */
1083
+ runValueFacets(axis, query, opts) {
1084
+ return this.request({
1085
+ kind: "runValueFacets",
1086
+ axis,
1087
+ query,
1088
+ opts
1089
+ });
1090
+ }
1078
1091
  /** Round-trips to the operator, which scopes the result to this tenant's own `@<tenant>` groups. */
1079
1092
  workerHealth() {
1080
1093
  return this.request({
@@ -1304,6 +1317,19 @@ var RunRequestResponder = class {
1304
1317
  }
1305
1318
  };
1306
1319
  }
1320
+ if (body.kind === "runValueFacets") {
1321
+ const data = await this.gateway.runValueFacets(body.axis, {
1322
+ ...body.query,
1323
+ namespace: msg.tenant
1324
+ }, body.opts);
1325
+ return {
1326
+ requestId: msg.requestId,
1327
+ result: {
1328
+ ok: true,
1329
+ data
1330
+ }
1331
+ };
1332
+ }
1307
1333
  if (body.kind === "workerHealth") {
1308
1334
  const all = await this.gateway.workerHealth();
1309
1335
  const data = all.filter((h) => h.group.endsWith(`@${msg.tenant}`));
@@ -1470,6 +1496,16 @@ var StoreRunGateway = class {
1470
1496
  })));
1471
1497
  }
1472
1498
  /**
1499
+ * The distinct values behind a console's pickers, straight off the store's enumeration. A store
1500
+ * without one answers `[]` rather than falling back to a listing: unlike the facet counts above —
1501
+ * where a full listing is at least the RIGHT answer expensively — a picker built from an unbounded
1502
+ * scan would be the same unbounded read on every keystroke, for a control whose free-text entry
1503
+ * still works without it.
1504
+ */
1505
+ async runValueFacets(axis, query, opts) {
1506
+ return this.store.runValueFacets?.(axis, query, opts) ?? [];
1507
+ }
1508
+ /**
1473
1509
  * Bulk-resolve what each of `runIds` is currently parked on — for a consumer with its own filtered/
1474
1510
  * paginated run listing (e.g. "which of MY suspended runs are stuck at a breakpoint") without
1475
1511
  * re-deriving `listRuns`' waiter scan or querying `durable_step_checkpoints` directly. Mirrors