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 cascade: {
2820 type: 'boolean',
2821 default: true,
2822 description:
2823 'If true, will also delete any associated items in the gallery.',
2824 },
2825 },
2826 },
2827 },
2828 output: {
2829 encoding: 'application/json',
2830 schema: {
2831 type: 'object',
2832 properties: {
2833 success: {
2834 type: 'boolean',
2835 description: 'True if the gallery was deleted',
2836 },
2837 },
2838 },
2839 },
2840 },
2841 },
2842 },
2843 SocialGrainGalleryItem: {
2844 lexicon: 1,
2845 id: 'social.grain.gallery.item',
2846 defs: {
2847 main: {
2848 type: 'record',
2849 key: 'tid',
2850 record: {
2851 type: 'object',
2852 required: ['createdAt', 'gallery', 'item'],
2853 properties: {
2854 createdAt: {
2855 type: 'string',
2856 format: 'datetime',
2857 },
2858 gallery: {
2859 type: 'string',
2860 format: 'at-uri',
2861 },
2862 item: {
2863 type: 'string',
2864 format: 'at-uri',
2865 },
2866 position: {
2867 type: 'integer',
2868 default: 0,
2869 },
2870 },
2871 },
2872 },
2873 },
2874 },
2875 SocialGrainGalleryCreateItem: {
2876 lexicon: 1,
2877 id: 'social.grain.gallery.createItem',
2878 defs: {
2879 main: {
2880 type: 'procedure',
2881 description: 'Create a new gallery item',
2882 input: {
2883 encoding: 'application/json',
2884 schema: {
2885 type: 'object',
2886 required: ['galleryUri', 'photoUri', 'position'],
2887 properties: {
2888 galleryUri: {
2889 type: 'string',
2890 format: 'at-uri',
2891 description: 'AT URI of the gallery to create the item in',
2892 },
2893 photoUri: {
2894 type: 'string',
2895 format: 'at-uri',
2896 description: 'AT URI of the photo to be added as an item',
2897 },
2898 position: {
2899 type: 'integer',
2900 description:
2901 'Position of the item in the gallery, used for ordering',
2902 },
2903 },
2904 },
2905 },
2906 output: {
2907 encoding: 'application/json',
2908 schema: {
2909 type: 'object',
2910 properties: {
2911 itemUri: {
2912 type: 'string',
2913 format: 'at-uri',
2914 description: 'AT URI of the created gallery item',
2915 },
2916 },
2917 },
2918 },
2919 },
2920 },
2921 },
2922 SocialGrainGalleryCreateGallery: {
2923 lexicon: 1,
2924 id: 'social.grain.gallery.createGallery',
2925 defs: {
2926 main: {
2927 type: 'procedure',
2928 description: 'Create a new gallery',
2929 input: {
2930 encoding: 'application/json',
2931 schema: {
2932 type: 'object',
2933 required: ['title'],
2934 properties: {
2935 title: {
2936 type: 'string',
2937 maxLength: 100,
2938 },
2939 description: {
2940 type: 'string',
2941 maxLength: 1000,
2942 },
2943 },
2944 },
2945 },
2946 output: {
2947 encoding: 'application/json',
2948 schema: {
2949 type: 'object',
2950 properties: {
2951 galleryUri: {
2952 type: 'string',
2953 format: 'at-uri',
2954 description: 'AT URI of the created gallery',
2955 },
2956 },
2957 },
2958 },
2959 },
2960 },
2961 },
2962 SocialGrainGalleryDefs: {
2963 lexicon: 1,
2964 id: 'social.grain.gallery.defs',
2965 defs: {
2966 galleryView: {
2967 type: 'object',
2968 required: ['uri', 'cid', 'creator', 'record', 'indexedAt'],
2969 properties: {
2970 uri: {
2971 type: 'string',
2972 format: 'at-uri',
2973 },
2974 cid: {
2975 type: 'string',
2976 format: 'cid',
2977 },
2978 title: {
2979 type: 'string',
2980 },
2981 description: {
2982 type: 'string',
2983 },
2984 cameras: {
2985 type: 'array',
2986 description:
2987 'List of camera make and models used in this gallery derived from EXIF data.',
2988 items: {
2989 type: 'string',
2990 },
2991 },
2992 facets: {
2993 type: 'array',
2994 description:
2995 'Annotations of description text (mentions, URLs, hashtags, etc)',
2996 items: {
2997 type: 'ref',
2998 ref: 'lex:app.bsky.richtext.facet',
2999 },
3000 },
3001 creator: {
3002 type: 'ref',
3003 ref: 'lex:social.grain.actor.defs#profileView',
3004 },
3005 record: {
3006 type: 'unknown',
3007 },
3008 items: {
3009 type: 'array',
3010 items: {
3011 type: 'union',
3012 refs: ['lex:social.grain.photo.defs#photoView'],
3013 },
3014 },
3015 favCount: {
3016 type: 'integer',
3017 },
3018 commentCount: {
3019 type: 'integer',
3020 },
3021 labels: {
3022 type: 'array',
3023 items: {
3024 type: 'ref',
3025 ref: 'lex:com.atproto.label.defs#label',
3026 },
3027 },
3028 createdAt: {
3029 type: 'string',
3030 format: 'datetime',
3031 },
3032 indexedAt: {
3033 type: 'string',
3034 format: 'datetime',
3035 },
3036 viewer: {
3037 type: 'ref',
3038 ref: 'lex:social.grain.gallery.defs#viewerState',
3039 },
3040 },
3041 },
3042 viewerState: {
3043 type: 'object',
3044 description:
3045 "Metadata about the requesting account's relationship with the subject content. Only has meaningful content for authed requests.",
3046 properties: {
3047 fav: {
3048 type: 'string',
3049 format: 'at-uri',
3050 },
3051 },
3052 },
3053 },
3054 },
3055 SocialGrainGalleryDeleteItem: {
3056 lexicon: 1,
3057 id: 'social.grain.gallery.deleteItem',
3058 defs: {
3059 main: {
3060 type: 'procedure',
3061 description: 'Delete a gallery item',
3062 input: {
3063 encoding: 'application/json',
3064 schema: {
3065 type: 'object',
3066 required: ['uri'],
3067 properties: {
3068 uri: {
3069 type: 'string',
3070 format: 'at-uri',
3071 description: 'AT URI of the gallery to create the item in',
3072 },
3073 },
3074 },
3075 },
3076 output: {
3077 encoding: 'application/json',
3078 schema: {
3079 type: 'object',
3080 properties: {
3081 success: {
3082 type: 'boolean',
3083 description: 'True if the gallery item was deleted',
3084 },
3085 },
3086 },
3087 },
3088 },
3089 },
3090 },
3091 SocialGrainGallery: {
3092 lexicon: 1,
3093 id: 'social.grain.gallery',
3094 defs: {
3095 main: {
3096 type: 'record',
3097 key: 'tid',
3098 record: {
3099 type: 'object',
3100 required: ['title', 'createdAt'],
3101 properties: {
3102 title: {
3103 type: 'string',
3104 maxLength: 100,
3105 },
3106 description: {
3107 type: 'string',
3108 maxLength: 1000,
3109 },
3110 facets: {
3111 type: 'array',
3112 description:
3113 'Annotations of description text (mentions, URLs, hashtags, etc)',
3114 items: {
3115 type: 'ref',
3116 ref: 'lex:app.bsky.richtext.facet',
3117 },
3118 },
3119 labels: {
3120 type: 'union',
3121 description:
3122 'Self-label values for this post. Effectively content warnings.',
3123 refs: ['lex:com.atproto.label.defs#selfLabels'],
3124 },
3125 updatedAt: {
3126 type: 'string',
3127 format: 'datetime',
3128 },
3129 createdAt: {
3130 type: 'string',
3131 format: 'datetime',
3132 },
3133 },
3134 },
3135 },
3136 },
3137 },
3138 SocialGrainGalleryUpdateGallery: {
3139 lexicon: 1,
3140 id: 'social.grain.gallery.updateGallery',
3141 defs: {
3142 main: {
3143 type: 'procedure',
3144 description: 'Create a new gallery',
3145 input: {
3146 encoding: 'application/json',
3147 schema: {
3148 type: 'object',
3149 required: ['galleryUri', 'title'],
3150 properties: {
3151 galleryUri: {
3152 type: 'string',
3153 format: 'at-uri',
3154 description: 'The AT-URI of the gallery to update',
3155 },
3156 title: {
3157 type: 'string',
3158 },
3159 description: {
3160 type: 'string',
3161 },
3162 },
3163 },
3164 },
3165 output: {
3166 encoding: 'application/json',
3167 schema: {
3168 type: 'object',
3169 properties: {
3170 success: {
3171 type: 'boolean',
3172 description: 'True if the gallery was updated',
3173 },
3174 },
3175 },
3176 },
3177 },
3178 },
3179 },
3180 SocialGrainGalleryApplySort: {
3181 lexicon: 1,
3182 id: 'social.grain.gallery.applySort',
3183 defs: {
3184 main: {
3185 type: 'procedure',
3186 description: 'Apply sorting to photos in a gallery. Requires auth.',
3187 input: {
3188 encoding: 'application/json',
3189 schema: {
3190 type: 'object',
3191 required: ['writes'],
3192 properties: {
3193 writes: {
3194 type: 'array',
3195 items: {
3196 type: 'ref',
3197 ref: 'lex:social.grain.gallery.applySort#update',
3198 },
3199 },
3200 },
3201 },
3202 },
3203 output: {
3204 encoding: 'application/json',
3205 schema: {
3206 type: 'object',
3207 properties: {
3208 success: {
3209 type: 'boolean',
3210 description: 'True if the writes were successfully applied',
3211 },
3212 },
3213 },
3214 },
3215 },
3216 update: {
3217 type: 'object',
3218 required: ['itemUri', 'position'],
3219 properties: {
3220 itemUri: {
3221 type: 'string',
3222 format: 'at-uri',
3223 description: 'AT URI of the item to update',
3224 },
3225 position: {
3226 type: 'integer',
3227 description:
3228 'The position of the item in the gallery, used for ordering',
3229 },
3230 },
3231 },
3232 },
3233 },
3234 SocialGrainGalleryGetGalleryThread: {
3235 lexicon: 1,
3236 id: 'social.grain.gallery.getGalleryThread',
3237 defs: {
3238 main: {
3239 type: 'query',
3240 description:
3241 'Gets a hydrated gallery view and its comments for a specified gallery AT-URI.',
3242 parameters: {
3243 type: 'params',
3244 required: ['uri'],
3245 properties: {
3246 uri: {
3247 type: 'string',
3248 description:
3249 'The AT-URI of the gallery to return a hydrated view and comments for.',
3250 format: 'at-uri',
3251 },
3252 },
3253 },
3254 output: {
3255 encoding: 'application/json',
3256 schema: {
3257 type: 'object',
3258 required: ['gallery', 'comments'],
3259 properties: {
3260 gallery: {
3261 type: 'ref',
3262 ref: 'lex:social.grain.gallery.defs#galleryView',
3263 },
3264 comments: {
3265 type: 'array',
3266 items: {
3267 type: 'ref',
3268 ref: 'lex:social.grain.comment.defs#commentView',
3269 },
3270 },
3271 },
3272 },
3273 },
3274 },
3275 },
3276 },
3277 SocialGrainGalleryGetActorGalleries: {
3278 lexicon: 1,
3279 id: 'social.grain.gallery.getActorGalleries',
3280 defs: {
3281 main: {
3282 type: 'query',
3283 description:
3284 "Get a view of an actor's galleries. Does not require auth.",
3285 parameters: {
3286 type: 'params',
3287 required: ['actor'],
3288 properties: {
3289 actor: {
3290 type: 'string',
3291 format: 'at-identifier',
3292 },
3293 limit: {
3294 type: 'integer',
3295 minimum: 1,
3296 maximum: 100,
3297 default: 50,
3298 },
3299 cursor: {
3300 type: 'string',
3301 },
3302 },
3303 },
3304 output: {
3305 encoding: 'application/json',
3306 schema: {
3307 type: 'object',
3308 required: ['items'],
3309 properties: {
3310 cursor: {
3311 type: 'string',
3312 },
3313 items: {
3314 type: 'array',
3315 items: {
3316 type: 'ref',
3317 ref: 'lex:social.grain.gallery.defs#galleryView',
3318 },
3319 },
3320 },
3321 },
3322 },
3323 },
3324 },
3325 },
3326 SocialGrainGalleryGetGallery: {
3327 lexicon: 1,
3328 id: 'social.grain.gallery.getGallery',
3329 defs: {
3330 main: {
3331 type: 'query',
3332 description:
3333 'Gets a hydrated gallery view for a specified gallery AT-URI.',
3334 parameters: {
3335 type: 'params',
3336 required: ['uri'],
3337 properties: {
3338 uri: {
3339 type: 'string',
3340 description:
3341 'The AT-URI of the gallery to return a hydrated view for.',
3342 format: 'at-uri',
3343 },
3344 },
3345 },
3346 output: {
3347 encoding: 'application/json',
3348 schema: {
3349 type: 'ref',
3350 ref: 'lex:social.grain.gallery.defs#galleryView',
3351 },
3352 },
3353 },
3354 },
3355 },
3356 SocialGrainGraphDeleteFollow: {
3357 lexicon: 1,
3358 id: 'social.grain.graph.deleteFollow',
3359 defs: {
3360 main: {
3361 type: 'procedure',
3362 description: 'Delete a follow relationship. Requires auth.',
3363 input: {
3364 encoding: 'application/json',
3365 schema: {
3366 type: 'object',
3367 required: ['uri'],
3368 properties: {
3369 uri: {
3370 type: 'string',
3371 format: 'at-uri',
3372 description: 'AT URI of the follow record to delete',
3373 },
3374 },
3375 },
3376 },
3377 output: {
3378 encoding: 'application/json',
3379 schema: {
3380 type: 'object',
3381 properties: {
3382 success: {
3383 type: 'boolean',
3384 description: 'True if the follow was deleted',
3385 },
3386 },
3387 },
3388 },
3389 },
3390 },
3391 },
3392 SocialGrainGraphFollow: {
3393 lexicon: 1,
3394 id: 'social.grain.graph.follow',
3395 defs: {
3396 main: {
3397 key: 'tid',
3398 type: 'record',
3399 record: {
3400 type: 'object',
3401 required: ['subject', 'createdAt'],
3402 properties: {
3403 subject: {
3404 type: 'string',
3405 format: 'did',
3406 },
3407 createdAt: {
3408 type: 'string',
3409 format: 'datetime',
3410 },
3411 },
3412 },
3413 },
3414 },
3415 },
3416 SocialGrainGraphCreateFollow: {
3417 lexicon: 1,
3418 id: 'social.grain.graph.createFollow',
3419 defs: {
3420 main: {
3421 type: 'procedure',
3422 description: 'Create a follow relationship between actors.',
3423 input: {
3424 encoding: 'application/json',
3425 schema: {
3426 type: 'object',
3427 required: ['subject'],
3428 properties: {
3429 subject: {
3430 type: 'string',
3431 format: 'at-identifier',
3432 description: 'DID of the actor to follow.',
3433 },
3434 },
3435 },
3436 },
3437 output: {
3438 encoding: 'application/json',
3439 schema: {
3440 type: 'object',
3441 properties: {
3442 followUri: {
3443 type: 'string',
3444 format: 'at-uri',
3445 description: 'AT URI of the created follow record.',
3446 },
3447 },
3448 },
3449 },
3450 },
3451 },
3452 },
3453 SocialGrainGraphGetFollowers: {
3454 lexicon: 1,
3455 id: 'social.grain.graph.getFollowers',
3456 defs: {
3457 main: {
3458 type: 'query',
3459 description:
3460 'Enumerates accounts which follow a specified account (actor).',
3461 parameters: {
3462 type: 'params',
3463 required: ['actor'],
3464 properties: {
3465 actor: {
3466 type: 'string',
3467 format: 'at-identifier',
3468 },
3469 limit: {
3470 type: 'integer',
3471 minimum: 1,
3472 maximum: 100,
3473 default: 50,
3474 },
3475 cursor: {
3476 type: 'string',
3477 },
3478 },
3479 },
3480 output: {
3481 encoding: 'application/json',
3482 schema: {
3483 type: 'object',
3484 required: ['subject', 'followers'],
3485 properties: {
3486 subject: {
3487 type: 'ref',
3488 ref: 'lex:social.grain.actor.defs#profileView',
3489 },
3490 cursor: {
3491 type: 'string',
3492 },
3493 followers: {
3494 type: 'array',
3495 items: {
3496 type: 'ref',
3497 ref: 'lex:social.grain.actor.defs#profileView',
3498 },
3499 },
3500 },
3501 },
3502 },
3503 },
3504 },
3505 },
3506 SocialGrainGraphGetFollows: {
3507 lexicon: 1,
3508 id: 'social.grain.graph.getFollows',
3509 defs: {
3510 main: {
3511 type: 'query',
3512 description:
3513 'Enumerates accounts which a specified account (actor) follows.',
3514 parameters: {
3515 type: 'params',
3516 required: ['actor'],
3517 properties: {
3518 actor: {
3519 type: 'string',
3520 format: 'at-identifier',
3521 },
3522 limit: {
3523 type: 'integer',
3524 minimum: 1,
3525 maximum: 100,
3526 default: 50,
3527 },
3528 cursor: {
3529 type: 'string',
3530 },
3531 },
3532 },
3533 output: {
3534 encoding: 'application/json',
3535 schema: {
3536 type: 'object',
3537 required: ['subject', 'follows'],
3538 properties: {
3539 subject: {
3540 type: 'ref',
3541 ref: 'lex:social.grain.actor.defs#profileView',
3542 },
3543 cursor: {
3544 type: 'string',
3545 },
3546 follows: {
3547 type: 'array',
3548 items: {
3549 type: 'ref',
3550 ref: 'lex:social.grain.actor.defs#profileView',
3551 },
3552 },
3553 },
3554 },
3555 },
3556 },
3557 },
3558 },
3559 SocialGrainFavoriteDeleteFavorite: {
3560 lexicon: 1,
3561 id: 'social.grain.favorite.deleteFavorite',
3562 defs: {
3563 main: {
3564 type: 'procedure',
3565 description: 'Delete a favorite item by its ID.',
3566 input: {
3567 encoding: 'application/json',
3568 schema: {
3569 type: 'object',
3570 required: ['uri'],
3571 properties: {
3572 uri: {
3573 type: 'string',
3574 format: 'at-uri',
3575 description: 'The AT URI of the favorite to delete.',
3576 },
3577 },
3578 },
3579 },
3580 output: {
3581 encoding: 'application/json',
3582 schema: {
3583 type: 'object',
3584 required: ['success'],
3585 properties: {
3586 success: {
3587 type: 'boolean',
3588 description:
3589 'Indicates if the favorite was successfully deleted.',
3590 },
3591 },
3592 },
3593 },
3594 },
3595 },
3596 },
3597 SocialGrainFavoriteCreateFavorite: {
3598 lexicon: 1,
3599 id: 'social.grain.favorite.createFavorite',
3600 defs: {
3601 main: {
3602 description: 'Create a favorite for a given subject.',
3603 type: 'procedure',
3604 input: {
3605 encoding: 'application/json',
3606 schema: {
3607 type: 'object',
3608 required: ['subject'],
3609 properties: {
3610 subject: {
3611 type: 'string',
3612 format: 'at-uri',
3613 description: 'URI of the subject to favorite.',
3614 },
3615 },
3616 },
3617 },
3618 output: {
3619 encoding: 'application/json',
3620 schema: {
3621 type: 'object',
3622 required: ['favoriteUri'],
3623 properties: {
3624 favoriteUri: {
3625 type: 'string',
3626 format: 'at-uri',
3627 description: 'AT URI for the created favorite.',
3628 },
3629 },
3630 },
3631 },
3632 },
3633 },
3634 },
3635 SocialGrainFavorite: {
3636 lexicon: 1,
3637 id: 'social.grain.favorite',
3638 defs: {
3639 main: {
3640 type: 'record',
3641 key: 'tid',
3642 record: {
3643 type: 'object',
3644 required: ['createdAt', 'subject'],
3645 properties: {
3646 createdAt: {
3647 type: 'string',
3648 format: 'datetime',
3649 },
3650 subject: {
3651 type: 'string',
3652 format: 'at-uri',
3653 },
3654 },
3655 },
3656 },
3657 },
3658 },
3659 SocialGrainLabelerDefs: {
3660 lexicon: 1,
3661 id: 'social.grain.labeler.defs',
3662 defs: {
3663 labelerView: {
3664 type: 'object',
3665 required: ['uri', 'cid', 'creator', 'indexedAt'],
3666 properties: {
3667 uri: {
3668 type: 'string',
3669 format: 'at-uri',
3670 },
3671 cid: {
3672 type: 'string',
3673 format: 'cid',
3674 },
3675 creator: {
3676 type: 'ref',
3677 ref: 'lex:social.grain.actor.defs#profileView',
3678 },
3679 favoriteCount: {
3680 type: 'integer',
3681 minimum: 0,
3682 },
3683 viewer: {
3684 type: 'ref',
3685 ref: 'lex:social.grain.labeler.defs#labelerViewerState',
3686 },
3687 indexedAt: {
3688 type: 'string',
3689 format: 'datetime',
3690 },
3691 labels: {
3692 type: 'array',
3693 items: {
3694 type: 'ref',
3695 ref: 'lex:com.atproto.label.defs#label',
3696 },
3697 },
3698 },
3699 },
3700 labelerViewDetailed: {
3701 type: 'object',
3702 required: ['uri', 'cid', 'creator', 'policies', 'indexedAt'],
3703 properties: {
3704 uri: {
3705 type: 'string',
3706 format: 'at-uri',
3707 },
3708 cid: {
3709 type: 'string',
3710 format: 'cid',
3711 },
3712 creator: {
3713 type: 'ref',
3714 ref: 'lex:app.bsky.actor.defs#profileView',
3715 },
3716 policies: {
3717 type: 'ref',
3718 ref: 'lex:social.grain.actor.defs#labelerPolicies',
3719 },
3720 favoriteCount: {
3721 type: 'integer',
3722 minimum: 0,
3723 },
3724 viewer: {
3725 type: 'ref',
3726 ref: 'lex:social.grain.labeler.defs#labelerViewerState',
3727 },
3728 indexedAt: {
3729 type: 'string',
3730 format: 'datetime',
3731 },
3732 labels: {
3733 type: 'array',
3734 items: {
3735 type: 'ref',
3736 ref: 'lex:com.atproto.label.defs#label',
3737 },
3738 },
3739 reasonTypes: {
3740 description:
3741 "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.",
3742 type: 'array',
3743 items: {
3744 type: 'ref',
3745 ref: 'lex:com.atproto.moderation.defs#reasonType',
3746 },
3747 },
3748 subjectTypes: {
3749 description:
3750 'The set of subject types (account, record, etc) this service accepts reports on.',
3751 type: 'array',
3752 items: {
3753 type: 'ref',
3754 ref: 'lex:com.atproto.moderation.defs#subjectType',
3755 },
3756 },
3757 subjectCollections: {
3758 type: 'array',
3759 description:
3760 '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.',
3761 items: {
3762 type: 'string',
3763 format: 'nsid',
3764 },
3765 },
3766 },
3767 },
3768 labelerViewerState: {
3769 type: 'object',
3770 properties: {
3771 like: {
3772 type: 'string',
3773 format: 'at-uri',
3774 },
3775 },
3776 },
3777 labelerPolicies: {
3778 type: 'object',
3779 required: ['labelValues'],
3780 properties: {
3781 labelValues: {
3782 type: 'array',
3783 description:
3784 'The label values which this labeler publishes. May include global or custom labels.',
3785 items: {
3786 type: 'ref',
3787 ref: 'lex:com.atproto.label.defs#labelValue',
3788 },
3789 },
3790 labelValueDefinitions: {
3791 type: 'array',
3792 description:
3793 'Label values created by this labeler and scoped exclusively to it. Labels defined here will override global label definitions for this labeler.',
3794 items: {
3795 type: 'ref',
3796 ref: 'lex:com.atproto.label.defs#labelValueDefinition',
3797 },
3798 },
3799 },
3800 },
3801 },
3802 },
3803 SocialGrainLabelerService: {
3804 lexicon: 1,
3805 id: 'social.grain.labeler.service',
3806 defs: {
3807 main: {
3808 type: 'record',
3809 description: 'A declaration of the existence of labeler service.',
3810 key: 'literal:self',
3811 record: {
3812 type: 'object',
3813 required: ['policies', 'createdAt'],
3814 properties: {
3815 policies: {
3816 type: 'ref',
3817 ref: 'lex:app.bsky.labeler.defs#labelerPolicies',
3818 },
3819 labels: {
3820 type: 'union',
3821 refs: ['lex:com.atproto.label.defs#selfLabels'],
3822 },
3823 createdAt: {
3824 type: 'string',
3825 format: 'datetime',
3826 },
3827 reasonTypes: {
3828 description:
3829 "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.",
3830 type: 'array',
3831 items: {
3832 type: 'ref',
3833 ref: 'lex:com.atproto.moderation.defs#reasonType',
3834 },
3835 },
3836 subjectTypes: {
3837 description:
3838 'The set of subject types (account, record, etc) this service accepts reports on.',
3839 type: 'array',
3840 items: {
3841 type: 'ref',
3842 ref: 'lex:com.atproto.moderation.defs#subjectType',
3843 },
3844 },
3845 subjectCollections: {
3846 type: 'array',
3847 description:
3848 '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.',
3849 items: {
3850 type: 'string',
3851 format: 'nsid',
3852 },
3853 },
3854 },
3855 },
3856 },
3857 },
3858 },
3859 SocialGrainFeedGetTimeline: {
3860 lexicon: 1,
3861 id: 'social.grain.feed.getTimeline',
3862 defs: {
3863 main: {
3864 type: 'query',
3865 description: "Get a view of the requesting account's home timeline.",
3866 parameters: {
3867 type: 'params',
3868 properties: {
3869 algorithm: {
3870 type: 'string',
3871 description:
3872 "Variant 'algorithm' for timeline. Implementation-specific.",
3873 },
3874 limit: {
3875 type: 'integer',
3876 minimum: 1,
3877 maximum: 100,
3878 default: 50,
3879 },
3880 cursor: {
3881 type: 'string',
3882 },
3883 },
3884 },
3885 output: {
3886 encoding: 'application/json',
3887 schema: {
3888 type: 'object',
3889 required: ['feed'],
3890 properties: {
3891 cursor: {
3892 type: 'string',
3893 },
3894 feed: {
3895 type: 'array',
3896 items: {
3897 type: 'ref',
3898 ref: 'lex:social.grain.gallery.defs#galleryView',
3899 },
3900 },
3901 },
3902 },
3903 },
3904 },
3905 },
3906 },
3907 SocialGrainActorDefs: {
3908 lexicon: 1,
3909 id: 'social.grain.actor.defs',
3910 defs: {
3911 profileView: {
3912 type: 'object',
3913 required: ['cid', 'did', 'handle'],
3914 properties: {
3915 cid: {
3916 type: 'string',
3917 format: 'cid',
3918 },
3919 did: {
3920 type: 'string',
3921 format: 'did',
3922 },
3923 handle: {
3924 type: 'string',
3925 format: 'handle',
3926 },
3927 displayName: {
3928 type: 'string',
3929 maxGraphemes: 64,
3930 maxLength: 640,
3931 },
3932 description: {
3933 type: 'string',
3934 maxLength: 2560,
3935 maxGraphemes: 256,
3936 },
3937 labels: {
3938 type: 'array',
3939 items: {
3940 ref: 'lex:com.atproto.label.defs#label',
3941 type: 'ref',
3942 },
3943 },
3944 avatar: {
3945 type: 'string',
3946 format: 'uri',
3947 },
3948 createdAt: {
3949 type: 'string',
3950 format: 'datetime',
3951 },
3952 },
3953 },
3954 profileViewDetailed: {
3955 type: 'object',
3956 required: ['cid', 'did', 'handle'],
3957 properties: {
3958 cid: {
3959 type: 'string',
3960 format: 'cid',
3961 },
3962 did: {
3963 type: 'string',
3964 format: 'did',
3965 },
3966 handle: {
3967 type: 'string',
3968 format: 'handle',
3969 },
3970 displayName: {
3971 type: 'string',
3972 maxGraphemes: 64,
3973 maxLength: 640,
3974 },
3975 description: {
3976 type: 'string',
3977 maxGraphemes: 256,
3978 maxLength: 2560,
3979 },
3980 avatar: {
3981 type: 'string',
3982 format: 'uri',
3983 },
3984 cameras: {
3985 type: 'array',
3986 items: {
3987 type: 'string',
3988 },
3989 description:
3990 'List of camera make and models used by this actor derived from EXIF data of photos linked to galleries.',
3991 },
3992 followersCount: {
3993 type: 'integer',
3994 },
3995 followsCount: {
3996 type: 'integer',
3997 },
3998 galleryCount: {
3999 type: 'integer',
4000 },
4001 indexedAt: {
4002 type: 'string',
4003 format: 'datetime',
4004 },
4005 createdAt: {
4006 type: 'string',
4007 format: 'datetime',
4008 },
4009 viewer: {
4010 type: 'ref',
4011 ref: 'lex:social.grain.actor.defs#viewerState',
4012 },
4013 labels: {
4014 type: 'array',
4015 items: {
4016 type: 'ref',
4017 ref: 'lex:com.atproto.label.defs#label',
4018 },
4019 },
4020 },
4021 },
4022 viewerState: {
4023 type: 'object',
4024 description:
4025 "Metadata about the requesting account's relationship with the subject account. Only has meaningful content for authed requests.",
4026 properties: {
4027 following: {
4028 type: 'string',
4029 format: 'at-uri',
4030 },
4031 followedBy: {
4032 type: 'string',
4033 format: 'at-uri',
4034 },
4035 },
4036 },
4037 },
4038 },
4039 SocialGrainActorGetProfile: {
4040 lexicon: 1,
4041 id: 'social.grain.actor.getProfile',
4042 defs: {
4043 main: {
4044 type: 'query',
4045 description:
4046 'Get detailed profile view of an actor. Does not require auth, but contains relevant metadata with auth.',
4047 parameters: {
4048 type: 'params',
4049 required: ['actor'],
4050 properties: {
4051 actor: {
4052 type: 'string',
4053 format: 'at-identifier',
4054 description: 'Handle or DID of account to fetch profile of.',
4055 },
4056 },
4057 },
4058 output: {
4059 encoding: 'application/json',
4060 schema: {
4061 type: 'ref',
4062 ref: 'lex:social.grain.actor.defs#profileViewDetailed',
4063 },
4064 },
4065 },
4066 },
4067 },
4068 SocialGrainActorSearchActors: {
4069 lexicon: 1,
4070 id: 'social.grain.actor.searchActors',
4071 defs: {
4072 main: {
4073 type: 'query',
4074 description:
4075 'Find actors (profiles) matching search criteria. Does not require auth.',
4076 parameters: {
4077 type: 'params',
4078 properties: {
4079 q: {
4080 type: 'string',
4081 description:
4082 'Search query string. Syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended.',
4083 },
4084 limit: {
4085 type: 'integer',
4086 minimum: 1,
4087 maximum: 100,
4088 default: 25,
4089 },
4090 cursor: {
4091 type: 'string',
4092 },
4093 },
4094 },
4095 output: {
4096 encoding: 'application/json',
4097 schema: {
4098 type: 'object',
4099 required: ['actors'],
4100 properties: {
4101 cursor: {
4102 type: 'string',
4103 },
4104 actors: {
4105 type: 'array',
4106 items: {
4107 type: 'ref',
4108 ref: 'lex:social.grain.actor.defs#profileView',
4109 },
4110 },
4111 },
4112 },
4113 },
4114 },
4115 },
4116 },
4117 SocialGrainActorUpdateAvatar: {
4118 lexicon: 1,
4119 id: 'social.grain.actor.updateAvatar',
4120 defs: {
4121 main: {
4122 type: 'procedure',
4123 description: "Update an actor's avatar. Requires auth.",
4124 input: {
4125 encoding: '*/*',
4126 },
4127 output: {
4128 encoding: 'application/json',
4129 schema: {
4130 type: 'object',
4131 properties: {
4132 success: {
4133 type: 'boolean',
4134 description:
4135 'Indicates whether the avatar update was successful.',
4136 },
4137 },
4138 },
4139 },
4140 },
4141 },
4142 },
4143 SocialGrainActorGetActorFavs: {
4144 lexicon: 1,
4145 id: 'social.grain.actor.getActorFavs',
4146 defs: {
4147 main: {
4148 type: 'query',
4149 description:
4150 "Get a view of an actor's favorite galleries. Does not require auth.",
4151 parameters: {
4152 type: 'params',
4153 required: ['actor'],
4154 properties: {
4155 actor: {
4156 type: 'string',
4157 format: 'at-identifier',
4158 },
4159 limit: {
4160 type: 'integer',
4161 minimum: 1,
4162 maximum: 100,
4163 default: 50,
4164 },
4165 cursor: {
4166 type: 'string',
4167 },
4168 },
4169 },
4170 output: {
4171 encoding: 'application/json',
4172 schema: {
4173 type: 'object',
4174 required: ['items'],
4175 properties: {
4176 cursor: {
4177 type: 'string',
4178 },
4179 items: {
4180 type: 'array',
4181 items: {
4182 type: 'ref',
4183 ref: 'lex:social.grain.gallery.defs#galleryView',
4184 },
4185 },
4186 },
4187 },
4188 },
4189 },
4190 },
4191 },
4192 SocialGrainActorProfile: {
4193 lexicon: 1,
4194 id: 'social.grain.actor.profile',
4195 defs: {
4196 main: {
4197 type: 'record',
4198 description: 'A declaration of a basic account profile.',
4199 key: 'literal:self',
4200 record: {
4201 type: 'object',
4202 properties: {
4203 displayName: {
4204 type: 'string',
4205 maxGraphemes: 64,
4206 maxLength: 640,
4207 },
4208 description: {
4209 type: 'string',
4210 description: 'Free-form profile description text.',
4211 maxGraphemes: 256,
4212 maxLength: 2560,
4213 },
4214 avatar: {
4215 type: 'blob',
4216 description:
4217 "Small image to be displayed next to posts from account. AKA, 'profile picture'",
4218 accept: ['image/png', 'image/jpeg'],
4219 maxSize: 1000000,
4220 },
4221 createdAt: {
4222 type: 'string',
4223 format: 'datetime',
4224 },
4225 },
4226 },
4227 },
4228 },
4229 },
4230 SocialGrainActorUpdateProfile: {
4231 lexicon: 1,
4232 id: 'social.grain.actor.updateProfile',
4233 defs: {
4234 main: {
4235 type: 'procedure',
4236 description: "Update an actor's profile info. Requires auth.",
4237 input: {
4238 encoding: 'application/json',
4239 schema: {
4240 type: 'object',
4241 properties: {
4242 displayName: {
4243 type: 'string',
4244 maxGraphemes: 64,
4245 maxLength: 640,
4246 },
4247 description: {
4248 type: 'string',
4249 description: 'Free-form profile description text.',
4250 maxGraphemes: 256,
4251 maxLength: 2560,
4252 },
4253 },
4254 },
4255 },
4256 output: {
4257 encoding: 'application/json',
4258 schema: {
4259 type: 'object',
4260 properties: {
4261 success: {
4262 type: 'boolean',
4263 description:
4264 'Indicates whether the profile update was successful.',
4265 },
4266 },
4267 },
4268 },
4269 },
4270 },
4271 },
4272 SocialGrainPhotoDefs: {
4273 lexicon: 1,
4274 id: 'social.grain.photo.defs',
4275 defs: {
4276 photoView: {
4277 type: 'object',
4278 required: ['uri', 'cid', 'thumb', 'fullsize', 'aspectRatio'],
4279 properties: {
4280 uri: {
4281 type: 'string',
4282 format: 'at-uri',
4283 },
4284 cid: {
4285 type: 'string',
4286 format: 'cid',
4287 },
4288 thumb: {
4289 type: 'string',
4290 format: 'uri',
4291 description:
4292 'Fully-qualified URL where a thumbnail of the image can be fetched. For example, CDN location provided by the App View.',
4293 },
4294 fullsize: {
4295 type: 'string',
4296 format: 'uri',
4297 description:
4298 '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.',
4299 },
4300 alt: {
4301 type: 'string',
4302 description:
4303 'Alt text description of the image, for accessibility.',
4304 },
4305 aspectRatio: {
4306 type: 'ref',
4307 ref: 'lex:social.grain.defs#aspectRatio',
4308 },
4309 exif: {
4310 type: 'ref',
4311 ref: 'lex:social.grain.photo.defs#exifView',
4312 description: 'EXIF metadata for the photo, if available.',
4313 },
4314 gallery: {
4315 type: 'ref',
4316 ref: 'lex:social.grain.photo.defs#galleryState',
4317 },
4318 },
4319 },
4320 exifView: {
4321 type: 'object',
4322 required: ['uri', 'cid', 'photo', 'record', 'createdAt'],
4323 properties: {
4324 uri: {
4325 type: 'string',
4326 format: 'at-uri',
4327 },
4328 cid: {
4329 type: 'string',
4330 format: 'cid',
4331 },
4332 photo: {
4333 type: 'string',
4334 format: 'at-uri',
4335 },
4336 record: {
4337 type: 'unknown',
4338 },
4339 createdAt: {
4340 type: 'string',
4341 format: 'datetime',
4342 },
4343 dateTimeOriginal: {
4344 type: 'string',
4345 },
4346 exposureTime: {
4347 type: 'string',
4348 },
4349 fNumber: {
4350 type: 'string',
4351 },
4352 flash: {
4353 type: 'string',
4354 },
4355 focalLengthIn35mmFormat: {
4356 type: 'string',
4357 },
4358 iSO: {
4359 type: 'integer',
4360 },
4361 lensMake: {
4362 type: 'string',
4363 },
4364 lensModel: {
4365 type: 'string',
4366 },
4367 make: {
4368 type: 'string',
4369 },
4370 model: {
4371 type: 'string',
4372 },
4373 },
4374 },
4375 galleryState: {
4376 type: 'object',
4377 required: ['item', 'itemCreatedAt', 'itemPosition'],
4378 description:
4379 "Metadata about the photo's relationship with the subject content. Only has meaningful content when photo is attached to a gallery.",
4380 properties: {
4381 item: {
4382 type: 'string',
4383 format: 'at-uri',
4384 },
4385 itemCreatedAt: {
4386 type: 'string',
4387 format: 'datetime',
4388 },
4389 itemPosition: {
4390 type: 'integer',
4391 },
4392 },
4393 },
4394 },
4395 },
4396 SocialGrainPhotoDeletePhoto: {
4397 lexicon: 1,
4398 id: 'social.grain.photo.deletePhoto',
4399 defs: {
4400 main: {
4401 type: 'procedure',
4402 description: 'Delete a photo by its unique at-uri.',
4403 input: {
4404 encoding: 'application/json',
4405 schema: {
4406 type: 'object',
4407 required: ['uri'],
4408 properties: {
4409 uri: {
4410 type: 'string',
4411 format: 'at-uri',
4412 description: 'AT URI of the photo to delete.',
4413 },
4414 cascade: {
4415 type: 'boolean',
4416 default: true,
4417 description:
4418 'If true, will also delete any associated EXIF data and gallery items.',
4419 },
4420 },
4421 },
4422 },
4423 output: {
4424 encoding: 'application/json',
4425 schema: {
4426 type: 'object',
4427 required: ['success'],
4428 properties: {
4429 success: {
4430 type: 'boolean',
4431 description: 'Indicates if the photo was successfully deleted.',
4432 },
4433 },
4434 },
4435 },
4436 },
4437 },
4438 },
4439 SocialGrainPhotoUploadPhoto: {
4440 lexicon: 1,
4441 id: 'social.grain.photo.uploadPhoto',
4442 defs: {
4443 main: {
4444 type: 'procedure',
4445 description: 'Upload a photo. Requires auth.',
4446 input: {
4447 encoding: '*/*',
4448 },
4449 output: {
4450 encoding: 'application/json',
4451 schema: {
4452 type: 'object',
4453 properties: {
4454 photoUri: {
4455 type: 'string',
4456 format: 'at-uri',
4457 description: 'AT URI of the created photo',
4458 },
4459 },
4460 },
4461 },
4462 },
4463 },
4464 },
4465 SocialGrainPhotoCreateExif: {
4466 lexicon: 1,
4467 id: 'social.grain.photo.createExif',
4468 defs: {
4469 main: {
4470 type: 'procedure',
4471 description: 'Create a new Exif record for a photo',
4472 input: {
4473 encoding: 'application/json',
4474 schema: {
4475 type: 'object',
4476 required: ['photo'],
4477 properties: {
4478 photo: {
4479 type: 'string',
4480 format: 'at-uri',
4481 },
4482 dateTimeOriginal: {
4483 type: 'string',
4484 format: 'datetime',
4485 },
4486 exposureTime: {
4487 type: 'integer',
4488 },
4489 fNumber: {
4490 type: 'integer',
4491 },
4492 flash: {
4493 type: 'string',
4494 },
4495 focalLengthIn35mmFormat: {
4496 type: 'integer',
4497 },
4498 iSO: {
4499 type: 'integer',
4500 },
4501 lensMake: {
4502 type: 'string',
4503 },
4504 lensModel: {
4505 type: 'string',
4506 },
4507 make: {
4508 type: 'string',
4509 },
4510 model: {
4511 type: 'string',
4512 },
4513 },
4514 },
4515 },
4516 output: {
4517 encoding: 'application/json',
4518 schema: {
4519 type: 'object',
4520 properties: {
4521 exifUri: {
4522 type: 'string',
4523 format: 'at-uri',
4524 description: 'AT URI of the created gallery',
4525 },
4526 },
4527 },
4528 },
4529 },
4530 },
4531 },
4532 SocialGrainPhotoExif: {
4533 lexicon: 1,
4534 id: 'social.grain.photo.exif',
4535 defs: {
4536 main: {
4537 type: 'record',
4538 description:
4539 'Basic EXIF metadata for a photo. Integers are scaled by 1000000 to accommodate decimal values and potentially other tags in the future.',
4540 key: 'tid',
4541 record: {
4542 type: 'object',
4543 required: ['photo', 'createdAt'],
4544 properties: {
4545 photo: {
4546 type: 'string',
4547 format: 'at-uri',
4548 },
4549 createdAt: {
4550 type: 'string',
4551 format: 'datetime',
4552 },
4553 dateTimeOriginal: {
4554 type: 'string',
4555 format: 'datetime',
4556 },
4557 exposureTime: {
4558 type: 'integer',
4559 },
4560 fNumber: {
4561 type: 'integer',
4562 },
4563 flash: {
4564 type: 'string',
4565 },
4566 focalLengthIn35mmFormat: {
4567 type: 'integer',
4568 },
4569 iSO: {
4570 type: 'integer',
4571 },
4572 lensMake: {
4573 type: 'string',
4574 },
4575 lensModel: {
4576 type: 'string',
4577 },
4578 make: {
4579 type: 'string',
4580 },
4581 model: {
4582 type: 'string',
4583 },
4584 },
4585 },
4586 },
4587 },
4588 },
4589 SocialGrainPhotoApplyAlts: {
4590 lexicon: 1,
4591 id: 'social.grain.photo.applyAlts',
4592 defs: {
4593 main: {
4594 type: 'procedure',
4595 description: 'Apply alt texts to photos. Requires auth.',
4596 input: {
4597 encoding: 'application/json',
4598 schema: {
4599 type: 'object',
4600 required: ['writes'],
4601 properties: {
4602 writes: {
4603 type: 'array',
4604 items: {
4605 type: 'ref',
4606 ref: 'lex:social.grain.photo.applyAlts#update',
4607 },
4608 },
4609 },
4610 },
4611 },
4612 output: {
4613 encoding: 'application/json',
4614 schema: {
4615 type: 'object',
4616 properties: {
4617 success: {
4618 type: 'boolean',
4619 description: 'True if the writes were successfully applied',
4620 },
4621 },
4622 },
4623 },
4624 },
4625 update: {
4626 type: 'object',
4627 required: ['photoUri', 'alt'],
4628 properties: {
4629 photoUri: {
4630 type: 'string',
4631 format: 'at-uri',
4632 description: 'AT URI of the item to update',
4633 },
4634 alt: {
4635 type: 'string',
4636 maxLength: 1000,
4637 description: 'The alt text to apply to the photo',
4638 },
4639 },
4640 },
4641 },
4642 },
4643 SocialGrainPhotoGetActorPhotos: {
4644 lexicon: 1,
4645 id: 'social.grain.photo.getActorPhotos',
4646 defs: {
4647 main: {
4648 type: 'query',
4649 description: "Get a view of an actor's photos. Does not require auth.",
4650 parameters: {
4651 type: 'params',
4652 required: ['actor'],
4653 properties: {
4654 actor: {
4655 type: 'string',
4656 format: 'at-identifier',
4657 },
4658 limit: {
4659 type: 'integer',
4660 minimum: 1,
4661 maximum: 100,
4662 default: 50,
4663 },
4664 cursor: {
4665 type: 'string',
4666 },
4667 },
4668 },
4669 output: {
4670 encoding: 'application/json',
4671 schema: {
4672 type: 'object',
4673 required: ['items'],
4674 properties: {
4675 cursor: {
4676 type: 'string',
4677 },
4678 items: {
4679 type: 'array',
4680 items: {
4681 type: 'ref',
4682 ref: 'lex:social.grain.photo.defs#photoView',
4683 },
4684 },
4685 },
4686 },
4687 },
4688 },
4689 },
4690 },
4691 SocialGrainPhoto: {
4692 lexicon: 1,
4693 id: 'social.grain.photo',
4694 defs: {
4695 main: {
4696 type: 'record',
4697 key: 'tid',
4698 record: {
4699 type: 'object',
4700 required: ['photo', 'aspectRatio', 'createdAt'],
4701 properties: {
4702 photo: {
4703 type: 'blob',
4704 accept: ['image/*'],
4705 maxSize: 1000000,
4706 },
4707 alt: {
4708 type: 'string',
4709 description:
4710 'Alt text description of the image, for accessibility.',
4711 },
4712 aspectRatio: {
4713 type: 'ref',
4714 ref: 'lex:social.grain.defs#aspectRatio',
4715 },
4716 createdAt: {
4717 type: 'string',
4718 format: 'datetime',
4719 },
4720 },
4721 },
4722 },
4723 },
4724 },
4725 ComAtprotoLabelDefs: {
4726 lexicon: 1,
4727 id: 'com.atproto.label.defs',
4728 defs: {
4729 label: {
4730 type: 'object',
4731 required: ['src', 'uri', 'val', 'cts'],
4732 properties: {
4733 cid: {
4734 type: 'string',
4735 format: 'cid',
4736 description:
4737 "Optionally, CID specifying the specific version of 'uri' resource this label applies to.",
4738 },
4739 cts: {
4740 type: 'string',
4741 format: 'datetime',
4742 description: 'Timestamp when this label was created.',
4743 },
4744 exp: {
4745 type: 'string',
4746 format: 'datetime',
4747 description:
4748 'Timestamp at which this label expires (no longer applies).',
4749 },
4750 neg: {
4751 type: 'boolean',
4752 description:
4753 'If true, this is a negation label, overwriting a previous label.',
4754 },
4755 sig: {
4756 type: 'bytes',
4757 description: 'Signature of dag-cbor encoded label.',
4758 },
4759 src: {
4760 type: 'string',
4761 format: 'did',
4762 description: 'DID of the actor who created this label.',
4763 },
4764 uri: {
4765 type: 'string',
4766 format: 'uri',
4767 description:
4768 'AT URI of the record, repository (account), or other resource that this label applies to.',
4769 },
4770 val: {
4771 type: 'string',
4772 maxLength: 128,
4773 description:
4774 'The short string name of the value or type of this label.',
4775 },
4776 ver: {
4777 type: 'integer',
4778 description: 'The AT Protocol version of the label object.',
4779 },
4780 },
4781 description:
4782 'Metadata tag on an atproto resource (eg, repo or record).',
4783 },
4784 selfLabel: {
4785 type: 'object',
4786 required: ['val'],
4787 properties: {
4788 val: {
4789 type: 'string',
4790 maxLength: 128,
4791 description:
4792 'The short string name of the value or type of this label.',
4793 },
4794 },
4795 description:
4796 'Metadata tag on an atproto record, published by the author within the record. Note that schemas should use #selfLabels, not #selfLabel.',
4797 },
4798 labelValue: {
4799 type: 'string',
4800 knownValues: [
4801 '!hide',
4802 '!no-promote',
4803 '!warn',
4804 '!no-unauthenticated',
4805 'dmca-violation',
4806 'doxxing',
4807 'porn',
4808 'sexual',
4809 'nudity',
4810 'nsfl',
4811 'gore',
4812 ],
4813 },
4814 selfLabels: {
4815 type: 'object',
4816 required: ['values'],
4817 properties: {
4818 values: {
4819 type: 'array',
4820 items: {
4821 ref: 'lex:com.atproto.label.defs#selfLabel',
4822 type: 'ref',
4823 },
4824 maxLength: 10,
4825 },
4826 },
4827 description:
4828 'Metadata tags on an atproto record, published by the author within the record.',
4829 },
4830 labelValueDefinition: {
4831 type: 'object',
4832 required: ['identifier', 'severity', 'blurs', 'locales'],
4833 properties: {
4834 blurs: {
4835 type: 'string',
4836 description:
4837 "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.",
4838 knownValues: ['content', 'media', 'none'],
4839 },
4840 locales: {
4841 type: 'array',
4842 items: {
4843 ref: 'lex:com.atproto.label.defs#labelValueDefinitionStrings',
4844 type: 'ref',
4845 },
4846 },
4847 severity: {
4848 type: 'string',
4849 description:
4850 "How should a client visually convey this label? 'inform' means neutral and informational; 'alert' means negative and warning; 'none' means show nothing.",
4851 knownValues: ['inform', 'alert', 'none'],
4852 },
4853 adultOnly: {
4854 type: 'boolean',
4855 description:
4856 'Does the user need to have adult content enabled in order to configure this label?',
4857 },
4858 identifier: {
4859 type: 'string',
4860 maxLength: 100,
4861 description:
4862 "The value of the label being defined. Must only include lowercase ascii and the '-' character ([a-z-]+).",
4863 maxGraphemes: 100,
4864 },
4865 defaultSetting: {
4866 type: 'string',
4867 default: 'warn',
4868 description: 'The default setting for this label.',
4869 knownValues: ['ignore', 'warn', 'hide'],
4870 },
4871 },
4872 description:
4873 'Declares a label value and its expected interpretations and behaviors.',
4874 },
4875 labelValueDefinitionStrings: {
4876 type: 'object',
4877 required: ['lang', 'name', 'description'],
4878 properties: {
4879 lang: {
4880 type: 'string',
4881 format: 'language',
4882 description:
4883 'The code of the language these strings are written in.',
4884 },
4885 name: {
4886 type: 'string',
4887 maxLength: 640,
4888 description: 'A short human-readable name for the label.',
4889 maxGraphemes: 64,
4890 },
4891 description: {
4892 type: 'string',
4893 maxLength: 100000,
4894 description:
4895 'A longer description of what the label means and why it might be applied.',
4896 maxGraphemes: 10000,
4897 },
4898 },
4899 description:
4900 'Strings which describe the label in the UI, localized into a specific language.',
4901 },
4902 },
4903 },
4904 ComAtprotoRepoStrongRef: {
4905 lexicon: 1,
4906 id: 'com.atproto.repo.strongRef',
4907 description: 'A URI with a content-hash fingerprint.',
4908 defs: {
4909 main: {
4910 type: 'object',
4911 required: ['uri', 'cid'],
4912 properties: {
4913 cid: {
4914 type: 'string',
4915 format: 'cid',
4916 },
4917 uri: {
4918 type: 'string',
4919 format: 'at-uri',
4920 },
4921 },
4922 },
4923 },
4924 },
4925 ComAtprotoModerationDefs: {
4926 lexicon: 1,
4927 id: 'com.atproto.moderation.defs',
4928 defs: {
4929 reasonRude: {
4930 type: 'token',
4931 description:
4932 'Rude, harassing, explicit, or otherwise unwelcoming behavior',
4933 },
4934 reasonSpam: {
4935 type: 'token',
4936 description: 'Spam: frequent unwanted promotion, replies, mentions',
4937 },
4938 reasonType: {
4939 type: 'string',
4940 knownValues: [
4941 'com.atproto.moderation.defs#reasonSpam',
4942 'com.atproto.moderation.defs#reasonViolation',
4943 'com.atproto.moderation.defs#reasonMisleading',
4944 'com.atproto.moderation.defs#reasonSexual',
4945 'com.atproto.moderation.defs#reasonRude',
4946 'com.atproto.moderation.defs#reasonOther',
4947 'com.atproto.moderation.defs#reasonAppeal',
4948 ],
4949 },
4950 reasonOther: {
4951 type: 'token',
4952 description: 'Other: reports not falling under another report category',
4953 },
4954 subjectType: {
4955 type: 'string',
4956 description: 'Tag describing a type of subject that might be reported.',
4957 knownValues: ['account', 'record', 'chat'],
4958 },
4959 reasonAppeal: {
4960 type: 'token',
4961 description: 'Appeal: appeal a previously taken moderation action',
4962 },
4963 reasonSexual: {
4964 type: 'token',
4965 description: 'Unwanted or mislabeled sexual content',
4966 },
4967 reasonViolation: {
4968 type: 'token',
4969 description: 'Direct violation of server rules, laws, terms of service',
4970 },
4971 reasonMisleading: {
4972 type: 'token',
4973 description: 'Misleading identity, affiliation, or content',
4974 },
4975 },
4976 },
4977} as const satisfies Record<string, LexiconDoc>
4978export const schemas = Object.values(schemaDict) satisfies LexiconDoc[]
4979export const lexicons: Lexicons = new Lexicons(schemas)
4980
4981export function validate<T extends { $type: string }>(
4982 v: unknown,
4983 id: string,
4984 hash: string,
4985 requiredType: true,
4986): ValidationResult<T>
4987export function validate<T extends { $type?: string }>(
4988 v: unknown,
4989 id: string,
4990 hash: string,
4991 requiredType?: false,
4992): ValidationResult<T>
4993export function validate(
4994 v: unknown,
4995 id: string,
4996 hash: string,
4997 requiredType?: boolean,
4998): ValidationResult {
4999 return (requiredType ? is$typed : maybe$typed)(v, id, hash)
5000 ? lexicons.validate(`${id}#${hash}`, v)
5001 : {
5002 success: false,
5003 error: new ValidationError(
5004 `Must be an object with "${hash === 'main' ? id : `${id}#${hash}`}" $type property`,
5005 ),
5006 }
5007}
5008
5009export const ids = {
5010 AppBskyEmbedDefs: 'app.bsky.embed.defs',
5011 AppBskyEmbedRecord: 'app.bsky.embed.record',
5012 AppBskyEmbedImages: 'app.bsky.embed.images',
5013 AppBskyEmbedRecordWithMedia: 'app.bsky.embed.recordWithMedia',
5014 AppBskyEmbedVideo: 'app.bsky.embed.video',
5015 AppBskyEmbedExternal: 'app.bsky.embed.external',
5016 AppBskyGraphFollow: 'app.bsky.graph.follow',
5017 AppBskyGraphDefs: 'app.bsky.graph.defs',
5018 AppBskyFeedDefs: 'app.bsky.feed.defs',
5019 AppBskyFeedPostgate: 'app.bsky.feed.postgate',
5020 AppBskyFeedThreadgate: 'app.bsky.feed.threadgate',
5021 AppBskyRichtextFacet: 'app.bsky.richtext.facet',
5022 AppBskyActorDefs: 'app.bsky.actor.defs',
5023 AppBskyActorProfile: 'app.bsky.actor.profile',
5024 AppBskyLabelerDefs: 'app.bsky.labeler.defs',
5025 ShTangledGraphFollow: 'sh.tangled.graph.follow',
5026 ShTangledActorProfile: 'sh.tangled.actor.profile',
5027 SocialGrainDefs: 'social.grain.defs',
5028 SocialGrainNotificationDefs: 'social.grain.notification.defs',
5029 SocialGrainNotificationUpdateSeen: 'social.grain.notification.updateSeen',
5030 SocialGrainNotificationGetNotifications:
5031 'social.grain.notification.getNotifications',
5032 SocialGrainCommentDefs: 'social.grain.comment.defs',
5033 SocialGrainCommentDeleteComment: 'social.grain.comment.deleteComment',
5034 SocialGrainCommentCreateComment: 'social.grain.comment.createComment',
5035 SocialGrainComment: 'social.grain.comment',
5036 SocialGrainGalleryDeleteGallery: 'social.grain.gallery.deleteGallery',
5037 SocialGrainGalleryItem: 'social.grain.gallery.item',
5038 SocialGrainGalleryCreateItem: 'social.grain.gallery.createItem',
5039 SocialGrainGalleryCreateGallery: 'social.grain.gallery.createGallery',
5040 SocialGrainGalleryDefs: 'social.grain.gallery.defs',
5041 SocialGrainGalleryDeleteItem: 'social.grain.gallery.deleteItem',
5042 SocialGrainGallery: 'social.grain.gallery',
5043 SocialGrainGalleryUpdateGallery: 'social.grain.gallery.updateGallery',
5044 SocialGrainGalleryApplySort: 'social.grain.gallery.applySort',
5045 SocialGrainGalleryGetGalleryThread: 'social.grain.gallery.getGalleryThread',
5046 SocialGrainGalleryGetActorGalleries: 'social.grain.gallery.getActorGalleries',
5047 SocialGrainGalleryGetGallery: 'social.grain.gallery.getGallery',
5048 SocialGrainGraphDeleteFollow: 'social.grain.graph.deleteFollow',
5049 SocialGrainGraphFollow: 'social.grain.graph.follow',
5050 SocialGrainGraphCreateFollow: 'social.grain.graph.createFollow',
5051 SocialGrainGraphGetFollowers: 'social.grain.graph.getFollowers',
5052 SocialGrainGraphGetFollows: 'social.grain.graph.getFollows',
5053 SocialGrainFavoriteDeleteFavorite: 'social.grain.favorite.deleteFavorite',
5054 SocialGrainFavoriteCreateFavorite: 'social.grain.favorite.createFavorite',
5055 SocialGrainFavorite: 'social.grain.favorite',
5056 SocialGrainLabelerDefs: 'social.grain.labeler.defs',
5057 SocialGrainLabelerService: 'social.grain.labeler.service',
5058 SocialGrainFeedGetTimeline: 'social.grain.feed.getTimeline',
5059 SocialGrainActorDefs: 'social.grain.actor.defs',
5060 SocialGrainActorGetProfile: 'social.grain.actor.getProfile',
5061 SocialGrainActorSearchActors: 'social.grain.actor.searchActors',
5062 SocialGrainActorUpdateAvatar: 'social.grain.actor.updateAvatar',
5063 SocialGrainActorGetActorFavs: 'social.grain.actor.getActorFavs',
5064 SocialGrainActorProfile: 'social.grain.actor.profile',
5065 SocialGrainActorUpdateProfile: 'social.grain.actor.updateProfile',
5066 SocialGrainPhotoDefs: 'social.grain.photo.defs',
5067 SocialGrainPhotoDeletePhoto: 'social.grain.photo.deletePhoto',
5068 SocialGrainPhotoUploadPhoto: 'social.grain.photo.uploadPhoto',
5069 SocialGrainPhotoCreateExif: 'social.grain.photo.createExif',
5070 SocialGrainPhotoExif: 'social.grain.photo.exif',
5071 SocialGrainPhotoApplyAlts: 'social.grain.photo.applyAlts',
5072 SocialGrainPhotoGetActorPhotos: 'social.grain.photo.getActorPhotos',
5073 SocialGrainPhoto: 'social.grain.photo',
5074 ComAtprotoLabelDefs: 'com.atproto.label.defs',
5075 ComAtprotoRepoStrongRef: 'com.atproto.repo.strongRef',
5076 ComAtprotoModerationDefs: 'com.atproto.moderation.defs',
5077} as const