{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/chartercaptain-com/json-schema/chartercaptain-com-document-status-schema.json",
  "title": "DocumentStatus",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/chartercaptain-com-contracts-api-openapi.yml#/components/schemas/DocumentStatus",
  "type": "object",
  "required": [
    "rentalId",
    "charterAgreement",
    "waivers"
  ],
  "properties": {
    "rentalId": {
      "type": "string"
    },
    "charterAgreement": {
      "type": "object",
      "required": [
        "required",
        "signed"
      ],
      "properties": {
        "required": {
          "type": "boolean"
        },
        "signed": {
          "type": "boolean"
        },
        "signerName": {
          "type": [
            "string",
            "null"
          ]
        },
        "signerEmail": {
          "type": [
            "string",
            "null"
          ],
          "format": "email"
        },
        "signedAt": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        }
      }
    },
    "waivers": {
      "type": "object",
      "required": [
        "total",
        "signed",
        "pending",
        "guests"
      ],
      "properties": {
        "total": {
          "type": "integer"
        },
        "signed": {
          "type": "integer"
        },
        "pending": {
          "type": "integer"
        },
        "guests": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Guest"
          }
        }
      }
    }
  },
  "$defs": {
    "Guest": {
      "type": "object",
      "required": [
        "id",
        "rentalId",
        "firstName",
        "lastName",
        "email",
        "isCharterer",
        "waiverStatus"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "rentalId": {
          "type": "string"
        },
        "waiverTemplateId": {
          "type": [
            "string",
            "null"
          ]
        },
        "firstName": {
          "type": "string"
        },
        "lastName": {
          "type": "string"
        },
        "email": {
          "type": "string",
          "format": "email"
        },
        "phone": {
          "type": [
            "string",
            "null"
          ]
        },
        "isCharterer": {
          "type": "boolean"
        },
        "waiverStatus": {
          "type": "string",
          "enum": [
            "PENDING",
            "SENT",
            "SIGNED"
          ]
        },
        "waiverSentAt": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "waiverSignedAt": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "signatureData": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    }
  }
}