import { type sheets_v4 } from "@googleapis/sheets"; import * as z from "zod"; import { BANDING_PROPERTIES_UPDATE_SCHEMA, DATE_TIME_RENDER_SCHEMA, GRID_RANGE_SCHEMA, MAJOR_DIMENSION_SCHEMA, RANGE_TARGET_SCHEMA, ROW_SOURCE_SCHEMA, SHEET_REFERENCE_SCHEMA, TABLE_COLUMN_TYPE_SCHEMA, VALUE_RENDER_SCHEMA, CELL_VALUE_SCHEMA } from "./schemas.js"; export interface ResolvedRowSource { bodyEndRow?: number; bodyStartRow: number; columnCount: number; headers: string[]; sheetId: number; sheetTitle: string; tableId?: string; } /** * Creates the official Sheets client from a resolved Google integration secret. * * @param secret - Refreshed Google integration secret. */ export declare function getGoogleSheetsApi(secret: Record): sheets_v4.Sheets; /** * Accepts either a raw spreadsheet ID or a standard Google Sheets URL. * * @param spreadsheet - Spreadsheet ID or URL. * @throws When a URL is not a recognizable Google Sheets URL. */ export declare function normalizeSpreadsheetId(spreadsheet: string): string; /** * Resolves a sheet title or immutable ID with one metadata request. * * @param sheetsApi - Authenticated Sheets client. * @param spreadsheetId - Immutable spreadsheet ID. * @param reference - Sheet title or ID. * @throws When the referenced sheet does not exist. */ export declare function resolveSheet(sheetsApi: sheets_v4.Sheets, spreadsheetId: string, reference: z.infer): Promise; /** * Resolves a native table name or ID and its owning sheet. * * @param sheetsApi - Authenticated Sheets client. * @param spreadsheetId - Immutable spreadsheet ID. * @param reference - Native table name or ID. * @throws When the referenced table does not exist. */ export declare function resolveTable(sheetsApi: sheets_v4.Sheets, spreadsheetId: string, reference: string): Promise<{ sheet: sheets_v4.Schema$Sheet; table: sheets_v4.Schema$Table; }>; /** * Resolves a header-backed sheet or native table into row coordinates. * * @param sheetsApi - Authenticated Sheets client. * @param spreadsheetId - Immutable spreadsheet ID. * @param source - Header-backed sheet or native table. */ export declare function resolveRowSource(sheetsApi: sheets_v4.Sheets, spreadsheetId: string, source: z.infer): Promise; /** * Converts one-based public coordinates into a native zero-based GridRange. * * @param sheetsApi - Authenticated Sheets client. * @param spreadsheetId - Immutable spreadsheet ID. * @param range - Public structured grid range. */ export declare function resolveGridRange(sheetsApi: sheets_v4.Sheets, spreadsheetId: string, range: z.infer): Promise<{ endColumnIndex: number | undefined; endRowIndex: number | undefined; sheetId: number; startColumnIndex: number | undefined; startRowIndex: number | undefined; }>; /** * Resolves a structured range or native-table section into a grid range. * * @param sheetsApi - Authenticated Sheets client. * @param spreadsheetId - Immutable spreadsheet ID. * @param target - Public grid range or native-table section. * @throws When the table section does not exist or lacks bounded coordinates. */ export declare function resolveRangeTarget(sheetsApi: sheets_v4.Sheets, spreadsheetId: string, target: z.infer): Promise<{ endColumnIndex: number | undefined; endRowIndex: number | undefined; sheetId: number; startColumnIndex: number | undefined; startRowIndex: number | undefined; }>; /** * Resolves one native-table section against provider table metadata. * * @param table - Provider native-table metadata. * @param target - Public native-table section target. * @throws When the table section does not exist or lacks bounded coordinates. */ export declare function resolveTableSectionRange(table: sheets_v4.Schema$Table, target: Extract, { table: string; }>): { endColumnIndex: number | undefined; endRowIndex: number | undefined; sheetId: number; startColumnIndex: number | undefined; startRowIndex: number | undefined; }; /** * Resolves non-empty range targets and ensures they share one sheet. * * @param sheetsApi - Authenticated Sheets client. * @param spreadsheetId - Immutable spreadsheet ID. * @param targets - Public grid ranges or table sections. * @throws When the resolved ranges do not share one sheet. */ export declare function resolveSameSheetRangeTargets(sheetsApi: sheets_v4.Sheets, spreadsheetId: string, targets: z.infer[]): Promise<{ ranges: { endColumnIndex: number | undefined; endRowIndex: number | undefined; sheetId: number; startColumnIndex: number | undefined; startRowIndex: number | undefined; }[]; sheetId: number; }>; /** * Resolves a mutable numeric banded-range ID. * * @param sheetsApi - Authenticated Sheets client. * @param spreadsheetId - Immutable spreadsheet ID. * @param bandedRangeId - Numeric provider banded-range ID. * @throws When the banded range does not exist. */ export declare function resolveBandedRange(sheetsApi: sheets_v4.Sheets, spreadsheetId: string, bandedRangeId: number): Promise; /** * Ensures a banded-range update keeps row or column banding. * * @param bandedRange - Existing provider banded-range metadata. * @param columns - Requested column update or clear. * @param rows - Requested row update or clear. * @throws When the update would leave no banding direction. */ export declare function assertBandedRangeUpdateKeepsBanding(bandedRange: sheets_v4.Schema$BandedRange, columns: z.infer | null | undefined, rows: z.infer | null | undefined): void; /** * Reads one conditional-format rule by sheet and zero-based index. * * @param sheetsApi - Authenticated Sheets client. * @param spreadsheetId - Immutable spreadsheet ID. * @param sheetReference - Sheet title or immutable numeric ID. * @param index - Zero-based rule priority. * @throws When the indexed rule does not exist on the selected sheet. */ export declare function resolveConditionalFormatRule(sheetsApi: sheets_v4.Sheets, spreadsheetId: string, sheetReference: z.infer, index: number): Promise<{ rule: sheets_v4.Schema$ConditionalFormatRule; sheetId: number; }>; /** * Normalizes provider spreadsheet metadata into the public output shape. * * @param spreadsheet - Provider spreadsheet resource. */ export declare function normalizeSpreadsheet(spreadsheet: sheets_v4.Schema$Spreadsheet): { namedRanges: { namedRangeId: string; name: string; range: { sheetId: number; endColumnIndex?: number | undefined; endRowIndex?: number | undefined; startColumnIndex?: number | undefined; startRowIndex?: number | undefined; }; }[]; sheets: { bandedRanges: { range: { sheetId: number; endColumnIndex?: number | undefined; endRowIndex?: number | undefined; startColumnIndex?: number | undefined; startRowIndex?: number | undefined; }; bandedRangeId?: number | undefined; columns?: { firstBandColor: `#${string}` | { theme: "link" | "text" | "background" | "accent1" | "accent2" | "accent3" | "accent4" | "accent5" | "accent6"; }; secondBandColor: `#${string}` | { theme: "link" | "text" | "background" | "accent1" | "accent2" | "accent3" | "accent4" | "accent5" | "accent6"; }; footerColor?: `#${string}` | { theme: "link" | "text" | "background" | "accent1" | "accent2" | "accent3" | "accent4" | "accent5" | "accent6"; } | undefined; headerColor?: `#${string}` | { theme: "link" | "text" | "background" | "accent1" | "accent2" | "accent3" | "accent4" | "accent5" | "accent6"; } | undefined; } | undefined; reference?: string | undefined; rows?: { firstBandColor: `#${string}` | { theme: "link" | "text" | "background" | "accent1" | "accent2" | "accent3" | "accent4" | "accent5" | "accent6"; }; secondBandColor: `#${string}` | { theme: "link" | "text" | "background" | "accent1" | "accent2" | "accent3" | "accent4" | "accent5" | "accent6"; }; footerColor?: `#${string}` | { theme: "link" | "text" | "background" | "accent1" | "accent2" | "accent3" | "accent4" | "accent5" | "accent6"; } | undefined; headerColor?: `#${string}` | { theme: "link" | "text" | "background" | "accent1" | "accent2" | "accent3" | "accent4" | "accent5" | "accent6"; } | undefined; } | undefined; }[]; conditionalFormats: { index: number; ranges: { sheetId: number; endColumnIndex?: number | undefined; endRowIndex?: number | undefined; startColumnIndex?: number | undefined; startRowIndex?: number | undefined; }[]; rule: { condition: { type: "numberGreaterThan" | "numberGreaterThanOrEqual" | "numberLessThan" | "numberLessThanOrEqual" | "numberEqual" | "numberNotEqual" | "textContains" | "textNotContains" | "textStartsWith" | "textEndsWith" | "textEqual" | "dateEqual"; value: string; } | { type: "numberBetween" | "numberNotBetween"; values: [string, string]; } | { type: "dateBefore" | "dateAfter"; value: string | { relativeDate: "today" | "yesterday" | "pastYear" | "pastMonth" | "pastWeek" | "tomorrow"; }; } | { type: "blank" | "notBlank"; } | { formula: string; type: "customFormula"; }; format: { backgroundColor?: `#${string}` | { theme: "link" | "text" | "background" | "accent1" | "accent2" | "accent3" | "accent4" | "accent5" | "accent6"; } | undefined; bold?: boolean | undefined; italic?: boolean | undefined; strikethrough?: boolean | undefined; textColor?: `#${string}` | { theme: "link" | "text" | "background" | "accent1" | "accent2" | "accent3" | "accent4" | "accent5" | "accent6"; } | undefined; }; type: "boolean"; } | { max: { color: `#${string}` | { theme: "link" | "text" | "background" | "accent1" | "accent2" | "accent3" | "accent4" | "accent5" | "accent6"; }; type: "number" | "percent" | "percentile"; value: string; } | { color: `#${string}` | { theme: "link" | "text" | "background" | "accent1" | "accent2" | "accent3" | "accent4" | "accent5" | "accent6"; }; type: "max"; }; min: { color: `#${string}` | { theme: "link" | "text" | "background" | "accent1" | "accent2" | "accent3" | "accent4" | "accent5" | "accent6"; }; type: "number" | "percent" | "percentile"; value: string; } | { color: `#${string}` | { theme: "link" | "text" | "background" | "accent1" | "accent2" | "accent3" | "accent4" | "accent5" | "accent6"; }; type: "min"; }; type: "gradient"; midpoint?: { color: `#${string}` | { theme: "link" | "text" | "background" | "accent1" | "accent2" | "accent3" | "accent4" | "accent5" | "accent6"; }; type: "number" | "percent" | "percentile"; value: string; } | undefined; }; }[]; frozenColumnCount: number; frozenRowCount: number; hidden: boolean; index: number; rightToLeft: boolean; sheetId: number; sheetType: "OBJECT" | "GRID" | "DATA_SOURCE"; tables: { columns: { index: number; name: string; options: string[]; type: "number" | "boolean" | "date" | "file" | "text" | "time" | "dateTime" | "currency" | "person" | "unspecified" | "rating" | "dropdown" | "percent" | "finance" | "place"; }[]; name: string; range: { sheetId: number; endColumnIndex?: number | undefined; endRowIndex?: number | undefined; startColumnIndex?: number | undefined; startRowIndex?: number | undefined; }; style: { firstBandColor?: `#${string}` | { theme: "link" | "text" | "background" | "accent1" | "accent2" | "accent3" | "accent4" | "accent5" | "accent6"; } | undefined; footerColor?: `#${string}` | { theme: "link" | "text" | "background" | "accent1" | "accent2" | "accent3" | "accent4" | "accent5" | "accent6"; } | undefined; headerColor?: `#${string}` | { theme: "link" | "text" | "background" | "accent1" | "accent2" | "accent3" | "accent4" | "accent5" | "accent6"; } | undefined; secondBandColor?: `#${string}` | { theme: "link" | "text" | "background" | "accent1" | "accent2" | "accent3" | "accent4" | "accent5" | "accent6"; } | undefined; }; tableId: string; }[]; title: string; columnCount?: number | undefined; rowCount?: number | undefined; }[]; spreadsheetId: string; title: string; url: string; autoRecalc?: "HOUR" | "MINUTE" | "ON_CHANGE" | undefined; locale?: string | undefined; timeZone?: string | undefined; }; /** * Normalizes provider sheet metadata into the public output shape. * * @param sheet - Provider sheet resource. * @throws When required sheet identity fields are absent. */ export declare function normalizeSheet(sheet: sheets_v4.Schema$Sheet): { bandedRanges: { range: { sheetId: number; endColumnIndex?: number | undefined; endRowIndex?: number | undefined; startColumnIndex?: number | undefined; startRowIndex?: number | undefined; }; bandedRangeId?: number | undefined; columns?: { firstBandColor: `#${string}` | { theme: "link" | "text" | "background" | "accent1" | "accent2" | "accent3" | "accent4" | "accent5" | "accent6"; }; secondBandColor: `#${string}` | { theme: "link" | "text" | "background" | "accent1" | "accent2" | "accent3" | "accent4" | "accent5" | "accent6"; }; footerColor?: `#${string}` | { theme: "link" | "text" | "background" | "accent1" | "accent2" | "accent3" | "accent4" | "accent5" | "accent6"; } | undefined; headerColor?: `#${string}` | { theme: "link" | "text" | "background" | "accent1" | "accent2" | "accent3" | "accent4" | "accent5" | "accent6"; } | undefined; } | undefined; reference?: string | undefined; rows?: { firstBandColor: `#${string}` | { theme: "link" | "text" | "background" | "accent1" | "accent2" | "accent3" | "accent4" | "accent5" | "accent6"; }; secondBandColor: `#${string}` | { theme: "link" | "text" | "background" | "accent1" | "accent2" | "accent3" | "accent4" | "accent5" | "accent6"; }; footerColor?: `#${string}` | { theme: "link" | "text" | "background" | "accent1" | "accent2" | "accent3" | "accent4" | "accent5" | "accent6"; } | undefined; headerColor?: `#${string}` | { theme: "link" | "text" | "background" | "accent1" | "accent2" | "accent3" | "accent4" | "accent5" | "accent6"; } | undefined; } | undefined; }[]; conditionalFormats: { index: number; ranges: { sheetId: number; endColumnIndex?: number | undefined; endRowIndex?: number | undefined; startColumnIndex?: number | undefined; startRowIndex?: number | undefined; }[]; rule: { condition: { type: "numberGreaterThan" | "numberGreaterThanOrEqual" | "numberLessThan" | "numberLessThanOrEqual" | "numberEqual" | "numberNotEqual" | "textContains" | "textNotContains" | "textStartsWith" | "textEndsWith" | "textEqual" | "dateEqual"; value: string; } | { type: "numberBetween" | "numberNotBetween"; values: [string, string]; } | { type: "dateBefore" | "dateAfter"; value: string | { relativeDate: "today" | "yesterday" | "pastYear" | "pastMonth" | "pastWeek" | "tomorrow"; }; } | { type: "blank" | "notBlank"; } | { formula: string; type: "customFormula"; }; format: { backgroundColor?: `#${string}` | { theme: "link" | "text" | "background" | "accent1" | "accent2" | "accent3" | "accent4" | "accent5" | "accent6"; } | undefined; bold?: boolean | undefined; italic?: boolean | undefined; strikethrough?: boolean | undefined; textColor?: `#${string}` | { theme: "link" | "text" | "background" | "accent1" | "accent2" | "accent3" | "accent4" | "accent5" | "accent6"; } | undefined; }; type: "boolean"; } | { max: { color: `#${string}` | { theme: "link" | "text" | "background" | "accent1" | "accent2" | "accent3" | "accent4" | "accent5" | "accent6"; }; type: "number" | "percent" | "percentile"; value: string; } | { color: `#${string}` | { theme: "link" | "text" | "background" | "accent1" | "accent2" | "accent3" | "accent4" | "accent5" | "accent6"; }; type: "max"; }; min: { color: `#${string}` | { theme: "link" | "text" | "background" | "accent1" | "accent2" | "accent3" | "accent4" | "accent5" | "accent6"; }; type: "number" | "percent" | "percentile"; value: string; } | { color: `#${string}` | { theme: "link" | "text" | "background" | "accent1" | "accent2" | "accent3" | "accent4" | "accent5" | "accent6"; }; type: "min"; }; type: "gradient"; midpoint?: { color: `#${string}` | { theme: "link" | "text" | "background" | "accent1" | "accent2" | "accent3" | "accent4" | "accent5" | "accent6"; }; type: "number" | "percent" | "percentile"; value: string; } | undefined; }; }[]; frozenColumnCount: number; frozenRowCount: number; hidden: boolean; index: number; rightToLeft: boolean; sheetId: number; sheetType: "OBJECT" | "GRID" | "DATA_SOURCE"; tables: { columns: { index: number; name: string; options: string[]; type: "number" | "boolean" | "date" | "file" | "text" | "time" | "dateTime" | "currency" | "person" | "unspecified" | "rating" | "dropdown" | "percent" | "finance" | "place"; }[]; name: string; range: { sheetId: number; endColumnIndex?: number | undefined; endRowIndex?: number | undefined; startColumnIndex?: number | undefined; startRowIndex?: number | undefined; }; style: { firstBandColor?: `#${string}` | { theme: "link" | "text" | "background" | "accent1" | "accent2" | "accent3" | "accent4" | "accent5" | "accent6"; } | undefined; footerColor?: `#${string}` | { theme: "link" | "text" | "background" | "accent1" | "accent2" | "accent3" | "accent4" | "accent5" | "accent6"; } | undefined; headerColor?: `#${string}` | { theme: "link" | "text" | "background" | "accent1" | "accent2" | "accent3" | "accent4" | "accent5" | "accent6"; } | undefined; secondBandColor?: `#${string}` | { theme: "link" | "text" | "background" | "accent1" | "accent2" | "accent3" | "accent4" | "accent5" | "accent6"; } | undefined; }; tableId: string; }[]; title: string; columnCount?: number | undefined; rowCount?: number | undefined; }; /** * Normalizes a provider native table into the public output shape. * * @param table - Provider table resource. * @throws When required table identity fields are absent. */ export declare function normalizeTable(table: sheets_v4.Schema$Table): { columns: { index: number; name: string; options: string[]; type: "number" | "boolean" | "date" | "file" | "text" | "time" | "dateTime" | "currency" | "person" | "unspecified" | "rating" | "dropdown" | "percent" | "finance" | "place"; }[]; name: string; range: { sheetId: number; endColumnIndex?: number | undefined; endRowIndex?: number | undefined; startColumnIndex?: number | undefined; startRowIndex?: number | undefined; }; style: { firstBandColor?: `#${string}` | { theme: "link" | "text" | "background" | "accent1" | "accent2" | "accent3" | "accent4" | "accent5" | "accent6"; } | undefined; footerColor?: `#${string}` | { theme: "link" | "text" | "background" | "accent1" | "accent2" | "accent3" | "accent4" | "accent5" | "accent6"; } | undefined; headerColor?: `#${string}` | { theme: "link" | "text" | "background" | "accent1" | "accent2" | "accent3" | "accent4" | "accent5" | "accent6"; } | undefined; secondBandColor?: `#${string}` | { theme: "link" | "text" | "background" | "accent1" | "accent2" | "accent3" | "accent4" | "accent5" | "accent6"; } | undefined; }; tableId: string; }; /** * Normalizes a provider banded range into the public output shape. * * @param bandedRange - Provider banded-range metadata. * @throws When required identity, range, or color metadata is absent. */ export declare function normalizeBandedRange(bandedRange: sheets_v4.Schema$BandedRange): { range: { sheetId: number; endColumnIndex?: number | undefined; endRowIndex?: number | undefined; startColumnIndex?: number | undefined; startRowIndex?: number | undefined; }; bandedRangeId?: number | undefined; columns?: { firstBandColor: `#${string}` | { theme: "link" | "text" | "background" | "accent1" | "accent2" | "accent3" | "accent4" | "accent5" | "accent6"; }; secondBandColor: `#${string}` | { theme: "link" | "text" | "background" | "accent1" | "accent2" | "accent3" | "accent4" | "accent5" | "accent6"; }; footerColor?: `#${string}` | { theme: "link" | "text" | "background" | "accent1" | "accent2" | "accent3" | "accent4" | "accent5" | "accent6"; } | undefined; headerColor?: `#${string}` | { theme: "link" | "text" | "background" | "accent1" | "accent2" | "accent3" | "accent4" | "accent5" | "accent6"; } | undefined; } | undefined; reference?: string | undefined; rows?: { firstBandColor: `#${string}` | { theme: "link" | "text" | "background" | "accent1" | "accent2" | "accent3" | "accent4" | "accent5" | "accent6"; }; secondBandColor: `#${string}` | { theme: "link" | "text" | "background" | "accent1" | "accent2" | "accent3" | "accent4" | "accent5" | "accent6"; }; footerColor?: `#${string}` | { theme: "link" | "text" | "background" | "accent1" | "accent2" | "accent3" | "accent4" | "accent5" | "accent6"; } | undefined; headerColor?: `#${string}` | { theme: "link" | "text" | "background" | "accent1" | "accent2" | "accent3" | "accent4" | "accent5" | "accent6"; } | undefined; } | undefined; }; /** * Normalizes a provider conditional-format rule and its sheet priority. * * @param rule - Provider conditional-format rule. * @param index - Zero-based rule priority. * @throws When required ranges or rule metadata are absent. */ export declare function normalizeConditionalFormatRule(rule: sheets_v4.Schema$ConditionalFormatRule, index: number): { index: number; ranges: { sheetId: number; endColumnIndex?: number | undefined; endRowIndex?: number | undefined; startColumnIndex?: number | undefined; startRowIndex?: number | undefined; }[]; rule: { condition: { type: "numberGreaterThan" | "numberGreaterThanOrEqual" | "numberLessThan" | "numberLessThanOrEqual" | "numberEqual" | "numberNotEqual" | "textContains" | "textNotContains" | "textStartsWith" | "textEndsWith" | "textEqual" | "dateEqual"; value: string; } | { type: "numberBetween" | "numberNotBetween"; values: [string, string]; } | { type: "dateBefore" | "dateAfter"; value: string | { relativeDate: "today" | "yesterday" | "pastYear" | "pastMonth" | "pastWeek" | "tomorrow"; }; } | { type: "blank" | "notBlank"; } | { formula: string; type: "customFormula"; }; format: { backgroundColor?: `#${string}` | { theme: "link" | "text" | "background" | "accent1" | "accent2" | "accent3" | "accent4" | "accent5" | "accent6"; } | undefined; bold?: boolean | undefined; italic?: boolean | undefined; strikethrough?: boolean | undefined; textColor?: `#${string}` | { theme: "link" | "text" | "background" | "accent1" | "accent2" | "accent3" | "accent4" | "accent5" | "accent6"; } | undefined; }; type: "boolean"; } | { max: { color: `#${string}` | { theme: "link" | "text" | "background" | "accent1" | "accent2" | "accent3" | "accent4" | "accent5" | "accent6"; }; type: "number" | "percent" | "percentile"; value: string; } | { color: `#${string}` | { theme: "link" | "text" | "background" | "accent1" | "accent2" | "accent3" | "accent4" | "accent5" | "accent6"; }; type: "max"; }; min: { color: `#${string}` | { theme: "link" | "text" | "background" | "accent1" | "accent2" | "accent3" | "accent4" | "accent5" | "accent6"; }; type: "number" | "percent" | "percentile"; value: string; } | { color: `#${string}` | { theme: "link" | "text" | "background" | "accent1" | "accent2" | "accent3" | "accent4" | "accent5" | "accent6"; }; type: "min"; }; type: "gradient"; midpoint?: { color: `#${string}` | { theme: "link" | "text" | "background" | "accent1" | "accent2" | "accent3" | "accent4" | "accent5" | "accent6"; }; type: "number" | "percent" | "percentile"; value: string; } | undefined; }; }; /** * Normalizes a provider value range into the public matrix shape. * * @param valueRange - Provider value range. */ export declare function normalizeValueRange(valueRange: sheets_v4.Schema$ValueRange): { majorDimension: "columns" | "rows"; range: string; values: (string | number | boolean | null)[][]; }; /** * Normalizes provider value-update counts and optional returned values. * * @param update - Provider update response. */ export declare function normalizeValueUpdate(update: sheets_v4.Schema$UpdateValuesResponse): { updatedCells: number; updatedColumns: number; updatedRange: string; updatedRows: number; values?: { majorDimension: "columns" | "rows"; range: string; values: (string | number | boolean | null)[][]; } | undefined; }; /** * Maps the public dimension name to the provider enum. * * @param dimension - Public major dimension. */ export declare function toGoogleMajorDimension(dimension: z.infer | undefined): "ROWS" | "COLUMNS"; /** * Maps the public value rendering mode to the provider enum. * * @param render - Public value rendering mode. */ export declare function toGoogleValueRender(render: z.infer | undefined): "UNFORMATTED_VALUE" | "FORMULA" | "FORMATTED_VALUE"; /** * Maps the public date rendering mode to the provider enum. * * @param render - Public date rendering mode. */ export declare function toGoogleDateTimeRender(render: z.infer | undefined): "FORMATTED_STRING" | "SERIAL_NUMBER"; /** * Converts one public cell value into provider cell data. * * @param value - Public cell value. * @param inputMode - Whether formula-looking strings are parsed. */ export declare function toGoogleCellData(value: z.infer, inputMode?: "raw" | "userEntered"): sheets_v4.Schema$CellData; /** * Converts a public native-table column into provider metadata. * * @param column - Public column configuration. * @param column.name - Display name for the column. * @param column.options - Allowed values for dropdown columns. * @param column.type - Native table column type. * @param index - Zero-based position in the table. */ export declare function toGoogleTableColumn(column: { name: string; options?: string[]; type?: z.infer; }, index: number): sheets_v4.Schema$TableColumnProperties; /** * Converts a six-digit hex color into provider RGB fractions. * * @param hex - Six-digit hex color. */ /** * Maps provider row matrices to exact header-keyed records. * * @param rows - Provider row matrices. * @param source - Resolved row source. * @param startRow - One-based row number for the first matrix row. */ export declare function normalizeRows(rows: unknown[][], source: ResolvedRowSource, startRow: number): { range: string; rowNumber: number; values: { [k: string]: string | number | boolean | null; }; }[]; /** * Reads a bounded or unbounded sequence from a resolved row source. * * @param sheetsApi - Authenticated Sheets client. * @param spreadsheetId - Immutable spreadsheet ID. * @param source - Resolved row source. * @param options - Optional row bounds and rendering mode. * @param options.endRow - Inclusive one-based final row. * @param options.startRow - Inclusive one-based first row. * @param options.valueRender - How values should be rendered. */ export declare function readSourceRows(sheetsApi: sheets_v4.Sheets, spreadsheetId: string, source: ResolvedRowSource, options?: { endRow?: number; startRow?: number; valueRender?: z.infer; }): Promise<{ range: string; rowNumber: number; values: { [k: string]: string | number | boolean | null; }; }[]>; /** * Validates that row numbers belong to a resolved source body. * * @param source - Resolved row source. * @param rowNumbers - One-based row numbers. * @param options - Whether the first row after the current body is valid. * @param options.allowAppend - Whether to accept the first row after the body. * @throws When any row falls outside the source body. */ export declare function assertSourceRowNumbers(source: ResolvedRowSource, rowNumbers: number[], options?: { allowAppend?: boolean; }): void; /** * Orders record values by exact source headers. * * Missing columns become null values. * * @param values - Exact header-value pairs. * @param headers - Source headers in display order. * @throws When the record contains an unknown header. */ export declare function normalizeRowValues(values: Record>, headers: string[]): (string | number | boolean | null)[]; /** * Builds an A1 range from a sheet title and one-based coordinates. * * @param sheetTitle - Human-readable sheet title. * @param range - Optional one-based row and column bounds. * @param range.endColumn - Inclusive one-based final column. * @param range.endRow - Inclusive one-based final row. * @param range.startColumn - Inclusive one-based first column. * @param range.startRow - Inclusive one-based first row. */ export declare function buildA1Range(sheetTitle: string, range: { endColumn?: number; endRow?: number; startColumn?: number; startRow?: number; }): string; /** * Groups one-based row numbers into consecutive inclusive ranges. * * @param rowNumbers - Unordered one-based row numbers. */ export declare function createConsecutiveRowRanges(rowNumbers: number[]): { endRow: number; startRow: number; }[]; //# sourceMappingURL=google-sheets.d.ts.map