{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/tektolo-com/json-schema/tektolo-com-property-turnover-quick-estimate-paid-response-schema.json",
  "title": "PropertyTurnoverQuickEstimatePaidResponse",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/tektolo-com-openapi.json#/components/schemas/PropertyTurnoverQuickEstimatePaidResponse",
  "properties": {
    "run": {
      "$ref": "#/$defs/RunInfo"
    },
    "client_refs": {
      "additionalProperties": true,
      "type": "object",
      "title": "Client Refs",
      "default": {}
    },
    "input_hash": {
      "type": "string",
      "title": "Input Hash",
      "description": "Hash of the question the rules answered: the request, or when free text was read by AI, the request with the read findings (reading.findings) in its place."
    },
    "request_hash": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Request Hash",
      "description": "Hash of the request as sent; equal to input_hash when nothing was read by AI."
    },
    "result_hash": {
      "type": "string",
      "title": "Result Hash"
    },
    "review": {
      "$ref": "#/$defs/Review",
      "description": "draft while an AI-read finding is unconfirmed (show reading.findings first)."
    },
    "reading": {
      "anyOf": [
        {
          "$ref": "#/$defs/Reading"
        },
        {
          "type": "null"
        }
      ],
      "description": "What was read by AI for this answer: every finding the rules answered, in the shape scope accepts. Confirm them and send them to scope with confirmed: true."
    },
    "deprecation": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/Deprecation"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Deprecation",
      "description": "Parts of the request answered for now and refused after `until`, with what to send instead (e.g. findings[].description: send codes)."
    },
    "signature": {
      "anyOf": [
        {
          "$ref": "#/$defs/ResultSignature"
        },
        {
          "type": "null"
        }
      ]
    },
    "result": {
      "$ref": "#/$defs/ScopeResult"
    },
    "payment": {
      "$ref": "#/$defs/PaymentInfo"
    }
  },
  "type": "object",
  "required": [
    "run",
    "input_hash",
    "result_hash",
    "result",
    "payment"
  ],
  "$defs": {
    "CostRange": {
      "properties": {
        "low": {
          "type": "string",
          "title": "Low"
        },
        "expected": {
          "type": "string",
          "title": "Expected"
        },
        "high": {
          "type": "string",
          "title": "High"
        }
      },
      "type": "object",
      "required": [
        "low",
        "expected",
        "high"
      ],
      "title": "CostRange",
      "description": "A low / expected / high estimate. Invariant: low <= expected <= high."
    },
    "Deprecation": {
      "properties": {
        "field": {
          "type": "string",
          "title": "Field",
          "description": "The request field, e.g. findings[].description."
        },
        "until": {
          "type": "string",
          "format": "date",
          "title": "Until",
          "description": "Accepted until this day; refused after it."
        },
        "use": {
          "type": "string",
          "title": "Use",
          "description": "What to send instead."
        }
      },
      "type": "object",
      "required": [
        "field",
        "until",
        "use"
      ],
      "title": "Deprecation",
      "description": "A part of the request that is still answered and will stop being accepted."
    },
    "Extent": {
      "type": "string",
      "enum": [
        "spot",
        "partial",
        "full"
      ],
      "title": "Extent"
    },
    "FindingResolution": {
      "properties": {
        "finding_id": {
          "type": "string",
          "title": "Finding Id"
        },
        "resolution": {
          "type": "string",
          "enum": [
            "exact",
            "alias",
            "ai",
            "unmapped",
            "not_billed"
          ],
          "title": "Resolution",
          "description": "exact: a taxonomy code was given. alias: the description matched an alias. ai: an AI reader chose the code from free text (see confidence, model; needs_review). unmapped: nothing matched (a manual-quote line). not_billed: the description says there is no work ('no mold', 'faucet not leaking', 'fixed by tenant'), or names no condition at all (a heading, a date, a signature, a year built); no lines, no refer-out; the issue it names is in suggestions and the reason in not_billed_reason."
        },
        "not_billed_reason": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "none",
                "ok",
                "done",
                "no_condition"
              ]
            },
            {
              "type": "null"
            }
          ],
          "title": "Not Billed Reason",
          "description": "resolution 'not_billed' only. none: says there is none ('no mold', 'mold: none'); ok: says it works or is fine; done: says it was already fixed or done; no_condition: names no condition, only a heading, small talk, a signature or the year built ('Unit 4B - Move-out inspection', 'Built 1972'), see match_note (contract 0.13.0, additive)."
        },
        "code": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Code"
        },
        "issue_name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Issue Name",
          "description": "Readable name of `code`."
        },
        "text": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Text",
          "description": "The finding as given (description, else code), for tracing."
        },
        "location": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Location",
          "description": "Where, as shown on the lines."
        },
        "match_note": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Match Note",
          "description": "Set when the match left a fixture word unexplained: check this finding."
        },
        "uncertain": {
          "type": "boolean",
          "title": "Uncertain",
          "description": "The description hedges ('mold?', 'maybe', 'possible'). Refer-outs from uncertain findings are check-first: they add a warning instead of holding phases.",
          "default": false
        },
        "extent": {
          "anyOf": [
            {
              "$ref": "#/$defs/Extent"
            },
            {
              "type": "null"
            }
          ]
        },
        "suggested_codes": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Suggested Codes",
          "default": []
        },
        "suggestions": {
          "items": {
            "$ref": "#/$defs/Suggestion"
          },
          "type": "array",
          "title": "Suggestions",
          "description": "Suggested codes with readable names, best first."
        },
        "line_ids": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Line Ids",
          "default": []
        },
        "needs_review": {
          "type": "boolean",
          "title": "Needs Review",
          "description": "True when software read this finding from free text (resolution 'ai'): check it.",
          "default": false
        },
        "confidence": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
            },
            {
              "type": "null"
            }
          ],
          "title": "Confidence",
          "description": "resolution 'ai' only: the AI reader's confidence, 0 to 1."
        },
        "model": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Model",
          "description": "resolution 'ai' only: the model used."
        },
        "confirmed": {
          "type": "boolean",
          "title": "Confirmed",
          "description": "Read by AI and confirmed by the person (sent with confirmed: true).",
          "default": false
        }
      },
      "type": "object",
      "required": [
        "finding_id",
        "resolution",
        "code",
        "extent"
      ],
      "title": "FindingResolution"
    },
    "PaymentInfo": {
      "properties": {
        "protocol": {
          "type": "string",
          "title": "Protocol",
          "default": "x402"
        },
        "x402_version": {
          "type": "integer",
          "title": "X402 Version",
          "default": 2
        },
        "scheme": {
          "type": "string",
          "title": "Scheme",
          "default": "exact"
        },
        "network": {
          "type": "string",
          "title": "Network"
        },
        "network_name": {
          "type": "string",
          "title": "Network Name"
        },
        "testnet": {
          "type": "boolean",
          "title": "Testnet"
        },
        "asset": {
          "type": "string",
          "title": "Asset"
        },
        "amount_usd": {
          "type": "string",
          "title": "Amount Usd"
        },
        "amount_atomic": {
          "type": "string",
          "title": "Amount Atomic"
        },
        "transaction": {
          "type": "string",
          "title": "Transaction"
        },
        "payer": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Payer"
        }
      },
      "type": "object",
      "required": [
        "network",
        "network_name",
        "testnet",
        "asset",
        "amount_usd",
        "amount_atomic",
        "transaction"
      ],
      "title": "PaymentInfo"
    },
    "Phase": {
      "type": "string",
      "enum": [
        "assess",
        "trash_out",
        "repairs",
        "paint",
        "flooring",
        "appliances",
        "cleaning",
        "punch",
        "rekey"
      ],
      "title": "Phase",
      "description": "Make-ready order. Values sort in sequence order via PHASE_ORDER."
    },
    "PriceBasis": {
      "type": "string",
      "enum": [
        "rate_card",
        "unit_price",
        "labor_derived",
        "placeholder"
      ],
      "title": "PriceBasis"
    },
    "PriceTier": {
      "type": "string",
      "enum": [
        "bulk_contract",
        "pm_vendor",
        "retail_one_off"
      ],
      "title": "PriceTier",
      "description": "Purchasing channel. Library prices are pm_vendor (a PM buying turns from a local vendor)."
    },
    "Priority": {
      "type": "string",
      "enum": [
        "must",
        "should",
        "could"
      ],
      "title": "Priority"
    },
    "Profile": {
      "type": "string",
      "enum": [
        "minimum",
        "standard",
        "premium"
      ],
      "title": "Profile"
    },
    "RateCardUse": {
      "properties": {
        "entry": {
          "type": "integer",
          "title": "Entry",
          "description": "0-based index into the request's rate_card."
        },
        "target": {
          "type": "string",
          "title": "Target",
          "description": "The entry's task_id or trade."
        },
        "lines": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Lines",
          "default": []
        },
        "note": {
          "type": "string",
          "title": "Note"
        }
      },
      "type": "object",
      "required": [
        "entry",
        "target",
        "note"
      ],
      "title": "RateCardUse"
    },
    "Reading": {
      "properties": {
        "id": {
          "type": "string",
          "title": "Id",
          "description": "rd_ and 24 hex characters; the same reading has the same id."
        },
        "kind": {
          "type": "string",
          "enum": [
            "notes",
            "document"
          ],
          "title": "Kind"
        },
        "model": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Model",
          "description": "The model that read it."
        },
        "prompt_version": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Prompt Version"
        },
        "counts": {
          "$ref": "#/$defs/ReadingCounts"
        },
        "findings": {
          "items": {
            "additionalProperties": true,
            "type": "object"
          },
          "type": "array",
          "title": "Findings",
          "description": "Every finding the rules answered, in the shape the rules operation accepts."
        },
        "notes": {
          "items": {
            "$ref": "#/$defs/ReadingNote"
          },
          "type": "array",
          "title": "Notes",
          "description": "What the reading noticed while reading the text."
        }
      },
      "type": "object",
      "required": [
        "id",
        "kind",
        "counts",
        "findings"
      ],
      "title": "Reading",
      "description": "The findings software read from free text or a document for this answer. Send\n``findings`` (edited if need be, each one checked marked ``confirmed: true``) to the rules\noperation to get a verified answer."
    },
    "ReadingCounts": {
      "properties": {
        "total": {
          "type": "integer",
          "title": "Total",
          "description": "Findings in the reading."
        },
        "ai": {
          "type": "integer",
          "title": "Ai",
          "description": "Findings the AI model read (they carry extraction)."
        },
        "parser": {
          "type": "integer",
          "title": "Parser",
          "description": "Findings the deterministic parser and matcher placed, or sent coded."
        },
        "unmatched": {
          "type": "integer",
          "title": "Unmatched",
          "description": "Findings nothing could match (manual-quote lines)."
        }
      },
      "type": "object",
      "required": [
        "total",
        "ai",
        "parser",
        "unmatched"
      ],
      "title": "ReadingCounts"
    },
    "ReadingNote": {
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "warning",
            "assumption"
          ],
          "title": "Kind"
        },
        "code": {
          "type": "string",
          "title": "Code"
        },
        "message": {
          "type": "string",
          "title": "Message"
        },
        "finding_ids": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Finding Ids",
          "default": []
        }
      },
      "type": "object",
      "required": [
        "kind",
        "code",
        "message"
      ],
      "title": "ReadingNote",
      "description": "Something the reading noticed (a range, a room read from the words, a year built)."
    },
    "ReferOutNote": {
      "properties": {
        "id": {
          "type": "string",
          "title": "Id"
        },
        "name": {
          "type": "string",
          "title": "Name"
        },
        "professional": {
          "type": "string",
          "title": "Professional"
        },
        "reason": {
          "type": "string",
          "title": "Reason"
        },
        "kind": {
          "type": "string",
          "enum": [
            "assessment",
            "compliance"
          ],
          "title": "Kind"
        },
        "finding_ids": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Finding Ids"
        },
        "blocks_phases": {
          "items": {
            "$ref": "#/$defs/Phase"
          },
          "type": "array",
          "title": "Blocks Phases"
        },
        "sources": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Sources"
        },
        "unconfirmed": {
          "type": "boolean",
          "title": "Unconfirmed",
          "description": "No finding confirms it: every finding that raised it was hedged ('maybe', '?'), named the hazard only in its words (description, notes or location label) rather than through its issue code, or stated an older year built than the request. Check first; no phase is held until the condition is confirmed (see warnings).",
          "default": false
        }
      },
      "type": "object",
      "required": [
        "id",
        "name",
        "professional",
        "reason",
        "kind",
        "finding_ids",
        "blocks_phases",
        "sources"
      ],
      "title": "ReferOutNote"
    },
    "Region": {
      "properties": {
        "zip3": {
          "type": "string",
          "title": "Zip3"
        },
        "basis": {
          "type": "string",
          "enum": [
            "metro",
            "nonmetro",
            "national"
          ],
          "title": "Basis"
        },
        "cbsa": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Cbsa"
        },
        "cbsa_name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Cbsa Name"
        },
        "vintage": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Vintage"
        }
      },
      "type": "object",
      "required": [
        "zip3",
        "basis"
      ],
      "title": "Region"
    },
    "Responsibility": {
      "type": "string",
      "enum": [
        "normal_wear",
        "likely_damage",
        "elective",
        "undetermined",
        "mixed"
      ],
      "title": "Responsibility"
    },
    "ResultSignature": {
      "properties": {
        "jws": {
          "type": "string",
          "title": "Jws",
          "description": "Compact JWS (RFC 7515), alg EdDSA (Ed25519, RFC 8037), typ tektolo-provenance+jws. Check it against the keys at /.well-known/tektolo-signing-keys.json on the site you called, never against a key a document points to."
        },
        "payload": {
          "$ref": "#/$defs/ResultSignaturePayload",
          "description": "The JWS payload, decoded, for reading."
        },
        "verify_code": {
          "type": "string",
          "title": "Verify Code",
          "description": "A short code that proves the result came from Tektolo without carrying its figures. Safe to print on a document; the payload above is not meant to be shared."
        },
        "verify_url": {
          "type": "string",
          "title": "Verify Url",
          "description": "Where anyone can check the code."
        }
      },
      "type": "object",
      "required": [
        "jws",
        "payload",
        "verify_code",
        "verify_url"
      ],
      "title": "ResultSignature",
      "description": "Tektolo's signature over where this result came from (docs/verify.md)."
    },
    "ResultSignaturePayload": {
      "properties": {
        "v": {
          "type": "integer",
          "title": "V",
          "description": "Payload format version (1)."
        },
        "kid": {
          "type": "string",
          "title": "Kid",
          "description": "Id of the key that signed it (see the signing keys file)."
        },
        "capability": {
          "type": "string",
          "title": "Capability"
        },
        "operation": {
          "type": "string",
          "title": "Operation"
        },
        "ruleset_version": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Ruleset Version"
        },
        "ruleset_hash": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Ruleset Hash"
        },
        "engine_version": {
          "type": "string",
          "title": "Engine Version"
        },
        "result_hash": {
          "type": "string",
          "title": "Result Hash",
          "description": "The envelope's result_hash."
        },
        "issued_at": {
          "type": "string",
          "title": "Issued At",
          "description": "When the result was computed (UTC, RFC 3339)."
        }
      },
      "type": "object",
      "required": [
        "v",
        "kid",
        "capability",
        "operation",
        "ruleset_version",
        "ruleset_hash",
        "engine_version",
        "result_hash",
        "issued_at"
      ],
      "title": "ResultSignaturePayload",
      "description": "The signed statement (the JWS payload, decoded). Canonical JSON: sorted keys, compact."
    },
    "Review": {
      "properties": {
        "status": {
          "type": "string",
          "enum": [
            "draft",
            "verified"
          ],
          "title": "Status",
          "description": "draft: some findings were read by AI and nobody has confirmed them; show the person reading.findings before quoting a number. verified: no finding rests on an unconfirmed AI reading.",
          "default": "verified"
        },
        "ai_read": {
          "type": "integer",
          "title": "Ai Read",
          "description": "Findings in this answer read by AI and not yet confirmed.",
          "default": 0
        },
        "reading_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Reading Id",
          "description": "The reading's id, when one was made."
        },
        "note": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Note",
          "description": "Set when an AI reading was asked for but not made (capped or unavailable)."
        }
      },
      "type": "object",
      "title": "Review",
      "description": "How far the answer can be relied on."
    },
    "RunInfo": {
      "properties": {
        "id": {
          "type": "string",
          "title": "Id"
        },
        "capability": {
          "type": "string",
          "title": "Capability"
        },
        "operation": {
          "type": "string",
          "title": "Operation"
        },
        "contract_version": {
          "type": "string",
          "title": "Contract Version"
        },
        "engine_version": {
          "type": "string",
          "title": "Engine Version"
        },
        "ruleset_version": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Ruleset Version"
        },
        "ruleset_hash": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Ruleset Hash"
        },
        "received_at": {
          "type": "string",
          "format": "date-time",
          "title": "Received At"
        },
        "duration_ms": {
          "type": "integer",
          "title": "Duration Ms"
        }
      },
      "type": "object",
      "required": [
        "id",
        "capability",
        "operation",
        "contract_version",
        "engine_version",
        "ruleset_version",
        "ruleset_hash",
        "received_at",
        "duration_ms"
      ],
      "title": "RunInfo"
    },
    "ScopeLine": {
      "properties": {
        "line_id": {
          "type": "string",
          "title": "Line Id"
        },
        "task_id": {
          "type": "string",
          "title": "Task Id"
        },
        "name": {
          "type": "string",
          "title": "Name"
        },
        "trade": {
          "$ref": "#/$defs/Trade"
        },
        "phase": {
          "$ref": "#/$defs/Phase"
        },
        "priority": {
          "$ref": "#/$defs/Priority"
        },
        "location": {
          "type": "string",
          "title": "Location"
        },
        "finding_ids": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Finding Ids"
        },
        "quantity": {
          "type": "string",
          "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
          "title": "Quantity"
        },
        "uom": {
          "$ref": "#/$defs/Uom"
        },
        "quantity_source": {
          "type": "string",
          "enum": [
            "given",
            "converted",
            "derived",
            "fixed"
          ],
          "title": "Quantity Source"
        },
        "price_basis": {
          "$ref": "#/$defs/PriceBasis"
        },
        "unit_price": {
          "$ref": "#/$defs/CostRange"
        },
        "cost": {
          "$ref": "#/$defs/CostRange"
        },
        "confidence": {
          "type": "string",
          "enum": [
            "sourced",
            "industry_typical",
            "assumed"
          ],
          "title": "Confidence"
        },
        "responsibility_hint": {
          "$ref": "#/$defs/Responsibility"
        },
        "responsibility_by_finding": {
          "additionalProperties": {
            "$ref": "#/$defs/Responsibility"
          },
          "type": "object",
          "title": "Responsibility By Finding",
          "description": "Set when the hint is 'mixed': the hint of each finding the line carries."
        },
        "allowance": {
          "anyOf": [
            {
              "$ref": "#/$defs/CostRange"
            },
            {
              "type": "null"
            }
          ],
          "description": "Quote-required lines only: a non-binding budget range. NOT included in any total; summed separately in totals.allowances."
        },
        "refer_out": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Refer Out"
        },
        "decision": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "approve",
                "decline",
                "defer"
              ]
            },
            {
              "type": "null"
            }
          ],
          "title": "Decision"
        },
        "vendor_note": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Vendor Note"
        },
        "rule_ids": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Rule Ids"
        },
        "to_confirm": {
          "type": "boolean",
          "title": "To Confirm",
          "description": "Every finding behind this line is uncertain, or it is a check-first assessment from the safety net: priced, but not in must/should/could, subtotal or total (see totals.to_confirm).",
          "default": false
        },
        "needs_review": {
          "type": "boolean",
          "title": "Needs Review",
          "description": "A finding behind this line was read by AI from free text: check it.",
          "default": false
        }
      },
      "type": "object",
      "required": [
        "line_id",
        "task_id",
        "name",
        "trade",
        "phase",
        "priority",
        "location",
        "finding_ids",
        "quantity",
        "uom",
        "quantity_source",
        "price_basis",
        "unit_price",
        "cost",
        "confidence",
        "responsibility_hint",
        "rule_ids"
      ],
      "title": "ScopeLine"
    },
    "ScopeResult": {
      "properties": {
        "summary": {
          "type": "string",
          "title": "Summary"
        },
        "disclaimer": {
          "type": "string",
          "title": "Disclaimer"
        },
        "warnings": {
          "items": {
            "$ref": "#/$defs/tektolo_property_turnover__models__Note"
          },
          "type": "array",
          "title": "Warnings"
        },
        "totals": {
          "$ref": "#/$defs/tektolo_property_turnover__models__Totals"
        },
        "refer_outs": {
          "items": {
            "$ref": "#/$defs/ReferOutNote"
          },
          "type": "array",
          "title": "Refer Outs"
        },
        "trade_scopes": {
          "items": {
            "$ref": "#/$defs/TradeScope"
          },
          "type": "array",
          "title": "Trade Scopes"
        },
        "lines": {
          "items": {
            "$ref": "#/$defs/ScopeLine"
          },
          "type": "array",
          "title": "Lines"
        },
        "lines_omitted": {
          "type": "integer",
          "title": "Lines Omitted",
          "description": "Lines left out in summary detail."
        },
        "omitted_note": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Omitted Note",
          "description": "Summary detail: what the omitted lines are (routine turn tasks) and their cost."
        },
        "findings": {
          "items": {
            "$ref": "#/$defs/FindingResolution"
          },
          "type": "array",
          "title": "Findings"
        },
        "assumptions": {
          "items": {
            "$ref": "#/$defs/tektolo_property_turnover__models__Note"
          },
          "type": "array",
          "title": "Assumptions"
        },
        "unknowns": {
          "items": {
            "$ref": "#/$defs/tektolo_property_turnover__models__Note"
          },
          "type": "array",
          "title": "Unknowns"
        },
        "rate_card_applied": {
          "items": {
            "$ref": "#/$defs/RateCardUse"
          },
          "type": "array",
          "title": "Rate Card Applied",
          "description": "Rate card entries that changed a price."
        },
        "rate_card_ignored": {
          "items": {
            "$ref": "#/$defs/RateCardUse"
          },
          "type": "array",
          "title": "Rate Card Ignored",
          "description": "Rate card entries that changed nothing, with why."
        },
        "detail": {
          "type": "string",
          "enum": [
            "summary",
            "full"
          ],
          "title": "Detail"
        },
        "region": {
          "$ref": "#/$defs/Region"
        },
        "profile": {
          "$ref": "#/$defs/Profile"
        },
        "price_tier": {
          "$ref": "#/$defs/PriceTier",
          "default": "pm_vendor"
        },
        "provenance": {
          "$ref": "#/$defs/tektolo_property_turnover__models__Provenance"
        }
      },
      "type": "object",
      "required": [
        "summary",
        "disclaimer",
        "warnings",
        "totals",
        "refer_outs",
        "trade_scopes",
        "lines",
        "lines_omitted",
        "findings",
        "assumptions",
        "unknowns",
        "detail",
        "region",
        "profile",
        "provenance"
      ],
      "title": "ScopeResult",
      "description": "Field order puts the answer first (summary, disclaimer, totals, refer-outs, vendor\nscopes), because agents and truncating clients read from the top."
    },
    "SourceRef": {
      "properties": {
        "id": {
          "type": "string",
          "title": "Id"
        },
        "title": {
          "type": "string",
          "title": "Title"
        },
        "url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Url"
        },
        "accessed": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "title": "Accessed",
          "description": "When the source was last read."
        }
      },
      "type": "object",
      "required": [
        "id",
        "title"
      ],
      "title": "SourceRef"
    },
    "Suggestion": {
      "properties": {
        "code": {
          "type": "string",
          "title": "Code"
        },
        "name": {
          "type": "string",
          "title": "Name"
        }
      },
      "type": "object",
      "required": [
        "code",
        "name"
      ],
      "title": "Suggestion"
    },
    "Trade": {
      "type": "string",
      "enum": [
        "hauling",
        "handyman",
        "drywall",
        "painter",
        "flooring",
        "carpet_cleaning",
        "cleaning",
        "appliance",
        "plumber",
        "electrician",
        "hvac",
        "locksmith",
        "pest_control",
        "landscaping",
        "window_glass",
        "environmental",
        "structural"
      ],
      "title": "Trade"
    },
    "TradeScope": {
      "properties": {
        "trade": {
          "$ref": "#/$defs/Trade"
        },
        "vendor": {
          "anyOf": [
            {
              "$ref": "#/$defs/Vendor"
            },
            {
              "type": "null"
            }
          ]
        },
        "phase": {
          "$ref": "#/$defs/Phase"
        },
        "line_ids": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Line Ids"
        },
        "lines_cost": {
          "$ref": "#/$defs/CostRange"
        },
        "visit_charges": {
          "$ref": "#/$defs/CostRange"
        },
        "total": {
          "$ref": "#/$defs/CostRange"
        }
      },
      "type": "object",
      "required": [
        "trade",
        "vendor",
        "phase",
        "line_ids",
        "lines_cost",
        "visit_charges",
        "total"
      ],
      "title": "TradeScope"
    },
    "Uom": {
      "type": "string",
      "enum": [
        "each",
        "sq_ft",
        "sq_ft_floor",
        "sq_yd",
        "linear_ft",
        "room",
        "unit",
        "bedroom",
        "bathroom",
        "hour",
        "cu_yd",
        "visit"
      ],
      "title": "Uom"
    },
    "Vendor": {
      "properties": {
        "name": {
          "type": "string",
          "maxLength": 120,
          "title": "Name"
        },
        "contact": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 200
            },
            {
              "type": "null"
            }
          ],
          "title": "Contact"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "name"
      ],
      "title": "Vendor"
    },
    "tektolo_property_turnover__models__Note": {
      "properties": {
        "code": {
          "type": "string",
          "title": "Code"
        },
        "message": {
          "type": "string",
          "title": "Message"
        },
        "finding_ids": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Finding Ids",
          "default": []
        },
        "line_ids": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Line Ids",
          "default": []
        }
      },
      "type": "object",
      "required": [
        "code",
        "message"
      ],
      "title": "Note"
    },
    "tektolo_property_turnover__models__Provenance": {
      "properties": {
        "ruleset_id": {
          "type": "string",
          "title": "Ruleset Id"
        },
        "ruleset_version": {
          "type": "string",
          "title": "Ruleset Version"
        },
        "ruleset_hash": {
          "type": "string",
          "title": "Ruleset Hash"
        },
        "sources": {
          "items": {
            "$ref": "#/$defs/SourceRef"
          },
          "type": "array",
          "title": "Sources"
        },
        "rules_as_of": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "title": "Rules As Of",
          "description": "The oldest reading of the sources behind the legal items in this result (refer-outs and state mandates): the rules are as of this date. None when the result states no legal rule."
        }
      },
      "type": "object",
      "required": [
        "ruleset_id",
        "ruleset_version",
        "ruleset_hash",
        "sources"
      ],
      "title": "Provenance"
    },
    "tektolo_property_turnover__models__Totals": {
      "properties": {
        "note": {
          "type": "string",
          "title": "Note",
          "description": "How the totals add up.",
          "default": "must, should and could are work lines only. visit_charges (minimum call-out and trip fees, once per trade) are added on top: subtotal = must + should + could + visit_charges; total = subtotal + tax. allowances and to_confirm (uncertain items) are outside the total."
        },
        "must": {
          "$ref": "#/$defs/CostRange"
        },
        "should": {
          "$ref": "#/$defs/CostRange"
        },
        "could": {
          "$ref": "#/$defs/CostRange"
        },
        "visit_charges": {
          "$ref": "#/$defs/CostRange"
        },
        "subtotal": {
          "$ref": "#/$defs/CostRange"
        },
        "tax": {
          "$ref": "#/$defs/CostRange"
        },
        "total": {
          "$ref": "#/$defs/CostRange"
        },
        "approved": {
          "anyOf": [
            {
              "$ref": "#/$defs/CostRange"
            },
            {
              "type": "null"
            }
          ]
        },
        "to_confirm": {
          "$ref": "#/$defs/CostRange",
          "description": "Lines from uncertain findings ('maybe', '?', 'possible') and safety items read from plain words (the refer-out safety net): priced, but outside every total until confirmed on site. Those lines carry to_confirm: true (contract 0.7.0)."
        },
        "allowances": {
          "$ref": "#/$defs/CostRange",
          "description": "Budget allowance for quote-required lines (refer-outs, manual quotes). Shown outside the totals: subtotal and total never include it."
        }
      },
      "type": "object",
      "required": [
        "must",
        "should",
        "could",
        "visit_charges",
        "subtotal",
        "tax",
        "total"
      ],
      "title": "Totals"
    }
  }
}