{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://api.barakahtasks.com/contracts/events/v1/schemas/list-updated.schema.json",
  "title": "com.barakahtasks.list.updated.v1",
  "type": "object",
  "required": [
    "specversion",
    "id",
    "source",
    "type",
    "subject",
    "time",
    "datacontenttype",
    "barakahsequence",
    "barakahpublishedat",
    "data"
  ],
  "properties": {
    "specversion": {
      "const": "1.0"
    },
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "source": {
      "const": "https://api.barakahtasks.com/events"
    },
    "type": {
      "const": "com.barakahtasks.list.updated.v1"
    },
    "subject": {
      "type": "string",
      "pattern": "^lists/"
    },
    "time": {
      "type": "string",
      "format": "date-time"
    },
    "datacontenttype": {
      "const": "application/json"
    },
    "barakahsequence": {
      "type": "integer",
      "minimum": 1
    },
    "barakahpublishedat": {
      "type": "string",
      "format": "date-time"
    },
    "barakahresourceat": {
      "type": "string",
      "format": "date-time"
    },
    "data": {
      "type": "object",
      "required": [
        "list_id",
        "is_shared",
        "core_revision",
        "notes_revision"
      ],
      "properties": {
        "list_id": {
          "type": "string",
          "format": "uuid"
        },
        "name": {
          "type": "string"
        },
        "is_shared": {
          "type": "boolean"
        },
        "core_revision": {
          "type": "integer"
        },
        "notes_revision": {
          "type": "integer"
        },
        "deleted_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ]
        },
        "snapshot_omitted": {
          "type": "boolean"
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}
