{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$defs": {
    "Batch": {
      "properties": {
        "first": {
          "type": "integer",
          "maximum": 9007199254740991,
          "minimum": 1
        },
        "last": {
          "type": "integer",
          "maximum": 9007199254740991,
          "minimum": 1
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "first",
        "last"
      ],
      "description": "Batch is the committed batch an entry belongs to."
    },
    "Entry": {
      "properties": {
        "ref": {
          "$ref": "#/$defs/EntryRef"
        },
        "fact": {
          "type": "string",
          "contentEncoding": "base64"
        },
        "origin": {
          "type": "string",
          "enum": [
            "append",
            "create"
          ]
        },
        "batch": {
          "$ref": "#/$defs/Batch"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "ref",
        "fact",
        "origin",
        "batch"
      ],
      "description": "Entry is one fact occurrence."
    },
    "EntryRef": {
      "properties": {
        "root_id": {
          "type": "string",
          "pattern": "^rt_[0-9a-f]{32}$"
        },
        "space_id": {
          "type": "string",
          "pattern": "^spc_[0-9a-f]{32}$"
        },
        "position": {
          "type": "integer",
          "maximum": 9007199254740991,
          "minimum": 1
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "root_id",
        "space_id",
        "position"
      ],
      "description": "EntryRef is the occurrence identity of one entry: a position in one journal."
    },
    "SpaceRef": {
      "properties": {
        "root_id": {
          "type": "string",
          "pattern": "^rt_[0-9a-f]{32}$"
        },
        "space_id": {
          "type": "string",
          "pattern": "^spc_[0-9a-f]{32}$"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "root_id",
        "space_id"
      ],
      "description": "SpaceRef is the exact identity of one continuing space and its journal."
    }
  },
  "properties": {
    "space": {
      "$ref": "#/$defs/SpaceRef"
    },
    "through": {
      "type": "integer",
      "maximum": 9007199254740991,
      "minimum": 0
    },
    "entries": {
      "items": {
        "$ref": "#/$defs/Entry"
      },
      "type": "array"
    },
    "scanned_through": {
      "type": "integer",
      "maximum": 9007199254740991,
      "minimum": 0
    },
    "next_after": {
      "type": "integer",
      "maximum": 9007199254740991,
      "minimum": 1
    }
  },
  "additionalProperties": false,
  "type": "object",
  "required": [
    "space",
    "through",
    "entries",
    "scanned_through"
  ],
  "title": "ReadResult",
  "description": "ReadResult is one page."
}
