UNPKG

histoire

Version:

A fast story book powered by Vite

209 lines • 7.27 kB
import { z } from 'zod/v4'; /** Storage paths are stricter than output-only registered project metadata paths. */ export declare const artifactStoragePathSchema: z.ZodString; /** Exact bytes associated with one artifact-relative regular file. */ export declare const artifactInventoryEntrySchema: z.ZodObject<{ path: z.ZodString; sha256: z.ZodString; bytes: z.ZodNumber; }, z.core.$strict>; /** Digest-named private UTF-8 content; runtime never follows arbitrary metadata paths. */ export declare const artifactContentRefSchema: z.ZodObject<{ sha256: z.ZodString; path: z.ZodString; bytes: z.ZodNumber; }, z.core.$strict>; /** Source availability is independent of public book Source-panel assets. */ export declare const artifactSourceSchema: z.ZodUnion<readonly [z.ZodObject<{ sha256: z.ZodString; path: z.ZodString; bytes: z.ZodNumber; kind: z.ZodEnum<{ file: "file"; virtual: "virtual"; }>; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"unavailable">; reason: z.ZodString; }, z.core.$strict>]>; /** Preferred collected or registered Markdown documentation reference. */ export declare const artifactDocsSchema: z.ZodObject<{ sha256: z.ZodString; path: z.ZodString; bytes: z.ZodNumber; kind: z.ZodEnum<{ markdown: "markdown"; text: "text"; }>; origin: z.ZodEnum<{ collected: "collected"; sibling: "sibling"; standalone: "standalone"; }>; filePath: z.ZodOptional<z.ZodString>; }, z.core.$strict>; /** Explicit story projection and allowlisted private content references. */ export declare const artifactStorySchema: z.ZodObject<{ story: z.ZodObject<{ id: z.ZodString; title: z.ZodString; treePath: z.ZodArray<z.ZodString>; filePath: z.ZodString; fileOrigin: z.ZodOptional<z.ZodEnum<{ external: "external"; generated: "generated"; project: "project"; }>>; supportPluginId: z.ZodString; group: z.ZodOptional<z.ZodString>; docsOnly: z.ZodBoolean; variants: z.ZodArray<z.ZodObject<{ id: z.ZodString; title: z.ZodString; }, z.core.$strict>>; docsAvailable: z.ZodBoolean; sourceAvailable: z.ZodBoolean; sourceKind: z.ZodEnum<{ file: "file"; unavailable: "unavailable"; virtual: "virtual"; }>; }, z.core.$strict>; source: z.ZodUnion<readonly [z.ZodObject<{ sha256: z.ZodString; path: z.ZodString; bytes: z.ZodNumber; kind: z.ZodEnum<{ file: "file"; virtual: "virtual"; }>; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"unavailable">; reason: z.ZodString; }, z.core.$strict>]>; docs: z.ZodOptional<z.ZodObject<{ sha256: z.ZodString; path: z.ZodString; bytes: z.ZodNumber; kind: z.ZodEnum<{ markdown: "markdown"; text: "text"; }>; origin: z.ZodEnum<{ collected: "collected"; sibling: "sibling"; standalone: "standalone"; }>; filePath: z.ZodOptional<z.ZodString>; }, z.core.$strict>>; }, z.core.$strict>; /** Versioned immutable portable artifact, excluding runtime credentials and project paths. */ export declare const artifactManifestSchema: z.ZodObject<{ schemaVersion: z.ZodLiteral<1>; buildId: z.ZodString; histoireVersion: z.ZodString; title: z.ZodString; base: z.ZodString; routerMode: z.ZodEnum<{ hash: "hash"; history: "history"; }>; defaultColorScheme: z.ZodEnum<{ auto: "auto"; dark: "dark"; light: "light"; }>; backgroundColor: z.ZodString; textDirection: z.ZodEnum<{ ltr: "ltr"; rtl: "rtl"; }>; globals: z.ZodPipe<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>, z.ZodTransform<Readonly<{ [x: string]: string | number | boolean; }>, Record<string, string | number | boolean>>>; mcpEnabled: z.ZodBoolean; testRuntimeIncluded: z.ZodBoolean; timeouts: z.ZodObject<{ collect: z.ZodNumber; storyCollect: z.ZodNumber; run: z.ZodNumber; }, z.core.$strict>; stories: z.ZodArray<z.ZodObject<{ story: z.ZodObject<{ id: z.ZodString; title: z.ZodString; treePath: z.ZodArray<z.ZodString>; filePath: z.ZodString; fileOrigin: z.ZodOptional<z.ZodEnum<{ external: "external"; generated: "generated"; project: "project"; }>>; supportPluginId: z.ZodString; group: z.ZodOptional<z.ZodString>; docsOnly: z.ZodBoolean; variants: z.ZodArray<z.ZodObject<{ id: z.ZodString; title: z.ZodString; }, z.core.$strict>>; docsAvailable: z.ZodBoolean; sourceAvailable: z.ZodBoolean; sourceKind: z.ZodEnum<{ file: "file"; unavailable: "unavailable"; virtual: "virtual"; }>; }, z.core.$strict>; source: z.ZodUnion<readonly [z.ZodObject<{ sha256: z.ZodString; path: z.ZodString; bytes: z.ZodNumber; kind: z.ZodEnum<{ file: "file"; virtual: "virtual"; }>; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"unavailable">; reason: z.ZodString; }, z.core.$strict>]>; docs: z.ZodOptional<z.ZodObject<{ sha256: z.ZodString; path: z.ZodString; bytes: z.ZodNumber; kind: z.ZodEnum<{ markdown: "markdown"; text: "text"; }>; origin: z.ZodEnum<{ collected: "collected"; sibling: "sibling"; standalone: "standalone"; }>; filePath: z.ZodOptional<z.ZodString>; }, z.core.$strict>>; }, z.core.$strict>>; diagnostics: z.ZodArray<z.ZodObject<{ filePath: z.ZodOptional<z.ZodString>; storyId: z.ZodOptional<z.ZodString>; code: z.ZodString; message: z.ZodString; }, z.core.$strict>>; diagnosticsTruncated: z.ZodBoolean; contents: z.ZodArray<z.ZodObject<{ sha256: z.ZodString; path: z.ZodString; bytes: z.ZodNumber; }, z.core.$strict>>; publicAssets: z.ZodArray<z.ZodObject<{ path: z.ZodString; sha256: z.ZodString; bytes: z.ZodNumber; }, z.core.$strict>>; }, z.core.$strict>; /** Builder/reader share exact inferred types instead of duplicate DTO definitions. */ export type ArtifactManifest = z.infer<typeof artifactManifestSchema>; /** Collected story with immutable private refs. */ export type ArtifactStory = z.infer<typeof artifactStorySchema>; /** Hash/byte identity of one artifact file. */ export type ArtifactInventoryEntry = z.infer<typeof artifactInventoryEntrySchema>; //# sourceMappingURL=artifact-schema.d.ts.map