import { type UdlDocument, type UdlField, type UdlInstrument, type UdlAction, type UdlActionSubject, type UdlSubjectRequirement } from "./schema.js"; import { type UdlIssue } from "./diagnostics.js"; export declare const RESERVED_OBJECT_NAMES: readonly ["objectId", "externalId", "revision", "kind", "tenantId", "productId"]; export declare function hasParty(document: UdlDocument, instrument: UdlInstrument | undefined, name: string): boolean; export type UdlValidationResult = { ok: true; value: UdlDocument; } | { ok: false; issues: readonly UdlIssue[]; }; export declare class UdlError extends Error { readonly issues: readonly UdlIssue[]; constructor(issues: readonly UdlIssue[]); } export declare function resolveField(document: UdlDocument, instrument: UdlInstrument, path: string, input?: readonly UdlField[], action?: UdlAction | UdlActionSubject): UdlField | undefined; /** The account identity used by the distinct-account transfer rule. */ export declare function sameAccount(document: UdlDocument, instrument: UdlInstrument, fromPath: string, toPath: string, input?: readonly UdlField[], action?: UdlAction): boolean; /** The ledger key of an account field: its own name when self-owned, else "balance". */ export declare function accountKey(field: Pick, "key" | "name" | "owner">): string; /** A subject expression names a requirement; objectField names its stored metadata. */ export declare function resolveSubjectRequirement(instrument: UdlInstrument, name: string, action?: UdlAction | UdlActionSubject): UdlSubjectRequirement | undefined; export declare function validateUdl(value: unknown): UdlValidationResult; /** * Admit a document for a new Build. A new Build is the current format; the * older formats in `udlFormatReaders` are readable only as stored Builds, * through `validateUdl`. */ export declare function validateNewBuildUdl(value: unknown): UdlValidationResult; /** * Read a document in the format it declares, then run the upgrade chain to * the current format. `stored` is the parsed document in its own format, the * one its digests cover; `document` is what the engine runs. */ export declare function readUdl(value: unknown): { ok: true; stored: unknown; document: UdlDocument; } | { ok: false; issues: UdlIssue[]; }; export declare function assertValidUdl(value: unknown): UdlDocument; //# sourceMappingURL=validation.d.ts.map