{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "List the notification rules this relay runs, so an app can show a toggle for each. No auth needed.",
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "follows": {
              "description": "Whether devices can ask for rules from people they follow only.",
              "type": "boolean"
            },
            "rules": {
              "items": {
                "ref": "#rule",
                "type": "ref"
              },
              "type": "array"
            },
            "serviceDid": {
              "description": "The audience to request service-auth tokens for.",
              "format": "did",
              "type": "string"
            }
          },
          "required": [
            "serviceDid",
            "rules"
          ],
          "type": "object"
        }
      },
      "type": "query"
    },
    "rule": {
      "properties": {
        "collection": {
          "format": "nsid",
          "type": "string"
        },
        "id": {
          "type": "string"
        },
        "subscribers": {
          "description": "For subscriber rules, the channel devices subscribe on.",
          "type": "string"
        }
      },
      "required": [
        "id",
        "collection"
      ],
      "type": "object"
    }
  },
  "id": "blog.brookie.atprotify.listRules",
  "lexicon": 1
}
