@atproto/bsky 0.0.11 → 0.0.12

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.
Files changed (155) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/api/com/atproto/admin/util.d.ts +5 -0
  3. package/dist/context.d.ts +6 -1
  4. package/dist/db/index.js +51 -2
  5. package/dist/db/index.js.map +3 -3
  6. package/dist/db/migrations/20230929T192920807Z-record-cursor-indexes.d.ts +3 -0
  7. package/dist/db/migrations/index.d.ts +1 -0
  8. package/dist/did-cache.d.ts +2 -2
  9. package/dist/index.d.ts +2 -0
  10. package/dist/index.js +1381 -530
  11. package/dist/index.js.map +3 -3
  12. package/dist/lexicon/index.d.ts +8 -0
  13. package/dist/lexicon/lexicons.d.ts +231 -3
  14. package/dist/lexicon/types/app/bsky/actor/defs.d.ts +1 -0
  15. package/dist/lexicon/types/com/atproto/admin/defs.d.ts +28 -0
  16. package/dist/lexicon/types/com/atproto/admin/getAccountInfo.d.ts +29 -0
  17. package/dist/lexicon/types/com/atproto/admin/getSubjectStatus.d.ts +39 -0
  18. package/dist/lexicon/types/com/atproto/admin/searchRepos.d.ts +0 -1
  19. package/dist/lexicon/types/com/atproto/admin/updateSubjectStatus.d.ts +46 -0
  20. package/dist/lexicon/types/com/atproto/server/createAccount.d.ts +2 -0
  21. package/dist/lexicon/types/com/atproto/server/createSession.d.ts +1 -0
  22. package/dist/lexicon/types/com/atproto/server/refreshSession.d.ts +1 -0
  23. package/dist/lexicon/types/com/atproto/server/reserveSigningKey.d.ts +30 -0
  24. package/dist/lexicon/types/com/atproto/sync/listRepos.d.ts +1 -0
  25. package/dist/services/actor/types.d.ts +1 -0
  26. package/dist/services/graph/index.d.ts +2 -0
  27. package/dist/services/moderation/index.d.ts +13 -3
  28. package/package.json +13 -14
  29. package/src/api/app/bsky/feed/getAuthorFeed.ts +2 -2
  30. package/src/api/app/bsky/feed/getPostThread.ts +2 -2
  31. package/src/api/app/bsky/notification/listNotifications.ts +33 -22
  32. package/src/api/com/atproto/admin/getModerationAction.ts +28 -2
  33. package/src/api/com/atproto/admin/getModerationReport.ts +27 -2
  34. package/src/api/com/atproto/admin/getRecord.ts +14 -2
  35. package/src/api/com/atproto/admin/getRepo.ts +13 -2
  36. package/src/api/com/atproto/admin/reverseModerationAction.ts +31 -5
  37. package/src/api/com/atproto/admin/searchRepos.ts +2 -5
  38. package/src/api/com/atproto/admin/takeModerationAction.ts +41 -7
  39. package/src/api/com/atproto/admin/util.ts +50 -0
  40. package/src/api/well-known.ts +8 -0
  41. package/src/auth.ts +12 -5
  42. package/src/auto-moderator/index.ts +1 -0
  43. package/src/context.ts +25 -1
  44. package/src/db/migrations/20230929T192920807Z-record-cursor-indexes.ts +40 -0
  45. package/src/db/migrations/index.ts +1 -0
  46. package/src/did-cache.ts +29 -14
  47. package/src/feed-gen/with-friends.ts +2 -2
  48. package/src/index.ts +4 -1
  49. package/src/indexer/subscription.ts +1 -21
  50. package/src/lexicon/index.ts +48 -0
  51. package/src/lexicon/lexicons.ts +246 -4
  52. package/src/lexicon/types/app/bsky/actor/defs.ts +1 -0
  53. package/src/lexicon/types/com/atproto/admin/defs.ts +61 -0
  54. package/src/lexicon/types/com/atproto/admin/getAccountInfo.ts +41 -0
  55. package/src/lexicon/types/com/atproto/admin/getSubjectStatus.ts +54 -0
  56. package/src/lexicon/types/com/atproto/admin/searchRepos.ts +0 -1
  57. package/src/lexicon/types/com/atproto/admin/updateSubjectStatus.ts +61 -0
  58. package/src/lexicon/types/com/atproto/server/createAccount.ts +2 -0
  59. package/src/lexicon/types/com/atproto/server/createSession.ts +1 -0
  60. package/src/lexicon/types/com/atproto/server/refreshSession.ts +1 -0
  61. package/src/lexicon/types/com/atproto/server/reserveSigningKey.ts +44 -0
  62. package/src/lexicon/types/com/atproto/sync/listRepos.ts +1 -0
  63. package/src/logger.ts +8 -0
  64. package/src/services/actor/index.ts +7 -1
  65. package/src/services/actor/types.ts +1 -0
  66. package/src/services/actor/views.ts +26 -8
  67. package/src/services/graph/index.ts +26 -7
  68. package/src/services/indexing/index.ts +15 -17
  69. package/src/services/moderation/index.ts +94 -14
  70. package/src/services/moderation/views.ts +1 -0
  71. package/tests/__snapshots__/feed-generation.test.ts.snap +12 -12
  72. package/tests/__snapshots__/indexing.test.ts.snap +4 -4
  73. package/tests/admin/__snapshots__/get-moderation-action.test.ts.snap +172 -0
  74. package/tests/admin/__snapshots__/get-moderation-actions.test.ts.snap +178 -0
  75. package/tests/admin/__snapshots__/get-moderation-report.test.ts.snap +177 -0
  76. package/tests/admin/__snapshots__/get-moderation-reports.test.ts.snap +307 -0
  77. package/tests/admin/__snapshots__/get-record.test.ts.snap +275 -0
  78. package/tests/admin/__snapshots__/get-repo.test.ts.snap +103 -0
  79. package/tests/admin/get-moderation-action.test.ts +100 -0
  80. package/tests/admin/get-moderation-actions.test.ts +164 -0
  81. package/tests/admin/get-moderation-report.test.ts +100 -0
  82. package/tests/admin/get-moderation-reports.test.ts +332 -0
  83. package/tests/admin/get-record.test.ts +115 -0
  84. package/tests/admin/get-repo.test.ts +101 -0
  85. package/tests/{moderation.test.ts → admin/moderation.test.ts} +107 -9
  86. package/tests/admin/repo-search.test.ts +124 -0
  87. package/tests/algos/hot-classic.test.ts +3 -5
  88. package/tests/algos/whats-hot.test.ts +3 -5
  89. package/tests/algos/with-friends.test.ts +2 -4
  90. package/tests/auth.test.ts +64 -0
  91. package/tests/auto-moderator/fuzzy-matcher.test.ts +2 -3
  92. package/tests/auto-moderator/labeler.test.ts +5 -7
  93. package/tests/auto-moderator/takedowns.test.ts +11 -12
  94. package/tests/blob-resolver.test.ts +1 -3
  95. package/tests/did-cache.test.ts +2 -5
  96. package/tests/feed-generation.test.ts +8 -6
  97. package/tests/handle-invalidation.test.ts +2 -3
  98. package/tests/image/server.test.ts +1 -4
  99. package/tests/image/sharp.test.ts +1 -1
  100. package/tests/indexing.test.ts +4 -4
  101. package/tests/notification-server.test.ts +2 -3
  102. package/tests/pipeline/backpressure.test.ts +2 -3
  103. package/tests/pipeline/reingest.test.ts +7 -4
  104. package/tests/pipeline/repartition.test.ts +2 -3
  105. package/tests/reprocessing.test.ts +2 -6
  106. package/tests/seeds/basic.ts +4 -4
  107. package/tests/seeds/follows.ts +1 -1
  108. package/tests/seeds/likes.ts +1 -1
  109. package/tests/seeds/reposts.ts +1 -1
  110. package/tests/seeds/users-bulk.ts +1 -1
  111. package/tests/seeds/users.ts +1 -1
  112. package/tests/server.test.ts +1 -3
  113. package/tests/subscription/repo.test.ts +2 -4
  114. package/tests/views/__snapshots__/author-feed.test.ts.snap +24 -24
  115. package/tests/views/__snapshots__/block-lists.test.ts.snap +42 -7
  116. package/tests/views/__snapshots__/blocks.test.ts.snap +2 -2
  117. package/tests/views/__snapshots__/list-feed.test.ts.snap +6 -6
  118. package/tests/views/__snapshots__/mute-lists.test.ts.snap +15 -4
  119. package/tests/views/__snapshots__/mutes.test.ts.snap +2 -2
  120. package/tests/views/__snapshots__/notifications.test.ts.snap +2 -2
  121. package/tests/views/__snapshots__/posts.test.ts.snap +8 -8
  122. package/tests/views/__snapshots__/thread.test.ts.snap +10 -10
  123. package/tests/views/__snapshots__/timeline.test.ts.snap +58 -58
  124. package/tests/views/actor-likes.test.ts +2 -3
  125. package/tests/views/actor-search.test.ts +5 -5
  126. package/tests/views/admin/repo-search.test.ts +2 -4
  127. package/tests/views/author-feed.test.ts +2 -4
  128. package/tests/views/block-lists.test.ts +34 -7
  129. package/tests/views/blocks.test.ts +6 -3
  130. package/tests/views/follows.test.ts +2 -4
  131. package/tests/views/likes.test.ts +2 -5
  132. package/tests/views/list-feed.test.ts +2 -4
  133. package/tests/views/mute-lists.test.ts +23 -5
  134. package/tests/views/mutes.test.ts +2 -5
  135. package/tests/views/notifications.test.ts +2 -4
  136. package/tests/views/posts.test.ts +2 -5
  137. package/tests/views/profile.test.ts +4 -5
  138. package/tests/views/reposts.test.ts +2 -4
  139. package/tests/views/suggested-follows.test.ts +2 -3
  140. package/tests/views/suggestions.test.ts +2 -4
  141. package/tests/views/thread.test.ts +2 -4
  142. package/tests/views/threadgating.test.ts +2 -3
  143. package/tests/views/timeline.test.ts +2 -4
  144. package/dist/env.d.ts +0 -1
  145. package/example.dev.env +0 -5
  146. package/src/env.ts +0 -9
  147. package/tests/seeds/client.ts +0 -466
  148. /package/tests/{__snapshots__ → admin/__snapshots__}/moderation.test.ts.snap +0 -0
  149. /package/tests/{image/fixtures → sample-img}/at.png +0 -0
  150. /package/tests/{image/fixtures → sample-img}/hd-key.jpg +0 -0
  151. /package/tests/{image/fixtures → sample-img}/key-alt.jpg +0 -0
  152. /package/tests/{image/fixtures → sample-img}/key-landscape-large.jpg +0 -0
  153. /package/tests/{image/fixtures → sample-img}/key-landscape-small.jpg +0 -0
  154. /package/tests/{image/fixtures → sample-img}/key-portrait-large.jpg +0 -0
  155. /package/tests/{image/fixtures → sample-img}/key-portrait-small.jpg +0 -0
