{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Get a registered device's notification preferences for the authenticated account. Requires service auth bound to this method.",
      "errors": [
        {
          "description": "The device isn't registered for this account.",
          "name": "NotFound"
        }
      ],
      "output": {
        "encoding": "application/json",
        "schema": {
          "ref": "#preferences",
          "type": "ref"
        }
      },
      "parameters": {
        "properties": {
          "platform": {
            "type": "string"
          },
          "token": {
            "maxLength": 4096,
            "type": "string"
          }
        },
        "required": [
          "platform",
          "token"
        ],
        "type": "params"
      },
      "type": "query"
    },
    "preferences": {
      "properties": {
        "chat": {
          "description": "What the relay holds for the account's direct messages: no grant, unread counts only, or previews (sender and text).",
          "knownValues": [
            "none",
            "counts",
            "previews"
          ],
          "type": "string"
        },
        "disabledRules": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "followsOnly": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "mutedActors": {
          "items": {
            "format": "did",
            "type": "string"
          },
          "type": "array"
        },
        "subscriptions": {
          "items": {
            "ref": "#subscription",
            "type": "ref"
          },
          "type": "array"
        }
      },
      "required": [
        "disabledRules",
        "mutedActors",
        "followsOnly",
        "subscriptions"
      ],
      "type": "object"
    },
    "subscription": {
      "properties": {
        "channels": {
          "description": "Channels named by the relay's subscriber rules, like post and reply.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "did": {
          "format": "did",
          "type": "string"
        }
      },
      "required": [
        "did",
        "channels"
      ],
      "type": "object"
    }
  },
  "id": "blog.brookie.atprotify.getPreferences",
  "lexicon": 1
}
