cadrumo.adapters.outbound.google.calc_sheets_pull_records module¶
Typed records exchanged by the Google Sheets calculation pull adapter.
- class ValueRange[source]¶
Bases:
TypedDictA single batch-get value-range entry from the Sheets API.
Cell values are
object: the API returns whichever JSON scalar the cell holds, and callers must narrow before use. Every key is optional because Sheets omits an empty range’svaluesrather than sending an empty list.
- as_value_range(entry)[source]¶
Translate one Sheets
valueRangesentry into this adapter’s record.The vendor schema pins
majorDimensionto aLiteraland types cell values asAny; this record widens the former tostrand narrows the latter toobject, so the two are not mutually assignable and the entry is copied key by key.- Return type:
ValueRange
- Parameters:
entry (SheetsValueRange)
- class OperatorEdit(**data)[source]¶
Bases:
BaseModelOne operator-edited cell value.
- Parameters:
data (Any)
- casilla_id: CasillaId¶
- display_number: str¶
- label: str¶
- value: Decimal | str | bool | None¶
- class BindingEdit(**data)[source]¶
Bases:
BaseModelOne operator-edited binding cell value (numeric or enum).
- Parameters:
data (Any)
- binding: BindingId¶
- value: Decimal | str | None¶
- class RelationEdit(**data)[source]¶
Bases:
BaseModelOne pre-resolved cross-revision relation value mirrored in Tarifas.
- Parameters:
data (Any)
- relation: RelationId¶
- value: Decimal | None¶
- provenance: SheetRelationProvenanceValue | None¶
- source_modelo: ModeloId | None¶
- source_filing_year: FilingYear | None¶
- source_periods: tuple[str, ...]¶
- source_casilla_ids: tuple[CasillaId, ...]¶
- legal_refs: tuple[LegalRefId, ...]¶
- source_refs: tuple[SourceRefId, ...]¶
- resolved_at: datetime | None¶
- relation_edit_payload(edit)[source]¶
Project one relation edit into its operator-facing payload row.
- Return type:
- Parameters:
edit (RelationEdit)
- class RowSetCellEdit(**data)[source]¶
Bases:
BaseModelOne operator-edited cell from a Detalle tab row-set.
- Parameters:
data (Any)
- binding: BindingId¶
- row_index: int¶
- value: Decimal | str | None¶
- class RowSetEdit(**data)[source]¶
Bases:
BaseModelAll operator-supplied detail rows for one row-set grouping.
- Parameters:
data (Any)
- grouping: str¶
- cells: tuple[RowSetCellEdit, ...]¶
- class PullMetadata(**data)[source]¶
Bases:
BaseModelWorkbook identity metadata recovered from developer metadata.
- Parameters:
data (Any)
- modelo_id: str¶
- revision_id: RevisionId¶
- filing_year: int¶
- period: str¶
- engine_version: str¶
- registry_sha: str¶
- exported_at: str | None¶
- class MetadataMatchState(*values)[source]¶
Bases:
StrEnumRegistry-SHA and stamp alignment result for a pulled workbook.
- MATCHES¶
- STALE¶
- MISSING¶
- class PullResult(**data)[source]¶
Bases:
BaseModelOutcome of one Google Sheets pull cycle.
- Parameters:
data (Any)
- spreadsheet_id: str¶
- operator_edits: tuple[OperatorEdit, ...]¶
- binding_edits: tuple[BindingEdit, ...]¶
- relation_edits: tuple[RelationEdit, ...]¶
- row_set_edits: tuple[RowSetEdit, ...]¶
- metadata: PullMetadata¶
- metadata_match: MetadataMatchState¶
- cells_read: NonNegativeInt¶