import { READ_OPERATION_EXTENSION_PRIORITY } from "./extension-priority.js"; import type { ResolvedContentContext } from "./types.js"; export { READ_OPERATION_EXTENSION_PRIORITY }; export type NotFoundLikeError = Error & { code?: string; }; interface ReadContextProviderLike { isProductionMode: () => boolean; isPersistentCacheInvalidated?: (prefix: string) => boolean; isReleaseBeingInvalidated?: (releaseId: string) => boolean; } interface ReadFetchState { apiPath: string; cacheKeyPrefix: string; cacheKey: string; isProduction: boolean; hasKnownExtension: boolean; isPreviewMode: boolean; isPublished: boolean; releaseId: string | null | undefined; isPrefixInvalidated: boolean; isReleaseInvalidated: boolean | undefined; skipPersistentCaches: boolean; } interface BuildReadFetchStateOptions { normalizedPath: string; contentContext: ResolvedContentContext | null; contextProvider?: ReadContextProviderLike; getOriginalApiPath?: (path: string) => string; } export declare function assertProjectSourcePath(normalizedPath: string): void; export declare function buildReadFetchState(options: BuildReadFetchStateOptions): ReadFetchState; export declare function getResolvedCacheKey(cacheKeyPrefix: string, normalizedResolvedPath: string): string; export declare function buildExtensionCandidatePaths(basePath: string): string[]; export declare function splitKnownFileExtension(apiPath: string): { originalExtension: string; basePath: string; } | null; /** Config discovery depends on each candidate name matching the source that is returned. */ export declare function requiresExactPublishedPath(apiPath: string): boolean; export declare function isNotFoundLikeError(error: unknown): boolean; /** * Raise the framework's "this path is not in the release" error. * * Registry-branded rather than a raw `Error` so that whoever decides the * response status can tell an absent path from a render that faulted: the * `file-not-found` slug is what `resolveSSRFailure` already reads to answer * 404. A release whose project has been deleted answers 404 to every source * read, and a raw `Error` buried that routine deletion in 500s. * * `code` is kept because {@link isNotFoundLikeError} and the platform's Node * and Deno absence checks both read it. */ export declare function createNotFoundLikeError(path: string): NotFoundLikeError; //# sourceMappingURL=read-operations-helpers.d.ts.map