{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/anchord-ai/json-schema/anchord-ai-dupe-cluster-schema.json",
  "title": "DupeCluster",
  "x-generated": "2026-11-01",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/anchord-ai-openapi.yaml#/components/schemas/DupeCluster",
  "type": "object",
  "required": [
    "id",
    "kind",
    "score",
    "needs_review",
    "status",
    "members"
  ],
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "job_id": {
      "type": "string",
      "format": "uuid"
    },
    "strategy": {
      "type": "string"
    },
    "kind": {
      "$ref": "#/$defs/EntityKind"
    },
    "match_key": {
      "type": "string"
    },
    "match_rule": {
      "type": "string"
    },
    "score": {
      "type": "number",
      "minimum": 0,
      "maximum": 1
    },
    "needs_review": {
      "type": "boolean"
    },
    "status": {
      "type": "string",
      "enum": [
        "open",
        "merged",
        "dismissed"
      ]
    },
    "members": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "source_record_id": {
            "type": "string",
            "format": "uuid"
          },
          "system": {
            "type": "string"
          },
          "object_type": {
            "type": "string"
          },
          "object_id": {
            "type": "string"
          }
        }
      }
    },
    "created_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    }
  },
  "$defs": {
    "EntityKind": {
      "type": "string",
      "enum": [
        "company",
        "person"
      ]
    }
  }
}