Skip to content

authoritativeWriteRequestSchema

const authoritativeWriteRequestSchema: ZodObject<{ mutations: ZodArray<ZodObject<{ baseServerVersion: ZodOptional<ZodString>; clientTimestampUs: ZodString; entityKey: ZodRecord<ZodString, ZodString>; kind: ZodEnum<{ create: "create"; delete: "delete"; update: "update"; }>; mutationId: ZodUUID; mutationSeq: ZodNumber; payload: ZodUnknown; tableName: ZodString; }, $strict>>; writeUnit: ZodOptional<ZodString>; }, $strict>

Defined in: packages/contracts/src/mutation.ts:95

The body of an authoritative write (ADR-0022 §3, mechanism c): one pessimistic write-unit — a set of co-committed mutations the server applies in its own isolated transaction, atomically, returning a per-mutation ack. writeUnit is the client’s unit id (the dynamic transaction tag, or the static consistency-group key), carried for attribution. Distinct from batchMutationRequestSchema only in semantics (atomic unit + a constraint exception → a clean rejected ack, never a whole-batch 500) and its endpoint path; the mutation envelope is identical.