{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://capp.local/schemas/capp.sync-op.v1.schema.json",
  "title": "cApp durable sync operation v1",
  "type": "object",
  "required": [
    "protocol",
    "id",
    "createdAt",
    "updatedAt",
    "status",
    "attempts",
    "idempotencyKey",
    "path",
    "method"
  ],
  "properties": {
    "protocol": {
      "const": "capp.sync-op.v1"
    },
    "id": {
      "type": "string"
    },
    "createdAt": {
      "type": "string"
    },
    "updatedAt": {
      "type": "string"
    },
    "status": {
      "type": "string"
    },
    "attempts": {
      "type": "integer",
      "minimum": 0
    },
    "idempotencyKey": {
      "type": "string"
    },
    "path": {
      "type": "string"
    },
    "method": {
      "type": "string"
    },
    "collection": {
      "type": [
        "string",
        "null"
      ]
    },
    "key": {
      "type": [
        "string",
        "null"
      ]
    },
    "baseRevision": {
      "type": "integer",
      "minimum": 0
    },
    "localRevision": {
      "type": "integer",
      "minimum": 0
    },
    "contentHash": {
      "type": [
        "string",
        "null"
      ]
    },
    "deletedAt": {
      "type": [
        "string",
        "null"
      ]
    },
    "requiresAck": {
      "type": "boolean"
    },
    "body": {}
  },
  "additionalProperties": true
}
