grain.social is a photo sharing platform built on atproto.
1/**
2 * GENERATED CODE - DO NOT MODIFY
3 */
4import {
5 type LexiconDoc,
6 Lexicons,
7 ValidationError,
8 type ValidationResult,
9} from "npm:@atproto/lexicon"
10import { type $Typed, is$typed, maybe$typed } from './util.ts'
11
12export const schemaDict = {
13 AppBskyEmbedDefs: {
14 lexicon: 1,
15 id: 'app.bsky.embed.defs',
16 defs: {
17 aspectRatio: {
18 type: 'object',
19 required: ['width', 'height'],
20 properties: {
21 width: {
22 type: 'integer',
23 minimum: 1,
24 },
25 height: {
26 type: 'integer',
27 minimum: 1,
28 },
29 },
30 description:
31 'width:height represents an aspect ratio. It may be approximate, and may not correspond to absolute dimensions in any given unit.',
32 },
33 },
34 },
35 AppBskyEmbedRecord: {
36 lexicon: 1,
37 id: 'app.bsky.embed.record',
38 description:
39 'A representation of a record embedded in a Bluesky record (eg, a post). For example, a quote-post, or sharing a feed generator record.',
40 defs: {
41 main: {
42 type: 'object',
43 required: ['record'],
44 properties: {
45 record: {
46 ref: 'lex:com.atproto.repo.strongRef',
47 type: 'ref',
48 },
49 },
50 },
51 view: {
52 type: 'object',
53 required: ['record'],
54 properties: {
55 record: {
56 refs: [
57 'lex:app.bsky.embed.record#viewRecord',
58 'lex:app.bsky.embed.record#viewNotFound',
59 'lex:app.bsky.embed.record#viewBlocked',
60 'lex:app.bsky.embed.record#viewDetached',
61 'lex:app.bsky.feed.defs#generatorView',
62 'lex:app.bsky.graph.defs#listView',
63 'lex:app.bsky.labeler.defs#labelerView',
64 'lex:app.bsky.graph.defs#starterPackViewBasic',
65 ],
66 type: 'union',
67 },
68 },
69 },
70 viewRecord: {
71 type: 'object',
72 required: ['uri', 'cid', 'author', 'value', 'indexedAt'],
73 properties: {
74 cid: {
75 type: 'string',
76 format: 'cid',
77 },
78 uri: {
79 type: 'string',
80 format: 'at-uri',
81 },
82 value: {
83 type: 'unknown',
84 description: 'The record data itself.',
85 },
86 author: {
87 ref: 'lex:app.bsky.actor.defs#profileViewBasic',
88 type: 'ref',
89 },
90 embeds: {
91 type: 'array',
92 items: {
93 refs: [
94 'lex:app.bsky.embed.images#view',
95 'lex:app.bsky.embed.video#view',
96 'lex:app.bsky.embed.external#view',
97 'lex:app.bsky.embed.record#view',
98 'lex:app.bsky.embed.recordWithMedia#view',
99 ],
100 type: 'union',
101 },
102 },
103 labels: {
104 type: 'array',
105 items: {
106 ref: 'lex:com.atproto.label.defs#label',
107 type: 'ref',
108 },
109 },
110 indexedAt: {
111 type: 'string',
112 format: 'datetime',
113 },
114 likeCount: {
115 type: 'integer',
116 },
117 quoteCount: {
118 type: 'integer',
119 },
120 replyCount: {
121 type: 'integer',
122 },
123 repostCount: {
124 type: 'integer',
125 },
126 },
127 },
128 viewBlocked: {
129 type: 'object',
130 required: ['uri', 'blocked', 'author'],
131 properties: {
132 uri: {
133 type: 'string',
134 format: 'at-uri',
135 },
136 author: {
137 ref: 'lex:app.bsky.feed.defs#blockedAuthor',
138 type: 'ref',
139 },
140 blocked: {
141 type: 'boolean',
142 const: true,
143 },
144 },
145 },
146 viewDetached: {
147 type: 'object',
148 required: ['uri', 'detached'],
149 properties: {
150 uri: {
151 type: 'string',
152 format: 'at-uri',
153 },
154 detached: {
155 type: 'boolean',
156 const: true,
157 },
158 },
159 },
160 viewNotFound: {
161 type: 'object',
162 required: ['uri', 'notFound'],
163 properties: {
164 uri: {
165 type: 'string',
166 format: 'at-uri',
167 },
168 notFound: {
169 type: 'boolean',
170 const: true,
171 },
172 },
173 },
174 },
175 },
176 AppBskyEmbedImages: {
177 lexicon: 1,
178 id: 'app.bsky.embed.images',
179 description: 'A set of images embedded in a Bluesky record (eg, a post).',
180 defs: {
181 main: {
182 type: 'object',
183 required: ['images'],
184 properties: {
185 images: {
186 type: 'array',
187 items: {
188 ref: 'lex:app.bsky.embed.images#image',
189 type: 'ref',
190 },
191 maxLength: 4,
192 },
193 },
194 },
195 view: {
196 type: 'object',
197 required: ['images'],
198 properties: {
199 images: {
200 type: 'array',
201 items: {
202 ref: 'lex:app.bsky.embed.images#viewImage',
203 type: 'ref',
204 },
205 maxLength: 4,
206 },
207 },
208 },
209 image: {
210 type: 'object',
211 required: ['image', 'alt'],
212 properties: {
213 alt: {
214 type: 'string',
215 description:
216 'Alt text description of the image, for accessibility.',
217 },
218 image: {
219 type: 'blob',
220 accept: ['image/*'],
221 maxSize: 1000000,
222 },
223 aspectRatio: {
224 ref: 'lex:app.bsky.embed.defs#aspectRatio',
225 type: 'ref',
226 },
227 },
228 },
229 viewImage: {
230 type: 'object',
231 required: ['thumb', 'fullsize', 'alt'],
232 properties: {
233 alt: {
234 type: 'string',
235 description:
236 'Alt text description of the image, for accessibility.',
237 },
238 thumb: {
239 type: 'string',
240 format: 'uri',
241 description:
242 'Fully-qualified URL where a thumbnail of the image can be fetched. For example, CDN location provided by the App View.',
243 },
244 fullsize: {
245 type: 'string',
246 format: 'uri',
247 description:
248 'Fully-qualified URL where a large version of the image can be fetched. May or may not be the exact original blob. For example, CDN location provided by the App View.',
249 },
250 aspectRatio: {
251 ref: 'lex:app.bsky.embed.defs#aspectRatio',
252 type: 'ref',
253 },
254 },
255 },
256 },
257 },
258 AppBskyEmbedRecordWithMedia: {
259 lexicon: 1,
260 id: 'app.bsky.embed.recordWithMedia',
261 description:
262 'A representation of a record embedded in a Bluesky record (eg, a post), alongside other compatible embeds. For example, a quote post and image, or a quote post and external URL card.',
263 defs: {
264 main: {
265 type: 'object',
266 required: ['record', 'media'],
267 properties: {
268 media: {
269 refs: [
270 'lex:app.bsky.embed.images',
271 'lex:app.bsky.embed.video',
272 'lex:app.bsky.embed.external',
273 ],
274 type: 'union',
275 },
276 record: {
277 ref: 'lex:app.bsky.embed.record',
278 type: 'ref',
279 },
280 },
281 },
282 view: {
283 type: 'object',
284 required: ['record', 'media'],
285 properties: {
286 media: {
287 refs: [
288 'lex:app.bsky.embed.images#view',
289 'lex:app.bsky.embed.video#view',
290 'lex:app.bsky.embed.external#view',
291 ],
292 type: 'union',
293 },
294 record: {
295 ref: 'lex:app.bsky.embed.record#view',
296 type: 'ref',
297 },
298 },
299 },
300 },
301 },
302 AppBskyEmbedVideo: {
303 lexicon: 1,
304 id: 'app.bsky.embed.video',
305 description: 'A video embedded in a Bluesky record (eg, a post).',
306 defs: {
307 main: {
308 type: 'object',
309 required: ['video'],
310 properties: {
311 alt: {
312 type: 'string',
313 maxLength: 10000,
314 description:
315 'Alt text description of the video, for accessibility.',
316 maxGraphemes: 1000,
317 },
318 video: {
319 type: 'blob',
320 accept: ['video/mp4'],
321 maxSize: 50000000,
322 },
323 captions: {
324 type: 'array',
325 items: {
326 ref: 'lex:app.bsky.embed.video#caption',
327 type: 'ref',
328 },
329 maxLength: 20,
330 },
331 aspectRatio: {
332 ref: 'lex:app.bsky.embed.defs#aspectRatio',
333 type: 'ref',
334 },
335 },
336 },
337 view: {
338 type: 'object',
339 required: ['cid', 'playlist'],
340 properties: {
341 alt: {
342 type: 'string',
343 maxLength: 10000,
344 maxGraphemes: 1000,
345 },
346 cid: {
347 type: 'string',
348 format: 'cid',
349 },
350 playlist: {
351 type: 'string',
352 format: 'uri',
353 },
354 thumbnail: {
355 type: 'string',
356 format: 'uri',
357 },
358 aspectRatio: {
359 ref: 'lex:app.bsky.embed.defs#aspectRatio',
360 type: 'ref',
361 },
362 },
363 },
364 caption: {
365 type: 'object',
366 required: ['lang', 'file'],
367 properties: {
368 file: {
369 type: 'blob',
370 accept: ['text/vtt'],
371 maxSize: 20000,
372 },
373 lang: {
374 type: 'string',
375 format: 'language',
376 },
377 },
378 },
379 },
380 },
381 AppBskyEmbedExternal: {
382 lexicon: 1,
383 id: 'app.bsky.embed.external',
384 defs: {
385 main: {
386 type: 'object',
387 required: ['external'],
388 properties: {
389 external: {
390 ref: 'lex:app.bsky.embed.external#external',
391 type: 'ref',
392 },
393 },
394 description:
395 "A representation of some externally linked content (eg, a URL and 'card'), embedded in a Bluesky record (eg, a post).",
396 },
397 view: {
398 type: 'object',
399 required: ['external'],
400 properties: {
401 external: {
402 ref: 'lex:app.bsky.embed.external#viewExternal',
403 type: 'ref',
404 },
405 },
406 },
407 external: {
408 type: 'object',
409 required: ['uri', 'title', 'description'],
410 properties: {
411 uri: {
412 type: 'string',
413 format: 'uri',
414 },
415 thumb: {
416 type: 'blob',
417 accept: ['image/*'],
418 maxSize: 1000000,
419 },
420 title: {
421 type: 'string',
422 },
423 description: {
424 type: 'string',
425 },
426 },
427 },
428 viewExternal: {
429 type: 'object',
430 required: ['uri', 'title', 'description'],
431 properties: {
432 uri: {
433 type: 'string',
434 format: 'uri',
435 },
436 thumb: {
437 type: 'string',
438 format: 'uri',
439 },
440 title: {
441 type: 'string',
442 },
443 description: {
444 type: 'string',
445 },
446 },
447 },
448 },
449 },
450 AppBskyGraphFollow: {
451 lexicon: 1,
452 id: 'app.bsky.graph.follow',
453 defs: {
454 main: {
455 key: 'tid',
456 type: 'record',
457 record: {
458 type: 'object',
459 required: ['subject', 'createdAt'],
460 properties: {
461 subject: {
462 type: 'string',
463 format: 'did',
464 },
465 createdAt: {
466 type: 'string',
467 format: 'datetime',
468 },
469 },
470 },
471 description:
472 "Record declaring a social 'follow' relationship of another account. Duplicate follows will be ignored by the AppView.",
473 },
474 },
475 },
476 AppBskyGraphDefs: {
477 lexicon: 1,
478 id: 'app.bsky.graph.defs',
479 defs: {
480 modlist: {
481 type: 'token',
482 description:
483 'A list of actors to apply an aggregate moderation action (mute/block) on.',
484 },
485 listView: {
486 type: 'object',
487 required: ['uri', 'cid', 'creator', 'name', 'purpose', 'indexedAt'],
488 properties: {
489 cid: {
490 type: 'string',
491 format: 'cid',
492 },
493 uri: {
494 type: 'string',
495 format: 'at-uri',
496 },
497 name: {
498 type: 'string',
499 maxLength: 64,
500 minLength: 1,
501 },
502 avatar: {
503 type: 'string',
504 format: 'uri',
505 },
506 labels: {
507 type: 'array',
508 items: {
509 ref: 'lex:com.atproto.label.defs#label',
510 type: 'ref',
511 },
512 },
513 viewer: {
514 ref: 'lex:app.bsky.graph.defs#listViewerState',
515 type: 'ref',
516 },
517 creator: {
518 ref: 'lex:app.bsky.actor.defs#profileView',
519 type: 'ref',
520 },
521 purpose: {
522 ref: 'lex:app.bsky.graph.defs#listPurpose',
523 type: 'ref',
524 },
525 indexedAt: {
526 type: 'string',
527 format: 'datetime',
528 },
529 description: {
530 type: 'string',
531 maxLength: 3000,
532 maxGraphemes: 300,
533 },
534 listItemCount: {
535 type: 'integer',
536 minimum: 0,
537 },
538 descriptionFacets: {
539 type: 'array',
540 items: {
541 ref: 'lex:app.bsky.richtext.facet',
542 type: 'ref',
543 },
544 },
545 },
546 },
547 curatelist: {
548 type: 'token',
549 description:
550 'A list of actors used for curation purposes such as list feeds or interaction gating.',
551 },
552 listPurpose: {
553 type: 'string',
554 knownValues: [
555 'app.bsky.graph.defs#modlist',
556 'app.bsky.graph.defs#curatelist',
557 'app.bsky.graph.defs#referencelist',
558 ],
559 },
560 listItemView: {
561 type: 'object',
562 required: ['uri', 'subject'],
563 properties: {
564 uri: {
565 type: 'string',
566 format: 'at-uri',
567 },
568 subject: {
569 ref: 'lex:app.bsky.actor.defs#profileView',
570 type: 'ref',
571 },
572 },
573 },
574 relationship: {
575 type: 'object',
576 required: ['did'],
577 properties: {
578 did: {
579 type: 'string',
580 format: 'did',
581 },
582 following: {
583 type: 'string',
584 format: 'at-uri',
585 description:
586 'if the actor follows this DID, this is the AT-URI of the follow record',
587 },
588 followedBy: {
589 type: 'string',
590 format: 'at-uri',
591 description:
592 'if the actor is followed by this DID, contains the AT-URI of the follow record',
593 },
594 },
595 description:
596 'lists the bi-directional graph relationships between one actor (not indicated in the object), and the target actors (the DID included in the object)',
597 },
598 listViewBasic: {
599 type: 'object',
600 required: ['uri', 'cid', 'name', 'purpose'],
601 properties: {
602 cid: {
603 type: 'string',
604 format: 'cid',
605 },
606 uri: {
607 type: 'string',
608 format: 'at-uri',
609 },
610 name: {
611 type: 'string',
612 maxLength: 64,
613 minLength: 1,
614 },
615 avatar: {
616 type: 'string',
617 format: 'uri',
618 },
619 labels: {
620 type: 'array',
621 items: {
622 ref: 'lex:com.atproto.label.defs#label',
623 type: 'ref',
624 },
625 },
626 viewer: {
627 ref: 'lex:app.bsky.graph.defs#listViewerState',
628 type: 'ref',
629 },
630 purpose: {
631 ref: 'lex:app.bsky.graph.defs#listPurpose',
632 type: 'ref',
633 },
634 indexedAt: {
635 type: 'string',
636 format: 'datetime',
637 },
638 listItemCount: {
639 type: 'integer',
640 minimum: 0,
641 },
642 },
643 },
644 notFoundActor: {
645 type: 'object',
646 required: ['actor', 'notFound'],
647 properties: {
648 actor: {
649 type: 'string',
650 format: 'at-identifier',
651 },
652 notFound: {
653 type: 'boolean',
654 const: true,
655 },
656 },
657 description: 'indicates that a handle or DID could not be resolved',
658 },
659 referencelist: {
660 type: 'token',
661 description:
662 'A list of actors used for only for reference purposes such as within a starter pack.',
663 },
664 listViewerState: {
665 type: 'object',
666 properties: {
667 muted: {
668 type: 'boolean',
669 },
670 blocked: {
671 type: 'string',
672 format: 'at-uri',
673 },
674 },
675 },
676 starterPackView: {
677 type: 'object',
678 required: ['uri', 'cid', 'record', 'creator', 'indexedAt'],
679 properties: {
680 cid: {
681 type: 'string',
682 format: 'cid',
683 },
684 uri: {
685 type: 'string',
686 format: 'at-uri',
687 },
688 list: {
689 ref: 'lex:app.bsky.graph.defs#listViewBasic',
690 type: 'ref',
691 },
692 feeds: {
693 type: 'array',
694 items: {
695 ref: 'lex:app.bsky.feed.defs#generatorView',
696 type: 'ref',
697 },
698 maxLength: 3,
699 },
700 labels: {
701 type: 'array',
702 items: {
703 ref: 'lex:com.atproto.label.defs#label',
704 type: 'ref',
705 },
706 },
707 record: {
708 type: 'unknown',
709 },
710 creator: {
711 ref: 'lex:app.bsky.actor.defs#profileViewBasic',
712 type: 'ref',
713 },
714 indexedAt: {
715 type: 'string',
716 format: 'datetime',
717 },
718 joinedWeekCount: {
719 type: 'integer',
720 minimum: 0,
721 },
722 listItemsSample: {
723 type: 'array',
724 items: {
725 ref: 'lex:app.bsky.graph.defs#listItemView',
726 type: 'ref',
727 },
728 maxLength: 12,
729 },
730 joinedAllTimeCount: {
731 type: 'integer',
732 minimum: 0,
733 },
734 },
735 },
736 starterPackViewBasic: {
737 type: 'object',
738 required: ['uri', 'cid', 'record', 'creator', 'indexedAt'],
739 properties: {
740 cid: {
741 type: 'string',
742 format: 'cid',
743 },
744 uri: {
745 type: 'string',
746 format: 'at-uri',
747 },
748 labels: {
749 type: 'array',
750 items: {
751 ref: 'lex:com.atproto.label.defs#label',
752 type: 'ref',
753 },
754 },
755 record: {
756 type: 'unknown',
757 },
758 creator: {
759 ref: 'lex:app.bsky.actor.defs#profileViewBasic',
760 type: 'ref',
761 },
762 indexedAt: {
763 type: 'string',
764 format: 'datetime',
765 },
766 listItemCount: {
767 type: 'integer',
768 minimum: 0,
769 },
770 joinedWeekCount: {
771 type: 'integer',
772 minimum: 0,
773 },
774 joinedAllTimeCount: {
775 type: 'integer',
776 minimum: 0,
777 },
778 },
779 },
780 },
781 },
782 AppBskyFeedDefs: {
783 lexicon: 1,
784 id: 'app.bsky.feed.defs',
785 defs: {
786 postView: {
787 type: 'object',
788 required: ['uri', 'cid', 'author', 'record', 'indexedAt'],
789 properties: {
790 cid: {
791 type: 'string',
792 format: 'cid',
793 },
794 uri: {
795 type: 'string',
796 format: 'at-uri',
797 },
798 embed: {
799 refs: [
800 'lex:app.bsky.embed.images#view',
801 'lex:app.bsky.embed.video#view',
802 'lex:app.bsky.embed.external#view',
803 'lex:app.bsky.embed.record#view',
804 'lex:app.bsky.embed.recordWithMedia#view',
805 ],
806 type: 'union',
807 },
808 author: {
809 ref: 'lex:app.bsky.actor.defs#profileViewBasic',
810 type: 'ref',
811 },
812 labels: {
813 type: 'array',
814 items: {
815 ref: 'lex:com.atproto.label.defs#label',
816 type: 'ref',
817 },
818 },
819 record: {
820 type: 'unknown',
821 },
822 viewer: {
823 ref: 'lex:app.bsky.feed.defs#viewerState',
824 type: 'ref',
825 },
826 indexedAt: {
827 type: 'string',
828 format: 'datetime',
829 },
830 likeCount: {
831 type: 'integer',
832 },
833 quoteCount: {
834 type: 'integer',
835 },
836 replyCount: {
837 type: 'integer',
838 },
839 threadgate: {
840 ref: 'lex:app.bsky.feed.defs#threadgateView',
841 type: 'ref',
842 },
843 repostCount: {
844 type: 'integer',
845 },
846 },
847 },
848 replyRef: {
849 type: 'object',
850 required: ['root', 'parent'],
851 properties: {
852 root: {
853 refs: [
854 'lex:app.bsky.feed.defs#postView',
855 'lex:app.bsky.feed.defs#notFoundPost',
856 'lex:app.bsky.feed.defs#blockedPost',
857 ],
858 type: 'union',
859 },
860 parent: {
861 refs: [
862 'lex:app.bsky.feed.defs#postView',
863 'lex:app.bsky.feed.defs#notFoundPost',
864 'lex:app.bsky.feed.defs#blockedPost',
865 ],
866 type: 'union',
867 },
868 grandparentAuthor: {
869 ref: 'lex:app.bsky.actor.defs#profileViewBasic',
870 type: 'ref',
871 description:
872 'When parent is a reply to another post, this is the author of that post.',
873 },
874 },
875 },
876 reasonPin: {
877 type: 'object',
878 properties: {},
879 },
880 blockedPost: {
881 type: 'object',
882 required: ['uri', 'blocked', 'author'],
883 properties: {
884 uri: {
885 type: 'string',
886 format: 'at-uri',
887 },
888 author: {
889 ref: 'lex:app.bsky.feed.defs#blockedAuthor',
890 type: 'ref',
891 },
892 blocked: {
893 type: 'boolean',
894 const: true,
895 },
896 },
897 },
898 interaction: {
899 type: 'object',
900 properties: {
901 item: {
902 type: 'string',
903 format: 'at-uri',
904 },
905 event: {
906 type: 'string',
907 knownValues: [
908 'app.bsky.feed.defs#requestLess',
909 'app.bsky.feed.defs#requestMore',
910 'app.bsky.feed.defs#clickthroughItem',
911 'app.bsky.feed.defs#clickthroughAuthor',
912 'app.bsky.feed.defs#clickthroughReposter',
913 'app.bsky.feed.defs#clickthroughEmbed',
914 'app.bsky.feed.defs#interactionSeen',
915 'app.bsky.feed.defs#interactionLike',
916 'app.bsky.feed.defs#interactionRepost',
917 'app.bsky.feed.defs#interactionReply',
918 'app.bsky.feed.defs#interactionQuote',
919 'app.bsky.feed.defs#interactionShare',
920 ],
921 },
922 feedContext: {
923 type: 'string',
924 maxLength: 2000,
925 description:
926 'Context on a feed item that was originally supplied by the feed generator on getFeedSkeleton.',
927 },
928 },
929 },
930 requestLess: {
931 type: 'token',
932 description:
933 'Request that less content like the given feed item be shown in the feed',
934 },
935 requestMore: {
936 type: 'token',
937 description:
938 'Request that more content like the given feed item be shown in the feed',
939 },
940 viewerState: {
941 type: 'object',
942 properties: {
943 like: {
944 type: 'string',
945 format: 'at-uri',
946 },
947 pinned: {
948 type: 'boolean',
949 },
950 repost: {
951 type: 'string',
952 format: 'at-uri',
953 },
954 threadMuted: {
955 type: 'boolean',
956 },
957 replyDisabled: {
958 type: 'boolean',
959 },
960 embeddingDisabled: {
961 type: 'boolean',
962 },
963 },
964 description:
965 "Metadata about the requesting account's relationship with the subject content. Only has meaningful content for authed requests.",
966 },
967 feedViewPost: {
968 type: 'object',
969 required: ['post'],
970 properties: {
971 post: {
972 ref: 'lex:app.bsky.feed.defs#postView',
973 type: 'ref',
974 },
975 reply: {
976 ref: 'lex:app.bsky.feed.defs#replyRef',
977 type: 'ref',
978 },
979 reason: {
980 refs: [
981 'lex:app.bsky.feed.defs#reasonRepost',
982 'lex:app.bsky.feed.defs#reasonPin',
983 ],
984 type: 'union',
985 },
986 feedContext: {
987 type: 'string',
988 maxLength: 2000,
989 description:
990 'Context provided by feed generator that may be passed back alongside interactions.',
991 },
992 },
993 },
994 notFoundPost: {
995 type: 'object',
996 required: ['uri', 'notFound'],
997 properties: {
998 uri: {
999 type: 'string',
1000 format: 'at-uri',
1001 },
1002 notFound: {
1003 type: 'boolean',
1004 const: true,
1005 },
1006 },
1007 },
1008 reasonRepost: {
1009 type: 'object',
1010 required: ['by', 'indexedAt'],
1011 properties: {
1012 by: {
1013 ref: 'lex:app.bsky.actor.defs#profileViewBasic',
1014 type: 'ref',
1015 },
1016 indexedAt: {
1017 type: 'string',
1018 format: 'datetime',
1019 },
1020 },
1021 },
1022 blockedAuthor: {
1023 type: 'object',
1024 required: ['did'],
1025 properties: {
1026 did: {
1027 type: 'string',
1028 format: 'did',
1029 },
1030 viewer: {
1031 ref: 'lex:app.bsky.actor.defs#viewerState',
1032 type: 'ref',
1033 },
1034 },
1035 },
1036 generatorView: {
1037 type: 'object',
1038 required: ['uri', 'cid', 'did', 'creator', 'displayName', 'indexedAt'],
1039 properties: {
1040 cid: {
1041 type: 'string',
1042 format: 'cid',
1043 },
1044 did: {
1045 type: 'string',
1046 format: 'did',
1047 },
1048 uri: {
1049 type: 'string',
1050 format: 'at-uri',
1051 },
1052 avatar: {
1053 type: 'string',
1054 format: 'uri',
1055 },
1056 labels: {
1057 type: 'array',
1058 items: {
1059 ref: 'lex:com.atproto.label.defs#label',
1060 type: 'ref',
1061 },
1062 },
1063 viewer: {
1064 ref: 'lex:app.bsky.feed.defs#generatorViewerState',
1065 type: 'ref',
1066 },
1067 creator: {
1068 ref: 'lex:app.bsky.actor.defs#profileView',
1069 type: 'ref',
1070 },
1071 indexedAt: {
1072 type: 'string',
1073 format: 'datetime',
1074 },
1075 likeCount: {
1076 type: 'integer',
1077 minimum: 0,
1078 },
1079 contentMode: {
1080 type: 'string',
1081 knownValues: [
1082 'app.bsky.feed.defs#contentModeUnspecified',
1083 'app.bsky.feed.defs#contentModeVideo',
1084 ],
1085 },
1086 description: {
1087 type: 'string',
1088 maxLength: 3000,
1089 maxGraphemes: 300,
1090 },
1091 displayName: {
1092 type: 'string',
1093 },
1094 descriptionFacets: {
1095 type: 'array',
1096 items: {
1097 ref: 'lex:app.bsky.richtext.facet',
1098 type: 'ref',
1099 },
1100 },
1101 acceptsInteractions: {
1102 type: 'boolean',
1103 },
1104 },
1105 },
1106 threadContext: {
1107 type: 'object',
1108 properties: {
1109 rootAuthorLike: {
1110 type: 'string',
1111 format: 'at-uri',
1112 },
1113 },
1114 description:
1115 'Metadata about this post within the context of the thread it is in.',
1116 },
1117 threadViewPost: {
1118 type: 'object',
1119 required: ['post'],
1120 properties: {
1121 post: {
1122 ref: 'lex:app.bsky.feed.defs#postView',
1123 type: 'ref',
1124 },
1125 parent: {
1126 refs: [
1127 'lex:app.bsky.feed.defs#threadViewPost',
1128 'lex:app.bsky.feed.defs#notFoundPost',
1129 'lex:app.bsky.feed.defs#blockedPost',
1130 ],
1131 type: 'union',
1132 },
1133 replies: {
1134 type: 'array',
1135 items: {
1136 refs: [
1137 'lex:app.bsky.feed.defs#threadViewPost',
1138 'lex:app.bsky.feed.defs#notFoundPost',
1139 'lex:app.bsky.feed.defs#blockedPost',
1140 ],
1141 type: 'union',
1142 },
1143 },
1144 threadContext: {
1145 ref: 'lex:app.bsky.feed.defs#threadContext',
1146 type: 'ref',
1147 },
1148 },
1149 },
1150 threadgateView: {
1151 type: 'object',
1152 properties: {
1153 cid: {
1154 type: 'string',
1155 format: 'cid',
1156 },
1157 uri: {
1158 type: 'string',
1159 format: 'at-uri',
1160 },
1161 lists: {
1162 type: 'array',
1163 items: {
1164 ref: 'lex:app.bsky.graph.defs#listViewBasic',
1165 type: 'ref',
1166 },
1167 },
1168 record: {
1169 type: 'unknown',
1170 },
1171 },
1172 },
1173 interactionLike: {
1174 type: 'token',
1175 description: 'User liked the feed item',
1176 },
1177 interactionSeen: {
1178 type: 'token',
1179 description: 'Feed item was seen by user',
1180 },
1181 clickthroughItem: {
1182 type: 'token',
1183 description: 'User clicked through to the feed item',
1184 },
1185 contentModeVideo: {
1186 type: 'token',
1187 description:
1188 'Declares the feed generator returns posts containing app.bsky.embed.video embeds.',
1189 },
1190 interactionQuote: {
1191 type: 'token',
1192 description: 'User quoted the feed item',
1193 },
1194 interactionReply: {
1195 type: 'token',
1196 description: 'User replied to the feed item',
1197 },
1198 interactionShare: {
1199 type: 'token',
1200 description: 'User shared the feed item',
1201 },
1202 skeletonFeedPost: {
1203 type: 'object',
1204 required: ['post'],
1205 properties: {
1206 post: {
1207 type: 'string',
1208 format: 'at-uri',
1209 },
1210 reason: {
1211 refs: [
1212 'lex:app.bsky.feed.defs#skeletonReasonRepost',
1213 'lex:app.bsky.feed.defs#skeletonReasonPin',
1214 ],
1215 type: 'union',
1216 },
1217 feedContext: {
1218 type: 'string',
1219 maxLength: 2000,
1220 description:
1221 'Context that will be passed through to client and may be passed to feed generator back alongside interactions.',
1222 },
1223 },
1224 },
1225 clickthroughEmbed: {
1226 type: 'token',
1227 description:
1228 'User clicked through to the embedded content of the feed item',
1229 },
1230 interactionRepost: {
1231 type: 'token',
1232 description: 'User reposted the feed item',
1233 },
1234 skeletonReasonPin: {
1235 type: 'object',
1236 properties: {},
1237 },
1238 clickthroughAuthor: {
1239 type: 'token',
1240 description: 'User clicked through to the author of the feed item',
1241 },
1242 clickthroughReposter: {
1243 type: 'token',
1244 description: 'User clicked through to the reposter of the feed item',
1245 },
1246 generatorViewerState: {
1247 type: 'object',
1248 properties: {
1249 like: {
1250 type: 'string',
1251 format: 'at-uri',
1252 },
1253 },
1254 },
1255 skeletonReasonRepost: {
1256 type: 'object',
1257 required: ['repost'],
1258 properties: {
1259 repost: {
1260 type: 'string',
1261 format: 'at-uri',
1262 },
1263 },
1264 },
1265 contentModeUnspecified: {
1266 type: 'token',
1267 description: 'Declares the feed generator returns any types of posts.',
1268 },
1269 },
1270 },
1271 AppBskyFeedPostgate: {
1272 lexicon: 1,
1273 id: 'app.bsky.feed.postgate',
1274 defs: {
1275 main: {
1276 key: 'tid',
1277 type: 'record',
1278 record: {
1279 type: 'object',
1280 required: ['post', 'createdAt'],
1281 properties: {
1282 post: {
1283 type: 'string',
1284 format: 'at-uri',
1285 description: 'Reference (AT-URI) to the post record.',
1286 },
1287 createdAt: {
1288 type: 'string',
1289 format: 'datetime',
1290 },
1291 embeddingRules: {
1292 type: 'array',
1293 items: {
1294 refs: ['lex:app.bsky.feed.postgate#disableRule'],
1295 type: 'union',
1296 },
1297 maxLength: 5,
1298 description:
1299 'List of rules defining who can embed this post. If value is an empty array or is undefined, no particular rules apply and anyone can embed.',
1300 },
1301 detachedEmbeddingUris: {
1302 type: 'array',
1303 items: {
1304 type: 'string',
1305 format: 'at-uri',
1306 },
1307 maxLength: 50,
1308 description:
1309 'List of AT-URIs embedding this post that the author has detached from.',
1310 },
1311 },
1312 },
1313 description:
1314 'Record defining interaction rules for a post. The record key (rkey) of the postgate record must match the record key of the post, and that record must be in the same repository.',
1315 },
1316 disableRule: {
1317 type: 'object',
1318 properties: {},
1319 description: 'Disables embedding of this post.',
1320 },
1321 },
1322 },
1323 AppBskyFeedThreadgate: {
1324 lexicon: 1,
1325 id: 'app.bsky.feed.threadgate',
1326 defs: {
1327 main: {
1328 key: 'tid',
1329 type: 'record',
1330 record: {
1331 type: 'object',
1332 required: ['post', 'createdAt'],
1333 properties: {
1334 post: {
1335 type: 'string',
1336 format: 'at-uri',
1337 description: 'Reference (AT-URI) to the post record.',
1338 },
1339 allow: {
1340 type: 'array',
1341 items: {
1342 refs: [
1343 'lex:app.bsky.feed.threadgate#mentionRule',
1344 'lex:app.bsky.feed.threadgate#followerRule',
1345 'lex:app.bsky.feed.threadgate#followingRule',
1346 'lex:app.bsky.feed.threadgate#listRule',
1347 ],
1348 type: 'union',
1349 },
1350 maxLength: 5,
1351 description:
1352 'List of rules defining who can reply to this post. If value is an empty array, no one can reply. If value is undefined, anyone can reply.',
1353 },
1354 createdAt: {
1355 type: 'string',
1356 format: 'datetime',
1357 },
1358 hiddenReplies: {
1359 type: 'array',
1360 items: {
1361 type: 'string',
1362 format: 'at-uri',
1363 },
1364 maxLength: 50,
1365 description: 'List of hidden reply URIs.',
1366 },
1367 },
1368 },
1369 description:
1370 "Record defining interaction gating rules for a thread (aka, reply controls). The record key (rkey) of the threadgate record must match the record key of the thread's root post, and that record must be in the same repository.",
1371 },
1372 listRule: {
1373 type: 'object',
1374 required: ['list'],
1375 properties: {
1376 list: {
1377 type: 'string',
1378 format: 'at-uri',
1379 },
1380 },
1381 description: 'Allow replies from actors on a list.',
1382 },
1383 mentionRule: {
1384 type: 'object',
1385 properties: {},
1386 description: 'Allow replies from actors mentioned in your post.',
1387 },
1388 followerRule: {
1389 type: 'object',
1390 properties: {},
1391 description: 'Allow replies from actors who follow you.',
1392 },
1393 followingRule: {
1394 type: 'object',
1395 properties: {},
1396 description: 'Allow replies from actors you follow.',
1397 },
1398 },
1399 },
1400 AppBskyRichtextFacet: {
1401 lexicon: 1,
1402 id: 'app.bsky.richtext.facet',
1403 defs: {
1404 tag: {
1405 type: 'object',
1406 required: ['tag'],
1407 properties: {
1408 tag: {
1409 type: 'string',
1410 maxLength: 640,
1411 maxGraphemes: 64,
1412 },
1413 },
1414 description:
1415 "Facet feature for a hashtag. The text usually includes a '#' prefix, but the facet reference should not (except in the case of 'double hash tags').",
1416 },
1417 link: {
1418 type: 'object',
1419 required: ['uri'],
1420 properties: {
1421 uri: {
1422 type: 'string',
1423 format: 'uri',
1424 },
1425 },
1426 description:
1427 'Facet feature for a URL. The text URL may have been simplified or truncated, but the facet reference should be a complete URL.',
1428 },
1429 main: {
1430 type: 'object',
1431 required: ['index', 'features'],
1432 properties: {
1433 index: {
1434 ref: 'lex:app.bsky.richtext.facet#byteSlice',
1435 type: 'ref',
1436 },
1437 features: {
1438 type: 'array',
1439 items: {
1440 refs: [
1441 'lex:app.bsky.richtext.facet#mention',
1442 'lex:app.bsky.richtext.facet#link',
1443 'lex:app.bsky.richtext.facet#tag',
1444 ],
1445 type: 'union',
1446 },
1447 },
1448 },
1449 description: 'Annotation of a sub-string within rich text.',
1450 },
1451 mention: {
1452 type: 'object',
1453 required: ['did'],
1454 properties: {
1455 did: {
1456 type: 'string',
1457 format: 'did',
1458 },
1459 },
1460 description:
1461 "Facet feature for mention of another account. The text is usually a handle, including a '@' prefix, but the facet reference is a DID.",
1462 },
1463 byteSlice: {
1464 type: 'object',
1465 required: ['byteStart', 'byteEnd'],
1466 properties: {
1467 byteEnd: {
1468 type: 'integer',
1469 minimum: 0,
1470 },
1471 byteStart: {
1472 type: 'integer',
1473 minimum: 0,
1474 },
1475 },
1476 description:
1477 'Specifies the sub-string range a facet feature applies to. Start index is inclusive, end index is exclusive. Indices are zero-indexed, counting bytes of the UTF-8 encoded text. NOTE: some languages, like Javascript, use UTF-16 or Unicode codepoints for string slice indexing; in these languages, convert to byte arrays before working with facets.',
1478 },
1479 },
1480 },
1481 AppBskyActorDefs: {
1482 lexicon: 1,
1483 id: 'app.bsky.actor.defs',
1484 defs: {
1485 nux: {
1486 type: 'object',
1487 required: ['id', 'completed'],
1488 properties: {
1489 id: {
1490 type: 'string',
1491 maxLength: 100,
1492 },
1493 data: {
1494 type: 'string',
1495 maxLength: 3000,
1496 description:
1497 'Arbitrary data for the NUX. The structure is defined by the NUX itself. Limited to 300 characters.',
1498 maxGraphemes: 300,
1499 },
1500 completed: {
1501 type: 'boolean',
1502 default: false,
1503 },
1504 expiresAt: {
1505 type: 'string',
1506 format: 'datetime',
1507 description:
1508 'The date and time at which the NUX will expire and should be considered completed.',
1509 },
1510 },
1511 description: 'A new user experiences (NUX) storage object',
1512 },
1513 mutedWord: {
1514 type: 'object',
1515 required: ['value', 'targets'],
1516 properties: {
1517 id: {
1518 type: 'string',
1519 },
1520 value: {
1521 type: 'string',
1522 maxLength: 10000,
1523 description: 'The muted word itself.',
1524 maxGraphemes: 1000,
1525 },
1526 targets: {
1527 type: 'array',
1528 items: {
1529 ref: 'lex:app.bsky.actor.defs#mutedWordTarget',
1530 type: 'ref',
1531 },
1532 description: 'The intended targets of the muted word.',
1533 },
1534 expiresAt: {
1535 type: 'string',
1536 format: 'datetime',
1537 description:
1538 'The date and time at which the muted word will expire and no longer be applied.',
1539 },
1540 actorTarget: {
1541 type: 'string',
1542 default: 'all',
1543 description:
1544 'Groups of users to apply the muted word to. If undefined, applies to all users.',
1545 knownValues: ['all', 'exclude-following'],
1546 },
1547 },
1548 description: 'A word that the account owner has muted.',
1549 },
1550 savedFeed: {
1551 type: 'object',
1552 required: ['id', 'type', 'value', 'pinned'],
1553 properties: {
1554 id: {
1555 type: 'string',
1556 },
1557 type: {
1558 type: 'string',
1559 knownValues: ['feed', 'list', 'timeline'],
1560 },
1561 value: {
1562 type: 'string',
1563 },
1564 pinned: {
1565 type: 'boolean',
1566 },
1567 },
1568 },
1569 preferences: {
1570 type: 'array',
1571 items: {
1572 refs: [
1573 'lex:app.bsky.actor.defs#adultContentPref',
1574 'lex:app.bsky.actor.defs#contentLabelPref',
1575 'lex:app.bsky.actor.defs#savedFeedsPref',
1576 'lex:app.bsky.actor.defs#savedFeedsPrefV2',
1577 'lex:app.bsky.actor.defs#personalDetailsPref',
1578 'lex:app.bsky.actor.defs#feedViewPref',
1579 'lex:app.bsky.actor.defs#threadViewPref',
1580 'lex:app.bsky.actor.defs#interestsPref',
1581 'lex:app.bsky.actor.defs#mutedWordsPref',
1582 'lex:app.bsky.actor.defs#hiddenPostsPref',
1583 'lex:app.bsky.actor.defs#bskyAppStatePref',
1584 'lex:app.bsky.actor.defs#labelersPref',
1585 'lex:app.bsky.actor.defs#postInteractionSettingsPref',
1586 ],
1587 type: 'union',
1588 },
1589 },
1590 profileView: {
1591 type: 'object',
1592 required: ['did', 'handle'],
1593 properties: {
1594 did: {
1595 type: 'string',
1596 format: 'did',
1597 },
1598 avatar: {
1599 type: 'string',
1600 format: 'uri',
1601 },
1602 handle: {
1603 type: 'string',
1604 format: 'handle',
1605 },
1606 labels: {
1607 type: 'array',
1608 items: {
1609 ref: 'lex:com.atproto.label.defs#label',
1610 type: 'ref',
1611 },
1612 },
1613 viewer: {
1614 ref: 'lex:app.bsky.actor.defs#viewerState',
1615 type: 'ref',
1616 },
1617 createdAt: {
1618 type: 'string',
1619 format: 'datetime',
1620 },
1621 indexedAt: {
1622 type: 'string',
1623 format: 'datetime',
1624 },
1625 associated: {
1626 ref: 'lex:app.bsky.actor.defs#profileAssociated',
1627 type: 'ref',
1628 },
1629 description: {
1630 type: 'string',
1631 maxLength: 2560,
1632 maxGraphemes: 256,
1633 },
1634 displayName: {
1635 type: 'string',
1636 maxLength: 640,
1637 maxGraphemes: 64,
1638 },
1639 },
1640 },
1641 viewerState: {
1642 type: 'object',
1643 properties: {
1644 muted: {
1645 type: 'boolean',
1646 },
1647 blocking: {
1648 type: 'string',
1649 format: 'at-uri',
1650 },
1651 blockedBy: {
1652 type: 'boolean',
1653 },
1654 following: {
1655 type: 'string',
1656 format: 'at-uri',
1657 },
1658 followedBy: {
1659 type: 'string',
1660 format: 'at-uri',
1661 },
1662 mutedByList: {
1663 ref: 'lex:app.bsky.graph.defs#listViewBasic',
1664 type: 'ref',
1665 },
1666 blockingByList: {
1667 ref: 'lex:app.bsky.graph.defs#listViewBasic',
1668 type: 'ref',
1669 },
1670 knownFollowers: {
1671 ref: 'lex:app.bsky.actor.defs#knownFollowers',
1672 type: 'ref',
1673 },
1674 },
1675 description:
1676 "Metadata about the requesting account's relationship with the subject account. Only has meaningful content for authed requests.",
1677 },
1678 feedViewPref: {
1679 type: 'object',
1680 required: ['feed'],
1681 properties: {
1682 feed: {
1683 type: 'string',
1684 description:
1685 'The URI of the feed, or an identifier which describes the feed.',
1686 },
1687 hideReplies: {
1688 type: 'boolean',
1689 description: 'Hide replies in the feed.',
1690 },
1691 hideReposts: {
1692 type: 'boolean',
1693 description: 'Hide reposts in the feed.',
1694 },
1695 hideQuotePosts: {
1696 type: 'boolean',
1697 description: 'Hide quote posts in the feed.',
1698 },
1699 hideRepliesByLikeCount: {
1700 type: 'integer',
1701 description:
1702 'Hide replies in the feed if they do not have this number of likes.',
1703 },
1704 hideRepliesByUnfollowed: {
1705 type: 'boolean',
1706 default: true,
1707 description:
1708 'Hide replies in the feed if they are not by followed users.',
1709 },
1710 },
1711 },
1712 labelersPref: {
1713 type: 'object',
1714 required: ['labelers'],
1715 properties: {
1716 labelers: {
1717 type: 'array',
1718 items: {
1719 ref: 'lex:app.bsky.actor.defs#labelerPrefItem',
1720 type: 'ref',
1721 },
1722 },
1723 },
1724 },
1725 interestsPref: {
1726 type: 'object',
1727 required: ['tags'],
1728 properties: {
1729 tags: {
1730 type: 'array',
1731 items: {
1732 type: 'string',
1733 maxLength: 640,
1734 maxGraphemes: 64,
1735 },
1736 maxLength: 100,
1737 description:
1738 "A list of tags which describe the account owner's interests gathered during onboarding.",
1739 },
1740 },
1741 },
1742 knownFollowers: {
1743 type: 'object',
1744 required: ['count', 'followers'],
1745 properties: {
1746 count: {
1747 type: 'integer',
1748 },
1749 followers: {
1750 type: 'array',
1751 items: {
1752 ref: 'lex:app.bsky.actor.defs#profileViewBasic',
1753 type: 'ref',
1754 },
1755 maxLength: 5,
1756 minLength: 0,
1757 },
1758 },
1759 description: "The subject's followers whom you also follow",
1760 },
1761 mutedWordsPref: {
1762 type: 'object',
1763 required: ['items'],
1764 properties: {
1765 items: {
1766 type: 'array',
1767 items: {
1768 ref: 'lex:app.bsky.actor.defs#mutedWord',
1769 type: 'ref',
1770 },
1771 description: 'A list of words the account owner has muted.',
1772 },
1773 },
1774 },
1775 savedFeedsPref: {
1776 type: 'object',
1777 required: ['pinned', 'saved'],
1778 properties: {
1779 saved: {
1780 type: 'array',
1781 items: {
1782 type: 'string',
1783 format: 'at-uri',
1784 },
1785 },
1786 pinned: {
1787 type: 'array',
1788 items: {
1789 type: 'string',
1790 format: 'at-uri',
1791 },
1792 },
1793 timelineIndex: {
1794 type: 'integer',
1795 },
1796 },
1797 },
1798 threadViewPref: {
1799 type: 'object',
1800 properties: {
1801 sort: {
1802 type: 'string',
1803 description: 'Sorting mode for threads.',
1804 knownValues: [
1805 'oldest',
1806 'newest',
1807 'most-likes',
1808 'random',
1809 'hotness',
1810 ],
1811 },
1812 prioritizeFollowedUsers: {
1813 type: 'boolean',
1814 description: 'Show followed users at the top of all replies.',
1815 },
1816 },
1817 },
1818 hiddenPostsPref: {
1819 type: 'object',
1820 required: ['items'],
1821 properties: {
1822 items: {
1823 type: 'array',
1824 items: {
1825 type: 'string',
1826 format: 'at-uri',
1827 },
1828 description:
1829 'A list of URIs of posts the account owner has hidden.',
1830 },
1831 },
1832 },
1833 labelerPrefItem: {
1834 type: 'object',
1835 required: ['did'],
1836 properties: {
1837 did: {
1838 type: 'string',
1839 format: 'did',
1840 },
1841 },
1842 },
1843 mutedWordTarget: {
1844 type: 'string',
1845 maxLength: 640,
1846 knownValues: ['content', 'tag'],
1847 maxGraphemes: 64,
1848 },
1849 adultContentPref: {
1850 type: 'object',
1851 required: ['enabled'],
1852 properties: {
1853 enabled: {
1854 type: 'boolean',
1855 default: false,
1856 },
1857 },
1858 },
1859 bskyAppStatePref: {
1860 type: 'object',
1861 properties: {
1862 nuxs: {
1863 type: 'array',
1864 items: {
1865 ref: 'lex:app.bsky.actor.defs#nux',
1866 type: 'ref',
1867 },
1868 maxLength: 100,
1869 description: 'Storage for NUXs the user has encountered.',
1870 },
1871 queuedNudges: {
1872 type: 'array',
1873 items: {
1874 type: 'string',
1875 maxLength: 100,
1876 },
1877 maxLength: 1000,
1878 description:
1879 'An array of tokens which identify nudges (modals, popups, tours, highlight dots) that should be shown to the user.',
1880 },
1881 activeProgressGuide: {
1882 ref: 'lex:app.bsky.actor.defs#bskyAppProgressGuide',
1883 type: 'ref',
1884 },
1885 },
1886 description:
1887 "A grab bag of state that's specific to the bsky.app program. Third-party apps shouldn't use this.",
1888 },
1889 contentLabelPref: {
1890 type: 'object',
1891 required: ['label', 'visibility'],
1892 properties: {
1893 label: {
1894 type: 'string',
1895 },
1896 labelerDid: {
1897 type: 'string',
1898 format: 'did',
1899 description:
1900 'Which labeler does this preference apply to? If undefined, applies globally.',
1901 },
1902 visibility: {
1903 type: 'string',
1904 knownValues: ['ignore', 'show', 'warn', 'hide'],
1905 },
1906 },
1907 },
1908 profileViewBasic: {
1909 type: 'object',
1910 required: ['did', 'handle'],
1911 properties: {
1912 did: {
1913 type: 'string',
1914 format: 'did',
1915 },
1916 avatar: {
1917 type: 'string',
1918 format: 'uri',
1919 },
1920 handle: {
1921 type: 'string',
1922 format: 'handle',
1923 },
1924 labels: {
1925 type: 'array',
1926 items: {
1927 ref: 'lex:com.atproto.label.defs#label',
1928 type: 'ref',
1929 },
1930 },
1931 viewer: {
1932 ref: 'lex:app.bsky.actor.defs#viewerState',
1933 type: 'ref',
1934 },
1935 createdAt: {
1936 type: 'string',
1937 format: 'datetime',
1938 },
1939 associated: {
1940 ref: 'lex:app.bsky.actor.defs#profileAssociated',
1941 type: 'ref',
1942 },
1943 displayName: {
1944 type: 'string',
1945 maxLength: 640,
1946 maxGraphemes: 64,
1947 },
1948 },
1949 },
1950 savedFeedsPrefV2: {
1951 type: 'object',
1952 required: ['items'],
1953 properties: {
1954 items: {
1955 type: 'array',
1956 items: {
1957 ref: 'lex:app.bsky.actor.defs#savedFeed',
1958 type: 'ref',
1959 },
1960 },
1961 },
1962 },
1963 profileAssociated: {
1964 type: 'object',
1965 properties: {
1966 chat: {
1967 ref: 'lex:app.bsky.actor.defs#profileAssociatedChat',
1968 type: 'ref',
1969 },
1970 lists: {
1971 type: 'integer',
1972 },
1973 labeler: {
1974 type: 'boolean',
1975 },
1976 feedgens: {
1977 type: 'integer',
1978 },
1979 starterPacks: {
1980 type: 'integer',
1981 },
1982 },
1983 },
1984 personalDetailsPref: {
1985 type: 'object',
1986 properties: {
1987 birthDate: {
1988 type: 'string',
1989 format: 'datetime',
1990 description: 'The birth date of account owner.',
1991 },
1992 },
1993 },
1994 profileViewDetailed: {
1995 type: 'object',
1996 required: ['did', 'handle'],
1997 properties: {
1998 did: {
1999 type: 'string',
2000 format: 'did',
2001 },
2002 avatar: {
2003 type: 'string',
2004 format: 'uri',
2005 },
2006 banner: {
2007 type: 'string',
2008 format: 'uri',
2009 },
2010 handle: {
2011 type: 'string',
2012 format: 'handle',
2013 },
2014 labels: {
2015 type: 'array',
2016 items: {
2017 ref: 'lex:com.atproto.label.defs#label',
2018 type: 'ref',
2019 },
2020 },
2021 viewer: {
2022 ref: 'lex:app.bsky.actor.defs#viewerState',
2023 type: 'ref',
2024 },
2025 createdAt: {
2026 type: 'string',
2027 format: 'datetime',
2028 },
2029 indexedAt: {
2030 type: 'string',
2031 format: 'datetime',
2032 },
2033 associated: {
2034 ref: 'lex:app.bsky.actor.defs#profileAssociated',
2035 type: 'ref',
2036 },
2037 pinnedPost: {
2038 ref: 'lex:com.atproto.repo.strongRef',
2039 type: 'ref',
2040 },
2041 postsCount: {
2042 type: 'integer',
2043 },
2044 description: {
2045 type: 'string',
2046 maxLength: 2560,
2047 maxGraphemes: 256,
2048 },
2049 displayName: {
2050 type: 'string',
2051 maxLength: 640,
2052 maxGraphemes: 64,
2053 },
2054 followsCount: {
2055 type: 'integer',
2056 },
2057 followersCount: {
2058 type: 'integer',
2059 },
2060 joinedViaStarterPack: {
2061 ref: 'lex:app.bsky.graph.defs#starterPackViewBasic',
2062 type: 'ref',
2063 },
2064 },
2065 },
2066 bskyAppProgressGuide: {
2067 type: 'object',
2068 required: ['guide'],
2069 properties: {
2070 guide: {
2071 type: 'string',
2072 maxLength: 100,
2073 },
2074 },
2075 description:
2076 'If set, an active progress guide. Once completed, can be set to undefined. Should have unspecced fields tracking progress.',
2077 },
2078 profileAssociatedChat: {
2079 type: 'object',
2080 required: ['allowIncoming'],
2081 properties: {
2082 allowIncoming: {
2083 type: 'string',
2084 knownValues: ['all', 'none', 'following'],
2085 },
2086 },
2087 },
2088 postInteractionSettingsPref: {
2089 type: 'object',
2090 required: [],
2091 properties: {
2092 threadgateAllowRules: {
2093 type: 'array',
2094 items: {
2095 refs: [
2096 'lex:app.bsky.feed.threadgate#mentionRule',
2097 'lex:app.bsky.feed.threadgate#followerRule',
2098 'lex:app.bsky.feed.threadgate#followingRule',
2099 'lex:app.bsky.feed.threadgate#listRule',
2100 ],
2101 type: 'union',
2102 },
2103 maxLength: 5,
2104 description:
2105 'Matches threadgate record. List of rules defining who can reply to this users posts. If value is an empty array, no one can reply. If value is undefined, anyone can reply.',
2106 },
2107 postgateEmbeddingRules: {
2108 type: 'array',
2109 items: {
2110 refs: ['lex:app.bsky.feed.postgate#disableRule'],
2111 type: 'union',
2112 },
2113 maxLength: 5,
2114 description:
2115 'Matches postgate record. List of rules defining who can embed this users posts. If value is an empty array or is undefined, no particular rules apply and anyone can embed.',
2116 },
2117 },
2118 description:
2119 'Default post interaction settings for the account. These values should be applied as default values when creating new posts. These refs should mirror the threadgate and postgate records exactly.',
2120 },
2121 },
2122 },
2123 AppBskyActorProfile: {
2124 lexicon: 1,
2125 id: 'app.bsky.actor.profile',
2126 defs: {
2127 main: {
2128 key: 'literal:self',
2129 type: 'record',
2130 record: {
2131 type: 'object',
2132 properties: {
2133 avatar: {
2134 type: 'blob',
2135 accept: ['image/png', 'image/jpeg'],
2136 maxSize: 1000000,
2137 description:
2138 "Small image to be displayed next to posts from account. AKA, 'profile picture'",
2139 },
2140 banner: {
2141 type: 'blob',
2142 accept: ['image/png', 'image/jpeg'],
2143 maxSize: 1000000,
2144 description:
2145 'Larger horizontal image to display behind profile view.',
2146 },
2147 labels: {
2148 refs: ['lex:com.atproto.label.defs#selfLabels'],
2149 type: 'union',
2150 description:
2151 'Self-label values, specific to the Bluesky application, on the overall account.',
2152 },
2153 createdAt: {
2154 type: 'string',
2155 format: 'datetime',
2156 },
2157 pinnedPost: {
2158 ref: 'lex:com.atproto.repo.strongRef',
2159 type: 'ref',
2160 },
2161 description: {
2162 type: 'string',
2163 maxLength: 2560,
2164 description: 'Free-form profile description text.',
2165 maxGraphemes: 256,
2166 },
2167 displayName: {
2168 type: 'string',
2169 maxLength: 640,
2170 maxGraphemes: 64,
2171 },
2172 joinedViaStarterPack: {
2173 ref: 'lex:com.atproto.repo.strongRef',
2174 type: 'ref',
2175 },
2176 },
2177 },
2178 description: 'A declaration of a Bluesky account profile.',
2179 },
2180 },
2181 },
2182 AppBskyLabelerDefs: {
2183 lexicon: 1,
2184 id: 'app.bsky.labeler.defs',
2185 defs: {
2186 labelerView: {
2187 type: 'object',
2188 required: ['uri', 'cid', 'creator', 'indexedAt'],
2189 properties: {
2190 cid: {
2191 type: 'string',
2192 format: 'cid',
2193 },
2194 uri: {
2195 type: 'string',
2196 format: 'at-uri',
2197 },
2198 labels: {
2199 type: 'array',
2200 items: {
2201 ref: 'lex:com.atproto.label.defs#label',
2202 type: 'ref',
2203 },
2204 },
2205 viewer: {
2206 ref: 'lex:app.bsky.labeler.defs#labelerViewerState',
2207 type: 'ref',
2208 },
2209 creator: {
2210 ref: 'lex:app.bsky.actor.defs#profileView',
2211 type: 'ref',
2212 },
2213 indexedAt: {
2214 type: 'string',
2215 format: 'datetime',
2216 },
2217 likeCount: {
2218 type: 'integer',
2219 minimum: 0,
2220 },
2221 },
2222 },
2223 labelerPolicies: {
2224 type: 'object',
2225 required: ['labelValues'],
2226 properties: {
2227 labelValues: {
2228 type: 'array',
2229 items: {
2230 ref: 'lex:com.atproto.label.defs#labelValue',
2231 type: 'ref',
2232 },
2233 description:
2234 'The label values which this labeler publishes. May include global or custom labels.',
2235 },
2236 labelValueDefinitions: {
2237 type: 'array',
2238 items: {
2239 ref: 'lex:com.atproto.label.defs#labelValueDefinition',
2240 type: 'ref',
2241 },
2242 description:
2243 'Label values created by this labeler and scoped exclusively to it. Labels defined here will override global label definitions for this labeler.',
2244 },
2245 },
2246 },
2247 labelerViewerState: {
2248 type: 'object',
2249 properties: {
2250 like: {
2251 type: 'string',
2252 format: 'at-uri',
2253 },
2254 },
2255 },
2256 labelerViewDetailed: {
2257 type: 'object',
2258 required: ['uri', 'cid', 'creator', 'policies', 'indexedAt'],
2259 properties: {
2260 cid: {
2261 type: 'string',
2262 format: 'cid',
2263 },
2264 uri: {
2265 type: 'string',
2266 format: 'at-uri',
2267 },
2268 labels: {
2269 type: 'array',
2270 items: {
2271 ref: 'lex:com.atproto.label.defs#label',
2272 type: 'ref',
2273 },
2274 },
2275 viewer: {
2276 ref: 'lex:app.bsky.labeler.defs#labelerViewerState',
2277 type: 'ref',
2278 },
2279 creator: {
2280 ref: 'lex:app.bsky.actor.defs#profileView',
2281 type: 'ref',
2282 },
2283 policies: {
2284 ref: 'lex:app.bsky.labeler.defs#labelerPolicies',
2285 type: 'ref',
2286 },
2287 indexedAt: {
2288 type: 'string',
2289 format: 'datetime',
2290 },
2291 likeCount: {
2292 type: 'integer',
2293 minimum: 0,
2294 },
2295 },
2296 },
2297 },
2298 },
2299 ShTangledGraphFollow: {
2300 lexicon: 1,
2301 id: 'sh.tangled.graph.follow',
2302 defs: {
2303 main: {
2304 type: 'record',
2305 key: 'tid',
2306 record: {
2307 type: 'object',
2308 required: ['subject', 'createdAt'],
2309 properties: {
2310 subject: {
2311 type: 'string',
2312 format: 'did',
2313 },
2314 createdAt: {
2315 type: 'string',
2316 format: 'datetime',
2317 },
2318 },
2319 },
2320 },
2321 },
2322 },
2323 ShTangledActorProfile: {
2324 lexicon: 1,
2325 id: 'sh.tangled.actor.profile',
2326 defs: {
2327 main: {
2328 type: 'record',
2329 description: 'A declaration of a Tangled account profile.',
2330 key: 'literal:self',
2331 record: {
2332 type: 'object',
2333 required: ['bluesky'],
2334 properties: {
2335 description: {
2336 type: 'string',
2337 description: 'Free-form profile description text.',
2338 maxGraphemes: 256,
2339 maxLength: 2560,
2340 },
2341 links: {
2342 type: 'array',
2343 minLength: 0,
2344 maxLength: 5,
2345 items: {
2346 type: 'string',
2347 description:
2348 'Any URI, intended for social profiles or websites, can be used to link DIDs/AT-URIs too.',
2349 },
2350 },
2351 stats: {
2352 type: 'array',
2353 minLength: 0,
2354 maxLength: 2,
2355 items: {
2356 type: 'string',
2357 description: 'Vanity stats.',
2358 enum: [
2359 'merged-pull-request-count',
2360 'closed-pull-request-count',
2361 'open-pull-request-count',
2362 'open-issue-count',
2363 'closed-issue-count',
2364 'repository-count',
2365 ],
2366 },
2367 },
2368 bluesky: {
2369 type: 'boolean',
2370 description: 'Include link to this account on Bluesky.',
2371 },
2372 location: {
2373 type: 'string',
2374 description: 'Free-form location text.',
2375 maxGraphemes: 40,
2376 maxLength: 400,
2377 },
2378 pinnedRepositories: {
2379 type: 'array',
2380 description:
2381 'Any ATURI, it is up to appviews to validate these fields.',
2382 minLength: 0,
2383 maxLength: 6,
2384 items: {
2385 type: 'string',
2386 format: 'at-uri',
2387 },
2388 },
2389 },
2390 },
2391 },
2392 },
2393 },
2394 SocialGrainDefs: {
2395 lexicon: 1,
2396 id: 'social.grain.defs',
2397 defs: {
2398 aspectRatio: {
2399 type: 'object',
2400 description:
2401 'width:height represents an aspect ratio. It may be approximate, and may not correspond to absolute dimensions in any given unit.',
2402 required: ['width', 'height'],
2403 properties: {
2404 width: {
2405 type: 'integer',
2406 minimum: 1,
2407 },
2408 height: {
2409 type: 'integer',
2410 minimum: 1,
2411 },
2412 },
2413 },
2414 },
2415 },
2416 SocialGrainNotificationDefs: {
2417 lexicon: 1,
2418 id: 'social.grain.notification.defs',
2419 defs: {
2420 notificationView: {
2421 type: 'object',
2422 required: [
2423 'uri',
2424 'cid',
2425 'author',
2426 'reason',
2427 'record',
2428 'isRead',
2429 'indexedAt',
2430 ],
2431 properties: {
2432 uri: {
2433 type: 'string',
2434 format: 'at-uri',
2435 },
2436 cid: {
2437 type: 'string',
2438 format: 'cid',
2439 },
2440 author: {
2441 type: 'ref',
2442 ref: 'lex:social.grain.actor.defs#profileView',
2443 },
2444 reasonSubject: {
2445 type: 'string',
2446 format: 'at-uri',
2447 },
2448 reason: {
2449 type: 'string',
2450 description:
2451 'The reason why this notification was delivered - e.g. your gallery was favd, or you received a new follower.',
2452 knownValues: [
2453 'follow',
2454 'gallery-favorite',
2455 'gallery-comment',
2456 'reply',
2457 'gallery-mention',
2458 'gallery-comment-mention',
2459 'unknown',
2460 ],
2461 },
2462 record: {
2463 type: 'unknown',
2464 },
2465 isRead: {
2466 type: 'boolean',
2467 },
2468 indexedAt: {
2469 type: 'string',
2470 format: 'datetime',
2471 },
2472 },
2473 },
2474 notificationViewDetailed: {
2475 type: 'object',
2476 required: [
2477 'uri',
2478 'cid',
2479 'author',
2480 'reason',
2481 'record',
2482 'isRead',
2483 'indexedAt',
2484 ],
2485 properties: {
2486 uri: {
2487 type: 'string',
2488 format: 'at-uri',
2489 },
2490 cid: {
2491 type: 'string',
2492 format: 'cid',
2493 },
2494 author: {
2495 type: 'ref',
2496 ref: 'lex:social.grain.actor.defs#profileView',
2497 },
2498 reason: {
2499 type: 'string',
2500 description:
2501 'The reason why this notification was delivered - e.g. your gallery was favd, or you received a new follower.',
2502 knownValues: [
2503 'follow',
2504 'gallery-favorite',
2505 'gallery-comment',
2506 'reply',
2507 'gallery-mention',
2508 'gallery-comment-mention',
2509 'unknown',
2510 ],
2511 },
2512 reasonSubject: {
2513 type: 'union',
2514 refs: [
2515 'lex:social.grain.actor.defs#profileView',
2516 'lex:social.grain.comment.defs#commentView',
2517 'lex:social.grain.gallery.defs#galleryView',
2518 ],
2519 },
2520 record: {
2521 type: 'unknown',
2522 },
2523 isRead: {
2524 type: 'boolean',
2525 },
2526 indexedAt: {
2527 type: 'string',
2528 format: 'datetime',
2529 },
2530 },
2531 },
2532 },
2533 },
2534 SocialGrainNotificationUpdateSeen: {
2535 lexicon: 1,
2536 id: 'social.grain.notification.updateSeen',
2537 defs: {
2538 main: {
2539 type: 'procedure',
2540 description:
2541 'Notify server that the requesting account has seen notifications. Requires auth.',
2542 input: {
2543 encoding: 'application/json',
2544 schema: {
2545 type: 'object',
2546 required: ['seenAt'],
2547 properties: {
2548 seenAt: {
2549 type: 'string',
2550 format: 'datetime',
2551 },
2552 },
2553 },
2554 },
2555 },
2556 },
2557 },
2558 SocialGrainNotificationGetNotifications: {
2559 lexicon: 1,
2560 id: 'social.grain.notification.getNotifications',
2561 defs: {
2562 main: {
2563 type: 'query',
2564 description:
2565 'Enumerate notifications for the requesting account. Requires auth.',
2566 parameters: {
2567 type: 'params',
2568 properties: {
2569 limit: {
2570 type: 'integer',
2571 minimum: 1,
2572 maximum: 100,
2573 default: 50,
2574 },
2575 cursor: {
2576 type: 'string',
2577 },
2578 },
2579 },
2580 output: {
2581 encoding: 'application/json',
2582 schema: {
2583 type: 'object',
2584 required: ['notifications'],
2585 properties: {
2586 cursor: {
2587 type: 'string',
2588 },
2589 notifications: {
2590 type: 'array',
2591 items: {
2592 type: 'ref',
2593 ref: 'lex:social.grain.notification.defs#notificationViewDetailed',
2594 },
2595 },
2596 seenAt: {
2597 type: 'string',
2598 format: 'datetime',
2599 },
2600 },
2601 },
2602 },
2603 },
2604 },
2605 },
2606 SocialGrainCommentDefs: {
2607 lexicon: 1,
2608 id: 'social.grain.comment.defs',
2609 defs: {
2610 commentView: {
2611 type: 'object',
2612 required: ['uri', 'cid', 'author', 'text', 'createdAt'],
2613 properties: {
2614 uri: {
2615 type: 'string',
2616 format: 'at-uri',
2617 },
2618 cid: {
2619 type: 'string',
2620 format: 'cid',
2621 },
2622 author: {
2623 type: 'ref',
2624 ref: 'lex:social.grain.actor.defs#profileView',
2625 },
2626 record: {
2627 type: 'unknown',
2628 },
2629 text: {
2630 type: 'string',
2631 maxLength: 3000,
2632 maxGraphemes: 300,
2633 },
2634 facets: {
2635 type: 'array',
2636 description:
2637 'Annotations of description text (mentions and URLs, hashtags, etc)',
2638 items: {
2639 type: 'ref',
2640 ref: 'lex:app.bsky.richtext.facet',
2641 },
2642 },
2643 subject: {
2644 type: 'union',
2645 refs: ['lex:social.grain.gallery.defs#galleryView'],
2646 description:
2647 'The subject of the comment, which can be a gallery or a photo.',
2648 },
2649 focus: {
2650 type: 'union',
2651 refs: ['lex:social.grain.photo.defs#photoView'],
2652 description:
2653 'The photo that the comment is focused on, if applicable.',
2654 },
2655 replyTo: {
2656 type: 'string',
2657 format: 'at-uri',
2658 description:
2659 'The URI of the comment this comment is replying to, if applicable.',
2660 },
2661 createdAt: {
2662 type: 'string',
2663 format: 'datetime',
2664 },
2665 },
2666 },
2667 },
2668 },
2669 SocialGrainCommentDeleteComment: {
2670 lexicon: 1,
2671 id: 'social.grain.comment.deleteComment',
2672 defs: {
2673 main: {
2674 type: 'procedure',
2675 description: 'Delete a comment. Requires auth.',
2676 input: {
2677 encoding: 'application/json',
2678 schema: {
2679 type: 'object',
2680 required: ['uri'],
2681 properties: {
2682 uri: {
2683 type: 'string',
2684 format: 'at-uri',
2685 description: 'AT URI of the comment to delete',
2686 },
2687 },
2688 },
2689 },
2690 output: {
2691 encoding: 'application/json',
2692 schema: {
2693 type: 'object',
2694 properties: {
2695 success: {
2696 type: 'boolean',
2697 description: 'True if the comment was deleted',
2698 },
2699 },
2700 },
2701 },
2702 },
2703 },
2704 },
2705 SocialGrainCommentCreateComment: {
2706 lexicon: 1,
2707 id: 'social.grain.comment.createComment',
2708 defs: {
2709 main: {
2710 type: 'procedure',
2711 description: 'Create a comment. Requires auth.',
2712 input: {
2713 encoding: 'application/json',
2714 schema: {
2715 type: 'object',
2716 required: ['text', 'subject'],
2717 properties: {
2718 text: {
2719 type: 'string',
2720 maxLength: 3000,
2721 maxGraphemes: 300,
2722 },
2723 subject: {
2724 type: 'string',
2725 format: 'at-uri',
2726 },
2727 focus: {
2728 type: 'string',
2729 format: 'at-uri',
2730 },
2731 replyTo: {
2732 type: 'string',
2733 format: 'at-uri',
2734 },
2735 },
2736 },
2737 },
2738 output: {
2739 encoding: 'application/json',
2740 schema: {
2741 type: 'object',
2742 properties: {
2743 commentUri: {
2744 type: 'string',
2745 format: 'at-uri',
2746 description: 'AT URI of the created comment',
2747 },
2748 },
2749 },
2750 },
2751 },
2752 },
2753 },
2754 SocialGrainComment: {
2755 lexicon: 1,
2756 id: 'social.grain.comment',
2757 defs: {
2758 main: {
2759 type: 'record',
2760 key: 'tid',
2761 record: {
2762 type: 'object',
2763 required: ['text', 'subject', 'createdAt'],
2764 properties: {
2765 text: {
2766 type: 'string',
2767 maxLength: 3000,
2768 maxGraphemes: 300,
2769 },
2770 facets: {
2771 type: 'array',
2772 description:
2773 'Annotations of description text (mentions and URLs, hashtags, etc)',
2774 items: {
2775 type: 'ref',
2776 ref: 'lex:app.bsky.richtext.facet',
2777 },
2778 },
2779 subject: {
2780 type: 'string',
2781 format: 'at-uri',
2782 },
2783 focus: {
2784 type: 'string',
2785 format: 'at-uri',
2786 },
2787 replyTo: {
2788 type: 'string',
2789 format: 'at-uri',
2790 },
2791 createdAt: {
2792 type: 'string',
2793 format: 'datetime',
2794 },
2795 },
2796 },
2797 },
2798 },
2799 },
2800 SocialGrainGalleryDeleteGallery: {
2801 lexicon: 1,
2802 id: 'social.grain.gallery.deleteGallery',
2803 defs: {
2804 main: {
2805 type: 'procedure',
2806 description:
2807 'Delete a gallery. Does not delete the items in the gallery, just the gallery itself.',
2808 input: {
2809 encoding: 'application/json',
2810 schema: {
2811 type: 'object',
2812 required: ['uri'],
2813 properties: {
2814 uri: {
2815 type: 'string',
2816 format: 'at-uri',
2817 description: 'Unique identifier of the gallery to delete',
2818 },
2819 },
2820 },
2821 },
2822 output: {
2823 encoding: 'application/json',
2824 schema: {
2825 type: 'object',
2826 properties: {
2827 success: {
2828 type: 'boolean',
2829 description: 'True if the gallery was deleted',
2830 },
2831 },
2832 },
2833 },
2834 },
2835 },
2836 },
2837 SocialGrainGalleryItem: {
2838 lexicon: 1,
2839 id: 'social.grain.gallery.item',
2840 defs: {
2841 main: {
2842 type: 'record',
2843 key: 'tid',
2844 record: {
2845 type: 'object',
2846 required: ['createdAt', 'gallery', 'item'],
2847 properties: {
2848 createdAt: {
2849 type: 'string',
2850 format: 'datetime',
2851 },
2852 gallery: {
2853 type: 'string',
2854 format: 'at-uri',
2855 },
2856 item: {
2857 type: 'string',
2858 format: 'at-uri',
2859 },
2860 position: {
2861 type: 'integer',
2862 default: 0,
2863 },
2864 },
2865 },
2866 },
2867 },
2868 },
2869 SocialGrainGalleryCreateItem: {
2870 lexicon: 1,
2871 id: 'social.grain.gallery.createItem',
2872 defs: {
2873 main: {
2874 type: 'procedure',
2875 description: 'Create a new gallery item',
2876 input: {
2877 encoding: 'application/json',
2878 schema: {
2879 type: 'object',
2880 required: ['galleryUri', 'photoUri', 'position'],
2881 properties: {
2882 galleryUri: {
2883 type: 'string',
2884 format: 'at-uri',
2885 description: 'AT URI of the gallery to create the item in',
2886 },
2887 photoUri: {
2888 type: 'string',
2889 format: 'at-uri',
2890 description: 'AT URI of the photo to be added as an item',
2891 },
2892 position: {
2893 type: 'integer',
2894 description:
2895 'Position of the item in the gallery, used for ordering',
2896 },
2897 },
2898 },
2899 },
2900 output: {
2901 encoding: 'application/json',
2902 schema: {
2903 type: 'object',
2904 properties: {
2905 itemUri: {
2906 type: 'string',
2907 format: 'at-uri',
2908 description: 'AT URI of the created gallery item',
2909 },
2910 },
2911 },
2912 },
2913 },
2914 },
2915 },
2916 SocialGrainGalleryCreateGallery: {
2917 lexicon: 1,
2918 id: 'social.grain.gallery.createGallery',
2919 defs: {
2920 main: {
2921 type: 'procedure',
2922 description: 'Create a new gallery',
2923 input: {
2924 encoding: 'application/json',
2925 schema: {
2926 type: 'object',
2927 required: ['title'],
2928 properties: {
2929 title: {
2930 type: 'string',
2931 maxLength: 100,
2932 },
2933 description: {
2934 type: 'string',
2935 maxLength: 1000,
2936 },
2937 },
2938 },
2939 },
2940 output: {
2941 encoding: 'application/json',
2942 schema: {
2943 type: 'object',
2944 properties: {
2945 galleryUri: {
2946 type: 'string',
2947 format: 'at-uri',
2948 description: 'AT URI of the created gallery',
2949 },
2950 },
2951 },
2952 },
2953 },
2954 },
2955 },
2956 SocialGrainGalleryDefs: {
2957 lexicon: 1,
2958 id: 'social.grain.gallery.defs',
2959 defs: {
2960 galleryView: {
2961 type: 'object',
2962 required: ['uri', 'cid', 'creator', 'record', 'indexedAt'],
2963 properties: {
2964 uri: {
2965 type: 'string',
2966 format: 'at-uri',
2967 },
2968 cid: {
2969 type: 'string',
2970 format: 'cid',
2971 },
2972 title: {
2973 type: 'string',
2974 },
2975 description: {
2976 type: 'string',
2977 },
2978 cameras: {
2979 type: 'array',
2980 description:
2981 'List of camera make and models used in this gallery derived from EXIF data.',
2982 items: {
2983 type: 'string',
2984 },
2985 },
2986 facets: {
2987 type: 'array',
2988 description:
2989 'Annotations of description text (mentions, URLs, hashtags, etc)',
2990 items: {
2991 type: 'ref',
2992 ref: 'lex:app.bsky.richtext.facet',
2993 },
2994 },
2995 creator: {
2996 type: 'ref',
2997 ref: 'lex:social.grain.actor.defs#profileView',
2998 },
2999 record: {
3000 type: 'unknown',
3001 },
3002 items: {
3003 type: 'array',
3004 items: {
3005 type: 'union',
3006 refs: ['lex:social.grain.photo.defs#photoView'],
3007 },
3008 },
3009 favCount: {
3010 type: 'integer',
3011 },
3012 commentCount: {
3013 type: 'integer',
3014 },
3015 labels: {
3016 type: 'array',
3017 items: {
3018 type: 'ref',
3019 ref: 'lex:com.atproto.label.defs#label',
3020 },
3021 },
3022 createdAt: {
3023 type: 'string',
3024 format: 'datetime',
3025 },
3026 indexedAt: {
3027 type: 'string',
3028 format: 'datetime',
3029 },
3030 viewer: {
3031 type: 'ref',
3032 ref: 'lex:social.grain.gallery.defs#viewerState',
3033 },
3034 },
3035 },
3036 viewerState: {
3037 type: 'object',
3038 description:
3039 "Metadata about the requesting account's relationship with the subject content. Only has meaningful content for authed requests.",
3040 properties: {
3041 fav: {
3042 type: 'string',
3043 format: 'at-uri',
3044 },
3045 },
3046 },
3047 },
3048 },
3049 SocialGrainGalleryDeleteItem: {
3050 lexicon: 1,
3051 id: 'social.grain.gallery.deleteItem',
3052 defs: {
3053 main: {
3054 type: 'procedure',
3055 description: 'Delete a gallery item',
3056 input: {
3057 encoding: 'application/json',
3058 schema: {
3059 type: 'object',
3060 required: ['uri'],
3061 properties: {
3062 uri: {
3063 type: 'string',
3064 format: 'at-uri',
3065 description: 'AT URI of the gallery to create the item in',
3066 },
3067 },
3068 },
3069 },
3070 output: {
3071 encoding: 'application/json',
3072 schema: {
3073 type: 'object',
3074 properties: {
3075 success: {
3076 type: 'boolean',
3077 description: 'True if the gallery item was deleted',
3078 },
3079 },
3080 },
3081 },
3082 },
3083 },
3084 },
3085 SocialGrainGallery: {
3086 lexicon: 1,
3087 id: 'social.grain.gallery',
3088 defs: {
3089 main: {
3090 type: 'record',
3091 key: 'tid',
3092 record: {
3093 type: 'object',
3094 required: ['title', 'createdAt'],
3095 properties: {
3096 title: {
3097 type: 'string',
3098 maxLength: 100,
3099 },
3100 description: {
3101 type: 'string',
3102 maxLength: 1000,
3103 },
3104 facets: {
3105 type: 'array',
3106 description:
3107 'Annotations of description text (mentions, URLs, hashtags, etc)',
3108 items: {
3109 type: 'ref',
3110 ref: 'lex:app.bsky.richtext.facet',
3111 },
3112 },
3113 labels: {
3114 type: 'union',
3115 description:
3116 'Self-label values for this post. Effectively content warnings.',
3117 refs: ['lex:com.atproto.label.defs#selfLabels'],
3118 },
3119 updatedAt: {
3120 type: 'string',
3121 format: 'datetime',
3122 },
3123 createdAt: {
3124 type: 'string',
3125 format: 'datetime',
3126 },
3127 },
3128 },
3129 },
3130 },
3131 },
3132 SocialGrainGalleryUpdateGallery: {
3133 lexicon: 1,
3134 id: 'social.grain.gallery.updateGallery',
3135 defs: {
3136 main: {
3137 type: 'procedure',
3138 description: 'Create a new gallery',
3139 input: {
3140 encoding: 'application/json',
3141 schema: {
3142 type: 'object',
3143 required: ['galleryUri', 'title'],
3144 properties: {
3145 galleryUri: {
3146 type: 'string',
3147 format: 'at-uri',
3148 description: 'The AT-URI of the gallery to update',
3149 },
3150 title: {
3151 type: 'string',
3152 },
3153 description: {
3154 type: 'string',
3155 },
3156 },
3157 },
3158 },
3159 output: {
3160 encoding: 'application/json',
3161 schema: {
3162 type: 'object',
3163 properties: {
3164 success: {
3165 type: 'boolean',
3166 description: 'True if the gallery was updated',
3167 },
3168 },
3169 },
3170 },
3171 },
3172 },
3173 },
3174 SocialGrainGalleryApplySort: {
3175 lexicon: 1,
3176 id: 'social.grain.gallery.applySort',
3177 defs: {
3178 main: {
3179 type: 'procedure',
3180 description: 'Apply sorting to photos in a gallery. Requires auth.',
3181 input: {
3182 encoding: 'application/json',
3183 schema: {
3184 type: 'object',
3185 required: ['writes'],
3186 properties: {
3187 writes: {
3188 type: 'array',
3189 items: {
3190 type: 'ref',
3191 ref: 'lex:social.grain.gallery.applySort#update',
3192 },
3193 },
3194 },
3195 },
3196 },
3197 output: {
3198 encoding: 'application/json',
3199 schema: {
3200 type: 'object',
3201 properties: {
3202 success: {
3203 type: 'boolean',
3204 description: 'True if the writes were successfully applied',
3205 },
3206 },
3207 },
3208 },
3209 },
3210 update: {
3211 type: 'object',
3212 required: ['itemUri', 'position'],
3213 properties: {
3214 itemUri: {
3215 type: 'string',
3216 format: 'at-uri',
3217 description: 'AT URI of the item to update',
3218 },
3219 position: {
3220 type: 'integer',
3221 description:
3222 'The position of the item in the gallery, used for ordering',
3223 },
3224 },
3225 },
3226 },
3227 },
3228 SocialGrainGalleryGetGalleryThread: {
3229 lexicon: 1,
3230 id: 'social.grain.gallery.getGalleryThread',
3231 defs: {
3232 main: {
3233 type: 'query',
3234 description:
3235 'Gets a hydrated gallery view and its comments for a specified gallery AT-URI.',
3236 parameters: {
3237 type: 'params',
3238 required: ['uri'],
3239 properties: {
3240 uri: {
3241 type: 'string',
3242 description:
3243 'The AT-URI of the gallery to return a hydrated view and comments for.',
3244 format: 'at-uri',
3245 },
3246 },
3247 },
3248 output: {
3249 encoding: 'application/json',
3250 schema: {
3251 type: 'object',
3252 required: ['gallery', 'comments'],
3253 properties: {
3254 gallery: {
3255 type: 'ref',
3256 ref: 'lex:social.grain.gallery.defs#galleryView',
3257 },
3258 comments: {
3259 type: 'array',
3260 items: {
3261 type: 'ref',
3262 ref: 'lex:social.grain.comment.defs#commentView',
3263 },
3264 },
3265 },
3266 },
3267 },
3268 },
3269 },
3270 },
3271 SocialGrainGalleryGetActorGalleries: {
3272 lexicon: 1,
3273 id: 'social.grain.gallery.getActorGalleries',
3274 defs: {
3275 main: {
3276 type: 'query',
3277 description:
3278 "Get a view of an actor's galleries. Does not require auth.",
3279 parameters: {
3280 type: 'params',
3281 required: ['actor'],
3282 properties: {
3283 actor: {
3284 type: 'string',
3285 format: 'at-identifier',
3286 },
3287 limit: {
3288 type: 'integer',
3289 minimum: 1,
3290 maximum: 100,
3291 default: 50,
3292 },
3293 cursor: {
3294 type: 'string',
3295 },
3296 },
3297 },
3298 output: {
3299 encoding: 'application/json',
3300 schema: {
3301 type: 'object',
3302 required: ['items'],
3303 properties: {
3304 cursor: {
3305 type: 'string',
3306 },
3307 items: {
3308 type: 'array',
3309 items: {
3310 type: 'ref',
3311 ref: 'lex:social.grain.gallery.defs#galleryView',
3312 },
3313 },
3314 },
3315 },
3316 },
3317 },
3318 },
3319 },
3320 SocialGrainGalleryGetGallery: {
3321 lexicon: 1,
3322 id: 'social.grain.gallery.getGallery',
3323 defs: {
3324 main: {
3325 type: 'query',
3326 description:
3327 'Gets a hydrated gallery view for a specified gallery AT-URI.',
3328 parameters: {
3329 type: 'params',
3330 required: ['uri'],
3331 properties: {
3332 uri: {
3333 type: 'string',
3334 description:
3335 'The AT-URI of the gallery to return a hydrated view for.',
3336 format: 'at-uri',
3337 },
3338 },
3339 },
3340 output: {
3341 encoding: 'application/json',
3342 schema: {
3343 type: 'ref',
3344 ref: 'lex:social.grain.gallery.defs#galleryView',
3345 },
3346 },
3347 },
3348 },
3349 },
3350 SocialGrainGraphDeleteFollow: {
3351 lexicon: 1,
3352 id: 'social.grain.graph.deleteFollow',
3353 defs: {
3354 main: {
3355 type: 'procedure',
3356 description: 'Delete a follow relationship. Requires auth.',
3357 input: {
3358 encoding: 'application/json',
3359 schema: {
3360 type: 'object',
3361 required: ['uri'],
3362 properties: {
3363 uri: {
3364 type: 'string',
3365 format: 'at-uri',
3366 description: 'AT URI of the follow record to delete',
3367 },
3368 },
3369 },
3370 },
3371 output: {
3372 encoding: 'application/json',
3373 schema: {
3374 type: 'object',
3375 properties: {
3376 success: {
3377 type: 'boolean',
3378 description: 'True if the follow was deleted',
3379 },
3380 },
3381 },
3382 },
3383 },
3384 },
3385 },
3386 SocialGrainGraphFollow: {
3387 lexicon: 1,
3388 id: 'social.grain.graph.follow',
3389 defs: {
3390 main: {
3391 key: 'tid',
3392 type: 'record',
3393 record: {
3394 type: 'object',
3395 required: ['subject', 'createdAt'],
3396 properties: {
3397 subject: {
3398 type: 'string',
3399 format: 'did',
3400 },
3401 createdAt: {
3402 type: 'string',
3403 format: 'datetime',
3404 },
3405 },
3406 },
3407 },
3408 },
3409 },
3410 SocialGrainGraphCreateFollow: {
3411 lexicon: 1,
3412 id: 'social.grain.graph.createFollow',
3413 defs: {
3414 main: {
3415 type: 'procedure',
3416 description: 'Create a follow relationship between actors.',
3417 input: {
3418 encoding: 'application/json',
3419 schema: {
3420 type: 'object',
3421 required: ['subject'],
3422 properties: {
3423 subject: {
3424 type: 'string',
3425 format: 'at-identifier',
3426 description: 'DID of the actor to follow.',
3427 },
3428 },
3429 },
3430 },
3431 output: {
3432 encoding: 'application/json',
3433 schema: {
3434 type: 'object',
3435 properties: {
3436 followUri: {
3437 type: 'string',
3438 format: 'at-uri',
3439 description: 'AT URI of the created follow record.',
3440 },
3441 },
3442 },
3443 },
3444 },
3445 },
3446 },
3447 SocialGrainGraphGetFollowers: {
3448 lexicon: 1,
3449 id: 'social.grain.graph.getFollowers',
3450 defs: {
3451 main: {
3452 type: 'query',
3453 description:
3454 'Enumerates accounts which follow a specified account (actor).',
3455 parameters: {
3456 type: 'params',
3457 required: ['actor'],
3458 properties: {
3459 actor: {
3460 type: 'string',
3461 format: 'at-identifier',
3462 },
3463 limit: {
3464 type: 'integer',
3465 minimum: 1,
3466 maximum: 100,
3467 default: 50,
3468 },
3469 cursor: {
3470 type: 'string',
3471 },
3472 },
3473 },
3474 output: {
3475 encoding: 'application/json',
3476 schema: {
3477 type: 'object',
3478 required: ['subject', 'followers'],
3479 properties: {
3480 subject: {
3481 type: 'ref',
3482 ref: 'lex:social.grain.actor.defs#profileView',
3483 },
3484 cursor: {
3485 type: 'string',
3486 },
3487 followers: {
3488 type: 'array',
3489 items: {
3490 type: 'ref',
3491 ref: 'lex:social.grain.actor.defs#profileView',
3492 },
3493 },
3494 },
3495 },
3496 },
3497 },
3498 },
3499 },
3500 SocialGrainGraphGetFollows: {
3501 lexicon: 1,
3502 id: 'social.grain.graph.getFollows',
3503 defs: {
3504 main: {
3505 type: 'query',
3506 description:
3507 'Enumerates accounts which a specified account (actor) follows.',
3508 parameters: {
3509 type: 'params',
3510 required: ['actor'],
3511 properties: {
3512 actor: {
3513 type: 'string',
3514 format: 'at-identifier',
3515 },
3516 limit: {
3517 type: 'integer',
3518 minimum: 1,
3519 maximum: 100,
3520 default: 50,
3521 },
3522 cursor: {
3523 type: 'string',
3524 },
3525 },
3526 },
3527 output: {
3528 encoding: 'application/json',
3529 schema: {
3530 type: 'object',
3531 required: ['subject', 'follows'],
3532 properties: {
3533 subject: {
3534 type: 'ref',
3535 ref: 'lex:social.grain.actor.defs#profileView',
3536 },
3537 cursor: {
3538 type: 'string',
3539 },
3540 follows: {
3541 type: 'array',
3542 items: {
3543 type: 'ref',
3544 ref: 'lex:social.grain.actor.defs#profileView',
3545 },
3546 },
3547 },
3548 },
3549 },
3550 },
3551 },
3552 },
3553 SocialGrainFavoriteDeleteFavorite: {
3554 lexicon: 1,
3555 id: 'social.grain.favorite.deleteFavorite',
3556 defs: {
3557 main: {
3558 type: 'procedure',
3559 description: 'Delete a favorite item by its ID.',
3560 input: {
3561 encoding: 'application/json',
3562 schema: {
3563 type: 'object',
3564 required: ['uri'],
3565 properties: {
3566 uri: {
3567 type: 'string',
3568 format: 'at-uri',
3569 description: 'The AT URI of the favorite to delete.',
3570 },
3571 },
3572 },
3573 },
3574 output: {
3575 encoding: 'application/json',
3576 schema: {
3577 type: 'object',
3578 required: ['success'],
3579 properties: {
3580 success: {
3581 type: 'boolean',
3582 description:
3583 'Indicates if the favorite was successfully deleted.',
3584 },
3585 },
3586 },
3587 },
3588 },
3589 },
3590 },
3591 SocialGrainFavoriteCreateFavorite: {
3592 lexicon: 1,
3593 id: 'social.grain.favorite.createFavorite',
3594 defs: {
3595 main: {
3596 description: 'Create a favorite for a given subject.',
3597 type: 'procedure',
3598 input: {
3599 encoding: 'application/json',
3600 schema: {
3601 type: 'object',
3602 required: ['subject'],
3603 properties: {
3604 subject: {
3605 type: 'string',
3606 format: 'at-uri',
3607 description: 'URI of the subject to favorite.',
3608 },
3609 },
3610 },
3611 },
3612 output: {
3613 encoding: 'application/json',
3614 schema: {
3615 type: 'object',
3616 required: ['favoriteUri'],
3617 properties: {
3618 favoriteUri: {
3619 type: 'string',
3620 format: 'at-uri',
3621 description: 'AT URI for the created favorite.',
3622 },
3623 },
3624 },
3625 },
3626 },
3627 },
3628 },
3629 SocialGrainFavorite: {
3630 lexicon: 1,
3631 id: 'social.grain.favorite',
3632 defs: {
3633 main: {
3634 type: 'record',
3635 key: 'tid',
3636 record: {
3637 type: 'object',
3638 required: ['createdAt', 'subject'],
3639 properties: {
3640 createdAt: {
3641 type: 'string',
3642 format: 'datetime',
3643 },
3644 subject: {
3645 type: 'string',
3646 format: 'at-uri',
3647 },
3648 },
3649 },
3650 },
3651 },
3652 },
3653 SocialGrainLabelerDefs: {
3654 lexicon: 1,
3655 id: 'social.grain.labeler.defs',
3656 defs: {
3657 labelerView: {
3658 type: 'object',
3659 required: ['uri', 'cid', 'creator', 'indexedAt'],
3660 properties: {
3661 uri: {
3662 type: 'string',
3663 format: 'at-uri',
3664 },
3665 cid: {
3666 type: 'string',
3667 format: 'cid',
3668 },
3669 creator: {
3670 type: 'ref',
3671 ref: 'lex:social.grain.actor.defs#profileView',
3672 },
3673 favoriteCount: {
3674 type: 'integer',
3675 minimum: 0,
3676 },
3677 viewer: {
3678 type: 'ref',
3679 ref: 'lex:social.grain.labeler.defs#labelerViewerState',
3680 },
3681 indexedAt: {
3682 type: 'string',
3683 format: 'datetime',
3684 },
3685 labels: {
3686 type: 'array',
3687 items: {
3688 type: 'ref',
3689 ref: 'lex:com.atproto.label.defs#label',
3690 },
3691 },
3692 },
3693 },
3694 labelerViewDetailed: {
3695 type: 'object',
3696 required: ['uri', 'cid', 'creator', 'policies', 'indexedAt'],
3697 properties: {
3698 uri: {
3699 type: 'string',
3700 format: 'at-uri',
3701 },
3702 cid: {
3703 type: 'string',
3704 format: 'cid',
3705 },
3706 creator: {
3707 type: 'ref',
3708 ref: 'lex:app.bsky.actor.defs#profileView',
3709 },
3710 policies: {
3711 type: 'ref',
3712 ref: 'lex:social.grain.actor.defs#labelerPolicies',
3713 },
3714 favoriteCount: {
3715 type: 'integer',
3716 minimum: 0,
3717 },
3718 viewer: {
3719 type: 'ref',
3720 ref: 'lex:social.grain.labeler.defs#labelerViewerState',
3721 },
3722 indexedAt: {
3723 type: 'string',
3724 format: 'datetime',
3725 },
3726 labels: {
3727 type: 'array',
3728 items: {
3729 type: 'ref',
3730 ref: 'lex:com.atproto.label.defs#label',
3731 },
3732 },
3733 reasonTypes: {
3734 description:
3735 "The set of report reason 'codes' which are in-scope for this service to review and action. These usually align to policy categories. If not defined (distinct from empty array), all reason types are allowed.",
3736 type: 'array',
3737 items: {
3738 type: 'ref',
3739 ref: 'lex:com.atproto.moderation.defs#reasonType',
3740 },
3741 },
3742 subjectTypes: {
3743 description:
3744 'The set of subject types (account, record, etc) this service accepts reports on.',
3745 type: 'array',
3746 items: {
3747 type: 'ref',
3748 ref: 'lex:com.atproto.moderation.defs#subjectType',
3749 },
3750 },
3751 subjectCollections: {
3752 type: 'array',
3753 description:
3754 'Set of record types (collection NSIDs) which can be reported to this service. If not defined (distinct from empty array), default is any record type.',
3755 items: {
3756 type: 'string',
3757 format: 'nsid',
3758 },
3759 },
3760 },
3761 },
3762 labelerViewerState: {
3763 type: 'object',
3764 properties: {
3765 like: {
3766 type: 'string',
3767 format: 'at-uri',
3768 },
3769 },
3770 },
3771 labelerPolicies: {
3772 type: 'object',
3773 required: ['labelValues'],
3774 properties: {
3775 labelValues: {
3776 type: 'array',
3777 description:
3778 'The label values which this labeler publishes. May include global or custom labels.',
3779 items: {
3780 type: 'ref',
3781 ref: 'lex:com.atproto.label.defs#labelValue',
3782 },
3783 },
3784 labelValueDefinitions: {
3785 type: 'array',
3786 description:
3787 'Label values created by this labeler and scoped exclusively to it. Labels defined here will override global label definitions for this labeler.',
3788 items: {
3789 type: 'ref',
3790 ref: 'lex:com.atproto.label.defs#labelValueDefinition',
3791 },
3792 },
3793 },
3794 },
3795 },
3796 },
3797 SocialGrainLabelerService: {
3798 lexicon: 1,
3799 id: 'social.grain.labeler.service',
3800 defs: {
3801 main: {
3802 type: 'record',
3803 description: 'A declaration of the existence of labeler service.',
3804 key: 'literal:self',
3805 record: {
3806 type: 'object',
3807 required: ['policies', 'createdAt'],
3808 properties: {
3809 policies: {
3810 type: 'ref',
3811 ref: 'lex:app.bsky.labeler.defs#labelerPolicies',
3812 },
3813 labels: {
3814 type: 'union',
3815 refs: ['lex:com.atproto.label.defs#selfLabels'],
3816 },
3817 createdAt: {
3818 type: 'string',
3819 format: 'datetime',
3820 },
3821 reasonTypes: {
3822 description:
3823 "The set of report reason 'codes' which are in-scope for this service to review and action. These usually align to policy categories. If not defined (distinct from empty array), all reason types are allowed.",
3824 type: 'array',
3825 items: {
3826 type: 'ref',
3827 ref: 'lex:com.atproto.moderation.defs#reasonType',
3828 },
3829 },
3830 subjectTypes: {
3831 description:
3832 'The set of subject types (account, record, etc) this service accepts reports on.',
3833 type: 'array',
3834 items: {
3835 type: 'ref',
3836 ref: 'lex:com.atproto.moderation.defs#subjectType',
3837 },
3838 },
3839 subjectCollections: {
3840 type: 'array',
3841 description:
3842 'Set of record types (collection NSIDs) which can be reported to this service. If not defined (distinct from empty array), default is any record type.',
3843 items: {
3844 type: 'string',
3845 format: 'nsid',
3846 },
3847 },
3848 },
3849 },
3850 },
3851 },
3852 },
3853 SocialGrainFeedGetTimeline: {
3854 lexicon: 1,
3855 id: 'social.grain.feed.getTimeline',
3856 defs: {
3857 main: {
3858 type: 'query',
3859 description: "Get a view of the requesting account's home timeline.",
3860 parameters: {
3861 type: 'params',
3862 properties: {
3863 algorithm: {
3864 type: 'string',
3865 description:
3866 "Variant 'algorithm' for timeline. Implementation-specific.",
3867 },
3868 limit: {
3869 type: 'integer',
3870 minimum: 1,
3871 maximum: 100,
3872 default: 50,
3873 },
3874 cursor: {
3875 type: 'string',
3876 },
3877 },
3878 },
3879 output: {
3880 encoding: 'application/json',
3881 schema: {
3882 type: 'object',
3883 required: ['feed'],
3884 properties: {
3885 cursor: {
3886 type: 'string',
3887 },
3888 feed: {
3889 type: 'array',
3890 items: {
3891 type: 'ref',
3892 ref: 'lex:social.grain.gallery.defs#galleryView',
3893 },
3894 },
3895 },
3896 },
3897 },
3898 },
3899 },
3900 },
3901 SocialGrainActorDefs: {
3902 lexicon: 1,
3903 id: 'social.grain.actor.defs',
3904 defs: {
3905 profileView: {
3906 type: 'object',
3907 required: ['cid', 'did', 'handle'],
3908 properties: {
3909 cid: {
3910 type: 'string',
3911 format: 'cid',
3912 },
3913 did: {
3914 type: 'string',
3915 format: 'did',
3916 },
3917 handle: {
3918 type: 'string',
3919 format: 'handle',
3920 },
3921 displayName: {
3922 type: 'string',
3923 maxGraphemes: 64,
3924 maxLength: 640,
3925 },
3926 description: {
3927 type: 'string',
3928 maxLength: 2560,
3929 maxGraphemes: 256,
3930 },
3931 labels: {
3932 type: 'array',
3933 items: {
3934 ref: 'lex:com.atproto.label.defs#label',
3935 type: 'ref',
3936 },
3937 },
3938 avatar: {
3939 type: 'string',
3940 format: 'uri',
3941 },
3942 createdAt: {
3943 type: 'string',
3944 format: 'datetime',
3945 },
3946 },
3947 },
3948 profileViewDetailed: {
3949 type: 'object',
3950 required: ['cid', 'did', 'handle'],
3951 properties: {
3952 cid: {
3953 type: 'string',
3954 format: 'cid',
3955 },
3956 did: {
3957 type: 'string',
3958 format: 'did',
3959 },
3960 handle: {
3961 type: 'string',
3962 format: 'handle',
3963 },
3964 displayName: {
3965 type: 'string',
3966 maxGraphemes: 64,
3967 maxLength: 640,
3968 },
3969 description: {
3970 type: 'string',
3971 maxGraphemes: 256,
3972 maxLength: 2560,
3973 },
3974 avatar: {
3975 type: 'string',
3976 format: 'uri',
3977 },
3978 cameras: {
3979 type: 'array',
3980 items: {
3981 type: 'string',
3982 },
3983 description:
3984 'List of camera make and models used by this actor derived from EXIF data of photos linked to galleries.',
3985 },
3986 followersCount: {
3987 type: 'integer',
3988 },
3989 followsCount: {
3990 type: 'integer',
3991 },
3992 galleryCount: {
3993 type: 'integer',
3994 },
3995 indexedAt: {
3996 type: 'string',
3997 format: 'datetime',
3998 },
3999 createdAt: {
4000 type: 'string',
4001 format: 'datetime',
4002 },
4003 viewer: {
4004 type: 'ref',
4005 ref: 'lex:social.grain.actor.defs#viewerState',
4006 },
4007 labels: {
4008 type: 'array',
4009 items: {
4010 type: 'ref',
4011 ref: 'lex:com.atproto.label.defs#label',
4012 },
4013 },
4014 },
4015 },
4016 viewerState: {
4017 type: 'object',
4018 description:
4019 "Metadata about the requesting account's relationship with the subject account. Only has meaningful content for authed requests.",
4020 properties: {
4021 following: {
4022 type: 'string',
4023 format: 'at-uri',
4024 },
4025 followedBy: {
4026 type: 'string',
4027 format: 'at-uri',
4028 },
4029 },
4030 },
4031 },
4032 },
4033 SocialGrainActorGetProfile: {
4034 lexicon: 1,
4035 id: 'social.grain.actor.getProfile',
4036 defs: {
4037 main: {
4038 type: 'query',
4039 description:
4040 'Get detailed profile view of an actor. Does not require auth, but contains relevant metadata with auth.',
4041 parameters: {
4042 type: 'params',
4043 required: ['actor'],
4044 properties: {
4045 actor: {
4046 type: 'string',
4047 format: 'at-identifier',
4048 description: 'Handle or DID of account to fetch profile of.',
4049 },
4050 },
4051 },
4052 output: {
4053 encoding: 'application/json',
4054 schema: {
4055 type: 'ref',
4056 ref: 'lex:social.grain.actor.defs#profileViewDetailed',
4057 },
4058 },
4059 },
4060 },
4061 },
4062 SocialGrainActorSearchActors: {
4063 lexicon: 1,
4064 id: 'social.grain.actor.searchActors',
4065 defs: {
4066 main: {
4067 type: 'query',
4068 description:
4069 'Find actors (profiles) matching search criteria. Does not require auth.',
4070 parameters: {
4071 type: 'params',
4072 properties: {
4073 q: {
4074 type: 'string',
4075 description:
4076 'Search query string. Syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended.',
4077 },
4078 limit: {
4079 type: 'integer',
4080 minimum: 1,
4081 maximum: 100,
4082 default: 25,
4083 },
4084 cursor: {
4085 type: 'string',
4086 },
4087 },
4088 },
4089 output: {
4090 encoding: 'application/json',
4091 schema: {
4092 type: 'object',
4093 required: ['actors'],
4094 properties: {
4095 cursor: {
4096 type: 'string',
4097 },
4098 actors: {
4099 type: 'array',
4100 items: {
4101 type: 'ref',
4102 ref: 'lex:social.grain.actor.defs#profileView',
4103 },
4104 },
4105 },
4106 },
4107 },
4108 },
4109 },
4110 },
4111 SocialGrainActorUpdateAvatar: {
4112 lexicon: 1,
4113 id: 'social.grain.actor.updateAvatar',
4114 defs: {
4115 main: {
4116 type: 'procedure',
4117 description: "Update an actor's avatar. Requires auth.",
4118 input: {
4119 encoding: '*/*',
4120 },
4121 output: {
4122 encoding: 'application/json',
4123 schema: {
4124 type: 'object',
4125 properties: {
4126 success: {
4127 type: 'boolean',
4128 description:
4129 'Indicates whether the avatar update was successful.',
4130 },
4131 },
4132 },
4133 },
4134 },
4135 },
4136 },
4137 SocialGrainActorGetActorFavs: {
4138 lexicon: 1,
4139 id: 'social.grain.actor.getActorFavs',
4140 defs: {
4141 main: {
4142 type: 'query',
4143 description:
4144 "Get a view of an actor's favorite galleries. Does not require auth.",
4145 parameters: {
4146 type: 'params',
4147 required: ['actor'],
4148 properties: {
4149 actor: {
4150 type: 'string',
4151 format: 'at-identifier',
4152 },
4153 limit: {
4154 type: 'integer',
4155 minimum: 1,
4156 maximum: 100,
4157 default: 50,
4158 },
4159 cursor: {
4160 type: 'string',
4161 },
4162 },
4163 },
4164 output: {
4165 encoding: 'application/json',
4166 schema: {
4167 type: 'object',
4168 required: ['items'],
4169 properties: {
4170 cursor: {
4171 type: 'string',
4172 },
4173 items: {
4174 type: 'array',
4175 items: {
4176 type: 'ref',
4177 ref: 'lex:social.grain.gallery.defs#galleryView',
4178 },
4179 },
4180 },
4181 },
4182 },
4183 },
4184 },
4185 },
4186 SocialGrainActorProfile: {
4187 lexicon: 1,
4188 id: 'social.grain.actor.profile',
4189 defs: {
4190 main: {
4191 type: 'record',
4192 description: 'A declaration of a basic account profile.',
4193 key: 'literal:self',
4194 record: {
4195 type: 'object',
4196 properties: {
4197 displayName: {
4198 type: 'string',
4199 maxGraphemes: 64,
4200 maxLength: 640,
4201 },
4202 description: {
4203 type: 'string',
4204 description: 'Free-form profile description text.',
4205 maxGraphemes: 256,
4206 maxLength: 2560,
4207 },
4208 avatar: {
4209 type: 'blob',
4210 description:
4211 "Small image to be displayed next to posts from account. AKA, 'profile picture'",
4212 accept: ['image/png', 'image/jpeg'],
4213 maxSize: 1000000,
4214 },
4215 createdAt: {
4216 type: 'string',
4217 format: 'datetime',
4218 },
4219 },
4220 },
4221 },
4222 },
4223 },
4224 SocialGrainActorUpdateProfile: {
4225 lexicon: 1,
4226 id: 'social.grain.actor.updateProfile',
4227 defs: {
4228 main: {
4229 type: 'procedure',
4230 description: "Update an actor's profile info. Requires auth.",
4231 input: {
4232 encoding: 'application/json',
4233 schema: {
4234 type: 'object',
4235 properties: {
4236 displayName: {
4237 type: 'string',
4238 maxGraphemes: 64,
4239 maxLength: 640,
4240 },
4241 description: {
4242 type: 'string',
4243 description: 'Free-form profile description text.',
4244 maxGraphemes: 256,
4245 maxLength: 2560,
4246 },
4247 },
4248 },
4249 },
4250 output: {
4251 encoding: 'application/json',
4252 schema: {
4253 type: 'object',
4254 properties: {
4255 success: {
4256 type: 'boolean',
4257 description:
4258 'Indicates whether the profile update was successful.',
4259 },
4260 },
4261 },
4262 },
4263 },
4264 },
4265 },
4266 SocialGrainPhotoDefs: {
4267 lexicon: 1,
4268 id: 'social.grain.photo.defs',
4269 defs: {
4270 photoView: {
4271 type: 'object',
4272 required: ['uri', 'cid', 'thumb', 'fullsize', 'alt'],
4273 properties: {
4274 uri: {
4275 type: 'string',
4276 format: 'at-uri',
4277 },
4278 cid: {
4279 type: 'string',
4280 format: 'cid',
4281 },
4282 thumb: {
4283 type: 'string',
4284 format: 'uri',
4285 description:
4286 'Fully-qualified URL where a thumbnail of the image can be fetched. For example, CDN location provided by the App View.',
4287 },
4288 fullsize: {
4289 type: 'string',
4290 format: 'uri',
4291 description:
4292 'Fully-qualified URL where a large version of the image can be fetched. May or may not be the exact original blob. For example, CDN location provided by the App View.',
4293 },
4294 alt: {
4295 type: 'string',
4296 description:
4297 'Alt text description of the image, for accessibility.',
4298 },
4299 aspectRatio: {
4300 type: 'ref',
4301 ref: 'lex:social.grain.defs#aspectRatio',
4302 },
4303 exif: {
4304 type: 'ref',
4305 ref: 'lex:social.grain.photo.defs#exifView',
4306 description: 'EXIF metadata for the photo, if available.',
4307 },
4308 gallery: {
4309 type: 'ref',
4310 ref: 'lex:social.grain.photo.defs#galleryState',
4311 },
4312 },
4313 },
4314 exifView: {
4315 type: 'object',
4316 required: ['photo', 'createdAt'],
4317 properties: {
4318 uri: {
4319 type: 'string',
4320 format: 'at-uri',
4321 },
4322 cid: {
4323 type: 'string',
4324 format: 'cid',
4325 },
4326 photo: {
4327 type: 'string',
4328 format: 'at-uri',
4329 },
4330 createdAt: {
4331 type: 'string',
4332 format: 'datetime',
4333 },
4334 dateTimeOriginal: {
4335 type: 'string',
4336 },
4337 exposureTime: {
4338 type: 'string',
4339 },
4340 fNumber: {
4341 type: 'string',
4342 },
4343 flash: {
4344 type: 'string',
4345 },
4346 focalLengthIn35mmFormat: {
4347 type: 'string',
4348 },
4349 iSO: {
4350 type: 'integer',
4351 },
4352 lensMake: {
4353 type: 'string',
4354 },
4355 lensModel: {
4356 type: 'string',
4357 },
4358 make: {
4359 type: 'string',
4360 },
4361 model: {
4362 type: 'string',
4363 },
4364 },
4365 },
4366 galleryState: {
4367 type: 'object',
4368 required: ['item', 'itemCreatedAt', 'itemPosition'],
4369 description:
4370 "Metadata about the photo's relationship with the subject content. Only has meaningful content when photo is attached to a gallery.",
4371 properties: {
4372 item: {
4373 type: 'string',
4374 format: 'at-uri',
4375 },
4376 itemCreatedAt: {
4377 type: 'string',
4378 format: 'datetime',
4379 },
4380 itemPosition: {
4381 type: 'integer',
4382 },
4383 },
4384 },
4385 },
4386 },
4387 SocialGrainPhotoDeletePhoto: {
4388 lexicon: 1,
4389 id: 'social.grain.photo.deletePhoto',
4390 defs: {
4391 main: {
4392 type: 'procedure',
4393 description: 'Delete a photo by its unique at-uri.',
4394 input: {
4395 encoding: 'application/json',
4396 schema: {
4397 type: 'object',
4398 required: ['uri'],
4399 properties: {
4400 uri: {
4401 type: 'string',
4402 format: 'at-uri',
4403 description: 'AT URI of the photo to delete.',
4404 },
4405 },
4406 },
4407 },
4408 output: {
4409 encoding: 'application/json',
4410 schema: {
4411 type: 'object',
4412 required: ['success'],
4413 properties: {
4414 success: {
4415 type: 'boolean',
4416 description: 'Indicates if the photo was successfully deleted.',
4417 },
4418 },
4419 },
4420 },
4421 },
4422 },
4423 },
4424 SocialGrainPhotoUploadPhoto: {
4425 lexicon: 1,
4426 id: 'social.grain.photo.uploadPhoto',
4427 defs: {
4428 main: {
4429 type: 'procedure',
4430 description: 'Upload a photo. Requires auth.',
4431 input: {
4432 encoding: '*/*',
4433 },
4434 output: {
4435 encoding: 'application/json',
4436 schema: {
4437 type: 'object',
4438 properties: {
4439 photoUri: {
4440 type: 'string',
4441 format: 'at-uri',
4442 description: 'AT URI of the created photo',
4443 },
4444 },
4445 },
4446 },
4447 },
4448 },
4449 },
4450 SocialGrainPhotoCreateExif: {
4451 lexicon: 1,
4452 id: 'social.grain.photo.createExif',
4453 defs: {
4454 main: {
4455 type: 'procedure',
4456 description: 'Create a new Exif record for a photo',
4457 input: {
4458 encoding: 'application/json',
4459 schema: {
4460 type: 'object',
4461 required: ['photo'],
4462 properties: {
4463 photo: {
4464 type: 'string',
4465 format: 'at-uri',
4466 },
4467 dateTimeOriginal: {
4468 type: 'string',
4469 format: 'datetime',
4470 },
4471 exposureTime: {
4472 type: 'integer',
4473 },
4474 fNumber: {
4475 type: 'integer',
4476 },
4477 flash: {
4478 type: 'string',
4479 },
4480 focalLengthIn35mmFormat: {
4481 type: 'integer',
4482 },
4483 iSO: {
4484 type: 'integer',
4485 },
4486 lensMake: {
4487 type: 'string',
4488 },
4489 lensModel: {
4490 type: 'string',
4491 },
4492 make: {
4493 type: 'string',
4494 },
4495 model: {
4496 type: 'string',
4497 },
4498 },
4499 },
4500 },
4501 output: {
4502 encoding: 'application/json',
4503 schema: {
4504 type: 'object',
4505 properties: {
4506 exifUri: {
4507 type: 'string',
4508 format: 'at-uri',
4509 description: 'AT URI of the created gallery',
4510 },
4511 },
4512 },
4513 },
4514 },
4515 },
4516 },
4517 SocialGrainPhotoExif: {
4518 lexicon: 1,
4519 id: 'social.grain.photo.exif',
4520 defs: {
4521 main: {
4522 type: 'record',
4523 description:
4524 'Basic EXIF metadata for a photo. Integers are scaled by 1000000 to accommodate decimal values and potentially other tags in the future.',
4525 key: 'tid',
4526 record: {
4527 type: 'object',
4528 required: ['photo', 'createdAt'],
4529 properties: {
4530 photo: {
4531 type: 'string',
4532 format: 'at-uri',
4533 },
4534 createdAt: {
4535 type: 'string',
4536 format: 'datetime',
4537 },
4538 dateTimeOriginal: {
4539 type: 'string',
4540 format: 'datetime',
4541 },
4542 exposureTime: {
4543 type: 'integer',
4544 },
4545 fNumber: {
4546 type: 'integer',
4547 },
4548 flash: {
4549 type: 'string',
4550 },
4551 focalLengthIn35mmFormat: {
4552 type: 'integer',
4553 },
4554 iSO: {
4555 type: 'integer',
4556 },
4557 lensMake: {
4558 type: 'string',
4559 },
4560 lensModel: {
4561 type: 'string',
4562 },
4563 make: {
4564 type: 'string',
4565 },
4566 model: {
4567 type: 'string',
4568 },
4569 },
4570 },
4571 },
4572 },
4573 },
4574 SocialGrainPhotoApplyAlts: {
4575 lexicon: 1,
4576 id: 'social.grain.photo.applyAlts',
4577 defs: {
4578 main: {
4579 type: 'procedure',
4580 description: 'Apply alt texts to photos. Requires auth.',
4581 input: {
4582 encoding: 'application/json',
4583 schema: {
4584 type: 'object',
4585 required: ['writes'],
4586 properties: {
4587 writes: {
4588 type: 'array',
4589 items: {
4590 type: 'ref',
4591 ref: 'lex:social.grain.photo.applyAlts#update',
4592 },
4593 },
4594 },
4595 },
4596 },
4597 output: {
4598 encoding: 'application/json',
4599 schema: {
4600 type: 'object',
4601 properties: {
4602 success: {
4603 type: 'boolean',
4604 description: 'True if the writes were successfully applied',
4605 },
4606 },
4607 },
4608 },
4609 },
4610 update: {
4611 type: 'object',
4612 required: ['photoUri', 'alt'],
4613 properties: {
4614 photoUri: {
4615 type: 'string',
4616 format: 'at-uri',
4617 description: 'AT URI of the item to update',
4618 },
4619 alt: {
4620 type: 'string',
4621 maxLength: 1000,
4622 description: 'The alt text to apply to the photo',
4623 },
4624 },
4625 },
4626 },
4627 },
4628 SocialGrainPhotoGetActorPhotos: {
4629 lexicon: 1,
4630 id: 'social.grain.photo.getActorPhotos',
4631 defs: {
4632 main: {
4633 type: 'query',
4634 description: "Get a view of an actor's photos. Does not require auth.",
4635 parameters: {
4636 type: 'params',
4637 required: ['actor'],
4638 properties: {
4639 actor: {
4640 type: 'string',
4641 format: 'at-identifier',
4642 },
4643 limit: {
4644 type: 'integer',
4645 minimum: 1,
4646 maximum: 100,
4647 default: 50,
4648 },
4649 cursor: {
4650 type: 'string',
4651 },
4652 },
4653 },
4654 output: {
4655 encoding: 'application/json',
4656 schema: {
4657 type: 'object',
4658 required: ['items'],
4659 properties: {
4660 cursor: {
4661 type: 'string',
4662 },
4663 items: {
4664 type: 'array',
4665 items: {
4666 type: 'ref',
4667 ref: 'lex:social.grain.photo.defs#photoView',
4668 },
4669 },
4670 },
4671 },
4672 },
4673 },
4674 },
4675 },
4676 SocialGrainPhoto: {
4677 lexicon: 1,
4678 id: 'social.grain.photo',
4679 defs: {
4680 main: {
4681 type: 'record',
4682 key: 'tid',
4683 record: {
4684 type: 'object',
4685 required: ['photo', 'alt'],
4686 properties: {
4687 photo: {
4688 type: 'blob',
4689 accept: ['image/*'],
4690 maxSize: 1000000,
4691 },
4692 alt: {
4693 type: 'string',
4694 description:
4695 'Alt text description of the image, for accessibility.',
4696 },
4697 aspectRatio: {
4698 type: 'ref',
4699 ref: 'lex:social.grain.defs#aspectRatio',
4700 },
4701 createdAt: {
4702 type: 'string',
4703 format: 'datetime',
4704 },
4705 },
4706 },
4707 },
4708 },
4709 },
4710 ComAtprotoLabelDefs: {
4711 lexicon: 1,
4712 id: 'com.atproto.label.defs',
4713 defs: {
4714 label: {
4715 type: 'object',
4716 required: ['src', 'uri', 'val', 'cts'],
4717 properties: {
4718 cid: {
4719 type: 'string',
4720 format: 'cid',
4721 description:
4722 "Optionally, CID specifying the specific version of 'uri' resource this label applies to.",
4723 },
4724 cts: {
4725 type: 'string',
4726 format: 'datetime',
4727 description: 'Timestamp when this label was created.',
4728 },
4729 exp: {
4730 type: 'string',
4731 format: 'datetime',
4732 description:
4733 'Timestamp at which this label expires (no longer applies).',
4734 },
4735 neg: {
4736 type: 'boolean',
4737 description:
4738 'If true, this is a negation label, overwriting a previous label.',
4739 },
4740 sig: {
4741 type: 'bytes',
4742 description: 'Signature of dag-cbor encoded label.',
4743 },
4744 src: {
4745 type: 'string',
4746 format: 'did',
4747 description: 'DID of the actor who created this label.',
4748 },
4749 uri: {
4750 type: 'string',
4751 format: 'uri',
4752 description:
4753 'AT URI of the record, repository (account), or other resource that this label applies to.',
4754 },
4755 val: {
4756 type: 'string',
4757 maxLength: 128,
4758 description:
4759 'The short string name of the value or type of this label.',
4760 },
4761 ver: {
4762 type: 'integer',
4763 description: 'The AT Protocol version of the label object.',
4764 },
4765 },
4766 description:
4767 'Metadata tag on an atproto resource (eg, repo or record).',
4768 },
4769 selfLabel: {
4770 type: 'object',
4771 required: ['val'],
4772 properties: {
4773 val: {
4774 type: 'string',
4775 maxLength: 128,
4776 description:
4777 'The short string name of the value or type of this label.',
4778 },
4779 },
4780 description:
4781 'Metadata tag on an atproto record, published by the author within the record. Note that schemas should use #selfLabels, not #selfLabel.',
4782 },
4783 labelValue: {
4784 type: 'string',
4785 knownValues: [
4786 '!hide',
4787 '!no-promote',
4788 '!warn',
4789 '!no-unauthenticated',
4790 'dmca-violation',
4791 'doxxing',
4792 'porn',
4793 'sexual',
4794 'nudity',
4795 'nsfl',
4796 'gore',
4797 ],
4798 },
4799 selfLabels: {
4800 type: 'object',
4801 required: ['values'],
4802 properties: {
4803 values: {
4804 type: 'array',
4805 items: {
4806 ref: 'lex:com.atproto.label.defs#selfLabel',
4807 type: 'ref',
4808 },
4809 maxLength: 10,
4810 },
4811 },
4812 description:
4813 'Metadata tags on an atproto record, published by the author within the record.',
4814 },
4815 labelValueDefinition: {
4816 type: 'object',
4817 required: ['identifier', 'severity', 'blurs', 'locales'],
4818 properties: {
4819 blurs: {
4820 type: 'string',
4821 description:
4822 "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.",
4823 knownValues: ['content', 'media', 'none'],
4824 },
4825 locales: {
4826 type: 'array',
4827 items: {
4828 ref: 'lex:com.atproto.label.defs#labelValueDefinitionStrings',
4829 type: 'ref',
4830 },
4831 },
4832 severity: {
4833 type: 'string',
4834 description:
4835 "How should a client visually convey this label? 'inform' means neutral and informational; 'alert' means negative and warning; 'none' means show nothing.",
4836 knownValues: ['inform', 'alert', 'none'],
4837 },
4838 adultOnly: {
4839 type: 'boolean',
4840 description:
4841 'Does the user need to have adult content enabled in order to configure this label?',
4842 },
4843 identifier: {
4844 type: 'string',
4845 maxLength: 100,
4846 description:
4847 "The value of the label being defined. Must only include lowercase ascii and the '-' character ([a-z-]+).",
4848 maxGraphemes: 100,
4849 },
4850 defaultSetting: {
4851 type: 'string',
4852 default: 'warn',
4853 description: 'The default setting for this label.',
4854 knownValues: ['ignore', 'warn', 'hide'],
4855 },
4856 },
4857 description:
4858 'Declares a label value and its expected interpretations and behaviors.',
4859 },
4860 labelValueDefinitionStrings: {
4861 type: 'object',
4862 required: ['lang', 'name', 'description'],
4863 properties: {
4864 lang: {
4865 type: 'string',
4866 format: 'language',
4867 description:
4868 'The code of the language these strings are written in.',
4869 },
4870 name: {
4871 type: 'string',
4872 maxLength: 640,
4873 description: 'A short human-readable name for the label.',
4874 maxGraphemes: 64,
4875 },
4876 description: {
4877 type: 'string',
4878 maxLength: 100000,
4879 description:
4880 'A longer description of what the label means and why it might be applied.',
4881 maxGraphemes: 10000,
4882 },
4883 },
4884 description:
4885 'Strings which describe the label in the UI, localized into a specific language.',
4886 },
4887 },
4888 },
4889 ComAtprotoRepoStrongRef: {
4890 lexicon: 1,
4891 id: 'com.atproto.repo.strongRef',
4892 description: 'A URI with a content-hash fingerprint.',
4893 defs: {
4894 main: {
4895 type: 'object',
4896 required: ['uri', 'cid'],
4897 properties: {
4898 cid: {
4899 type: 'string',
4900 format: 'cid',
4901 },
4902 uri: {
4903 type: 'string',
4904 format: 'at-uri',
4905 },
4906 },
4907 },
4908 },
4909 },
4910 ComAtprotoModerationDefs: {
4911 lexicon: 1,
4912 id: 'com.atproto.moderation.defs',
4913 defs: {
4914 reasonRude: {
4915 type: 'token',
4916 description:
4917 'Rude, harassing, explicit, or otherwise unwelcoming behavior',
4918 },
4919 reasonSpam: {
4920 type: 'token',
4921 description: 'Spam: frequent unwanted promotion, replies, mentions',
4922 },
4923 reasonType: {
4924 type: 'string',
4925 knownValues: [
4926 'com.atproto.moderation.defs#reasonSpam',
4927 'com.atproto.moderation.defs#reasonViolation',
4928 'com.atproto.moderation.defs#reasonMisleading',
4929 'com.atproto.moderation.defs#reasonSexual',
4930 'com.atproto.moderation.defs#reasonRude',
4931 'com.atproto.moderation.defs#reasonOther',
4932 'com.atproto.moderation.defs#reasonAppeal',
4933 ],
4934 },
4935 reasonOther: {
4936 type: 'token',
4937 description: 'Other: reports not falling under another report category',
4938 },
4939 subjectType: {
4940 type: 'string',
4941 description: 'Tag describing a type of subject that might be reported.',
4942 knownValues: ['account', 'record', 'chat'],
4943 },
4944 reasonAppeal: {
4945 type: 'token',
4946 description: 'Appeal: appeal a previously taken moderation action',
4947 },
4948 reasonSexual: {
4949 type: 'token',
4950 description: 'Unwanted or mislabeled sexual content',
4951 },
4952 reasonViolation: {
4953 type: 'token',
4954 description: 'Direct violation of server rules, laws, terms of service',
4955 },
4956 reasonMisleading: {
4957 type: 'token',
4958 description: 'Misleading identity, affiliation, or content',
4959 },
4960 },
4961 },
4962} as const satisfies Record<string, LexiconDoc>
4963export const schemas = Object.values(schemaDict) satisfies LexiconDoc[]
4964export const lexicons: Lexicons = new Lexicons(schemas)
4965
4966export function validate<T extends { $type: string }>(
4967 v: unknown,
4968 id: string,
4969 hash: string,
4970 requiredType: true,
4971): ValidationResult<T>
4972export function validate<T extends { $type?: string }>(
4973 v: unknown,
4974 id: string,
4975 hash: string,
4976 requiredType?: false,
4977): ValidationResult<T>
4978export function validate(
4979 v: unknown,
4980 id: string,
4981 hash: string,
4982 requiredType?: boolean,
4983): ValidationResult {
4984 return (requiredType ? is$typed : maybe$typed)(v, id, hash)
4985 ? lexicons.validate(`${id}#${hash}`, v)
4986 : {
4987 success: false,
4988 error: new ValidationError(
4989 `Must be an object with "${hash === 'main' ? id : `${id}#${hash}`}" $type property`,
4990 ),
4991 }
4992}
4993
4994export const ids = {
4995 AppBskyEmbedDefs: 'app.bsky.embed.defs',
4996 AppBskyEmbedRecord: 'app.bsky.embed.record',
4997 AppBskyEmbedImages: 'app.bsky.embed.images',
4998 AppBskyEmbedRecordWithMedia: 'app.bsky.embed.recordWithMedia',
4999 AppBskyEmbedVideo: 'app.bsky.embed.video',
5000 AppBskyEmbedExternal: 'app.bsky.embed.external',
5001 AppBskyGraphFollow: 'app.bsky.graph.follow',
5002 AppBskyGraphDefs: 'app.bsky.graph.defs',
5003 AppBskyFeedDefs: 'app.bsky.feed.defs',
5004 AppBskyFeedPostgate: 'app.bsky.feed.postgate',
5005 AppBskyFeedThreadgate: 'app.bsky.feed.threadgate',
5006 AppBskyRichtextFacet: 'app.bsky.richtext.facet',
5007 AppBskyActorDefs: 'app.bsky.actor.defs',
5008 AppBskyActorProfile: 'app.bsky.actor.profile',
5009 AppBskyLabelerDefs: 'app.bsky.labeler.defs',
5010 ShTangledGraphFollow: 'sh.tangled.graph.follow',
5011 ShTangledActorProfile: 'sh.tangled.actor.profile',
5012 SocialGrainDefs: 'social.grain.defs',
5013 SocialGrainNotificationDefs: 'social.grain.notification.defs',
5014 SocialGrainNotificationUpdateSeen: 'social.grain.notification.updateSeen',
5015 SocialGrainNotificationGetNotifications:
5016 'social.grain.notification.getNotifications',
5017 SocialGrainCommentDefs: 'social.grain.comment.defs',
5018 SocialGrainCommentDeleteComment: 'social.grain.comment.deleteComment',
5019 SocialGrainCommentCreateComment: 'social.grain.comment.createComment',
5020 SocialGrainComment: 'social.grain.comment',
5021 SocialGrainGalleryDeleteGallery: 'social.grain.gallery.deleteGallery',
5022 SocialGrainGalleryItem: 'social.grain.gallery.item',
5023 SocialGrainGalleryCreateItem: 'social.grain.gallery.createItem',
5024 SocialGrainGalleryCreateGallery: 'social.grain.gallery.createGallery',
5025 SocialGrainGalleryDefs: 'social.grain.gallery.defs',
5026 SocialGrainGalleryDeleteItem: 'social.grain.gallery.deleteItem',
5027 SocialGrainGallery: 'social.grain.gallery',
5028 SocialGrainGalleryUpdateGallery: 'social.grain.gallery.updateGallery',
5029 SocialGrainGalleryApplySort: 'social.grain.gallery.applySort',
5030 SocialGrainGalleryGetGalleryThread: 'social.grain.gallery.getGalleryThread',
5031 SocialGrainGalleryGetActorGalleries: 'social.grain.gallery.getActorGalleries',
5032 SocialGrainGalleryGetGallery: 'social.grain.gallery.getGallery',
5033 SocialGrainGraphDeleteFollow: 'social.grain.graph.deleteFollow',
5034 SocialGrainGraphFollow: 'social.grain.graph.follow',
5035 SocialGrainGraphCreateFollow: 'social.grain.graph.createFollow',
5036 SocialGrainGraphGetFollowers: 'social.grain.graph.getFollowers',
5037 SocialGrainGraphGetFollows: 'social.grain.graph.getFollows',
5038 SocialGrainFavoriteDeleteFavorite: 'social.grain.favorite.deleteFavorite',
5039 SocialGrainFavoriteCreateFavorite: 'social.grain.favorite.createFavorite',
5040 SocialGrainFavorite: 'social.grain.favorite',
5041 SocialGrainLabelerDefs: 'social.grain.labeler.defs',
5042 SocialGrainLabelerService: 'social.grain.labeler.service',
5043 SocialGrainFeedGetTimeline: 'social.grain.feed.getTimeline',
5044 SocialGrainActorDefs: 'social.grain.actor.defs',
5045 SocialGrainActorGetProfile: 'social.grain.actor.getProfile',
5046 SocialGrainActorSearchActors: 'social.grain.actor.searchActors',
5047 SocialGrainActorUpdateAvatar: 'social.grain.actor.updateAvatar',
5048 SocialGrainActorGetActorFavs: 'social.grain.actor.getActorFavs',
5049 SocialGrainActorProfile: 'social.grain.actor.profile',
5050 SocialGrainActorUpdateProfile: 'social.grain.actor.updateProfile',
5051 SocialGrainPhotoDefs: 'social.grain.photo.defs',
5052 SocialGrainPhotoDeletePhoto: 'social.grain.photo.deletePhoto',
5053 SocialGrainPhotoUploadPhoto: 'social.grain.photo.uploadPhoto',
5054 SocialGrainPhotoCreateExif: 'social.grain.photo.createExif',
5055 SocialGrainPhotoExif: 'social.grain.photo.exif',
5056 SocialGrainPhotoApplyAlts: 'social.grain.photo.applyAlts',
5057 SocialGrainPhotoGetActorPhotos: 'social.grain.photo.getActorPhotos',
5058 SocialGrainPhoto: 'social.grain.photo',
5059 ComAtprotoLabelDefs: 'com.atproto.label.defs',
5060 ComAtprotoRepoStrongRef: 'com.atproto.repo.strongRef',
5061 ComAtprotoModerationDefs: 'com.atproto.moderation.defs',
5062} as const