{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "labelPref": {
      "description": "How the reader wants a single label value from this labeler treated.",
      "properties": {
        "val": {
          "description": "The label value this preference applies to.",
          "maxLength": 128,
          "type": "string"
        },
        "visibility": {
          "description": "ignore = show normally; warn = content warning / blur; hide = filter out.",
          "knownValues": [
            "ignore",
            "warn",
            "hide"
          ],
          "maxLength": 16,
          "type": "string"
        }
      },
      "required": [
        "val",
        "visibility"
      ],
      "type": "object"
    },
    "main": {
      "description": "Subscribes the reader to a labeler service (like adding a Bluesky moderation service). Presence of the record means subscribed; deleting it unsubscribes. The rkey is derived from the labeler DID so each labeler maps to a single record. Successor to app.standard-reader.labelerSubscription, nested under the labeler NSID group.",
      "key": "any",
      "record": {
        "properties": {
          "createdAt": {
            "description": "When the reader subscribed to the labeler.",
            "format": "datetime",
            "type": "string"
          },
          "enabled": {
            "default": true,
            "description": "Whether this labeler's labels are applied while reading. `false` keeps the subscription (and its per-label preferences) but stops the labeler acting here — for a labeler the reader wants on another app but not this one. Absent means enabled.",
            "type": "boolean"
          },
          "labeler": {
            "description": "DID of the labeler service being subscribed to.",
            "format": "did",
            "type": "string"
          },
          "labels": {
            "description": "Per-label visibility overrides for this labeler's label values.",
            "items": {
              "ref": "#labelPref",
              "type": "ref"
            },
            "type": "array"
          }
        },
        "required": [
          "labeler",
          "createdAt"
        ],
        "type": "object"
      },
      "type": "record"
    }
  },
  "id": "app.standard-reader.labeler.subscription",
  "lexicon": 1
}
