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 SocialGrainDarkroomGetGalleryComposite: {
3560 lexicon: 1,
3561 id: 'social.grain.darkroom.getGalleryComposite',
3562 defs: {
3563 main: {
3564 type: 'query',
3565 description:
3566 'Returns a composite image for a specified gallery AT-URI.',
3567 parameters: {
3568 type: 'params',
3569 required: ['uri'],
3570 properties: {
3571 uri: {
3572 type: 'string',
3573 description:
3574 'The AT-URI of the gallery to return a composite for.',
3575 format: 'at-uri',
3576 },
3577 },
3578 },
3579 output: {
3580 encoding: '*/*',
3581 },
3582 },
3583 },
3584 },
3585 SocialGrainFavoriteDeleteFavorite: {
3586 lexicon: 1,
3587 id: 'social.grain.favorite.deleteFavorite',
3588 defs: {
3589 main: {
3590 type: 'procedure',
3591 description: 'Delete a favorite item by its ID.',
3592 input: {
3593 encoding: 'application/json',
3594 schema: {
3595 type: 'object',
3596 required: ['uri'],
3597 properties: {
3598 uri: {
3599 type: 'string',
3600 format: 'at-uri',
3601 description: 'The AT URI of the favorite to delete.',
3602 },
3603 },
3604 },
3605 },
3606 output: {
3607 encoding: 'application/json',
3608 schema: {
3609 type: 'object',
3610 required: ['success'],
3611 properties: {
3612 success: {
3613 type: 'boolean',
3614 description:
3615 'Indicates if the favorite was successfully deleted.',
3616 },
3617 },
3618 },
3619 },
3620 },
3621 },
3622 },
3623 SocialGrainFavoriteCreateFavorite: {
3624 lexicon: 1,
3625 id: 'social.grain.favorite.createFavorite',
3626 defs: {
3627 main: {
3628 description: 'Create a favorite for a given subject.',
3629 type: 'procedure',
3630 input: {
3631 encoding: 'application/json',
3632 schema: {
3633 type: 'object',
3634 required: ['subject'],
3635 properties: {
3636 subject: {
3637 type: 'string',
3638 format: 'at-uri',
3639 description: 'URI of the subject to favorite.',
3640 },
3641 },
3642 },
3643 },
3644 output: {
3645 encoding: 'application/json',
3646 schema: {
3647 type: 'object',
3648 required: ['favoriteUri'],
3649 properties: {
3650 favoriteUri: {
3651 type: 'string',
3652 format: 'at-uri',
3653 description: 'AT URI for the created favorite.',
3654 },
3655 },
3656 },
3657 },
3658 },
3659 },
3660 },
3661 SocialGrainFavorite: {
3662 lexicon: 1,
3663 id: 'social.grain.favorite',
3664 defs: {
3665 main: {
3666 type: 'record',
3667 key: 'tid',
3668 record: {
3669 type: 'object',
3670 required: ['createdAt', 'subject'],
3671 properties: {
3672 createdAt: {
3673 type: 'string',
3674 format: 'datetime',
3675 },
3676 subject: {
3677 type: 'string',
3678 format: 'at-uri',
3679 },
3680 },
3681 },
3682 },
3683 },
3684 },
3685 SocialGrainLabelerDefs: {
3686 lexicon: 1,
3687 id: 'social.grain.labeler.defs',
3688 defs: {
3689 labelerView: {
3690 type: 'object',
3691 required: ['uri', 'cid', 'creator', 'indexedAt'],
3692 properties: {
3693 uri: {
3694 type: 'string',
3695 format: 'at-uri',
3696 },
3697 cid: {
3698 type: 'string',
3699 format: 'cid',
3700 },
3701 creator: {
3702 type: 'ref',
3703 ref: 'lex:social.grain.actor.defs#profileView',
3704 },
3705 favoriteCount: {
3706 type: 'integer',
3707 minimum: 0,
3708 },
3709 viewer: {
3710 type: 'ref',
3711 ref: 'lex:social.grain.labeler.defs#labelerViewerState',
3712 },
3713 indexedAt: {
3714 type: 'string',
3715 format: 'datetime',
3716 },
3717 labels: {
3718 type: 'array',
3719 items: {
3720 type: 'ref',
3721 ref: 'lex:com.atproto.label.defs#label',
3722 },
3723 },
3724 },
3725 },
3726 labelerViewDetailed: {
3727 type: 'object',
3728 required: ['uri', 'cid', 'creator', 'policies', 'indexedAt'],
3729 properties: {
3730 uri: {
3731 type: 'string',
3732 format: 'at-uri',
3733 },
3734 cid: {
3735 type: 'string',
3736 format: 'cid',
3737 },
3738 creator: {
3739 type: 'ref',
3740 ref: 'lex:app.bsky.actor.defs#profileView',
3741 },
3742 policies: {
3743 type: 'ref',
3744 ref: 'lex:social.grain.actor.defs#labelerPolicies',
3745 },
3746 favoriteCount: {
3747 type: 'integer',
3748 minimum: 0,
3749 },
3750 viewer: {
3751 type: 'ref',
3752 ref: 'lex:social.grain.labeler.defs#labelerViewerState',
3753 },
3754 indexedAt: {
3755 type: 'string',
3756 format: 'datetime',
3757 },
3758 labels: {
3759 type: 'array',
3760 items: {
3761 type: 'ref',
3762 ref: 'lex:com.atproto.label.defs#label',
3763 },
3764 },
3765 reasonTypes: {
3766 description:
3767 "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.",
3768 type: 'array',
3769 items: {
3770 type: 'ref',
3771 ref: 'lex:com.atproto.moderation.defs#reasonType',
3772 },
3773 },
3774 subjectTypes: {
3775 description:
3776 'The set of subject types (account, record, etc) this service accepts reports on.',
3777 type: 'array',
3778 items: {
3779 type: 'ref',
3780 ref: 'lex:com.atproto.moderation.defs#subjectType',
3781 },
3782 },
3783 subjectCollections: {
3784 type: 'array',
3785 description:
3786 '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.',
3787 items: {
3788 type: 'string',
3789 format: 'nsid',
3790 },
3791 },
3792 },
3793 },
3794 labelerViewerState: {
3795 type: 'object',
3796 properties: {
3797 like: {
3798 type: 'string',
3799 format: 'at-uri',
3800 },
3801 },
3802 },
3803 labelerPolicies: {
3804 type: 'object',
3805 required: ['labelValues'],
3806 properties: {
3807 labelValues: {
3808 type: 'array',
3809 description:
3810 'The label values which this labeler publishes. May include global or custom labels.',
3811 items: {
3812 type: 'ref',
3813 ref: 'lex:com.atproto.label.defs#labelValue',
3814 },
3815 },
3816 labelValueDefinitions: {
3817 type: 'array',
3818 description:
3819 'Label values created by this labeler and scoped exclusively to it. Labels defined here will override global label definitions for this labeler.',
3820 items: {
3821 type: 'ref',
3822 ref: 'lex:com.atproto.label.defs#labelValueDefinition',
3823 },
3824 },
3825 },
3826 },
3827 },
3828 },
3829 SocialGrainLabelerService: {
3830 lexicon: 1,
3831 id: 'social.grain.labeler.service',
3832 defs: {
3833 main: {
3834 type: 'record',
3835 description: 'A declaration of the existence of labeler service.',
3836 key: 'literal:self',
3837 record: {
3838 type: 'object',
3839 required: ['policies', 'createdAt'],
3840 properties: {
3841 policies: {
3842 type: 'ref',
3843 ref: 'lex:app.bsky.labeler.defs#labelerPolicies',
3844 },
3845 labels: {
3846 type: 'union',
3847 refs: ['lex:com.atproto.label.defs#selfLabels'],
3848 },
3849 createdAt: {
3850 type: 'string',
3851 format: 'datetime',
3852 },
3853 reasonTypes: {
3854 description:
3855 "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.",
3856 type: 'array',
3857 items: {
3858 type: 'ref',
3859 ref: 'lex:com.atproto.moderation.defs#reasonType',
3860 },
3861 },
3862 subjectTypes: {
3863 description:
3864 'The set of subject types (account, record, etc) this service accepts reports on.',
3865 type: 'array',
3866 items: {
3867 type: 'ref',
3868 ref: 'lex:com.atproto.moderation.defs#subjectType',
3869 },
3870 },
3871 subjectCollections: {
3872 type: 'array',
3873 description:
3874 '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.',
3875 items: {
3876 type: 'string',
3877 format: 'nsid',
3878 },
3879 },
3880 },
3881 },
3882 },
3883 },
3884 },
3885 SocialGrainFeedGetTimeline: {
3886 lexicon: 1,
3887 id: 'social.grain.feed.getTimeline',
3888 defs: {
3889 main: {
3890 type: 'query',
3891 description: "Get a view of the requesting account's home timeline.",
3892 parameters: {
3893 type: 'params',
3894 properties: {
3895 algorithm: {
3896 type: 'string',
3897 description:
3898 "Variant 'algorithm' for timeline. Implementation-specific.",
3899 },
3900 limit: {
3901 type: 'integer',
3902 minimum: 1,
3903 maximum: 100,
3904 default: 50,
3905 },
3906 cursor: {
3907 type: 'string',
3908 },
3909 },
3910 },
3911 output: {
3912 encoding: 'application/json',
3913 schema: {
3914 type: 'object',
3915 required: ['feed'],
3916 properties: {
3917 cursor: {
3918 type: 'string',
3919 },
3920 feed: {
3921 type: 'array',
3922 items: {
3923 type: 'ref',
3924 ref: 'lex:social.grain.gallery.defs#galleryView',
3925 },
3926 },
3927 },
3928 },
3929 },
3930 },
3931 },
3932 },
3933 SocialGrainActorDefs: {
3934 lexicon: 1,
3935 id: 'social.grain.actor.defs',
3936 defs: {
3937 profileView: {
3938 type: 'object',
3939 required: ['cid', 'did', 'handle'],
3940 properties: {
3941 cid: {
3942 type: 'string',
3943 format: 'cid',
3944 },
3945 did: {
3946 type: 'string',
3947 format: 'did',
3948 },
3949 handle: {
3950 type: 'string',
3951 format: 'handle',
3952 },
3953 displayName: {
3954 type: 'string',
3955 maxGraphemes: 64,
3956 maxLength: 640,
3957 },
3958 description: {
3959 type: 'string',
3960 maxLength: 2560,
3961 maxGraphemes: 256,
3962 },
3963 labels: {
3964 type: 'array',
3965 items: {
3966 ref: 'lex:com.atproto.label.defs#label',
3967 type: 'ref',
3968 },
3969 },
3970 avatar: {
3971 type: 'string',
3972 format: 'uri',
3973 },
3974 createdAt: {
3975 type: 'string',
3976 format: 'datetime',
3977 },
3978 },
3979 },
3980 profileViewDetailed: {
3981 type: 'object',
3982 required: ['cid', 'did', 'handle'],
3983 properties: {
3984 cid: {
3985 type: 'string',
3986 format: 'cid',
3987 },
3988 did: {
3989 type: 'string',
3990 format: 'did',
3991 },
3992 handle: {
3993 type: 'string',
3994 format: 'handle',
3995 },
3996 displayName: {
3997 type: 'string',
3998 maxGraphemes: 64,
3999 maxLength: 640,
4000 },
4001 description: {
4002 type: 'string',
4003 maxGraphemes: 256,
4004 maxLength: 2560,
4005 },
4006 avatar: {
4007 type: 'string',
4008 format: 'uri',
4009 },
4010 cameras: {
4011 type: 'array',
4012 items: {
4013 type: 'string',
4014 },
4015 description:
4016 'List of camera make and models used by this actor derived from EXIF data of photos linked to galleries.',
4017 },
4018 followersCount: {
4019 type: 'integer',
4020 },
4021 followsCount: {
4022 type: 'integer',
4023 },
4024 galleryCount: {
4025 type: 'integer',
4026 },
4027 indexedAt: {
4028 type: 'string',
4029 format: 'datetime',
4030 },
4031 createdAt: {
4032 type: 'string',
4033 format: 'datetime',
4034 },
4035 viewer: {
4036 type: 'ref',
4037 ref: 'lex:social.grain.actor.defs#viewerState',
4038 },
4039 labels: {
4040 type: 'array',
4041 items: {
4042 type: 'ref',
4043 ref: 'lex:com.atproto.label.defs#label',
4044 },
4045 },
4046 },
4047 },
4048 viewerState: {
4049 type: 'object',
4050 description:
4051 "Metadata about the requesting account's relationship with the subject account. Only has meaningful content for authed requests.",
4052 properties: {
4053 following: {
4054 type: 'string',
4055 format: 'at-uri',
4056 },
4057 followedBy: {
4058 type: 'string',
4059 format: 'at-uri',
4060 },
4061 },
4062 },
4063 },
4064 },
4065 SocialGrainActorGetProfile: {
4066 lexicon: 1,
4067 id: 'social.grain.actor.getProfile',
4068 defs: {
4069 main: {
4070 type: 'query',
4071 description:
4072 'Get detailed profile view of an actor. Does not require auth, but contains relevant metadata with auth.',
4073 parameters: {
4074 type: 'params',
4075 required: ['actor'],
4076 properties: {
4077 actor: {
4078 type: 'string',
4079 format: 'at-identifier',
4080 description: 'Handle or DID of account to fetch profile of.',
4081 },
4082 },
4083 },
4084 output: {
4085 encoding: 'application/json',
4086 schema: {
4087 type: 'ref',
4088 ref: 'lex:social.grain.actor.defs#profileViewDetailed',
4089 },
4090 },
4091 },
4092 },
4093 },
4094 SocialGrainActorSearchActors: {
4095 lexicon: 1,
4096 id: 'social.grain.actor.searchActors',
4097 defs: {
4098 main: {
4099 type: 'query',
4100 description:
4101 'Find actors (profiles) matching search criteria. Does not require auth.',
4102 parameters: {
4103 type: 'params',
4104 properties: {
4105 q: {
4106 type: 'string',
4107 description:
4108 'Search query string. Syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended.',
4109 },
4110 limit: {
4111 type: 'integer',
4112 minimum: 1,
4113 maximum: 100,
4114 default: 25,
4115 },
4116 cursor: {
4117 type: 'string',
4118 },
4119 },
4120 },
4121 output: {
4122 encoding: 'application/json',
4123 schema: {
4124 type: 'object',
4125 required: ['actors'],
4126 properties: {
4127 cursor: {
4128 type: 'string',
4129 },
4130 actors: {
4131 type: 'array',
4132 items: {
4133 type: 'ref',
4134 ref: 'lex:social.grain.actor.defs#profileView',
4135 },
4136 },
4137 },
4138 },
4139 },
4140 },
4141 },
4142 },
4143 SocialGrainActorUpdateAvatar: {
4144 lexicon: 1,
4145 id: 'social.grain.actor.updateAvatar',
4146 defs: {
4147 main: {
4148 type: 'procedure',
4149 description: "Update an actor's avatar. Requires auth.",
4150 input: {
4151 encoding: '*/*',
4152 },
4153 output: {
4154 encoding: 'application/json',
4155 schema: {
4156 type: 'object',
4157 properties: {
4158 success: {
4159 type: 'boolean',
4160 description:
4161 'Indicates whether the avatar update was successful.',
4162 },
4163 },
4164 },
4165 },
4166 },
4167 },
4168 },
4169 SocialGrainActorGetActorFavs: {
4170 lexicon: 1,
4171 id: 'social.grain.actor.getActorFavs',
4172 defs: {
4173 main: {
4174 type: 'query',
4175 description:
4176 "Get a view of an actor's favorite galleries. Does not require auth.",
4177 parameters: {
4178 type: 'params',
4179 required: ['actor'],
4180 properties: {
4181 actor: {
4182 type: 'string',
4183 format: 'at-identifier',
4184 },
4185 limit: {
4186 type: 'integer',
4187 minimum: 1,
4188 maximum: 100,
4189 default: 50,
4190 },
4191 cursor: {
4192 type: 'string',
4193 },
4194 },
4195 },
4196 output: {
4197 encoding: 'application/json',
4198 schema: {
4199 type: 'object',
4200 required: ['items'],
4201 properties: {
4202 cursor: {
4203 type: 'string',
4204 },
4205 items: {
4206 type: 'array',
4207 items: {
4208 type: 'ref',
4209 ref: 'lex:social.grain.gallery.defs#galleryView',
4210 },
4211 },
4212 },
4213 },
4214 },
4215 },
4216 },
4217 },
4218 SocialGrainActorProfile: {
4219 lexicon: 1,
4220 id: 'social.grain.actor.profile',
4221 defs: {
4222 main: {
4223 type: 'record',
4224 description: 'A declaration of a basic account profile.',
4225 key: 'literal:self',
4226 record: {
4227 type: 'object',
4228 properties: {
4229 displayName: {
4230 type: 'string',
4231 maxGraphemes: 64,
4232 maxLength: 640,
4233 },
4234 description: {
4235 type: 'string',
4236 description: 'Free-form profile description text.',
4237 maxGraphemes: 256,
4238 maxLength: 2560,
4239 },
4240 avatar: {
4241 type: 'blob',
4242 description:
4243 "Small image to be displayed next to posts from account. AKA, 'profile picture'",
4244 accept: ['image/png', 'image/jpeg'],
4245 maxSize: 1000000,
4246 },
4247 createdAt: {
4248 type: 'string',
4249 format: 'datetime',
4250 },
4251 },
4252 },
4253 },
4254 },
4255 },
4256 SocialGrainActorUpdateProfile: {
4257 lexicon: 1,
4258 id: 'social.grain.actor.updateProfile',
4259 defs: {
4260 main: {
4261 type: 'procedure',
4262 description: "Update an actor's profile info. Requires auth.",
4263 input: {
4264 encoding: 'application/json',
4265 schema: {
4266 type: 'object',
4267 properties: {
4268 displayName: {
4269 type: 'string',
4270 maxGraphemes: 64,
4271 maxLength: 640,
4272 },
4273 description: {
4274 type: 'string',
4275 description: 'Free-form profile description text.',
4276 maxGraphemes: 256,
4277 maxLength: 2560,
4278 },
4279 },
4280 },
4281 },
4282 output: {
4283 encoding: 'application/json',
4284 schema: {
4285 type: 'object',
4286 properties: {
4287 success: {
4288 type: 'boolean',
4289 description:
4290 'Indicates whether the profile update was successful.',
4291 },
4292 },
4293 },
4294 },
4295 },
4296 },
4297 },
4298 SocialGrainPhotoDefs: {
4299 lexicon: 1,
4300 id: 'social.grain.photo.defs',
4301 defs: {
4302 photoView: {
4303 type: 'object',
4304 required: ['uri', 'cid', 'thumb', 'fullsize', 'aspectRatio'],
4305 properties: {
4306 uri: {
4307 type: 'string',
4308 format: 'at-uri',
4309 },
4310 cid: {
4311 type: 'string',
4312 format: 'cid',
4313 },
4314 thumb: {
4315 type: 'string',
4316 format: 'uri',
4317 description:
4318 'Fully-qualified URL where a thumbnail of the image can be fetched. For example, CDN location provided by the App View.',
4319 },
4320 fullsize: {
4321 type: 'string',
4322 format: 'uri',
4323 description:
4324 '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.',
4325 },
4326 alt: {
4327 type: 'string',
4328 description:
4329 'Alt text description of the image, for accessibility.',
4330 },
4331 aspectRatio: {
4332 type: 'ref',
4333 ref: 'lex:social.grain.defs#aspectRatio',
4334 },
4335 exif: {
4336 type: 'ref',
4337 ref: 'lex:social.grain.photo.defs#exifView',
4338 description: 'EXIF metadata for the photo, if available.',
4339 },
4340 gallery: {
4341 type: 'ref',
4342 ref: 'lex:social.grain.photo.defs#galleryState',
4343 },
4344 },
4345 },
4346 exifView: {
4347 type: 'object',
4348 required: ['uri', 'cid', 'photo', 'record', 'createdAt'],
4349 properties: {
4350 uri: {
4351 type: 'string',
4352 format: 'at-uri',
4353 },
4354 cid: {
4355 type: 'string',
4356 format: 'cid',
4357 },
4358 photo: {
4359 type: 'string',
4360 format: 'at-uri',
4361 },
4362 record: {
4363 type: 'unknown',
4364 },
4365 createdAt: {
4366 type: 'string',
4367 format: 'datetime',
4368 },
4369 dateTimeOriginal: {
4370 type: 'string',
4371 },
4372 exposureTime: {
4373 type: 'string',
4374 },
4375 fNumber: {
4376 type: 'string',
4377 },
4378 flash: {
4379 type: 'string',
4380 },
4381 focalLengthIn35mmFormat: {
4382 type: 'string',
4383 },
4384 iSO: {
4385 type: 'integer',
4386 },
4387 lensMake: {
4388 type: 'string',
4389 },
4390 lensModel: {
4391 type: 'string',
4392 },
4393 make: {
4394 type: 'string',
4395 },
4396 model: {
4397 type: 'string',
4398 },
4399 },
4400 },
4401 galleryState: {
4402 type: 'object',
4403 required: ['item', 'itemCreatedAt', 'itemPosition'],
4404 description:
4405 "Metadata about the photo's relationship with the subject content. Only has meaningful content when photo is attached to a gallery.",
4406 properties: {
4407 item: {
4408 type: 'string',
4409 format: 'at-uri',
4410 },
4411 itemCreatedAt: {
4412 type: 'string',
4413 format: 'datetime',
4414 },
4415 itemPosition: {
4416 type: 'integer',
4417 },
4418 },
4419 },
4420 },
4421 },
4422 SocialGrainPhotoDeletePhoto: {
4423 lexicon: 1,
4424 id: 'social.grain.photo.deletePhoto',
4425 defs: {
4426 main: {
4427 type: 'procedure',
4428 description: 'Delete a photo by its unique at-uri.',
4429 input: {
4430 encoding: 'application/json',
4431 schema: {
4432 type: 'object',
4433 required: ['uri'],
4434 properties: {
4435 uri: {
4436 type: 'string',
4437 format: 'at-uri',
4438 description: 'AT URI of the photo to delete.',
4439 },
4440 cascade: {
4441 type: 'boolean',
4442 default: true,
4443 description:
4444 'If true, will also delete any associated EXIF data and gallery items.',
4445 },
4446 },
4447 },
4448 },
4449 output: {
4450 encoding: 'application/json',
4451 schema: {
4452 type: 'object',
4453 required: ['success'],
4454 properties: {
4455 success: {
4456 type: 'boolean',
4457 description: 'Indicates if the photo was successfully deleted.',
4458 },
4459 },
4460 },
4461 },
4462 },
4463 },
4464 },
4465 SocialGrainPhotoUploadPhoto: {
4466 lexicon: 1,
4467 id: 'social.grain.photo.uploadPhoto',
4468 defs: {
4469 main: {
4470 type: 'procedure',
4471 description: 'Upload a photo. Requires auth.',
4472 input: {
4473 encoding: '*/*',
4474 },
4475 output: {
4476 encoding: 'application/json',
4477 schema: {
4478 type: 'object',
4479 properties: {
4480 photoUri: {
4481 type: 'string',
4482 format: 'at-uri',
4483 description: 'AT URI of the created photo',
4484 },
4485 },
4486 },
4487 },
4488 },
4489 },
4490 },
4491 SocialGrainPhotoCreateExif: {
4492 lexicon: 1,
4493 id: 'social.grain.photo.createExif',
4494 defs: {
4495 main: {
4496 type: 'procedure',
4497 description: 'Create a new Exif record for a photo',
4498 input: {
4499 encoding: 'application/json',
4500 schema: {
4501 type: 'object',
4502 required: ['photo'],
4503 properties: {
4504 photo: {
4505 type: 'string',
4506 format: 'at-uri',
4507 },
4508 dateTimeOriginal: {
4509 type: 'string',
4510 format: 'datetime',
4511 },
4512 exposureTime: {
4513 type: 'integer',
4514 },
4515 fNumber: {
4516 type: 'integer',
4517 },
4518 flash: {
4519 type: 'string',
4520 },
4521 focalLengthIn35mmFormat: {
4522 type: 'integer',
4523 },
4524 iSO: {
4525 type: 'integer',
4526 },
4527 lensMake: {
4528 type: 'string',
4529 },
4530 lensModel: {
4531 type: 'string',
4532 },
4533 make: {
4534 type: 'string',
4535 },
4536 model: {
4537 type: 'string',
4538 },
4539 },
4540 },
4541 },
4542 output: {
4543 encoding: 'application/json',
4544 schema: {
4545 type: 'object',
4546 properties: {
4547 exifUri: {
4548 type: 'string',
4549 format: 'at-uri',
4550 description: 'AT URI of the created gallery',
4551 },
4552 },
4553 },
4554 },
4555 },
4556 },
4557 },
4558 SocialGrainPhotoExif: {
4559 lexicon: 1,
4560 id: 'social.grain.photo.exif',
4561 defs: {
4562 main: {
4563 type: 'record',
4564 description:
4565 'Basic EXIF metadata for a photo. Integers are scaled by 1000000 to accommodate decimal values and potentially other tags in the future.',
4566 key: 'tid',
4567 record: {
4568 type: 'object',
4569 required: ['photo', 'createdAt'],
4570 properties: {
4571 photo: {
4572 type: 'string',
4573 format: 'at-uri',
4574 },
4575 createdAt: {
4576 type: 'string',
4577 format: 'datetime',
4578 },
4579 dateTimeOriginal: {
4580 type: 'string',
4581 format: 'datetime',
4582 },
4583 exposureTime: {
4584 type: 'integer',
4585 },
4586 fNumber: {
4587 type: 'integer',
4588 },
4589 flash: {
4590 type: 'string',
4591 },
4592 focalLengthIn35mmFormat: {
4593 type: 'integer',
4594 },
4595 iSO: {
4596 type: 'integer',
4597 },
4598 lensMake: {
4599 type: 'string',
4600 },
4601 lensModel: {
4602 type: 'string',
4603 },
4604 make: {
4605 type: 'string',
4606 },
4607 model: {
4608 type: 'string',
4609 },
4610 },
4611 },
4612 },
4613 },
4614 },
4615 SocialGrainPhotoApplyAlts: {
4616 lexicon: 1,
4617 id: 'social.grain.photo.applyAlts',
4618 defs: {
4619 main: {
4620 type: 'procedure',
4621 description: 'Apply alt texts to photos. Requires auth.',
4622 input: {
4623 encoding: 'application/json',
4624 schema: {
4625 type: 'object',
4626 required: ['writes'],
4627 properties: {
4628 writes: {
4629 type: 'array',
4630 items: {
4631 type: 'ref',
4632 ref: 'lex:social.grain.photo.applyAlts#update',
4633 },
4634 },
4635 },
4636 },
4637 },
4638 output: {
4639 encoding: 'application/json',
4640 schema: {
4641 type: 'object',
4642 properties: {
4643 success: {
4644 type: 'boolean',
4645 description: 'True if the writes were successfully applied',
4646 },
4647 },
4648 },
4649 },
4650 },
4651 update: {
4652 type: 'object',
4653 required: ['photoUri', 'alt'],
4654 properties: {
4655 photoUri: {
4656 type: 'string',
4657 format: 'at-uri',
4658 description: 'AT URI of the item to update',
4659 },
4660 alt: {
4661 type: 'string',
4662 maxLength: 1000,
4663 description: 'The alt text to apply to the photo',
4664 },
4665 },
4666 },
4667 },
4668 },
4669 SocialGrainPhotoGetActorPhotos: {
4670 lexicon: 1,
4671 id: 'social.grain.photo.getActorPhotos',
4672 defs: {
4673 main: {
4674 type: 'query',
4675 description: "Get a view of an actor's photos. Does not require auth.",
4676 parameters: {
4677 type: 'params',
4678 required: ['actor'],
4679 properties: {
4680 actor: {
4681 type: 'string',
4682 format: 'at-identifier',
4683 },
4684 limit: {
4685 type: 'integer',
4686 minimum: 1,
4687 maximum: 100,
4688 default: 50,
4689 },
4690 cursor: {
4691 type: 'string',
4692 },
4693 },
4694 },
4695 output: {
4696 encoding: 'application/json',
4697 schema: {
4698 type: 'object',
4699 required: ['items'],
4700 properties: {
4701 cursor: {
4702 type: 'string',
4703 },
4704 items: {
4705 type: 'array',
4706 items: {
4707 type: 'ref',
4708 ref: 'lex:social.grain.photo.defs#photoView',
4709 },
4710 },
4711 },
4712 },
4713 },
4714 },
4715 },
4716 },
4717 SocialGrainPhoto: {
4718 lexicon: 1,
4719 id: 'social.grain.photo',
4720 defs: {
4721 main: {
4722 type: 'record',
4723 key: 'tid',
4724 record: {
4725 type: 'object',
4726 required: ['photo', 'aspectRatio', 'createdAt'],
4727 properties: {
4728 photo: {
4729 type: 'blob',
4730 accept: ['image/*'],
4731 maxSize: 1000000,
4732 },
4733 alt: {
4734 type: 'string',
4735 description:
4736 'Alt text description of the image, for accessibility.',
4737 },
4738 aspectRatio: {
4739 type: 'ref',
4740 ref: 'lex:social.grain.defs#aspectRatio',
4741 },
4742 createdAt: {
4743 type: 'string',
4744 format: 'datetime',
4745 },
4746 },
4747 },
4748 },
4749 },
4750 },
4751 ComAtprotoLabelDefs: {
4752 lexicon: 1,
4753 id: 'com.atproto.label.defs',
4754 defs: {
4755 label: {
4756 type: 'object',
4757 required: ['src', 'uri', 'val', 'cts'],
4758 properties: {
4759 cid: {
4760 type: 'string',
4761 format: 'cid',
4762 description:
4763 "Optionally, CID specifying the specific version of 'uri' resource this label applies to.",
4764 },
4765 cts: {
4766 type: 'string',
4767 format: 'datetime',
4768 description: 'Timestamp when this label was created.',
4769 },
4770 exp: {
4771 type: 'string',
4772 format: 'datetime',
4773 description:
4774 'Timestamp at which this label expires (no longer applies).',
4775 },
4776 neg: {
4777 type: 'boolean',
4778 description:
4779 'If true, this is a negation label, overwriting a previous label.',
4780 },
4781 sig: {
4782 type: 'bytes',
4783 description: 'Signature of dag-cbor encoded label.',
4784 },
4785 src: {
4786 type: 'string',
4787 format: 'did',
4788 description: 'DID of the actor who created this label.',
4789 },
4790 uri: {
4791 type: 'string',
4792 format: 'uri',
4793 description:
4794 'AT URI of the record, repository (account), or other resource that this label applies to.',
4795 },
4796 val: {
4797 type: 'string',
4798 maxLength: 128,
4799 description:
4800 'The short string name of the value or type of this label.',
4801 },
4802 ver: {
4803 type: 'integer',
4804 description: 'The AT Protocol version of the label object.',
4805 },
4806 },
4807 description:
4808 'Metadata tag on an atproto resource (eg, repo or record).',
4809 },
4810 selfLabel: {
4811 type: 'object',
4812 required: ['val'],
4813 properties: {
4814 val: {
4815 type: 'string',
4816 maxLength: 128,
4817 description:
4818 'The short string name of the value or type of this label.',
4819 },
4820 },
4821 description:
4822 'Metadata tag on an atproto record, published by the author within the record. Note that schemas should use #selfLabels, not #selfLabel.',
4823 },
4824 labelValue: {
4825 type: 'string',
4826 knownValues: [
4827 '!hide',
4828 '!no-promote',
4829 '!warn',
4830 '!no-unauthenticated',
4831 'dmca-violation',
4832 'doxxing',
4833 'porn',
4834 'sexual',
4835 'nudity',
4836 'nsfl',
4837 'gore',
4838 ],
4839 },
4840 selfLabels: {
4841 type: 'object',
4842 required: ['values'],
4843 properties: {
4844 values: {
4845 type: 'array',
4846 items: {
4847 ref: 'lex:com.atproto.label.defs#selfLabel',
4848 type: 'ref',
4849 },
4850 maxLength: 10,
4851 },
4852 },
4853 description:
4854 'Metadata tags on an atproto record, published by the author within the record.',
4855 },
4856 labelValueDefinition: {
4857 type: 'object',
4858 required: ['identifier', 'severity', 'blurs', 'locales'],
4859 properties: {
4860 blurs: {
4861 type: 'string',
4862 description:
4863 "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.",
4864 knownValues: ['content', 'media', 'none'],
4865 },
4866 locales: {
4867 type: 'array',
4868 items: {
4869 ref: 'lex:com.atproto.label.defs#labelValueDefinitionStrings',
4870 type: 'ref',
4871 },
4872 },
4873 severity: {
4874 type: 'string',
4875 description:
4876 "How should a client visually convey this label? 'inform' means neutral and informational; 'alert' means negative and warning; 'none' means show nothing.",
4877 knownValues: ['inform', 'alert', 'none'],
4878 },
4879 adultOnly: {
4880 type: 'boolean',
4881 description:
4882 'Does the user need to have adult content enabled in order to configure this label?',
4883 },
4884 identifier: {
4885 type: 'string',
4886 maxLength: 100,
4887 description:
4888 "The value of the label being defined. Must only include lowercase ascii and the '-' character ([a-z-]+).",
4889 maxGraphemes: 100,
4890 },
4891 defaultSetting: {
4892 type: 'string',
4893 default: 'warn',
4894 description: 'The default setting for this label.',
4895 knownValues: ['ignore', 'warn', 'hide'],
4896 },
4897 },
4898 description:
4899 'Declares a label value and its expected interpretations and behaviors.',
4900 },
4901 labelValueDefinitionStrings: {
4902 type: 'object',
4903 required: ['lang', 'name', 'description'],
4904 properties: {
4905 lang: {
4906 type: 'string',
4907 format: 'language',
4908 description:
4909 'The code of the language these strings are written in.',
4910 },
4911 name: {
4912 type: 'string',
4913 maxLength: 640,
4914 description: 'A short human-readable name for the label.',
4915 maxGraphemes: 64,
4916 },
4917 description: {
4918 type: 'string',
4919 maxLength: 100000,
4920 description:
4921 'A longer description of what the label means and why it might be applied.',
4922 maxGraphemes: 10000,
4923 },
4924 },
4925 description:
4926 'Strings which describe the label in the UI, localized into a specific language.',
4927 },
4928 },
4929 },
4930 ComAtprotoRepoStrongRef: {
4931 lexicon: 1,
4932 id: 'com.atproto.repo.strongRef',
4933 description: 'A URI with a content-hash fingerprint.',
4934 defs: {
4935 main: {
4936 type: 'object',
4937 required: ['uri', 'cid'],
4938 properties: {
4939 cid: {
4940 type: 'string',
4941 format: 'cid',
4942 },
4943 uri: {
4944 type: 'string',
4945 format: 'at-uri',
4946 },
4947 },
4948 },
4949 },
4950 },
4951 ComAtprotoModerationDefs: {
4952 lexicon: 1,
4953 id: 'com.atproto.moderation.defs',
4954 defs: {
4955 reasonRude: {
4956 type: 'token',
4957 description:
4958 'Rude, harassing, explicit, or otherwise unwelcoming behavior',
4959 },
4960 reasonSpam: {
4961 type: 'token',
4962 description: 'Spam: frequent unwanted promotion, replies, mentions',
4963 },
4964 reasonType: {
4965 type: 'string',
4966 knownValues: [
4967 'com.atproto.moderation.defs#reasonSpam',
4968 'com.atproto.moderation.defs#reasonViolation',
4969 'com.atproto.moderation.defs#reasonMisleading',
4970 'com.atproto.moderation.defs#reasonSexual',
4971 'com.atproto.moderation.defs#reasonRude',
4972 'com.atproto.moderation.defs#reasonOther',
4973 'com.atproto.moderation.defs#reasonAppeal',
4974 ],
4975 },
4976 reasonOther: {
4977 type: 'token',
4978 description: 'Other: reports not falling under another report category',
4979 },
4980 subjectType: {
4981 type: 'string',
4982 description: 'Tag describing a type of subject that might be reported.',
4983 knownValues: ['account', 'record', 'chat'],
4984 },
4985 reasonAppeal: {
4986 type: 'token',
4987 description: 'Appeal: appeal a previously taken moderation action',
4988 },
4989 reasonSexual: {
4990 type: 'token',
4991 description: 'Unwanted or mislabeled sexual content',
4992 },
4993 reasonViolation: {
4994 type: 'token',
4995 description: 'Direct violation of server rules, laws, terms of service',
4996 },
4997 reasonMisleading: {
4998 type: 'token',
4999 description: 'Misleading identity, affiliation, or content',
5000 },
5001 },
5002 },
5003} as const satisfies Record<string, LexiconDoc>
5004export const schemas = Object.values(schemaDict) satisfies LexiconDoc[]
5005export const lexicons: Lexicons = new Lexicons(schemas)
5006
5007export function validate<T extends { $type: string }>(
5008 v: unknown,
5009 id: string,
5010 hash: string,
5011 requiredType: true,
5012): ValidationResult<T>
5013export function validate<T extends { $type?: string }>(
5014 v: unknown,
5015 id: string,
5016 hash: string,
5017 requiredType?: false,
5018): ValidationResult<T>
5019export function validate(
5020 v: unknown,
5021 id: string,
5022 hash: string,
5023 requiredType?: boolean,
5024): ValidationResult {
5025 return (requiredType ? is$typed : maybe$typed)(v, id, hash)
5026 ? lexicons.validate(`${id}#${hash}`, v)
5027 : {
5028 success: false,
5029 error: new ValidationError(
5030 `Must be an object with "${hash === 'main' ? id : `${id}#${hash}`}" $type property`,
5031 ),
5032 }
5033}
5034
5035export const ids = {
5036 AppBskyEmbedDefs: 'app.bsky.embed.defs',
5037 AppBskyEmbedRecord: 'app.bsky.embed.record',
5038 AppBskyEmbedImages: 'app.bsky.embed.images',
5039 AppBskyEmbedRecordWithMedia: 'app.bsky.embed.recordWithMedia',
5040 AppBskyEmbedVideo: 'app.bsky.embed.video',
5041 AppBskyEmbedExternal: 'app.bsky.embed.external',
5042 AppBskyGraphFollow: 'app.bsky.graph.follow',
5043 AppBskyGraphDefs: 'app.bsky.graph.defs',
5044 AppBskyFeedDefs: 'app.bsky.feed.defs',
5045 AppBskyFeedPostgate: 'app.bsky.feed.postgate',
5046 AppBskyFeedThreadgate: 'app.bsky.feed.threadgate',
5047 AppBskyRichtextFacet: 'app.bsky.richtext.facet',
5048 AppBskyActorDefs: 'app.bsky.actor.defs',
5049 AppBskyActorProfile: 'app.bsky.actor.profile',
5050 AppBskyLabelerDefs: 'app.bsky.labeler.defs',
5051 ShTangledGraphFollow: 'sh.tangled.graph.follow',
5052 ShTangledActorProfile: 'sh.tangled.actor.profile',
5053 SocialGrainDefs: 'social.grain.defs',
5054 SocialGrainNotificationDefs: 'social.grain.notification.defs',
5055 SocialGrainNotificationUpdateSeen: 'social.grain.notification.updateSeen',
5056 SocialGrainNotificationGetNotifications:
5057 'social.grain.notification.getNotifications',
5058 SocialGrainCommentDefs: 'social.grain.comment.defs',
5059 SocialGrainCommentDeleteComment: 'social.grain.comment.deleteComment',
5060 SocialGrainCommentCreateComment: 'social.grain.comment.createComment',
5061 SocialGrainComment: 'social.grain.comment',
5062 SocialGrainGalleryDeleteGallery: 'social.grain.gallery.deleteGallery',
5063 SocialGrainGalleryItem: 'social.grain.gallery.item',
5064 SocialGrainGalleryCreateItem: 'social.grain.gallery.createItem',
5065 SocialGrainGalleryCreateGallery: 'social.grain.gallery.createGallery',
5066 SocialGrainGalleryDefs: 'social.grain.gallery.defs',
5067 SocialGrainGalleryDeleteItem: 'social.grain.gallery.deleteItem',
5068 SocialGrainGallery: 'social.grain.gallery',
5069 SocialGrainGalleryUpdateGallery: 'social.grain.gallery.updateGallery',
5070 SocialGrainGalleryApplySort: 'social.grain.gallery.applySort',
5071 SocialGrainGalleryGetGalleryThread: 'social.grain.gallery.getGalleryThread',
5072 SocialGrainGalleryGetActorGalleries: 'social.grain.gallery.getActorGalleries',
5073 SocialGrainGalleryGetGallery: 'social.grain.gallery.getGallery',
5074 SocialGrainGraphDeleteFollow: 'social.grain.graph.deleteFollow',
5075 SocialGrainGraphFollow: 'social.grain.graph.follow',
5076 SocialGrainGraphCreateFollow: 'social.grain.graph.createFollow',
5077 SocialGrainGraphGetFollowers: 'social.grain.graph.getFollowers',
5078 SocialGrainGraphGetFollows: 'social.grain.graph.getFollows',
5079 SocialGrainDarkroomGetGalleryComposite:
5080 'social.grain.darkroom.getGalleryComposite',
5081 SocialGrainFavoriteDeleteFavorite: 'social.grain.favorite.deleteFavorite',
5082 SocialGrainFavoriteCreateFavorite: 'social.grain.favorite.createFavorite',
5083 SocialGrainFavorite: 'social.grain.favorite',
5084 SocialGrainLabelerDefs: 'social.grain.labeler.defs',
5085 SocialGrainLabelerService: 'social.grain.labeler.service',
5086 SocialGrainFeedGetTimeline: 'social.grain.feed.getTimeline',
5087 SocialGrainActorDefs: 'social.grain.actor.defs',
5088 SocialGrainActorGetProfile: 'social.grain.actor.getProfile',
5089 SocialGrainActorSearchActors: 'social.grain.actor.searchActors',
5090 SocialGrainActorUpdateAvatar: 'social.grain.actor.updateAvatar',
5091 SocialGrainActorGetActorFavs: 'social.grain.actor.getActorFavs',
5092 SocialGrainActorProfile: 'social.grain.actor.profile',
5093 SocialGrainActorUpdateProfile: 'social.grain.actor.updateProfile',
5094 SocialGrainPhotoDefs: 'social.grain.photo.defs',
5095 SocialGrainPhotoDeletePhoto: 'social.grain.photo.deletePhoto',
5096 SocialGrainPhotoUploadPhoto: 'social.grain.photo.uploadPhoto',
5097 SocialGrainPhotoCreateExif: 'social.grain.photo.createExif',
5098 SocialGrainPhotoExif: 'social.grain.photo.exif',
5099 SocialGrainPhotoApplyAlts: 'social.grain.photo.applyAlts',
5100 SocialGrainPhotoGetActorPhotos: 'social.grain.photo.getActorPhotos',
5101 SocialGrainPhoto: 'social.grain.photo',
5102 ComAtprotoLabelDefs: 'com.atproto.label.defs',
5103 ComAtprotoRepoStrongRef: 'com.atproto.repo.strongRef',
5104 ComAtprotoModerationDefs: 'com.atproto.moderation.defs',
5105} as const