@atproto/api 0.6.12 → 0.6.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.
Files changed (87) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/client/index.d.ts +58 -8
  3. package/dist/client/lexicons.d.ts +259 -29
  4. package/dist/client/types/app/bsky/feed/defs.d.ts +18 -0
  5. package/dist/client/types/app/bsky/feed/{getSavedFeeds.d.ts → getListFeed.d.ts} +6 -2
  6. package/dist/client/types/app/bsky/feed/threadgate.d.ts +26 -0
  7. package/dist/client/types/app/bsky/graph/defs.d.ts +3 -1
  8. package/dist/client/types/app/bsky/{notification/getCount.d.ts → graph/getSuggestedFollowsByActor.d.ts} +3 -1
  9. package/dist/index.js +564 -165
  10. package/dist/index.js.map +3 -3
  11. package/package.json +4 -4
  12. package/src/client/index.ts +183 -23
  13. package/src/client/lexicons.ts +272 -30
  14. package/src/client/types/app/bsky/feed/defs.ts +40 -0
  15. package/src/client/types/app/bsky/feed/getListFeed.ts +46 -0
  16. package/src/client/types/app/bsky/feed/threadgate.ts +80 -0
  17. package/src/client/types/app/bsky/graph/defs.ts +7 -1
  18. package/src/client/types/app/bsky/graph/getListBlocks.ts +38 -0
  19. package/src/client/types/{com/atproto/temp/upgradeRepoVersion.ts → app/bsky/graph/getSuggestedFollowsByActor.ts} +9 -6
  20. package/src/client/types/app/bsky/graph/listblock.ts +26 -0
  21. package/dist/client/types/app/bsky/actor/createScene.d.ts +0 -32
  22. package/dist/client/types/app/bsky/actor/ref.d.ts +0 -28
  23. package/dist/client/types/app/bsky/actor/search.d.ts +0 -22
  24. package/dist/client/types/app/bsky/actor/searchTypeahead.d.ts +0 -20
  25. package/dist/client/types/app/bsky/actor/updateProfile.d.ts +0 -40
  26. package/dist/client/types/app/bsky/feed/feedViewPost.d.ts +0 -28
  27. package/dist/client/types/app/bsky/feed/getVotes.d.ts +0 -36
  28. package/dist/client/types/app/bsky/feed/saveFeed.d.ts +0 -17
  29. package/dist/client/types/app/bsky/feed/setVote.d.ts +0 -25
  30. package/dist/client/types/app/bsky/feed/trend.d.ts +0 -9
  31. package/dist/client/types/app/bsky/feed/unsaveFeed.d.ts +0 -17
  32. package/dist/client/types/app/bsky/feed/vote.d.ts +0 -10
  33. package/dist/client/types/app/bsky/graph/assertCreator.d.ts +0 -1
  34. package/dist/client/types/app/bsky/graph/assertMember.d.ts +0 -1
  35. package/dist/client/types/app/bsky/graph/assertion.d.ts +0 -10
  36. package/dist/client/types/app/bsky/graph/confirmation.d.ts +0 -11
  37. package/dist/client/types/app/bsky/graph/getAssertions.d.ts +0 -48
  38. package/dist/client/types/app/bsky/graph/getMembers.d.ts +0 -36
  39. package/dist/client/types/app/bsky/graph/getMemberships.d.ts +0 -36
  40. package/dist/client/types/app/bsky/graph/mute.d.ts +0 -17
  41. package/dist/client/types/app/bsky/graph/subscribeMuteList.d.ts +0 -17
  42. package/dist/client/types/app/bsky/graph/unmute.d.ts +0 -17
  43. package/dist/client/types/app/bsky/graph/unsubscribeMuteList.d.ts +0 -17
  44. package/dist/client/types/app/bsky/notification/list.d.ts +0 -35
  45. package/dist/client/types/app/bsky/system/actorScene.d.ts +0 -1
  46. package/dist/client/types/app/bsky/system/actorUser.d.ts +0 -1
  47. package/dist/client/types/app/bsky/system/declRef.d.ts +0 -8
  48. package/dist/client/types/app/bsky/system/declaration.d.ts +0 -7
  49. package/dist/client/types/app/bsky/unspecced/registerPushNotification.d.ts +0 -16
  50. package/dist/client/types/com/atproto/account/create.d.ts +0 -41
  51. package/dist/client/types/com/atproto/account/createInviteCode.d.ts +0 -22
  52. package/dist/client/types/com/atproto/account/delete.d.ts +0 -25
  53. package/dist/client/types/com/atproto/account/get.d.ts +0 -12
  54. package/dist/client/types/com/atproto/account/requestDelete.d.ts +0 -13
  55. package/dist/client/types/com/atproto/account/requestPasswordReset.d.ts +0 -17
  56. package/dist/client/types/com/atproto/account/resetPassword.d.ts +0 -24
  57. package/dist/client/types/com/atproto/admin/blob.d.ts +0 -37
  58. package/dist/client/types/com/atproto/admin/moderationAction.d.ts +0 -60
  59. package/dist/client/types/com/atproto/admin/moderationReport.d.ts +0 -37
  60. package/dist/client/types/com/atproto/admin/rebaseRepo.d.ts +0 -24
  61. package/dist/client/types/com/atproto/admin/record.d.ts +0 -43
  62. package/dist/client/types/com/atproto/admin/repo.d.ts +0 -45
  63. package/dist/client/types/com/atproto/blob/upload.d.ts +0 -19
  64. package/dist/client/types/com/atproto/handle/resolve.d.ts +0 -18
  65. package/dist/client/types/com/atproto/handle/update.d.ts +0 -17
  66. package/dist/client/types/com/atproto/repo/batchWrite.d.ts +0 -46
  67. package/dist/client/types/com/atproto/repo/describe.d.ts +0 -22
  68. package/dist/client/types/com/atproto/repo/rebaseRepo.d.ts +0 -24
  69. package/dist/client/types/com/atproto/repo/recordRef.d.ts +0 -8
  70. package/dist/client/types/com/atproto/repo/repoRef.d.ts +0 -7
  71. package/dist/client/types/com/atproto/report/create.d.ts +0 -39
  72. package/dist/client/types/com/atproto/report/reasonType.d.ts +0 -3
  73. package/dist/client/types/com/atproto/report/subject.d.ts +0 -23
  74. package/dist/client/types/com/atproto/server/getAccountsConfig.d.ts +0 -27
  75. package/dist/client/types/com/atproto/session/create.d.ts +0 -29
  76. package/dist/client/types/com/atproto/session/delete.d.ts +0 -13
  77. package/dist/client/types/com/atproto/session/get.d.ts +0 -18
  78. package/dist/client/types/com/atproto/session/refresh.d.ts +0 -24
  79. package/dist/client/types/com/atproto/sync/getCommitPath.d.ts +0 -20
  80. package/dist/client/types/com/atproto/sync/getRoot.d.ts +0 -18
  81. package/dist/client/types/com/atproto/sync/subscribeAllRepos.d.ts +0 -9
  82. package/dist/client/types/com/atproto/sync/updateRepo.d.ts +0 -15
  83. package/dist/client/types/com/atproto/temp/upgradeRepoVersion.d.ts +0 -18
  84. package/dist/helpers/bsky.d.ts +0 -20
  85. package/dist/mixins/bsky.d.ts +0 -23
  86. package/dist/rich-text/sanitize.d.ts +0 -4
  87. package/dist/session.d.ts +0 -42
