@atproto/bsky 0.0.11 → 0.0.13
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/CHANGELOG.md +29 -0
- package/LICENSE.txt +7 -0
- package/README.md +6 -1
- package/dist/api/com/atproto/admin/util.d.ts +5 -0
- package/dist/context.d.ts +6 -1
- package/dist/db/index.js +51 -2
- package/dist/db/index.js.map +3 -3
- package/dist/db/migrations/20230929T192920807Z-record-cursor-indexes.d.ts +3 -0
- package/dist/db/migrations/index.d.ts +1 -0
- package/dist/did-cache.d.ts +2 -2
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1630 -755
- package/dist/index.js.map +3 -3
- package/dist/lexicon/index.d.ts +8 -0
- package/dist/lexicon/lexicons.d.ts +243 -3
- package/dist/lexicon/types/app/bsky/actor/defs.d.ts +1 -0
- package/dist/lexicon/types/com/atproto/admin/defs.d.ts +28 -0
- package/dist/lexicon/types/com/atproto/admin/getAccountInfo.d.ts +29 -0
- package/dist/lexicon/types/com/atproto/admin/getSubjectStatus.d.ts +39 -0
- package/dist/lexicon/types/com/atproto/admin/searchRepos.d.ts +0 -1
- package/dist/lexicon/types/com/atproto/admin/updateSubjectStatus.d.ts +46 -0
- package/dist/lexicon/types/com/atproto/server/createAccount.d.ts +4 -2
- package/dist/lexicon/types/com/atproto/server/createSession.d.ts +1 -0
- package/dist/lexicon/types/com/atproto/server/refreshSession.d.ts +1 -0
- package/dist/lexicon/types/com/atproto/server/reserveSigningKey.d.ts +36 -0
- package/dist/lexicon/types/com/atproto/sync/listRepos.d.ts +1 -0
- package/dist/services/actor/types.d.ts +1 -0
- package/dist/services/graph/index.d.ts +2 -0
- package/dist/services/moderation/index.d.ts +13 -3
- package/package.json +14 -15
- package/src/api/app/bsky/feed/getAuthorFeed.ts +2 -2
- package/src/api/app/bsky/feed/getPostThread.ts +2 -2
- package/src/api/app/bsky/notification/listNotifications.ts +33 -22
- package/src/api/com/atproto/admin/getModerationAction.ts +28 -2
- package/src/api/com/atproto/admin/getModerationReport.ts +27 -2
- package/src/api/com/atproto/admin/getRecord.ts +14 -2
- package/src/api/com/atproto/admin/getRepo.ts +13 -2
- package/src/api/com/atproto/admin/reverseModerationAction.ts +31 -5
- package/src/api/com/atproto/admin/searchRepos.ts +2 -5
- package/src/api/com/atproto/admin/takeModerationAction.ts +41 -7
- package/src/api/com/atproto/admin/util.ts +50 -0
- package/src/api/well-known.ts +8 -0
- package/src/auth.ts +12 -5
- package/src/auto-moderator/index.ts +1 -0
- package/src/context.ts +25 -1
- package/src/db/migrations/20230929T192920807Z-record-cursor-indexes.ts +40 -0
- package/src/db/migrations/index.ts +1 -0
- package/src/did-cache.ts +29 -14
- package/src/feed-gen/with-friends.ts +2 -2
- package/src/index.ts +4 -1
- package/src/indexer/subscription.ts +1 -21
- package/src/lexicon/index.ts +48 -0
- package/src/lexicon/lexicons.ts +259 -5
- package/src/lexicon/types/app/bsky/actor/defs.ts +1 -0
- package/src/lexicon/types/com/atproto/admin/defs.ts +61 -0
- package/src/lexicon/types/com/atproto/admin/getAccountInfo.ts +41 -0
- package/src/lexicon/types/com/atproto/admin/getSubjectStatus.ts +54 -0
- package/src/lexicon/types/com/atproto/admin/searchRepos.ts +0 -1
- package/src/lexicon/types/com/atproto/admin/updateSubjectStatus.ts +61 -0
- package/src/lexicon/types/com/atproto/server/createAccount.ts +4 -2
- package/src/lexicon/types/com/atproto/server/createSession.ts +1 -0
- package/src/lexicon/types/com/atproto/server/refreshSession.ts +1 -0
- package/src/lexicon/types/com/atproto/server/reserveSigningKey.ts +51 -0
- package/src/lexicon/types/com/atproto/sync/listRepos.ts +1 -0
- package/src/logger.ts +8 -0
- package/src/services/actor/index.ts +7 -1
- package/src/services/actor/types.ts +1 -0
- package/src/services/actor/views.ts +26 -8
- package/src/services/graph/index.ts +26 -7
- package/src/services/indexing/index.ts +15 -17
- package/src/services/moderation/index.ts +94 -14
- package/src/services/moderation/views.ts +1 -0
- package/tests/__snapshots__/feed-generation.test.ts.snap +12 -12
- package/tests/__snapshots__/indexing.test.ts.snap +4 -4
- package/tests/admin/__snapshots__/get-moderation-action.test.ts.snap +172 -0
- package/tests/admin/__snapshots__/get-moderation-actions.test.ts.snap +178 -0
- package/tests/admin/__snapshots__/get-moderation-report.test.ts.snap +177 -0
- package/tests/admin/__snapshots__/get-moderation-reports.test.ts.snap +307 -0
- package/tests/admin/__snapshots__/get-record.test.ts.snap +275 -0
- package/tests/admin/__snapshots__/get-repo.test.ts.snap +103 -0
- package/tests/admin/get-moderation-action.test.ts +100 -0
- package/tests/admin/get-moderation-actions.test.ts +164 -0
- package/tests/admin/get-moderation-report.test.ts +100 -0
- package/tests/admin/get-moderation-reports.test.ts +332 -0
- package/tests/admin/get-record.test.ts +115 -0
- package/tests/admin/get-repo.test.ts +101 -0
- package/tests/{moderation.test.ts → admin/moderation.test.ts} +107 -9
- package/tests/admin/repo-search.test.ts +124 -0
- package/tests/algos/hot-classic.test.ts +3 -5
- package/tests/algos/whats-hot.test.ts +3 -5
- package/tests/algos/with-friends.test.ts +2 -4
- package/tests/auth.test.ts +64 -0
- package/tests/auto-moderator/fuzzy-matcher.test.ts +2 -3
- package/tests/auto-moderator/labeler.test.ts +5 -7
- package/tests/auto-moderator/takedowns.test.ts +11 -12
- package/tests/blob-resolver.test.ts +1 -3
- package/tests/did-cache.test.ts +2 -5
- package/tests/feed-generation.test.ts +8 -6
- package/tests/handle-invalidation.test.ts +2 -3
- package/tests/image/server.test.ts +1 -4
- package/tests/image/sharp.test.ts +1 -1
- package/tests/indexing.test.ts +4 -4
- package/tests/notification-server.test.ts +2 -3
- package/tests/pipeline/backpressure.test.ts +2 -3
- package/tests/pipeline/reingest.test.ts +7 -4
- package/tests/pipeline/repartition.test.ts +2 -3
- package/tests/reprocessing.test.ts +2 -6
- package/tests/seeds/basic.ts +4 -4
- package/tests/seeds/follows.ts +1 -1
- package/tests/seeds/likes.ts +1 -1
- package/tests/seeds/reposts.ts +1 -1
- package/tests/seeds/users-bulk.ts +1 -1
- package/tests/seeds/users.ts +1 -1
- package/tests/server.test.ts +1 -3
- package/tests/subscription/repo.test.ts +2 -4
- package/tests/views/__snapshots__/author-feed.test.ts.snap +24 -24
- package/tests/views/__snapshots__/block-lists.test.ts.snap +42 -7
- package/tests/views/__snapshots__/blocks.test.ts.snap +2 -2
- package/tests/views/__snapshots__/list-feed.test.ts.snap +6 -6
- package/tests/views/__snapshots__/mute-lists.test.ts.snap +15 -4
- package/tests/views/__snapshots__/mutes.test.ts.snap +2 -2
- package/tests/views/__snapshots__/notifications.test.ts.snap +2 -2
- package/tests/views/__snapshots__/posts.test.ts.snap +8 -8
- package/tests/views/__snapshots__/thread.test.ts.snap +10 -10
- package/tests/views/__snapshots__/timeline.test.ts.snap +58 -58
- package/tests/views/actor-likes.test.ts +2 -3
- package/tests/views/actor-search.test.ts +5 -5
- package/tests/views/admin/repo-search.test.ts +2 -4
- package/tests/views/author-feed.test.ts +2 -4
- package/tests/views/block-lists.test.ts +34 -7
- package/tests/views/blocks.test.ts +6 -3
- package/tests/views/follows.test.ts +2 -4
- package/tests/views/likes.test.ts +2 -5
- package/tests/views/list-feed.test.ts +2 -4
- package/tests/views/mute-lists.test.ts +23 -5
- package/tests/views/mutes.test.ts +2 -5
- package/tests/views/notifications.test.ts +2 -4
- package/tests/views/posts.test.ts +2 -5
- package/tests/views/profile.test.ts +4 -5
- package/tests/views/reposts.test.ts +2 -4
- package/tests/views/suggested-follows.test.ts +2 -3
- package/tests/views/suggestions.test.ts +2 -4
- package/tests/views/thread.test.ts +2 -4
- package/tests/views/threadgating.test.ts +2 -3
- package/tests/views/timeline.test.ts +2 -4
- package/LICENSE +0 -21
- package/dist/env.d.ts +0 -1
- package/example.dev.env +0 -5
- package/src/env.ts +0 -9
- package/tests/seeds/client.ts +0 -466
- /package/tests/{__snapshots__ → admin/__snapshots__}/moderation.test.ts.snap +0 -0
- /package/tests/{image/fixtures → sample-img}/at.png +0 -0
- /package/tests/{image/fixtures → sample-img}/hd-key.jpg +0 -0
- /package/tests/{image/fixtures → sample-img}/key-alt.jpg +0 -0
- /package/tests/{image/fixtures → sample-img}/key-landscape-large.jpg +0 -0
- /package/tests/{image/fixtures → sample-img}/key-landscape-small.jpg +0 -0
- /package/tests/{image/fixtures → sample-img}/key-portrait-large.jpg +0 -0
- /package/tests/{image/fixtures → sample-img}/key-portrait-small.jpg +0 -0
package/src/lexicon/lexicons.ts
CHANGED
|
@@ -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',
|
|
@@ -2293,7 +2489,7 @@ export const schemaDict = {
|
|
|
2293
2489
|
encoding: 'application/json',
|
|
2294
2490
|
schema: {
|
|
2295
2491
|
type: 'object',
|
|
2296
|
-
required: ['handle'
|
|
2492
|
+
required: ['handle'],
|
|
2297
2493
|
properties: {
|
|
2298
2494
|
email: {
|
|
2299
2495
|
type: 'string',
|
|
@@ -2315,6 +2511,9 @@ export const schemaDict = {
|
|
|
2315
2511
|
recoveryKey: {
|
|
2316
2512
|
type: 'string',
|
|
2317
2513
|
},
|
|
2514
|
+
plcOp: {
|
|
2515
|
+
type: 'unknown',
|
|
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,41 @@ 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
|
+
input: {
|
|
3174
|
+
encoding: 'application/json',
|
|
3175
|
+
schema: {
|
|
3176
|
+
type: 'object',
|
|
3177
|
+
properties: {
|
|
3178
|
+
did: {
|
|
3179
|
+
type: 'string',
|
|
3180
|
+
description: 'The did to reserve a new did:key for',
|
|
3181
|
+
},
|
|
3182
|
+
},
|
|
3183
|
+
},
|
|
3184
|
+
},
|
|
3185
|
+
output: {
|
|
3186
|
+
encoding: 'application/json',
|
|
3187
|
+
schema: {
|
|
3188
|
+
type: 'object',
|
|
3189
|
+
required: ['signingKey'],
|
|
3190
|
+
properties: {
|
|
3191
|
+
signingKey: {
|
|
3192
|
+
type: 'string',
|
|
3193
|
+
description: 'Public signing key in the form of a did:key.',
|
|
3194
|
+
},
|
|
3195
|
+
},
|
|
3196
|
+
},
|
|
3197
|
+
},
|
|
3198
|
+
},
|
|
3199
|
+
},
|
|
3200
|
+
},
|
|
2958
3201
|
ComAtprotoServerResetPassword: {
|
|
2959
3202
|
lexicon: 1,
|
|
2960
3203
|
id: 'com.atproto.server.resetPassword',
|
|
@@ -3376,7 +3619,7 @@ export const schemaDict = {
|
|
|
3376
3619
|
},
|
|
3377
3620
|
repo: {
|
|
3378
3621
|
type: 'object',
|
|
3379
|
-
required: ['did', 'head'],
|
|
3622
|
+
required: ['did', 'head', 'rev'],
|
|
3380
3623
|
properties: {
|
|
3381
3624
|
did: {
|
|
3382
3625
|
type: 'string',
|
|
@@ -3386,6 +3629,9 @@ export const schemaDict = {
|
|
|
3386
3629
|
type: 'string',
|
|
3387
3630
|
format: 'cid',
|
|
3388
3631
|
},
|
|
3632
|
+
rev: {
|
|
3633
|
+
type: 'string',
|
|
3634
|
+
},
|
|
3389
3635
|
},
|
|
3390
3636
|
},
|
|
3391
3637
|
},
|
|
@@ -3789,6 +4035,10 @@ export const schemaDict = {
|
|
|
3789
4035
|
type: 'string',
|
|
3790
4036
|
format: 'at-uri',
|
|
3791
4037
|
},
|
|
4038
|
+
blockingByList: {
|
|
4039
|
+
type: 'ref',
|
|
4040
|
+
ref: 'lex:app.bsky.graph.defs#listViewBasic',
|
|
4041
|
+
},
|
|
3792
4042
|
following: {
|
|
3793
4043
|
type: 'string',
|
|
3794
4044
|
format: 'at-uri',
|
|
@@ -7325,6 +7575,7 @@ export const ids = {
|
|
|
7325
7575
|
'com.atproto.admin.disableAccountInvites',
|
|
7326
7576
|
ComAtprotoAdminDisableInviteCodes: 'com.atproto.admin.disableInviteCodes',
|
|
7327
7577
|
ComAtprotoAdminEnableAccountInvites: 'com.atproto.admin.enableAccountInvites',
|
|
7578
|
+
ComAtprotoAdminGetAccountInfo: 'com.atproto.admin.getAccountInfo',
|
|
7328
7579
|
ComAtprotoAdminGetInviteCodes: 'com.atproto.admin.getInviteCodes',
|
|
7329
7580
|
ComAtprotoAdminGetModerationAction: 'com.atproto.admin.getModerationAction',
|
|
7330
7581
|
ComAtprotoAdminGetModerationActions: 'com.atproto.admin.getModerationActions',
|
|
@@ -7332,6 +7583,7 @@ export const ids = {
|
|
|
7332
7583
|
ComAtprotoAdminGetModerationReports: 'com.atproto.admin.getModerationReports',
|
|
7333
7584
|
ComAtprotoAdminGetRecord: 'com.atproto.admin.getRecord',
|
|
7334
7585
|
ComAtprotoAdminGetRepo: 'com.atproto.admin.getRepo',
|
|
7586
|
+
ComAtprotoAdminGetSubjectStatus: 'com.atproto.admin.getSubjectStatus',
|
|
7335
7587
|
ComAtprotoAdminResolveModerationReports:
|
|
7336
7588
|
'com.atproto.admin.resolveModerationReports',
|
|
7337
7589
|
ComAtprotoAdminReverseModerationAction:
|
|
@@ -7341,6 +7593,7 @@ export const ids = {
|
|
|
7341
7593
|
ComAtprotoAdminTakeModerationAction: 'com.atproto.admin.takeModerationAction',
|
|
7342
7594
|
ComAtprotoAdminUpdateAccountEmail: 'com.atproto.admin.updateAccountEmail',
|
|
7343
7595
|
ComAtprotoAdminUpdateAccountHandle: 'com.atproto.admin.updateAccountHandle',
|
|
7596
|
+
ComAtprotoAdminUpdateSubjectStatus: 'com.atproto.admin.updateSubjectStatus',
|
|
7344
7597
|
ComAtprotoIdentityResolveHandle: 'com.atproto.identity.resolveHandle',
|
|
7345
7598
|
ComAtprotoIdentityUpdateHandle: 'com.atproto.identity.updateHandle',
|
|
7346
7599
|
ComAtprotoLabelDefs: 'com.atproto.label.defs',
|
|
@@ -7379,6 +7632,7 @@ export const ids = {
|
|
|
7379
7632
|
ComAtprotoServerRequestEmailUpdate: 'com.atproto.server.requestEmailUpdate',
|
|
7380
7633
|
ComAtprotoServerRequestPasswordReset:
|
|
7381
7634
|
'com.atproto.server.requestPasswordReset',
|
|
7635
|
+
ComAtprotoServerReserveSigningKey: 'com.atproto.server.reserveSigningKey',
|
|
7382
7636
|
ComAtprotoServerResetPassword: 'com.atproto.server.resetPassword',
|
|
7383
7637
|
ComAtprotoServerRevokeAppPassword: 'com.atproto.server.revokeAppPassword',
|
|
7384
7638
|
ComAtprotoServerUpdateEmail: 'com.atproto.server.updateEmail',
|
|
@@ -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
|
|
@@ -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
|
|
@@ -11,12 +11,13 @@ import { HandlerAuth } from '@atproto/xrpc-server'
|
|
|
11
11
|
export interface QueryParams {}
|
|
12
12
|
|
|
13
13
|
export interface InputSchema {
|
|
14
|
-
email
|
|
14
|
+
email?: string
|
|
15
15
|
handle: string
|
|
16
16
|
did?: string
|
|
17
17
|
inviteCode?: string
|
|
18
|
-
password
|
|
18
|
+
password?: string
|
|
19
19
|
recoveryKey?: string
|
|
20
|
+
plcOp?: {}
|
|
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
|
|