/** * Runtime guards that promote untrusted `spreadsheets.get` payloads into * typed internal structures. * * Every SDK response arrives at this boundary as `unknown`; each parser * validates shape field by field and fails closed through * `invalidProviderState` before any planner, builder, or repository logic * runs. The exported cell-value helpers (`apiStringValue`/`apiNumberValue`) * are shared by the header and receipt readers. */ import type { ParsedSheet, ParsedSpreadsheetDocument } from "./preflightTypes.js"; /** Promotes an untrusted `spreadsheets.get` body with runtime guards. */ export declare function parseSpreadsheetDocument(value: unknown, label: string): ParsedSpreadsheetDocument; /** * Promotes an enumeration-only `spreadsheets.get` body (sheet properties, * no grid data) with runtime guards. */ export declare function parseSheetPropertiesDocument(value: unknown, label: string): readonly ParsedSheet[]; /** Reads the userEnteredValue.stringValue of one API cell with guards. */ export declare function apiStringValue(value: unknown): string | undefined; /** Reads the userEnteredValue.numberValue of one API cell with guards. */ export declare function apiNumberValue(value: unknown): number | undefined; /** * Returns a present API container as a record, failing closed on a present * primitive/null/array wrapper. `undefined` (an omitted field) stays omitted; * `{}` is a valid blank record. Every present cell-value and cell-format * container is validated through this guard at the raw GET boundary so a * malformed wrapper can never be silently dropped or misread. */ export declare function requireApiContainer(value: unknown, label: string): Record | undefined; //# sourceMappingURL=preflightParsing.d.ts.map