Skip to content

CreateShapeRequest

Defined in: packages/server/src/circuits/wire.ts:8

The engine’s shape-creation wire contract (POST /shapes → ShapeResp), restated here for the same reason Predicate is: this is the boundary pgxsinkit commits to, and the engine’s serde definitions are authoritative for it.

optional changesOnly?: boolean

Defined in: packages/server/src/circuits/wire.ts:24

Skip the backfill and stream only future matching changes. Subset queries only.


optional columns?: string[]

Defined in: packages/server/src/circuits/wire.ts:22

Output projection. Omitted = the full row; the primary key is always included regardless. The predicate may reference columns outside this set, which is what lets a shape MATCH on a column it does not EMIT — the control column a pre-computed redaction splits on (ADR-0055 decision 5).

This is the ENGINE’s projection, not the client’s. serverOnlyColumns are IN it: an egress serverProjection.rowTransform must read them, so they are fetched onto the stream on purpose and are stripped from each row at the stream edge after the transform runs (createStreamGate). A deployment that puts a cache between the engine and the edge is caching rows that still carry them.


optional subscription?: string

Defined in: packages/server/src/circuits/wire.ts:37

The caller’s subscription id — the name this claim on the shape is taken under (fork ADR-0008). Any non-empty string up to 128 bytes with no control characters, and never starting with ~ unless it is the ~ id the engine itself returned to you (the engine mints into that namespace, and refuses an unknown ~ id as forged).

Optional on the WIRE, because the engine will mint one for a caller that names none. It is not optional for pgxsinkit: every call site here sends one, because an unnamed claim is a claim this control plane cannot renew idempotently — a repeat create would be indistinguishable from a second subscriber. Naming it makes the create a RENEW when repeated, and makes the release (DELETE /shapes/{id}?subscription=…) retry-safe.


table: string

Defined in: packages/server/src/circuits/wire.ts:9


optional where?: Predicate

Defined in: packages/server/src/circuits/wire.ts:10