@@ -8,6 +8,18 @@ export const schemaDict = {
8
8
  lexicon: 1,
9
9
  id: 'com.atproto.admin.defs',
10
10
  defs: {
11
+ statusAttr: {
12
+ type: 'object',
13
+ required: ['applied'],
14
+ properties: {
15
+ applied: {
16
+ type: 'boolean',
17
+ },
18
+ ref: {
19
+ type: 'string',
20
+ },
21
+ },
22
+ },
11
23
  actionView: {
12
24
  type: 'object',
13
25
  required: [
@@ -424,6 +436,44 @@ export const schemaDict = {
424
436
  },
425
437
  },
426
438
  },
439
+ accountView: {
440
+ type: 'object',
441
+ required: ['did', 'handle', 'indexedAt'],
442
+ properties: {
443
+ did: {
444
+ type: 'string',
445
+ format: 'did',
446
+ },
447
+ handle: {
448
+ type: 'string',
449
+ format: 'handle',
450
+ },
451
+ email: {
452
+ type: 'string',
453
+ },
454
+ indexedAt: {
455
+ type: 'string',
456
+ format: 'datetime',
457
+ },
458
+ invitedBy: {
459
+ type: 'ref',
460
+ ref: 'lex:com.atproto.server.defs#inviteCode',
461
+ },
462
+ invites: {
463
+ type: 'array',
464
+ items: {
465
+ type: 'ref',
466
+ ref: 'lex:com.atproto.server.defs#inviteCode',
467
+ },
468
+ },
469
+ invitesDisabled: {
470
+ type: 'boolean',
471
+ },
472
+ inviteNote: {
473
+ type: 'string',
474
+ },
475
+ },
476
+ },
427
477
  repoViewNotFound: {
428
478
  type: 'object',
429
479
  required: ['did'],
@@ -444,6 +494,24 @@ export const schemaDict = {
444
494
  },
445
495
  },
446
496
  },
497
+ repoBlobRef: {
498
+ type: 'object',
499
+ required: ['did', 'cid'],
500
+ properties: {
501
+ did: {
502
+ type: 'string',
503
+ format: 'did',
504
+ },
505
+ cid: {
506
+ type: 'string',
507
+ format: 'cid',
508
+ },
509
+ recordUri: {
510
+ type: 'string',
511
+ format: 'at-uri',
512
+ },
513
+ },
514
+ },
447
515
  recordView: {
448
516
  type: 'object',
449
517
  required: [
@@ -730,6 +798,33 @@ export const schemaDict = {
730
798
  },
731
799
  },
732
800
  },
801
+ ComAtprotoAdminGetAccountInfo: {
802
+ lexicon: 1,
803
+ id: 'com.atproto.admin.getAccountInfo',
804
+ defs: {
805
+ main: {
806
+ type: 'query',
807
+ description: 'View details about an account.',
808
+ parameters: {
809
+ type: 'params',
810
+ required: ['did'],
811
+ properties: {
812
+ did: {
813
+ type: 'string',
814
+ format: 'did',
815
+ },
816
+ },
817
+ },
818
+ output: {
819
+ encoding: 'application/json',
820
+ schema: {
821
+ type: 'ref',
822
+ ref: 'lex:com.atproto.admin.defs#accountView',
823
+ },
824
+ },
825
+ },
826
+ },
827
+ },
733
828
  ComAtprotoAdminGetInviteCodes: {
734
829
  lexicon: 1,
735
830
  id: 'com.atproto.admin.getInviteCodes',
@@ -1026,6 +1121,55 @@ export const schemaDict = {
1026
1121
  },
1027
1122
  },
1028
1123
  },
