import { z } from 'zod'; /** * engine-protocol's entities (#697/#707). * * ## Why an engine declares these at all * * A vertical composing this engine needs two things it cannot get today: * * 1. **The entity-type constant.** Callout declares * `{ entityType: 'protocol', parentType: 'workorder' }` and Handlebar * `{ entityType: 'workorder', parentType: 'bike' }` — permission-walk edges * naming entities the vertical does not own. Both sides are unchecked strings * today, and a typo is a silently dead edge. * 2. **The row schema.** `output` in a declared operation is a Zod schema, so a * vertical operation returning a `ProtocolInstanceRow` would have to * transcribe this engine's shape into Zod — a description held in agreement * by nothing. Exporting the schema removes the transcription rather than * asking every vertical to get it right. * * ## One entity, eight tables * * `protocol` is the only thing here the platform can point at: attachments hang * off it, grants narrow to it, and verticals declare relation edges to it. * Templates, responses, signatures and signature requests are rows this engine * owns and operates on — reachable through the exported in-scope functions, and * never the subject of an `EntityRef`. * * The `_v2` table is the live one; `0001`'s originals stay in the journal * verbatim because it is append-only, and are not described here. */ export declare const protocolEntities: { readonly protocol: { readonly table: "protocol_instances"; readonly fields: z.ZodObject<{ id: z.ZodString; template_key: z.ZodString; template_version: z.ZodNumber; entity_type: z.ZodString; entity_id: z.ZodString; status: z.ZodEnum<{ open: "open"; pending_signature: "pending_signature"; signed: "signed"; voided: "voided"; }>; created_by: z.ZodString; created_at: z.ZodString; voided_by: z.ZodNullable; voided_reason: z.ZodNullable; voided_at: z.ZodNullable; content_ref_type: z.ZodNullable; content_ref_id: z.ZodNullable; bound_hash: z.ZodNullable; document_attachment_id: z.ZodNullable; frozen_hash: z.ZodNullable; frozen_at: z.ZodNullable; }, z.core.$strip>; }; }; /** * The row shape, for a vertical declaring an operation that returns one. * `ProtocolInstanceRow` is derived from this rather than written beside it. */ export declare const protocolInstanceRow: z.ZodObject<{ id: z.ZodString; template_key: z.ZodString; template_version: z.ZodNumber; entity_type: z.ZodString; entity_id: z.ZodString; status: z.ZodEnum<{ open: "open"; pending_signature: "pending_signature"; signed: "signed"; voided: "voided"; }>; created_by: z.ZodString; created_at: z.ZodString; voided_by: z.ZodNullable; voided_reason: z.ZodNullable; voided_at: z.ZodNullable; content_ref_type: z.ZodNullable; content_ref_id: z.ZodNullable; bound_hash: z.ZodNullable; document_attachment_id: z.ZodNullable; frozen_hash: z.ZodNullable; frozen_at: z.ZodNullable; }, z.core.$strip>; //# sourceMappingURL=entities.d.ts.map