{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://lists.metix.ai/schema/snapshot-1.0.json",
  "title": "Metix snapshot 1.0",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "schema_version": {
      "const": "1.0"
    },
    "kind": {
      "enum": [
        "companies",
        "jobs"
      ]
    },
    "slug": {
      "type": "string",
      "pattern": "^[a-z0-9-]+$"
    },
    "title": {
      "type": "string",
      "minLength": 1
    },
    "as_of": {
      "type": "string",
      "format": "date"
    },
    "collected": {
      "type": "string",
      "format": "date"
    },
    "updated": {
      "type": "string",
      "format": "date"
    },
    "geography": {
      "type": "string",
      "minLength": 1
    },
    "query_total": {
      "type": "string",
      "minLength": 1
    },
    "sample_size": {
      "type": "integer",
      "minimum": 0
    },
    "inclusion": {
      "type": "string",
      "minLength": 1
    },
    "methodology": {
      "type": "string",
      "minLength": 1
    },
    "columns": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "key": {
            "type": "string",
            "minLength": 1
          },
          "label": {
            "type": "string",
            "minLength": 1
          },
          "description": {
            "type": "string"
          }
        },
        "required": [
          "key",
          "label"
        ]
      }
    },
    "rows": {
      "type": "array",
      "minItems": 1,
      "maxItems": 100,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          },
          "industry": {
            "type": "string"
          },
          "headcount": {
            "type": "string"
          },
          "growth": {
            "type": "string"
          },
          "hq_city": {
            "type": "string"
          },
          "hq_state": {
            "type": "string"
          },
          "website": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "company": {
            "type": "string"
          },
          "city": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "posted_date": {
            "type": "string"
          },
          "employment_type": {
            "type": "string"
          },
          "seniority": {
            "type": "string"
          },
          "baseline_headcount": {
            "type": "string"
          },
          "period_start": {
            "type": "string"
          },
          "period_end": {
            "type": "string"
          },
          "source_id": {
            "type": "string"
          },
          "source_url": {
            "type": "string"
          },
          "collected": {
            "type": "string",
            "format": "date"
          },
          "last_verified": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "const": ""
              }
            ]
          },
          "verification_status": {
            "const": "Unverified"
          },
          "provider_status": {
            "type": "string"
          }
        },
        "required": []
      }
    },
    "source": {
      "const": "Mira"
    },
    "url": {
      "type": "string",
      "format": "uri"
    },
    "$schema": {
      "const": "https://lists.metix.ai/schema/snapshot-1.0.json"
    }
  },
  "required": [
    "schema_version",
    "kind",
    "slug",
    "title",
    "as_of",
    "collected",
    "updated",
    "geography",
    "query_total",
    "sample_size",
    "inclusion",
    "methodology",
    "columns",
    "rows",
    "source",
    "url",
    "$schema"
  ]
}
