/** * The shapes this engine ACCEPTS — every operation's input, and the template * content vocabulary the inputs are built from. * * A file of their own for the same reason `schemas.ts` is one, and the reason is * mechanical rather than tidiness. `index.ts` re-exports `operations.ts` so that * a vertical importing the engine gets the declared surface from the package * root; `operations.ts` declares each operation against the schema the handler * parses. With those schemas living in `index.ts`, importing the engine ran * `operations.ts` before `defineTemplateInput` was initialised — a require cycle * that a warm `dist` hides and `pnpm lint:permissions`, which really imports the * module, finds on the first run. * * So this module imports nothing from `index.ts`. It is a leaf, and the whole * declared surface — entities, row schemas, input schemas — sits below the * implementation rather than interleaved with it. * * Everything here stays exported from the package root: these are what a * composing vertical passes in, and `index.ts` re-exports each one. */ import { z } from 'zod'; export declare const protocolItem: z.ZodObject<{ key: z.ZodString; label: z.ZodString; type: z.ZodEnum<{ check: "check"; text: "text"; value: "value"; }>; unit: z.ZodOptional; }, z.core.$strip>; export type ProtocolItem = z.infer; /** The original shape: sections of items, filled response-by-response. */ export declare const checklistContent: z.ZodObject<{ kind: z.ZodLiteral<"checklist">; sections: z.ZodArray; unit: z.ZodOptional; }, z.core.$strip>>; }, z.core.$strip>>; }, z.core.$strip>; export type ChecklistContent = z.infer; /** * Content the engine never sees. The template says what KIND of document this * is and how to render it; the instance carries the vertical's `EntityRef` and * the hash the vertical computed over its own rows. * * `hashRecipe` is free text, and it is the load-bearing honesty of this kind: * a document signature attests to a hash the engine did not compute, so the * recipe for reproducing it must be written down where an auditor reading the * template finds it. The engine cannot enforce that the text is true — but a * signature over an unreproducible hash is worth nothing, and a required field * is what makes the vertical say out loud how to reproduce it. */ export declare const documentContent: z.ZodObject<{ kind: z.ZodLiteral<"document">; documentType: z.ZodString; hashRecipe: z.ZodString; description: z.ZodOptional; }, z.core.$strip>; export type DocumentContent = z.infer; /** * The content VALUE, either kind — what a parsed template holds. * * Exported alongside `protocolTemplateContent` because the two describe * different moments and only one of them is a parser for stored bytes. This is * the shape a caller RECEIVES (`protocol/get` returns it); the preprocessing * schema below is what turns a stored row into it, discriminant-less legacy rows * included. Declaring a return against a `z.preprocess` would publish the * normalisation as though it were the contract. */ export declare const contentUnion: z.ZodDiscriminatedUnion<[z.ZodObject<{ kind: z.ZodLiteral<"checklist">; sections: z.ZodArray; unit: z.ZodOptional; }, z.core.$strip>>; }, z.core.$strip>>; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"document">; documentType: z.ZodString; hashRecipe: z.ZodString; description: z.ZodOptional; }, z.core.$strip>], "kind">; /** * Parses either kind, defaulting a missing discriminant to 'checklist' so * every template defined before milestone D still parses. Note this is a * READ-time normalisation: `defineTemplate` stores what it is given after * parsing, so new templates carry an explicit `kind`, and old rows keep their * bytes (and therefore their hashes) exactly as signed. */ export declare const protocolTemplateContent: z.ZodPreprocess; sections: z.ZodArray; unit: z.ZodOptional; }, z.core.$strip>>; }, z.core.$strip>>; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"document">; documentType: z.ZodString; hashRecipe: z.ZodString; description: z.ZodOptional; }, z.core.$strip>], "kind">>; export type ProtocolTemplateContent = z.infer; /** * Who signed. Two kinds, and the difference is the whole point of milestone D: * * - `principal` — an authenticated principal in this scope. `ref` is their * `PrincipalId`. Every in-app signature. * - `external` — a human with no account, identified by an external provider * (BankID via Scrive). `ref` is an OPAQUE `DataSubjectId` the vertical minted * for that person. * * A personnummer, an email or a name must NEVER land in `ref`. It is `direct` * PII, and `subjectId` on the emitted event is what crypto-shredding keys the * erasure on (§5.3) — a `DataSubjectId` is shreddable, a personnummer written * into a signature row is a GDPR liability that immutability makes permanent. * The provider's own party identifier belongs in `evidenceRef`, which is where * the sealed PDF and the provider audit log are reachable from. * * This follows `engines/booking`'s `partyRef`: a participant is a person with * no principal, and it names them with a `DataSubjectId` for exactly this * reason. */ export declare const signatory: z.ZodDiscriminatedUnion<[z.ZodObject<{ kind: z.ZodLiteral<"principal">; ref: z.core.$ZodBranded; label: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"external">; ref: z.core.$ZodBranded; label: z.ZodOptional; }, z.core.$strip>], "kind">; export type Signatory = z.infer; export declare const defineTemplateInput: z.ZodObject<{ key: z.ZodString; title: z.ZodString; content: z.ZodPreprocess; sections: z.ZodArray; unit: z.ZodOptional; }, z.core.$strip>>; }, z.core.$strip>>; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"document">; documentType: z.ZodString; hashRecipe: z.ZodString; description: z.ZodOptional; }, z.core.$strip>], "kind">>; }, z.core.$strip>; /** * What a template author writes. Spelled out rather than inferred because the * `kind` normalisation is a `z.preprocess`, whose inferred INPUT type is * `unknown` — which would silently drop type-checking on exactly the object a * vertical hand-writes most often. `kind` is optional only for checklists, so * every template that predates the discriminant still compiles unchanged. */ export type ProtocolTemplateContentInput = (Omit & { kind?: 'checklist'; }) | DocumentContent; export interface DefineTemplateInput { key: string; title: string; content: ProtocolTemplateContentInput; } export declare const instantiateProtocolInput: z.ZodObject<{ templateKey: z.ZodString; entity: z.ZodObject<{ entityType: z.ZodString; entityId: z.ZodString; }, z.core.$strip>; }, z.core.$strip>; export type InstantiateProtocolInput = z.infer; export declare const fillProtocolInput: z.ZodObject<{ instanceId: z.ZodString; itemKey: z.ZodString; value: z.ZodUnion; note: z.ZodOptional; }, z.core.$strip>; export type FillProtocolInput = z.infer; export declare const bindDocumentInput: z.ZodObject<{ instanceId: z.ZodString; contentRef: z.ZodObject<{ entityType: z.ZodString; entityId: z.ZodString; }, z.core.$strip>; contentHash: z.ZodString; documentAttachmentId: z.ZodOptional>; }, z.core.$strip>; export type BindDocumentInput = z.infer; /** * How a signing party is REACHED (#687) — a delivery address, and nothing else. * * Typed rather than an opaque blob the engine never interprets, and the reason is * the `authLevel` argument from #620 one level down: a provider-agnostic engine * that cannot say what "how to reach a party" means is an engine every vertical * has to guess around, and every connector has to re-derive. The type is small, * provider-agnostic, and — with no personal number in it — free of anything a * provider-specific vocabulary would be needed for. * * **No `personalNumber`, deliberately, and not merely as an omission.** An * optional PII field on an engine surface is a carrier that exists, and this one * is not needed by any path in the tree: a signatory enters their personnummer * into the BankID ceremony itself, and it comes back in the completion data. * Adding it would recreate exactly the problem this carrier was built to avoid. */ export declare const partyContact: z.ZodObject<{ email: z.ZodOptional; mobile: z.ZodOptional; }, z.core.$strip>; export type PartyContact = z.infer; export declare const signatureRequestParty: z.ZodObject<{ label: z.ZodString; kind: z.ZodEnum<{ external: "external"; principal: "principal"; }>; ref: z.ZodOptional; signatureKind: z.ZodOptional>; authLevel: z.ZodOptional>; contact: z.ZodOptional; mobile: z.ZodOptional; }, z.core.$strip>>; }, z.core.$strip>; export type SignatureRequestParty = z.input; export declare const requestSignaturesInput: z.ZodObject<{ instanceId: z.ZodString; method: z.ZodString; parties: z.ZodArray; ref: z.ZodOptional; signatureKind: z.ZodOptional>; authLevel: z.ZodOptional>; contact: z.ZodOptional; mobile: z.ZodOptional; }, z.core.$strip>>; }, z.core.$strip>>; }, z.core.$strip>; export type RequestSignaturesInput = z.input; export declare const recordSignatureInput: z.ZodObject<{ requestId: z.ZodString; signatory: z.ZodDiscriminatedUnion<[z.ZodObject<{ kind: z.ZodLiteral<"principal">; ref: z.core.$ZodBranded; label: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"external">; ref: z.core.$ZodBranded; label: z.ZodOptional; }, z.core.$strip>], "kind">; signedAt: z.core.$ZodBranded; contentHash: z.ZodString; evidenceRef: z.ZodOptional; }, z.core.$strip>; export type RecordSignatureInput = z.input; export declare const declineSignatureInput: z.ZodObject<{ requestId: z.ZodString; reason: z.ZodString; outcome: z.ZodDefault>; }, z.core.$strip>; export type DeclineSignatureInput = z.input; export declare const cancelSignatureRequestsInput: z.ZodObject<{ instanceId: z.ZodString; reason: z.ZodString; }, z.core.$strip>; export type CancelSignatureRequestsInput = z.infer; //# sourceMappingURL=inputs.d.ts.map