{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://capp.local/schemas/capp.sync-conflict.v1.schema.json",
  "title": "cApp durable sync conflict v1",
  "type": "object",
  "required": [
    "protocol",
    "id",
    "collection",
    "key",
    "source",
    "createdAt",
    "status"
  ],
  "properties": {
    "protocol": {
      "const": "capp.sync-conflict.v1"
    },
    "id": {
      "type": "string"
    },
    "collection": {
      "type": "string"
    },
    "key": {
      "type": "string"
    },
    "source": {
      "type": "string"
    },
    "createdAt": {
      "type": "string"
    },
    "local": {},
    "remote": {},
    "operationId": {
      "type": [
        "string",
        "null"
      ]
    },
    "baseRevision": {
      "type": "integer",
      "minimum": 0
    },
    "remoteRevision": {
      "type": "integer",
      "minimum": 0
    },
    "status": {
      "enum": [
        "conflict",
        "resolved"
      ]
    },
    "metadata": {
      "type": "object"
    }
  },
  "additionalProperties": true
}
