{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://mechassure.org/schemas/mechassure-bundle.schema.json",
  "title": "MECHASSURE Insurer Evidence Bundle",
  "type": "object",
  "required": ["bundle_id", "profile", "base_profile", "artifacts", "bundle_hash"],
  "properties": {
    "bundle_id": { "type": "string" },
    "profile": { "const": "mechassure-ieb-0.1" },
    "base_profile": { "type": "string" },
    "standard_family": { "type": "array", "items": { "type": "string" } },
    "matter_type": { "type": "string" },
    "insurance_context": {
      "type": "object",
      "properties": {
        "line_of_business": { "type": "string" },
        "review_stage": { "type": "string", "enum": ["underwriting", "renewal", "claims", "audit"] },
        "coverage_question": { "type": "string" },
        "coverage_position": { "type": "string", "enum": ["not_determined", "supported", "supported_with_caveats", "unsupported"] }
      }
    },
    "artifacts": {
      "type": "array",
      "items": {
        "type": "object",
        "required": ["path", "type", "required"],
        "properties": {
          "path": { "type": "string" },
          "type": { "type": "string" },
          "required": { "type": "boolean" },
          "hash": { "type": "string", "pattern": "^sha256:" }
        }
      }
    },
    "bundle_hash": { "type": "string", "pattern": "^sha256:" }
  }
}
