{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/sitegpt-ai/json-schema/sitegpt-ai-knowledge-document-schema.json",
  "title": "KnowledgeDocument",
  "description": "A trained knowledge document.",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/sitegpt-ai-openapi.json#/components/schemas/KnowledgeDocument",
  "type": "object",
  "additionalProperties": true,
  "properties": {
    "id": {
      "type": "string"
    },
    "name": {
      "type": [
        "string",
        "null"
      ]
    },
    "externalId": {
      "type": "string"
    },
    "type": {
      "type": "string"
    },
    "source": {
      "type": "string",
      "description": "Ingestion source, for example SITEMAP or LOCAL_FILE."
    },
    "status": {
      "type": "string"
    },
    "error": {
      "type": [
        "string",
        "null"
      ]
    },
    "metadata": {
      "$ref": "#/$defs/GenericObject",
      "description": "Provider metadata for the document."
    },
    "properties": {
      "anyOf": [
        {
          "$ref": "#/$defs/GenericObject",
          "description": "Document properties reported by the ingestion pipeline; null when the provider reports none."
        },
        {
          "type": "null"
        }
      ]
    },
    "rawFileUrl": {
      "type": [
        "string",
        "null"
      ]
    },
    "parsedTextFileUrl": {
      "type": [
        "string",
        "null"
      ]
    },
    "connectionId": {
      "type": [
        "string",
        "null"
      ]
    },
    "ingestJobId": {
      "type": [
        "string",
        "null"
      ]
    },
    "ingestJobRunId": {
      "type": [
        "string",
        "null"
      ]
    },
    "isContentUpdatedManually": {
      "type": "boolean"
    },
    "lastSyncedAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "createdAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "updatedAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    }
  },
  "$defs": {
    "GenericObject": {
      "type": "object",
      "additionalProperties": true
    }
  }
}