@@ -3149,7 +3149,6 @@ export const schemaDict = {
3149
3149
  },
3150
3150
  since: {
3151
3151
  type: 'string',
3152
- format: 'cid',
3153
3152
  description: 'The revision of the repo to catch up from.',
3154
3153
  },
3155
3154
  },
@@ -3178,7 +3177,6 @@ export const schemaDict = {
3178
3177
  },
3179
3178
  since: {
3180
3179
  type: 'string',
3181
- format: 'cid',
3182
3180
  description: 'Optional revision of the repo to list blobs since',
3183
3181
  },
3184
3182
  limit: {
@@ -3519,32 +3517,6 @@ export const schemaDict = {
3519
3517
  },
3520
3518
  },
3521
3519
  },
3522
- ComAtprotoTempUpgradeRepoVersion: {
3523
- lexicon: 1,
3524
- id: 'com.atproto.temp.upgradeRepoVersion',
3525
- defs: {
3526
- main: {
3527
- type: 'procedure',
3528
- description: 'Upgrade a repo to v3',
3529
- input: {
3530
- encoding: 'application/json',
3531
- schema: {
3532
- type: 'object',
3533
- required: ['did'],
3534
- properties: {
3535
- did: {
3536
- type: 'string',
3537
- format: 'did',
3538
- },
3539
- force: {
3540
- type: 'boolean',
3541
- },
3542
- },
3543
- },
3544
- },
3545
- },
3546
- },
3547
- },
3548
3520
  AppBskyActorDefs: {
3549
3521
  lexicon: 1,
3550
3522
  id: 'app.bsky.actor.defs',
@@ -4418,6 +4390,10 @@ export const schemaDict = {
4418
4390
  ref: 'lex:com.atproto.label.defs#label',
4419
4391
  },
4420
4392
  },
