import { RawItem } from '@dcupl/common'; /** * Default separator joining composite `keyProperty` parts when no override is * supplied at the model, container, or resource level. */ export declare const DEFAULT_KEY_PROPERTY_SEPARATOR = "::"; /** * Normalize a `keyProperty` spec to an array of property names. * * Returns `[]` for `undefined`. Single-string and single-element-array forms * both collapse to a one-element array — callers that want to short-circuit * the join can check `parts.length === 1`. */ export declare function getKeyParts(keyProperty: string | readonly string[] | undefined): readonly string[]; /** * Extract the composite key string from `item` using `keyProperty`. * * - String form: returns `String(item[keyProperty])`. * - Single-element array: equivalent to the string form (no separator applied). * - Multi-element array: joins `String(item[p])` for each part with `separator`. * * Each part is stringified via `String(value)`, so `null` → `'null'`, * `undefined` → `'undefined'`, `''` stays `''` — preserving data distinctions. * Row ingest uses `extractRowKey`, which treats a row without any key value as * missing instead of keying it `'undefined'`. */ export declare function extractKey(item: RawItem, keyProperty: string | readonly string[], separator?: string): string; /** * Extract a row's key from its `keyProperty` value(s) for ingest. * * Same as `extractKey`, but returns `undefined` when the row has no key: the * single key property is `undefined` or `null`, or every part of a composite * key is. The model drops such a row and records `MissingKey`, as for a row * without the default `key` (#377). A composite key with only some parts * missing keeps them as `'undefined'`/`'null'` parts. */ export declare function extractRowKey(item: RawItem, keyProperty: string | readonly string[], separator?: string): string | undefined; /** * Whether a row carries a key. A row whose `key` is `undefined` or `null` * cannot be identified: the model drops it and records `MissingKey`. */ export declare function hasRowKey(row: RawItem): boolean; /** * Render a `keyProperty` spec as a single string suitable for the `attribute` * field of error reports. * * - String → returned as-is. * - Array → joined with `separator` (e.g. `'ID::Language'`). * - `undefined` → `undefined`. * * Keeps the error contract a string for backward compatibility while making * the offending composite obvious to callers reading the error. */ export declare function joinKeyProperty(keyProperty: string | readonly string[] | undefined, separator?: string): string | undefined;