/** * Pure rendering utilities for the data availability grid. * * Converts AvailabilityGrid data into both table-ready row objects (for this.table()) * and a structured JSON contract (for --json output and LLM consumption). * * Uses filled/empty circle metaphor: * - \u25CF (●) = data exists * - \u25CB (○) = no data * * @module utils/formatting/availability-grid */ import type { AvailabilityGrid } from '../../services/DataAvailabilityService.js'; /** Filled circle: data exists in year */ export declare const DATA_PRESENT = "\u25CF"; /** Empty circle: no data in year */ export declare const DATA_ABSENT = "\u25CB"; /** Dash: not applicable or unknown */ export declare const DATA_NA = "\u2014"; /** * A single row of the availability grid formatted for table display. * Dynamic year columns are string-keyed (e.g., "y2026", "y2025"). */ export type AvailabilityTableRow = { /** Dynamic year columns: key = "y{year}", value = ● or ○ */ [yearKey: `y${number}`]: string; /** Object API name */ object: string; /** Oldest record year or "—" if no records */ oldest: string; }; /** * JSON contract for availability grid (LLM/MCP consumption). */ export type AvailabilityGridJson = { /** Object API name */ objectName: string; /** Oldest record year, or null if no records */ oldest: number | null; /** Year-keyed availability flags */ years: Record; }; /** * Builds table-ready row data from an AvailabilityGrid. * * Each row contains the object name, oldest year, and dynamic year columns * with filled/empty circle symbols. * * @param grid - The availability grid from DataAvailabilityService * @returns Array of row objects suitable for this.table() */ export declare function buildAvailabilityTableRows(grid: AvailabilityGrid): AvailabilityTableRow[]; /** * Builds column definitions for the availability grid table. * * Returns "Object", "Oldest", and one column per year in the grid. * * @param yearColumns - The year columns from the grid * @returns Column definitions for this.table() */ export declare function buildAvailabilityColumns(yearColumns: readonly number[]): Array<{ key: string; name: string; }>; /** * Converts an AvailabilityGrid to the JSON contract structure. * * Each object becomes an entry with its oldest year and year-keyed boolean flags. * This structure is designed for LLM/MCP consumption. * * @param grid - The availability grid from DataAvailabilityService * @returns Array of JSON contract objects */ export declare function buildAvailabilityJson(grid: AvailabilityGrid): AvailabilityGridJson[]; /** * Generates a summary string for the availability grid. * * @param grid - The availability grid * @returns Summary like "3 objects, 2 years, 1 gap" */ export declare function summarizeAvailabilityGrid(grid: AvailabilityGrid): string;