import type { AgAggregationFunction } from '../api/agAggregationFunction'; import type { AgFieldIdentifier } from '../api/agField'; import type { AgStudioFieldIdentifier } from '../api/engine/agStudioQuery'; /** Composite identity key — output of `buildFieldKey`. Used as the column-map key throughout the engine. */ export type FieldKey = string & { readonly __brand: 'FieldKey'; }; /** Data source identifier (e.g. `'orders'`, `'products'`). */ export type SourceId = string & { readonly __brand: 'SourceId'; }; /** * Canonically construct the composite `FieldKey` for a field. * * Every slot is rendered, even when empty, so the shape is always * `sourceId$...$alias$...$fieldId$...$agg$...$det$...`. Empty optional * values produce consecutive separators (e.g. `$alias$$`). */ export declare function buildFieldKey(sourceId: string, fieldId: AgStudioFieldIdentifier, sourceAlias?: string, aggregation?: AgAggregationFunction, determinant?: string): FieldKey; /** * Treat a bare `fieldId` as a `FieldKey`. Valid for un-aggregated fields * where the fieldId alone is the identity — expression dependency columns, * un-aggregated source fields in scan nodes, and window output fields. * Do NOT use for aggregated fields; use `buildFieldKey` with the * aggregation parameter instead. */ export declare function fieldIdAsKey(id: AgFieldIdentifier): FieldKey;