{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/replynodes-com/json-schema/replynodes-com-ccihistory-envelope-schema.json",
  "title": "CCIHistoryEnvelope",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/replynodes-com-companychanges-api-openapi.yml#/components/schemas/CCIHistoryEnvelope",
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "topic": {
          "$ref": "#/$defs/WatchTopic"
        },
        "current": {
          "$ref": "#/$defs/CCITopicState"
        },
        "history": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CCITopicState"
          }
        }
      },
      "required": [
        "topic",
        "current",
        "history"
      ]
    },
    "meta": {
      "$ref": "#/$defs/CCIPageMeta"
    }
  },
  "required": [
    "data",
    "meta"
  ],
  "additionalProperties": false,
  "$defs": {
    "CCIPageMeta": {
      "type": "object",
      "properties": {
        "request_id": {
          "type": "string"
        },
        "next_cursor": {
          "type": "string"
        },
        "has_more": {
          "type": "boolean"
        }
      },
      "required": [
        "request_id",
        "next_cursor",
        "has_more"
      ],
      "additionalProperties": false
    },
    "CCITopicState": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "topic": {
          "$ref": "#/$defs/WatchTopic"
        },
        "version": {
          "type": "integer"
        },
        "baseline": {
          "type": "boolean"
        },
        "state": {
          "type": "object",
          "additionalProperties": true
        },
        "observed_from": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "observed_to": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "valid_from": {
          "type": "string",
          "format": "date-time"
        },
        "valid_to": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "extractor": {
          "type": "string"
        },
        "method": {
          "type": [
            "string",
            "null"
          ]
        },
        "model": {
          "type": [
            "string",
            "null"
          ]
        },
        "provider": {
          "type": "string"
        },
        "provider_version": {
          "type": "string"
        },
        "provider_commit": {
          "type": "string"
        },
        "derived_from_page_ids": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "derived_from_snapshot_ids": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "derived_from_observation_ids": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "content_hashes": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        }
      },
      "required": [
        "id",
        "topic",
        "version",
        "baseline",
        "state",
        "observed_from",
        "observed_to",
        "valid_from",
        "valid_to",
        "extractor",
        "method",
        "model",
        "provider",
        "provider_version",
        "provider_commit",
        "derived_from_page_ids",
        "derived_from_snapshot_ids",
        "derived_from_observation_ids",
        "content_hashes",
        "created_at"
      ],
      "additionalProperties": false
    },
    "WatchTopic": {
      "type": "string",
      "enum": [
        "pricing",
        "product",
        "integrations",
        "customers",
        "positioning"
      ]
    }
  }
}