{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/datagalactica-com/json-schema/datagalactica-com-decision-schema.json",
  "title": "Decision",
  "description": "The decision envelope of checks, verifications and diligence",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/datagalactica-com-api-openapi.json#/components/schemas/Decision",
  "type": "object",
  "properties": {
    "verdict": {
      "type": "string",
      "enum": [
        "match",
        "possible_match",
        "no_match",
        "not_found"
      ]
    },
    "confidence": {
      "type": "number",
      "minimum": 0,
      "maximum": 1
    },
    "grade": {
      "$ref": "#/$defs/Grade"
    },
    "cite": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "enum": [
            "person",
            "organization"
          ]
        },
        "name": {
          "type": "string"
        },
        "url": {
          "type": "string"
        }
      }
    },
    "conflicts": {
      "type": "array",
      "items": {
        "type": "string",
        "description": "Where the record disagrees with itself, or is bronze"
      }
    },
    "next": {
      "type": "array",
      "items": {
        "type": "string",
        "description": "Routes to call next, e.g. company.diligence"
      }
    }
  },
  "$defs": {
    "Grade": {
      "type": "string",
      "enum": [
        "bronze",
        "silver",
        "gold",
        "verified"
      ],
      "description": "Overall: verified = claimed by the owner; gold = an e-mail and a phone, both verified or deliverable; silver = an e-mail and a phone; bronze = less. In quality.sections, the grade says how well that section is sourced."
    }
  }
}