{
  "$defs": {
    "SubscriptionFilter": {
      "description": "WebSocket subscription filter.\nPer MARS Specification Section 12.4.",
      "properties": {
        "entryDids": {
          "description": "Filter by specific entry DIDs.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "entryTypes": {
          "description": "Filter by entry types.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "events": {
          "description": "Filter by event types.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "namespaces": {
          "description": "Filter by namespaces.",
          "items": {
            "type": "string"
          },
          "type": "array"
        }
      },
      "type": "object"
    }
  },
  "$id": "urn:mars:schema:v1:subscription-message",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "description": "WebSocket subscription message.",
  "properties": {
    "action": {
      "description": "Action: \"subscribe\" or \"unsubscribe\".",
      "type": "string"
    },
    "filters": {
      "$ref": "#/$defs/SubscriptionFilter",
      "description": "Subscription filters."
    }
  },
  "required": [
    "action",
    "filters"
  ],
  "title": "SubscriptionMessage",
  "type": "object"
}
