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