|
| 1 | +{ |
| 2 | + "id": "com.atproto.label.defs", |
| 3 | + "defs": { |
| 4 | + "label": { |
| 5 | + "type": "object", |
| 6 | + "required": ["src", "uri", "val", "cts"], |
| 7 | + "properties": { |
| 8 | + "cid": { |
| 9 | + "type": "string", |
| 10 | + "format": "cid", |
| 11 | + "description": "Optionally, CID specifying the specific version of 'uri' resource this label applies to." |
| 12 | + }, |
| 13 | + "cts": { |
| 14 | + "type": "string", |
| 15 | + "format": "datetime", |
| 16 | + "description": "Timestamp when this label was created." |
| 17 | + }, |
| 18 | + "exp": { |
| 19 | + "type": "string", |
| 20 | + "format": "datetime", |
| 21 | + "description": "Timestamp at which this label expires (no longer applies)." |
| 22 | + }, |
| 23 | + "neg": { |
| 24 | + "type": "boolean", |
| 25 | + "description": "If true, this is a negation label, overwriting a previous label." |
| 26 | + }, |
| 27 | + "sig": { |
| 28 | + "type": "bytes", |
| 29 | + "description": "Signature of dag-cbor encoded label." |
| 30 | + }, |
| 31 | + "src": { |
| 32 | + "type": "string", |
| 33 | + "format": "did", |
| 34 | + "description": "DID of the actor who created this label." |
| 35 | + }, |
| 36 | + "uri": { |
| 37 | + "type": "string", |
| 38 | + "format": "uri", |
| 39 | + "description": "AT URI of the record, repository (account), or other resource that this label applies to." |
| 40 | + }, |
| 41 | + "val": { |
| 42 | + "type": "string", |
| 43 | + "maxLength": 128, |
| 44 | + "description": "The short string name of the value or type of this label." |
| 45 | + }, |
| 46 | + "ver": { |
| 47 | + "type": "integer", |
| 48 | + "description": "The AT Protocol version of the label object." |
| 49 | + } |
| 50 | + }, |
| 51 | + "description": "Metadata tag on an atproto resource (eg, repo or record)." |
| 52 | + }, |
| 53 | + "selfLabel": { |
| 54 | + "type": "object", |
| 55 | + "required": ["val"], |
| 56 | + "properties": { |
| 57 | + "val": { |
| 58 | + "type": "string", |
| 59 | + "maxLength": 128, |
| 60 | + "description": "The short string name of the value or type of this label." |
| 61 | + } |
| 62 | + }, |
| 63 | + "description": "Metadata tag on an atproto record, published by the author within the record. Note that schemas should use #selfLabels, not #selfLabel." |
| 64 | + }, |
| 65 | + "labelValue": { |
| 66 | + "type": "string", |
| 67 | + "knownValues": [ |
| 68 | + "!hide", |
| 69 | + "!no-promote", |
| 70 | + "!warn", |
| 71 | + "!no-unauthenticated", |
| 72 | + "dmca-violation", |
| 73 | + "doxxing", |
| 74 | + "porn", |
| 75 | + "sexual", |
| 76 | + "nudity", |
| 77 | + "nsfl", |
| 78 | + "gore" |
| 79 | + ] |
| 80 | + }, |
| 81 | + "selfLabels": { |
| 82 | + "type": "object", |
| 83 | + "required": ["values"], |
| 84 | + "properties": { |
| 85 | + "values": { |
| 86 | + "type": "array", |
| 87 | + "items": { |
| 88 | + "ref": "#selfLabel", |
| 89 | + "type": "ref" |
| 90 | + }, |
| 91 | + "maxLength": 10 |
| 92 | + } |
| 93 | + }, |
| 94 | + "description": "Metadata tags on an atproto record, published by the author within the record." |
| 95 | + }, |
| 96 | + "labelValueDefinition": { |
| 97 | + "type": "object", |
| 98 | + "required": ["identifier", "severity", "blurs", "locales"], |
| 99 | + "properties": { |
| 100 | + "blurs": { |
| 101 | + "type": "string", |
| 102 | + "description": "What should this label hide in the UI, if applied? 'content' hides all of the target; 'media' hides the images/video/audio; 'none' hides nothing.", |
| 103 | + "knownValues": ["content", "media", "none"] |
| 104 | + }, |
| 105 | + "locales": { |
| 106 | + "type": "array", |
| 107 | + "items": { |
| 108 | + "ref": "#labelValueDefinitionStrings", |
| 109 | + "type": "ref" |
| 110 | + } |
| 111 | + }, |
| 112 | + "severity": { |
| 113 | + "type": "string", |
| 114 | + "description": "How should a client visually convey this label? 'inform' means neutral and informational; 'alert' means negative and warning; 'none' means show nothing.", |
| 115 | + "knownValues": ["inform", "alert", "none"] |
| 116 | + }, |
| 117 | + "adultOnly": { |
| 118 | + "type": "boolean", |
| 119 | + "description": "Does the user need to have adult content enabled in order to configure this label?" |
| 120 | + }, |
| 121 | + "identifier": { |
| 122 | + "type": "string", |
| 123 | + "maxLength": 100, |
| 124 | + "description": "The value of the label being defined. Must only include lowercase ascii and the '-' character ([a-z-]+).", |
| 125 | + "maxGraphemes": 100 |
| 126 | + }, |
| 127 | + "defaultSetting": { |
| 128 | + "type": "string", |
| 129 | + "default": "warn", |
| 130 | + "description": "The default setting for this label.", |
| 131 | + "knownValues": ["ignore", "warn", "hide"] |
| 132 | + } |
| 133 | + }, |
| 134 | + "description": "Declares a label value and its expected interpretations and behaviors." |
| 135 | + }, |
| 136 | + "labelValueDefinitionStrings": { |
| 137 | + "type": "object", |
| 138 | + "required": ["lang", "name", "description"], |
| 139 | + "properties": { |
| 140 | + "lang": { |
| 141 | + "type": "string", |
| 142 | + "format": "language", |
| 143 | + "description": "The code of the language these strings are written in." |
| 144 | + }, |
| 145 | + "name": { |
| 146 | + "type": "string", |
| 147 | + "maxLength": 640, |
| 148 | + "description": "A short human-readable name for the label.", |
| 149 | + "maxGraphemes": 64 |
| 150 | + }, |
| 151 | + "description": { |
| 152 | + "type": "string", |
| 153 | + "maxLength": 100000, |
| 154 | + "description": "A longer description of what the label means and why it might be applied.", |
| 155 | + "maxGraphemes": 10000 |
| 156 | + } |
| 157 | + }, |
| 158 | + "description": "Strings which describe the label in the UI, localized into a specific language." |
| 159 | + } |
| 160 | + }, |
| 161 | + "$type": "com.atproto.lexicon.schema", |
| 162 | + "lexicon": 1 |
| 163 | +} |
0 commit comments