{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/apisign-io/json-schema/apisign-io-contract-audit-log-schema.json",
  "title": "ContractAuditLog",
  "x-generated": "2026-11-01",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/apisign-io-openapi.yml#/components/schemas/ContractAuditLog",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "eventType": {
      "$ref": "#/$defs/WebhookEventType"
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "ipAddress": {
      "type": [
        "string",
        "null"
      ]
    },
    "browser": {
      "type": [
        "string",
        "null"
      ]
    },
    "browserVersion": {
      "type": [
        "string",
        "null"
      ]
    },
    "os": {
      "type": [
        "string",
        "null"
      ]
    },
    "osVersion": {
      "type": [
        "string",
        "null"
      ]
    },
    "deviceType": {
      "type": [
        "string",
        "null"
      ]
    },
    "country": {
      "type": [
        "string",
        "null"
      ]
    },
    "city": {
      "type": [
        "string",
        "null"
      ]
    },
    "metadata": {
      "type": [
        "object",
        "null"
      ]
    },
    "signer": {
      "nullable": true,
      "allOf": [
        {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "name": {
              "type": "string"
            },
            "email": {
              "type": "string"
            }
          }
        }
      ]
    },
    "user": {
      "nullable": true,
      "allOf": [
        {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "name": {
              "type": "string"
            },
            "email": {
              "type": "string"
            },
            "image": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        }
      ]
    }
  },
  "$defs": {
    "WebhookEventType": {
      "type": "string",
      "enum": [
        "contract_created",
        "contract_sent",
        "contract_resent",
        "contract_viewed",
        "contract_signed",
        "contract_completed",
        "contract_declined",
        "contract_expired",
        "contract_cancelled"
      ]
    }
  }
}