{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "properties": {
    "category": {
      "enum": [
        "operational",
        "decision",
        "security_trust",
        "billing_commerce",
        "lifecycle"
      ],
      "type": "string"
    },
    "next_action_code": {
      "maxLength": 64,
      "type": "string"
    },
    "notification_id": {
      "pattern": "^ntf_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$",
      "type": "string"
    },
    "recipient_role": {
      "anyOf": [
        {
          "maxLength": 64,
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "recipient_user_id": {
      "anyOf": [
        {
          "pattern": "^usr_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$",
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "recipient_workspace_id": {
      "anyOf": [
        {
          "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$",
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "subject_event_id": {
      "anyOf": [
        {
          "pattern": "^evt_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$",
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "subject_id": {
      "pattern": "^(mres|ws|usr|prod|rev|ver|rel|env|dep|srf|acc|ses|inv|exe|evt|pend|ddl|ntf|pipe|fnd|qual|cred|bind|hdl|cap|svc|frz|adj|fix|upl|dom|wb|ctx|aud|pay|ivc|rfd)_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$",
      "type": "string"
    },
    "template_key": {
      "maxLength": 64,
      "type": "string"
    },
    "urgency": {
      "enum": [
        "low",
        "normal",
        "high"
      ],
      "type": "string"
    }
  },
  "required": [
    "notification_id",
    "category",
    "urgency",
    "recipient_user_id",
    "recipient_workspace_id",
    "recipient_role",
    "subject_id",
    "subject_event_id",
    "template_key"
  ],
  "type": "object"
}
