@dudousxd/nestjs-durable-dashboard 0.50.0 → 0.51.1

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.
@@ -199,8 +199,12 @@ declare class DashboardService {
199
199
  }) | null>;
200
200
  /**
201
201
  * Deliver a `ctx.webhook()` callback: turn an inbound POST (token + body) into the signal the
202
- * waiting run is parked on. Returns the run result, or `null` if no run waits on that token (a
203
- * stale/duplicate callback) — a safe no-op the controller maps to 404. Control-plane-only.
202
+ * run is (or will be) parked on. A callback that arrives BEFORE the run reaches `wait()` (the url
203
+ * was handed out and the run is still busy or sleeping) is buffered, and `wait()` consumes it, so
204
+ * the result is the run's current status. Returns `null` — mapped to 404 by the controller — for a
205
+ * token that is not a webhook token, whose run doesn't exist or is terminal, or whose wait already
206
+ * resolved (a duplicate): nothing is buffered for those, so a public endpoint can't leave junk
207
+ * rows behind or signal non-webhook tokens. Control-plane-only.
204
208
  */
205
209
  deliverWebhook(token: string, body: unknown): Promise<RunResult | null>;
206
210
  /** Side-effect-free read of a value a run published via `ctx.setEvent` (a live query). Control-plane-only. */
@@ -319,10 +323,23 @@ declare class DurableApiController {
319
323
  /**
320
324
  * A run's detail. Fans wider than {@link FAN_INLINE_MAX} come back as one `FanSummary` each, their
321
325
  * members paged by `runs/:id/fans/:group`; `?full=true` returns every checkpoint instead.
326
+ *
327
+ * When the gateway can version the detail without reading it, the response carries an `ETag`, and
328
+ * a poll whose `If-None-Match` still names it gets a 304 before the timeline is read. The browser
329
+ * sends that header itself (the response is `no-cache`), so a console poll needs no code for it.
322
330
  */
323
- run(id: string, full?: string): Promise<_dudousxd_nestjs_durable_core.RunDetail>;
324
- /** One page of a summarized fan's members, in seq order. */
325
- fanMembers(id: string, group: string, offset?: string, limit?: string, failed?: string): Promise<_dudousxd_nestjs_durable_core.FanPage>;
331
+ run(id: string, full?: string, ifNoneMatch?: string, response?: unknown): Promise<{
332
+ run: _dudousxd_nestjs_durable_core.WorkflowRun;
333
+ timeline: _dudousxd_nestjs_durable_core.StepCheckpoint[];
334
+ children: string[];
335
+ fans?: _dudousxd_nestjs_durable_core.FanSummary[] | undefined;
336
+ childCount?: number | undefined;
337
+ }>;
338
+ /** One page of a summarized fan's members, in seq order. Versioned like {@link run}. */
339
+ fanMembers(id: string, group: string, offset?: string, limit?: string, failed?: string, ifNoneMatch?: string, response?: unknown): Promise<{
340
+ items: _dudousxd_nestjs_durable_core.StepCheckpoint[];
341
+ total: number;
342
+ }>;
326
343
  /** Server-Sent Events stream of a run's live lifecycle events — the dashboard tails it instead
327
344
  * of polling. Cross-pod when the transport has a control plane (see DashboardService.streamRun). */
328
345
  stream(id: string): rxjs.Observable<{
@@ -199,8 +199,12 @@ declare class DashboardService {
199
199
  }) | null>;
200
200
  /**
201
201
  * Deliver a `ctx.webhook()` callback: turn an inbound POST (token + body) into the signal the
202
- * waiting run is parked on. Returns the run result, or `null` if no run waits on that token (a
203
- * stale/duplicate callback) — a safe no-op the controller maps to 404. Control-plane-only.
202
+ * run is (or will be) parked on. A callback that arrives BEFORE the run reaches `wait()` (the url
203
+ * was handed out and the run is still busy or sleeping) is buffered, and `wait()` consumes it, so
204
+ * the result is the run's current status. Returns `null` — mapped to 404 by the controller — for a
205
+ * token that is not a webhook token, whose run doesn't exist or is terminal, or whose wait already
206
+ * resolved (a duplicate): nothing is buffered for those, so a public endpoint can't leave junk
207
+ * rows behind or signal non-webhook tokens. Control-plane-only.
204
208
  */
205
209
  deliverWebhook(token: string, body: unknown): Promise<RunResult | null>;
206
210
  /** Side-effect-free read of a value a run published via `ctx.setEvent` (a live query). Control-plane-only. */
@@ -319,10 +323,23 @@ declare class DurableApiController {
319
323
  /**
320
324
  * A run's detail. Fans wider than {@link FAN_INLINE_MAX} come back as one `FanSummary` each, their
321
325
  * members paged by `runs/:id/fans/:group`; `?full=true` returns every checkpoint instead.
326
+ *
327
+ * When the gateway can version the detail without reading it, the response carries an `ETag`, and
328
+ * a poll whose `If-None-Match` still names it gets a 304 before the timeline is read. The browser
329
+ * sends that header itself (the response is `no-cache`), so a console poll needs no code for it.
322
330
  */
323
- run(id: string, full?: string): Promise<_dudousxd_nestjs_durable_core.RunDetail>;
324
- /** One page of a summarized fan's members, in seq order. */
325
- fanMembers(id: string, group: string, offset?: string, limit?: string, failed?: string): Promise<_dudousxd_nestjs_durable_core.FanPage>;
331
+ run(id: string, full?: string, ifNoneMatch?: string, response?: unknown): Promise<{
332
+ run: _dudousxd_nestjs_durable_core.WorkflowRun;
333
+ timeline: _dudousxd_nestjs_durable_core.StepCheckpoint[];
334
+ children: string[];
335
+ fans?: _dudousxd_nestjs_durable_core.FanSummary[] | undefined;
336
+ childCount?: number | undefined;
337
+ }>;
338
+ /** One page of a summarized fan's members, in seq order. Versioned like {@link run}. */
339
+ fanMembers(id: string, group: string, offset?: string, limit?: string, failed?: string, ifNoneMatch?: string, response?: unknown): Promise<{
340
+ items: _dudousxd_nestjs_durable_core.StepCheckpoint[];
341
+ total: number;
342
+ }>;
326
343
  /** Server-Sent Events stream of a run's live lifecycle events — the dashboard tails it instead
327
344
  * of polling. Cross-pod when the transport has a control plane (see DashboardService.streamRun). */
328
345
  stream(id: string): rxjs.Observable<{