4393
+ threadgate: {
4394
+ type: 'ref',
4395
+ ref: 'lex:app.bsky.feed.defs#threadgateView',
4396
+ },
4421
4397
  },
4422
4398
  },
4423
4399
  viewerState: {
@@ -4514,6 +4490,10 @@ export const schemaDict = {
4514
4490
  ],
4515
4491
  },
4516
4492
  },
4493
+ viewer: {
4494
+ type: 'ref',
4495
+ ref: 'lex:app.bsky.feed.defs#viewerThreadState',
4496
+ },
4517
4497
  },
4518
4498
  },
4519
4499
  notFoundPost: {
@@ -4562,6 +4542,14 @@ export const schemaDict = {
4562
4542
  },
4563
4543
  },
4564
4544
  },
4545
+ viewerThreadState: {
4546
+ type: 'object',
4547
+ properties: {
4548
+ canReply: {
4549
+ type: 'boolean',
4550
+ },
4551
+ },
4552
+ },
4565
4553
  generatorView: {
4566
4554
  type: 'object',
4567
4555
  required: ['uri', 'cid', 'did', 'creator', 'displayName', 'indexedAt'],
@@ -4647,6 +4635,29 @@ export const schemaDict = {
4647
4635
  },
4648
4636
  },
4649
4637
  },
4638
+ threadgateView: {
4639
+ type: 'object',
4640
+ properties: {
4641
+ uri: {
4642
+ type: 'string',
4643
+ format: 'at-uri',
4644
+ },
4645
+ cid: {
4646
+ type: 'string',
4647
+ format: 'cid',
4648
+ },
4649
+ record: {
4650
+ type: 'unknown',
4651
+ },
4652
+ lists: {
4653
+ type: 'array',
4654
+ items: {
4655
+ type: 'ref',
4656
+ ref: 'lex:app.bsky.graph.defs#listViewBasic',
4657
+ },
4658
+ },
4659
+ },
4660
+ },
4650
4661
  },
4651
4662
  },
4652
4663
  AppBskyFeedDescribeFeedGenerator: {
@@ -5188,6 +5199,59 @@ export const schemaDict = {
5188
5199
  },
5189
5200
  },
5190
5201
  },
5202
+ AppBskyFeedGetListFeed: {
5203
+ lexicon: 1,
5204
+ id: 'app.bsky.feed.getListFeed',
5205
+ defs: {
5206
+ main: {
5207
+ type: 'query',
5208
+ description: 'A view of a recent posts from actors in a list',
5209
+ parameters: {
5210
+ type: 'params',
5211
+ required: ['list'],
5212
+ properties: {
5213
+ list: {
5214
+ type: 'string',
5215
+ format: 'at-uri',
5216
+ },
5217
+ limit: {
5218
+ type: 'integer',
5219
+ minimum: 1,
5220
+ maximum: 100,
5221
+ default: 50,
5222
+ },
5223
+ cursor: {
5224
+ type: 'string',
5225
+ },
5226
+ },
5227
+ },
5228
+ output: {
5229
+ encoding: 'application/json',
5230
+ schema: {
5231
+ type: 'object',
5232
+ required: ['feed'],
5233
+ properties: {
5234
+ cursor: {
5235
+ type: 'string',
5236
+ },
5237
+ feed: {
5238
+ type: 'array',
5239
+ items: {
5240
+ type: 'ref',
5241
+ ref: 'lex:app.bsky.feed.defs#feedViewPost',
5242
+ },
5243
+ },
5244
+ },
5245
+ },
5246
+ },
5247
+ errors: [
5248
+ {
5249
+ name: 'UnknownList',
5250
+ },
5251
+ ],
5252
+ },
5253
+ },
5254
+ },
5191
5255
  AppBskyFeedGetPostThread: {
5192
5256
  lexicon: 1,
5193
5257
  id: 'app.bsky.feed.getPostThread',
@@ -5590,6 +5654,63 @@ export const schemaDict = {
5590
5654
  },
5591
5655
  },