1124
+ ComAtprotoAdminGetSubjectStatus: {
1125
+ lexicon: 1,
1126
+ id: 'com.atproto.admin.getSubjectStatus',
1127
+ defs: {
1128
+ main: {
1129
+ type: 'query',
1130
+ description:
1131
+ 'Fetch the service-specific the admin status of a subject (account, record, or blob)',
1132
+ parameters: {
1133
+ type: 'params',
1134
+ properties: {
1135
+ did: {
1136
+ type: 'string',
1137
+ format: 'did',
1138
+ },
1139
+ uri: {
1140
+ type: 'string',
1141
+ format: 'at-uri',
1142
+ },
1143
+ blob: {
1144
+ type: 'string',
1145
+ format: 'cid',
1146
+ },
1147
+ },
1148
+ },
1149
+ output: {
1150
+ encoding: 'application/json',
1151
+ schema: {
1152
+ type: 'object',
1153
+ required: ['subject'],
1154
+ properties: {
1155
+ subject: {
1156
+ type: 'union',
1157
+ refs: [
1158
+ 'lex:com.atproto.admin.defs#repoRef',
1159
+ 'lex:com.atproto.repo.strongRef',
1160
+ 'lex:com.atproto.admin.defs#repoBlobRef',
1161
+ ],
1162
+ },
1163
+ takedown: {
1164
+ type: 'ref',
1165
+ ref: 'lex:com.atproto.admin.defs#statusAttr',
1166
+ },
1167
+ },
1168
+ },
1169
+ },
1170
+ },
1171
+ },
1172
+ },
1029
1173
  ComAtprotoAdminResolveModerationReports: {
1030
1174
  lexicon: 1,
1031
1175
  id: 'com.atproto.admin.resolveModerationReports',
@@ -1118,9 +1262,6 @@ export const schemaDict = {
1118
1262
  q: {
1119
1263
  type: 'string',
1120
1264
  },
1121
- invitedBy: {
1122
- type: 'string',
1123
- },
1124
1265
  limit: {
1125
1266
  type: 'integer',
1126
1267
  minimum: 1,
@@ -1326,6 +1467,59 @@ export const schemaDict = {
1326
1467
  },
1327
1468
  },
1328
1469
  },
1470
+ ComAtprotoAdminUpdateSubjectStatus: {
1471
+ lexicon: 1,
1472
+ id: 'com.atproto.admin.updateSubjectStatus',
1473
+ defs: {
1474
+ main: {
1475
+ type: 'procedure',
1476
+ description:
1477
+ 'Update the service-specific admin status of a subject (account, record, or blob)',
1478
+ input: {
1479
+ encoding: 'application/json',
1480
+ schema: {
1481
+ type: 'object',
1482
+ required: ['subject'],
1483
+ properties: {
1484
+ subject: {
1485
+ type: 'union',
1486
+ refs: [
1487
+ 'lex:com.atproto.admin.defs#repoRef',
1488
+ 'lex:com.atproto.repo.strongRef',
1489
+ 'lex:com.atproto.admin.defs#repoBlobRef',
1490
+ ],
1491
+ },
1492
+ takedown: {
1493
+ type: 'ref',
1494
+ ref: 'lex:com.atproto.admin.defs#statusAttr',
1495
+ },
1496
+ },
1497
+ },
1498
+ },
1499
+ output: {
1500
+ encoding: 'application/json',
1501
+ schema: {
1502
+ type: 'object',
1503
+ required: ['subject'],
1504
+ properties: {
1505
+ subject: {
1506
+ type: 'union',
1507
+ refs: [
1508
+ 'lex:com.atproto.admin.defs#repoRef',
1509
+ 'lex:com.atproto.repo.strongRef',
1510
+ 'lex:com.atproto.admin.defs#repoBlobRef',
1511
+ ],
1512
+ },
1513
+ takedown: {
1514
+ type: 'ref',
1515
+ ref: 'lex:com.atproto.admin.defs#statusAttr',
1516
+ },
1517
+ },
1518
+ },
1519
+ },
1520
+ },
1521
+ },
1522
+ },
1329
1523
  ComAtprotoIdentityResolveHandle: {
1330
1524
  lexicon: 1,
1331
1525
  id: 'com.atproto.identity.resolveHandle',
@@ -1632,6 +1826,8 @@ export const schemaDict = {
1632
1826
  },
1633
1827
  reason: {
1634
1828
  type: 'string',
1829
+ maxGraphemes: 2000,
1830
+ maxLength: 20000,
1635
1831
  },
1636
1832
  subject: {
1637
1833
  type: 'union',
@@ -2315,6 +2511,9 @@ export const schemaDict = {
2315
2511
  recoveryKey: {
2316
2512
  type: 'string',
2317
2513
  },
2514
+ plcOp: {
2515
+ type: 'bytes',
2516
+ },
2318
2517
  },
2319
2518
  },
2320
2519
  },
@@ -2338,6 +2537,9 @@ export const schemaDict = {
2338
2537
  type: 'string',
2339
2538
  format: 'did',
2340
2539
  },
2540
+ didDoc: {
2541
+ type: 'unknown',
2542
+ },
2341
2543
  },
