import type { AssetSummary } from '../contentful/assets.js'; import type { ReferenceEntryRow } from '../index/query.js'; /** * A minimal description of a CMA entry sys object used for JSON serialization. * Compatible with both contentful-management Entry and SerializedEntry sys shapes. */ interface EntrySysForJson { id: string; contentType: { sys: { id: string; }; }; publishedVersion?: number | null; updatedAt: string; } /** * JSON-serializable representation of a Contentful entry, as output by list/search --json. */ interface EntryJson { id: string; contentType: string; title: string; slug: string | null; status: 'published' | 'draft'; updatedAt: string; fields: Record; } /** * Flattens a locale-keyed field map `{ fieldId: { locale: value } }` to the given locale, * serializing link and RTF values into JSON-safe representations. */ export declare function entryFieldsToJson(fields: Record>, locale: string): Record; /** * Converts a CMA entry (or SerializedEntry) to a full JSON-safe EntryJson object, * including flattened fields. */ export declare function entryToJson(entry: { sys: EntrySysForJson; fields: Record>; }, locale: string): EntryJson; /** * Converts an AssetSummary to a plain JSON-safe object. * Undefined optional fields are normalized to null for stable output. */ /** * JSON for reference catalog rows from the local index (`list --type template|tag|… --json`). * Does not call CMA; fields are limited to what the index stores. */ export declare function referenceEntryRowToJson(row: ReferenceEntryRow): EntryJson; export declare function assetSummaryToJson(summary: AssetSummary): Record; export {}; //# sourceMappingURL=json.d.ts.map