5592
5656
  },
5657
+ AppBskyFeedThreadgate: {
5658
+ lexicon: 1,
5659
+ id: 'app.bsky.feed.threadgate',
5660
+ defs: {
5661
+ main: {
5662
+ type: 'record',
5663
+ key: 'tid',
5664
+ description:
5665
+ "Defines interaction gating rules for a thread. The rkey of the threadgate record should match the rkey of the thread's root post.",
5666
+ record: {
5667
+ type: 'object',
5668
+ required: ['post', 'createdAt'],
5669
+ properties: {
5670
+ post: {
5671
+ type: 'string',
5672
+ format: 'at-uri',
5673
+ },
5674
+ allow: {
5675
+ type: 'array',
5676
+ maxLength: 5,
5677
+ items: {
5678
+ type: 'union',
5679
+ refs: [
5680
+ 'lex:app.bsky.feed.threadgate#mentionRule',
5681
+ 'lex:app.bsky.feed.threadgate#followingRule',
5682
+ 'lex:app.bsky.feed.threadgate#listRule',
5683
+ ],
5684
+ },
5685
+ },
5686
+ createdAt: {
5687
+ type: 'string',
5688
+ format: 'datetime',
5689
+ },
5690
+ },
5691
+ },
5692
+ },
5693
+ mentionRule: {
5694
+ type: 'object',
5695
+ description: 'Allow replies from actors mentioned in your post.',
5696
+ },
5697
+ followingRule: {
5698
+ type: 'object',
5699
+ description: 'Allow replies from actors you follow.',
5700
+ },
5701
+ listRule: {
5702
+ type: 'object',
5703
+ description: 'Allow replies from actors on a list.',
5704
+ required: ['list'],
5705
+ properties: {
5706
+ list: {
5707
+ type: 'string',
5708
+ format: 'at-uri',
5709
+ },
5710
+ },
5711
+ },
5712
+ },
5713
+ },
5593
5714
  AppBskyGraphBlock: {
5594
5715
  lexicon: 1,
5595
5716
  id: 'app.bsky.graph.block',
@@ -5715,19 +5836,31 @@ export const schemaDict = {
5715
5836
  },
5716
5837
  listPurpose: {
5717
5838
  type: 'string',
5718
- knownValues: ['app.bsky.graph.defs#modlist'],
5839
+ knownValues: [
5840
+ 'app.bsky.graph.defs#modlist',
5841
+ 'app.bsky.graph.defs#curatelist',
5842
+ ],
5719
5843
  },
5720
5844
  modlist: {
5721
5845
  type: 'token',
5722
5846
  description:
5723
5847
  'A list of actors to apply an aggregate moderation action (mute/block) on',
5724
5848
  },
5849
+ curatelist: {
5850
+ type: 'token',
5851
+ description:
5852
+ 'A list of actors used for curation purposes such as list feeds or interaction gating',
5853
+ },
5725
5854
  listViewerState: {
5726
5855
  type: 'object',
5727
5856
  properties: {
5728
5857
  muted: {
5729
5858
  type: 'boolean',
5730
5859
  },
5860
+ blocked: {
5861
+ type: 'string',
5862
+ format: 'at-uri',
5863
+ },
5731
5864
  },
5732
5865
  },
5733
5866
  },
@@ -5956,6 +6089,49 @@ export const schemaDict = {
5956
6089
  },
5957
6090
  },
5958
6091
  },
