import { type AppDocument, type ApprovalRequest, type AuditEvent, type AutomationRecord, type Json, type PermissionGrant } from "@vendoai/core"; import { type AccessLevel } from "./helpers/app-access.js"; import type { AppData } from "@vendoai/apps/contract"; import type { ApprovalRow, RunRow, ThreadRow } from "./helpers/types.js"; export interface ApprovalData { request: ApprovalRequest; status: ApprovalRow["status"]; decidedAt?: string; sessionId?: string; consumedAt?: string; deniedBy?: ApprovalRow["deniedBy"]; voidedAt?: string; } export type ThreadData = Pick; export type RunData = Omit; export type { AppData }; export declare function invalid(message: string): never; export declare function requireJson(value: unknown, label: string): Json; export declare function requireRecordId(id: unknown): string; export declare function requireMatchingId(recordId: string, embeddedId: string, label: string): void; export declare function parsePermissionGrant(value: unknown): PermissionGrant; export declare function parseApprovalRequest(value: unknown): ApprovalRequest; export declare function parseAuditEvent(value: unknown): AuditEvent; export declare function parseAppDocument(value: unknown): AppDocument; export declare function parseApprovalData(value: unknown, id: string): ApprovalData; export declare function parseThreadData(value: unknown, id: string): ThreadData; /** Contract §7 — an effect receipt: the subject that owns it (erase cascade + * anon adoption both key on it) and the recorded tool outcome. `at` is the * database's own timestamp; a caller-supplied one is ignored. */ export declare function parseEffectData(value: unknown, id: string): { subject: string; outcome: Json; }; /** Build contract §9.2 — one app-access grant. Re-checks the principal encoding * the `appAccess` door already checked, because a caller can reach the local * engine's row door directly (`records("vendo_app_grants").put()`) without * passing it. Belt and braces on purpose: this is the last place a doctored row * can be stopped from naming a shape `can()` cannot match (and from letting * `team:` smuggle a second slash) — but only for THIS engine. A hosted or BYO * records adapter never runs it, which is why the door checks too. */ export declare function parseAppGrantData(value: unknown, id: string): { appId: string; orgId: string; principal: string; level: AccessLevel; createdBy: string; }; /** v11 — the automation record itself, whole. Core owns the shape, and the row's * `subject`/`armed` columns are projections of it, so there is nothing else to * check here. */ export declare function parseAutomationData(value: unknown, id: string): AutomationRecord; export declare function parseRunData(value: unknown, id: string): RunData; export declare function parseAppData(value: unknown, id: string): AppData; //# sourceMappingURL=validate.d.ts.map