import type { ZodLiteral, ZodNumber, ZodObject, ZodString, ZodType, ZodUnion } from 'zod'; import type { LiveLoader, Loader } from './loaders/types.js'; export type ImageFunction = () => ZodObject<{ src: ZodString; width: ZodNumber; height: ZodNumber; format: ZodUnion<[ ZodLiteral<'png'>, ZodLiteral<'jpg'>, ZodLiteral<'jpeg'>, ZodLiteral<'tiff'>, ZodLiteral<'webp'>, ZodLiteral<'gif'>, ZodLiteral<'svg'>, ZodLiteral<'avif'> ]>; }>; export interface DataEntry { id: string; data: Record; filePath?: string; body?: string; } export interface DataStore { get: (key: string) => DataEntry; entries: () => Array<[id: string, DataEntry]>; set: (key: string, data: Record, body?: string, filePath?: string) => void; values: () => Array; keys: () => Array; delete: (key: string) => void; clear: () => void; has: (key: string) => boolean; } export interface MetaStore { get: (key: string) => string | undefined; set: (key: string, value: string) => void; delete: (key: string) => void; has: (key: string) => boolean; } export type BaseSchema = ZodType; export type SchemaContext = { image: ImageFunction; }; type ContentLayerConfig = { type?: 'content_layer'; schema?: S | ((context: SchemaContext) => S); loader: Loader | (() => Array | Promise> | Record & { id?: string; }> | Promise & { id?: string; }>>); }; type DataCollectionConfig = { type: 'data'; schema?: S | ((context: SchemaContext) => S); }; type ContentCollectionConfig = { type?: 'content'; schema?: S | ((context: SchemaContext) => S); loader?: never; }; export type LiveCollectionConfig = { type?: 'live'; schema?: S; loader: L; }; export type CollectionConfig = ContentCollectionConfig | DataCollectionConfig | ContentLayerConfig; export declare function defineLiveCollection(config: LiveCollectionConfig): LiveCollectionConfig; export declare function defineCollection(config: CollectionConfig): CollectionConfig; export {};