/** * Provider constants for the direct Google Sheets API outbound worker. * * The direct provider mirrors the Apps Script provider's durable contracts: * the same hidden receipt tab name and headers, the same sync-anchor value * format (now stored as the User_Input tab's last system column instead of * developer metadata), the same canonical date serial/number-format semantics, * and the same bounded effect batches. Keeping these constants next to the provider * (rather than importing the Apps Script operation sources) makes the direct * path self-contained. Wire compatibility with a spreadsheet an Apps Script * provider already wrote to is limited to the receipt and date contracts: * User_Input tabs now require the `__hikoutei_row_id` system column, so * legacy tabs must be re-provisioned. */ export { GOOGLE_SHEETS_API_SCOPES, GOOGLE_SHEETS_API_DEFAULTS } from "../../../contracts/sheets/googleSheetsApi.js"; import type { RowCheckFormulaVocabulary } from "@hikoutei/ikisaki"; /** * Canonical Google API remote status that proves a range names a missing * tab. The refresh's fixed receipt-tab range is only treated as still-absent * when the API rejects it with this exact status; any other 400 (or a 400 * without a remote status) must fail closed instead of being read as proof * the receipt tab is absent. */ export declare const GOOGLE_SHEETS_API_MISSING_RANGE_REMOTE_CODE = "INVALID_ARGUMENT"; /** Current hard grid limit of a real spreadsheet (1-based). */ export declare const SHEET_MAX_ROW = 1048576; /** Hidden receipt tab shared with the Apps Script effect operations. */ export declare const GOOGLE_SHEETS_API_RECEIPT_SHEET_NAME = "__typed_sheets_internal_effect_receipts"; /** Receipt columns written by both the Apps Script and direct providers. */ export declare const GOOGLE_SHEETS_API_RECEIPT_HEADERS: readonly ["effectId", "payloadHash", "status", "visibleHash", "visibleRevision", "updatedAt"]; /** * System-column header of the User_Input tab carrying the row anchor. * * The row UUID lives in the LAST column of the User_Input tab as a cell * value (`sync-anchor:`) instead of developer metadata, so anchor * storage is not bounded by the Sheets per-sheet metadata quota. The column * is internal: it is excluded from user-field hashes, blank-row rules, and * the registered headers contract. */ export declare const GOOGLE_SHEETS_API_ROW_ID_HEADER = "__hikoutei_row_id"; /** * Header of the row-check formula column of a User_Input tab. * * P8-C sole-source: the header constant and the join semantics live in the * contracts leaf (`sheets/rowCheck.ts`); this re-export keeps existing * adapter-internal import paths valid. The column sits DIRECTLY AFTER the * registered range (outside every range-scoped read, hash, and blank-row * rule), carries a per-row token-join formula (contracts * `sheets/rowCheck.ts` encoding, `@hikoutei/ikisaki` * `evidence/rowCheckFormula.ts` builder) on every * system-created row, and lets inbound polling detect human edits by * reading only this one narrow column (see `operations/rowChecks.ts`). */ export { SYNC_ROW_CHECK_HEADER as GOOGLE_SHEETS_API_ROW_CHECK_HEADER } from "../../../contracts/sheets/rowCheck.js"; /** * Host binding of the neutral row-check formula vocabulary (owned by * `@hikoutei/ikisaki` `evidence/rowCheckFormula.ts`): the single-sourced * delimiter/separator/tag constants every formula call site passes to the * neutral builder, so the formula and the canonical renderer share one * source of truth. */ export declare const GOOGLE_SHEETS_API_ROW_CHECK_FORMULA_VOCABULARY: RowCheckFormulaVocabulary; /** * Value prefix of anchors GENERATED by the observation/anchor-ensure path. * * Flush-created rows keep the mapping's deterministic anchor format (the * default is `entity:`); the system column accepts any non-empty string * as an anchor because the column position is the identity proof. */ export declare const GOOGLE_SHEETS_API_ANCHOR_VALUE_PREFIX = "sync-anchor:"; /** * Canonical UTC date number format, byte-identical to the Apps Script * `setNumberFormat` pattern so date cells written by either provider read * back as dates through the REST API. */ export declare const GOOGLE_SHEETS_API_DATE_NUMBER_FORMAT = "yyyy\"-\"mm\"-\"dd\"T\"hh:mm:ss.000\"Z\""; /** * Canonical date number format as a REST `CellFormat.numberFormat` object. * The Sheets API models number formats as `{ type, pattern }` objects, not * bare pattern strings. */ export declare const GOOGLE_SHEETS_API_DATE_NUMBER_FORMAT_OBJECT: { readonly type: "DATE_TIME"; readonly pattern: "yyyy\"-\"mm\"-\"dd\"T\"hh:mm:ss.000\"Z\""; }; /** Stable per-effect reason codes emitted by the direct provider. */ export declare const GOOGLE_SHEETS_API_EFFECT_REASONS: { readonly EFFECT_ID_REUSED_WITH_DIFFERENT_PAYLOAD: "effect_id_reused_with_different_payload"; readonly RECEIPT_TARGET_MISSING: "receipt_target_missing"; readonly RECEIPT_POSTCONDITION_CHANGED: "receipt_postcondition_changed"; readonly RECEIPT_TARGET_REAPPEARED: "receipt_target_reappeared"; readonly TARGET_ANCHOR_MISSING: "target_anchor_missing"; readonly INSERT_REQUIRES_EMPTY_VISIBLE_BASELINE: "insert_requires_empty_visible_baseline"; readonly VISIBLE_GUARD_MISMATCH: "visible_guard_mismatch"; readonly CANDIDATE_GUARD_MISMATCH: "candidate_guard_mismatch"; readonly REPAIR_GUARD_MISMATCH: "repair_guard_mismatch"; readonly INVALID_DELETION_GUARD: "invalid_deletion_guard"; readonly POSTCONDITION_HASH_MISMATCH: "postcondition_hash_mismatch"; readonly EFFECT_PAYLOAD_TOO_LARGE: "effect_payload_too_large"; }; export type GoogleSheetsApiEffectReason = (typeof GOOGLE_SHEETS_API_EFFECT_REASONS)[keyof typeof GOOGLE_SHEETS_API_EFFECT_REASONS]; /** Deletion-kind projection restriction reasons use the effect kind prefix. */ export declare function fullRowDeletionReason(effectKind: string): string; //# sourceMappingURL=constants.d.ts.map