{
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "title": "Dev Element Indices Manifest",
    "type": "object",
    "required": ["version", "lastId", "entries", "deleted"],
    "properties": {
        "$schema": { "type": "string" },
        "version": { "const": 1 },
        "lastId": { "type": "integer", "minimum": 0 },
        "entries": {
            "type": "object",
            "patternProperties": {
                "^[0-9]+$": {
                    "type": "object",
                    "required": ["file", "line", "tag", "parentChain", "signature", "createdAt"],
                    "properties": {
                        "file": { "type": "string" },
                        "line": { "type": "integer", "minimum": 1 },
                        "tag": { "type": "string" },
                        "parentChain": { "type": "array", "items": { "type": "string" } },
                        "signature": { "type": "string" },
                        "text": { "type": ["string", "null"] },
                        "key": { "type": ["string", "null"] },
                        "ref": { "type": ["string", "null"] },
                        "createdAt": { "type": "string", "format": "date-time" }
                    },
                    "additionalProperties": false
                }
            },
            "additionalProperties": false
        },
        "deleted": {
            "type": "object",
            "patternProperties": {
                "^[0-9]+$": {
                    "type": "object",
                    "required": ["lastSignature", "lastFile", "deletedAt"],
                    "properties": {
                        "lastSignature": { "type": "string" },
                        "lastFile": { "type": "string" },
                        "deletedAt": { "type": "string", "format": "date-time" }
                    },
                    "additionalProperties": false
                }
            },
            "additionalProperties": false
        }
    },
    "additionalProperties": false
}
