{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://oms.local/schemas/conductor-notification-payload.schema.json",
  "title": "OMS opaque conductor notification payload",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "notification_id",
    "event_ids",
    "event_set_sha256",
    "created_at",
    "delivered_to_session_id",
    "delivered_at",
    "consumed_at"
  ],
  "properties": {
    "notification_id": { "type": "string", "pattern": "^notice-[a-f0-9]{48}$" },
    "event_ids": {
      "type": "array",
      "minItems": 1,
      "maxItems": 1000,
      "items": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$" }
    },
    "event_set_sha256": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
    "created_at": { "type": "string", "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\\.[0-9]{3}Z$" },
    "delivered_to_session_id": {
      "type": ["string", "null"],
      "pattern": "^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$"
    },
    "delivered_at": {
      "type": ["string", "null"],
      "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\\.[0-9]{3}Z$"
    },
    "consumed_at": {
      "type": ["string", "null"],
      "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\\.[0-9]{3}Z$"
    }
  }
}
