import type { EntriesRepository } from "../../../repositories/content/entries/EntriesRepository.js"; import type { EntryDetailResponse } from "@repositories/content/entries/EntriesTypes.js"; export type EntryResolutionCode = "LOCALE_REQUIRED" | "AMBIGUOUS_IDENTIFIER"; /** Resolution refused before writing; the tool returns it with its code. */ export declare class EntryResolutionError extends Error { readonly code: EntryResolutionCode; readonly details: Record; constructor(message: string, code: EntryResolutionCode, details: Record); } export type ResolvedEntry = { /** The translation, read with `GET /entries/:id`. */ entry: EntryDetailResponse; /** Locales the entry has a translation in. */ locales: string[]; }; export type ResolveOptions = { typeId?: number | undefined; targetLocale?: string | undefined; /** Any translation will do (the action works on the whole entry). */ anyLocale?: boolean; }; /** * Resolves `identifier` (id, UUID or slug) to one translation of an entry and * reads it. Throws `EntryResolutionError` when the identifier or the locale * is not enough to pick one, and a plain `Error` when nothing matches. */ export declare function resolveEntryTranslation(repository: EntriesRepository, spaceId: number, identifier: string | number, options?: ResolveOptions): Promise; /** Whether a status read from `GET /entries/:id` means the entry is live. */ export declare function isPublishedStatus(status: string | undefined): boolean; /** The fields every write returns about the translation it read back. */ export declare function entrySummary(entry: EntryDetailResponse): { id: number; uuid: string; slug: string; name: string; locale: string; status: string; published: boolean; }; //# sourceMappingURL=resolveEntryTranslation.d.ts.map