@dudousxd/nestjs-durable-dashboard 0.40.0 → 0.41.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.
@@ -154,11 +154,15 @@ declare class DashboardService {
154
154
  compensate?: boolean;
155
155
  }): Promise<RunResult | null>;
156
156
  /**
157
- * Apply `retry` or `cancel` to every run matching a filter (status / tag / workflow) — e.g. "retry
158
- * every `dead` run tagged `type:mel`". Capped at 500 runs per call; runs that can't be acted on
157
+ * Apply `retry` or `cancel` to every run matching a filter (status / tag / workflow / namespace /
158
+ * origin) — e.g. "retry every `dead` run tagged `type:mel`". The filter is the same one the run
159
+ * list uses, so a bulk action can never reach wider than the list it was launched from — but note
160
+ * an ABSENT predicate still means "every value on that axis" (an omitted `namespace` is every
161
+ * tenant), which is what makes passing the operator's full filter through mandatory, not optional.
162
+ * Capped at 500 runs per call; runs that can't be acted on
159
163
  * (already terminal) are skipped. Returns how many matched and how many the action applied to.
160
164
  */
161
- bulk(action: 'retry' | 'cancel', filter: Pick<RunQuery, 'status' | 'tag' | 'workflow' | 'attributes'>, opts?: {
165
+ bulk(action: 'retry' | 'cancel', filter: Pick<RunQuery, 'status' | 'tag' | 'workflow' | 'attributes' | 'namespace' | 'origin'>, opts?: {
162
166
  compensate?: boolean;
163
167
  }): Promise<{
164
168
  matched: number;
@@ -195,7 +199,15 @@ declare class DashboardService {
195
199
  declare class DurableApiController {
196
200
  private readonly dashboard;
197
201
  constructor(dashboard: DashboardService);
198
- runs(status?: RunStatus, workflow?: string, tag?: string, attr?: string | string[]): Promise<_dudousxd_nestjs_durable_core.RunListItem[]>;
202
+ /**
203
+ * The run list, filtered by whatever the operator asked for. Every predicate is OPTIONAL and an
204
+ * omitted one means "don't narrow on this axis" — in particular `namespace`, whose absence keeps
205
+ * the historical, deliberate behaviour that read paths are NOT namespace-scoped (core,
206
+ * `WorkflowRun.namespace`): the console shows every tenant's runs until an operator chooses one.
207
+ * A blank param (`?namespace=`, from a cleared filter box) is the same as an absent one; passing
208
+ * `''` through would be an exact match on a tenant nobody has, i.e. a silently empty console.
209
+ */
210
+ runs(status?: RunStatus, workflow?: string, tag?: string, attr?: string | string[], namespace?: string, origin?: string): Promise<_dudousxd_nestjs_durable_core.RunListItem[]>;
199
211
  /** Prometheus-text metrics (runs/steps by outcome, per-workflow counts) for a scrape. */
200
212
  metrics(): Promise<string>;
201
213
  /** Per-group worker health (queue backlog + live worker heartbeats) for the Workers panel. */
@@ -215,8 +227,12 @@ declare class DurableApiController {
215
227
  }): Promise<{
216
228
  runId: string;
217
229
  } | null>;
218
- /** Bulk retry/cancel every run matching a filter (status / tag / workflow). */
219
- bulk(action: 'retry' | 'cancel', status?: RunStatus, tag?: string, workflow?: string, attr?: string | string[], compensate?: string): Promise<{
230
+ /**
231
+ * Bulk retry/cancel every run matching a filter (status / tag / workflow / namespace / origin).
232
+ * The filter takes the SAME params as `GET runs` and is parsed identically, so "retry all" acts on
233
+ * exactly the set the operator was looking at rather than a wider one.
234
+ */
235
+ bulk(action: 'retry' | 'cancel', status?: RunStatus, tag?: string, workflow?: string, attr?: string | string[], compensate?: string, namespace?: string, origin?: string): Promise<{
220
236
  matched: number;
221
237
  applied: number;
222
238
  }>;
@@ -154,11 +154,15 @@ declare class DashboardService {
154
154
  compensate?: boolean;
155
155
  }): Promise<RunResult | null>;
156
156
  /**
157
- * Apply `retry` or `cancel` to every run matching a filter (status / tag / workflow) — e.g. "retry
158
- * every `dead` run tagged `type:mel`". Capped at 500 runs per call; runs that can't be acted on
157
+ * Apply `retry` or `cancel` to every run matching a filter (status / tag / workflow / namespace /
158
+ * origin) — e.g. "retry every `dead` run tagged `type:mel`". The filter is the same one the run
159
+ * list uses, so a bulk action can never reach wider than the list it was launched from — but note
160
+ * an ABSENT predicate still means "every value on that axis" (an omitted `namespace` is every
161
+ * tenant), which is what makes passing the operator's full filter through mandatory, not optional.
162
+ * Capped at 500 runs per call; runs that can't be acted on
159
163
  * (already terminal) are skipped. Returns how many matched and how many the action applied to.
160
164
  */
161
- bulk(action: 'retry' | 'cancel', filter: Pick<RunQuery, 'status' | 'tag' | 'workflow' | 'attributes'>, opts?: {
165
+ bulk(action: 'retry' | 'cancel', filter: Pick<RunQuery, 'status' | 'tag' | 'workflow' | 'attributes' | 'namespace' | 'origin'>, opts?: {
162
166
  compensate?: boolean;
163
167
  }): Promise<{
164
168
  matched: number;
@@ -195,7 +199,15 @@ declare class DashboardService {
195
199
  declare class DurableApiController {
196
200
  private readonly dashboard;
197
201
  constructor(dashboard: DashboardService);
198
- runs(status?: RunStatus, workflow?: string, tag?: string, attr?: string | string[]): Promise<_dudousxd_nestjs_durable_core.RunListItem[]>;
202
+ /**
203
+ * The run list, filtered by whatever the operator asked for. Every predicate is OPTIONAL and an
204
+ * omitted one means "don't narrow on this axis" — in particular `namespace`, whose absence keeps
205
+ * the historical, deliberate behaviour that read paths are NOT namespace-scoped (core,
206
+ * `WorkflowRun.namespace`): the console shows every tenant's runs until an operator chooses one.
207
+ * A blank param (`?namespace=`, from a cleared filter box) is the same as an absent one; passing
208
+ * `''` through would be an exact match on a tenant nobody has, i.e. a silently empty console.
209
+ */
210
+ runs(status?: RunStatus, workflow?: string, tag?: string, attr?: string | string[], namespace?: string, origin?: string): Promise<_dudousxd_nestjs_durable_core.RunListItem[]>;
199
211
  /** Prometheus-text metrics (runs/steps by outcome, per-workflow counts) for a scrape. */
200
212
  metrics(): Promise<string>;
201
213
  /** Per-group worker health (queue backlog + live worker heartbeats) for the Workers panel. */
@@ -215,8 +227,12 @@ declare class DurableApiController {
215
227
  }): Promise<{
216
228
  runId: string;
217
229
  } | null>;
218
- /** Bulk retry/cancel every run matching a filter (status / tag / workflow). */
219
- bulk(action: 'retry' | 'cancel', status?: RunStatus, tag?: string, workflow?: string, attr?: string | string[], compensate?: string): Promise<{
230
+ /**
231
+ * Bulk retry/cancel every run matching a filter (status / tag / workflow / namespace / origin).
232
+ * The filter takes the SAME params as `GET runs` and is parsed identically, so "retry all" acts on
233
+ * exactly the set the operator was looking at rather than a wider one.
234
+ */
235
+ bulk(action: 'retry' | 'cancel', status?: RunStatus, tag?: string, workflow?: string, attr?: string | string[], compensate?: string, namespace?: string, origin?: string): Promise<{
220
236
  matched: number;
221
237
  applied: number;
222
238
  }>;
@@ -129,8 +129,12 @@ var DashboardService = class {
129
129
  return this.gateway.cancel(runId, opts);
130
130
  }
131
131
  /**
132
- * Apply `retry` or `cancel` to every run matching a filter (status / tag / workflow) — e.g. "retry
133
- * every `dead` run tagged `type:mel`". Capped at 500 runs per call; runs that can't be acted on
132
+ * Apply `retry` or `cancel` to every run matching a filter (status / tag / workflow / namespace /
133
+ * origin) — e.g. "retry every `dead` run tagged `type:mel`". The filter is the same one the run
134
+ * list uses, so a bulk action can never reach wider than the list it was launched from — but note
135
+ * an ABSENT predicate still means "every value on that axis" (an omitted `namespace` is every
136
+ * tenant), which is what makes passing the operator's full filter through mandatory, not optional.
137
+ * Capped at 500 runs per call; runs that can't be acted on
134
138
  * (already terminal) are skipped. Returns how many matched and how many the action applied to.
135
139
  */
136
140
  async bulk(action, filter, opts) {
@@ -268,12 +272,22 @@ var DurableApiController = class {
268
272
  constructor(dashboard) {
269
273
  this.dashboard = dashboard;
270
274
  }
271
- runs(status, workflow, tag, attr) {
275
+ /**
276
+ * The run list, filtered by whatever the operator asked for. Every predicate is OPTIONAL and an
277
+ * omitted one means "don't narrow on this axis" — in particular `namespace`, whose absence keeps
278
+ * the historical, deliberate behaviour that read paths are NOT namespace-scoped (core,
279
+ * `WorkflowRun.namespace`): the console shows every tenant's runs until an operator chooses one.
280
+ * A blank param (`?namespace=`, from a cleared filter box) is the same as an absent one; passing
281
+ * `''` through would be an exact match on a tenant nobody has, i.e. a silently empty console.
282
+ */
283
+ runs(status, workflow, tag, attr, namespace, origin) {
272
284
  return this.dashboard.listRuns({
273
285
  status,
274
286
  workflow,
275
287
  tag,
276
- attributes: parseAttrFilters(attr)
288
+ attributes: parseAttrFilters(attr),
289
+ namespace: namespace || void 0,
290
+ origin: origin || void 0
277
291
  });
278
292
  }
279
293
  /** Prometheus-text metrics (runs/steps by outcome, per-workflow counts) for a scrape. */
@@ -305,13 +319,19 @@ var DurableApiController = class {
305
319
  retryWithInput(id, body) {
306
320
  return this.dashboard.retryWithInput(id, body?.input);
307
321
  }
308
- /** Bulk retry/cancel every run matching a filter (status / tag / workflow). */
309
- bulk(action, status, tag, workflow, attr, compensate) {
322
+ /**
323
+ * Bulk retry/cancel every run matching a filter (status / tag / workflow / namespace / origin).
324
+ * The filter takes the SAME params as `GET runs` and is parsed identically, so "retry all" acts on
325
+ * exactly the set the operator was looking at rather than a wider one.
326
+ */
327
+ bulk(action, status, tag, workflow, attr, compensate, namespace, origin) {
310
328
  return this.dashboard.bulk(action === "cancel" ? "cancel" : "retry", {
311
329
  status,
312
330
  tag,
313
331
  workflow,
314
- attributes: parseAttrFilters(attr)
332
+ attributes: parseAttrFilters(attr),
333
+ namespace: namespace || void 0,
334
+ origin: origin || void 0
315
335
  }, {
316
336
  compensate: compensate === "true"
317
337
  });
@@ -360,12 +380,16 @@ _ts_decorate2([
360
380
  _ts_param2(1, Query("workflow")),
361
381
  _ts_param2(2, Query("tag")),
362
382
  _ts_param2(3, Query("attr")),
383
+ _ts_param2(4, Query("namespace")),
384
+ _ts_param2(5, Query("origin")),
363
385
  _ts_metadata2("design:type", Function),
364
386
  _ts_metadata2("design:paramtypes", [
365
387
  typeof RunStatus === "undefined" ? Object : RunStatus,
366
388
  String,
367
389
  String,
368
- Object
390
+ Object,
391
+ String,
392
+ String
369
393
  ]),
370
394
  _ts_metadata2("design:returntype", void 0)
371
395
  ], DurableApiController.prototype, "runs", null);
@@ -434,6 +458,8 @@ _ts_decorate2([
434
458
  _ts_param2(3, Query("workflow")),
435
459
  _ts_param2(4, Query("attr")),
436
460
  _ts_param2(5, Query("compensate")),
461
+ _ts_param2(6, Query("namespace")),
462
+ _ts_param2(7, Query("origin")),
437
463
  _ts_metadata2("design:type", Function),
438
464
  _ts_metadata2("design:paramtypes", [
439
465
  String,
@@ -441,6 +467,8 @@ _ts_decorate2([
441
467
  String,
442
468
  String,
443
469
  Object,
470
+ String,
471
+ String,
444
472
  String
445
473
  ]),
446
474
  _ts_metadata2("design:returntype", void 0)