Skip to content

MutationsApi

Defined in: packages/client/src/mutations-api.ts:75

The registry-wide reactive mutation-status surface (client.mutations), identical on the in-process and worker-attached client. Consumers NEVER touch the generated journal relation names — everything routes through the pgxsinkit_all_mutations view.

The summary is cheap enough to mount PERMANENTLY (one fingerprinted registration regardless of subscriber count — ADR-0040 dedup gives one shared rerun per journal write, not N). Full list/subscribe detail subscriptions should stay route- or feature-scoped.

TRegistry extends SyncTableRegistry

list(options?): Promise<MutationDetail[]>

Defined in: packages/client/src/mutations-api.ts:85

One-shot normalized detail rows, filtered by MutationListOptions, ordered newest-first by enqueued_at_us.

MutationListOptions<TRegistry>

Promise<MutationDetail[]>


subscribe(options, listener): Promise<MutationListSubscription>

Defined in: packages/client/src/mutations-api.ts:91

Live normalized detail rows (same filters/ordering as list). Route/feature-scoped: a detail subscription reruns the union SELECT on each relevant write — cheap for a scoped view, but prefer the summary for anything mounted app-wide.

MutationListOptions<TRegistry>

(rows) => void

Promise<MutationListSubscription>


subscribeSummary(listener): Promise<MutationSummarySubscription>

Defined in: packages/client/src/mutations-api.ts:83

Live per-status counts: listener fires on every change, the initial summary is on the returned handle (matching subscribeLiveRows’ initial-via-return / changes-via-callback split). One registration regardless of subscriber count. Cheap to mount permanently.

(summary) => void

Promise<MutationSummarySubscription>


summary(): Promise<MutationSummary>

Defined in: packages/client/src/mutations-api.ts:77

One-shot per-status counts across every writable journal (absent statuses = 0).

Promise<MutationSummary>