{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/klisten-co-kr/json-schema/klisten-co-kr-escrow-draft-request-schema.json",
  "title": "EscrowDraftRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/klisten-co-kr-agentescrow-api-openapi.yml#/components/schemas/EscrowDraftRequest",
  "type": "object",
  "properties": {
    "payer_id": {
      "type": "string",
      "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,127}$"
    },
    "payee_id": {
      "type": "string",
      "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,127}$"
    },
    "amount_cents": {
      "type": "integer",
      "minimum": 100,
      "maximum": 5000
    },
    "currency": {
      "type": "string",
      "const": "USD"
    },
    "settlement_mode": {
      "type": "string",
      "enum": [
        "test",
        "live"
      ]
    },
    "delivery_digest": {
      "type": "string",
      "pattern": "^sha256:[a-f0-9]{64}$"
    },
    "binding": {
      "type": "object",
      "properties": {
        "repository_id": {
          "type": "string",
          "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]{0,127}$"
        },
        "base_commit": {
          "type": "string",
          "pattern": "^(?:[a-f0-9]{40}|[a-f0-9]{64})$"
        },
        "patch_hash": {
          "type": "string",
          "pattern": "^sha256:[a-f0-9]{64}$"
        },
        "profile_hash": {
          "type": "string",
          "pattern": "^sha256:[a-f0-9]{64}$"
        },
        "image_digest": {
          "type": "string",
          "pattern": "^sha256:[a-f0-9]{64}$"
        }
      },
      "required": [
        "repository_id",
        "base_commit",
        "patch_hash",
        "profile_hash",
        "image_digest"
      ],
      "additionalProperties": false
    },
    "audience": {
      "type": "string",
      "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,127}$"
    },
    "verification_job_id": {
      "type": "string",
      "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,127}$"
    },
    "deadline": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
    },
    "dispute_rule": {
      "type": "string",
      "const": "mutual_resolution"
    }
  },
  "required": [
    "payer_id",
    "payee_id",
    "amount_cents",
    "currency",
    "settlement_mode",
    "delivery_digest",
    "binding",
    "audience",
    "verification_job_id",
    "deadline",
    "dispute_rule"
  ],
  "additionalProperties": false
}