{
  "schema": "texa.records",
  "version": "1.0",
  "as_at": "2026-09-01",
  "note": "Field definitions for the record supply lines. This is the delivery schema Texa ships against, not a sample of records. Records themselves move only under an agreement with the institution or firm that holds them. Fields marked required must be non-null in every delivered row; a row that fails validation is withheld from the tranche rather than delivered with a gap.",
  "common": {
    "record_id": { "type": "string", "required": true, "note": "Zero-padded, stable across versions. Format TXR-<LINE>-<NNNNNN>." },
    "tranche_id": { "type": "string", "required": true, "note": "The cleared tranche this row was delivered in." },
    "source_ref": { "type": "string", "required": true, "note": "Resolves to the holder agreement covering this row." },
    "holder_kind": { "type": "enum", "required": true, "values": ["institution", "firm", "agency", "publisher", "archive"] },
    "country": { "type": "string", "required": true, "note": "ISO 3166-1 alpha-2." },
    "captured_at": { "type": "date", "required": true, "note": "When the record entered Texa custody, not when the underlying event occurred." },
    "deident_method": { "type": "enum", "required": true, "values": ["source_supervised", "not_applicable"], "note": "source_supervised means de-identification was performed under the holder's supervision before egress. No other value is accepted on a personal-data line." },
    "transform_log_ref": { "type": "string", "required": true, "note": "Resolves to the transformation log covering this row. Every delivered row has one." },
    "ai_training_grant": { "type": "boolean", "required": true },
    "sublicensable": { "type": "boolean", "required": true }
  },
  "lines": {
    "property-records": {
      "record_type": { "type": "enum", "required": true, "values": ["listing", "valuation", "title_history", "tenancy", "completed_sale"] },
      "city": { "type": "string", "required": true },
      "geo_precision": { "type": "enum", "required": true, "values": ["city", "district", "ward", "street"], "note": "Agreed per tranche. Never null and never dropped — the geography is most of the value." },
      "geo_label": { "type": "string", "required": true, "note": "Generalised to geo_precision. Never a full street address on a completed_sale row." },
      "property_type": { "type": "enum", "required": true, "values": ["land", "detached", "semi_detached", "terrace", "flat", "commercial", "mixed_use"] },
      "bedrooms": { "type": "integer", "required": false },
      "floor_area_sqm": { "type": "number", "required": false },
      "tenure": { "type": "enum", "required": false, "values": ["freehold", "leasehold", "c_of_o", "governor_consent", "family_land", "unknown"] },
      "price_amount": { "type": "number", "required": false },
      "price_currency": { "type": "string", "required": false, "note": "ISO 4217. Coerced at clean; original string retained in the transform log." },
      "price_basis": { "type": "enum", "required": false, "values": ["asking", "achieved", "valuation", "annual_rent"] },
      "event_date": { "type": "date", "required": false },
      "party_identities": { "type": "null", "required": true, "note": "Always null. Buyer and seller identities are removed before delivery and are not held in escrow." }
    },
    "institutional-records": {
      "record_type": { "type": "enum", "required": true, "values": ["transaction", "statement_line", "ledger_entry"] },
      "subject_key": { "type": "string", "required": true, "note": "A per-tranche pseudonymous key generated by the institution. Not reversible by Texa and not stable across tranches." },
      "amount": { "type": "number", "required": true },
      "currency": { "type": "string", "required": true, "note": "ISO 4217." },
      "direction": { "type": "enum", "required": true, "values": ["credit", "debit"] },
      "channel": { "type": "enum", "required": false, "values": ["branch", "atm", "pos", "ussd", "mobile_app", "web", "agent", "transfer"] },
      "merchant_category": { "type": "string", "required": false },
      "occurred_at": { "type": "datetime", "required": true, "note": "Truncated to the precision agreed in the de-identification schema." },
      "account_identifier": { "type": "null", "required": true, "note": "Always null. Account numbers, credentials and authentication material are never received, never held and never delivered." }
    },
    "document-corpora": {
      "document_id": { "type": "string", "required": true },
      "page_no": { "type": "integer", "required": true },
      "doc_class": { "type": "enum", "required": false, "values": ["contract", "correspondence", "form", "invoice", "manual", "report", "certificate", "register", "other"] },
      "language": { "type": "string", "required": true, "note": "Semicolon separated where a page is bilingual." },
      "dpi": { "type": "integer", "required": true, "note": "400 on every delivered page." },
      "master_format": { "type": "enum", "required": true, "values": ["tiff"] },
      "has_handwriting": { "type": "boolean", "required": true },
      "has_stamp": { "type": "boolean", "required": true },
      "has_table": { "type": "boolean", "required": true },
      "degradation": { "type": "array", "required": false, "values": ["photocopy", "fold", "stain", "fade", "punch_hole", "tear", "skew_corrected"], "note": "Recorded rather than removed. For a document model the degradation is training signal." },
      "redaction_applied": { "type": "boolean", "required": true, "note": "True where the holder redacted at source before scanning. Texa does not redact after the fact." }
    }
  }
}