6092
+ AppBskyGraphGetListBlocks: {
6093
+ lexicon: 1,
6094
+ id: 'app.bsky.graph.getListBlocks',
6095
+ defs: {
6096
+ main: {
6097
+ type: 'query',
6098
+ description: "Which lists is the requester's account blocking?",
6099
+ parameters: {
6100
+ type: 'params',
6101
+ properties: {
6102
+ limit: {
6103
+ type: 'integer',
6104
+ minimum: 1,
6105
+ maximum: 100,
6106
+ default: 50,
6107
+ },
6108
+ cursor: {
6109
+ type: 'string',
6110
+ },
6111
+ },
6112
+ },
6113
+ output: {
6114
+ encoding: 'application/json',
6115
+ schema: {
6116
+ type: 'object',
6117
+ required: ['lists'],
6118
+ properties: {
6119
+ cursor: {
6120
+ type: 'string',
6121
+ },
6122
+ lists: {
6123
+ type: 'array',
6124
+ items: {
6125
+ type: 'ref',
6126
+ ref: 'lex:app.bsky.graph.defs#listView',
6127
+ },
6128
+ },
6129
+ },
6130
+ },
6131
+ },
6132
+ },
6133
+ },
6134
+ },
5959
6135
  AppBskyGraphGetListMutes: {
5960
6136
  lexicon: 1,
5961
6137
  id: 'app.bsky.graph.getListMutes',
@@ -6090,6 +6266,42 @@ export const schemaDict = {
6090
6266
  },
6091
6267
  },
6092
6268
  },
6269
+ AppBskyGraphGetSuggestedFollowsByActor: {
6270
+ lexicon: 1,
6271
+ id: 'app.bsky.graph.getSuggestedFollowsByActor',
6272
+ defs: {
6273
+ main: {
6274
+ type: 'query',
6275
+ description: 'Get suggested follows related to a given actor.',
6276
+ parameters: {
6277
+ type: 'params',
6278
+ required: ['actor'],
6279
+ properties: {
6280
+ actor: {
6281
+ type: 'string',
6282
+ format: 'at-identifier',
6283
+ },
6284
+ },
6285
+ },
6286
+ output: {
6287
+ encoding: 'application/json',
6288
+ schema: {
6289
+ type: 'object',
6290
+ required: ['suggestions'],
6291
+ properties: {
6292
+ suggestions: {
6293
+ type: 'array',
6294
+ items: {
6295
+ type: 'ref',
6296
+ ref: 'lex:app.bsky.actor.defs#profileView',
6297
+ },
6298
+ },
6299
+ },
6300
+ },
6301
+ },
6302
+ },
6303
+ },
6304
+ },
6093
6305
  AppBskyGraphList: {
6094
6306
  lexicon: 1,
6095
6307
  id: 'app.bsky.graph.list',
@@ -6141,6 +6353,31 @@ export const schemaDict = {
6141
6353
  },
6142
6354
  },
6143
6355
  },
