{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/capepartners-fr/json-schema/capepartners-fr-session-identity-schema.json",
  "title": "SessionIdentity",
  "x-generated": "2026-10-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/capepartners-fr-identity-api-openapi.yml#/components/schemas/SessionIdentity",
  "type": "object",
  "properties": {
    "session_id": {
      "type": "string",
      "format": "uuid"
    },
    "identity": {
      "$ref": "#/$defs/Identity"
    },
    "user_type": {
      "type": "string",
      "enum": [
        "investor",
        "buyer",
        "opportunity",
        "seller"
      ]
    },
    "buyer": {
      "$ref": "#/$defs/BuyerProfile"
    },
    "seller": {
      "$ref": "#/$defs/SellerProfile"
    },
    "valuation": {
      "$ref": "#/$defs/Valuation"
    }
  },
  "$defs": {
    "BuyerProfile": {
      "type": "object",
      "properties": {
        "sector": {
          "type": "string"
        },
        "check_size_min": {
          "type": "number",
          "description": "Ticket (deal size) min, in EUR millions"
        },
        "check_size_max": {
          "type": "number",
          "description": "Ticket (deal size) max, in EUR millions"
        },
        "geography": {
          "type": "string"
        },
        "growth_target": {
          "type": "number",
          "description": "Target revenue growth, percent"
        },
        "ebitda_target": {
          "type": "number",
          "description": "Target EBITDA margin, percent"
        },
        "solution_1": {
          "type": "string"
        },
        "solution_2": {
          "type": "string"
        },
        "solution_3": {
          "type": "string"
        },
        "data_quality": {
          "type": "integer",
          "description": "Data-quality score /10"
        },
        "missing_fields": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "Identity": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "Contact first/last name"
        },
        "email": {
          "type": "string",
          "format": "email"
        },
        "company": {
          "type": "string"
        },
        "role": {
          "type": "string"
        }
      }
    },
    "SellerProfile": {
      "type": "object",
      "properties": {
        "revenue": {
          "type": "number",
          "description": "Revenue in EUR millions"
        },
        "growth": {
          "type": "number",
          "description": "Revenue growth, percent"
        },
        "ebitda_margin": {
          "type": "number",
          "description": "EBITDA margin, percent"
        },
        "product": {
          "type": "string",
          "description": "Product/solution description"
        },
        "sector": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "data_quality": {
          "type": "integer",
          "description": "Data-quality score /10"
        },
        "missing_fields": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "Valuation": {
      "type": "object",
      "properties": {
        "valuation_revenue": {
          "type": "number",
          "format": "float"
        },
        "valuation_ebitda": {
          "type": "number",
          "format": "float"
        },
        "valuation_dcf": {
          "type": "number",
          "format": "float"
        },
        "valuation_conservative": {
          "type": "number",
          "format": "float"
        },
        "valuation_triangulated": {
          "type": "number",
          "format": "float"
        },
        "status": {
          "type": "string",
          "enum": [
            "ok",
            "no_data"
          ]
        },
        "message": {
          "type": "string"
        }
      }
    }
  }
}