2342
2544
  },
2343
2545
  },
@@ -2563,6 +2765,9 @@ export const schemaDict = {
2563
2765
  type: 'string',
2564
2766
  format: 'did',
2565
2767
  },
2768
+ didDoc: {
2769
+ type: 'unknown',
2770
+ },
2566
2771
  email: {
2567
2772
  type: 'string',
2568
2773
  },
@@ -2879,6 +3084,9 @@ export const schemaDict = {
2879
3084
  type: 'string',
2880
3085
  format: 'did',
2881
3086
  },
3087
+ didDoc: {
3088
+ type: 'unknown',
3089
+ },
2882
3090
  },
2883
3091
  },
2884
3092
  },
@@ -2955,6 +3163,29 @@ export const schemaDict = {
2955
3163
  },
2956
3164
  },
2957
3165
  },
3166
+ ComAtprotoServerReserveSigningKey: {
3167
+ lexicon: 1,
3168
+ id: 'com.atproto.server.reserveSigningKey',
3169
+ defs: {
3170
+ main: {
3171
+ type: 'procedure',
3172
+ description: 'Reserve a repo signing key for account creation.',
3173
+ output: {
3174
+ encoding: 'application/json',
3175
+ schema: {
3176
+ type: 'object',
3177
+ required: ['signingKey'],
3178
+ properties: {
3179
+ signingKey: {
3180
+ type: 'string',
3181
+ description: 'Public signing key in the form of a did:key.',
3182
+ },
3183
+ },
3184
+ },
3185
+ },
3186
+ },
3187
+ },
3188
+ },
2958
3189
  ComAtprotoServerResetPassword: {
2959
3190
  lexicon: 1,
2960
3191
  id: 'com.atproto.server.resetPassword',
@@ -3376,7 +3607,7 @@ export const schemaDict = {
3376
3607
  },
3377
3608
  repo: {
3378
3609
  type: 'object',
3379
- required: ['did', 'head'],
3610
+ required: ['did', 'head', 'rev'],
3380
3611
  properties: {
3381
3612
  did: {
3382
3613
  type: 'string',
@@ -3386,6 +3617,9 @@ export const schemaDict = {
3386
3617
  type: 'string',
3387
3618
  format: 'cid',
3388
3619
  },
3620
+ rev: {
3621
+ type: 'string',
3622
+ },
3389
3623
  },
3390
3624
  },
3391
3625
  },
@@ -3789,6 +4023,10 @@ export const schemaDict = {
3789
4023
  type: 'string',
3790
4024
  format: 'at-uri',
3791
4025
  },
4026
+ blockingByList: {
4027
+ type: 'ref',
4028
+ ref: 'lex:app.bsky.graph.defs#listViewBasic',
4029
+ },
3792
4030
  following: {
3793
4031
  type: 'string',
3794
4032
  format: 'at-uri',
@@ -7325,6 +7563,7 @@ export const ids = {
7325
7563
  'com.atproto.admin.disableAccountInvites',
7326
7564
  ComAtprotoAdminDisableInviteCodes: 'com.atproto.admin.disableInviteCodes',
7327
7565
  ComAtprotoAdminEnableAccountInvites: 'com.atproto.admin.enableAccountInvites',
7566
+ ComAtprotoAdminGetAccountInfo: 'com.atproto.admin.getAccountInfo',
7328
7567
  ComAtprotoAdminGetInviteCodes: 'com.atproto.admin.getInviteCodes',
7329
7568
  ComAtprotoAdminGetModerationAction: 'com.atproto.admin.getModerationAction',
7330
7569
  ComAtprotoAdminGetModerationActions: 'com.atproto.admin.getModerationActions',
@@ -7332,6 +7571,7 @@ export const ids = {
7332
7571
  ComAtprotoAdminGetModerationReports: 'com.atproto.admin.getModerationReports',
7333
7572
  ComAtprotoAdminGetRecord: 'com.atproto.admin.getRecord',
7334
7573
  ComAtprotoAdminGetRepo: 'com.atproto.admin.getRepo',
7574
+ ComAtprotoAdminGetSubjectStatus: 'com.atproto.admin.getSubjectStatus',
7335
7575
  ComAtprotoAdminResolveModerationReports:
7336
7576
  'com.atproto.admin.resolveModerationReports',
7337
7577
  ComAtprotoAdminReverseModerationAction:
@@ -7341,6 +7581,7 @@ export const ids = {
7341
7581
  ComAtprotoAdminTakeModerationAction: 'com.atproto.admin.takeModerationAction',
7342
7582
  ComAtprotoAdminUpdateAccountEmail: 'com.atproto.admin.updateAccountEmail',
7343
7583
  ComAtprotoAdminUpdateAccountHandle: 'com.atproto.admin.updateAccountHandle',
7584
+ ComAtprotoAdminUpdateSubjectStatus: 'com.atproto.admin.updateSubjectStatus',
7344
7585
  ComAtprotoIdentityResolveHandle: 'com.atproto.identity.resolveHandle',
7345
7586
  ComAtprotoIdentityUpdateHandle: 'com.atproto.identity.updateHandle',
7346
7587
  ComAtprotoLabelDefs: 'com.atproto.label.defs',
@@ -7379,6 +7620,7 @@ export const ids = {
7379
7620
  ComAtprotoServerRequestEmailUpdate: 'com.atproto.server.requestEmailUpdate',
7380
7621
  ComAtprotoServerRequestPasswordReset:
7381
7622
  'com.atproto.server.requestPasswordReset',
7623
+ ComAtprotoServerReserveSigningKey: 'com.atproto.server.reserveSigningKey',
7382
7624
  ComAtprotoServerResetPassword: 'com.atproto.server.resetPassword',
7383
7625
  ComAtprotoServerRevokeAppPassword: 'com.atproto.server.revokeAppPassword',
7384
7626
  ComAtprotoServerUpdateEmail: 'com.atproto.server.updateEmail',
@@ -87,6 +87,7 @@ export interface ViewerState {
87
87
  mutedByList?: AppBskyGraphDefs.ListViewBasic
88
88
  blockedBy?: boolean
89
89
  blocking?: string
90
+ blockingByList?: AppBskyGraphDefs.ListViewBasic
90
91
  following?: string
91
92
  followedBy?: string
92
93
  [k: string]: unknown
@@ -10,6 +10,24 @@ import * as ComAtprotoModerationDefs from '../moderation/defs'
10
10
  import * as ComAtprotoServerDefs from '../server/defs'
11
11
  import * as ComAtprotoLabelDefs from '../label/defs'
12
12
 
13
+ export interface StatusAttr {
14
+ applied: boolean
15
+ ref?: string
16
+ [k: string]: unknown
17
+ }
18
+
19
+ export function isStatusAttr(v: unknown): v is StatusAttr {
20
+ return (
21
+ isObj(v) &&
22
+ hasProp(v, '$type') &&
23
+ v.$type === 'com.atproto.admin.defs#statusAttr'
24
+ )
25
+ }
26
+
27
+ export function validateStatusAttr(v: unknown): ValidationResult {
28
+ return lexicons.validate('com.atproto.admin.defs#statusAttr', v)
29
+ }
30
+
13
31
  export interface ActionView {
14
32
  id: number
15
33
  action: ActionType
@@ -238,6 +256,30 @@ export function validateRepoViewDetail(v: unknown): ValidationResult {
238
256
  return lexicons.validate('com.atproto.admin.defs#repoViewDetail', v)
239
257
  }
240
258
 
259
+ export interface AccountView {
260
+ did: string
261
+ handle: string
262
+ email?: string
263
+ indexedAt: string
264
+ invitedBy?: ComAtprotoServerDefs.InviteCode
265
+ invites?: ComAtprotoServerDefs.InviteCode[]
266
+ invitesDisabled?: boolean
267
+ inviteNote?: string
268
+ [k: string]: unknown
269
+ }
270
+
271
+ export function isAccountView(v: unknown): v is AccountView {
272
+ return (
273
+ isObj(v) &&
274
+ hasProp(v, '$type') &&
275
+ v.$type === 'com.atproto.admin.defs#accountView'
276
+ )
277
+ }
278
+
279
+ export function validateAccountView(v: unknown): ValidationResult {
280
+ return lexicons.validate('com.atproto.admin.defs#accountView', v)
281
+ }
282
+
241
283
  export interface RepoViewNotFound {
242
284
  did: string
243
285
  [k: string]: unknown
@@ -272,6 +314,25 @@ export function validateRepoRef(v: unknown): ValidationResult {
272
314
  return lexicons.validate('com.atproto.admin.defs#repoRef', v)
273
315
  }
274
316
 
317
+ export interface RepoBlobRef {
318
+ did: string
319
+ cid: string
320
+ recordUri?: string
321
+ [k: string]: unknown
322
+ }
323
+
324
+ export function isRepoBlobRef(v: unknown): v is RepoBlobRef {
325
+ return (
326
+ isObj(v) &&
327
+ hasProp(v, '$type') &&
328
+ v.$type === 'com.atproto.admin.defs#repoBlobRef'
329
+ )
330
+ }
331
+
332
+ export function validateRepoBlobRef(v: unknown): ValidationResult {
333
+ return lexicons.validate('com.atproto.admin.defs#repoBlobRef', v)
334
+ }
335
+
275
336
  export interface RecordView {
276
337
  uri: string
277
338
  cid: string
@@ -0,0 +1,41 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import express from 'express'
5
+ import { ValidationResult, BlobRef } from '@atproto/lexicon'
6
+ import { lexicons } from '../../../../lexicons'
7
+ import { isObj, hasProp } from '../../../../util'
8
+ import { CID } from 'multiformats/cid'
9
+ import { HandlerAuth } from '@atproto/xrpc-server'
10
+ import * as ComAtprotoAdminDefs from './defs'
11
+
12
+ export interface QueryParams {
13
+ did: string
14
+ }
15
+
16
+ export type InputSchema = undefined
17
+ export type OutputSchema = ComAtprotoAdminDefs.AccountView
18
+ export type HandlerInput = undefined
19
+
20
+ export interface HandlerSuccess {
21
+ encoding: 'application/json'
22
+ body: OutputSchema
23
+ headers?: { [key: string]: string }
24
+ }
25
+
26
+ export interface HandlerError {
27
+ status: number
28
+ message?: string
29
+ }
30
+
31
+ export type HandlerOutput = HandlerError | HandlerSuccess
32
+ export type HandlerReqCtx<HA extends HandlerAuth = never> = {
33
+ auth: HA
34
+ params: QueryParams
35
+ input: HandlerInput
36
+ req: express.Request
37
+ res: express.Response
38
+ }
39
+ export type Handler<HA extends HandlerAuth = never> = (
40
+ ctx: HandlerReqCtx<HA>,
41
+ ) => Promise<HandlerOutput> | HandlerOutput
@@ -0,0 +1,54 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import express from 'express'
5
+ import { ValidationResult, BlobRef } from '@atproto/lexicon'
6
+ import { lexicons } from '../../../../lexicons'
7
+ import { isObj, hasProp } from '../../../../util'
8
+ import { CID } from 'multiformats/cid'
9
+ import { HandlerAuth } from '@atproto/xrpc-server'
10
+ import * as ComAtprotoAdminDefs from './defs'
11
+ import * as ComAtprotoRepoStrongRef from '../repo/strongRef'
12
+
13
+ export interface QueryParams {
14
+ did?: string
15
+ uri?: string
16
+ blob?: string
17
+ }
18
+
19
+ export type InputSchema = undefined
20
+
21
+ export interface OutputSchema {
22
+ subject:
23
+ | ComAtprotoAdminDefs.RepoRef
24
+ | ComAtprotoRepoStrongRef.Main
25
+ | ComAtprotoAdminDefs.RepoBlobRef
26
+ | { $type: string; [k: string]: unknown }
27
+ takedown?: ComAtprotoAdminDefs.StatusAttr
28
+ [k: string]: unknown
29
+ }
30
+
31
+ export type HandlerInput = undefined
32
+
33
+ export interface HandlerSuccess {
34
+ encoding: 'application/json'
35
+ body: OutputSchema
36
+ headers?: { [key: string]: string }
37
+ }
38
+
39
+ export interface HandlerError {
40
+ status: number
41
+ message?: string
42
+ }
43
+
44
+ export type HandlerOutput = HandlerError | HandlerSuccess
45
+ export type HandlerReqCtx<HA extends HandlerAuth = never> = {
46
+ auth: HA
47
+ params: QueryParams
48
+ input: HandlerInput
49
+ req: express.Request
50
+ res: express.Response
51
+ }
52
+ export type Handler<HA extends HandlerAuth = never> = (
53
+ ctx: HandlerReqCtx<HA>,
54
+ ) => Promise<HandlerOutput> | HandlerOutput
@@ -13,7 +13,6 @@ export interface QueryParams {
13
13
  /** DEPRECATED: use 'q' instead */
14
14
  term?: string
15
15
  q?: string
16
- invitedBy?: string
17
16
  limit: number
18
17
  cursor?: string
19
18
  }
@@ -0,0 +1,61 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import express from 'express'
5
+ import { ValidationResult, BlobRef } from '@atproto/lexicon'
6
+ import { lexicons } from '../../../../lexicons'
7
+ import { isObj, hasProp } from '../../../../util'
8
+ import { CID } from 'multiformats/cid'
9
+ import { HandlerAuth } from '@atproto/xrpc-server'
10
+ import * as ComAtprotoAdminDefs from './defs'
11
+ import * as ComAtprotoRepoStrongRef from '../repo/strongRef'
12
+
13
+ export interface QueryParams {}
14
+
15
+ export interface InputSchema {
16
+ subject:
17
+ | ComAtprotoAdminDefs.RepoRef
18
+ | ComAtprotoRepoStrongRef.Main
19
+ | ComAtprotoAdminDefs.RepoBlobRef
20
+ | { $type: string; [k: string]: unknown }
21
+ takedown?: ComAtprotoAdminDefs.StatusAttr
22
+ [k: string]: unknown
23
+ }
24
+
25
+ export interface OutputSchema {
26
+ subject:
27
+ | ComAtprotoAdminDefs.RepoRef
28
+ | ComAtprotoRepoStrongRef.Main
29
+ | ComAtprotoAdminDefs.RepoBlobRef
30
+ | { $type: string; [k: string]: unknown }
31
+ takedown?: ComAtprotoAdminDefs.StatusAttr
32
+ [k: string]: unknown
33
+ }
34
+
35
+ export interface HandlerInput {
36
+ encoding: 'application/json'
37
+ body: InputSchema
38
+ }
39
+
40
+ export interface HandlerSuccess {
41
+ encoding: 'application/json'
42
+ body: OutputSchema
43
+ headers?: { [key: string]: string }
44
+ }
45
+
46
+ export interface HandlerError {
47
+ status: number
48
+ message?: string
49
+ }
50
+
51
+ export type HandlerOutput = HandlerError | HandlerSuccess
52
+ export type HandlerReqCtx<HA extends HandlerAuth = never> = {
53
+ auth: HA
54
+ params: QueryParams
55
+ input: HandlerInput
56
+ req: express.Request
57
+ res: express.Response
58
+ }
59
+ export type Handler<HA extends HandlerAuth = never> = (
60
+ ctx: HandlerReqCtx<HA>,
61
+ ) => Promise<HandlerOutput> | HandlerOutput
@@ -17,6 +17,7 @@ export interface InputSchema {
17
17
  inviteCode?: string
18
18
  password: string
19
19
  recoveryKey?: string
20
+ plcOp?: Uint8Array
20
21
  [k: string]: unknown
21
22
  }
22
23
 
@@ -25,6 +26,7 @@ export interface OutputSchema {
25
26
  refreshJwt: string
26
27
  handle: string
27
28
  did: string
29
+ didDoc?: {}
28
30
  [k: string]: unknown
29
31
  }
30
32
 
@@ -22,6 +22,7 @@ export interface OutputSchema {
22
22
  refreshJwt: string
23
23
  handle: string
24
24
  did: string
25
+ didDoc?: {}
25
26
  email?: string
26
27
  emailConfirmed?: boolean
27
28
  [k: string]: unknown
@@ -17,6 +17,7 @@ export interface OutputSchema {
17
17
  refreshJwt: string
18
18
  handle: string
19
19
  did: string
20
+ didDoc?: {}
20
21
  [k: string]: unknown
21
22
  }
22
23