6356
+ AppBskyGraphListblock: {
6357
+ lexicon: 1,
6358
+ id: 'app.bsky.graph.listblock',
6359
+ defs: {
6360
+ main: {
6361
+ type: 'record',
6362
+ description: 'A block of an entire list of actors.',
6363
+ key: 'tid',
6364
+ record: {
6365
+ type: 'object',
6366
+ required: ['subject', 'createdAt'],
6367
+ properties: {
6368
+ subject: {
6369
+ type: 'string',
6370
+ format: 'at-uri',
6371
+ },
6372
+ createdAt: {
6373
+ type: 'string',
6374
+ format: 'datetime',
6375
+ },
6376
+ },
6377
+ },
6378
+ },
6379
+ },
6380
+ },
6144
6381
  AppBskyGraphListitem: {
6145
6382
  lexicon: 1,
6146
6383
  id: 'app.bsky.graph.listitem',
@@ -6758,7 +6995,6 @@ export const ids = {
6758
6995
  ComAtprotoSyncNotifyOfUpdate: 'com.atproto.sync.notifyOfUpdate',
6759
6996
  ComAtprotoSyncRequestCrawl: 'com.atproto.sync.requestCrawl',
6760
6997
  ComAtprotoSyncSubscribeRepos: 'com.atproto.sync.subscribeRepos',
6761
- ComAtprotoTempUpgradeRepoVersion: 'com.atproto.temp.upgradeRepoVersion',
6762
6998
  AppBskyActorDefs: 'app.bsky.actor.defs',
6763
6999
  AppBskyActorGetPreferences: 'app.bsky.actor.getPreferences',
6764
7000
  AppBskyActorGetProfile: 'app.bsky.actor.getProfile',
@@ -6783,6 +7019,7 @@ export const ids = {
6783
7019
  AppBskyFeedGetFeedGenerators: 'app.bsky.feed.getFeedGenerators',
6784
7020
  AppBskyFeedGetFeedSkeleton: 'app.bsky.feed.getFeedSkeleton',
6785
7021
  AppBskyFeedGetLikes: 'app.bsky.feed.getLikes',
7022
+ AppBskyFeedGetListFeed: 'app.bsky.feed.getListFeed',
6786
7023
  AppBskyFeedGetPostThread: 'app.bsky.feed.getPostThread',
6787
7024
  AppBskyFeedGetPosts: 'app.bsky.feed.getPosts',
6788
7025
  AppBskyFeedGetRepostedBy: 'app.bsky.feed.getRepostedBy',
@@ -6791,6 +7028,7 @@ export const ids = {
6791
7028
  AppBskyFeedLike: 'app.bsky.feed.like',
6792
7029
  AppBskyFeedPost: 'app.bsky.feed.post',
6793
7030
  AppBskyFeedRepost: 'app.bsky.feed.repost',
7031
+ AppBskyFeedThreadgate: 'app.bsky.feed.threadgate',
6794
7032
  AppBskyGraphBlock: 'app.bsky.graph.block',
6795
7033
  AppBskyGraphDefs: 'app.bsky.graph.defs',
6796
7034
  AppBskyGraphFollow: 'app.bsky.graph.follow',
@@ -6798,10 +7036,14 @@ export const ids = {
6798
7036
  AppBskyGraphGetFollowers: 'app.bsky.graph.getFollowers',
6799
7037
  AppBskyGraphGetFollows: 'app.bsky.graph.getFollows',
6800
7038
  AppBskyGraphGetList: 'app.bsky.graph.getList',
7039
+ AppBskyGraphGetListBlocks: 'app.bsky.graph.getListBlocks',
6801
7040
  AppBskyGraphGetListMutes: 'app.bsky.graph.getListMutes',
6802
7041
  AppBskyGraphGetLists: 'app.bsky.graph.getLists',
6803
7042
  AppBskyGraphGetMutes: 'app.bsky.graph.getMutes',
7043
+ AppBskyGraphGetSuggestedFollowsByActor:
7044
+ 'app.bsky.graph.getSuggestedFollowsByActor',
6804
7045
  AppBskyGraphList: 'app.bsky.graph.list',
7046
+ AppBskyGraphListblock: 'app.bsky.graph.listblock',
6805
7047
  AppBskyGraphListitem: 'app.bsky.graph.listitem',
6806
7048
  AppBskyGraphMuteActor: 'app.bsky.graph.muteActor',
6807
7049
  AppBskyGraphMuteActorList: 'app.bsky.graph.muteActorList',
@@ -12,6 +12,7 @@ import * as AppBskyEmbedRecord from '../embed/record'
12
12
  import * as AppBskyEmbedRecordWithMedia from '../embed/recordWithMedia'
13
13
  import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs'
14
14
  import * as AppBskyRichtextFacet from '../richtext/facet'
15
+ import * as AppBskyGraphDefs from '../graph/defs'
15
16
 
16
17
  export interface PostView {
17
18
  uri: string
@@ -30,6 +31,7 @@ export interface PostView {
30
31
  indexedAt: string
31
32
  viewer?: ViewerState
32
33
  labels?: ComAtprotoLabelDefs.Label[]
34
+ threadgate?: ThreadgateView
33
35
  [k: string]: unknown
34
36
  }
35
37
 
@@ -135,6 +137,7 @@ export interface ThreadViewPost {
135
137
  | BlockedPost
136
138
  | { $type: string; [k: string]: unknown }
137
139
  )[]
140
+ viewer?: ViewerThreadState
138
141
  [k: string]: unknown
139
142
  }
140
143
 
@@ -205,6 +208,23 @@ export function validateBlockedAuthor(v: unknown): ValidationResult {
205
208
  return lexicons.validate('app.bsky.feed.defs#blockedAuthor', v)
206
209
  }
207
210
 
211
+ export interface ViewerThreadState {
212
+ canReply?: boolean
213
+ [k: string]: unknown
214
+ }
215
+
216
+ export function isViewerThreadState(v: unknown): v is ViewerThreadState {
217
+ return (
218
+ isObj(v) &&
219
+ hasProp(v, '$type') &&
220
+ v.$type === 'app.bsky.feed.defs#viewerThreadState'
221
+ )
222
+ }
223
+
224
+ export function validateViewerThreadState(v: unknown): ValidationResult {
225
+ return lexicons.validate('app.bsky.feed.defs#viewerThreadState', v)
226
+ }
227
+
208
228
  export interface GeneratorView {
209
229
  uri: string
210
230
  cid: string
@@ -283,3 +303,23 @@ export function isSkeletonReasonRepost(v: unknown): v is SkeletonReasonRepost {
283
303
  export function validateSkeletonReasonRepost(v: unknown): ValidationResult {
284
304
  return lexicons.validate('app.bsky.feed.defs#skeletonReasonRepost', v)
285
305
  }
306
+
307
+ export interface ThreadgateView {
308
+ uri?: string
309
+ cid?: string
310
+ record?: {}
311
+ lists?: AppBskyGraphDefs.ListViewBasic[]
312
+ [k: string]: unknown
313
+ }
314
+
315
+ export function isThreadgateView(v: unknown): v is ThreadgateView {
316
+ return (
317
+ isObj(v) &&
318
+ hasProp(v, '$type') &&
319
+ v.$type === 'app.bsky.feed.defs#threadgateView'
320
+ )
321
+ }
322
+
323
+ export function validateThreadgateView(v: unknown): ValidationResult {
324
+ return lexicons.validate('app.bsky.feed.defs#threadgateView', v)
325
+ }
@@ -0,0 +1,46 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { Headers, XRPCError } from '@atproto/xrpc'
5
+ import { ValidationResult, BlobRef } from '@atproto/lexicon'
6
+ import { isObj, hasProp } from '../../../../util'
7
+ import { lexicons } from '../../../../lexicons'
8
+ import { CID } from 'multiformats/cid'
9
+ import * as AppBskyFeedDefs from './defs'
10
+
11
+ export interface QueryParams {
12
+ list: string
13
+ limit?: number
14
+ cursor?: string
15
+ }
16
+
17
+ export type InputSchema = undefined
18
+
19
+ export interface OutputSchema {
20
+ cursor?: string
21
+ feed: AppBskyFeedDefs.FeedViewPost[]
22
+ [k: string]: unknown
23
+ }
24
+
25
+ export interface CallOptions {
26
+ headers?: Headers
27
+ }
28
+
29
+ export interface Response {
30
+ success: boolean
31
+ headers: Headers
32
+ data: OutputSchema
33
+ }
34
+
35
+ export class UnknownListError extends XRPCError {
36
+ constructor(src: XRPCError) {
37
+ super(src.status, src.error, src.message, src.headers)
38
+ }
39
+ }
40
+
41
+ export function toKnownErr(e: any) {
42
+ if (e instanceof XRPCError) {
43
+ if (e.error === 'UnknownList') return new UnknownListError(e)
44
+ }
45
+ return e
46
+ }
@@ -0,0 +1,80 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { ValidationResult, BlobRef } from '@atproto/lexicon'
5
+ import { isObj, hasProp } from '../../../../util'
6
+ import { lexicons } from '../../../../lexicons'
7
+ import { CID } from 'multiformats/cid'
8
+
9
+ export interface Record {
10
+ post: string
11
+ allow?: (
12
+ | MentionRule
13
+ | FollowingRule
14
+ | ListRule
15
+ | { $type: string; [k: string]: unknown }
16
+ )[]
17
+ createdAt: string
18
+ [k: string]: unknown
19
+ }
20
+
21
+ export function isRecord(v: unknown): v is Record {
22
+ return (
23
+ isObj(v) &&
24
+ hasProp(v, '$type') &&
25
+ (v.$type === 'app.bsky.feed.threadgate#main' ||
26
+ v.$type === 'app.bsky.feed.threadgate')
27
+ )
28
+ }
29
+
30
+ export function validateRecord(v: unknown): ValidationResult {
31
+ return lexicons.validate('app.bsky.feed.threadgate#main', v)
32
+ }
33
+
34
+ /** Allow replies from actors mentioned in your post. */
35
+ export interface MentionRule {}
36
+
37
+ export function isMentionRule(v: unknown): v is MentionRule {
38
+ return (
39
+ isObj(v) &&
40
+ hasProp(v, '$type') &&
41
+ v.$type === 'app.bsky.feed.threadgate#mentionRule'
42
+ )
43
+ }
44
+
45
+ export function validateMentionRule(v: unknown): ValidationResult {
46
+ return lexicons.validate('app.bsky.feed.threadgate#mentionRule', v)
47
+ }
48
+
49
+ /** Allow replies from actors you follow. */
50
+ export interface FollowingRule {}
51
+
52
+ export function isFollowingRule(v: unknown): v is FollowingRule {
53
+ return (
54
+ isObj(v) &&
55
+ hasProp(v, '$type') &&
56
+ v.$type === 'app.bsky.feed.threadgate#followingRule'
57
+ )
58
+ }
59
+
60
+ export function validateFollowingRule(v: unknown): ValidationResult {
61
+ return lexicons.validate('app.bsky.feed.threadgate#followingRule', v)
62
+ }
63
+
64
+ /** Allow replies from actors on a list. */
65
+ export interface ListRule {
66
+ list: string
67
+ [k: string]: unknown
68
+ }
69
+
70
+ export function isListRule(v: unknown): v is ListRule {
71
+ return (
72
+ isObj(v) &&
73
+ hasProp(v, '$type') &&
74
+ v.$type === 'app.bsky.feed.threadgate#listRule'
75
+ )
76
+ }
77
+
78
+ export function validateListRule(v: unknown): ValidationResult {
79
+ return lexicons.validate('app.bsky.feed.threadgate#listRule', v)
80
+ }
@@ -74,13 +74,19 @@ export function validateListItemView(v: unknown): ValidationResult {
74
74
  return lexicons.validate('app.bsky.graph.defs#listItemView', v)
75
75
  }
76
76
 
77
- export type ListPurpose = 'app.bsky.graph.defs#modlist' | (string & {})
77
+ export type ListPurpose =
78
+ | 'app.bsky.graph.defs#modlist'
79
+ | 'app.bsky.graph.defs#curatelist'
80
+ | (string & {})
78
81
 
79
82
  /** A list of actors to apply an aggregate moderation action (mute/block) on */
80
83
  export const MODLIST = 'app.bsky.graph.defs#modlist'
84
+ /** A list of actors used for curation purposes such as list feeds or interaction gating */
85
+ export const CURATELIST = 'app.bsky.graph.defs#curatelist'
81
86
 
82
87
  export interface ListViewerState {
83
88
  muted?: boolean
89
+ blocked?: string
84
90
  [k: string]: unknown
85
91
  }
86
92
 
@@ -0,0 +1,38 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { Headers, XRPCError } from '@atproto/xrpc'
5
+ import { ValidationResult, BlobRef } from '@atproto/lexicon'
6
+ import { isObj, hasProp } from '../../../../util'
7
+ import { lexicons } from '../../../../lexicons'
8
+ import { CID } from 'multiformats/cid'
9
+ import * as AppBskyGraphDefs from './defs'
10
+
11
+ export interface QueryParams {
12
+ limit?: number
13
+ cursor?: string
14
+ }
15
+
16
+ export type InputSchema = undefined
17
+
18
+ export interface OutputSchema {
19
+ cursor?: string
20
+ lists: AppBskyGraphDefs.ListView[]
21
+ [k: string]: unknown
22
+ }
23
+
24
+ export interface CallOptions {
25
+ headers?: Headers
26
+ }
27
+
28
+ export interface Response {
29
+ success: boolean
30
+ headers: Headers
31
+ data: OutputSchema
32
+ }
33
+
34
+ export function toKnownErr(e: any) {
35
+ if (e instanceof XRPCError) {
36
+ }
37
+ return e
38
+ }