{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/abm-dev/json-schema/abm-dev-enrichment-result-schema.json",
  "title": "EnrichmentResult",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/abm-dev-enrichment-api-openapi.yml#/components/schemas/EnrichmentResult",
  "allOf": [
    {
      "$ref": "#/$defs/EnrichmentSummary"
    },
    {
      "type": "object",
      "properties": {
        "input": {
          "$ref": "#/$defs/EnrichmentInput"
        },
        "result_data": {
          "type": "object",
          "description": "Enriched data from all sources"
        },
        "sources": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "completed_at": {
          "type": "string",
          "format": "date-time"
        }
      }
    }
  ],
  "$defs": {
    "EnrichmentInput": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "email": {
          "type": "string",
          "format": "email"
        },
        "firstName": {
          "type": "string"
        },
        "lastName": {
          "type": "string"
        },
        "company": {
          "type": "string"
        },
        "companyName": {
          "type": "string"
        },
        "firmName": {
          "type": "string"
        },
        "linkedInUrl": {
          "type": "string",
          "format": "uri"
        },
        "linkedInCompanyPage": {
          "type": "string",
          "format": "uri"
        },
        "domain": {
          "type": "string"
        },
        "website": {
          "type": "string",
          "format": "uri"
        },
        "crmId": {
          "type": "string"
        }
      }
    },
    "EnrichmentSummary": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer"
        },
        "status": {
          "type": "string",
          "enum": [
            "queued",
            "processing",
            "completed",
            "approved",
            "writeback_pending",
            "synced",
            "failed",
            "cancelled",
            "partial_success"
          ]
        },
        "type": {
          "type": "string"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        }
      }
    }
  }
}