{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "badgeAppearance": {
      "description": "Colours for a single badge. Every colour is a `#rrggbb` or `#rrggbbaa` hex literal so clients can render it without interpreting arbitrary CSS.",
      "properties": {
        "colors": {
          "description": "Badge colours, each a `#rrggbb` or `#rrggbbaa` hex literal. `solid` uses only the first entry.",
          "items": {
            "maxLength": 9,
            "minLength": 7,
            "type": "string"
          },
          "maxLength": 6,
          "minLength": 1,
          "type": "array"
        },
        "foreground": {
          "description": "Text colour, a `#rrggbb` or `#rrggbbaa` hex literal.",
          "maxLength": 9,
          "minLength": 7,
          "type": "string"
        },
        "variant": {
          "description": "How `colors` is applied. `solid` fills the badge with the first colour. `gradientBorder` renders every colour as a stop in a gradient border over a darkened gradient fill. Defaults to `solid`.",
          "knownValues": [
            "solid",
            "gradientBorder"
          ],
          "maxLength": 32,
          "type": "string"
        }
      },
      "required": [
        "colors",
        "foreground"
      ],
      "type": "object"
    },
    "badgeDefinition": {
      "description": "Metadata for a single badge. `identifier` is the `val` carried by the corresponding label.",
      "properties": {
        "appearance": {
          "description": "How the badge is coloured. Clients fall back to a neutral style when this is absent or unrecognised.",
          "ref": "lex:social.colibri.labeler.service#badgeAppearance",
          "type": "ref"
        },
        "description": {
          "description": "What holding this badge means.",
          "maxLength": 512,
          "type": "string"
        },
        "identifier": {
          "description": "The label value, lowercase kebab-case, as it appears in `com.atproto.label` records.",
          "maxLength": 100,
          "type": "string"
        },
        "name": {
          "description": "Short display name shown on the badge itself.",
          "maxLength": 64,
          "type": "string"
        },
        "precedence": {
          "description": "Sort order when a user holds several badges. Lower sorts first, so the lowest value is the default primary badge.",
          "minimum": 0,
          "type": "integer"
        }
      },
      "required": [
        "identifier",
        "name",
        "description"
      ],
      "type": "object"
    },
    "main": {
      "description": "Declares that this account operates a Colibri labeler and describes the badges it issues. The Colibri equivalent of `app.bsky.labeler.service`. Labels themselves stay standard `com.atproto.label` labels, served from the `#atproto_labeler` service endpoint in this account's DID document.",
      "key": "literal:self",
      "record": {
        "properties": {
          "$type": {
            "description": "The type of the record.",
            "format": "nsid",
            "type": "string"
          },
          "badgeDefinitions": {
            "description": "Every badge this labeler can issue. A label value absent from this list is not a recognised badge.",
            "items": {
              "ref": "lex:social.colibri.labeler.service#badgeDefinition",
              "type": "ref"
            },
            "maxLength": 100,
            "type": "array"
          },
          "createdAt": {
            "format": "datetime",
            "type": "string"
          }
        },
        "required": [
          "badgeDefinitions",
          "createdAt"
        ],
        "type": "object"
      },
      "type": "record"
    }
  },
  "id": "social.colibri.labeler.service",
  "lexicon": 1,
  "revision": 2
}
