import type { DescriptionDeps } from '../cells/description.js'; import type { StoredMetafield } from '../ports/lookup.js'; import type { ImportIssue } from '../types.js'; /** `{namespace: {key: value}}`, the form core stores and takes. */ export type MetaDataSet = Record>; export interface MetafieldRead { /** The values of the cells that could be read and passed the check. */ values: MetaDataSet; issues: ImportIssue[]; } /** * Reads the custom-field cells of a row: each is converted to the form of its * definition (MET-01, MET-03, MET-05; ALL-11 for JSON that does not parse) and * checked by the store (MET-02). A cell that names no definition is skipped: the * header said so (ALL-08). The problems are collected for each column, as the * rule MET-06 wants, never thrown at the first. */ export declare function readMetafields(args: { rowNumber: number; cells: Record | undefined; definitions: ReadonlyMap; deps: DescriptionDeps; }): MetafieldRead; /** * MET-04: a required field needs a value when the record is created (the * stored value counts on an update). Core enforces `required` only when the * payload carries custom fields, and the import always sends them. */ export declare function missingRequired(args: { rowNumber: number; key: string; creates: boolean; cells: Record | undefined; stored: MetaDataSet | null; definitions: ReadonlyMap; }): ImportIssue[]; /** The stored set with the new values laid over it, key by key (ยง 5.9). */ export declare function mergeMetaData(stored: MetaDataSet | null | undefined, values: MetaDataSet): MetaDataSet;