{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/infinihash-com/json-schema/infinihash-com-signoff-state-schema.json",
  "title": "SignoffState",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/infinihash-com-approvals-api-openapi.yml#/components/schemas/SignoffState",
  "type": "object",
  "required": [
    "line1",
    "line2",
    "bothApproved",
    "status"
  ],
  "properties": {
    "line1": {
      "allOf": [
        {
          "$ref": "#/$defs/ApprovalSignoff"
        }
      ]
    },
    "line2": {
      "allOf": [
        {
          "$ref": "#/$defs/ApprovalSignoff"
        }
      ]
    },
    "bothApproved": {
      "type": "boolean"
    },
    "status": {
      "type": "string",
      "description": "Current submission status."
    }
  },
  "$defs": {
    "ApprovalSignoff": {
      "type": "object",
      "required": [
        "id",
        "submissionId",
        "apiKeyId",
        "role",
        "approverName",
        "decision",
        "createdAt"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "submissionId": {
          "type": "string"
        },
        "apiKeyId": {
          "type": "string"
        },
        "role": {
          "type": "string",
          "enum": [
            "line1",
            "line2"
          ]
        },
        "approverName": {
          "type": "string"
        },
        "approverEmail": {
          "type": [
            "string",
            "null"
          ]
        },
        "decision": {
          "type": "string",
          "enum": [
            "approve",
            "reject"
          ]
        },
        "notes": {
          "type": [
            "string",
            "null"
          ]
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        }
      }
    }
  }
}