{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://artifacts.apis.io/hemrock-com/json-schema/hemrock-com-waterfall-compute-request-schema.json",
  "title": "WaterfallComputeRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/hemrock-com-openapi.json#/components/schemas/WaterfallComputeRequest",
  "type": "object",
  "properties": {
    "exitValuation": {
      "type": "number",
      "minimum": 0,
      "maximum": 1000000000000000
    },
    "model": {
      "type": "object",
      "properties": {
        "common": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "maxLength": 200,
                "minLength": 1
              },
              "name": {
                "type": "string",
                "maxLength": 200
              },
              "shares": {
                "type": "number",
                "minimum": 0,
                "maximum": 1000000000000000
              },
              "invested": {
                "type": "number",
                "minimum": 0,
                "maximum": 1000000000000000
              }
            },
            "required": [
              "id",
              "name",
              "shares"
            ],
            "additionalProperties": false
          },
          "maxItems": 500
        },
        "preferred": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "maxLength": 200,
                "minLength": 1
              },
              "name": {
                "type": "string",
                "maxLength": 200
              },
              "holders": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 200,
                      "minLength": 1
                    },
                    "name": {
                      "type": "string",
                      "maxLength": 200
                    },
                    "shares": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 1000000000000000
                    },
                    "invested": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 1000000000000000
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "shares",
                    "invested"
                  ],
                  "additionalProperties": false
                },
                "maxItems": 500
              },
              "multiple": {
                "type": "number",
                "minimum": 0,
                "maximum": 1000000000000000
              },
              "participation": {
                "type": "string",
                "enum": [
                  "none",
                  "full",
                  "capped"
                ]
              },
              "participationCap": {
                "type": "number",
                "minimum": 0,
                "maximum": 1000000000000000
              },
              "seniority": {
                "type": "number"
              },
              "conversionRatio": {
                "type": "number",
                "minimum": 0,
                "maximum": 1000000000000000,
                "exclusiveMinimum": 0
              },
              "investmentDate": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
              },
              "dividendStart": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
              },
              "dividendRate": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "dividendCumulative": {
                "type": "boolean"
              }
            },
            "required": [
              "id",
              "name",
              "holders",
              "seniority"
            ],
            "additionalProperties": false
          },
          "maxItems": 20
        },
        "options": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "maxLength": 200,
                "minLength": 1
              },
              "name": {
                "type": "string",
                "maxLength": 200
              },
              "shares": {
                "type": "number",
                "minimum": 0,
                "maximum": 1000000000000000
              },
              "strike": {
                "type": "number",
                "minimum": 0,
                "maximum": 1000000000000000
              },
              "vestedFraction": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              }
            },
            "required": [
              "id",
              "name",
              "shares",
              "strike"
            ],
            "additionalProperties": false
          },
          "maxItems": 500
        },
        "warrants": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "maxLength": 200,
                "minLength": 1
              },
              "name": {
                "type": "string",
                "maxLength": 200
              },
              "shares": {
                "type": "number",
                "minimum": 0,
                "maximum": 1000000000000000
              },
              "strike": {
                "type": "number",
                "minimum": 0,
                "maximum": 1000000000000000
              }
            },
            "required": [
              "id",
              "name",
              "shares",
              "strike"
            ],
            "additionalProperties": false
          },
          "maxItems": 500
        },
        "unissuedPool": {
          "type": "object",
          "properties": {
            "shares": {
              "type": "number",
              "minimum": 0,
              "maximum": 1000000000000000
            },
            "treatment": {
              "type": "string",
              "const": "cancel"
            }
          },
          "required": [
            "shares"
          ],
          "additionalProperties": false
        },
        "convertibles": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "maxLength": 200,
                "minLength": 1
              },
              "name": {
                "type": "string",
                "maxLength": 200
              },
              "kind": {
                "type": "string",
                "enum": [
                  "pre-safe",
                  "post-safe",
                  "note"
                ]
              },
              "principal": {
                "type": "number",
                "minimum": 0,
                "maximum": 1000000000000000
              },
              "discount": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "cap": {
                "type": "number",
                "minimum": 0,
                "maximum": 1000000000000000,
                "exclusiveMinimum": 0
              },
              "accruedInterest": {
                "type": "number",
                "minimum": 0,
                "maximum": 1000000000000000
              },
              "premiumMultiple": {
                "type": "number",
                "minimum": 0,
                "maximum": 1000000000000000
              },
              "cashOutAs": {
                "type": "string",
                "enum": [
                  "debt",
                  "equity"
                ]
              },
              "seniority": {
                "type": "number"
              },
              "cashOutSeniority": {
                "type": "string",
                "enum": [
                  "senior",
                  "pari-passu"
                ]
              }
            },
            "required": [
              "id",
              "name",
              "kind",
              "principal"
            ],
            "additionalProperties": false
          },
          "maxItems": 100
        },
        "debt": {
          "type": "number",
          "minimum": 0,
          "maximum": 1000000000000000
        },
        "transactionExpenses": {
          "type": "number",
          "minimum": 0,
          "maximum": 1000000000000000
        }
      },
      "required": [
        "common",
        "preferred"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "exitValuation",
    "model"
  ],
  "additionalProperties": false
}