import type { MarkdownHeading } from '@astrojs/markdown-remark'; import { z } from 'zod'; import { type AstroComponentFactory } from '../runtime/server/index.js'; import type { LiveDataCollectionResult, LiveDataEntryResult } from '../types/public/content.js'; import { type LIVE_CONTENT_TYPE } from './consts.js'; import { type DataEntry } from './data-store.js'; import { LiveCollectionCacheHintError, LiveCollectionError, LiveCollectionValidationError, LiveEntryNotFoundError } from './loaders/errors.js'; import type { LiveLoader } from './loaders/types.js'; import type { ContentLookupMap } from './utils.js'; export { LiveCollectionError, LiveCollectionCacheHintError, LiveEntryNotFoundError, LiveCollectionValidationError, }; type LazyImport = () => Promise; type GlobResult = Record; type CollectionToEntryMap = Record; type GetEntryImport = (collection: string, lookupId: string) => Promise; type LiveCollectionConfigMap = Record; export declare function createCollectionToGlobResultMap({ globResult, contentDir, }: { globResult: GlobResult; contentDir: string; }): CollectionToEntryMap; export declare function createGetCollection({ contentCollectionToEntryMap, dataCollectionToEntryMap, getRenderEntryImport, cacheEntriesByCollection, liveCollections, }: { contentCollectionToEntryMap: CollectionToEntryMap; dataCollectionToEntryMap: CollectionToEntryMap; getRenderEntryImport: GetEntryImport; cacheEntriesByCollection: Map; liveCollections: LiveCollectionConfigMap; }): (collection: string, filter?: ((entry: any) => unknown) | Record) => Promise; export declare function createGetEntryBySlug({ getEntryImport, getRenderEntryImport, collectionNames, getEntry, }: { getEntryImport: GetEntryImport; getRenderEntryImport: GetEntryImport; collectionNames: Set; getEntry: ReturnType; }): (collection: string, slug: string) => Promise<{ id: any; slug: any; body: any; collection: any; data: any; render(): Promise; } | undefined>; export declare function createGetDataEntryById({ getEntryImport, collectionNames, getEntry, }: { getEntryImport: GetEntryImport; collectionNames: Set; getEntry: ReturnType; }): (collection: string, id: string) => Promise; type ContentEntryResult = { id: string; slug: string; body: string; collection: string; data: Record; render(): Promise; }; type DataEntryResult = { id: string; collection: string; data: Record; }; type EntryLookupObject = { collection: string; id: string; } | { collection: string; slug: string; }; export declare function createGetEntry({ getEntryImport, getRenderEntryImport, collectionNames, liveCollections, }: { getEntryImport: GetEntryImport; getRenderEntryImport: GetEntryImport; collectionNames: Set; liveCollections: LiveCollectionConfigMap; }): (collectionOrLookupObject: string | EntryLookupObject, lookup?: string | Record) => Promise; export declare function createGetEntries(getEntry: ReturnType): (entries: { collection: string; id: string; }[] | { collection: string; slug: string; }[]) => Promise<(ContentEntryResult | DataEntryResult | undefined)[]>; export declare function createGetLiveCollection({ liveCollections, }: { liveCollections: LiveCollectionConfigMap; }): (collection: string, filter?: Record) => Promise; export declare function createGetLiveEntry({ liveCollections, }: { liveCollections: LiveCollectionConfigMap; }): (collection: string, lookup: string | Record) => Promise; type RenderResult = { Content: AstroComponentFactory; headings: MarkdownHeading[]; remarkPluginFrontmatter: Record; }; export declare function renderEntry(entry: DataEntry | { render: () => Promise<{ Content: AstroComponentFactory; }>; } | (DataEntry & { render: () => Promise<{ Content: AstroComponentFactory; }>; })): Promise<{ Content: AstroComponentFactory; }>; export declare function createReference({ lookupMap }: { lookupMap: ContentLookupMap; }): (collection: string) => z.ZodEffects, z.ZodObject<{ slug: z.ZodString; collection: z.ZodString; }, "strip", z.ZodTypeAny, { slug: string; collection: string; }, { slug: string; collection: string; }>]>, { id: string; collection: string; } | { slug: string; collection: string; } | undefined, string | { id: string; collection: string; } | { slug: string; collection: string; }>; export declare function defineCollection(config: any): import("./config.js").CollectionConfig; export declare function defineLiveCollection(): void;