import type { ComKey, PriKey } from '../key'; import type { Item } from './Item'; /** * Reference type that flattens item properties directly onto the reference object. * When populated, the reference contains the key plus all item properties directly, * allowing access via refs.name.property instead of refs.name.item.property. * * Structure: * - Unpopulated: { key: ComKey | PriKey } * - Populated: { key: ComKey | PriKey, ...itemProperties } */ export type Reference = { key: ComKey | PriKey; } & Partial, 'key'>>; export type ReferenceItem = Reference; export type References = Record>; /** * Aggregation type that flattens item properties directly onto the aggregation object. * Similar to Reference, when populated, the aggregation contains the key plus all item properties. */ export type Aggregation = { key: ComKey | PriKey; } & Partial, 'key'>>;