@atproto/bsky 0.0.118 → 0.0.120
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/LICENSE.txt +1 -1
- package/dist/lexicon/index.d.ts +6 -0
- package/dist/lexicon/index.d.ts.map +1 -1
- package/dist/lexicon/index.js +12 -0
- package/dist/lexicon/index.js.map +1 -1
- package/dist/lexicon/lexicons.d.ts +428 -6
- package/dist/lexicon/lexicons.d.ts.map +1 -1
- package/dist/lexicon/lexicons.js +220 -2
- package/dist/lexicon/lexicons.js.map +1 -1
- package/dist/lexicon/types/chat/bsky/convo/acceptConvo.d.ts +40 -0
- package/dist/lexicon/types/chat/bsky/convo/acceptConvo.d.ts.map +1 -0
- package/dist/lexicon/types/chat/bsky/convo/acceptConvo.js +7 -0
- package/dist/lexicon/types/chat/bsky/convo/acceptConvo.js.map +1 -0
- package/dist/lexicon/types/chat/bsky/convo/defs.d.ts +32 -1
- package/dist/lexicon/types/chat/bsky/convo/defs.d.ts.map +1 -1
- package/dist/lexicon/types/chat/bsky/convo/defs.js +36 -0
- package/dist/lexicon/types/chat/bsky/convo/defs.js.map +1 -1
- package/dist/lexicon/types/chat/bsky/convo/getConvoAvailability.d.ts +37 -0
- package/dist/lexicon/types/chat/bsky/convo/getConvoAvailability.d.ts.map +1 -0
- package/dist/lexicon/types/chat/bsky/convo/getConvoAvailability.js +7 -0
- package/dist/lexicon/types/chat/bsky/convo/getConvoAvailability.js.map +1 -0
- package/dist/lexicon/types/chat/bsky/convo/getLog.d.ts +1 -1
- package/dist/lexicon/types/chat/bsky/convo/getLog.d.ts.map +1 -1
- package/dist/lexicon/types/chat/bsky/convo/listConvos.d.ts +2 -0
- package/dist/lexicon/types/chat/bsky/convo/listConvos.d.ts.map +1 -1
- package/dist/lexicon/types/com/atproto/repo/applyWrites.d.ts +1 -0
- package/dist/lexicon/types/com/atproto/repo/applyWrites.d.ts.map +1 -1
- package/dist/lexicon/types/com/atproto/repo/applyWrites.js.map +1 -1
- package/dist/lexicon/types/com/atproto/sync/listReposByCollection.d.ts +46 -0
- package/dist/lexicon/types/com/atproto/sync/listReposByCollection.d.ts.map +1 -0
- package/dist/lexicon/types/com/atproto/sync/listReposByCollection.js +16 -0
- package/dist/lexicon/types/com/atproto/sync/listReposByCollection.js.map +1 -0
- package/package.json +4 -4
- package/src/lexicon/index.ts +36 -0
- package/src/lexicon/lexicons.ts +225 -2
- package/src/lexicon/types/chat/bsky/convo/acceptConvo.ts +53 -0
- package/src/lexicon/types/chat/bsky/convo/defs.ts +66 -1
- package/src/lexicon/types/chat/bsky/convo/getConvoAvailability.ts +51 -0
- package/src/lexicon/types/chat/bsky/convo/getLog.ts +1 -0
- package/src/lexicon/types/chat/bsky/convo/listConvos.ts +2 -0
- package/src/lexicon/types/com/atproto/repo/applyWrites.ts +1 -0
- package/src/lexicon/types/com/atproto/sync/listReposByCollection.ts +68 -0
- package/tsconfig.build.tsbuildinfo +1 -1
package/src/lexicon/lexicons.ts
CHANGED
|
@@ -1371,6 +1371,9 @@ export const schemaDict = {
|
|
|
1371
1371
|
rkey: {
|
|
1372
1372
|
type: 'string',
|
|
1373
1373
|
maxLength: 512,
|
|
1374
|
+
format: 'record-key',
|
|
1375
|
+
description:
|
|
1376
|
+
'NOTE: maxLength is redundant with record-key format. Keeping it temporarily to ensure backwards compatibility.',
|
|
1374
1377
|
},
|
|
1375
1378
|
value: {
|
|
1376
1379
|
type: 'unknown',
|
|
@@ -1388,6 +1391,7 @@ export const schemaDict = {
|
|
|
1388
1391
|
},
|
|
1389
1392
|
rkey: {
|
|
1390
1393
|
type: 'string',
|
|
1394
|
+
format: 'record-key',
|
|
1391
1395
|
},
|
|
1392
1396
|
value: {
|
|
1393
1397
|
type: 'unknown',
|
|
@@ -1405,6 +1409,7 @@ export const schemaDict = {
|
|
|
1405
1409
|
},
|
|
1406
1410
|
rkey: {
|
|
1407
1411
|
type: 'string',
|
|
1412
|
+
format: 'record-key',
|
|
1408
1413
|
},
|
|
1409
1414
|
},
|
|
1410
1415
|
},
|
|
@@ -1478,6 +1483,7 @@ export const schemaDict = {
|
|
|
1478
1483
|
},
|
|
1479
1484
|
rkey: {
|
|
1480
1485
|
type: 'string',
|
|
1486
|
+
format: 'record-key',
|
|
1481
1487
|
description: 'The Record Key.',
|
|
1482
1488
|
maxLength: 512,
|
|
1483
1489
|
},
|
|
@@ -1548,6 +1554,7 @@ export const schemaDict = {
|
|
|
1548
1554
|
},
|
|
1549
1555
|
rev: {
|
|
1550
1556
|
type: 'string',
|
|
1557
|
+
format: 'tid',
|
|
1551
1558
|
},
|
|
1552
1559
|
},
|
|
1553
1560
|
},
|
|
@@ -1580,6 +1587,7 @@ export const schemaDict = {
|
|
|
1580
1587
|
},
|
|
1581
1588
|
rkey: {
|
|
1582
1589
|
type: 'string',
|
|
1590
|
+
format: 'record-key',
|
|
1583
1591
|
description: 'The Record Key.',
|
|
1584
1592
|
},
|
|
1585
1593
|
swapRecord: {
|
|
@@ -1705,6 +1713,7 @@ export const schemaDict = {
|
|
|
1705
1713
|
rkey: {
|
|
1706
1714
|
type: 'string',
|
|
1707
1715
|
description: 'The Record Key.',
|
|
1716
|
+
format: 'record-key',
|
|
1708
1717
|
},
|
|
1709
1718
|
cid: {
|
|
1710
1719
|
type: 'string',
|
|
@@ -1929,6 +1938,7 @@ export const schemaDict = {
|
|
|
1929
1938
|
},
|
|
1930
1939
|
rkey: {
|
|
1931
1940
|
type: 'string',
|
|
1941
|
+
format: 'record-key',
|
|
1932
1942
|
description: 'The Record Key.',
|
|
1933
1943
|
maxLength: 512,
|
|
1934
1944
|
},
|
|
@@ -3347,6 +3357,7 @@ export const schemaDict = {
|
|
|
3347
3357
|
},
|
|
3348
3358
|
rev: {
|
|
3349
3359
|
type: 'string',
|
|
3360
|
+
format: 'tid',
|
|
3350
3361
|
},
|
|
3351
3362
|
},
|
|
3352
3363
|
},
|
|
@@ -3392,6 +3403,7 @@ export const schemaDict = {
|
|
|
3392
3403
|
rkey: {
|
|
3393
3404
|
type: 'string',
|
|
3394
3405
|
description: 'Record Key',
|
|
3406
|
+
format: 'record-key',
|
|
3395
3407
|
},
|
|
3396
3408
|
commit: {
|
|
3397
3409
|
type: 'string',
|
|
@@ -3443,6 +3455,7 @@ export const schemaDict = {
|
|
|
3443
3455
|
},
|
|
3444
3456
|
since: {
|
|
3445
3457
|
type: 'string',
|
|
3458
|
+
format: 'tid',
|
|
3446
3459
|
description:
|
|
3447
3460
|
"The revision ('rev') of the repo to create a diff from.",
|
|
3448
3461
|
},
|
|
@@ -3508,6 +3521,7 @@ export const schemaDict = {
|
|
|
3508
3521
|
},
|
|
3509
3522
|
rev: {
|
|
3510
3523
|
type: 'string',
|
|
3524
|
+
format: 'tid',
|
|
3511
3525
|
description:
|
|
3512
3526
|
'Optional field, the current rev of the repo, if active=true',
|
|
3513
3527
|
},
|
|
@@ -3541,6 +3555,7 @@ export const schemaDict = {
|
|
|
3541
3555
|
},
|
|
3542
3556
|
since: {
|
|
3543
3557
|
type: 'string',
|
|
3558
|
+
format: 'tid',
|
|
3544
3559
|
description: 'Optional revision of the repo to list blobs since.',
|
|
3545
3560
|
},
|
|
3546
3561
|
limit: {
|
|
@@ -3647,6 +3662,7 @@ export const schemaDict = {
|
|
|
3647
3662
|
},
|
|
3648
3663
|
rev: {
|
|
3649
3664
|
type: 'string',
|
|
3665
|
+
format: 'tid',
|
|
3650
3666
|
},
|
|
3651
3667
|
active: {
|
|
3652
3668
|
type: 'boolean',
|
|
@@ -3661,6 +3677,67 @@ export const schemaDict = {
|
|
|
3661
3677
|
},
|
|
3662
3678
|
},
|
|
3663
3679
|
},
|
|
3680
|
+
ComAtprotoSyncListReposByCollection: {
|
|
3681
|
+
lexicon: 1,
|
|
3682
|
+
id: 'com.atproto.sync.listReposByCollection',
|
|
3683
|
+
defs: {
|
|
3684
|
+
main: {
|
|
3685
|
+
type: 'query',
|
|
3686
|
+
description:
|
|
3687
|
+
'Enumerates all the DIDs which have records with the given collection NSID.',
|
|
3688
|
+
parameters: {
|
|
3689
|
+
type: 'params',
|
|
3690
|
+
required: ['collection'],
|
|
3691
|
+
properties: {
|
|
3692
|
+
collection: {
|
|
3693
|
+
type: 'string',
|
|
3694
|
+
format: 'nsid',
|
|
3695
|
+
},
|
|
3696
|
+
limit: {
|
|
3697
|
+
type: 'integer',
|
|
3698
|
+
description:
|
|
3699
|
+
'Maximum size of response set. Recommend setting a large maximum (1000+) when enumerating large DID lists.',
|
|
3700
|
+
minimum: 1,
|
|
3701
|
+
maximum: 2000,
|
|
3702
|
+
default: 500,
|
|
3703
|
+
},
|
|
3704
|
+
cursor: {
|
|
3705
|
+
type: 'string',
|
|
3706
|
+
},
|
|
3707
|
+
},
|
|
3708
|
+
},
|
|
3709
|
+
output: {
|
|
3710
|
+
encoding: 'application/json',
|
|
3711
|
+
schema: {
|
|
3712
|
+
type: 'object',
|
|
3713
|
+
required: ['repos'],
|
|
3714
|
+
properties: {
|
|
3715
|
+
cursor: {
|
|
3716
|
+
type: 'string',
|
|
3717
|
+
},
|
|
3718
|
+
repos: {
|
|
3719
|
+
type: 'array',
|
|
3720
|
+
items: {
|
|
3721
|
+
type: 'ref',
|
|
3722
|
+
ref: 'lex:com.atproto.sync.listReposByCollection#repo',
|
|
3723
|
+
},
|
|
3724
|
+
},
|
|
3725
|
+
},
|
|
3726
|
+
},
|
|
3727
|
+
},
|
|
3728
|
+
},
|
|
3729
|
+
repo: {
|
|
3730
|
+
type: 'object',
|
|
3731
|
+
required: ['did'],
|
|
3732
|
+
properties: {
|
|
3733
|
+
did: {
|
|
3734
|
+
type: 'string',
|
|
3735
|
+
format: 'did',
|
|
3736
|
+
},
|
|
3737
|
+
},
|
|
3738
|
+
},
|
|
3739
|
+
},
|
|
3740
|
+
},
|
|
3664
3741
|
ComAtprotoSyncNotifyOfUpdate: {
|
|
3665
3742
|
lexicon: 1,
|
|
3666
3743
|
id: 'com.atproto.sync.notifyOfUpdate',
|
|
@@ -3801,11 +3878,13 @@ export const schemaDict = {
|
|
|
3801
3878
|
},
|
|
3802
3879
|
rev: {
|
|
3803
3880
|
type: 'string',
|
|
3881
|
+
format: 'tid',
|
|
3804
3882
|
description:
|
|
3805
3883
|
'The rev of the emitted commit. Note that this information is also in the commit object included in blocks, unless this is a tooBig event.',
|
|
3806
3884
|
},
|
|
3807
3885
|
since: {
|
|
3808
3886
|
type: 'string',
|
|
3887
|
+
format: 'tid',
|
|
3809
3888
|
description:
|
|
3810
3889
|
'The rev of the last emitted commit from this repo (if any).',
|
|
3811
3890
|
},
|
|
@@ -10127,6 +10206,40 @@ export const schemaDict = {
|
|
|
10127
10206
|
},
|
|
10128
10207
|
},
|
|
10129
10208
|
},
|
|
10209
|
+
ChatBskyConvoAcceptConvo: {
|
|
10210
|
+
lexicon: 1,
|
|
10211
|
+
id: 'chat.bsky.convo.acceptConvo',
|
|
10212
|
+
defs: {
|
|
10213
|
+
main: {
|
|
10214
|
+
type: 'procedure',
|
|
10215
|
+
input: {
|
|
10216
|
+
encoding: 'application/json',
|
|
10217
|
+
schema: {
|
|
10218
|
+
type: 'object',
|
|
10219
|
+
required: ['convoId'],
|
|
10220
|
+
properties: {
|
|
10221
|
+
convoId: {
|
|
10222
|
+
type: 'string',
|
|
10223
|
+
},
|
|
10224
|
+
},
|
|
10225
|
+
},
|
|
10226
|
+
},
|
|
10227
|
+
output: {
|
|
10228
|
+
encoding: 'application/json',
|
|
10229
|
+
schema: {
|
|
10230
|
+
type: 'object',
|
|
10231
|
+
properties: {
|
|
10232
|
+
rev: {
|
|
10233
|
+
description:
|
|
10234
|
+
'Rev when the convo was accepted. If not present, the convo was already accepted.',
|
|
10235
|
+
type: 'string',
|
|
10236
|
+
},
|
|
10237
|
+
},
|
|
10238
|
+
},
|
|
10239
|
+
},
|
|
10240
|
+
},
|
|
10241
|
+
},
|
|
10242
|
+
},
|
|
10130
10243
|
ChatBskyConvoDefs: {
|
|
10131
10244
|
lexicon: 1,
|
|
10132
10245
|
id: 'chat.bsky.convo.defs',
|
|
@@ -10264,8 +10377,9 @@ export const schemaDict = {
|
|
|
10264
10377
|
muted: {
|
|
10265
10378
|
type: 'boolean',
|
|
10266
10379
|
},
|
|
10267
|
-
|
|
10268
|
-
type: '
|
|
10380
|
+
status: {
|
|
10381
|
+
type: 'string',
|
|
10382
|
+
knownValues: ['request', 'accepted'],
|
|
10269
10383
|
},
|
|
10270
10384
|
unreadCount: {
|
|
10271
10385
|
type: 'integer',
|
|
@@ -10284,6 +10398,18 @@ export const schemaDict = {
|
|
|
10284
10398
|
},
|
|
10285
10399
|
},
|
|
10286
10400
|
},
|
|
10401
|
+
logAcceptConvo: {
|
|
10402
|
+
type: 'object',
|
|
10403
|
+
required: ['rev', 'convoId'],
|
|
10404
|
+
properties: {
|
|
10405
|
+
rev: {
|
|
10406
|
+
type: 'string',
|
|
10407
|
+
},
|
|
10408
|
+
convoId: {
|
|
10409
|
+
type: 'string',
|
|
10410
|
+
},
|
|
10411
|
+
},
|
|
10412
|
+
},
|
|
10287
10413
|
logLeaveConvo: {
|
|
10288
10414
|
type: 'object',
|
|
10289
10415
|
required: ['rev', 'convoId'],
|
|
@@ -10296,6 +10422,30 @@ export const schemaDict = {
|
|
|
10296
10422
|
},
|
|
10297
10423
|
},
|
|
10298
10424
|
},
|
|
10425
|
+
logMuteConvo: {
|
|
10426
|
+
type: 'object',
|
|
10427
|
+
required: ['rev', 'convoId'],
|
|
10428
|
+
properties: {
|
|
10429
|
+
rev: {
|
|
10430
|
+
type: 'string',
|
|
10431
|
+
},
|
|
10432
|
+
convoId: {
|
|
10433
|
+
type: 'string',
|
|
10434
|
+
},
|
|
10435
|
+
},
|
|
10436
|
+
},
|
|
10437
|
+
logUnmuteConvo: {
|
|
10438
|
+
type: 'object',
|
|
10439
|
+
required: ['rev', 'convoId'],
|
|
10440
|
+
properties: {
|
|
10441
|
+
rev: {
|
|
10442
|
+
type: 'string',
|
|
10443
|
+
},
|
|
10444
|
+
convoId: {
|
|
10445
|
+
type: 'string',
|
|
10446
|
+
},
|
|
10447
|
+
},
|
|
10448
|
+
},
|
|
10299
10449
|
logCreateMessage: {
|
|
10300
10450
|
type: 'object',
|
|
10301
10451
|
required: ['rev', 'convoId', 'message'],
|
|
@@ -10334,6 +10484,25 @@ export const schemaDict = {
|
|
|
10334
10484
|
},
|
|
10335
10485
|
},
|
|
10336
10486
|
},
|
|
10487
|
+
logReadMessage: {
|
|
10488
|
+
type: 'object',
|
|
10489
|
+
required: ['rev', 'convoId', 'message'],
|
|
10490
|
+
properties: {
|
|
10491
|
+
rev: {
|
|
10492
|
+
type: 'string',
|
|
10493
|
+
},
|
|
10494
|
+
convoId: {
|
|
10495
|
+
type: 'string',
|
|
10496
|
+
},
|
|
10497
|
+
message: {
|
|
10498
|
+
type: 'union',
|
|
10499
|
+
refs: [
|
|
10500
|
+
'lex:chat.bsky.convo.defs#messageView',
|
|
10501
|
+
'lex:chat.bsky.convo.defs#deletedMessageView',
|
|
10502
|
+
],
|
|
10503
|
+
},
|
|
10504
|
+
},
|
|
10505
|
+
},
|
|
10337
10506
|
},
|
|
10338
10507
|
},
|
|
10339
10508
|
ChatBskyConvoDeleteMessageForSelf: {
|
|
@@ -10398,6 +10567,48 @@ export const schemaDict = {
|
|
|
10398
10567
|
},
|
|
10399
10568
|
},
|
|
10400
10569
|
},
|
|
10570
|
+
ChatBskyConvoGetConvoAvailability: {
|
|
10571
|
+
lexicon: 1,
|
|
10572
|
+
id: 'chat.bsky.convo.getConvoAvailability',
|
|
10573
|
+
defs: {
|
|
10574
|
+
main: {
|
|
10575
|
+
type: 'query',
|
|
10576
|
+
description:
|
|
10577
|
+
'Get whether the requester and the other members can chat. If an existing convo is found for these members, it is returned.',
|
|
10578
|
+
parameters: {
|
|
10579
|
+
type: 'params',
|
|
10580
|
+
required: ['members'],
|
|
10581
|
+
properties: {
|
|
10582
|
+
members: {
|
|
10583
|
+
type: 'array',
|
|
10584
|
+
minLength: 1,
|
|
10585
|
+
maxLength: 10,
|
|
10586
|
+
items: {
|
|
10587
|
+
type: 'string',
|
|
10588
|
+
format: 'did',
|
|
10589
|
+
},
|
|
10590
|
+
},
|
|
10591
|
+
},
|
|
10592
|
+
},
|
|
10593
|
+
output: {
|
|
10594
|
+
encoding: 'application/json',
|
|
10595
|
+
schema: {
|
|
10596
|
+
type: 'object',
|
|
10597
|
+
required: ['canChat'],
|
|
10598
|
+
properties: {
|
|
10599
|
+
canChat: {
|
|
10600
|
+
type: 'boolean',
|
|
10601
|
+
},
|
|
10602
|
+
convo: {
|
|
10603
|
+
type: 'ref',
|
|
10604
|
+
ref: 'lex:chat.bsky.convo.defs#convoView',
|
|
10605
|
+
},
|
|
10606
|
+
},
|
|
10607
|
+
},
|
|
10608
|
+
},
|
|
10609
|
+
},
|
|
10610
|
+
},
|
|
10611
|
+
},
|
|
10401
10612
|
ChatBskyConvoGetConvoForMembers: {
|
|
10402
10613
|
lexicon: 1,
|
|
10403
10614
|
id: 'chat.bsky.convo.getConvoForMembers',
|
|
@@ -10465,6 +10676,7 @@ export const schemaDict = {
|
|
|
10465
10676
|
type: 'union',
|
|
10466
10677
|
refs: [
|
|
10467
10678
|
'lex:chat.bsky.convo.defs#logBeginConvo',
|
|
10679
|
+
'lex:chat.bsky.convo.defs#logAcceptConvo',
|
|
10468
10680
|
'lex:chat.bsky.convo.defs#logLeaveConvo',
|
|
10469
10681
|
'lex:chat.bsky.convo.defs#logCreateMessage',
|
|
10470
10682
|
'lex:chat.bsky.convo.defs#logDeleteMessage',
|
|
@@ -10580,6 +10792,14 @@ export const schemaDict = {
|
|
|
10580
10792
|
cursor: {
|
|
10581
10793
|
type: 'string',
|
|
10582
10794
|
},
|
|
10795
|
+
readState: {
|
|
10796
|
+
type: 'string',
|
|
10797
|
+
knownValues: ['unread'],
|
|
10798
|
+
},
|
|
10799
|
+
status: {
|
|
10800
|
+
type: 'string',
|
|
10801
|
+
knownValues: ['request', 'accepted'],
|
|
10802
|
+
},
|
|
10583
10803
|
},
|
|
10584
10804
|
},
|
|
10585
10805
|
output: {
|
|
@@ -11055,6 +11275,7 @@ export const ids = {
|
|
|
11055
11275
|
ComAtprotoSyncGetRepoStatus: 'com.atproto.sync.getRepoStatus',
|
|
11056
11276
|
ComAtprotoSyncListBlobs: 'com.atproto.sync.listBlobs',
|
|
11057
11277
|
ComAtprotoSyncListRepos: 'com.atproto.sync.listRepos',
|
|
11278
|
+
ComAtprotoSyncListReposByCollection: 'com.atproto.sync.listReposByCollection',
|
|
11058
11279
|
ComAtprotoSyncNotifyOfUpdate: 'com.atproto.sync.notifyOfUpdate',
|
|
11059
11280
|
ComAtprotoSyncRequestCrawl: 'com.atproto.sync.requestCrawl',
|
|
11060
11281
|
ComAtprotoSyncSubscribeRepos: 'com.atproto.sync.subscribeRepos',
|
|
@@ -11164,9 +11385,11 @@ export const ids = {
|
|
|
11164
11385
|
ChatBskyActorDefs: 'chat.bsky.actor.defs',
|
|
11165
11386
|
ChatBskyActorDeleteAccount: 'chat.bsky.actor.deleteAccount',
|
|
11166
11387
|
ChatBskyActorExportAccountData: 'chat.bsky.actor.exportAccountData',
|
|
11388
|
+
ChatBskyConvoAcceptConvo: 'chat.bsky.convo.acceptConvo',
|
|
11167
11389
|
ChatBskyConvoDefs: 'chat.bsky.convo.defs',
|
|
11168
11390
|
ChatBskyConvoDeleteMessageForSelf: 'chat.bsky.convo.deleteMessageForSelf',
|
|
11169
11391
|
ChatBskyConvoGetConvo: 'chat.bsky.convo.getConvo',
|
|
11392
|
+
ChatBskyConvoGetConvoAvailability: 'chat.bsky.convo.getConvoAvailability',
|
|
11170
11393
|
ChatBskyConvoGetConvoForMembers: 'chat.bsky.convo.getConvoForMembers',
|
|
11171
11394
|
ChatBskyConvoGetLog: 'chat.bsky.convo.getLog',
|
|
11172
11395
|
ChatBskyConvoGetMessages: 'chat.bsky.convo.getMessages',
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import express from 'express'
|
|
5
|
+
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
6
|
+
import { CID } from 'multiformats/cid'
|
|
7
|
+
import { validate as _validate } from '../../../../lexicons'
|
|
8
|
+
import { $Typed, is$typed as _is$typed, OmitKey } from '../../../../util'
|
|
9
|
+
import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
|
|
10
|
+
|
|
11
|
+
const is$typed = _is$typed,
|
|
12
|
+
validate = _validate
|
|
13
|
+
const id = 'chat.bsky.convo.acceptConvo'
|
|
14
|
+
|
|
15
|
+
export interface QueryParams {}
|
|
16
|
+
|
|
17
|
+
export interface InputSchema {
|
|
18
|
+
convoId: string
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface OutputSchema {
|
|
22
|
+
/** Rev when the convo was accepted. If not present, the convo was already accepted. */
|
|
23
|
+
rev?: string
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface HandlerInput {
|
|
27
|
+
encoding: 'application/json'
|
|
28
|
+
body: InputSchema
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface HandlerSuccess {
|
|
32
|
+
encoding: 'application/json'
|
|
33
|
+
body: OutputSchema
|
|
34
|
+
headers?: { [key: string]: string }
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface HandlerError {
|
|
38
|
+
status: number
|
|
39
|
+
message?: string
|
|
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
|
+
resetRouteRateLimits: () => Promise<void>
|
|
50
|
+
}
|
|
51
|
+
export type Handler<HA extends HandlerAuth = never> = (
|
|
52
|
+
ctx: HandlerReqCtx<HA>,
|
|
53
|
+
) => Promise<HandlerOutput> | HandlerOutput
|
|
@@ -113,7 +113,7 @@ export interface ConvoView {
|
|
|
113
113
|
| $Typed<DeletedMessageView>
|
|
114
114
|
| { $type: string }
|
|
115
115
|
muted: boolean
|
|
116
|
-
|
|
116
|
+
status?: 'request' | 'accepted' | (string & {})
|
|
117
117
|
unreadCount: number
|
|
118
118
|
}
|
|
119
119
|
|
|
@@ -143,6 +143,22 @@ export function validateLogBeginConvo<V>(v: V) {
|
|
|
143
143
|
return validate<LogBeginConvo & V>(v, id, hashLogBeginConvo)
|
|
144
144
|
}
|
|
145
145
|
|
|
146
|
+
export interface LogAcceptConvo {
|
|
147
|
+
$type?: 'chat.bsky.convo.defs#logAcceptConvo'
|
|
148
|
+
rev: string
|
|
149
|
+
convoId: string
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
const hashLogAcceptConvo = 'logAcceptConvo'
|
|
153
|
+
|
|
154
|
+
export function isLogAcceptConvo<V>(v: V) {
|
|
155
|
+
return is$typed(v, id, hashLogAcceptConvo)
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
export function validateLogAcceptConvo<V>(v: V) {
|
|
159
|
+
return validate<LogAcceptConvo & V>(v, id, hashLogAcceptConvo)
|
|
160
|
+
}
|
|
161
|
+
|
|
146
162
|
export interface LogLeaveConvo {
|
|
147
163
|
$type?: 'chat.bsky.convo.defs#logLeaveConvo'
|
|
148
164
|
rev: string
|
|
@@ -159,6 +175,38 @@ export function validateLogLeaveConvo<V>(v: V) {
|
|
|
159
175
|
return validate<LogLeaveConvo & V>(v, id, hashLogLeaveConvo)
|
|
160
176
|
}
|
|
161
177
|
|
|
178
|
+
export interface LogMuteConvo {
|
|
179
|
+
$type?: 'chat.bsky.convo.defs#logMuteConvo'
|
|
180
|
+
rev: string
|
|
181
|
+
convoId: string
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
const hashLogMuteConvo = 'logMuteConvo'
|
|
185
|
+
|
|
186
|
+
export function isLogMuteConvo<V>(v: V) {
|
|
187
|
+
return is$typed(v, id, hashLogMuteConvo)
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
export function validateLogMuteConvo<V>(v: V) {
|
|
191
|
+
return validate<LogMuteConvo & V>(v, id, hashLogMuteConvo)
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
export interface LogUnmuteConvo {
|
|
195
|
+
$type?: 'chat.bsky.convo.defs#logUnmuteConvo'
|
|
196
|
+
rev: string
|
|
197
|
+
convoId: string
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
const hashLogUnmuteConvo = 'logUnmuteConvo'
|
|
201
|
+
|
|
202
|
+
export function isLogUnmuteConvo<V>(v: V) {
|
|
203
|
+
return is$typed(v, id, hashLogUnmuteConvo)
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
export function validateLogUnmuteConvo<V>(v: V) {
|
|
207
|
+
return validate<LogUnmuteConvo & V>(v, id, hashLogUnmuteConvo)
|
|
208
|
+
}
|
|
209
|
+
|
|
162
210
|
export interface LogCreateMessage {
|
|
163
211
|
$type?: 'chat.bsky.convo.defs#logCreateMessage'
|
|
164
212
|
rev: string
|
|
@@ -192,3 +240,20 @@ export function isLogDeleteMessage<V>(v: V) {
|
|
|
192
240
|
export function validateLogDeleteMessage<V>(v: V) {
|
|
193
241
|
return validate<LogDeleteMessage & V>(v, id, hashLogDeleteMessage)
|
|
194
242
|
}
|
|
243
|
+
|
|
244
|
+
export interface LogReadMessage {
|
|
245
|
+
$type?: 'chat.bsky.convo.defs#logReadMessage'
|
|
246
|
+
rev: string
|
|
247
|
+
convoId: string
|
|
248
|
+
message: $Typed<MessageView> | $Typed<DeletedMessageView> | { $type: string }
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
const hashLogReadMessage = 'logReadMessage'
|
|
252
|
+
|
|
253
|
+
export function isLogReadMessage<V>(v: V) {
|
|
254
|
+
return is$typed(v, id, hashLogReadMessage)
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
export function validateLogReadMessage<V>(v: V) {
|
|
258
|
+
return validate<LogReadMessage & V>(v, id, hashLogReadMessage)
|
|
259
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import express from 'express'
|
|
5
|
+
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
6
|
+
import { CID } from 'multiformats/cid'
|
|
7
|
+
import { validate as _validate } from '../../../../lexicons'
|
|
8
|
+
import { $Typed, is$typed as _is$typed, OmitKey } from '../../../../util'
|
|
9
|
+
import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
|
|
10
|
+
import type * as ChatBskyConvoDefs from './defs.js'
|
|
11
|
+
|
|
12
|
+
const is$typed = _is$typed,
|
|
13
|
+
validate = _validate
|
|
14
|
+
const id = 'chat.bsky.convo.getConvoAvailability'
|
|
15
|
+
|
|
16
|
+
export interface QueryParams {
|
|
17
|
+
members: string[]
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export type InputSchema = undefined
|
|
21
|
+
|
|
22
|
+
export interface OutputSchema {
|
|
23
|
+
canChat: boolean
|
|
24
|
+
convo?: ChatBskyConvoDefs.ConvoView
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export type HandlerInput = undefined
|
|
28
|
+
|
|
29
|
+
export interface HandlerSuccess {
|
|
30
|
+
encoding: 'application/json'
|
|
31
|
+
body: OutputSchema
|
|
32
|
+
headers?: { [key: string]: string }
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface HandlerError {
|
|
36
|
+
status: number
|
|
37
|
+
message?: string
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
|
|
41
|
+
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
|
42
|
+
auth: HA
|
|
43
|
+
params: QueryParams
|
|
44
|
+
input: HandlerInput
|
|
45
|
+
req: express.Request
|
|
46
|
+
res: express.Response
|
|
47
|
+
resetRouteRateLimits: () => Promise<void>
|
|
48
|
+
}
|
|
49
|
+
export type Handler<HA extends HandlerAuth = never> = (
|
|
50
|
+
ctx: HandlerReqCtx<HA>,
|
|
51
|
+
) => Promise<HandlerOutput> | HandlerOutput
|
|
@@ -23,6 +23,7 @@ export interface OutputSchema {
|
|
|
23
23
|
cursor?: string
|
|
24
24
|
logs: (
|
|
25
25
|
| $Typed<ChatBskyConvoDefs.LogBeginConvo>
|
|
26
|
+
| $Typed<ChatBskyConvoDefs.LogAcceptConvo>
|
|
26
27
|
| $Typed<ChatBskyConvoDefs.LogLeaveConvo>
|
|
27
28
|
| $Typed<ChatBskyConvoDefs.LogCreateMessage>
|
|
28
29
|
| $Typed<ChatBskyConvoDefs.LogDeleteMessage>
|
|
@@ -68,6 +68,7 @@ export type Handler<HA extends HandlerAuth = never> = (
|
|
|
68
68
|
export interface Create {
|
|
69
69
|
$type?: 'com.atproto.repo.applyWrites#create'
|
|
70
70
|
collection: string
|
|
71
|
+
/** NOTE: maxLength is redundant with record-key format. Keeping it temporarily to ensure backwards compatibility. */
|
|
71
72
|
rkey?: string
|
|
72
73
|
value: { [_ in string]: unknown }
|
|
73
74
|
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import express from 'express'
|
|
5
|
+
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
6
|
+
import { CID } from 'multiformats/cid'
|
|
7
|
+
import { validate as _validate } from '../../../../lexicons'
|
|
8
|
+
import { $Typed, is$typed as _is$typed, OmitKey } from '../../../../util'
|
|
9
|
+
import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
|
|
10
|
+
|
|
11
|
+
const is$typed = _is$typed,
|
|
12
|
+
validate = _validate
|
|
13
|
+
const id = 'com.atproto.sync.listReposByCollection'
|
|
14
|
+
|
|
15
|
+
export interface QueryParams {
|
|
16
|
+
collection: string
|
|
17
|
+
/** Maximum size of response set. Recommend setting a large maximum (1000+) when enumerating large DID lists. */
|
|
18
|
+
limit: number
|
|
19
|
+
cursor?: string
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export type InputSchema = undefined
|
|
23
|
+
|
|
24
|
+
export interface OutputSchema {
|
|
25
|
+
cursor?: string
|
|
26
|
+
repos: Repo[]
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export type HandlerInput = undefined
|
|
30
|
+
|
|
31
|
+
export interface HandlerSuccess {
|
|
32
|
+
encoding: 'application/json'
|
|
33
|
+
body: OutputSchema
|
|
34
|
+
headers?: { [key: string]: string }
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface HandlerError {
|
|
38
|
+
status: number
|
|
39
|
+
message?: string
|
|
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
|
+
resetRouteRateLimits: () => Promise<void>
|
|
50
|
+
}
|
|
51
|
+
export type Handler<HA extends HandlerAuth = never> = (
|
|
52
|
+
ctx: HandlerReqCtx<HA>,
|
|
53
|
+
) => Promise<HandlerOutput> | HandlerOutput
|
|
54
|
+
|
|
55
|
+
export interface Repo {
|
|
56
|
+
$type?: 'com.atproto.sync.listReposByCollection#repo'
|
|
57
|
+
did: string
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
const hashRepo = 'repo'
|
|
61
|
+
|
|
62
|
+
export function isRepo<V>(v: V) {
|
|
63
|
+
return is$typed(v, id, hashRepo)
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export function validateRepo<V>(v: V) {
|
|
67
|
+
return validate<Repo & V>(v, id, hashRepo)
|
|
68
|
+
}
|