import { z } from "zod"; /** * The wire shapes for reading history. * * Here rather than in `@valbuild/server` because both sides of `/api/val` need * them: the server builds these and the Studio parses them, and a second * hand-written copy in the client is how the two drift. * * `HistoryError` is a closed union of everything that can go wrong * reconstructing a commit - see `packages/server/src/history/HistoryError.ts` * for what each one means. It travels as data rather than as a message because * the Studio decides what to OFFER from it: a schema mismatch means "cannot * restore this field", a missing source means "cannot restore this module at * all", and a rendered string cannot be told apart. */ export declare const HistoryError: z.ZodDiscriminatedUnion<[z.ZodObject<{ kind: z.ZodLiteral<"commit-not-found">; commitSha: z.ZodString; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"archive-unreadable">; commitSha: z.ZodString; message: z.ZodString; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"source-unavailable">; moduleFilePath: z.ZodString; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"schema-unreadable">; moduleFilePath: z.ZodString; message: z.ZodString; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"file-unavailable">; gitPath: z.ZodString; message: z.ZodString; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"not-supported-in-fs-mode">; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"transport">; message: z.ZodString; }, z.core.$strip>], "kind">; export type HistoryError = z.infer; export declare const HistoricalCommit: z.ZodObject<{ commitSha: z.ZodString; parentCommitSha: z.ZodNullable; clientCommitSha: z.ZodNullable; branch: z.ZodString; createdBranch: z.ZodNullable; creator: z.ZodNullable; message: z.ZodNullable; createdAt: z.ZodString; seqNum: z.ZodString; patchCount: z.ZodNumber; hasArchive: z.ZodBoolean; }, z.core.$strip>; export type HistoricalCommit = z.infer; /** * A binary file the commit touched - named, with a URL, and nothing fetched. * Only an `` that mounts pays for the bytes. */ export declare const BinaryFileRef: z.ZodObject<{ gitPath: z.ZodString; change: z.ZodUnion, z.ZodLiteral<"modified">, z.ZodLiteral<"deleted">]>; remote: z.ZodBoolean; url: z.ZodString; }, z.core.$strip>; export type BinaryFileRef = z.infer; export declare const HistoricalModule: z.ZodObject<{ source: z.ZodNullable>>; schema: z.ZodNullable>>; patchIds: z.ZodArray>>; changedPaths: z.ZodArray; failures: z.ZodArray; commitSha: z.ZodString; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"archive-unreadable">; commitSha: z.ZodString; message: z.ZodString; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"source-unavailable">; moduleFilePath: z.ZodString; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"schema-unreadable">; moduleFilePath: z.ZodString; message: z.ZodString; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"file-unavailable">; gitPath: z.ZodString; message: z.ZodString; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"not-supported-in-fs-mode">; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"transport">; message: z.ZodString; }, z.core.$strip>], "kind">>; }, z.core.$strip>; export type HistoricalModule = z.infer; export declare const HistoricalPatchSet: z.ZodObject<{ commit: z.ZodObject<{ commitSha: z.ZodString; parentCommitSha: z.ZodNullable; clientCommitSha: z.ZodNullable; branch: z.ZodString; createdBranch: z.ZodNullable; creator: z.ZodNullable; message: z.ZodNullable; createdAt: z.ZodString; seqNum: z.ZodString; patchCount: z.ZodNumber; hasArchive: z.ZodBoolean; }, z.core.$strip>; modules: z.ZodRecord>>; schema: z.ZodNullable>>; patchIds: z.ZodArray>>; changedPaths: z.ZodArray; failures: z.ZodArray; commitSha: z.ZodString; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"archive-unreadable">; commitSha: z.ZodString; message: z.ZodString; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"source-unavailable">; moduleFilePath: z.ZodString; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"schema-unreadable">; moduleFilePath: z.ZodString; message: z.ZodString; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"file-unavailable">; gitPath: z.ZodString; message: z.ZodString; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"not-supported-in-fs-mode">; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"transport">; message: z.ZodString; }, z.core.$strip>], "kind">>; }, z.core.$strip>>; patches: z.ZodArray>; moduleFilePath: z.ZodString; patch: z.ZodUnknown; authorId: z.ZodNullable; createdAt: z.ZodString; baseSha: z.ZodString; coreVersion: z.ZodString; }, z.core.$strip>>; jsonEntries: z.ZodRecord; binaryFiles: z.ZodArray, z.ZodLiteral<"modified">, z.ZodLiteral<"deleted">]>; remote: z.ZodBoolean; url: z.ZodString; }, z.core.$strip>>; warnings: z.ZodArray; commitSha: z.ZodString; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"archive-unreadable">; commitSha: z.ZodString; message: z.ZodString; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"source-unavailable">; moduleFilePath: z.ZodString; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"schema-unreadable">; moduleFilePath: z.ZodString; message: z.ZodString; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"file-unavailable">; gitPath: z.ZodString; message: z.ZodString; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"not-supported-in-fs-mode">; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"transport">; message: z.ZodString; }, z.core.$strip>], "kind">>; }, z.core.$strip>; export type HistoricalPatchSet = z.infer; /** * Whether the historical value can be written back as the project stands. * * Computed in the Studio, not on the server: the verdict depends on the current * source and the current schema, both of which the client already holds, and it * runs against the same worker-thread validator that validates ordinary edits. * The types stay here because they are what a restore preview hands to the UI. * * `blocked` carries its reasons so a refusal can name the field and say why, * rather than being an unexplained disabled button. */ export declare const RestoreVerdict: z.ZodUnion; }, z.core.$strip>, z.ZodObject<{ status: z.ZodLiteral<"blocked">; reasons: z.ZodArray; commitSha: z.ZodString; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"archive-unreadable">; commitSha: z.ZodString; message: z.ZodString; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"source-unavailable">; moduleFilePath: z.ZodString; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"schema-unreadable">; moduleFilePath: z.ZodString; message: z.ZodString; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"file-unavailable">; gitPath: z.ZodString; message: z.ZodString; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"not-supported-in-fs-mode">; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"transport">; message: z.ZodString; }, z.core.$strip>], "kind">>; }, z.core.$strip>]>; export type RestoreVerdict = z.infer; export declare const ModuleComparison: z.ZodObject<{ current: z.ZodNullable; changedVsCurrent: z.ZodArray; verdict: z.ZodUnion; }, z.core.$strip>, z.ZodObject<{ status: z.ZodLiteral<"blocked">; reasons: z.ZodArray; commitSha: z.ZodString; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"archive-unreadable">; commitSha: z.ZodString; message: z.ZodString; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"source-unavailable">; moduleFilePath: z.ZodString; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"schema-unreadable">; moduleFilePath: z.ZodString; message: z.ZodString; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"file-unavailable">; gitPath: z.ZodString; message: z.ZodString; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"not-supported-in-fs-mode">; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"transport">; message: z.ZodString; }, z.core.$strip>], "kind">>; }, z.core.$strip>]>; }, z.core.$strip>; export type ModuleComparison = z.infer;