@atproto/bsky 0.0.56 → 0.0.58
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 +14 -0
- package/dist/api/app/bsky/actor/getProfile.js +7 -3
- package/dist/api/app/bsky/actor/getProfile.js.map +1 -1
- package/dist/api/app/bsky/graph/getFollowers.js +3 -3
- package/dist/api/app/bsky/graph/getFollowers.js.map +1 -1
- package/dist/api/app/bsky/graph/getFollows.js +3 -3
- package/dist/api/app/bsky/graph/getFollows.js.map +1 -1
- package/dist/data-plane/server/db/migrations/20240530T170337073Z-account-deactivation.d.ts +4 -0
- package/dist/data-plane/server/db/migrations/20240530T170337073Z-account-deactivation.d.ts.map +1 -0
- package/dist/data-plane/server/db/migrations/20240530T170337073Z-account-deactivation.js +15 -0
- package/dist/data-plane/server/db/migrations/20240530T170337073Z-account-deactivation.js.map +1 -0
- package/dist/data-plane/server/db/migrations/index.d.ts +1 -0
- package/dist/data-plane/server/db/migrations/index.d.ts.map +1 -1
- package/dist/data-plane/server/db/migrations/index.js +2 -1
- package/dist/data-plane/server/db/migrations/index.js.map +1 -1
- package/dist/data-plane/server/db/tables/actor.d.ts +1 -0
- package/dist/data-plane/server/db/tables/actor.d.ts.map +1 -1
- package/dist/data-plane/server/db/tables/actor.js.map +1 -1
- package/dist/data-plane/server/indexing/index.d.ts +2 -1
- package/dist/data-plane/server/indexing/index.d.ts.map +1 -1
- package/dist/data-plane/server/indexing/index.js +18 -1
- package/dist/data-plane/server/indexing/index.js.map +1 -1
- package/dist/data-plane/server/routes/profile.d.ts.map +1 -1
- package/dist/data-plane/server/routes/profile.js +9 -0
- package/dist/data-plane/server/routes/profile.js.map +1 -1
- package/dist/data-plane/server/subscription/index.d.ts +1 -1
- package/dist/data-plane/server/subscription/index.d.ts.map +1 -1
- package/dist/data-plane/server/subscription/index.js +14 -3
- package/dist/data-plane/server/subscription/index.js.map +1 -1
- package/dist/data-plane/server/subscription/util.d.ts +1 -1
- package/dist/data-plane/server/subscription/util.d.ts.map +1 -1
- package/dist/data-plane/server/subscription/util.js +3 -0
- package/dist/data-plane/server/subscription/util.js.map +1 -1
- package/dist/hydration/actor.d.ts +1 -0
- package/dist/hydration/actor.d.ts.map +1 -1
- package/dist/hydration/actor.js +4 -1
- package/dist/hydration/actor.js.map +1 -1
- package/dist/lexicon/index.d.ts +2 -0
- package/dist/lexicon/index.d.ts.map +1 -1
- package/dist/lexicon/index.js +4 -0
- package/dist/lexicon/index.js.map +1 -1
- package/dist/lexicon/lexicons.d.ts +137 -0
- package/dist/lexicon/lexicons.d.ts.map +1 -1
- package/dist/lexicon/lexicons.js +217 -4
- package/dist/lexicon/lexicons.js.map +1 -1
- package/dist/lexicon/types/chat/bsky/convo/defs.d.ts +1 -1
- package/dist/lexicon/types/com/atproto/admin/defs.d.ts +1 -0
- package/dist/lexicon/types/com/atproto/admin/defs.d.ts.map +1 -1
- package/dist/lexicon/types/com/atproto/admin/defs.js.map +1 -1
- package/dist/lexicon/types/com/atproto/admin/getSubjectStatus.d.ts +1 -0
- package/dist/lexicon/types/com/atproto/admin/getSubjectStatus.d.ts.map +1 -1
- package/dist/lexicon/types/com/atproto/server/createSession.d.ts +3 -0
- package/dist/lexicon/types/com/atproto/server/createSession.d.ts.map +1 -1
- package/dist/lexicon/types/com/atproto/server/getSession.d.ts +3 -0
- package/dist/lexicon/types/com/atproto/server/getSession.d.ts.map +1 -1
- package/dist/lexicon/types/com/atproto/server/refreshSession.d.ts +3 -0
- package/dist/lexicon/types/com/atproto/server/refreshSession.d.ts.map +1 -1
- package/dist/lexicon/types/com/atproto/sync/getBlob.d.ts +1 -0
- package/dist/lexicon/types/com/atproto/sync/getBlob.d.ts.map +1 -1
- package/dist/lexicon/types/com/atproto/sync/getBlocks.d.ts +1 -0
- package/dist/lexicon/types/com/atproto/sync/getBlocks.d.ts.map +1 -1
- package/dist/lexicon/types/com/atproto/sync/getLatestCommit.d.ts +1 -1
- package/dist/lexicon/types/com/atproto/sync/getLatestCommit.d.ts.map +1 -1
- package/dist/lexicon/types/com/atproto/sync/getRecord.d.ts +1 -0
- package/dist/lexicon/types/com/atproto/sync/getRecord.d.ts.map +1 -1
- package/dist/lexicon/types/com/atproto/sync/getRepo.d.ts +1 -0
- package/dist/lexicon/types/com/atproto/sync/getRepo.d.ts.map +1 -1
- package/dist/lexicon/types/com/atproto/sync/getRepoStatus.d.ts +42 -0
- package/dist/lexicon/types/com/atproto/sync/getRepoStatus.d.ts.map +1 -0
- package/dist/lexicon/types/com/atproto/sync/getRepoStatus.js +3 -0
- package/dist/lexicon/types/com/atproto/sync/getRepoStatus.js.map +1 -0
- package/dist/lexicon/types/com/atproto/sync/listBlobs.d.ts +1 -0
- package/dist/lexicon/types/com/atproto/sync/listBlobs.d.ts.map +1 -1
- package/dist/lexicon/types/com/atproto/sync/listRepos.d.ts +3 -0
- package/dist/lexicon/types/com/atproto/sync/listRepos.d.ts.map +1 -1
- package/dist/lexicon/types/com/atproto/sync/listRepos.js.map +1 -1
- package/dist/lexicon/types/com/atproto/sync/subscribeRepos.d.ts +19 -4
- package/dist/lexicon/types/com/atproto/sync/subscribeRepos.d.ts.map +1 -1
- package/dist/lexicon/types/com/atproto/sync/subscribeRepos.js +11 -1
- package/dist/lexicon/types/com/atproto/sync/subscribeRepos.js.map +1 -1
- package/dist/proto/bsky_connect.d.ts +10 -1
- package/dist/proto/bsky_connect.d.ts.map +1 -1
- package/dist/proto/bsky_connect.js +9 -0
- package/dist/proto/bsky_connect.js.map +1 -1
- package/dist/proto/bsky_pb.d.ts +42 -0
- package/dist/proto/bsky_pb.d.ts.map +1 -1
- package/dist/proto/bsky_pb.js +132 -1
- package/dist/proto/bsky_pb.js.map +1 -1
- package/dist/views/index.d.ts +2 -0
- package/dist/views/index.d.ts.map +1 -1
- package/dist/views/index.js +12 -0
- package/dist/views/index.js.map +1 -1
- package/package.json +4 -4
- package/proto/bsky.proto +11 -0
- package/src/api/app/bsky/actor/getProfile.ts +12 -8
- package/src/api/app/bsky/graph/getFollowers.ts +3 -4
- package/src/api/app/bsky/graph/getFollows.ts +3 -4
- package/src/data-plane/server/db/migrations/20240530T170337073Z-account-deactivation.ts +12 -0
- package/src/data-plane/server/db/migrations/index.ts +1 -0
- package/src/data-plane/server/db/tables/actor.ts +1 -0
- package/src/data-plane/server/indexing/index.ts +17 -1
- package/src/data-plane/server/routes/profile.ts +10 -0
- package/src/data-plane/server/subscription/index.ts +11 -3
- package/src/data-plane/server/subscription/util.ts +2 -0
- package/src/hydration/actor.ts +6 -1
- package/src/lexicon/index.ts +12 -0
- package/src/lexicon/lexicons.ts +228 -7
- package/src/lexicon/types/chat/bsky/convo/defs.ts +1 -1
- package/src/lexicon/types/com/atproto/admin/defs.ts +1 -0
- package/src/lexicon/types/com/atproto/admin/getSubjectStatus.ts +1 -0
- package/src/lexicon/types/com/atproto/server/createSession.ts +3 -0
- package/src/lexicon/types/com/atproto/server/getSession.ts +3 -0
- package/src/lexicon/types/com/atproto/server/refreshSession.ts +3 -0
- package/src/lexicon/types/com/atproto/sync/getBlob.ts +6 -0
- package/src/lexicon/types/com/atproto/sync/getBlocks.ts +6 -0
- package/src/lexicon/types/com/atproto/sync/getLatestCommit.ts +1 -1
- package/src/lexicon/types/com/atproto/sync/getRecord.ts +6 -0
- package/src/lexicon/types/com/atproto/sync/getRepo.ts +1 -0
- package/src/lexicon/types/com/atproto/sync/getRepoStatus.ts +52 -0
- package/src/lexicon/types/com/atproto/sync/listBlobs.ts +1 -0
- package/src/lexicon/types/com/atproto/sync/listRepos.ts +3 -0
- package/src/lexicon/types/com/atproto/sync/subscribeRepos.ts +30 -3
- package/src/proto/bsky_connect.ts +11 -0
- package/src/proto/bsky_pb.ts +137 -0
- package/src/views/index.ts +13 -0
- package/tests/data-plane/db.test.ts +1 -2
- package/tests/data-plane/indexing.test.ts +3 -3
- package/tests/data-plane/subscription/repo.test.ts +1 -1
- package/tests/views/account-deactivation.test.ts +76 -0
package/src/lexicon/lexicons.ts
CHANGED
|
@@ -66,6 +66,10 @@ export const schemaDict = {
|
|
|
66
66
|
inviteNote: {
|
|
67
67
|
type: 'string',
|
|
68
68
|
},
|
|
69
|
+
deactivatedAt: {
|
|
70
|
+
type: 'string',
|
|
71
|
+
format: 'datetime',
|
|
72
|
+
},
|
|
69
73
|
},
|
|
70
74
|
},
|
|
71
75
|
repoRef: {
|
|
@@ -364,6 +368,10 @@ export const schemaDict = {
|
|
|
364
368
|
type: 'ref',
|
|
365
369
|
ref: 'lex:com.atproto.admin.defs#statusAttr',
|
|
366
370
|
},
|
|
371
|
+
deactivated: {
|
|
372
|
+
type: 'ref',
|
|
373
|
+
ref: 'lex:com.atproto.admin.defs#statusAttr',
|
|
374
|
+
},
|
|
367
375
|
},
|
|
368
376
|
},
|
|
369
377
|
},
|
|
@@ -2255,6 +2263,15 @@ export const schemaDict = {
|
|
|
2255
2263
|
emailAuthFactor: {
|
|
2256
2264
|
type: 'boolean',
|
|
2257
2265
|
},
|
|
2266
|
+
active: {
|
|
2267
|
+
type: 'boolean',
|
|
2268
|
+
},
|
|
2269
|
+
status: {
|
|
2270
|
+
type: 'string',
|
|
2271
|
+
description:
|
|
2272
|
+
'If active=false, this optional field indicates a possible reason for why the account is not active. If active=false and no status is supplied, then the host makes no claim for why the repository is no longer being hosted.',
|
|
2273
|
+
knownValues: ['takendown', 'suspended', 'deactivated'],
|
|
2274
|
+
},
|
|
2258
2275
|
},
|
|
2259
2276
|
},
|
|
2260
2277
|
},
|
|
@@ -2591,6 +2608,15 @@ export const schemaDict = {
|
|
|
2591
2608
|
didDoc: {
|
|
2592
2609
|
type: 'unknown',
|
|
2593
2610
|
},
|
|
2611
|
+
active: {
|
|
2612
|
+
type: 'boolean',
|
|
2613
|
+
},
|
|
2614
|
+
status: {
|
|
2615
|
+
type: 'string',
|
|
2616
|
+
description:
|
|
2617
|
+
'If active=false, this optional field indicates a possible reason for why the account is not active. If active=false and no status is supplied, then the host makes no claim for why the repository is no longer being hosted.',
|
|
2618
|
+
knownValues: ['takendown', 'suspended', 'deactivated'],
|
|
2619
|
+
},
|
|
2594
2620
|
},
|
|
2595
2621
|
},
|
|
2596
2622
|
},
|
|
@@ -2675,6 +2701,15 @@ export const schemaDict = {
|
|
|
2675
2701
|
didDoc: {
|
|
2676
2702
|
type: 'unknown',
|
|
2677
2703
|
},
|
|
2704
|
+
active: {
|
|
2705
|
+
type: 'boolean',
|
|
2706
|
+
},
|
|
2707
|
+
status: {
|
|
2708
|
+
type: 'string',
|
|
2709
|
+
description:
|
|
2710
|
+
"Hosting status of the account. If not specified, then assume 'active'.",
|
|
2711
|
+
knownValues: ['takendown', 'suspended', 'deactivated'],
|
|
2712
|
+
},
|
|
2678
2713
|
},
|
|
2679
2714
|
},
|
|
2680
2715
|
},
|
|
@@ -2912,6 +2947,23 @@ export const schemaDict = {
|
|
|
2912
2947
|
output: {
|
|
2913
2948
|
encoding: '*/*',
|
|
2914
2949
|
},
|
|
2950
|
+
errors: [
|
|
2951
|
+
{
|
|
2952
|
+
name: 'BlobNotFound',
|
|
2953
|
+
},
|
|
2954
|
+
{
|
|
2955
|
+
name: 'RepoNotFound',
|
|
2956
|
+
},
|
|
2957
|
+
{
|
|
2958
|
+
name: 'RepoTakendown',
|
|
2959
|
+
},
|
|
2960
|
+
{
|
|
2961
|
+
name: 'RepoSuspended',
|
|
2962
|
+
},
|
|
2963
|
+
{
|
|
2964
|
+
name: 'RepoDeactivated',
|
|
2965
|
+
},
|
|
2966
|
+
],
|
|
2915
2967
|
},
|
|
2916
2968
|
},
|
|
2917
2969
|
},
|
|
@@ -2944,6 +2996,23 @@ export const schemaDict = {
|
|
|
2944
2996
|
output: {
|
|
2945
2997
|
encoding: 'application/vnd.ipld.car',
|
|
2946
2998
|
},
|
|
2999
|
+
errors: [
|
|
3000
|
+
{
|
|
3001
|
+
name: 'BlockNotFound',
|
|
3002
|
+
},
|
|
3003
|
+
{
|
|
3004
|
+
name: 'RepoNotFound',
|
|
3005
|
+
},
|
|
3006
|
+
{
|
|
3007
|
+
name: 'RepoTakendown',
|
|
3008
|
+
},
|
|
3009
|
+
{
|
|
3010
|
+
name: 'RepoSuspended',
|
|
3011
|
+
},
|
|
3012
|
+
{
|
|
3013
|
+
name: 'RepoDeactivated',
|
|
3014
|
+
},
|
|
3015
|
+
],
|
|
2947
3016
|
},
|
|
2948
3017
|
},
|
|
2949
3018
|
},
|
|
@@ -3050,6 +3119,15 @@ export const schemaDict = {
|
|
|
3050
3119
|
{
|
|
3051
3120
|
name: 'RepoNotFound',
|
|
3052
3121
|
},
|
|
3122
|
+
{
|
|
3123
|
+
name: 'RepoTakendown',
|
|
3124
|
+
},
|
|
3125
|
+
{
|
|
3126
|
+
name: 'RepoSuspended',
|
|
3127
|
+
},
|
|
3128
|
+
{
|
|
3129
|
+
name: 'RepoDeactivated',
|
|
3130
|
+
},
|
|
3053
3131
|
],
|
|
3054
3132
|
},
|
|
3055
3133
|
},
|
|
@@ -3090,6 +3168,23 @@ export const schemaDict = {
|
|
|
3090
3168
|
output: {
|
|
3091
3169
|
encoding: 'application/vnd.ipld.car',
|
|
3092
3170
|
},
|
|
3171
|
+
errors: [
|
|
3172
|
+
{
|
|
3173
|
+
name: 'RecordNotFound',
|
|
3174
|
+
},
|
|
3175
|
+
{
|
|
3176
|
+
name: 'RepoNotFound',
|
|
3177
|
+
},
|
|
3178
|
+
{
|
|
3179
|
+
name: 'RepoTakendown',
|
|
3180
|
+
},
|
|
3181
|
+
{
|
|
3182
|
+
name: 'RepoSuspended',
|
|
3183
|
+
},
|
|
3184
|
+
{
|
|
3185
|
+
name: 'RepoDeactivated',
|
|
3186
|
+
},
|
|
3187
|
+
],
|
|
3093
3188
|
},
|
|
3094
3189
|
},
|
|
3095
3190
|
},
|
|
@@ -3120,6 +3215,74 @@ export const schemaDict = {
|
|
|
3120
3215
|
output: {
|
|
3121
3216
|
encoding: 'application/vnd.ipld.car',
|
|
3122
3217
|
},
|
|
3218
|
+
errors: [
|
|
3219
|
+
{
|
|
3220
|
+
name: 'RepoNotFound',
|
|
3221
|
+
},
|
|
3222
|
+
{
|
|
3223
|
+
name: 'RepoTakendown',
|
|
3224
|
+
},
|
|
3225
|
+
{
|
|
3226
|
+
name: 'RepoSuspended',
|
|
3227
|
+
},
|
|
3228
|
+
{
|
|
3229
|
+
name: 'RepoDeactivated',
|
|
3230
|
+
},
|
|
3231
|
+
],
|
|
3232
|
+
},
|
|
3233
|
+
},
|
|
3234
|
+
},
|
|
3235
|
+
ComAtprotoSyncGetRepoStatus: {
|
|
3236
|
+
lexicon: 1,
|
|
3237
|
+
id: 'com.atproto.sync.getRepoStatus',
|
|
3238
|
+
defs: {
|
|
3239
|
+
main: {
|
|
3240
|
+
type: 'query',
|
|
3241
|
+
description:
|
|
3242
|
+
'Get the hosting status for a repository, on this server. Expected to be implemented by PDS and Relay.',
|
|
3243
|
+
parameters: {
|
|
3244
|
+
type: 'params',
|
|
3245
|
+
required: ['did'],
|
|
3246
|
+
properties: {
|
|
3247
|
+
did: {
|
|
3248
|
+
type: 'string',
|
|
3249
|
+
format: 'did',
|
|
3250
|
+
description: 'The DID of the repo.',
|
|
3251
|
+
},
|
|
3252
|
+
},
|
|
3253
|
+
},
|
|
3254
|
+
output: {
|
|
3255
|
+
encoding: 'application/json',
|
|
3256
|
+
schema: {
|
|
3257
|
+
type: 'object',
|
|
3258
|
+
required: ['did', 'active'],
|
|
3259
|
+
properties: {
|
|
3260
|
+
did: {
|
|
3261
|
+
type: 'string',
|
|
3262
|
+
format: 'did',
|
|
3263
|
+
},
|
|
3264
|
+
active: {
|
|
3265
|
+
type: 'boolean',
|
|
3266
|
+
},
|
|
3267
|
+
status: {
|
|
3268
|
+
type: 'string',
|
|
3269
|
+
description:
|
|
3270
|
+
'If active=false, this optional field indicates a possible reason for why the account is not active. If active=false and no status is supplied, then the host makes no claim for why the repository is no longer being hosted.',
|
|
3271
|
+
knownValues: ['takendown', 'suspended', 'deactivated'],
|
|
3272
|
+
},
|
|
3273
|
+
rev: {
|
|
3274
|
+
type: 'string',
|
|
3275
|
+
description:
|
|
3276
|
+
'Optional field, the current rev of the repo, if active=true',
|
|
3277
|
+
},
|
|
3278
|
+
},
|
|
3279
|
+
},
|
|
3280
|
+
},
|
|
3281
|
+
errors: [
|
|
3282
|
+
{
|
|
3283
|
+
name: 'RepoNotFound',
|
|
3284
|
+
},
|
|
3285
|
+
],
|
|
3123
3286
|
},
|
|
3124
3287
|
},
|
|
3125
3288
|
},
|
|
@@ -3174,6 +3337,20 @@ export const schemaDict = {
|
|
|
3174
3337
|
},
|
|
3175
3338
|
},
|
|
3176
3339
|
},
|
|
3340
|
+
errors: [
|
|
3341
|
+
{
|
|
3342
|
+
name: 'RepoNotFound',
|
|
3343
|
+
},
|
|
3344
|
+
{
|
|
3345
|
+
name: 'RepoTakendown',
|
|
3346
|
+
},
|
|
3347
|
+
{
|
|
3348
|
+
name: 'RepoSuspended',
|
|
3349
|
+
},
|
|
3350
|
+
{
|
|
3351
|
+
name: 'RepoDeactivated',
|
|
3352
|
+
},
|
|
3353
|
+
],
|
|
3177
3354
|
},
|
|
3178
3355
|
},
|
|
3179
3356
|
},
|
|
@@ -3235,6 +3412,15 @@ export const schemaDict = {
|
|
|
3235
3412
|
rev: {
|
|
3236
3413
|
type: 'string',
|
|
3237
3414
|
},
|
|
3415
|
+
active: {
|
|
3416
|
+
type: 'boolean',
|
|
3417
|
+
},
|
|
3418
|
+
status: {
|
|
3419
|
+
type: 'string',
|
|
3420
|
+
description:
|
|
3421
|
+
'If active=false, this optional field indicates a possible reason for why the account is not active. If active=false and no status is supplied, then the host makes no claim for why the repository is no longer being hosted.',
|
|
3422
|
+
knownValues: ['takendown', 'suspended', 'deactivated'],
|
|
3423
|
+
},
|
|
3238
3424
|
},
|
|
3239
3425
|
},
|
|
3240
3426
|
},
|
|
@@ -3312,6 +3498,7 @@ export const schemaDict = {
|
|
|
3312
3498
|
refs: [
|
|
3313
3499
|
'lex:com.atproto.sync.subscribeRepos#commit',
|
|
3314
3500
|
'lex:com.atproto.sync.subscribeRepos#identity',
|
|
3501
|
+
'lex:com.atproto.sync.subscribeRepos#account',
|
|
3315
3502
|
'lex:com.atproto.sync.subscribeRepos#handle',
|
|
3316
3503
|
'lex:com.atproto.sync.subscribeRepos#migrate',
|
|
3317
3504
|
'lex:com.atproto.sync.subscribeRepos#tombstone',
|
|
@@ -3435,12 +3622,47 @@ export const schemaDict = {
|
|
|
3435
3622
|
type: 'string',
|
|
3436
3623
|
format: 'datetime',
|
|
3437
3624
|
},
|
|
3625
|
+
handle: {
|
|
3626
|
+
type: 'string',
|
|
3627
|
+
format: 'handle',
|
|
3628
|
+
description:
|
|
3629
|
+
"The current handle for the account, or 'handle.invalid' if validation fails. This field is optional, might have been validated or passed-through from an upstream source. Semantics and behaviors for PDS vs Relay may evolve in the future; see atproto specs for more details.",
|
|
3630
|
+
},
|
|
3438
3631
|
},
|
|
3439
3632
|
},
|
|
3440
|
-
|
|
3633
|
+
account: {
|
|
3441
3634
|
type: 'object',
|
|
3442
3635
|
description:
|
|
3443
|
-
"Represents
|
|
3636
|
+
"Represents a change to an account's status on a host (eg, PDS or Relay). The semantics of this event are that the status is at the host which emitted the event, not necessarily that at the currently active PDS. Eg, a Relay takedown would emit a takedown with active=false, even if the PDS is still active.",
|
|
3637
|
+
required: ['seq', 'did', 'time', 'active'],
|
|
3638
|
+
properties: {
|
|
3639
|
+
seq: {
|
|
3640
|
+
type: 'integer',
|
|
3641
|
+
},
|
|
3642
|
+
did: {
|
|
3643
|
+
type: 'string',
|
|
3644
|
+
format: 'did',
|
|
3645
|
+
},
|
|
3646
|
+
time: {
|
|
3647
|
+
type: 'string',
|
|
3648
|
+
format: 'datetime',
|
|
3649
|
+
},
|
|
3650
|
+
active: {
|
|
3651
|
+
type: 'boolean',
|
|
3652
|
+
description:
|
|
3653
|
+
'Indicates that the account has a repository which can be fetched from the host that emitted this event.',
|
|
3654
|
+
},
|
|
3655
|
+
status: {
|
|
3656
|
+
type: 'string',
|
|
3657
|
+
description:
|
|
3658
|
+
'If active=false, this optional field indicates a reason for why the account is not active.',
|
|
3659
|
+
knownValues: ['takendown', 'suspended', 'deleted', 'deactivated'],
|
|
3660
|
+
},
|
|
3661
|
+
},
|
|
3662
|
+
},
|
|
3663
|
+
handle: {
|
|
3664
|
+
type: 'object',
|
|
3665
|
+
description: 'DEPRECATED -- Use #identity event instead',
|
|
3444
3666
|
required: ['seq', 'did', 'handle', 'time'],
|
|
3445
3667
|
properties: {
|
|
3446
3668
|
seq: {
|
|
@@ -3462,8 +3684,7 @@ export const schemaDict = {
|
|
|
3462
3684
|
},
|
|
3463
3685
|
migrate: {
|
|
3464
3686
|
type: 'object',
|
|
3465
|
-
description:
|
|
3466
|
-
'Represents an account moving from one PDS instance to another. NOTE: not implemented; account migration uses #identity instead',
|
|
3687
|
+
description: 'DEPRECATED -- Use #account event instead',
|
|
3467
3688
|
required: ['seq', 'did', 'migrateTo', 'time'],
|
|
3468
3689
|
nullable: ['migrateTo'],
|
|
3469
3690
|
properties: {
|
|
@@ -3485,8 +3706,7 @@ export const schemaDict = {
|
|
|
3485
3706
|
},
|
|
3486
3707
|
tombstone: {
|
|
3487
3708
|
type: 'object',
|
|
3488
|
-
description:
|
|
3489
|
-
'Indicates that an account has been deleted. NOTE: may be deprecated in favor of #identity or a future #account event',
|
|
3709
|
+
description: 'DEPRECATED -- Use #account event instead',
|
|
3490
3710
|
required: ['seq', 'did', 'time'],
|
|
3491
3711
|
properties: {
|
|
3492
3712
|
seq: {
|
|
@@ -8379,7 +8599,7 @@ export const schemaDict = {
|
|
|
8379
8599
|
},
|
|
8380
8600
|
embed: {
|
|
8381
8601
|
type: 'union',
|
|
8382
|
-
refs: ['lex:app.bsky.embed.record'],
|
|
8602
|
+
refs: ['lex:app.bsky.embed.record#view'],
|
|
8383
8603
|
},
|
|
8384
8604
|
sender: {
|
|
8385
8605
|
type: 'ref',
|
|
@@ -9200,6 +9420,7 @@ export const ids = {
|
|
|
9200
9420
|
ComAtprotoSyncGetLatestCommit: 'com.atproto.sync.getLatestCommit',
|
|
9201
9421
|
ComAtprotoSyncGetRecord: 'com.atproto.sync.getRecord',
|
|
9202
9422
|
ComAtprotoSyncGetRepo: 'com.atproto.sync.getRepo',
|
|
9423
|
+
ComAtprotoSyncGetRepoStatus: 'com.atproto.sync.getRepoStatus',
|
|
9203
9424
|
ComAtprotoSyncListBlobs: 'com.atproto.sync.listBlobs',
|
|
9204
9425
|
ComAtprotoSyncListRepos: 'com.atproto.sync.listRepos',
|
|
9205
9426
|
ComAtprotoSyncNotifyOfUpdate: 'com.atproto.sync.notifyOfUpdate',
|
|
@@ -54,7 +54,7 @@ export interface MessageView {
|
|
|
54
54
|
text: string
|
|
55
55
|
/** Annotations of text (mentions, URLs, hashtags, etc) */
|
|
56
56
|
facets?: AppBskyRichtextFacet.Main[]
|
|
57
|
-
embed?: AppBskyEmbedRecord.
|
|
57
|
+
embed?: AppBskyEmbedRecord.View | { $type: string; [k: string]: unknown }
|
|
58
58
|
sender: MessageViewSender
|
|
59
59
|
sentAt: string
|
|
60
60
|
[k: string]: unknown
|
|
@@ -27,6 +27,9 @@ export interface OutputSchema {
|
|
|
27
27
|
email?: string
|
|
28
28
|
emailConfirmed?: boolean
|
|
29
29
|
emailAuthFactor?: boolean
|
|
30
|
+
active?: boolean
|
|
31
|
+
/** If active=false, this optional field indicates a possible reason for why the account is not active. If active=false and no status is supplied, then the host makes no claim for why the repository is no longer being hosted. */
|
|
32
|
+
status?: 'takendown' | 'suspended' | 'deactivated' | (string & {})
|
|
30
33
|
[k: string]: unknown
|
|
31
34
|
}
|
|
32
35
|
|
|
@@ -19,6 +19,9 @@ export interface OutputSchema {
|
|
|
19
19
|
emailConfirmed?: boolean
|
|
20
20
|
emailAuthFactor?: boolean
|
|
21
21
|
didDoc?: {}
|
|
22
|
+
active?: boolean
|
|
23
|
+
/** If active=false, this optional field indicates a possible reason for why the account is not active. If active=false and no status is supplied, then the host makes no claim for why the repository is no longer being hosted. */
|
|
24
|
+
status?: 'takendown' | 'suspended' | 'deactivated' | (string & {})
|
|
22
25
|
[k: string]: unknown
|
|
23
26
|
}
|
|
24
27
|
|
|
@@ -18,6 +18,9 @@ export interface OutputSchema {
|
|
|
18
18
|
handle: string
|
|
19
19
|
did: string
|
|
20
20
|
didDoc?: {}
|
|
21
|
+
active?: boolean
|
|
22
|
+
/** Hosting status of the account. If not specified, then assume 'active'. */
|
|
23
|
+
status?: 'takendown' | 'suspended' | 'deactivated' | (string & {})
|
|
21
24
|
[k: string]: unknown
|
|
22
25
|
}
|
|
23
26
|
|
|
@@ -28,6 +28,12 @@ export interface HandlerSuccess {
|
|
|
28
28
|
export interface HandlerError {
|
|
29
29
|
status: number
|
|
30
30
|
message?: string
|
|
31
|
+
error?:
|
|
32
|
+
| 'BlobNotFound'
|
|
33
|
+
| 'RepoNotFound'
|
|
34
|
+
| 'RepoTakendown'
|
|
35
|
+
| 'RepoSuspended'
|
|
36
|
+
| 'RepoDeactivated'
|
|
31
37
|
}
|
|
32
38
|
|
|
33
39
|
export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
|
|
@@ -27,6 +27,12 @@ export interface HandlerSuccess {
|
|
|
27
27
|
export interface HandlerError {
|
|
28
28
|
status: number
|
|
29
29
|
message?: string
|
|
30
|
+
error?:
|
|
31
|
+
| 'BlockNotFound'
|
|
32
|
+
| 'RepoNotFound'
|
|
33
|
+
| 'RepoTakendown'
|
|
34
|
+
| 'RepoSuspended'
|
|
35
|
+
| 'RepoDeactivated'
|
|
30
36
|
}
|
|
31
37
|
|
|
32
38
|
export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
|
|
@@ -32,7 +32,7 @@ export interface HandlerSuccess {
|
|
|
32
32
|
export interface HandlerError {
|
|
33
33
|
status: number
|
|
34
34
|
message?: string
|
|
35
|
-
error?: 'RepoNotFound'
|
|
35
|
+
error?: 'RepoNotFound' | 'RepoTakendown' | 'RepoSuspended' | 'RepoDeactivated'
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
|
|
@@ -31,6 +31,12 @@ export interface HandlerSuccess {
|
|
|
31
31
|
export interface HandlerError {
|
|
32
32
|
status: number
|
|
33
33
|
message?: string
|
|
34
|
+
error?:
|
|
35
|
+
| 'RecordNotFound'
|
|
36
|
+
| 'RepoNotFound'
|
|
37
|
+
| 'RepoTakendown'
|
|
38
|
+
| 'RepoSuspended'
|
|
39
|
+
| 'RepoDeactivated'
|
|
34
40
|
}
|
|
35
41
|
|
|
36
42
|
export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
|
|
@@ -28,6 +28,7 @@ export interface HandlerSuccess {
|
|
|
28
28
|
export interface HandlerError {
|
|
29
29
|
status: number
|
|
30
30
|
message?: string
|
|
31
|
+
error?: 'RepoNotFound' | 'RepoTakendown' | 'RepoSuspended' | 'RepoDeactivated'
|
|
31
32
|
}
|
|
32
33
|
|
|
33
34
|
export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
|
|
@@ -0,0 +1,52 @@
|
|
|
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, HandlerPipeThrough } from '@atproto/xrpc-server'
|
|
10
|
+
|
|
11
|
+
export interface QueryParams {
|
|
12
|
+
/** The DID of the repo. */
|
|
13
|
+
did: string
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export type InputSchema = undefined
|
|
17
|
+
|
|
18
|
+
export interface OutputSchema {
|
|
19
|
+
did: string
|
|
20
|
+
active: boolean
|
|
21
|
+
/** If active=false, this optional field indicates a possible reason for why the account is not active. If active=false and no status is supplied, then the host makes no claim for why the repository is no longer being hosted. */
|
|
22
|
+
status?: 'takendown' | 'suspended' | 'deactivated' | (string & {})
|
|
23
|
+
/** Optional field, the current rev of the repo, if active=true */
|
|
24
|
+
rev?: string
|
|
25
|
+
[k: string]: unknown
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export type HandlerInput = undefined
|
|
29
|
+
|
|
30
|
+
export interface HandlerSuccess {
|
|
31
|
+
encoding: 'application/json'
|
|
32
|
+
body: OutputSchema
|
|
33
|
+
headers?: { [key: string]: string }
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export interface HandlerError {
|
|
37
|
+
status: number
|
|
38
|
+
message?: string
|
|
39
|
+
error?: 'RepoNotFound'
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
|
|
43
|
+
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
|
44
|
+
auth: HA
|
|
45
|
+
params: QueryParams
|
|
46
|
+
input: HandlerInput
|
|
47
|
+
req: express.Request
|
|
48
|
+
res: express.Response
|
|
49
|
+
}
|
|
50
|
+
export type Handler<HA extends HandlerAuth = never> = (
|
|
51
|
+
ctx: HandlerReqCtx<HA>,
|
|
52
|
+
) => Promise<HandlerOutput> | HandlerOutput
|
|
@@ -36,6 +36,7 @@ export interface HandlerSuccess {
|
|
|
36
36
|
export interface HandlerError {
|
|
37
37
|
status: number
|
|
38
38
|
message?: string
|
|
39
|
+
error?: 'RepoNotFound' | 'RepoTakendown' | 'RepoSuspended' | 'RepoDeactivated'
|
|
39
40
|
}
|
|
40
41
|
|
|
41
42
|
export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
|
|
@@ -51,6 +51,9 @@ export interface Repo {
|
|
|
51
51
|
/** Current repo commit CID */
|
|
52
52
|
head: string
|
|
53
53
|
rev: string
|
|
54
|
+
active?: boolean
|
|
55
|
+
/** If active=false, this optional field indicates a possible reason for why the account is not active. If active=false and no status is supplied, then the host makes no claim for why the repository is no longer being hosted. */
|
|
56
|
+
status?: 'takendown' | 'suspended' | 'deactivated' | (string & {})
|
|
54
57
|
[k: string]: unknown
|
|
55
58
|
}
|
|
56
59
|
|
|
@@ -16,6 +16,7 @@ export interface QueryParams {
|
|
|
16
16
|
export type OutputSchema =
|
|
17
17
|
| Commit
|
|
18
18
|
| Identity
|
|
19
|
+
| Account
|
|
19
20
|
| Handle
|
|
20
21
|
| Migrate
|
|
21
22
|
| Tombstone
|
|
@@ -77,6 +78,8 @@ export interface Identity {
|
|
|
77
78
|
seq: number
|
|
78
79
|
did: string
|
|
79
80
|
time: string
|
|
81
|
+
/** The current handle for the account, or 'handle.invalid' if validation fails. This field is optional, might have been validated or passed-through from an upstream source. Semantics and behaviors for PDS vs Relay may evolve in the future; see atproto specs for more details. */
|
|
82
|
+
handle?: string
|
|
80
83
|
[k: string]: unknown
|
|
81
84
|
}
|
|
82
85
|
|
|
@@ -92,7 +95,31 @@ export function validateIdentity(v: unknown): ValidationResult {
|
|
|
92
95
|
return lexicons.validate('com.atproto.sync.subscribeRepos#identity', v)
|
|
93
96
|
}
|
|
94
97
|
|
|
95
|
-
/** Represents
|
|
98
|
+
/** Represents a change to an account's status on a host (eg, PDS or Relay). The semantics of this event are that the status is at the host which emitted the event, not necessarily that at the currently active PDS. Eg, a Relay takedown would emit a takedown with active=false, even if the PDS is still active. */
|
|
99
|
+
export interface Account {
|
|
100
|
+
seq: number
|
|
101
|
+
did: string
|
|
102
|
+
time: string
|
|
103
|
+
/** Indicates that the account has a repository which can be fetched from the host that emitted this event. */
|
|
104
|
+
active: boolean
|
|
105
|
+
/** If active=false, this optional field indicates a reason for why the account is not active. */
|
|
106
|
+
status?: 'takendown' | 'suspended' | 'deleted' | 'deactivated' | (string & {})
|
|
107
|
+
[k: string]: unknown
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export function isAccount(v: unknown): v is Account {
|
|
111
|
+
return (
|
|
112
|
+
isObj(v) &&
|
|
113
|
+
hasProp(v, '$type') &&
|
|
114
|
+
v.$type === 'com.atproto.sync.subscribeRepos#account'
|
|
115
|
+
)
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export function validateAccount(v: unknown): ValidationResult {
|
|
119
|
+
return lexicons.validate('com.atproto.sync.subscribeRepos#account', v)
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/** DEPRECATED -- Use #identity event instead */
|
|
96
123
|
export interface Handle {
|
|
97
124
|
seq: number
|
|
98
125
|
did: string
|
|
@@ -113,7 +140,7 @@ export function validateHandle(v: unknown): ValidationResult {
|
|
|
113
140
|
return lexicons.validate('com.atproto.sync.subscribeRepos#handle', v)
|
|
114
141
|
}
|
|
115
142
|
|
|
116
|
-
/**
|
|
143
|
+
/** DEPRECATED -- Use #account event instead */
|
|
117
144
|
export interface Migrate {
|
|
118
145
|
seq: number
|
|
119
146
|
did: string
|
|
@@ -134,7 +161,7 @@ export function validateMigrate(v: unknown): ValidationResult {
|
|
|
134
161
|
return lexicons.validate('com.atproto.sync.subscribeRepos#migrate', v)
|
|
135
162
|
}
|
|
136
163
|
|
|
137
|
-
/**
|
|
164
|
+
/** DEPRECATED -- Use #account event instead */
|
|
138
165
|
export interface Tombstone {
|
|
139
166
|
seq: number
|
|
140
167
|
did: string
|
|
@@ -166,6 +166,8 @@ import {
|
|
|
166
166
|
UntakedownBlobResponse,
|
|
167
167
|
UntakedownRecordRequest,
|
|
168
168
|
UntakedownRecordResponse,
|
|
169
|
+
UpdateActorUpstreamStatusRequest,
|
|
170
|
+
UpdateActorUpstreamStatusResponse,
|
|
169
171
|
UpdateNotificationSeenRequest,
|
|
170
172
|
UpdateNotificationSeenResponse,
|
|
171
173
|
} from './bsky_pb'
|
|
@@ -890,6 +892,15 @@ export const Service = {
|
|
|
890
892
|
O: TakedownActorResponse,
|
|
891
893
|
kind: MethodKind.Unary,
|
|
892
894
|
},
|
|
895
|
+
/**
|
|
896
|
+
* @generated from rpc bsky.Service.UpdateActorUpstreamStatus
|
|
897
|
+
*/
|
|
898
|
+
updateActorUpstreamStatus: {
|
|
899
|
+
name: 'UpdateActorUpstreamStatus',
|
|
900
|
+
I: UpdateActorUpstreamStatusRequest,
|
|
901
|
+
O: UpdateActorUpstreamStatusResponse,
|
|
902
|
+
kind: MethodKind.Unary,
|
|
903
|
+
},
|
|
893
904
|
/**
|
|
894
905
|
* @generated from rpc bsky.Service.UntakedownBlob
|
|
895
906
|
*/
|