import type { sheets_v4 } from '@googleapis/sheets'; import type { Border } from '../entities/Border.js'; import type { CellFormat } from '../entities/CellFormat.js'; import { ColorStyle } from '../entities/ColorStyle.js'; import type { TextFormat } from '../entities/TextFormat.js'; /** * Format-noun carriers: the request-direction mirror of spreadsheet.ts's * projections, taking documented entities across the Google boundary with * `forGoogle` at each level (see optionality.ts). Each carrier enumerates its * entity's fields by hand, so a field added to an entity without a carrier * line compiles unchanged and silently drops at the boundary; the handler * tests' exact-params assertions are the guard, so extend them with the field. */ /** * Carry a ColorStyle across the Google boundary. Enforces the entity's * documented exactly-one rule here, once, for every input path (tab colors, * fills, text foregrounds, borders): the REST field is a oneof, and Google * rejects both-set with "oneof field 'kind' is already set" (live-verified). * The rule stays out of the entity itself because the output projection * deliberately degrades an unknown theme color to an empty ColorStyle. */ export declare function toColorStyle(colorStyle: ColorStyle): sheets_v4.Schema$ColorStyle; /** Carry a TextFormat across the Google boundary. */ export declare function toTextFormat(textFormat: TextFormat): sheets_v4.Schema$TextFormat; /** Project a REST text format, cleaning nulls and narrowing its color style. */ export declare function projectTextFormat(data: sheets_v4.Schema$TextFormat): TextFormat; /** Carry a CellFormat across the Google boundary. */ export declare function toCellFormat(format: CellFormat): sheets_v4.Schema$CellFormat; /** Carry a Border across the Google boundary. */ export declare function toBorder(border: Border): sheets_v4.Schema$Border; /** Project a REST color style onto the ColorStyle shape, dropping unknown theme colors. */ export declare function projectColorStyle(data: sheets_v4.Schema$ColorStyle): ColorStyle; //# sourceMappingURL=formats.d.ts.map