@onelyid/client 0.2.2 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -386,6 +386,2298 @@ function maybe$typed(v, id2, hash) {
386
386
 
387
387
  // ../internal/generated/lexicon/lexicons.ts
388
388
  var schemaDict = {
389
+ AppBskyActorDefs: {
390
+ lexicon: 1,
391
+ id: "app.bsky.actor.defs",
392
+ defs: {
393
+ profileViewBasic: {
394
+ type: "object",
395
+ required: ["did", "handle"],
396
+ properties: {
397
+ did: {
398
+ type: "string",
399
+ format: "did"
400
+ },
401
+ handle: {
402
+ type: "string",
403
+ format: "handle"
404
+ },
405
+ displayName: {
406
+ type: "string",
407
+ maxGraphemes: 64,
408
+ maxLength: 640
409
+ },
410
+ pronouns: {
411
+ type: "string"
412
+ },
413
+ avatar: {
414
+ type: "string",
415
+ format: "uri"
416
+ },
417
+ associated: {
418
+ type: "ref",
419
+ ref: "lex:app.bsky.actor.defs#profileAssociated"
420
+ },
421
+ viewer: {
422
+ type: "ref",
423
+ ref: "lex:app.bsky.actor.defs#viewerState"
424
+ },
425
+ labels: {
426
+ type: "array",
427
+ items: {
428
+ type: "ref",
429
+ ref: "lex:com.atproto.label.defs#label"
430
+ }
431
+ },
432
+ createdAt: {
433
+ type: "string",
434
+ format: "datetime"
435
+ },
436
+ verification: {
437
+ type: "ref",
438
+ ref: "lex:app.bsky.actor.defs#verificationState"
439
+ },
440
+ status: {
441
+ type: "ref",
442
+ ref: "lex:app.bsky.actor.defs#statusView"
443
+ },
444
+ debug: {
445
+ type: "unknown",
446
+ description: "Debug information for internal development"
447
+ }
448
+ }
449
+ },
450
+ profileView: {
451
+ type: "object",
452
+ required: ["did", "handle"],
453
+ properties: {
454
+ did: {
455
+ type: "string",
456
+ format: "did"
457
+ },
458
+ handle: {
459
+ type: "string",
460
+ format: "handle"
461
+ },
462
+ displayName: {
463
+ type: "string",
464
+ maxGraphemes: 64,
465
+ maxLength: 640
466
+ },
467
+ pronouns: {
468
+ type: "string"
469
+ },
470
+ description: {
471
+ type: "string",
472
+ maxGraphemes: 256,
473
+ maxLength: 2560
474
+ },
475
+ avatar: {
476
+ type: "string",
477
+ format: "uri"
478
+ },
479
+ associated: {
480
+ type: "ref",
481
+ ref: "lex:app.bsky.actor.defs#profileAssociated"
482
+ },
483
+ indexedAt: {
484
+ type: "string",
485
+ format: "datetime"
486
+ },
487
+ createdAt: {
488
+ type: "string",
489
+ format: "datetime"
490
+ },
491
+ viewer: {
492
+ type: "ref",
493
+ ref: "lex:app.bsky.actor.defs#viewerState"
494
+ },
495
+ labels: {
496
+ type: "array",
497
+ items: {
498
+ type: "ref",
499
+ ref: "lex:com.atproto.label.defs#label"
500
+ }
501
+ },
502
+ verification: {
503
+ type: "ref",
504
+ ref: "lex:app.bsky.actor.defs#verificationState"
505
+ },
506
+ status: {
507
+ type: "ref",
508
+ ref: "lex:app.bsky.actor.defs#statusView"
509
+ },
510
+ debug: {
511
+ type: "unknown",
512
+ description: "Debug information for internal development"
513
+ }
514
+ }
515
+ },
516
+ profileViewDetailed: {
517
+ type: "object",
518
+ required: ["did", "handle"],
519
+ properties: {
520
+ did: {
521
+ type: "string",
522
+ format: "did"
523
+ },
524
+ handle: {
525
+ type: "string",
526
+ format: "handle"
527
+ },
528
+ displayName: {
529
+ type: "string",
530
+ maxGraphemes: 64,
531
+ maxLength: 640
532
+ },
533
+ description: {
534
+ type: "string",
535
+ maxGraphemes: 256,
536
+ maxLength: 2560
537
+ },
538
+ pronouns: {
539
+ type: "string"
540
+ },
541
+ website: {
542
+ type: "string",
543
+ format: "uri"
544
+ },
545
+ avatar: {
546
+ type: "string",
547
+ format: "uri"
548
+ },
549
+ banner: {
550
+ type: "string",
551
+ format: "uri"
552
+ },
553
+ followersCount: {
554
+ type: "integer"
555
+ },
556
+ followsCount: {
557
+ type: "integer"
558
+ },
559
+ postsCount: {
560
+ type: "integer"
561
+ },
562
+ associated: {
563
+ type: "ref",
564
+ ref: "lex:app.bsky.actor.defs#profileAssociated"
565
+ },
566
+ joinedViaStarterPack: {
567
+ type: "ref",
568
+ ref: "lex:app.bsky.graph.defs#starterPackViewBasic"
569
+ },
570
+ indexedAt: {
571
+ type: "string",
572
+ format: "datetime"
573
+ },
574
+ createdAt: {
575
+ type: "string",
576
+ format: "datetime"
577
+ },
578
+ viewer: {
579
+ type: "ref",
580
+ ref: "lex:app.bsky.actor.defs#viewerState"
581
+ },
582
+ labels: {
583
+ type: "array",
584
+ items: {
585
+ type: "ref",
586
+ ref: "lex:com.atproto.label.defs#label"
587
+ }
588
+ },
589
+ pinnedPost: {
590
+ type: "ref",
591
+ ref: "lex:com.atproto.repo.strongRef"
592
+ },
593
+ verification: {
594
+ type: "ref",
595
+ ref: "lex:app.bsky.actor.defs#verificationState"
596
+ },
597
+ status: {
598
+ type: "ref",
599
+ ref: "lex:app.bsky.actor.defs#statusView"
600
+ },
601
+ debug: {
602
+ type: "unknown",
603
+ description: "Debug information for internal development"
604
+ }
605
+ }
606
+ },
607
+ profileAssociated: {
608
+ type: "object",
609
+ properties: {
610
+ lists: {
611
+ type: "integer"
612
+ },
613
+ feedgens: {
614
+ type: "integer"
615
+ },
616
+ starterPacks: {
617
+ type: "integer"
618
+ },
619
+ labeler: {
620
+ type: "boolean"
621
+ },
622
+ chat: {
623
+ type: "ref",
624
+ ref: "lex:app.bsky.actor.defs#profileAssociatedChat"
625
+ },
626
+ activitySubscription: {
627
+ type: "ref",
628
+ ref: "lex:app.bsky.actor.defs#profileAssociatedActivitySubscription"
629
+ },
630
+ germ: {
631
+ type: "ref",
632
+ ref: "lex:app.bsky.actor.defs#profileAssociatedGerm"
633
+ }
634
+ }
635
+ },
636
+ profileAssociatedChat: {
637
+ type: "object",
638
+ required: ["allowIncoming"],
639
+ properties: {
640
+ allowIncoming: {
641
+ type: "string",
642
+ knownValues: ["all", "none", "following"]
643
+ }
644
+ }
645
+ },
646
+ profileAssociatedGerm: {
647
+ type: "object",
648
+ required: ["showButtonTo", "messageMeUrl"],
649
+ properties: {
650
+ messageMeUrl: {
651
+ type: "string",
652
+ format: "uri"
653
+ },
654
+ showButtonTo: {
655
+ type: "string",
656
+ knownValues: ["usersIFollow", "everyone"]
657
+ }
658
+ }
659
+ },
660
+ profileAssociatedActivitySubscription: {
661
+ type: "object",
662
+ required: ["allowSubscriptions"],
663
+ properties: {
664
+ allowSubscriptions: {
665
+ type: "string",
666
+ knownValues: ["followers", "mutuals", "none"]
667
+ }
668
+ }
669
+ },
670
+ viewerState: {
671
+ type: "object",
672
+ description: "Metadata about the requesting account's relationship with the subject account. Only has meaningful content for authed requests.",
673
+ properties: {
674
+ muted: {
675
+ type: "boolean"
676
+ },
677
+ mutedByList: {
678
+ type: "ref",
679
+ ref: "lex:app.bsky.graph.defs#listViewBasic"
680
+ },
681
+ blockedBy: {
682
+ type: "boolean"
683
+ },
684
+ blocking: {
685
+ type: "string",
686
+ format: "at-uri"
687
+ },
688
+ blockingByList: {
689
+ type: "ref",
690
+ ref: "lex:app.bsky.graph.defs#listViewBasic"
691
+ },
692
+ following: {
693
+ type: "string",
694
+ format: "at-uri"
695
+ },
696
+ followedBy: {
697
+ type: "string",
698
+ format: "at-uri"
699
+ },
700
+ knownFollowers: {
701
+ description: "This property is present only in selected cases, as an optimization.",
702
+ type: "ref",
703
+ ref: "lex:app.bsky.actor.defs#knownFollowers"
704
+ },
705
+ activitySubscription: {
706
+ description: "This property is present only in selected cases, as an optimization.",
707
+ type: "ref",
708
+ ref: "lex:app.bsky.notification.defs#activitySubscription"
709
+ }
710
+ }
711
+ },
712
+ knownFollowers: {
713
+ type: "object",
714
+ description: "The subject's followers whom you also follow",
715
+ required: ["count", "followers"],
716
+ properties: {
717
+ count: {
718
+ type: "integer"
719
+ },
720
+ followers: {
721
+ type: "array",
722
+ minLength: 0,
723
+ maxLength: 5,
724
+ items: {
725
+ type: "ref",
726
+ ref: "lex:app.bsky.actor.defs#profileViewBasic"
727
+ }
728
+ }
729
+ }
730
+ },
731
+ verificationState: {
732
+ type: "object",
733
+ description: "Represents the verification information about the user this object is attached to.",
734
+ required: ["verifications", "verifiedStatus", "trustedVerifierStatus"],
735
+ properties: {
736
+ verifications: {
737
+ type: "array",
738
+ description: "All verifications issued by trusted verifiers on behalf of this user. Verifications by untrusted verifiers are not included.",
739
+ items: {
740
+ type: "ref",
741
+ ref: "lex:app.bsky.actor.defs#verificationView"
742
+ }
743
+ },
744
+ verifiedStatus: {
745
+ type: "string",
746
+ description: "The user's status as a verified account.",
747
+ knownValues: ["valid", "invalid", "none"]
748
+ },
749
+ trustedVerifierStatus: {
750
+ type: "string",
751
+ description: "The user's status as a trusted verifier.",
752
+ knownValues: ["valid", "invalid", "none"]
753
+ }
754
+ }
755
+ },
756
+ verificationView: {
757
+ type: "object",
758
+ description: "An individual verification for an associated subject.",
759
+ required: ["issuer", "uri", "isValid", "createdAt"],
760
+ properties: {
761
+ issuer: {
762
+ type: "string",
763
+ description: "The user who issued this verification.",
764
+ format: "did"
765
+ },
766
+ uri: {
767
+ type: "string",
768
+ description: "The AT-URI of the verification record.",
769
+ format: "at-uri"
770
+ },
771
+ isValid: {
772
+ type: "boolean",
773
+ description: "True if the verification passes validation, otherwise false."
774
+ },
775
+ createdAt: {
776
+ type: "string",
777
+ description: "Timestamp when the verification was created.",
778
+ format: "datetime"
779
+ }
780
+ }
781
+ },
782
+ preferences: {
783
+ type: "array",
784
+ items: {
785
+ type: "union",
786
+ refs: [
787
+ "lex:app.bsky.actor.defs#adultContentPref",
788
+ "lex:app.bsky.actor.defs#contentLabelPref",
789
+ "lex:app.bsky.actor.defs#savedFeedsPref",
790
+ "lex:app.bsky.actor.defs#savedFeedsPrefV2",
791
+ "lex:app.bsky.actor.defs#personalDetailsPref",
792
+ "lex:app.bsky.actor.defs#declaredAgePref",
793
+ "lex:app.bsky.actor.defs#feedViewPref",
794
+ "lex:app.bsky.actor.defs#threadViewPref",
795
+ "lex:app.bsky.actor.defs#interestsPref",
796
+ "lex:app.bsky.actor.defs#mutedWordsPref",
797
+ "lex:app.bsky.actor.defs#hiddenPostsPref",
798
+ "lex:app.bsky.actor.defs#bskyAppStatePref",
799
+ "lex:app.bsky.actor.defs#labelersPref",
800
+ "lex:app.bsky.actor.defs#postInteractionSettingsPref",
801
+ "lex:app.bsky.actor.defs#verificationPrefs",
802
+ "lex:app.bsky.actor.defs#liveEventPreferences"
803
+ ]
804
+ }
805
+ },
806
+ adultContentPref: {
807
+ type: "object",
808
+ required: ["enabled"],
809
+ properties: {
810
+ enabled: {
811
+ type: "boolean",
812
+ default: false
813
+ }
814
+ }
815
+ },
816
+ contentLabelPref: {
817
+ type: "object",
818
+ required: ["label", "visibility"],
819
+ properties: {
820
+ labelerDid: {
821
+ type: "string",
822
+ description: "Which labeler does this preference apply to? If undefined, applies globally.",
823
+ format: "did"
824
+ },
825
+ label: {
826
+ type: "string"
827
+ },
828
+ visibility: {
829
+ type: "string",
830
+ knownValues: ["ignore", "show", "warn", "hide"]
831
+ }
832
+ }
833
+ },
834
+ savedFeed: {
835
+ type: "object",
836
+ required: ["id", "type", "value", "pinned"],
837
+ properties: {
838
+ id: {
839
+ type: "string"
840
+ },
841
+ type: {
842
+ type: "string",
843
+ knownValues: ["feed", "list", "timeline"]
844
+ },
845
+ value: {
846
+ type: "string"
847
+ },
848
+ pinned: {
849
+ type: "boolean"
850
+ }
851
+ }
852
+ },
853
+ savedFeedsPrefV2: {
854
+ type: "object",
855
+ required: ["items"],
856
+ properties: {
857
+ items: {
858
+ type: "array",
859
+ items: {
860
+ type: "ref",
861
+ ref: "lex:app.bsky.actor.defs#savedFeed"
862
+ }
863
+ }
864
+ }
865
+ },
866
+ savedFeedsPref: {
867
+ type: "object",
868
+ required: ["pinned", "saved"],
869
+ properties: {
870
+ pinned: {
871
+ type: "array",
872
+ items: {
873
+ type: "string",
874
+ format: "at-uri"
875
+ }
876
+ },
877
+ saved: {
878
+ type: "array",
879
+ items: {
880
+ type: "string",
881
+ format: "at-uri"
882
+ }
883
+ },
884
+ timelineIndex: {
885
+ type: "integer"
886
+ }
887
+ }
888
+ },
889
+ personalDetailsPref: {
890
+ type: "object",
891
+ properties: {
892
+ birthDate: {
893
+ type: "string",
894
+ format: "datetime",
895
+ description: "The birth date of account owner."
896
+ }
897
+ }
898
+ },
899
+ declaredAgePref: {
900
+ type: "object",
901
+ description: "Read-only preference containing value(s) inferred from the user's declared birthdate. Absence of this preference object in the response indicates that the user has not made a declaration.",
902
+ properties: {
903
+ isOverAge13: {
904
+ type: "boolean",
905
+ description: "Indicates if the user has declared that they are over 13 years of age."
906
+ },
907
+ isOverAge16: {
908
+ type: "boolean",
909
+ description: "Indicates if the user has declared that they are over 16 years of age."
910
+ },
911
+ isOverAge18: {
912
+ type: "boolean",
913
+ description: "Indicates if the user has declared that they are over 18 years of age."
914
+ }
915
+ }
916
+ },
917
+ feedViewPref: {
918
+ type: "object",
919
+ required: ["feed"],
920
+ properties: {
921
+ feed: {
922
+ type: "string",
923
+ description: "The URI of the feed, or an identifier which describes the feed."
924
+ },
925
+ hideReplies: {
926
+ type: "boolean",
927
+ description: "Hide replies in the feed."
928
+ },
929
+ hideRepliesByUnfollowed: {
930
+ type: "boolean",
931
+ description: "Hide replies in the feed if they are not by followed users.",
932
+ default: true
933
+ },
934
+ hideRepliesByLikeCount: {
935
+ type: "integer",
936
+ description: "Hide replies in the feed if they do not have this number of likes."
937
+ },
938
+ hideReposts: {
939
+ type: "boolean",
940
+ description: "Hide reposts in the feed."
941
+ },
942
+ hideQuotePosts: {
943
+ type: "boolean",
944
+ description: "Hide quote posts in the feed."
945
+ }
946
+ }
947
+ },
948
+ threadViewPref: {
949
+ type: "object",
950
+ properties: {
951
+ sort: {
952
+ type: "string",
953
+ description: "Sorting mode for threads.",
954
+ knownValues: [
955
+ "oldest",
956
+ "newest",
957
+ "most-likes",
958
+ "random",
959
+ "hotness"
960
+ ]
961
+ }
962
+ }
963
+ },
964
+ interestsPref: {
965
+ type: "object",
966
+ required: ["tags"],
967
+ properties: {
968
+ tags: {
969
+ type: "array",
970
+ maxLength: 100,
971
+ items: {
972
+ type: "string",
973
+ maxLength: 640,
974
+ maxGraphemes: 64
975
+ },
976
+ description: "A list of tags which describe the account owner's interests gathered during onboarding."
977
+ }
978
+ }
979
+ },
980
+ mutedWordTarget: {
981
+ type: "string",
982
+ knownValues: ["content", "tag"],
983
+ maxLength: 640,
984
+ maxGraphemes: 64
985
+ },
986
+ mutedWord: {
987
+ type: "object",
988
+ description: "A word that the account owner has muted.",
989
+ required: ["value", "targets"],
990
+ properties: {
991
+ id: {
992
+ type: "string"
993
+ },
994
+ value: {
995
+ type: "string",
996
+ description: "The muted word itself.",
997
+ maxLength: 1e4,
998
+ maxGraphemes: 1e3
999
+ },
1000
+ targets: {
1001
+ type: "array",
1002
+ description: "The intended targets of the muted word.",
1003
+ items: {
1004
+ type: "ref",
1005
+ ref: "lex:app.bsky.actor.defs#mutedWordTarget"
1006
+ }
1007
+ },
1008
+ actorTarget: {
1009
+ type: "string",
1010
+ description: "Groups of users to apply the muted word to. If undefined, applies to all users.",
1011
+ knownValues: ["all", "exclude-following"],
1012
+ default: "all"
1013
+ },
1014
+ expiresAt: {
1015
+ type: "string",
1016
+ format: "datetime",
1017
+ description: "The date and time at which the muted word will expire and no longer be applied."
1018
+ }
1019
+ }
1020
+ },
1021
+ mutedWordsPref: {
1022
+ type: "object",
1023
+ required: ["items"],
1024
+ properties: {
1025
+ items: {
1026
+ type: "array",
1027
+ items: {
1028
+ type: "ref",
1029
+ ref: "lex:app.bsky.actor.defs#mutedWord"
1030
+ },
1031
+ description: "A list of words the account owner has muted."
1032
+ }
1033
+ }
1034
+ },
1035
+ hiddenPostsPref: {
1036
+ type: "object",
1037
+ required: ["items"],
1038
+ properties: {
1039
+ items: {
1040
+ type: "array",
1041
+ items: {
1042
+ type: "string",
1043
+ format: "at-uri"
1044
+ },
1045
+ description: "A list of URIs of posts the account owner has hidden."
1046
+ }
1047
+ }
1048
+ },
1049
+ labelersPref: {
1050
+ type: "object",
1051
+ required: ["labelers"],
1052
+ properties: {
1053
+ labelers: {
1054
+ type: "array",
1055
+ items: {
1056
+ type: "ref",
1057
+ ref: "lex:app.bsky.actor.defs#labelerPrefItem"
1058
+ }
1059
+ }
1060
+ }
1061
+ },
1062
+ labelerPrefItem: {
1063
+ type: "object",
1064
+ required: ["did"],
1065
+ properties: {
1066
+ did: {
1067
+ type: "string",
1068
+ format: "did"
1069
+ }
1070
+ }
1071
+ },
1072
+ bskyAppStatePref: {
1073
+ description: "A grab bag of state that's specific to the bsky.app program. Third-party apps shouldn't use this.",
1074
+ type: "object",
1075
+ properties: {
1076
+ activeProgressGuide: {
1077
+ type: "ref",
1078
+ ref: "lex:app.bsky.actor.defs#bskyAppProgressGuide"
1079
+ },
1080
+ queuedNudges: {
1081
+ description: "An array of tokens which identify nudges (modals, popups, tours, highlight dots) that should be shown to the user.",
1082
+ type: "array",
1083
+ maxLength: 1e3,
1084
+ items: {
1085
+ type: "string",
1086
+ maxLength: 100
1087
+ }
1088
+ },
1089
+ nuxs: {
1090
+ description: "Storage for NUXs the user has encountered.",
1091
+ type: "array",
1092
+ maxLength: 100,
1093
+ items: {
1094
+ type: "ref",
1095
+ ref: "lex:app.bsky.actor.defs#nux"
1096
+ }
1097
+ }
1098
+ }
1099
+ },
1100
+ bskyAppProgressGuide: {
1101
+ description: "If set, an active progress guide. Once completed, can be set to undefined. Should have unspecced fields tracking progress.",
1102
+ type: "object",
1103
+ required: ["guide"],
1104
+ properties: {
1105
+ guide: {
1106
+ type: "string",
1107
+ maxLength: 100
1108
+ }
1109
+ }
1110
+ },
1111
+ nux: {
1112
+ type: "object",
1113
+ description: "A new user experiences (NUX) storage object",
1114
+ required: ["id", "completed"],
1115
+ properties: {
1116
+ id: {
1117
+ type: "string",
1118
+ maxLength: 100
1119
+ },
1120
+ completed: {
1121
+ type: "boolean",
1122
+ default: false
1123
+ },
1124
+ data: {
1125
+ description: "Arbitrary data for the NUX. The structure is defined by the NUX itself. Limited to 300 characters.",
1126
+ type: "string",
1127
+ maxLength: 3e3,
1128
+ maxGraphemes: 300
1129
+ },
1130
+ expiresAt: {
1131
+ type: "string",
1132
+ format: "datetime",
1133
+ description: "The date and time at which the NUX will expire and should be considered completed."
1134
+ }
1135
+ }
1136
+ },
1137
+ verificationPrefs: {
1138
+ type: "object",
1139
+ description: "Preferences for how verified accounts appear in the app.",
1140
+ required: [],
1141
+ properties: {
1142
+ hideBadges: {
1143
+ description: "Hide the blue check badges for verified accounts and trusted verifiers.",
1144
+ type: "boolean",
1145
+ default: false
1146
+ }
1147
+ }
1148
+ },
1149
+ liveEventPreferences: {
1150
+ type: "object",
1151
+ description: "Preferences for live events.",
1152
+ properties: {
1153
+ hiddenFeedIds: {
1154
+ description: "A list of feed IDs that the user has hidden from live events.",
1155
+ type: "array",
1156
+ items: {
1157
+ type: "string"
1158
+ }
1159
+ },
1160
+ hideAllFeeds: {
1161
+ description: "Whether to hide all feeds from live events.",
1162
+ type: "boolean",
1163
+ default: false
1164
+ }
1165
+ }
1166
+ },
1167
+ postInteractionSettingsPref: {
1168
+ type: "object",
1169
+ description: "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.",
1170
+ required: [],
1171
+ properties: {
1172
+ threadgateAllowRules: {
1173
+ description: "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.",
1174
+ type: "array",
1175
+ maxLength: 5,
1176
+ items: {
1177
+ type: "union",
1178
+ refs: [
1179
+ "lex:app.bsky.feed.threadgate#mentionRule",
1180
+ "lex:app.bsky.feed.threadgate#followerRule",
1181
+ "lex:app.bsky.feed.threadgate#followingRule",
1182
+ "lex:app.bsky.feed.threadgate#listRule"
1183
+ ]
1184
+ }
1185
+ },
1186
+ postgateEmbeddingRules: {
1187
+ description: "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.",
1188
+ type: "array",
1189
+ maxLength: 5,
1190
+ items: {
1191
+ type: "union",
1192
+ refs: ["lex:app.bsky.feed.postgate#disableRule"]
1193
+ }
1194
+ }
1195
+ }
1196
+ },
1197
+ statusView: {
1198
+ type: "object",
1199
+ required: ["status", "record"],
1200
+ properties: {
1201
+ uri: {
1202
+ type: "string",
1203
+ format: "at-uri"
1204
+ },
1205
+ cid: {
1206
+ type: "string",
1207
+ format: "cid"
1208
+ },
1209
+ status: {
1210
+ type: "string",
1211
+ description: "The status for the account.",
1212
+ knownValues: ["app.bsky.actor.status#live"]
1213
+ },
1214
+ record: {
1215
+ type: "unknown"
1216
+ },
1217
+ embed: {
1218
+ type: "union",
1219
+ description: "An optional embed associated with the status.",
1220
+ refs: ["lex:app.bsky.embed.external#view"]
1221
+ },
1222
+ expiresAt: {
1223
+ type: "string",
1224
+ description: "The date when this status will expire. The application might choose to no longer return the status after expiration.",
1225
+ format: "datetime"
1226
+ },
1227
+ isActive: {
1228
+ type: "boolean",
1229
+ description: "True if the status is not expired, false if it is expired. Only present if expiration was set."
1230
+ },
1231
+ isDisabled: {
1232
+ type: "boolean",
1233
+ description: "True if the user's go-live access has been disabled by a moderator, false otherwise."
1234
+ }
1235
+ }
1236
+ }
1237
+ }
1238
+ },
1239
+ AppBskyActorProfile: {
1240
+ lexicon: 1,
1241
+ id: "app.bsky.actor.profile",
1242
+ defs: {
1243
+ main: {
1244
+ type: "record",
1245
+ description: "A declaration of a Bluesky account profile.",
1246
+ key: "literal:self",
1247
+ record: {
1248
+ type: "object",
1249
+ properties: {
1250
+ displayName: {
1251
+ type: "string",
1252
+ maxGraphemes: 64,
1253
+ maxLength: 640
1254
+ },
1255
+ description: {
1256
+ type: "string",
1257
+ description: "Free-form profile description text.",
1258
+ maxGraphemes: 256,
1259
+ maxLength: 2560
1260
+ },
1261
+ avatar: {
1262
+ type: "blob",
1263
+ description: "Small image to be displayed next to posts from account. AKA, 'profile picture'",
1264
+ accept: ["image/png", "image/jpeg"],
1265
+ maxSize: 1e6
1266
+ },
1267
+ banner: {
1268
+ type: "blob",
1269
+ description: "Larger horizontal image to display behind profile view.",
1270
+ accept: ["image/png", "image/jpeg"],
1271
+ maxSize: 1e6
1272
+ },
1273
+ labels: {
1274
+ type: "union",
1275
+ description: "Self-label values, specific to the Bluesky application, on the overall account.",
1276
+ refs: ["lex:com.atproto.label.defs#selfLabels"]
1277
+ },
1278
+ joinedViaStarterPack: {
1279
+ type: "ref",
1280
+ ref: "lex:com.atproto.repo.strongRef"
1281
+ },
1282
+ createdAt: {
1283
+ type: "string",
1284
+ format: "datetime"
1285
+ }
1286
+ }
1287
+ }
1288
+ }
1289
+ }
1290
+ },
1291
+ AppBskyEmbedDefs: {
1292
+ lexicon: 1,
1293
+ id: "app.bsky.embed.defs",
1294
+ defs: {
1295
+ aspectRatio: {
1296
+ type: "object",
1297
+ description: "width:height represents an aspect ratio. It may be approximate, and may not correspond to absolute dimensions in any given unit.",
1298
+ required: ["width", "height"],
1299
+ properties: {
1300
+ width: {
1301
+ type: "integer",
1302
+ minimum: 1
1303
+ },
1304
+ height: {
1305
+ type: "integer",
1306
+ minimum: 1
1307
+ }
1308
+ }
1309
+ }
1310
+ }
1311
+ },
1312
+ AppBskyEmbedExternal: {
1313
+ lexicon: 1,
1314
+ id: "app.bsky.embed.external",
1315
+ defs: {
1316
+ main: {
1317
+ type: "object",
1318
+ description: "A representation of some externally linked content (eg, a URL and 'card'), embedded in a Bluesky record (eg, a post).",
1319
+ required: ["external"],
1320
+ properties: {
1321
+ external: {
1322
+ type: "ref",
1323
+ ref: "lex:app.bsky.embed.external#external"
1324
+ }
1325
+ }
1326
+ },
1327
+ external: {
1328
+ type: "object",
1329
+ required: ["uri", "title", "description"],
1330
+ properties: {
1331
+ uri: {
1332
+ type: "string",
1333
+ format: "uri"
1334
+ },
1335
+ title: {
1336
+ type: "string"
1337
+ },
1338
+ description: {
1339
+ type: "string"
1340
+ },
1341
+ thumb: {
1342
+ type: "blob",
1343
+ accept: ["image/*"],
1344
+ maxSize: 1e6
1345
+ }
1346
+ }
1347
+ },
1348
+ view: {
1349
+ type: "object",
1350
+ required: ["external"],
1351
+ properties: {
1352
+ external: {
1353
+ type: "ref",
1354
+ ref: "lex:app.bsky.embed.external#viewExternal"
1355
+ }
1356
+ }
1357
+ },
1358
+ viewExternal: {
1359
+ type: "object",
1360
+ required: ["uri", "title", "description"],
1361
+ properties: {
1362
+ uri: {
1363
+ type: "string",
1364
+ format: "uri"
1365
+ },
1366
+ title: {
1367
+ type: "string"
1368
+ },
1369
+ description: {
1370
+ type: "string"
1371
+ },
1372
+ thumb: {
1373
+ type: "string",
1374
+ format: "uri"
1375
+ }
1376
+ }
1377
+ }
1378
+ }
1379
+ },
1380
+ AppBskyEmbedImages: {
1381
+ lexicon: 1,
1382
+ id: "app.bsky.embed.images",
1383
+ description: "A set of images embedded in a Bluesky record (eg, a post).",
1384
+ defs: {
1385
+ main: {
1386
+ type: "object",
1387
+ required: ["images"],
1388
+ properties: {
1389
+ images: {
1390
+ type: "array",
1391
+ items: {
1392
+ type: "ref",
1393
+ ref: "lex:app.bsky.embed.images#image"
1394
+ },
1395
+ maxLength: 4
1396
+ }
1397
+ }
1398
+ },
1399
+ image: {
1400
+ type: "object",
1401
+ required: ["image", "alt"],
1402
+ properties: {
1403
+ image: {
1404
+ type: "blob",
1405
+ accept: ["image/*"],
1406
+ maxSize: 1e6
1407
+ },
1408
+ alt: {
1409
+ type: "string",
1410
+ description: "Alt text description of the image, for accessibility."
1411
+ },
1412
+ aspectRatio: {
1413
+ type: "ref",
1414
+ ref: "lex:app.bsky.embed.defs#aspectRatio"
1415
+ }
1416
+ }
1417
+ },
1418
+ view: {
1419
+ type: "object",
1420
+ required: ["images"],
1421
+ properties: {
1422
+ images: {
1423
+ type: "array",
1424
+ items: {
1425
+ type: "ref",
1426
+ ref: "lex:app.bsky.embed.images#viewImage"
1427
+ },
1428
+ maxLength: 4
1429
+ }
1430
+ }
1431
+ },
1432
+ viewImage: {
1433
+ type: "object",
1434
+ required: ["thumb", "fullsize", "alt"],
1435
+ properties: {
1436
+ thumb: {
1437
+ type: "string",
1438
+ format: "uri",
1439
+ description: "Fully-qualified URL where a thumbnail of the image can be fetched. For example, CDN location provided by the App View."
1440
+ },
1441
+ fullsize: {
1442
+ type: "string",
1443
+ format: "uri",
1444
+ description: "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."
1445
+ },
1446
+ alt: {
1447
+ type: "string",
1448
+ description: "Alt text description of the image, for accessibility."
1449
+ },
1450
+ aspectRatio: {
1451
+ type: "ref",
1452
+ ref: "lex:app.bsky.embed.defs#aspectRatio"
1453
+ }
1454
+ }
1455
+ }
1456
+ }
1457
+ },
1458
+ AppBskyEmbedRecord: {
1459
+ lexicon: 1,
1460
+ id: "app.bsky.embed.record",
1461
+ description: "A representation of a record embedded in a Bluesky record (eg, a post). For example, a quote-post, or sharing a feed generator record.",
1462
+ defs: {
1463
+ main: {
1464
+ type: "object",
1465
+ required: ["record"],
1466
+ properties: {
1467
+ record: {
1468
+ type: "ref",
1469
+ ref: "lex:com.atproto.repo.strongRef"
1470
+ }
1471
+ }
1472
+ },
1473
+ view: {
1474
+ type: "object",
1475
+ required: ["record"],
1476
+ properties: {
1477
+ record: {
1478
+ type: "union",
1479
+ refs: [
1480
+ "lex:app.bsky.embed.record#viewRecord",
1481
+ "lex:app.bsky.embed.record#viewNotFound",
1482
+ "lex:app.bsky.embed.record#viewBlocked",
1483
+ "lex:app.bsky.embed.record#viewDetached",
1484
+ "lex:app.bsky.feed.defs#generatorView",
1485
+ "lex:app.bsky.graph.defs#listView",
1486
+ "lex:app.bsky.labeler.defs#labelerView",
1487
+ "lex:app.bsky.graph.defs#starterPackViewBasic"
1488
+ ]
1489
+ }
1490
+ }
1491
+ },
1492
+ viewRecord: {
1493
+ type: "object",
1494
+ required: ["uri", "cid", "author", "value", "indexedAt"],
1495
+ properties: {
1496
+ uri: {
1497
+ type: "string",
1498
+ format: "at-uri"
1499
+ },
1500
+ cid: {
1501
+ type: "string",
1502
+ format: "cid"
1503
+ },
1504
+ author: {
1505
+ type: "ref",
1506
+ ref: "lex:app.bsky.actor.defs#profileViewBasic"
1507
+ },
1508
+ value: {
1509
+ type: "unknown",
1510
+ description: "The record data itself."
1511
+ },
1512
+ labels: {
1513
+ type: "array",
1514
+ items: {
1515
+ type: "ref",
1516
+ ref: "lex:com.atproto.label.defs#label"
1517
+ }
1518
+ },
1519
+ replyCount: {
1520
+ type: "integer"
1521
+ },
1522
+ repostCount: {
1523
+ type: "integer"
1524
+ },
1525
+ likeCount: {
1526
+ type: "integer"
1527
+ },
1528
+ quoteCount: {
1529
+ type: "integer"
1530
+ },
1531
+ embeds: {
1532
+ type: "array",
1533
+ items: {
1534
+ type: "union",
1535
+ refs: [
1536
+ "lex:app.bsky.embed.images#view",
1537
+ "lex:app.bsky.embed.video#view",
1538
+ "lex:app.bsky.embed.external#view",
1539
+ "lex:app.bsky.embed.record#view",
1540
+ "lex:app.bsky.embed.recordWithMedia#view"
1541
+ ]
1542
+ }
1543
+ },
1544
+ indexedAt: {
1545
+ type: "string",
1546
+ format: "datetime"
1547
+ }
1548
+ }
1549
+ },
1550
+ viewNotFound: {
1551
+ type: "object",
1552
+ required: ["uri", "notFound"],
1553
+ properties: {
1554
+ uri: {
1555
+ type: "string",
1556
+ format: "at-uri"
1557
+ },
1558
+ notFound: {
1559
+ type: "boolean",
1560
+ const: true
1561
+ }
1562
+ }
1563
+ },
1564
+ viewBlocked: {
1565
+ type: "object",
1566
+ required: ["uri", "blocked", "author"],
1567
+ properties: {
1568
+ uri: {
1569
+ type: "string",
1570
+ format: "at-uri"
1571
+ },
1572
+ blocked: {
1573
+ type: "boolean",
1574
+ const: true
1575
+ },
1576
+ author: {
1577
+ type: "ref",
1578
+ ref: "lex:app.bsky.feed.defs#blockedAuthor"
1579
+ }
1580
+ }
1581
+ },
1582
+ viewDetached: {
1583
+ type: "object",
1584
+ required: ["uri", "detached"],
1585
+ properties: {
1586
+ uri: {
1587
+ type: "string",
1588
+ format: "at-uri"
1589
+ },
1590
+ detached: {
1591
+ type: "boolean",
1592
+ const: true
1593
+ }
1594
+ }
1595
+ }
1596
+ }
1597
+ },
1598
+ AppBskyEmbedRecordWithMedia: {
1599
+ lexicon: 1,
1600
+ id: "app.bsky.embed.recordWithMedia",
1601
+ description: "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.",
1602
+ defs: {
1603
+ main: {
1604
+ type: "object",
1605
+ required: ["record", "media"],
1606
+ properties: {
1607
+ record: {
1608
+ type: "ref",
1609
+ ref: "lex:app.bsky.embed.record"
1610
+ },
1611
+ media: {
1612
+ type: "union",
1613
+ refs: [
1614
+ "lex:app.bsky.embed.images",
1615
+ "lex:app.bsky.embed.video",
1616
+ "lex:app.bsky.embed.external"
1617
+ ]
1618
+ }
1619
+ }
1620
+ },
1621
+ view: {
1622
+ type: "object",
1623
+ required: ["record", "media"],
1624
+ properties: {
1625
+ record: {
1626
+ type: "ref",
1627
+ ref: "lex:app.bsky.embed.record#view"
1628
+ },
1629
+ media: {
1630
+ type: "union",
1631
+ refs: [
1632
+ "lex:app.bsky.embed.images#view",
1633
+ "lex:app.bsky.embed.video#view",
1634
+ "lex:app.bsky.embed.external#view"
1635
+ ]
1636
+ }
1637
+ }
1638
+ }
1639
+ }
1640
+ },
1641
+ AppBskyEmbedVideo: {
1642
+ lexicon: 1,
1643
+ id: "app.bsky.embed.video",
1644
+ description: "A video embedded in a Bluesky record (eg, a post).",
1645
+ defs: {
1646
+ main: {
1647
+ type: "object",
1648
+ required: ["video"],
1649
+ properties: {
1650
+ video: {
1651
+ type: "blob",
1652
+ description: "The mp4 video file. May be up to 100mb, formerly limited to 50mb.",
1653
+ accept: ["video/mp4"],
1654
+ maxSize: 1e8
1655
+ },
1656
+ captions: {
1657
+ type: "array",
1658
+ items: {
1659
+ type: "ref",
1660
+ ref: "lex:app.bsky.embed.video#caption"
1661
+ },
1662
+ maxLength: 20
1663
+ },
1664
+ alt: {
1665
+ type: "string",
1666
+ description: "Alt text description of the video, for accessibility.",
1667
+ maxGraphemes: 1e3,
1668
+ maxLength: 1e4
1669
+ },
1670
+ aspectRatio: {
1671
+ type: "ref",
1672
+ ref: "lex:app.bsky.embed.defs#aspectRatio"
1673
+ },
1674
+ presentation: {
1675
+ type: "string",
1676
+ description: "A hint to the client about how to present the video.",
1677
+ knownValues: ["default", "gif"]
1678
+ }
1679
+ }
1680
+ },
1681
+ caption: {
1682
+ type: "object",
1683
+ required: ["lang", "file"],
1684
+ properties: {
1685
+ lang: {
1686
+ type: "string",
1687
+ format: "language"
1688
+ },
1689
+ file: {
1690
+ type: "blob",
1691
+ accept: ["text/vtt"],
1692
+ maxSize: 2e4
1693
+ }
1694
+ }
1695
+ },
1696
+ view: {
1697
+ type: "object",
1698
+ required: ["cid", "playlist"],
1699
+ properties: {
1700
+ cid: {
1701
+ type: "string",
1702
+ format: "cid"
1703
+ },
1704
+ playlist: {
1705
+ type: "string",
1706
+ format: "uri"
1707
+ },
1708
+ thumbnail: {
1709
+ type: "string",
1710
+ format: "uri"
1711
+ },
1712
+ alt: {
1713
+ type: "string",
1714
+ maxGraphemes: 1e3,
1715
+ maxLength: 1e4
1716
+ },
1717
+ aspectRatio: {
1718
+ type: "ref",
1719
+ ref: "lex:app.bsky.embed.defs#aspectRatio"
1720
+ },
1721
+ presentation: {
1722
+ type: "string",
1723
+ description: "A hint to the client about how to present the video.",
1724
+ knownValues: ["default", "gif"]
1725
+ }
1726
+ }
1727
+ }
1728
+ }
1729
+ },
1730
+ AppBskyFeedDefs: {
1731
+ lexicon: 1,
1732
+ id: "app.bsky.feed.defs",
1733
+ defs: {
1734
+ postView: {
1735
+ type: "object",
1736
+ required: ["uri", "cid", "author", "record", "indexedAt"],
1737
+ properties: {
1738
+ uri: {
1739
+ type: "string",
1740
+ format: "at-uri"
1741
+ },
1742
+ cid: {
1743
+ type: "string",
1744
+ format: "cid"
1745
+ },
1746
+ author: {
1747
+ type: "ref",
1748
+ ref: "lex:app.bsky.actor.defs#profileViewBasic"
1749
+ },
1750
+ record: {
1751
+ type: "unknown"
1752
+ },
1753
+ embed: {
1754
+ type: "union",
1755
+ refs: [
1756
+ "lex:app.bsky.embed.images#view",
1757
+ "lex:app.bsky.embed.video#view",
1758
+ "lex:app.bsky.embed.external#view",
1759
+ "lex:app.bsky.embed.record#view",
1760
+ "lex:app.bsky.embed.recordWithMedia#view"
1761
+ ]
1762
+ },
1763
+ bookmarkCount: {
1764
+ type: "integer"
1765
+ },
1766
+ replyCount: {
1767
+ type: "integer"
1768
+ },
1769
+ repostCount: {
1770
+ type: "integer"
1771
+ },
1772
+ likeCount: {
1773
+ type: "integer"
1774
+ },
1775
+ quoteCount: {
1776
+ type: "integer"
1777
+ },
1778
+ indexedAt: {
1779
+ type: "string",
1780
+ format: "datetime"
1781
+ },
1782
+ viewer: {
1783
+ type: "ref",
1784
+ ref: "lex:app.bsky.feed.defs#viewerState"
1785
+ },
1786
+ labels: {
1787
+ type: "array",
1788
+ items: {
1789
+ type: "ref",
1790
+ ref: "lex:com.atproto.label.defs#label"
1791
+ }
1792
+ },
1793
+ threadgate: {
1794
+ type: "ref",
1795
+ ref: "lex:app.bsky.feed.defs#threadgateView"
1796
+ },
1797
+ debug: {
1798
+ type: "unknown",
1799
+ description: "Debug information for internal development"
1800
+ }
1801
+ }
1802
+ },
1803
+ viewerState: {
1804
+ type: "object",
1805
+ description: "Metadata about the requesting account's relationship with the subject content. Only has meaningful content for authed requests.",
1806
+ properties: {
1807
+ repost: {
1808
+ type: "string",
1809
+ format: "at-uri"
1810
+ },
1811
+ like: {
1812
+ type: "string",
1813
+ format: "at-uri"
1814
+ },
1815
+ bookmarked: {
1816
+ type: "boolean"
1817
+ },
1818
+ threadMuted: {
1819
+ type: "boolean"
1820
+ },
1821
+ replyDisabled: {
1822
+ type: "boolean"
1823
+ },
1824
+ embeddingDisabled: {
1825
+ type: "boolean"
1826
+ },
1827
+ pinned: {
1828
+ type: "boolean"
1829
+ }
1830
+ }
1831
+ },
1832
+ threadContext: {
1833
+ type: "object",
1834
+ description: "Metadata about this post within the context of the thread it is in.",
1835
+ properties: {
1836
+ rootAuthorLike: {
1837
+ type: "string",
1838
+ format: "at-uri"
1839
+ }
1840
+ }
1841
+ },
1842
+ feedViewPost: {
1843
+ type: "object",
1844
+ required: ["post"],
1845
+ properties: {
1846
+ post: {
1847
+ type: "ref",
1848
+ ref: "lex:app.bsky.feed.defs#postView"
1849
+ },
1850
+ reply: {
1851
+ type: "ref",
1852
+ ref: "lex:app.bsky.feed.defs#replyRef"
1853
+ },
1854
+ reason: {
1855
+ type: "union",
1856
+ refs: [
1857
+ "lex:app.bsky.feed.defs#reasonRepost",
1858
+ "lex:app.bsky.feed.defs#reasonPin"
1859
+ ]
1860
+ },
1861
+ feedContext: {
1862
+ type: "string",
1863
+ description: "Context provided by feed generator that may be passed back alongside interactions.",
1864
+ maxLength: 2e3
1865
+ },
1866
+ reqId: {
1867
+ type: "string",
1868
+ description: "Unique identifier per request that may be passed back alongside interactions.",
1869
+ maxLength: 100
1870
+ }
1871
+ }
1872
+ },
1873
+ replyRef: {
1874
+ type: "object",
1875
+ required: ["root", "parent"],
1876
+ properties: {
1877
+ root: {
1878
+ type: "union",
1879
+ refs: [
1880
+ "lex:app.bsky.feed.defs#postView",
1881
+ "lex:app.bsky.feed.defs#notFoundPost",
1882
+ "lex:app.bsky.feed.defs#blockedPost"
1883
+ ]
1884
+ },
1885
+ parent: {
1886
+ type: "union",
1887
+ refs: [
1888
+ "lex:app.bsky.feed.defs#postView",
1889
+ "lex:app.bsky.feed.defs#notFoundPost",
1890
+ "lex:app.bsky.feed.defs#blockedPost"
1891
+ ]
1892
+ },
1893
+ grandparentAuthor: {
1894
+ type: "ref",
1895
+ ref: "lex:app.bsky.actor.defs#profileViewBasic",
1896
+ description: "When parent is a reply to another post, this is the author of that post."
1897
+ }
1898
+ }
1899
+ },
1900
+ reasonRepost: {
1901
+ type: "object",
1902
+ required: ["by", "indexedAt"],
1903
+ properties: {
1904
+ by: {
1905
+ type: "ref",
1906
+ ref: "lex:app.bsky.actor.defs#profileViewBasic"
1907
+ },
1908
+ uri: {
1909
+ type: "string",
1910
+ format: "at-uri"
1911
+ },
1912
+ cid: {
1913
+ type: "string",
1914
+ format: "cid"
1915
+ },
1916
+ indexedAt: {
1917
+ type: "string",
1918
+ format: "datetime"
1919
+ }
1920
+ }
1921
+ },
1922
+ reasonPin: {
1923
+ type: "object",
1924
+ properties: {}
1925
+ },
1926
+ threadViewPost: {
1927
+ type: "object",
1928
+ required: ["post"],
1929
+ properties: {
1930
+ post: {
1931
+ type: "ref",
1932
+ ref: "lex:app.bsky.feed.defs#postView"
1933
+ },
1934
+ parent: {
1935
+ type: "union",
1936
+ refs: [
1937
+ "lex:app.bsky.feed.defs#threadViewPost",
1938
+ "lex:app.bsky.feed.defs#notFoundPost",
1939
+ "lex:app.bsky.feed.defs#blockedPost"
1940
+ ]
1941
+ },
1942
+ replies: {
1943
+ type: "array",
1944
+ items: {
1945
+ type: "union",
1946
+ refs: [
1947
+ "lex:app.bsky.feed.defs#threadViewPost",
1948
+ "lex:app.bsky.feed.defs#notFoundPost",
1949
+ "lex:app.bsky.feed.defs#blockedPost"
1950
+ ]
1951
+ }
1952
+ },
1953
+ threadContext: {
1954
+ type: "ref",
1955
+ ref: "lex:app.bsky.feed.defs#threadContext"
1956
+ }
1957
+ }
1958
+ },
1959
+ notFoundPost: {
1960
+ type: "object",
1961
+ required: ["uri", "notFound"],
1962
+ properties: {
1963
+ uri: {
1964
+ type: "string",
1965
+ format: "at-uri"
1966
+ },
1967
+ notFound: {
1968
+ type: "boolean",
1969
+ const: true
1970
+ }
1971
+ }
1972
+ },
1973
+ blockedPost: {
1974
+ type: "object",
1975
+ required: ["uri", "blocked", "author"],
1976
+ properties: {
1977
+ uri: {
1978
+ type: "string",
1979
+ format: "at-uri"
1980
+ },
1981
+ blocked: {
1982
+ type: "boolean",
1983
+ const: true
1984
+ },
1985
+ author: {
1986
+ type: "ref",
1987
+ ref: "lex:app.bsky.feed.defs#blockedAuthor"
1988
+ }
1989
+ }
1990
+ },
1991
+ blockedAuthor: {
1992
+ type: "object",
1993
+ required: ["did"],
1994
+ properties: {
1995
+ did: {
1996
+ type: "string",
1997
+ format: "did"
1998
+ },
1999
+ viewer: {
2000
+ type: "ref",
2001
+ ref: "lex:app.bsky.actor.defs#viewerState"
2002
+ }
2003
+ }
2004
+ },
2005
+ generatorView: {
2006
+ type: "object",
2007
+ required: ["uri", "cid", "did", "creator", "displayName", "indexedAt"],
2008
+ properties: {
2009
+ uri: {
2010
+ type: "string",
2011
+ format: "at-uri"
2012
+ },
2013
+ cid: {
2014
+ type: "string",
2015
+ format: "cid"
2016
+ },
2017
+ did: {
2018
+ type: "string",
2019
+ format: "did"
2020
+ },
2021
+ creator: {
2022
+ type: "ref",
2023
+ ref: "lex:app.bsky.actor.defs#profileView"
2024
+ },
2025
+ displayName: {
2026
+ type: "string"
2027
+ },
2028
+ description: {
2029
+ type: "string",
2030
+ maxGraphemes: 300,
2031
+ maxLength: 3e3
2032
+ },
2033
+ descriptionFacets: {
2034
+ type: "array",
2035
+ items: {
2036
+ type: "ref",
2037
+ ref: "lex:app.bsky.richtext.facet"
2038
+ }
2039
+ },
2040
+ avatar: {
2041
+ type: "string",
2042
+ format: "uri"
2043
+ },
2044
+ likeCount: {
2045
+ type: "integer",
2046
+ minimum: 0
2047
+ },
2048
+ acceptsInteractions: {
2049
+ type: "boolean"
2050
+ },
2051
+ labels: {
2052
+ type: "array",
2053
+ items: {
2054
+ type: "ref",
2055
+ ref: "lex:com.atproto.label.defs#label"
2056
+ }
2057
+ },
2058
+ viewer: {
2059
+ type: "ref",
2060
+ ref: "lex:app.bsky.feed.defs#generatorViewerState"
2061
+ },
2062
+ contentMode: {
2063
+ type: "string",
2064
+ knownValues: [
2065
+ "app.bsky.feed.defs#contentModeUnspecified",
2066
+ "app.bsky.feed.defs#contentModeVideo"
2067
+ ]
2068
+ },
2069
+ indexedAt: {
2070
+ type: "string",
2071
+ format: "datetime"
2072
+ }
2073
+ }
2074
+ },
2075
+ generatorViewerState: {
2076
+ type: "object",
2077
+ properties: {
2078
+ like: {
2079
+ type: "string",
2080
+ format: "at-uri"
2081
+ }
2082
+ }
2083
+ },
2084
+ skeletonFeedPost: {
2085
+ type: "object",
2086
+ required: ["post"],
2087
+ properties: {
2088
+ post: {
2089
+ type: "string",
2090
+ format: "at-uri"
2091
+ },
2092
+ reason: {
2093
+ type: "union",
2094
+ refs: [
2095
+ "lex:app.bsky.feed.defs#skeletonReasonRepost",
2096
+ "lex:app.bsky.feed.defs#skeletonReasonPin"
2097
+ ]
2098
+ },
2099
+ feedContext: {
2100
+ type: "string",
2101
+ description: "Context that will be passed through to client and may be passed to feed generator back alongside interactions.",
2102
+ maxLength: 2e3
2103
+ }
2104
+ }
2105
+ },
2106
+ skeletonReasonRepost: {
2107
+ type: "object",
2108
+ required: ["repost"],
2109
+ properties: {
2110
+ repost: {
2111
+ type: "string",
2112
+ format: "at-uri"
2113
+ }
2114
+ }
2115
+ },
2116
+ skeletonReasonPin: {
2117
+ type: "object",
2118
+ properties: {}
2119
+ },
2120
+ threadgateView: {
2121
+ type: "object",
2122
+ properties: {
2123
+ uri: {
2124
+ type: "string",
2125
+ format: "at-uri"
2126
+ },
2127
+ cid: {
2128
+ type: "string",
2129
+ format: "cid"
2130
+ },
2131
+ record: {
2132
+ type: "unknown"
2133
+ },
2134
+ lists: {
2135
+ type: "array",
2136
+ items: {
2137
+ type: "ref",
2138
+ ref: "lex:app.bsky.graph.defs#listViewBasic"
2139
+ }
2140
+ }
2141
+ }
2142
+ },
2143
+ interaction: {
2144
+ type: "object",
2145
+ properties: {
2146
+ item: {
2147
+ type: "string",
2148
+ format: "at-uri"
2149
+ },
2150
+ event: {
2151
+ type: "string",
2152
+ knownValues: [
2153
+ "app.bsky.feed.defs#requestLess",
2154
+ "app.bsky.feed.defs#requestMore",
2155
+ "app.bsky.feed.defs#clickthroughItem",
2156
+ "app.bsky.feed.defs#clickthroughAuthor",
2157
+ "app.bsky.feed.defs#clickthroughReposter",
2158
+ "app.bsky.feed.defs#clickthroughEmbed",
2159
+ "app.bsky.feed.defs#interactionSeen",
2160
+ "app.bsky.feed.defs#interactionLike",
2161
+ "app.bsky.feed.defs#interactionRepost",
2162
+ "app.bsky.feed.defs#interactionReply",
2163
+ "app.bsky.feed.defs#interactionQuote",
2164
+ "app.bsky.feed.defs#interactionShare"
2165
+ ]
2166
+ },
2167
+ feedContext: {
2168
+ type: "string",
2169
+ description: "Context on a feed item that was originally supplied by the feed generator on getFeedSkeleton.",
2170
+ maxLength: 2e3
2171
+ },
2172
+ reqId: {
2173
+ type: "string",
2174
+ description: "Unique identifier per request that may be passed back alongside interactions.",
2175
+ maxLength: 100
2176
+ }
2177
+ }
2178
+ },
2179
+ requestLess: {
2180
+ type: "token",
2181
+ description: "Request that less content like the given feed item be shown in the feed"
2182
+ },
2183
+ requestMore: {
2184
+ type: "token",
2185
+ description: "Request that more content like the given feed item be shown in the feed"
2186
+ },
2187
+ clickthroughItem: {
2188
+ type: "token",
2189
+ description: "User clicked through to the feed item"
2190
+ },
2191
+ clickthroughAuthor: {
2192
+ type: "token",
2193
+ description: "User clicked through to the author of the feed item"
2194
+ },
2195
+ clickthroughReposter: {
2196
+ type: "token",
2197
+ description: "User clicked through to the reposter of the feed item"
2198
+ },
2199
+ clickthroughEmbed: {
2200
+ type: "token",
2201
+ description: "User clicked through to the embedded content of the feed item"
2202
+ },
2203
+ contentModeUnspecified: {
2204
+ type: "token",
2205
+ description: "Declares the feed generator returns any types of posts."
2206
+ },
2207
+ contentModeVideo: {
2208
+ type: "token",
2209
+ description: "Declares the feed generator returns posts containing app.bsky.embed.video embeds."
2210
+ },
2211
+ interactionSeen: {
2212
+ type: "token",
2213
+ description: "Feed item was seen by user"
2214
+ },
2215
+ interactionLike: {
2216
+ type: "token",
2217
+ description: "User liked the feed item"
2218
+ },
2219
+ interactionRepost: {
2220
+ type: "token",
2221
+ description: "User reposted the feed item"
2222
+ },
2223
+ interactionReply: {
2224
+ type: "token",
2225
+ description: "User replied to the feed item"
2226
+ },
2227
+ interactionQuote: {
2228
+ type: "token",
2229
+ description: "User quoted the feed item"
2230
+ },
2231
+ interactionShare: {
2232
+ type: "token",
2233
+ description: "User shared the feed item"
2234
+ }
2235
+ }
2236
+ },
2237
+ AppBskyFeedPostgate: {
2238
+ lexicon: 1,
2239
+ id: "app.bsky.feed.postgate",
2240
+ defs: {
2241
+ main: {
2242
+ type: "record",
2243
+ key: "tid",
2244
+ description: "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.",
2245
+ record: {
2246
+ type: "object",
2247
+ required: ["post", "createdAt"],
2248
+ properties: {
2249
+ createdAt: {
2250
+ type: "string",
2251
+ format: "datetime"
2252
+ },
2253
+ post: {
2254
+ type: "string",
2255
+ format: "at-uri",
2256
+ description: "Reference (AT-URI) to the post record."
2257
+ },
2258
+ detachedEmbeddingUris: {
2259
+ type: "array",
2260
+ maxLength: 50,
2261
+ items: {
2262
+ type: "string",
2263
+ format: "at-uri"
2264
+ },
2265
+ description: "List of AT-URIs embedding this post that the author has detached from."
2266
+ },
2267
+ embeddingRules: {
2268
+ description: "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.",
2269
+ type: "array",
2270
+ maxLength: 5,
2271
+ items: {
2272
+ type: "union",
2273
+ refs: ["lex:app.bsky.feed.postgate#disableRule"]
2274
+ }
2275
+ }
2276
+ }
2277
+ }
2278
+ },
2279
+ disableRule: {
2280
+ type: "object",
2281
+ description: "Disables embedding of this post.",
2282
+ properties: {}
2283
+ }
2284
+ }
2285
+ },
2286
+ AppBskyFeedThreadgate: {
2287
+ lexicon: 1,
2288
+ id: "app.bsky.feed.threadgate",
2289
+ defs: {
2290
+ main: {
2291
+ type: "record",
2292
+ key: "tid",
2293
+ description: "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.",
2294
+ record: {
2295
+ type: "object",
2296
+ required: ["post", "createdAt"],
2297
+ properties: {
2298
+ post: {
2299
+ type: "string",
2300
+ format: "at-uri",
2301
+ description: "Reference (AT-URI) to the post record."
2302
+ },
2303
+ allow: {
2304
+ description: "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.",
2305
+ type: "array",
2306
+ maxLength: 5,
2307
+ items: {
2308
+ type: "union",
2309
+ refs: [
2310
+ "lex:app.bsky.feed.threadgate#mentionRule",
2311
+ "lex:app.bsky.feed.threadgate#followerRule",
2312
+ "lex:app.bsky.feed.threadgate#followingRule",
2313
+ "lex:app.bsky.feed.threadgate#listRule"
2314
+ ]
2315
+ }
2316
+ },
2317
+ createdAt: {
2318
+ type: "string",
2319
+ format: "datetime"
2320
+ },
2321
+ hiddenReplies: {
2322
+ type: "array",
2323
+ maxLength: 300,
2324
+ items: {
2325
+ type: "string",
2326
+ format: "at-uri"
2327
+ },
2328
+ description: "List of hidden reply URIs."
2329
+ }
2330
+ }
2331
+ }
2332
+ },
2333
+ mentionRule: {
2334
+ type: "object",
2335
+ description: "Allow replies from actors mentioned in your post.",
2336
+ properties: {}
2337
+ },
2338
+ followerRule: {
2339
+ type: "object",
2340
+ description: "Allow replies from actors who follow you.",
2341
+ properties: {}
2342
+ },
2343
+ followingRule: {
2344
+ type: "object",
2345
+ description: "Allow replies from actors you follow.",
2346
+ properties: {}
2347
+ },
2348
+ listRule: {
2349
+ type: "object",
2350
+ description: "Allow replies from actors on a list.",
2351
+ required: ["list"],
2352
+ properties: {
2353
+ list: {
2354
+ type: "string",
2355
+ format: "at-uri"
2356
+ }
2357
+ }
2358
+ }
2359
+ }
2360
+ },
2361
+ AppBskyGraphDefs: {
2362
+ lexicon: 1,
2363
+ id: "app.bsky.graph.defs",
2364
+ defs: {
2365
+ listViewBasic: {
2366
+ type: "object",
2367
+ required: ["uri", "cid", "name", "purpose"],
2368
+ properties: {
2369
+ uri: {
2370
+ type: "string",
2371
+ format: "at-uri"
2372
+ },
2373
+ cid: {
2374
+ type: "string",
2375
+ format: "cid"
2376
+ },
2377
+ name: {
2378
+ type: "string",
2379
+ maxLength: 64,
2380
+ minLength: 1
2381
+ },
2382
+ purpose: {
2383
+ type: "ref",
2384
+ ref: "lex:app.bsky.graph.defs#listPurpose"
2385
+ },
2386
+ avatar: {
2387
+ type: "string",
2388
+ format: "uri"
2389
+ },
2390
+ listItemCount: {
2391
+ type: "integer",
2392
+ minimum: 0
2393
+ },
2394
+ labels: {
2395
+ type: "array",
2396
+ items: {
2397
+ type: "ref",
2398
+ ref: "lex:com.atproto.label.defs#label"
2399
+ }
2400
+ },
2401
+ viewer: {
2402
+ type: "ref",
2403
+ ref: "lex:app.bsky.graph.defs#listViewerState"
2404
+ },
2405
+ indexedAt: {
2406
+ type: "string",
2407
+ format: "datetime"
2408
+ }
2409
+ }
2410
+ },
2411
+ listView: {
2412
+ type: "object",
2413
+ required: ["uri", "cid", "creator", "name", "purpose", "indexedAt"],
2414
+ properties: {
2415
+ uri: {
2416
+ type: "string",
2417
+ format: "at-uri"
2418
+ },
2419
+ cid: {
2420
+ type: "string",
2421
+ format: "cid"
2422
+ },
2423
+ creator: {
2424
+ type: "ref",
2425
+ ref: "lex:app.bsky.actor.defs#profileView"
2426
+ },
2427
+ name: {
2428
+ type: "string",
2429
+ maxLength: 64,
2430
+ minLength: 1
2431
+ },
2432
+ purpose: {
2433
+ type: "ref",
2434
+ ref: "lex:app.bsky.graph.defs#listPurpose"
2435
+ },
2436
+ description: {
2437
+ type: "string",
2438
+ maxGraphemes: 300,
2439
+ maxLength: 3e3
2440
+ },
2441
+ descriptionFacets: {
2442
+ type: "array",
2443
+ items: {
2444
+ type: "ref",
2445
+ ref: "lex:app.bsky.richtext.facet"
2446
+ }
2447
+ },
2448
+ avatar: {
2449
+ type: "string",
2450
+ format: "uri"
2451
+ },
2452
+ listItemCount: {
2453
+ type: "integer",
2454
+ minimum: 0
2455
+ },
2456
+ labels: {
2457
+ type: "array",
2458
+ items: {
2459
+ type: "ref",
2460
+ ref: "lex:com.atproto.label.defs#label"
2461
+ }
2462
+ },
2463
+ viewer: {
2464
+ type: "ref",
2465
+ ref: "lex:app.bsky.graph.defs#listViewerState"
2466
+ },
2467
+ indexedAt: {
2468
+ type: "string",
2469
+ format: "datetime"
2470
+ }
2471
+ }
2472
+ },
2473
+ listItemView: {
2474
+ type: "object",
2475
+ required: ["uri", "subject"],
2476
+ properties: {
2477
+ uri: {
2478
+ type: "string",
2479
+ format: "at-uri"
2480
+ },
2481
+ subject: {
2482
+ type: "ref",
2483
+ ref: "lex:app.bsky.actor.defs#profileView"
2484
+ }
2485
+ }
2486
+ },
2487
+ starterPackView: {
2488
+ type: "object",
2489
+ required: ["uri", "cid", "record", "creator", "indexedAt"],
2490
+ properties: {
2491
+ uri: {
2492
+ type: "string",
2493
+ format: "at-uri"
2494
+ },
2495
+ cid: {
2496
+ type: "string",
2497
+ format: "cid"
2498
+ },
2499
+ record: {
2500
+ type: "unknown"
2501
+ },
2502
+ creator: {
2503
+ type: "ref",
2504
+ ref: "lex:app.bsky.actor.defs#profileViewBasic"
2505
+ },
2506
+ list: {
2507
+ type: "ref",
2508
+ ref: "lex:app.bsky.graph.defs#listViewBasic"
2509
+ },
2510
+ listItemsSample: {
2511
+ type: "array",
2512
+ maxLength: 12,
2513
+ items: {
2514
+ type: "ref",
2515
+ ref: "lex:app.bsky.graph.defs#listItemView"
2516
+ }
2517
+ },
2518
+ feeds: {
2519
+ type: "array",
2520
+ maxLength: 3,
2521
+ items: {
2522
+ type: "ref",
2523
+ ref: "lex:app.bsky.feed.defs#generatorView"
2524
+ }
2525
+ },
2526
+ joinedWeekCount: {
2527
+ type: "integer",
2528
+ minimum: 0
2529
+ },
2530
+ joinedAllTimeCount: {
2531
+ type: "integer",
2532
+ minimum: 0
2533
+ },
2534
+ labels: {
2535
+ type: "array",
2536
+ items: {
2537
+ type: "ref",
2538
+ ref: "lex:com.atproto.label.defs#label"
2539
+ }
2540
+ },
2541
+ indexedAt: {
2542
+ type: "string",
2543
+ format: "datetime"
2544
+ }
2545
+ }
2546
+ },
2547
+ starterPackViewBasic: {
2548
+ type: "object",
2549
+ required: ["uri", "cid", "record", "creator", "indexedAt"],
2550
+ properties: {
2551
+ uri: {
2552
+ type: "string",
2553
+ format: "at-uri"
2554
+ },
2555
+ cid: {
2556
+ type: "string",
2557
+ format: "cid"
2558
+ },
2559
+ record: {
2560
+ type: "unknown"
2561
+ },
2562
+ creator: {
2563
+ type: "ref",
2564
+ ref: "lex:app.bsky.actor.defs#profileViewBasic"
2565
+ },
2566
+ listItemCount: {
2567
+ type: "integer",
2568
+ minimum: 0
2569
+ },
2570
+ joinedWeekCount: {
2571
+ type: "integer",
2572
+ minimum: 0
2573
+ },
2574
+ joinedAllTimeCount: {
2575
+ type: "integer",
2576
+ minimum: 0
2577
+ },
2578
+ labels: {
2579
+ type: "array",
2580
+ items: {
2581
+ type: "ref",
2582
+ ref: "lex:com.atproto.label.defs#label"
2583
+ }
2584
+ },
2585
+ indexedAt: {
2586
+ type: "string",
2587
+ format: "datetime"
2588
+ }
2589
+ }
2590
+ },
2591
+ listPurpose: {
2592
+ type: "string",
2593
+ knownValues: [
2594
+ "app.bsky.graph.defs#modlist",
2595
+ "app.bsky.graph.defs#curatelist",
2596
+ "app.bsky.graph.defs#referencelist"
2597
+ ]
2598
+ },
2599
+ modlist: {
2600
+ type: "token",
2601
+ description: "A list of actors to apply an aggregate moderation action (mute/block) on."
2602
+ },
2603
+ curatelist: {
2604
+ type: "token",
2605
+ description: "A list of actors used for curation purposes such as list feeds or interaction gating."
2606
+ },
2607
+ referencelist: {
2608
+ type: "token",
2609
+ description: "A list of actors used for only for reference purposes such as within a starter pack."
2610
+ },
2611
+ listViewerState: {
2612
+ type: "object",
2613
+ properties: {
2614
+ muted: {
2615
+ type: "boolean"
2616
+ },
2617
+ blocked: {
2618
+ type: "string",
2619
+ format: "at-uri"
2620
+ }
2621
+ }
2622
+ },
2623
+ notFoundActor: {
2624
+ type: "object",
2625
+ description: "indicates that a handle or DID could not be resolved",
2626
+ required: ["actor", "notFound"],
2627
+ properties: {
2628
+ actor: {
2629
+ type: "string",
2630
+ format: "at-identifier"
2631
+ },
2632
+ notFound: {
2633
+ type: "boolean",
2634
+ const: true
2635
+ }
2636
+ }
2637
+ },
2638
+ relationship: {
2639
+ type: "object",
2640
+ description: "lists the bi-directional graph relationships between one actor (not indicated in the object), and the target actors (the DID included in the object)",
2641
+ required: ["did"],
2642
+ properties: {
2643
+ did: {
2644
+ type: "string",
2645
+ format: "did"
2646
+ },
2647
+ following: {
2648
+ type: "string",
2649
+ format: "at-uri",
2650
+ description: "if the actor follows this DID, this is the AT-URI of the follow record"
2651
+ },
2652
+ followedBy: {
2653
+ type: "string",
2654
+ format: "at-uri",
2655
+ description: "if the actor is followed by this DID, contains the AT-URI of the follow record"
2656
+ },
2657
+ blocking: {
2658
+ type: "string",
2659
+ format: "at-uri",
2660
+ description: "if the actor blocks this DID, this is the AT-URI of the block record"
2661
+ },
2662
+ blockedBy: {
2663
+ type: "string",
2664
+ format: "at-uri",
2665
+ description: "if the actor is blocked by this DID, contains the AT-URI of the block record"
2666
+ },
2667
+ blockingByList: {
2668
+ type: "string",
2669
+ format: "at-uri",
2670
+ description: "if the actor blocks this DID via a block list, this is the AT-URI of the listblock record"
2671
+ },
2672
+ blockedByList: {
2673
+ type: "string",
2674
+ format: "at-uri",
2675
+ description: "if the actor is blocked by this DID via a block list, contains the AT-URI of the listblock record"
2676
+ }
2677
+ }
2678
+ }
2679
+ }
2680
+ },
389
2681
  ComAtprotoLabelDefs: {
390
2682
  lexicon: 1,
391
2683
  id: "com.atproto.label.defs",
@@ -548,55 +2840,460 @@ var schemaDict = {
548
2840
  }
549
2841
  }
550
2842
  },
551
- AppBskyActorProfile: {
2843
+ AppBskyLabelerDefs: {
552
2844
  lexicon: 1,
553
- id: "app.bsky.actor.profile",
2845
+ id: "app.bsky.labeler.defs",
554
2846
  defs: {
555
- main: {
556
- type: "record",
557
- description: "A declaration of a Bluesky account profile.",
558
- key: "literal:self",
559
- record: {
560
- type: "object",
561
- properties: {
562
- displayName: {
563
- type: "string",
564
- maxGraphemes: 64,
565
- maxLength: 640
566
- },
567
- description: {
568
- type: "string",
569
- description: "Free-form profile description text.",
570
- maxGraphemes: 256,
571
- maxLength: 2560
572
- },
573
- avatar: {
574
- type: "blob",
575
- description: "Small image to be displayed next to posts from account. AKA, 'profile picture'",
576
- accept: ["image/png", "image/jpeg"],
577
- maxSize: 1e6
578
- },
579
- banner: {
580
- type: "blob",
581
- description: "Larger horizontal image to display behind profile view.",
582
- accept: ["image/png", "image/jpeg"],
583
- maxSize: 1e6
584
- },
585
- labels: {
586
- type: "union",
587
- description: "Self-label values, specific to the Bluesky application, on the overall account.",
588
- refs: ["lex:com.atproto.label.defs#selfLabels"]
589
- },
590
- joinedViaStarterPack: {
2847
+ labelerView: {
2848
+ type: "object",
2849
+ required: ["uri", "cid", "creator", "indexedAt"],
2850
+ properties: {
2851
+ uri: {
2852
+ type: "string",
2853
+ format: "at-uri"
2854
+ },
2855
+ cid: {
2856
+ type: "string",
2857
+ format: "cid"
2858
+ },
2859
+ creator: {
2860
+ type: "ref",
2861
+ ref: "lex:app.bsky.actor.defs#profileView"
2862
+ },
2863
+ likeCount: {
2864
+ type: "integer",
2865
+ minimum: 0
2866
+ },
2867
+ viewer: {
2868
+ type: "ref",
2869
+ ref: "lex:app.bsky.labeler.defs#labelerViewerState"
2870
+ },
2871
+ indexedAt: {
2872
+ type: "string",
2873
+ format: "datetime"
2874
+ },
2875
+ labels: {
2876
+ type: "array",
2877
+ items: {
591
2878
  type: "ref",
592
- ref: "lex:com.atproto.repo.strongRef"
593
- },
594
- createdAt: {
2879
+ ref: "lex:com.atproto.label.defs#label"
2880
+ }
2881
+ }
2882
+ }
2883
+ },
2884
+ labelerViewDetailed: {
2885
+ type: "object",
2886
+ required: ["uri", "cid", "creator", "policies", "indexedAt"],
2887
+ properties: {
2888
+ uri: {
2889
+ type: "string",
2890
+ format: "at-uri"
2891
+ },
2892
+ cid: {
2893
+ type: "string",
2894
+ format: "cid"
2895
+ },
2896
+ creator: {
2897
+ type: "ref",
2898
+ ref: "lex:app.bsky.actor.defs#profileView"
2899
+ },
2900
+ policies: {
2901
+ type: "ref",
2902
+ ref: "lex:app.bsky.labeler.defs#labelerPolicies"
2903
+ },
2904
+ likeCount: {
2905
+ type: "integer",
2906
+ minimum: 0
2907
+ },
2908
+ viewer: {
2909
+ type: "ref",
2910
+ ref: "lex:app.bsky.labeler.defs#labelerViewerState"
2911
+ },
2912
+ indexedAt: {
2913
+ type: "string",
2914
+ format: "datetime"
2915
+ },
2916
+ labels: {
2917
+ type: "array",
2918
+ items: {
2919
+ type: "ref",
2920
+ ref: "lex:com.atproto.label.defs#label"
2921
+ }
2922
+ },
2923
+ reasonTypes: {
2924
+ description: "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.",
2925
+ type: "array",
2926
+ items: {
2927
+ type: "ref",
2928
+ ref: "lex:com.atproto.moderation.defs#reasonType"
2929
+ }
2930
+ },
2931
+ subjectTypes: {
2932
+ description: "The set of subject types (account, record, etc) this service accepts reports on.",
2933
+ type: "array",
2934
+ items: {
2935
+ type: "ref",
2936
+ ref: "lex:com.atproto.moderation.defs#subjectType"
2937
+ }
2938
+ },
2939
+ subjectCollections: {
2940
+ type: "array",
2941
+ description: "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.",
2942
+ items: {
595
2943
  type: "string",
596
- format: "datetime"
2944
+ format: "nsid"
2945
+ }
2946
+ }
2947
+ }
2948
+ },
2949
+ labelerViewerState: {
2950
+ type: "object",
2951
+ properties: {
2952
+ like: {
2953
+ type: "string",
2954
+ format: "at-uri"
2955
+ }
2956
+ }
2957
+ },
2958
+ labelerPolicies: {
2959
+ type: "object",
2960
+ required: ["labelValues"],
2961
+ properties: {
2962
+ labelValues: {
2963
+ type: "array",
2964
+ description: "The label values which this labeler publishes. May include global or custom labels.",
2965
+ items: {
2966
+ type: "ref",
2967
+ ref: "lex:com.atproto.label.defs#labelValue"
2968
+ }
2969
+ },
2970
+ labelValueDefinitions: {
2971
+ type: "array",
2972
+ description: "Label values created by this labeler and scoped exclusively to it. Labels defined here will override global label definitions for this labeler.",
2973
+ items: {
2974
+ type: "ref",
2975
+ ref: "lex:com.atproto.label.defs#labelValueDefinition"
2976
+ }
2977
+ }
2978
+ }
2979
+ }
2980
+ }
2981
+ },
2982
+ ComAtprotoModerationDefs: {
2983
+ lexicon: 1,
2984
+ id: "com.atproto.moderation.defs",
2985
+ defs: {
2986
+ reasonType: {
2987
+ type: "string",
2988
+ knownValues: [
2989
+ "com.atproto.moderation.defs#reasonSpam",
2990
+ "com.atproto.moderation.defs#reasonViolation",
2991
+ "com.atproto.moderation.defs#reasonMisleading",
2992
+ "com.atproto.moderation.defs#reasonSexual",
2993
+ "com.atproto.moderation.defs#reasonRude",
2994
+ "com.atproto.moderation.defs#reasonOther",
2995
+ "com.atproto.moderation.defs#reasonAppeal",
2996
+ "tools.ozone.report.defs#reasonAppeal",
2997
+ "tools.ozone.report.defs#reasonOther",
2998
+ "tools.ozone.report.defs#reasonViolenceAnimal",
2999
+ "tools.ozone.report.defs#reasonViolenceThreats",
3000
+ "tools.ozone.report.defs#reasonViolenceGraphicContent",
3001
+ "tools.ozone.report.defs#reasonViolenceGlorification",
3002
+ "tools.ozone.report.defs#reasonViolenceExtremistContent",
3003
+ "tools.ozone.report.defs#reasonViolenceTrafficking",
3004
+ "tools.ozone.report.defs#reasonViolenceOther",
3005
+ "tools.ozone.report.defs#reasonSexualAbuseContent",
3006
+ "tools.ozone.report.defs#reasonSexualNCII",
3007
+ "tools.ozone.report.defs#reasonSexualDeepfake",
3008
+ "tools.ozone.report.defs#reasonSexualAnimal",
3009
+ "tools.ozone.report.defs#reasonSexualUnlabeled",
3010
+ "tools.ozone.report.defs#reasonSexualOther",
3011
+ "tools.ozone.report.defs#reasonChildSafetyCSAM",
3012
+ "tools.ozone.report.defs#reasonChildSafetyGroom",
3013
+ "tools.ozone.report.defs#reasonChildSafetyPrivacy",
3014
+ "tools.ozone.report.defs#reasonChildSafetyHarassment",
3015
+ "tools.ozone.report.defs#reasonChildSafetyOther",
3016
+ "tools.ozone.report.defs#reasonHarassmentTroll",
3017
+ "tools.ozone.report.defs#reasonHarassmentTargeted",
3018
+ "tools.ozone.report.defs#reasonHarassmentHateSpeech",
3019
+ "tools.ozone.report.defs#reasonHarassmentDoxxing",
3020
+ "tools.ozone.report.defs#reasonHarassmentOther",
3021
+ "tools.ozone.report.defs#reasonMisleadingBot",
3022
+ "tools.ozone.report.defs#reasonMisleadingImpersonation",
3023
+ "tools.ozone.report.defs#reasonMisleadingSpam",
3024
+ "tools.ozone.report.defs#reasonMisleadingScam",
3025
+ "tools.ozone.report.defs#reasonMisleadingElections",
3026
+ "tools.ozone.report.defs#reasonMisleadingOther",
3027
+ "tools.ozone.report.defs#reasonRuleSiteSecurity",
3028
+ "tools.ozone.report.defs#reasonRuleProhibitedSales",
3029
+ "tools.ozone.report.defs#reasonRuleBanEvasion",
3030
+ "tools.ozone.report.defs#reasonRuleOther",
3031
+ "tools.ozone.report.defs#reasonSelfHarmContent",
3032
+ "tools.ozone.report.defs#reasonSelfHarmED",
3033
+ "tools.ozone.report.defs#reasonSelfHarmStunts",
3034
+ "tools.ozone.report.defs#reasonSelfHarmSubstances",
3035
+ "tools.ozone.report.defs#reasonSelfHarmOther"
3036
+ ]
3037
+ },
3038
+ reasonSpam: {
3039
+ type: "token",
3040
+ description: "Spam: frequent unwanted promotion, replies, mentions. Prefer new lexicon definition `tools.ozone.report.defs#reasonMisleadingSpam`."
3041
+ },
3042
+ reasonViolation: {
3043
+ type: "token",
3044
+ description: "Direct violation of server rules, laws, terms of service. Prefer new lexicon definition `tools.ozone.report.defs#reasonRuleOther`."
3045
+ },
3046
+ reasonMisleading: {
3047
+ type: "token",
3048
+ description: "Misleading identity, affiliation, or content. Prefer new lexicon definition `tools.ozone.report.defs#reasonMisleadingOther`."
3049
+ },
3050
+ reasonSexual: {
3051
+ type: "token",
3052
+ description: "Unwanted or mislabeled sexual content. Prefer new lexicon definition `tools.ozone.report.defs#reasonSexualUnlabeled`."
3053
+ },
3054
+ reasonRude: {
3055
+ type: "token",
3056
+ description: "Rude, harassing, explicit, or otherwise unwelcoming behavior. Prefer new lexicon definition `tools.ozone.report.defs#reasonHarassmentOther`."
3057
+ },
3058
+ reasonOther: {
3059
+ type: "token",
3060
+ description: "Reports not falling under another report category. Prefer new lexicon definition `tools.ozone.report.defs#reasonOther`."
3061
+ },
3062
+ reasonAppeal: {
3063
+ type: "token",
3064
+ description: "Appeal a previously taken moderation action"
3065
+ },
3066
+ subjectType: {
3067
+ type: "string",
3068
+ description: "Tag describing a type of subject that might be reported.",
3069
+ knownValues: ["account", "record", "chat"]
3070
+ }
3071
+ }
3072
+ },
3073
+ AppBskyNotificationDefs: {
3074
+ lexicon: 1,
3075
+ id: "app.bsky.notification.defs",
3076
+ defs: {
3077
+ recordDeleted: {
3078
+ type: "object",
3079
+ properties: {}
3080
+ },
3081
+ chatPreference: {
3082
+ type: "object",
3083
+ required: ["include", "push"],
3084
+ properties: {
3085
+ include: {
3086
+ type: "string",
3087
+ knownValues: ["all", "accepted"]
3088
+ },
3089
+ push: {
3090
+ type: "boolean"
3091
+ }
3092
+ }
3093
+ },
3094
+ filterablePreference: {
3095
+ type: "object",
3096
+ required: ["include", "list", "push"],
3097
+ properties: {
3098
+ include: {
3099
+ type: "string",
3100
+ knownValues: ["all", "follows"]
3101
+ },
3102
+ list: {
3103
+ type: "boolean"
3104
+ },
3105
+ push: {
3106
+ type: "boolean"
3107
+ }
3108
+ }
3109
+ },
3110
+ preference: {
3111
+ type: "object",
3112
+ required: ["list", "push"],
3113
+ properties: {
3114
+ list: {
3115
+ type: "boolean"
3116
+ },
3117
+ push: {
3118
+ type: "boolean"
3119
+ }
3120
+ }
3121
+ },
3122
+ preferences: {
3123
+ type: "object",
3124
+ required: [
3125
+ "chat",
3126
+ "follow",
3127
+ "like",
3128
+ "likeViaRepost",
3129
+ "mention",
3130
+ "quote",
3131
+ "reply",
3132
+ "repost",
3133
+ "repostViaRepost",
3134
+ "starterpackJoined",
3135
+ "subscribedPost",
3136
+ "unverified",
3137
+ "verified"
3138
+ ],
3139
+ properties: {
3140
+ chat: {
3141
+ type: "ref",
3142
+ ref: "lex:app.bsky.notification.defs#chatPreference"
3143
+ },
3144
+ follow: {
3145
+ type: "ref",
3146
+ ref: "lex:app.bsky.notification.defs#filterablePreference"
3147
+ },
3148
+ like: {
3149
+ type: "ref",
3150
+ ref: "lex:app.bsky.notification.defs#filterablePreference"
3151
+ },
3152
+ likeViaRepost: {
3153
+ type: "ref",
3154
+ ref: "lex:app.bsky.notification.defs#filterablePreference"
3155
+ },
3156
+ mention: {
3157
+ type: "ref",
3158
+ ref: "lex:app.bsky.notification.defs#filterablePreference"
3159
+ },
3160
+ quote: {
3161
+ type: "ref",
3162
+ ref: "lex:app.bsky.notification.defs#filterablePreference"
3163
+ },
3164
+ reply: {
3165
+ type: "ref",
3166
+ ref: "lex:app.bsky.notification.defs#filterablePreference"
3167
+ },
3168
+ repost: {
3169
+ type: "ref",
3170
+ ref: "lex:app.bsky.notification.defs#filterablePreference"
3171
+ },
3172
+ repostViaRepost: {
3173
+ type: "ref",
3174
+ ref: "lex:app.bsky.notification.defs#filterablePreference"
3175
+ },
3176
+ starterpackJoined: {
3177
+ type: "ref",
3178
+ ref: "lex:app.bsky.notification.defs#preference"
3179
+ },
3180
+ subscribedPost: {
3181
+ type: "ref",
3182
+ ref: "lex:app.bsky.notification.defs#preference"
3183
+ },
3184
+ unverified: {
3185
+ type: "ref",
3186
+ ref: "lex:app.bsky.notification.defs#preference"
3187
+ },
3188
+ verified: {
3189
+ type: "ref",
3190
+ ref: "lex:app.bsky.notification.defs#preference"
3191
+ }
3192
+ }
3193
+ },
3194
+ activitySubscription: {
3195
+ type: "object",
3196
+ required: ["post", "reply"],
3197
+ properties: {
3198
+ post: {
3199
+ type: "boolean"
3200
+ },
3201
+ reply: {
3202
+ type: "boolean"
3203
+ }
3204
+ }
3205
+ },
3206
+ subjectActivitySubscription: {
3207
+ description: "Object used to store activity subscription data in stash.",
3208
+ type: "object",
3209
+ required: ["subject", "activitySubscription"],
3210
+ properties: {
3211
+ subject: {
3212
+ type: "string",
3213
+ format: "did"
3214
+ },
3215
+ activitySubscription: {
3216
+ type: "ref",
3217
+ ref: "lex:app.bsky.notification.defs#activitySubscription"
3218
+ }
3219
+ }
3220
+ }
3221
+ }
3222
+ },
3223
+ AppBskyRichtextFacet: {
3224
+ lexicon: 1,
3225
+ id: "app.bsky.richtext.facet",
3226
+ defs: {
3227
+ main: {
3228
+ type: "object",
3229
+ description: "Annotation of a sub-string within rich text.",
3230
+ required: ["index", "features"],
3231
+ properties: {
3232
+ index: {
3233
+ type: "ref",
3234
+ ref: "lex:app.bsky.richtext.facet#byteSlice"
3235
+ },
3236
+ features: {
3237
+ type: "array",
3238
+ items: {
3239
+ type: "union",
3240
+ refs: [
3241
+ "lex:app.bsky.richtext.facet#mention",
3242
+ "lex:app.bsky.richtext.facet#link",
3243
+ "lex:app.bsky.richtext.facet#tag"
3244
+ ]
597
3245
  }
598
3246
  }
599
3247
  }
3248
+ },
3249
+ mention: {
3250
+ type: "object",
3251
+ description: "Facet feature for mention of another account. The text is usually a handle, including a '@' prefix, but the facet reference is a DID.",
3252
+ required: ["did"],
3253
+ properties: {
3254
+ did: {
3255
+ type: "string",
3256
+ format: "did"
3257
+ }
3258
+ }
3259
+ },
3260
+ link: {
3261
+ type: "object",
3262
+ description: "Facet feature for a URL. The text URL may have been simplified or truncated, but the facet reference should be a complete URL.",
3263
+ required: ["uri"],
3264
+ properties: {
3265
+ uri: {
3266
+ type: "string",
3267
+ format: "uri"
3268
+ }
3269
+ }
3270
+ },
3271
+ tag: {
3272
+ type: "object",
3273
+ description: "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').",
3274
+ required: ["tag"],
3275
+ properties: {
3276
+ tag: {
3277
+ type: "string",
3278
+ maxLength: 640,
3279
+ maxGraphemes: 64
3280
+ }
3281
+ }
3282
+ },
3283
+ byteSlice: {
3284
+ type: "object",
3285
+ description: "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.",
3286
+ required: ["byteStart", "byteEnd"],
3287
+ properties: {
3288
+ byteStart: {
3289
+ type: "integer",
3290
+ minimum: 0
3291
+ },
3292
+ byteEnd: {
3293
+ type: "integer",
3294
+ minimum: 0
3295
+ }
3296
+ }
600
3297
  }
601
3298
  }
602
3299
  },
@@ -633,16 +3330,16 @@ function validate(v, id2, hash, requiredType) {
633
3330
  };
634
3331
  }
635
3332
 
636
- // ../internal/generated/lexicon/types/app/bsky/actor/profile.ts
3333
+ // ../internal/generated/lexicon/types/app/bsky/actor/defs.ts
637
3334
  var is$typed2 = is$typed;
638
3335
  var validate2 = validate;
639
- var id = "app.bsky.actor.profile";
640
- var hashMain = "main";
641
- function isMain(v) {
642
- return is$typed2(v, id, hashMain);
3336
+ var id = "app.bsky.actor.defs";
3337
+ var hashProfileViewDetailed = "profileViewDetailed";
3338
+ function isProfileViewDetailed(v) {
3339
+ return is$typed2(v, id, hashProfileViewDetailed);
643
3340
  }
644
- function validateMain(v) {
645
- return validate2(v, id, hashMain, true);
3341
+ function validateProfileViewDetailed(v) {
3342
+ return validate2(v, id, hashProfileViewDetailed);
646
3343
  }
647
3344
 
648
3345
  // src/data/trusted.json
@@ -651,6 +3348,10 @@ var trusted_default = {
651
3348
  };
652
3349
 
653
3350
  // src/session.ts
3351
+ var errorLogger = (err) => {
3352
+ console.error(err);
3353
+ return void 0;
3354
+ };
654
3355
  async function getSession(req, res, cookieSecret) {
655
3356
  const hostname = (0, import_common3.getHostname)(req);
656
3357
  const isLocalhost = (0, import_common3.isLocalHostname)(hostname);
@@ -703,34 +3404,33 @@ async function getSessionAgent(req, res, ctx, cookieSecret) {
703
3404
  return { error };
704
3405
  }
705
3406
  }
3407
+ function getAppViewAgent(appViewUrl) {
3408
+ const service = appViewUrl || "https://api.bsky.app";
3409
+ const appViewAgent = new import_api.Agent({ service });
3410
+ return appViewAgent;
3411
+ }
706
3412
  async function getSessionUser(req, res, ctx, cookieSecret) {
707
3413
  const { agent, issuer } = await getSessionAgent(req, res, ctx, cookieSecret);
708
3414
  if (!agent || !issuer) {
709
3415
  return { user: null };
710
3416
  }
711
3417
  const issuerTrusted = trusted_default.trustedIssuers.includes(issuer);
712
- const userSessionPr = agent.com.atproto.server.getSession().catch(() => void 0);
713
- const profileResponsePr = agent.com.atproto.repo.getRecord({
714
- repo: agent.assertDid,
715
- collection: "app.bsky.actor.profile",
716
- rkey: "self"
717
- }).catch(() => void 0);
718
- const [userSession, profileResponse] = await Promise.all([userSessionPr, profileResponsePr]);
719
- const profileRecord = profileResponse?.data;
3418
+ const userSessionPr = agent.com.atproto.server.getSession().catch(errorLogger);
3419
+ const profilePr = getProfileFromAppView(agent.assertDid);
3420
+ const [userSession, profile] = await Promise.all([userSessionPr, profilePr]);
720
3421
  const userInfo = userSession?.data;
721
- let profile = null;
722
- if (profileRecord && isMain(profileRecord.value)) {
723
- const validateResult = validateMain(profileRecord.value);
724
- if (validateResult.success) {
725
- profile = profileRecord.value;
726
- } else {
727
- console.error("[getSessionUser] Error: Unable to validate profileRecord!");
728
- }
729
- }
730
3422
  const handle = userInfo?.handle;
731
3423
  const email = userInfo?.email;
732
3424
  const emailConfirmed = userInfo?.emailConfirmed;
733
- const emailTrusted = issuerTrusted;
3425
+ const displayName = profile?.displayName ?? "";
3426
+ const emailVerified = !!(issuerTrusted && emailConfirmed);
3427
+ let avatar = "";
3428
+ if (profile?.avatar) {
3429
+ if (typeof profile.avatar == "string") {
3430
+ avatar = profile.avatar;
3431
+ } else {
3432
+ }
3433
+ }
734
3434
  if (!handle) {
735
3435
  const error = "handle missing";
736
3436
  ctx.logger.error(error);
@@ -741,22 +3441,43 @@ async function getSessionUser(req, res, ctx, cookieSecret) {
741
3441
  const error = "no verified email found";
742
3442
  ctx.logger.error(error);
743
3443
  ctx.logger.warn("email:", email, `[${emailConfirmed}]`);
744
- ctx.logger.warn("user:", { did: agent.assertDid, handle, displayName: profile?.displayName ?? "" });
3444
+ ctx.logger.warn("user:", { did: agent.assertDid, handle, displayName });
745
3445
  return { error };
746
3446
  }
747
3447
  const profileData = {
748
3448
  did: agent.assertDid,
749
3449
  handle,
750
3450
  email,
751
- emailTrusted,
752
- displayName: profile?.displayName ?? "",
753
- avatar: "BlobRef{ref,mimeType,size,original}"
754
- // profile.avatar
3451
+ emailVerified,
3452
+ displayName,
3453
+ avatar
755
3454
  // profile.createdAt
756
3455
  // profile.description
757
3456
  };
758
3457
  return { user: profileData };
759
3458
  }
3459
+ async function getProfileFromAppView(did) {
3460
+ const appViewAgent = getAppViewAgent();
3461
+ const profileResponse = await appViewAgent.app.bsky.actor.getProfile({
3462
+ actor: did
3463
+ }).catch(errorLogger);
3464
+ const profileRecord = profileResponse?.data;
3465
+ let profile = null;
3466
+ if (profileRecord) {
3467
+ if (!profileRecord.$type) {
3468
+ profileRecord.$type = "app.bsky.actor.defs#profileViewDetailed";
3469
+ }
3470
+ if (isProfileViewDetailed(profileRecord)) {
3471
+ const validateResult = validateProfileViewDetailed(profileRecord);
3472
+ if (validateResult.success) {
3473
+ profile = profileRecord;
3474
+ } else {
3475
+ console.error("[getSessionUser] Error: Unable to validate profileRecord!");
3476
+ }
3477
+ }
3478
+ }
3479
+ return profile;
3480
+ }
760
3481
 
761
3482
  // src/middleware.ts
762
3483
  var handler = (fn) => async (req, res, next) => {