···11/**
22 * GENERATED CODE - DO NOT MODIFY
33 */
44-import { LexiconDoc, Lexicons } from '@atproto/lexicon'
44+import { LexiconDoc, Lexicons } from "@atproto/lexicon";
5566export const schemaDict = {
77- LiPlonkComment: {
88- lexicon: 1,
99- id: 'li.plonk.comment',
1010- defs: {
1111- main: {
1212- type: 'record',
1313- key: 'tid',
1414- record: {
1515- type: 'object',
1616- required: ['content', 'createdAt', 'post'],
1717- properties: {
1818- content: {
1919- type: 'string',
2020- maxLength: 100000,
2121- maxGraphemes: 10000,
2222- description: 'comment body',
2323- },
2424- createdAt: {
2525- type: 'string',
2626- format: 'datetime',
2727- description: 'comment creation timestamp',
2828- },
2929- post: {
3030- type: 'ref',
3131- ref: 'lex:com.atproto.repo.strongRef',
3232- },
3333- },
3434- },
3535- },
3636- },
3737- },
3838- ComAtprotoLabelDefs: {
3939- lexicon: 1,
4040- id: 'com.atproto.label.defs',
4141- defs: {
4242- label: {
4343- type: 'object',
4444- description:
4545- 'Metadata tag on an atproto resource (eg, repo or record).',
4646- required: ['src', 'uri', 'val', 'cts'],
4747- properties: {
4848- ver: {
4949- type: 'integer',
5050- description: 'The AT Protocol version of the label object.',
5151- },
5252- src: {
5353- type: 'string',
5454- format: 'did',
5555- description: 'DID of the actor who created this label.',
5656- },
5757- uri: {
5858- type: 'string',
5959- format: 'uri',
6060- description:
6161- 'AT URI of the record, repository (account), or other resource that this label applies to.',
6262- },
6363- cid: {
6464- type: 'string',
6565- format: 'cid',
6666- description:
6767- "Optionally, CID specifying the specific version of 'uri' resource this label applies to.",
6868- },
6969- val: {
7070- type: 'string',
7171- maxLength: 128,
7272- description:
7373- 'The short string name of the value or type of this label.',
7474- },
7575- neg: {
7676- type: 'boolean',
7777- description:
7878- 'If true, this is a negation label, overwriting a previous label.',
7979- },
8080- cts: {
8181- type: 'string',
8282- format: 'datetime',
8383- description: 'Timestamp when this label was created.',
8484- },
8585- exp: {
8686- type: 'string',
8787- format: 'datetime',
8888- description:
8989- 'Timestamp at which this label expires (no longer applies).',
9090- },
9191- sig: {
9292- type: 'bytes',
9393- description: 'Signature of dag-cbor encoded label.',
9494- },
9595- },
9696- },
9797- selfLabels: {
9898- type: 'object',
9999- description:
100100- 'Metadata tags on an atproto record, published by the author within the record.',
101101- required: ['values'],
102102- properties: {
103103- values: {
104104- type: 'array',
105105- items: {
106106- type: 'ref',
107107- ref: 'lex:com.atproto.label.defs#selfLabel',
108108- },
109109- maxLength: 10,
110110- },
111111- },
112112- },
113113- selfLabel: {
114114- type: 'object',
115115- description:
116116- 'Metadata tag on an atproto record, published by the author within the record. Note that schemas should use #selfLabels, not #selfLabel.',
117117- required: ['val'],
118118- properties: {
119119- val: {
120120- type: 'string',
121121- maxLength: 128,
122122- description:
123123- 'The short string name of the value or type of this label.',
124124- },
125125- },
126126- },
127127- labelValueDefinition: {
128128- type: 'object',
129129- description:
130130- 'Declares a label value and its expected interpretations and behaviors.',
131131- required: ['identifier', 'severity', 'blurs', 'locales'],
132132- properties: {
133133- identifier: {
134134- type: 'string',
135135- description:
136136- "The value of the label being defined. Must only include lowercase ascii and the '-' character ([a-z-]+).",
137137- maxLength: 100,
138138- maxGraphemes: 100,
139139- },
140140- severity: {
141141- type: 'string',
142142- description:
143143- "How should a client visually convey this label? 'inform' means neutral and informational; 'alert' means negative and warning; 'none' means show nothing.",
144144- knownValues: ['inform', 'alert', 'none'],
145145- },
146146- blurs: {
147147- type: 'string',
148148- description:
149149- "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.",
150150- knownValues: ['content', 'media', 'none'],
151151- },
152152- defaultSetting: {
153153- type: 'string',
154154- description: 'The default setting for this label.',
155155- knownValues: ['ignore', 'warn', 'hide'],
156156- default: 'warn',
157157- },
158158- adultOnly: {
159159- type: 'boolean',
160160- description:
161161- 'Does the user need to have adult content enabled in order to configure this label?',
162162- },
163163- locales: {
164164- type: 'array',
165165- items: {
166166- type: 'ref',
167167- ref: 'lex:com.atproto.label.defs#labelValueDefinitionStrings',
168168- },
169169- },
170170- },
171171- },
172172- labelValueDefinitionStrings: {
173173- type: 'object',
174174- description:
175175- 'Strings which describe the label in the UI, localized into a specific language.',
176176- required: ['lang', 'name', 'description'],
177177- properties: {
178178- lang: {
179179- type: 'string',
180180- description:
181181- 'The code of the language these strings are written in.',
182182- format: 'language',
183183- },
184184- name: {
185185- type: 'string',
186186- description: 'A short human-readable name for the label.',
187187- maxGraphemes: 64,
188188- maxLength: 640,
189189- },
190190- description: {
191191- type: 'string',
192192- description:
193193- 'A longer description of what the label means and why it might be applied.',
194194- maxGraphemes: 10000,
195195- maxLength: 100000,
196196- },
197197- },
198198- },
199199- labelValue: {
200200- type: 'string',
201201- knownValues: [
202202- '!hide',
203203- '!no-promote',
204204- '!warn',
205205- '!no-unauthenticated',
206206- 'dmca-violation',
207207- 'doxxing',
208208- 'porn',
209209- 'sexual',
210210- 'nudity',
211211- 'nsfl',
212212- 'gore',
213213- ],
214214- },
215215- },
216216- },
217217- ComAtprotoRepoGetRecord: {
218218- lexicon: 1,
219219- id: 'com.atproto.repo.getRecord',
220220- defs: {
221221- main: {
222222- type: 'query',
223223- description:
224224- 'Get a single record from a repository. Does not require auth.',
225225- parameters: {
226226- type: 'params',
227227- required: ['repo', 'collection', 'rkey'],
228228- properties: {
229229- repo: {
230230- type: 'string',
231231- format: 'at-identifier',
232232- description: 'The handle or DID of the repo.',
233233- },
234234- collection: {
235235- type: 'string',
236236- format: 'nsid',
237237- description: 'The NSID of the record collection.',
238238- },
239239- rkey: {
240240- type: 'string',
241241- description: 'The Record Key.',
242242- },
243243- cid: {
244244- type: 'string',
245245- format: 'cid',
246246- description:
247247- 'The CID of the version of the record. If not specified, then return the most recent version.',
248248- },
249249- },
250250- },
251251- output: {
252252- encoding: 'application/json',
253253- schema: {
254254- type: 'object',
255255- required: ['uri', 'value'],
256256- properties: {
257257- uri: {
258258- type: 'string',
259259- format: 'at-uri',
260260- },
261261- cid: {
262262- type: 'string',
263263- format: 'cid',
264264- },
265265- value: {
266266- type: 'unknown',
267267- },
268268- },
269269- },
270270- },
271271- errors: [
272272- {
273273- name: 'RecordNotFound',
274274- },
275275- ],
276276- },
277277- },
278278- },
279279- ComAtprotoRepoListRecords: {
280280- lexicon: 1,
281281- id: 'com.atproto.repo.listRecords',
282282- defs: {
283283- main: {
284284- type: 'query',
285285- description:
286286- 'List a range of records in a repository, matching a specific collection. Does not require auth.',
287287- parameters: {
288288- type: 'params',
289289- required: ['repo', 'collection'],
290290- properties: {
291291- repo: {
292292- type: 'string',
293293- format: 'at-identifier',
294294- description: 'The handle or DID of the repo.',
295295- },
296296- collection: {
297297- type: 'string',
298298- format: 'nsid',
299299- description: 'The NSID of the record type.',
300300- },
301301- limit: {
302302- type: 'integer',
303303- minimum: 1,
304304- maximum: 100,
305305- default: 50,
306306- description: 'The number of records to return.',
307307- },
308308- cursor: {
309309- type: 'string',
310310- },
311311- rkeyStart: {
312312- type: 'string',
313313- description:
314314- 'DEPRECATED: The lowest sort-ordered rkey to start from (exclusive)',
315315- },
316316- rkeyEnd: {
317317- type: 'string',
318318- description:
319319- 'DEPRECATED: The highest sort-ordered rkey to stop at (exclusive)',
320320- },
321321- reverse: {
322322- type: 'boolean',
323323- description: 'Flag to reverse the order of the returned records.',
324324- },
325325- },
326326- },
327327- output: {
328328- encoding: 'application/json',
329329- schema: {
330330- type: 'object',
331331- required: ['records'],
332332- properties: {
333333- cursor: {
334334- type: 'string',
335335- },
336336- records: {
337337- type: 'array',
338338- items: {
339339- type: 'ref',
340340- ref: 'lex:com.atproto.repo.listRecords#record',
341341- },
342342- },
343343- },
344344- },
345345- },
346346- },
347347- record: {
348348- type: 'object',
349349- required: ['uri', 'cid', 'value'],
350350- properties: {
351351- uri: {
352352- type: 'string',
353353- format: 'at-uri',
354354- },
355355- cid: {
356356- type: 'string',
357357- format: 'cid',
358358- },
359359- value: {
360360- type: 'unknown',
361361- },
362362- },
363363- },
364364- },
365365- },
366366- LiPlonkPaste: {
367367- lexicon: 1,
368368- id: 'li.plonk.paste',
369369- defs: {
370370- main: {
371371- type: 'record',
372372- key: 'tid',
373373- record: {
374374- type: 'object',
375375- required: ['code', 'shortUrl', 'lang', 'title', 'createdAt'],
376376- properties: {
377377- code: {
378378- type: 'string',
379379- minLength: 1,
380380- maxGraphemes: 65536,
381381- maxLength: 65536,
382382- },
383383- shortUrl: {
384384- type: 'string',
385385- minLength: 2,
386386- maxGraphemes: 10,
387387- maxLength: 10,
388388- },
389389- lang: {
390390- type: 'string',
391391- minLength: 1,
392392- maxGraphemes: 20,
393393- maxLength: 20,
394394- },
395395- title: {
396396- type: 'string',
397397- minLength: 1,
398398- maxGraphemes: 100,
399399- maxLength: 100,
400400- },
401401- createdAt: {
402402- type: 'string',
403403- format: 'datetime',
404404- },
405405- },
406406- },
407407- },
408408- },
409409- },
410410- AppBskyActorProfile: {
411411- lexicon: 1,
412412- id: 'app.bsky.actor.profile',
413413- defs: {
414414- main: {
415415- type: 'record',
416416- description: 'A declaration of a Bluesky account profile.',
417417- key: 'literal:self',
418418- record: {
419419- type: 'object',
420420- properties: {
421421- displayName: {
422422- type: 'string',
423423- maxGraphemes: 64,
424424- maxLength: 640,
425425- },
426426- description: {
427427- type: 'string',
428428- description: 'Free-form profile description text.',
429429- maxGraphemes: 256,
430430- maxLength: 2560,
431431- },
432432- avatar: {
433433- type: 'blob',
434434- description:
435435- "Small image to be displayed next to posts from account. AKA, 'profile picture'",
436436- accept: ['image/png', 'image/jpeg'],
437437- maxSize: 1000000,
438438- },
439439- banner: {
440440- type: 'blob',
441441- description:
442442- 'Larger horizontal image to display behind profile view.',
443443- accept: ['image/png', 'image/jpeg'],
444444- maxSize: 1000000,
445445- },
446446- labels: {
447447- type: 'union',
448448- description:
449449- 'Self-label values, specific to the Bluesky application, on the overall account.',
450450- refs: ['lex:com.atproto.label.defs#selfLabels'],
451451- },
452452- joinedViaStarterPack: {
453453- type: 'ref',
454454- ref: 'lex:com.atproto.repo.strongRef',
455455- },
456456- createdAt: {
457457- type: 'string',
458458- format: 'datetime',
459459- },
460460- },
461461- },
462462- },
463463- },
464464- },
465465- ComAtprotoRepoStrongRef: {
466466- lexicon: 1,
467467- id: 'com.atproto.repo.strongRef',
468468- description: 'A URI with a content-hash fingerprint.',
469469- defs: {
470470- main: {
471471- type: 'object',
472472- required: ['uri', 'cid'],
473473- properties: {
474474- uri: {
475475- type: 'string',
476476- format: 'at-uri',
477477- },
478478- cid: {
479479- type: 'string',
480480- format: 'cid',
481481- },
482482- },
483483- },
484484- },
485485- },
486486-}
487487-export const schemas: LexiconDoc[] = Object.values(schemaDict) as LexiconDoc[]
488488-export const lexicons: Lexicons = new Lexicons(schemas)
77+ LiPlonkComment: {
88+ lexicon: 1,
99+ id: "li.plonk.comment",
1010+ defs: {
1111+ main: {
1212+ type: "record",
1313+ key: "tid",
1414+ record: {
1515+ type: "object",
1616+ required: ["content", "createdAt", "post"],
1717+ properties: {
1818+ content: {
1919+ type: "string",
2020+ maxLength: 100000,
2121+ maxGraphemes: 10000,
2222+ description: "comment body",
2323+ },
2424+ createdAt: {
2525+ type: "string",
2626+ format: "datetime",
2727+ description: "comment creation timestamp",
2828+ },
2929+ post: {
3030+ type: "ref",
3131+ ref: "lex:com.atproto.repo.strongRef",
3232+ },
3333+ },
3434+ },
3535+ },
3636+ },
3737+ },
3838+ ComAtprotoLabelDefs: {
3939+ lexicon: 1,
4040+ id: "com.atproto.label.defs",
4141+ defs: {
4242+ label: {
4343+ type: "object",
4444+ description:
4545+ "Metadata tag on an atproto resource (eg, repo or record).",
4646+ required: ["src", "uri", "val", "cts"],
4747+ properties: {
4848+ ver: {
4949+ type: "integer",
5050+ description: "The AT Protocol version of the label object.",
5151+ },
5252+ src: {
5353+ type: "string",
5454+ format: "did",
5555+ description: "DID of the actor who created this label.",
5656+ },
5757+ uri: {
5858+ type: "string",
5959+ format: "uri",
6060+ description:
6161+ "AT URI of the record, repository (account), or other resource that this label applies to.",
6262+ },
6363+ cid: {
6464+ type: "string",
6565+ format: "cid",
6666+ description:
6767+ "Optionally, CID specifying the specific version of 'uri' resource this label applies to.",
6868+ },
6969+ val: {
7070+ type: "string",
7171+ maxLength: 128,
7272+ description:
7373+ "The short string name of the value or type of this label.",
7474+ },
7575+ neg: {
7676+ type: "boolean",
7777+ description:
7878+ "If true, this is a negation label, overwriting a previous label.",
7979+ },
8080+ cts: {
8181+ type: "string",
8282+ format: "datetime",
8383+ description: "Timestamp when this label was created.",
8484+ },
8585+ exp: {
8686+ type: "string",
8787+ format: "datetime",
8888+ description:
8989+ "Timestamp at which this label expires (no longer applies).",
9090+ },
9191+ sig: {
9292+ type: "bytes",
9393+ description: "Signature of dag-cbor encoded label.",
9494+ },
9595+ },
9696+ },
9797+ selfLabels: {
9898+ type: "object",
9999+ description:
100100+ "Metadata tags on an atproto record, published by the author within the record.",
101101+ required: ["values"],
102102+ properties: {
103103+ values: {
104104+ type: "array",
105105+ items: {
106106+ type: "ref",
107107+ ref: "lex:com.atproto.label.defs#selfLabel",
108108+ },
109109+ maxLength: 10,
110110+ },
111111+ },
112112+ },
113113+ selfLabel: {
114114+ type: "object",
115115+ description:
116116+ "Metadata tag on an atproto record, published by the author within the record. Note that schemas should use #selfLabels, not #selfLabel.",
117117+ required: ["val"],
118118+ properties: {
119119+ val: {
120120+ type: "string",
121121+ maxLength: 128,
122122+ description:
123123+ "The short string name of the value or type of this label.",
124124+ },
125125+ },
126126+ },
127127+ labelValueDefinition: {
128128+ type: "object",
129129+ description:
130130+ "Declares a label value and its expected interpretations and behaviors.",
131131+ required: ["identifier", "severity", "blurs", "locales"],
132132+ properties: {
133133+ identifier: {
134134+ type: "string",
135135+ description:
136136+ "The value of the label being defined. Must only include lowercase ascii and the '-' character ([a-z-]+).",
137137+ maxLength: 100,
138138+ maxGraphemes: 100,
139139+ },
140140+ severity: {
141141+ type: "string",
142142+ description:
143143+ "How should a client visually convey this label? 'inform' means neutral and informational; 'alert' means negative and warning; 'none' means show nothing.",
144144+ knownValues: ["inform", "alert", "none"],
145145+ },
146146+ blurs: {
147147+ type: "string",
148148+ description:
149149+ "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.",
150150+ knownValues: ["content", "media", "none"],
151151+ },
152152+ defaultSetting: {
153153+ type: "string",
154154+ description: "The default setting for this label.",
155155+ knownValues: ["ignore", "warn", "hide"],
156156+ default: "warn",
157157+ },
158158+ adultOnly: {
159159+ type: "boolean",
160160+ description:
161161+ "Does the user need to have adult content enabled in order to configure this label?",
162162+ },
163163+ locales: {
164164+ type: "array",
165165+ items: {
166166+ type: "ref",
167167+ ref: "lex:com.atproto.label.defs#labelValueDefinitionStrings",
168168+ },
169169+ },
170170+ },
171171+ },
172172+ labelValueDefinitionStrings: {
173173+ type: "object",
174174+ description:
175175+ "Strings which describe the label in the UI, localized into a specific language.",
176176+ required: ["lang", "name", "description"],
177177+ properties: {
178178+ lang: {
179179+ type: "string",
180180+ description:
181181+ "The code of the language these strings are written in.",
182182+ format: "language",
183183+ },
184184+ name: {
185185+ type: "string",
186186+ description: "A short human-readable name for the label.",
187187+ maxGraphemes: 64,
188188+ maxLength: 640,
189189+ },
190190+ description: {
191191+ type: "string",
192192+ description:
193193+ "A longer description of what the label means and why it might be applied.",
194194+ maxGraphemes: 10000,
195195+ maxLength: 100000,
196196+ },
197197+ },
198198+ },
199199+ labelValue: {
200200+ type: "string",
201201+ knownValues: [
202202+ "!hide",
203203+ "!no-promote",
204204+ "!warn",
205205+ "!no-unauthenticated",
206206+ "dmca-violation",
207207+ "doxxing",
208208+ "porn",
209209+ "sexual",
210210+ "nudity",
211211+ "nsfl",
212212+ "gore",
213213+ ],
214214+ },
215215+ },
216216+ },
217217+ ComAtprotoRepoGetRecord: {
218218+ lexicon: 1,
219219+ id: "com.atproto.repo.getRecord",
220220+ defs: {
221221+ main: {
222222+ type: "query",
223223+ description:
224224+ "Get a single record from a repository. Does not require auth.",
225225+ parameters: {
226226+ type: "params",
227227+ required: ["repo", "collection", "rkey"],
228228+ properties: {
229229+ repo: {
230230+ type: "string",
231231+ format: "at-identifier",
232232+ description: "The handle or DID of the repo.",
233233+ },
234234+ collection: {
235235+ type: "string",
236236+ format: "nsid",
237237+ description: "The NSID of the record collection.",
238238+ },
239239+ rkey: {
240240+ type: "string",
241241+ description: "The Record Key.",
242242+ },
243243+ cid: {
244244+ type: "string",
245245+ format: "cid",
246246+ description:
247247+ "The CID of the version of the record. If not specified, then return the most recent version.",
248248+ },
249249+ },
250250+ },
251251+ output: {
252252+ encoding: "application/json",
253253+ schema: {
254254+ type: "object",
255255+ required: ["uri", "value"],
256256+ properties: {
257257+ uri: {
258258+ type: "string",
259259+ format: "at-uri",
260260+ },
261261+ cid: {
262262+ type: "string",
263263+ format: "cid",
264264+ },
265265+ value: {
266266+ type: "unknown",
267267+ },
268268+ },
269269+ },
270270+ },
271271+ errors: [
272272+ {
273273+ name: "RecordNotFound",
274274+ },
275275+ ],
276276+ },
277277+ },
278278+ },
279279+ ComAtprotoRepoListRecords: {
280280+ lexicon: 1,
281281+ id: "com.atproto.repo.listRecords",
282282+ defs: {
283283+ main: {
284284+ type: "query",
285285+ description:
286286+ "List a range of records in a repository, matching a specific collection. Does not require auth.",
287287+ parameters: {
288288+ type: "params",
289289+ required: ["repo", "collection"],
290290+ properties: {
291291+ repo: {
292292+ type: "string",
293293+ format: "at-identifier",
294294+ description: "The handle or DID of the repo.",
295295+ },
296296+ collection: {
297297+ type: "string",
298298+ format: "nsid",
299299+ description: "The NSID of the record type.",
300300+ },
301301+ limit: {
302302+ type: "integer",
303303+ minimum: 1,
304304+ maximum: 100,
305305+ default: 50,
306306+ description: "The number of records to return.",
307307+ },
308308+ cursor: {
309309+ type: "string",
310310+ },
311311+ rkeyStart: {
312312+ type: "string",
313313+ description:
314314+ "DEPRECATED: The lowest sort-ordered rkey to start from (exclusive)",
315315+ },
316316+ rkeyEnd: {
317317+ type: "string",
318318+ description:
319319+ "DEPRECATED: The highest sort-ordered rkey to stop at (exclusive)",
320320+ },
321321+ reverse: {
322322+ type: "boolean",
323323+ description: "Flag to reverse the order of the returned records.",
324324+ },
325325+ },
326326+ },
327327+ output: {
328328+ encoding: "application/json",
329329+ schema: {
330330+ type: "object",
331331+ required: ["records"],
332332+ properties: {
333333+ cursor: {
334334+ type: "string",
335335+ },
336336+ records: {
337337+ type: "array",
338338+ items: {
339339+ type: "ref",
340340+ ref: "lex:com.atproto.repo.listRecords#record",
341341+ },
342342+ },
343343+ },
344344+ },
345345+ },
346346+ },
347347+ record: {
348348+ type: "object",
349349+ required: ["uri", "cid", "value"],
350350+ properties: {
351351+ uri: {
352352+ type: "string",
353353+ format: "at-uri",
354354+ },
355355+ cid: {
356356+ type: "string",
357357+ format: "cid",
358358+ },
359359+ value: {
360360+ type: "unknown",
361361+ },
362362+ },
363363+ },
364364+ },
365365+ },
366366+ LiPlonkPaste: {
367367+ lexicon: 1,
368368+ id: "li.plonk.paste",
369369+ defs: {
370370+ main: {
371371+ type: "record",
372372+ key: "tid",
373373+ record: {
374374+ type: "object",
375375+ required: ["code", "shortUrl", "lang", "title", "createdAt"],
376376+ properties: {
377377+ code: {
378378+ type: "string",
379379+ minLength: 1,
380380+ maxGraphemes: 65536,
381381+ maxLength: 65536,
382382+ },
383383+ shortUrl: {
384384+ type: "string",
385385+ minLength: 2,
386386+ maxGraphemes: 10,
387387+ maxLength: 10,
388388+ },
389389+ lang: {
390390+ type: "string",
391391+ minLength: 1,
392392+ maxGraphemes: 20,
393393+ maxLength: 20,
394394+ },
395395+ title: {
396396+ type: "string",
397397+ minLength: 1,
398398+ maxGraphemes: 100,
399399+ maxLength: 100,
400400+ },
401401+ createdAt: {
402402+ type: "string",
403403+ format: "datetime",
404404+ },
405405+ },
406406+ },
407407+ },
408408+ },
409409+ },
410410+ AppBskyActorProfile: {
411411+ lexicon: 1,
412412+ id: "app.bsky.actor.profile",
413413+ defs: {
414414+ main: {
415415+ type: "record",
416416+ description: "A declaration of a Bluesky account profile.",
417417+ key: "literal:self",
418418+ record: {
419419+ type: "object",
420420+ properties: {
421421+ displayName: {
422422+ type: "string",
423423+ maxGraphemes: 64,
424424+ maxLength: 640,
425425+ },
426426+ description: {
427427+ type: "string",
428428+ description: "Free-form profile description text.",
429429+ maxGraphemes: 256,
430430+ maxLength: 2560,
431431+ },
432432+ avatar: {
433433+ type: "blob",
434434+ description:
435435+ "Small image to be displayed next to posts from account. AKA, 'profile picture'",
436436+ accept: ["image/png", "image/jpeg"],
437437+ maxSize: 1000000,
438438+ },
439439+ banner: {
440440+ type: "blob",
441441+ description:
442442+ "Larger horizontal image to display behind profile view.",
443443+ accept: ["image/png", "image/jpeg"],
444444+ maxSize: 1000000,
445445+ },
446446+ labels: {
447447+ type: "union",
448448+ description:
449449+ "Self-label values, specific to the Bluesky application, on the overall account.",
450450+ refs: ["lex:com.atproto.label.defs#selfLabels"],
451451+ },
452452+ joinedViaStarterPack: {
453453+ type: "ref",
454454+ ref: "lex:com.atproto.repo.strongRef",
455455+ },
456456+ createdAt: {
457457+ type: "string",
458458+ format: "datetime",
459459+ },
460460+ },
461461+ },
462462+ },
463463+ },
464464+ },
465465+ ComAtprotoRepoStrongRef: {
466466+ lexicon: 1,
467467+ id: "com.atproto.repo.strongRef",
468468+ description: "A URI with a content-hash fingerprint.",
469469+ defs: {
470470+ main: {
471471+ type: "object",
472472+ required: ["uri", "cid"],
473473+ properties: {
474474+ uri: {
475475+ type: "string",
476476+ format: "at-uri",
477477+ },
478478+ cid: {
479479+ type: "string",
480480+ format: "cid",
481481+ },
482482+ },
483483+ },
484484+ },
485485+ },
486486+};
487487+export const schemas: LexiconDoc[] = Object.values(schemaDict) as LexiconDoc[];
488488+export const lexicons: Lexicons = new Lexicons(schemas);
489489export const ids = {
490490- LiPlonkComment: 'li.plonk.comment',
491491- ComAtprotoLabelDefs: 'com.atproto.label.defs',
492492- ComAtprotoRepoGetRecord: 'com.atproto.repo.getRecord',
493493- ComAtprotoRepoListRecords: 'com.atproto.repo.listRecords',
494494- LiPlonkPaste: 'li.plonk.paste',
495495- AppBskyActorProfile: 'app.bsky.actor.profile',
496496- ComAtprotoRepoStrongRef: 'com.atproto.repo.strongRef',
497497-}
490490+ LiPlonkComment: "li.plonk.comment",
491491+ ComAtprotoLabelDefs: "com.atproto.label.defs",
492492+ ComAtprotoRepoGetRecord: "com.atproto.repo.getRecord",
493493+ ComAtprotoRepoListRecords: "com.atproto.repo.listRecords",
494494+ LiPlonkPaste: "li.plonk.paste",
495495+ AppBskyActorProfile: "app.bsky.actor.profile",
496496+ ComAtprotoRepoStrongRef: "com.atproto.repo.strongRef",
497497+};
+26-26
src/lexicons/types/app/bsky/actor/profile.ts
···11/**
22 * GENERATED CODE - DO NOT MODIFY
33 */
44-import { ValidationResult, BlobRef } from '@atproto/lexicon'
55-import { lexicons } from '../../../../lexicons'
66-import { isObj, hasProp } from '../../../../util'
77-import { CID } from 'multiformats/cid'
88-import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs'
99-import * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef'
44+import { ValidationResult, BlobRef } from "@atproto/lexicon";
55+import { lexicons } from "../../../../lexicons";
66+import { isObj, hasProp } from "../../../../util";
77+import { CID } from "multiformats/cid";
88+import * as ComAtprotoLabelDefs from "../../../com/atproto/label/defs";
99+import * as ComAtprotoRepoStrongRef from "../../../com/atproto/repo/strongRef";
10101111export interface Record {
1212- displayName?: string
1313- /** Free-form profile description text. */
1414- description?: string
1515- /** Small image to be displayed next to posts from account. AKA, 'profile picture' */
1616- avatar?: BlobRef
1717- /** Larger horizontal image to display behind profile view. */
1818- banner?: BlobRef
1919- labels?:
2020- | ComAtprotoLabelDefs.SelfLabels
2121- | { $type: string; [k: string]: unknown }
2222- joinedViaStarterPack?: ComAtprotoRepoStrongRef.Main
2323- createdAt?: string
2424- [k: string]: unknown
1212+ displayName?: string;
1313+ /** Free-form profile description text. */
1414+ description?: string;
1515+ /** Small image to be displayed next to posts from account. AKA, 'profile picture' */
1616+ avatar?: BlobRef;
1717+ /** Larger horizontal image to display behind profile view. */
1818+ banner?: BlobRef;
1919+ labels?:
2020+ | ComAtprotoLabelDefs.SelfLabels
2121+ | { $type: string; [k: string]: unknown };
2222+ joinedViaStarterPack?: ComAtprotoRepoStrongRef.Main;
2323+ createdAt?: string;
2424+ [k: string]: unknown;
2525}
26262727export function isRecord(v: unknown): v is Record {
2828- return (
2929- isObj(v) &&
3030- hasProp(v, '$type') &&
3131- (v.$type === 'app.bsky.actor.profile#main' ||
3232- v.$type === 'app.bsky.actor.profile')
3333- )
2828+ return (
2929+ isObj(v) &&
3030+ hasProp(v, "$type") &&
3131+ (v.$type === "app.bsky.actor.profile#main" ||
3232+ v.$type === "app.bsky.actor.profile")
3333+ );
3434}
35353636export function validateRecord(v: unknown): ValidationResult {
3737- return lexicons.validate('app.bsky.actor.profile#main', v)
3737+ return lexicons.validate("app.bsky.actor.profile#main", v);
3838}
+94-94
src/lexicons/types/com/atproto/label/defs.ts
···11/**
22 * GENERATED CODE - DO NOT MODIFY
33 */
44-import { ValidationResult, BlobRef } from '@atproto/lexicon'
55-import { lexicons } from '../../../../lexicons'
66-import { isObj, hasProp } from '../../../../util'
77-import { CID } from 'multiformats/cid'
44+import { ValidationResult, BlobRef } from "@atproto/lexicon";
55+import { lexicons } from "../../../../lexicons";
66+import { isObj, hasProp } from "../../../../util";
77+import { CID } from "multiformats/cid";
8899/** Metadata tag on an atproto resource (eg, repo or record). */
1010export interface Label {
1111- /** The AT Protocol version of the label object. */
1212- ver?: number
1313- /** DID of the actor who created this label. */
1414- src: string
1515- /** AT URI of the record, repository (account), or other resource that this label applies to. */
1616- uri: string
1717- /** Optionally, CID specifying the specific version of 'uri' resource this label applies to. */
1818- cid?: string
1919- /** The short string name of the value or type of this label. */
2020- val: string
2121- /** If true, this is a negation label, overwriting a previous label. */
2222- neg?: boolean
2323- /** Timestamp when this label was created. */
2424- cts: string
2525- /** Timestamp at which this label expires (no longer applies). */
2626- exp?: string
2727- /** Signature of dag-cbor encoded label. */
2828- sig?: Uint8Array
2929- [k: string]: unknown
1111+ /** The AT Protocol version of the label object. */
1212+ ver?: number;
1313+ /** DID of the actor who created this label. */
1414+ src: string;
1515+ /** AT URI of the record, repository (account), or other resource that this label applies to. */
1616+ uri: string;
1717+ /** Optionally, CID specifying the specific version of 'uri' resource this label applies to. */
1818+ cid?: string;
1919+ /** The short string name of the value or type of this label. */
2020+ val: string;
2121+ /** If true, this is a negation label, overwriting a previous label. */
2222+ neg?: boolean;
2323+ /** Timestamp when this label was created. */
2424+ cts: string;
2525+ /** Timestamp at which this label expires (no longer applies). */
2626+ exp?: string;
2727+ /** Signature of dag-cbor encoded label. */
2828+ sig?: Uint8Array;
2929+ [k: string]: unknown;
3030}
31313232export function isLabel(v: unknown): v is Label {
3333- return (
3434- isObj(v) &&
3535- hasProp(v, '$type') &&
3636- v.$type === 'com.atproto.label.defs#label'
3737- )
3333+ return (
3434+ isObj(v) &&
3535+ hasProp(v, "$type") &&
3636+ v.$type === "com.atproto.label.defs#label"
3737+ );
3838}
39394040export function validateLabel(v: unknown): ValidationResult {
4141- return lexicons.validate('com.atproto.label.defs#label', v)
4141+ return lexicons.validate("com.atproto.label.defs#label", v);
4242}
43434444/** Metadata tags on an atproto record, published by the author within the record. */
4545export interface SelfLabels {
4646- values: SelfLabel[]
4747- [k: string]: unknown
4646+ values: SelfLabel[];
4747+ [k: string]: unknown;
4848}
49495050export function isSelfLabels(v: unknown): v is SelfLabels {
5151- return (
5252- isObj(v) &&
5353- hasProp(v, '$type') &&
5454- v.$type === 'com.atproto.label.defs#selfLabels'
5555- )
5151+ return (
5252+ isObj(v) &&
5353+ hasProp(v, "$type") &&
5454+ v.$type === "com.atproto.label.defs#selfLabels"
5555+ );
5656}
57575858export function validateSelfLabels(v: unknown): ValidationResult {
5959- return lexicons.validate('com.atproto.label.defs#selfLabels', v)
5959+ return lexicons.validate("com.atproto.label.defs#selfLabels", v);
6060}
61616262/** Metadata tag on an atproto record, published by the author within the record. Note that schemas should use #selfLabels, not #selfLabel. */
6363export interface SelfLabel {
6464- /** The short string name of the value or type of this label. */
6565- val: string
6666- [k: string]: unknown
6464+ /** The short string name of the value or type of this label. */
6565+ val: string;
6666+ [k: string]: unknown;
6767}
68686969export function isSelfLabel(v: unknown): v is SelfLabel {
7070- return (
7171- isObj(v) &&
7272- hasProp(v, '$type') &&
7373- v.$type === 'com.atproto.label.defs#selfLabel'
7474- )
7070+ return (
7171+ isObj(v) &&
7272+ hasProp(v, "$type") &&
7373+ v.$type === "com.atproto.label.defs#selfLabel"
7474+ );
7575}
76767777export function validateSelfLabel(v: unknown): ValidationResult {
7878- return lexicons.validate('com.atproto.label.defs#selfLabel', v)
7878+ return lexicons.validate("com.atproto.label.defs#selfLabel", v);
7979}
80808181/** Declares a label value and its expected interpretations and behaviors. */
8282export interface LabelValueDefinition {
8383- /** The value of the label being defined. Must only include lowercase ascii and the '-' character ([a-z-]+). */
8484- identifier: string
8585- /** How should a client visually convey this label? 'inform' means neutral and informational; 'alert' means negative and warning; 'none' means show nothing. */
8686- severity: 'inform' | 'alert' | 'none' | (string & {})
8787- /** 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. */
8888- blurs: 'content' | 'media' | 'none' | (string & {})
8989- /** The default setting for this label. */
9090- defaultSetting: 'ignore' | 'warn' | 'hide' | (string & {})
9191- /** Does the user need to have adult content enabled in order to configure this label? */
9292- adultOnly?: boolean
9393- locales: LabelValueDefinitionStrings[]
9494- [k: string]: unknown
8383+ /** The value of the label being defined. Must only include lowercase ascii and the '-' character ([a-z-]+). */
8484+ identifier: string;
8585+ /** How should a client visually convey this label? 'inform' means neutral and informational; 'alert' means negative and warning; 'none' means show nothing. */
8686+ severity: "inform" | "alert" | "none" | (string & {});
8787+ /** 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. */
8888+ blurs: "content" | "media" | "none" | (string & {});
8989+ /** The default setting for this label. */
9090+ defaultSetting: "ignore" | "warn" | "hide" | (string & {});
9191+ /** Does the user need to have adult content enabled in order to configure this label? */
9292+ adultOnly?: boolean;
9393+ locales: LabelValueDefinitionStrings[];
9494+ [k: string]: unknown;
9595}
96969797export function isLabelValueDefinition(v: unknown): v is LabelValueDefinition {
9898- return (
9999- isObj(v) &&
100100- hasProp(v, '$type') &&
101101- v.$type === 'com.atproto.label.defs#labelValueDefinition'
102102- )
9898+ return (
9999+ isObj(v) &&
100100+ hasProp(v, "$type") &&
101101+ v.$type === "com.atproto.label.defs#labelValueDefinition"
102102+ );
103103}
104104105105export function validateLabelValueDefinition(v: unknown): ValidationResult {
106106- return lexicons.validate('com.atproto.label.defs#labelValueDefinition', v)
106106+ return lexicons.validate("com.atproto.label.defs#labelValueDefinition", v);
107107}
108108109109/** Strings which describe the label in the UI, localized into a specific language. */
110110export interface LabelValueDefinitionStrings {
111111- /** The code of the language these strings are written in. */
112112- lang: string
113113- /** A short human-readable name for the label. */
114114- name: string
115115- /** A longer description of what the label means and why it might be applied. */
116116- description: string
117117- [k: string]: unknown
111111+ /** The code of the language these strings are written in. */
112112+ lang: string;
113113+ /** A short human-readable name for the label. */
114114+ name: string;
115115+ /** A longer description of what the label means and why it might be applied. */
116116+ description: string;
117117+ [k: string]: unknown;
118118}
119119120120export function isLabelValueDefinitionStrings(
121121- v: unknown,
121121+ v: unknown,
122122): v is LabelValueDefinitionStrings {
123123- return (
124124- isObj(v) &&
125125- hasProp(v, '$type') &&
126126- v.$type === 'com.atproto.label.defs#labelValueDefinitionStrings'
127127- )
123123+ return (
124124+ isObj(v) &&
125125+ hasProp(v, "$type") &&
126126+ v.$type === "com.atproto.label.defs#labelValueDefinitionStrings"
127127+ );
128128}
129129130130export function validateLabelValueDefinitionStrings(
131131- v: unknown,
131131+ v: unknown,
132132): ValidationResult {
133133- return lexicons.validate(
134134- 'com.atproto.label.defs#labelValueDefinitionStrings',
135135- v,
136136- )
133133+ return lexicons.validate(
134134+ "com.atproto.label.defs#labelValueDefinitionStrings",
135135+ v,
136136+ );
137137}
138138139139export type LabelValue =
140140- | '!hide'
141141- | '!no-promote'
142142- | '!warn'
143143- | '!no-unauthenticated'
144144- | 'dmca-violation'
145145- | 'doxxing'
146146- | 'porn'
147147- | 'sexual'
148148- | 'nudity'
149149- | 'nsfl'
150150- | 'gore'
151151- | (string & {})
140140+ | "!hide"
141141+ | "!no-promote"
142142+ | "!warn"
143143+ | "!no-unauthenticated"
144144+ | "dmca-violation"
145145+ | "doxxing"
146146+ | "porn"
147147+ | "sexual"
148148+ | "nudity"
149149+ | "nsfl"
150150+ | "gore"
151151+ | (string & {});
+35-35
src/lexicons/types/com/atproto/repo/getRecord.ts
···11/**
22 * GENERATED CODE - DO NOT MODIFY
33 */
44-import express from 'express'
55-import { ValidationResult, BlobRef } from '@atproto/lexicon'
66-import { lexicons } from '../../../../lexicons'
77-import { isObj, hasProp } from '../../../../util'
88-import { CID } from 'multiformats/cid'
99-import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
44+import express from "express";
55+import { ValidationResult, BlobRef } from "@atproto/lexicon";
66+import { lexicons } from "../../../../lexicons";
77+import { isObj, hasProp } from "../../../../util";
88+import { CID } from "multiformats/cid";
99+import { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server";
10101111export interface QueryParams {
1212- /** The handle or DID of the repo. */
1313- repo: string
1414- /** The NSID of the record collection. */
1515- collection: string
1616- /** The Record Key. */
1717- rkey: string
1818- /** The CID of the version of the record. If not specified, then return the most recent version. */
1919- cid?: string
1212+ /** The handle or DID of the repo. */
1313+ repo: string;
1414+ /** The NSID of the record collection. */
1515+ collection: string;
1616+ /** The Record Key. */
1717+ rkey: string;
1818+ /** The CID of the version of the record. If not specified, then return the most recent version. */
1919+ cid?: string;
2020}
21212222-export type InputSchema = undefined
2222+export type InputSchema = undefined;
23232424export interface OutputSchema {
2525- uri: string
2626- cid?: string
2727- value: {}
2828- [k: string]: unknown
2525+ uri: string;
2626+ cid?: string;
2727+ value: {};
2828+ [k: string]: unknown;
2929}
30303131-export type HandlerInput = undefined
3131+export type HandlerInput = undefined;
32323333export interface HandlerSuccess {
3434- encoding: 'application/json'
3535- body: OutputSchema
3636- headers?: { [key: string]: string }
3434+ encoding: "application/json";
3535+ body: OutputSchema;
3636+ headers?: { [key: string]: string };
3737}
38383939export interface HandlerError {
4040- status: number
4141- message?: string
4242- error?: 'RecordNotFound'
4040+ status: number;
4141+ message?: string;
4242+ error?: "RecordNotFound";
4343}
44444545-export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
4545+export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough;
4646export type HandlerReqCtx<HA extends HandlerAuth = never> = {
4747- auth: HA
4848- params: QueryParams
4949- input: HandlerInput
5050- req: express.Request
5151- res: express.Response
5252-}
4747+ auth: HA;
4848+ params: QueryParams;
4949+ input: HandlerInput;
5050+ req: express.Request;
5151+ res: express.Response;
5252+};
5353export type Handler<HA extends HandlerAuth = never> = (
5454- ctx: HandlerReqCtx<HA>,
5555-) => Promise<HandlerOutput> | HandlerOutput
5454+ ctx: HandlerReqCtx<HA>,
5555+) => Promise<HandlerOutput> | HandlerOutput;
···22 * GENERATED CODE - DO NOT MODIFY
33 */
44export function isObj(v: unknown): v is Record<string, unknown> {
55- return typeof v === 'object' && v !== null
55+ return typeof v === "object" && v !== null;
66}
7788export function hasProp<K extends PropertyKey>(
99- data: object,
1010- prop: K,
99+ data: object,
1010+ prop: K,
1111): data is Record<K, unknown> {
1212- return prop in data
1212+ return prop in data;
1313}
+17
src/mixins/header.pug
···11+mixin header(ownDid, didHandleMap)
22+ div.header
33+ div.left-side
44+ if ownDid
55+ | logged in as @#{didHandleMap[ownDid]}
66+ div.right-side
77+ p
88+ a(href="/") home
99+ | ·
1010+ if ownDid
1111+ a(href=`/u/${encodeURIComponent(ownDid)}`) my plonks
1212+ | ·
1313+ a(href="/logout") logout
1414+ else
1515+ a(href="/login") login
1616+ | to get plonkin'
1717+
···11include ../mixins/mkPost
22include ../mixins/head
33+include ../mixins/header
34include ../mixins/utils
45include ../mixins/post
56···2425 +head("timeline")
2526 body
2627 main#content
2727- div.header
2828- div.left-side
2929- if ownDid
3030- | logged in as @#{didHandleMap[ownDid]}
3131- div.right-side
3232- if ownDid
3333- p
3434- a(href=`/u/${encodeURIComponent(ownDid)}`) my plonks
3535- | ·
3636- a(href="/logout") logout
3737- else
3838- p
3939- a(href="/login") login
4040- | to get plonkin'
2828+ +header(ownDid, didHandleMap)
41294230 if ownDid
4331 +mkPost()
+2
src/views/paste.pug
···11- var now = new Date()
22include ../mixins/head
33+include ../mixins/header
34include ../mixins/utils
45doctype html
56html
67 +head(paste.title)
78 body
89 main#content
1010+ +header(ownDid, didHandleMap)
911 h1 #{paste.title}
1012 p
1113 | by @#{didHandleMap[authorDid]} ·
+2
src/views/user.pug
···11- var now = new Date()
22- var handle = didHandleMap[authorDid]
33include ../mixins/head
44+include ../mixins/header
45include ../mixins/utils
56include ../mixins/post
67doctype html
···89 +head(handle)
910 body
1011 main#content
1212+ +header(ownDid, didHandleMap)
1113 h1 plonks by @#{handle}
1214 div.timeline
1315 each paste in pastes