Scratch space for learning atproto app development
1/**
2 * GENERATED CODE - DO NOT MODIFY
3 */
4import { LexiconDoc, Lexicons } from '@atproto/lexicon'
5
6export const schemaDict = {
7 ComAtprotoLabelDefs: {
8 lexicon: 1,
9 id: 'com.atproto.label.defs',
10 defs: {
11 label: {
12 type: 'object',
13 description:
14 'Metadata tag on an atproto resource (eg, repo or record).',
15 required: ['src', 'uri', 'val', 'cts'],
16 properties: {
17 ver: {
18 type: 'integer',
19 description: 'The AT Protocol version of the label object.',
20 },
21 src: {
22 type: 'string',
23 format: 'did',
24 description: 'DID of the actor who created this label.',
25 },
26 uri: {
27 type: 'string',
28 format: 'uri',
29 description:
30 'AT URI of the record, repository (account), or other resource that this label applies to.',
31 },
32 cid: {
33 type: 'string',
34 format: 'cid',
35 description:
36 "Optionally, CID specifying the specific version of 'uri' resource this label applies to.",
37 },
38 val: {
39 type: 'string',
40 maxLength: 128,
41 description:
42 'The short string name of the value or type of this label.',
43 },
44 neg: {
45 type: 'boolean',
46 description:
47 'If true, this is a negation label, overwriting a previous label.',
48 },
49 cts: {
50 type: 'string',
51 format: 'datetime',
52 description: 'Timestamp when this label was created.',
53 },
54 exp: {
55 type: 'string',
56 format: 'datetime',
57 description:
58 'Timestamp at which this label expires (no longer applies).',
59 },
60 sig: {
61 type: 'bytes',
62 description: 'Signature of dag-cbor encoded label.',
63 },
64 },
65 },
66 selfLabels: {
67 type: 'object',
68 description:
69 'Metadata tags on an atproto record, published by the author within the record.',
70 required: ['values'],
71 properties: {
72 values: {
73 type: 'array',
74 items: {
75 type: 'ref',
76 ref: 'lex:com.atproto.label.defs#selfLabel',
77 },
78 maxLength: 10,
79 },
80 },
81 },
82 selfLabel: {
83 type: 'object',
84 description:
85 'Metadata tag on an atproto record, published by the author within the record. Note that schemas should use #selfLabels, not #selfLabel.',
86 required: ['val'],
87 properties: {
88 val: {
89 type: 'string',
90 maxLength: 128,
91 description:
92 'The short string name of the value or type of this label.',
93 },
94 },
95 },
96 labelValueDefinition: {
97 type: 'object',
98 description:
99 'Declares a label value and its expected interpretations and behaviors.',
100 required: ['identifier', 'severity', 'blurs', 'locales'],
101 properties: {
102 identifier: {
103 type: 'string',
104 description:
105 "The value of the label being defined. Must only include lowercase ascii and the '-' character ([a-z-]+).",
106 maxLength: 100,
107 maxGraphemes: 100,
108 },
109 severity: {
110 type: 'string',
111 description:
112 "How should a client visually convey this label? 'inform' means neutral and informational; 'alert' means negative and warning; 'none' means show nothing.",
113 knownValues: ['inform', 'alert', 'none'],
114 },
115 blurs: {
116 type: 'string',
117 description:
118 "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.",
119 knownValues: ['content', 'media', 'none'],
120 },
121 defaultSetting: {
122 type: 'string',
123 description: 'The default setting for this label.',
124 knownValues: ['ignore', 'warn', 'hide'],
125 default: 'warn',
126 },
127 adultOnly: {
128 type: 'boolean',
129 description:
130 'Does the user need to have adult content enabled in order to configure this label?',
131 },
132 locales: {
133 type: 'array',
134 items: {
135 type: 'ref',
136 ref: 'lex:com.atproto.label.defs#labelValueDefinitionStrings',
137 },
138 },
139 },
140 },
141 labelValueDefinitionStrings: {
142 type: 'object',
143 description:
144 'Strings which describe the label in the UI, localized into a specific language.',
145 required: ['lang', 'name', 'description'],
146 properties: {
147 lang: {
148 type: 'string',
149 description:
150 'The code of the language these strings are written in.',
151 format: 'language',
152 },
153 name: {
154 type: 'string',
155 description: 'A short human-readable name for the label.',
156 maxGraphemes: 64,
157 maxLength: 640,
158 },
159 description: {
160 type: 'string',
161 description:
162 'A longer description of what the label means and why it might be applied.',
163 maxGraphemes: 10000,
164 maxLength: 100000,
165 },
166 },
167 },
168 labelValue: {
169 type: 'string',
170 knownValues: [
171 '!hide',
172 '!no-promote',
173 '!warn',
174 '!no-unauthenticated',
175 'dmca-violation',
176 'doxxing',
177 'porn',
178 'sexual',
179 'nudity',
180 'nsfl',
181 'gore',
182 ],
183 },
184 },
185 },
186 AppBskyActorProfile: {
187 lexicon: 1,
188 id: 'app.bsky.actor.profile',
189 defs: {
190 main: {
191 type: 'record',
192 description: 'A declaration of a Bluesky account profile.',
193 key: 'literal:self',
194 record: {
195 type: 'object',
196 properties: {
197 displayName: {
198 type: 'string',
199 maxGraphemes: 64,
200 maxLength: 640,
201 },
202 description: {
203 type: 'string',
204 description: 'Free-form profile description text.',
205 maxGraphemes: 256,
206 maxLength: 2560,
207 },
208 avatar: {
209 type: 'blob',
210 description:
211 "Small image to be displayed next to posts from account. AKA, 'profile picture'",
212 accept: ['image/png', 'image/jpeg'],
213 maxSize: 1000000,
214 },
215 banner: {
216 type: 'blob',
217 description:
218 'Larger horizontal image to display behind profile view.',
219 accept: ['image/png', 'image/jpeg'],
220 maxSize: 1000000,
221 },
222 labels: {
223 type: 'union',
224 description:
225 'Self-label values, specific to the Bluesky application, on the overall account.',
226 refs: ['lex:com.atproto.label.defs#selfLabels'],
227 },
228 joinedViaStarterPack: {
229 type: 'ref',
230 ref: 'lex:com.atproto.repo.strongRef',
231 },
232 createdAt: {
233 type: 'string',
234 format: 'datetime',
235 },
236 },
237 },
238 },
239 },
240 },
241 XyzStatusphereStatus: {
242 lexicon: 1,
243 id: 'xyz.statusphere.status',
244 defs: {
245 main: {
246 type: 'record',
247 key: 'tid',
248 record: {
249 type: 'object',
250 required: ['status', 'createdAt'],
251 properties: {
252 status: {
253 type: 'string',
254 minLength: 1,
255 maxGraphemes: 1,
256 maxLength: 32,
257 },
258 createdAt: {
259 type: 'string',
260 format: 'datetime',
261 },
262 },
263 },
264 },
265 },
266 },
267 ComAtprotoRepoStrongRef: {
268 lexicon: 1,
269 id: 'com.atproto.repo.strongRef',
270 description: 'A URI with a content-hash fingerprint.',
271 defs: {
272 main: {
273 type: 'object',
274 required: ['uri', 'cid'],
275 properties: {
276 uri: {
277 type: 'string',
278 format: 'at-uri',
279 },
280 cid: {
281 type: 'string',
282 format: 'cid',
283 },
284 },
285 },
286 },
287 },
288}
289export const schemas: LexiconDoc[] = Object.values(schemaDict) as LexiconDoc[]
290export const lexicons: Lexicons = new Lexicons(schemas)
291export const ids = {
292 ComAtprotoLabelDefs: 'com.atproto.label.defs',
293 AppBskyActorProfile: 'app.bsky.actor.profile',
294 XyzStatusphereStatus: 'xyz.statusphere.status',
295 ComAtprotoRepoStrongRef: 'com.atproto.repo.strongRef',
296}