/** * This Source Code is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * Copyright (c) Infonomic Company Limited */ import type { FieldSet } from '../@types/index.js'; import type { FlattenedFieldValue, UnifiedFieldValue } from './storage-row-types.js'; export interface RestoreResult { data: any; warnings: string[]; } /** * Main entrypoint for restoring a document's field data from flattened form * back into the original nested structure. * * Always returns `{ data, warnings }`. Warnings carry per-row reasons (e.g. * "Invalid block index 'undefined'") that are typically the result of a * collection schema change leaving orphan rows behind. Callers decide what * to do with them — strict reads reject any non-empty `warnings`, lenient * reads (the admin edit path) surface them to the UI. * * @param fields - The field definitions for the collection. * @param flattenedData - The flattened field data to restore. */ export declare const restoreFieldSetData: (fields: FieldSet, flattenedData: FlattenedFieldValue[], resolveLocale?: string) => RestoreResult; export declare const extractFlattenedFieldValue: (unifiedValue: UnifiedFieldValue) => FlattenedFieldValue;