@atproto/pds 0.4.138 → 0.4.140
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 +17 -0
- package/dist/lexicon/index.d.ts +6 -2
- package/dist/lexicon/index.d.ts.map +1 -1
- package/dist/lexicon/index.js +12 -4
- package/dist/lexicon/index.js.map +1 -1
- package/dist/lexicon/lexicons.d.ts +536 -88
- package/dist/lexicon/lexicons.d.ts.map +1 -1
- package/dist/lexicon/lexicons.js +279 -44
- package/dist/lexicon/lexicons.js.map +1 -1
- package/dist/lexicon/types/app/bsky/feed/defs.d.ts +2 -0
- package/dist/lexicon/types/app/bsky/feed/defs.d.ts.map +1 -1
- package/dist/lexicon/types/app/bsky/feed/defs.js.map +1 -1
- package/dist/lexicon/types/app/bsky/feed/like.d.ts +1 -0
- package/dist/lexicon/types/app/bsky/feed/like.d.ts.map +1 -1
- package/dist/lexicon/types/app/bsky/feed/like.js.map +1 -1
- package/dist/lexicon/types/app/bsky/feed/repost.d.ts +1 -0
- package/dist/lexicon/types/app/bsky/feed/repost.d.ts.map +1 -1
- package/dist/lexicon/types/app/bsky/feed/repost.js.map +1 -1
- package/dist/lexicon/types/app/bsky/notification/listNotifications.d.ts +2 -2
- package/dist/lexicon/types/app/bsky/notification/listNotifications.d.ts.map +1 -1
- package/dist/lexicon/types/app/bsky/notification/listNotifications.js.map +1 -1
- package/dist/lexicon/types/app/bsky/unspecced/getPostThreadHiddenV2.d.ts +61 -0
- package/dist/lexicon/types/app/bsky/unspecced/getPostThreadHiddenV2.d.ts.map +1 -0
- package/dist/lexicon/types/app/bsky/unspecced/getPostThreadHiddenV2.js +25 -0
- package/dist/lexicon/types/app/bsky/unspecced/getPostThreadHiddenV2.js.map +1 -0
- package/dist/lexicon/types/app/bsky/unspecced/getPostThreadV2.d.ts +92 -0
- package/dist/lexicon/types/app/bsky/unspecced/getPostThreadV2.d.ts.map +1 -0
- package/dist/lexicon/types/app/bsky/unspecced/getPostThreadV2.js +52 -0
- package/dist/lexicon/types/app/bsky/unspecced/getPostThreadV2.js.map +1 -0
- package/package.json +6 -6
- package/src/lexicon/index.ts +33 -9
- package/src/lexicon/lexicons.ts +298 -45
- package/src/lexicon/types/app/bsky/feed/defs.ts +2 -0
- package/src/lexicon/types/app/bsky/feed/like.ts +1 -0
- package/src/lexicon/types/app/bsky/feed/repost.ts +1 -0
- package/src/lexicon/types/app/bsky/notification/listNotifications.ts +3 -1
- package/src/lexicon/types/app/bsky/unspecced/getPostThreadHiddenV2.ts +93 -0
- package/src/lexicon/types/app/bsky/unspecced/getPostThreadV2.ts +160 -0
- package/tests/proxied/__snapshots__/views.test.ts.snap +114 -108
- package/tsconfig.build.tsbuildinfo +1 -1
package/src/lexicon/lexicons.ts
CHANGED
@@ -6265,6 +6265,14 @@ export const schemaDict = {
|
|
6265
6265
|
type: 'ref',
|
6266
6266
|
ref: 'lex:app.bsky.actor.defs#profileViewBasic',
|
6267
6267
|
},
|
6268
|
+
uri: {
|
6269
|
+
type: 'string',
|
6270
|
+
format: 'at-uri',
|
6271
|
+
},
|
6272
|
+
cid: {
|
6273
|
+
type: 'string',
|
6274
|
+
format: 'cid',
|
6275
|
+
},
|
6268
6276
|
indexedAt: {
|
6269
6277
|
type: 'string',
|
6270
6278
|
format: 'datetime',
|
@@ -7231,48 +7239,6 @@ export const schemaDict = {
|
|
7231
7239
|
},
|
7232
7240
|
},
|
7233
7241
|
},
|
7234
|
-
AppBskyFeedGetPosts: {
|
7235
|
-
lexicon: 1,
|
7236
|
-
id: 'app.bsky.feed.getPosts',
|
7237
|
-
defs: {
|
7238
|
-
main: {
|
7239
|
-
type: 'query',
|
7240
|
-
description:
|
7241
|
-
"Gets post views for a specified list of posts (by AT-URI). This is sometimes referred to as 'hydrating' a 'feed skeleton'.",
|
7242
|
-
parameters: {
|
7243
|
-
type: 'params',
|
7244
|
-
required: ['uris'],
|
7245
|
-
properties: {
|
7246
|
-
uris: {
|
7247
|
-
type: 'array',
|
7248
|
-
description: 'List of post AT-URIs to return hydrated views for.',
|
7249
|
-
items: {
|
7250
|
-
type: 'string',
|
7251
|
-
format: 'at-uri',
|
7252
|
-
},
|
7253
|
-
maxLength: 25,
|
7254
|
-
},
|
7255
|
-
},
|
7256
|
-
},
|
7257
|
-
output: {
|
7258
|
-
encoding: 'application/json',
|
7259
|
-
schema: {
|
7260
|
-
type: 'object',
|
7261
|
-
required: ['posts'],
|
7262
|
-
properties: {
|
7263
|
-
posts: {
|
7264
|
-
type: 'array',
|
7265
|
-
items: {
|
7266
|
-
type: 'ref',
|
7267
|
-
ref: 'lex:app.bsky.feed.defs#postView',
|
7268
|
-
},
|
7269
|
-
},
|
7270
|
-
},
|
7271
|
-
},
|
7272
|
-
},
|
7273
|
-
},
|
7274
|
-
},
|
7275
|
-
},
|
7276
7242
|
AppBskyFeedGetPostThread: {
|
7277
7243
|
lexicon: 1,
|
7278
7244
|
id: 'app.bsky.feed.getPostThread',
|
@@ -7337,6 +7303,48 @@ export const schemaDict = {
|
|
7337
7303
|
},
|
7338
7304
|
},
|
7339
7305
|
},
|
7306
|
+
AppBskyFeedGetPosts: {
|
7307
|
+
lexicon: 1,
|
7308
|
+
id: 'app.bsky.feed.getPosts',
|
7309
|
+
defs: {
|
7310
|
+
main: {
|
7311
|
+
type: 'query',
|
7312
|
+
description:
|
7313
|
+
"Gets post views for a specified list of posts (by AT-URI). This is sometimes referred to as 'hydrating' a 'feed skeleton'.",
|
7314
|
+
parameters: {
|
7315
|
+
type: 'params',
|
7316
|
+
required: ['uris'],
|
7317
|
+
properties: {
|
7318
|
+
uris: {
|
7319
|
+
type: 'array',
|
7320
|
+
description: 'List of post AT-URIs to return hydrated views for.',
|
7321
|
+
items: {
|
7322
|
+
type: 'string',
|
7323
|
+
format: 'at-uri',
|
7324
|
+
},
|
7325
|
+
maxLength: 25,
|
7326
|
+
},
|
7327
|
+
},
|
7328
|
+
},
|
7329
|
+
output: {
|
7330
|
+
encoding: 'application/json',
|
7331
|
+
schema: {
|
7332
|
+
type: 'object',
|
7333
|
+
required: ['posts'],
|
7334
|
+
properties: {
|
7335
|
+
posts: {
|
7336
|
+
type: 'array',
|
7337
|
+
items: {
|
7338
|
+
type: 'ref',
|
7339
|
+
ref: 'lex:app.bsky.feed.defs#postView',
|
7340
|
+
},
|
7341
|
+
},
|
7342
|
+
},
|
7343
|
+
},
|
7344
|
+
},
|
7345
|
+
},
|
7346
|
+
},
|
7347
|
+
},
|
7340
7348
|
AppBskyFeedGetQuotes: {
|
7341
7349
|
lexicon: 1,
|
7342
7350
|
id: 'app.bsky.feed.getQuotes',
|
@@ -7576,6 +7584,10 @@ export const schemaDict = {
|
|
7576
7584
|
type: 'string',
|
7577
7585
|
format: 'datetime',
|
7578
7586
|
},
|
7587
|
+
via: {
|
7588
|
+
type: 'ref',
|
7589
|
+
ref: 'lex:com.atproto.repo.strongRef',
|
7590
|
+
},
|
7579
7591
|
},
|
7580
7592
|
},
|
7581
7593
|
},
|
@@ -7790,6 +7802,10 @@ export const schemaDict = {
|
|
7790
7802
|
type: 'string',
|
7791
7803
|
format: 'datetime',
|
7792
7804
|
},
|
7805
|
+
via: {
|
7806
|
+
type: 'ref',
|
7807
|
+
ref: 'lex:com.atproto.repo.strongRef',
|
7808
|
+
},
|
7793
7809
|
},
|
7794
7810
|
},
|
7795
7811
|
},
|
@@ -7802,7 +7818,7 @@ export const schemaDict = {
|
|
7802
7818
|
main: {
|
7803
7819
|
type: 'query',
|
7804
7820
|
description:
|
7805
|
-
'Find posts matching search criteria, returning views of those posts.',
|
7821
|
+
'Find posts matching search criteria, returning views of those posts. Note that this API endpoint may require authentication (eg, not public) for some service providers and implementations.',
|
7806
7822
|
parameters: {
|
7807
7823
|
type: 'params',
|
7808
7824
|
required: ['q'],
|
@@ -9845,7 +9861,7 @@ export const schemaDict = {
|
|
9845
9861
|
reason: {
|
9846
9862
|
type: 'string',
|
9847
9863
|
description:
|
9848
|
-
|
9864
|
+
'The reason why this notification was delivered - e.g. your post was liked, or you received a new follower.',
|
9849
9865
|
knownValues: [
|
9850
9866
|
'like',
|
9851
9867
|
'repost',
|
@@ -9856,6 +9872,8 @@ export const schemaDict = {
|
|
9856
9872
|
'starterpack-joined',
|
9857
9873
|
'verified',
|
9858
9874
|
'unverified',
|
9875
|
+
'like-via-repost',
|
9876
|
+
'repost-via-repost',
|
9859
9877
|
],
|
9860
9878
|
},
|
9861
9879
|
reasonSubject: {
|
@@ -10276,6 +10294,238 @@ export const schemaDict = {
|
|
10276
10294
|
},
|
10277
10295
|
},
|
10278
10296
|
},
|
10297
|
+
AppBskyUnspeccedGetPostThreadHiddenV2: {
|
10298
|
+
lexicon: 1,
|
10299
|
+
id: 'app.bsky.unspecced.getPostThreadHiddenV2',
|
10300
|
+
defs: {
|
10301
|
+
main: {
|
10302
|
+
type: 'query',
|
10303
|
+
description:
|
10304
|
+
"(NOTE: this endpoint is under development and WILL change without notice. Don't use it until it is moved out of `unspecced` or your application WILL break) Get the hidden posts in a thread. It is based in an anchor post at any depth of the tree, and returns hidden replies (recursive replies, with branching to their replies) below the anchor. It does not include ancestors nor the anchor. This should be called after exhausting `app.bsky.unspecced.getPostThreadV2`. Does not require auth, but additional metadata and filtering will be applied for authed requests.",
|
10305
|
+
parameters: {
|
10306
|
+
type: 'params',
|
10307
|
+
required: ['anchor'],
|
10308
|
+
properties: {
|
10309
|
+
anchor: {
|
10310
|
+
type: 'string',
|
10311
|
+
format: 'at-uri',
|
10312
|
+
description:
|
10313
|
+
'Reference (AT-URI) to post record. This is the anchor post.',
|
10314
|
+
},
|
10315
|
+
},
|
10316
|
+
},
|
10317
|
+
output: {
|
10318
|
+
encoding: 'application/json',
|
10319
|
+
schema: {
|
10320
|
+
type: 'object',
|
10321
|
+
required: ['thread'],
|
10322
|
+
properties: {
|
10323
|
+
thread: {
|
10324
|
+
type: 'array',
|
10325
|
+
description:
|
10326
|
+
'A flat list of thread hidden items. The depth of each item is indicated by the depth property inside the item.',
|
10327
|
+
items: {
|
10328
|
+
type: 'ref',
|
10329
|
+
ref: 'lex:app.bsky.unspecced.getPostThreadHiddenV2#threadHiddenItem',
|
10330
|
+
},
|
10331
|
+
},
|
10332
|
+
},
|
10333
|
+
},
|
10334
|
+
},
|
10335
|
+
},
|
10336
|
+
threadHiddenItem: {
|
10337
|
+
type: 'object',
|
10338
|
+
required: ['uri', 'depth', 'value'],
|
10339
|
+
properties: {
|
10340
|
+
uri: {
|
10341
|
+
type: 'string',
|
10342
|
+
format: 'at-uri',
|
10343
|
+
},
|
10344
|
+
depth: {
|
10345
|
+
type: 'integer',
|
10346
|
+
description:
|
10347
|
+
'The nesting level of this item in the thread. Depth 0 means the anchor item. Items above have negative depths, items below have positive depths.',
|
10348
|
+
},
|
10349
|
+
value: {
|
10350
|
+
type: 'union',
|
10351
|
+
refs: [
|
10352
|
+
'lex:app.bsky.unspecced.getPostThreadHiddenV2#threadHiddenItemPost',
|
10353
|
+
],
|
10354
|
+
},
|
10355
|
+
},
|
10356
|
+
},
|
10357
|
+
threadHiddenItemPost: {
|
10358
|
+
type: 'object',
|
10359
|
+
required: ['post', 'hiddenByThreadgate', 'mutedByViewer'],
|
10360
|
+
properties: {
|
10361
|
+
post: {
|
10362
|
+
type: 'ref',
|
10363
|
+
ref: 'lex:app.bsky.feed.defs#postView',
|
10364
|
+
},
|
10365
|
+
hiddenByThreadgate: {
|
10366
|
+
type: 'boolean',
|
10367
|
+
description:
|
10368
|
+
'The threadgate created by the author indicates this post as a reply to be hidden for everyone consuming the thread.',
|
10369
|
+
},
|
10370
|
+
mutedByViewer: {
|
10371
|
+
type: 'boolean',
|
10372
|
+
description:
|
10373
|
+
'This is by an account muted by the viewer requesting it.',
|
10374
|
+
},
|
10375
|
+
},
|
10376
|
+
},
|
10377
|
+
},
|
10378
|
+
},
|
10379
|
+
AppBskyUnspeccedGetPostThreadV2: {
|
10380
|
+
lexicon: 1,
|
10381
|
+
id: 'app.bsky.unspecced.getPostThreadV2',
|
10382
|
+
defs: {
|
10383
|
+
main: {
|
10384
|
+
type: 'query',
|
10385
|
+
description:
|
10386
|
+
"(NOTE: this endpoint is under development and WILL change without notice. Don't use it until it is moved out of `unspecced` or your application WILL break) Get posts in a thread. It is based in an anchor post at any depth of the tree, and returns posts above it (recursively resolving the parent, without further branching to their replies) and below it (recursive replies, with branching to their replies). Does not require auth, but additional metadata and filtering will be applied for authed requests.",
|
10387
|
+
parameters: {
|
10388
|
+
type: 'params',
|
10389
|
+
required: ['anchor'],
|
10390
|
+
properties: {
|
10391
|
+
anchor: {
|
10392
|
+
type: 'string',
|
10393
|
+
format: 'at-uri',
|
10394
|
+
description:
|
10395
|
+
'Reference (AT-URI) to post record. This is the anchor post, and the thread will be built around it. It can be any post in the tree, not necessarily a root post.',
|
10396
|
+
},
|
10397
|
+
above: {
|
10398
|
+
type: 'boolean',
|
10399
|
+
description: 'Whether to include parents above the anchor.',
|
10400
|
+
default: true,
|
10401
|
+
},
|
10402
|
+
below: {
|
10403
|
+
type: 'integer',
|
10404
|
+
description:
|
10405
|
+
'How many levels of replies to include below the anchor.',
|
10406
|
+
default: 6,
|
10407
|
+
minimum: 0,
|
10408
|
+
maximum: 20,
|
10409
|
+
},
|
10410
|
+
branchingFactor: {
|
10411
|
+
type: 'integer',
|
10412
|
+
description:
|
10413
|
+
'Maximum of replies to include at each level of the thread, except for the direct replies to the anchor, which are (NOTE: currently, during unspecced phase) all returned (NOTE: later they might be paginated).',
|
10414
|
+
default: 10,
|
10415
|
+
minimum: 0,
|
10416
|
+
maximum: 100,
|
10417
|
+
},
|
10418
|
+
prioritizeFollowedUsers: {
|
10419
|
+
type: 'boolean',
|
10420
|
+
description:
|
10421
|
+
'Whether to prioritize posts from followed users. It only has effect when the user is authenticated.',
|
10422
|
+
default: false,
|
10423
|
+
},
|
10424
|
+
sort: {
|
10425
|
+
type: 'string',
|
10426
|
+
description: 'Sorting for the thread replies.',
|
10427
|
+
knownValues: ['newest', 'oldest', 'top'],
|
10428
|
+
default: 'oldest',
|
10429
|
+
},
|
10430
|
+
},
|
10431
|
+
},
|
10432
|
+
output: {
|
10433
|
+
encoding: 'application/json',
|
10434
|
+
schema: {
|
10435
|
+
type: 'object',
|
10436
|
+
required: ['thread', 'hasHiddenReplies'],
|
10437
|
+
properties: {
|
10438
|
+
thread: {
|
10439
|
+
type: 'array',
|
10440
|
+
description:
|
10441
|
+
'A flat list of thread items. The depth of each item is indicated by the depth property inside the item.',
|
10442
|
+
items: {
|
10443
|
+
type: 'ref',
|
10444
|
+
ref: 'lex:app.bsky.unspecced.getPostThreadV2#threadItem',
|
10445
|
+
},
|
10446
|
+
},
|
10447
|
+
threadgate: {
|
10448
|
+
type: 'ref',
|
10449
|
+
ref: 'lex:app.bsky.feed.defs#threadgateView',
|
10450
|
+
},
|
10451
|
+
hasHiddenReplies: {
|
10452
|
+
type: 'boolean',
|
10453
|
+
description:
|
10454
|
+
'Whether this thread has hidden replies. If true, a call can be made to the `getPostThreadHiddenV2` endpoint to retrieve them.',
|
10455
|
+
},
|
10456
|
+
},
|
10457
|
+
},
|
10458
|
+
},
|
10459
|
+
},
|
10460
|
+
threadItem: {
|
10461
|
+
type: 'object',
|
10462
|
+
required: ['uri', 'depth', 'value'],
|
10463
|
+
properties: {
|
10464
|
+
uri: {
|
10465
|
+
type: 'string',
|
10466
|
+
format: 'at-uri',
|
10467
|
+
},
|
10468
|
+
depth: {
|
10469
|
+
type: 'integer',
|
10470
|
+
description:
|
10471
|
+
'The nesting level of this item in the thread. Depth 0 means the anchor item. Items above have negative depths, items below have positive depths.',
|
10472
|
+
},
|
10473
|
+
value: {
|
10474
|
+
type: 'union',
|
10475
|
+
refs: [
|
10476
|
+
'lex:app.bsky.unspecced.getPostThreadV2#threadItemPost',
|
10477
|
+
'lex:app.bsky.unspecced.getPostThreadV2#threadItemNoUnauthenticated',
|
10478
|
+
'lex:app.bsky.unspecced.getPostThreadV2#threadItemNotFound',
|
10479
|
+
'lex:app.bsky.unspecced.getPostThreadV2#threadItemBlocked',
|
10480
|
+
],
|
10481
|
+
},
|
10482
|
+
},
|
10483
|
+
},
|
10484
|
+
threadItemPost: {
|
10485
|
+
type: 'object',
|
10486
|
+
required: ['post', 'moreParents', 'moreReplies', 'opThread'],
|
10487
|
+
properties: {
|
10488
|
+
post: {
|
10489
|
+
type: 'ref',
|
10490
|
+
ref: 'lex:app.bsky.feed.defs#postView',
|
10491
|
+
},
|
10492
|
+
moreParents: {
|
10493
|
+
type: 'boolean',
|
10494
|
+
description:
|
10495
|
+
'This post has more parents that were not present in the response. This is just a boolean, without the number of parents.',
|
10496
|
+
},
|
10497
|
+
moreReplies: {
|
10498
|
+
type: 'integer',
|
10499
|
+
description:
|
10500
|
+
'This post has more replies that were not present in the response. This is a numeric value, which is best-effort and might not be accurate.',
|
10501
|
+
},
|
10502
|
+
opThread: {
|
10503
|
+
type: 'boolean',
|
10504
|
+
description:
|
10505
|
+
'This post is part of a contiguous thread by the OP from the thread root. Many different OP threads can happen in the same thread.',
|
10506
|
+
},
|
10507
|
+
},
|
10508
|
+
},
|
10509
|
+
threadItemNoUnauthenticated: {
|
10510
|
+
type: 'object',
|
10511
|
+
properties: {},
|
10512
|
+
},
|
10513
|
+
threadItemNotFound: {
|
10514
|
+
type: 'object',
|
10515
|
+
properties: {},
|
10516
|
+
},
|
10517
|
+
threadItemBlocked: {
|
10518
|
+
type: 'object',
|
10519
|
+
required: ['author'],
|
10520
|
+
properties: {
|
10521
|
+
author: {
|
10522
|
+
type: 'ref',
|
10523
|
+
ref: 'lex:app.bsky.feed.defs#blockedAuthor',
|
10524
|
+
},
|
10525
|
+
},
|
10526
|
+
},
|
10527
|
+
},
|
10528
|
+
},
|
10279
10529
|
AppBskyUnspeccedGetSuggestedFeeds: {
|
10280
10530
|
lexicon: 1,
|
10281
10531
|
id: 'app.bsky.unspecced.getSuggestedFeeds',
|
@@ -16257,8 +16507,8 @@ export const ids = {
|
|
16257
16507
|
AppBskyFeedGetFeedSkeleton: 'app.bsky.feed.getFeedSkeleton',
|
16258
16508
|
AppBskyFeedGetLikes: 'app.bsky.feed.getLikes',
|
16259
16509
|
AppBskyFeedGetListFeed: 'app.bsky.feed.getListFeed',
|
16260
|
-
AppBskyFeedGetPosts: 'app.bsky.feed.getPosts',
|
16261
16510
|
AppBskyFeedGetPostThread: 'app.bsky.feed.getPostThread',
|
16511
|
+
AppBskyFeedGetPosts: 'app.bsky.feed.getPosts',
|
16262
16512
|
AppBskyFeedGetQuotes: 'app.bsky.feed.getQuotes',
|
16263
16513
|
AppBskyFeedGetRepostedBy: 'app.bsky.feed.getRepostedBy',
|
16264
16514
|
AppBskyFeedGetSuggestedFeeds: 'app.bsky.feed.getSuggestedFeeds',
|
@@ -16315,6 +16565,9 @@ export const ids = {
|
|
16315
16565
|
AppBskyUnspeccedGetConfig: 'app.bsky.unspecced.getConfig',
|
16316
16566
|
AppBskyUnspeccedGetPopularFeedGenerators:
|
16317
16567
|
'app.bsky.unspecced.getPopularFeedGenerators',
|
16568
|
+
AppBskyUnspeccedGetPostThreadHiddenV2:
|
16569
|
+
'app.bsky.unspecced.getPostThreadHiddenV2',
|
16570
|
+
AppBskyUnspeccedGetPostThreadV2: 'app.bsky.unspecced.getPostThreadV2',
|
16318
16571
|
AppBskyUnspeccedGetSuggestedFeeds: 'app.bsky.unspecced.getSuggestedFeeds',
|
16319
16572
|
AppBskyUnspeccedGetSuggestedFeedsSkeleton:
|
16320
16573
|
'app.bsky.unspecced.getSuggestedFeedsSkeleton',
|
@@ -67,7 +67,7 @@ export interface Notification {
|
|
67
67
|
uri: string
|
68
68
|
cid: string
|
69
69
|
author: AppBskyActorDefs.ProfileView
|
70
|
-
/**
|
70
|
+
/** The reason why this notification was delivered - e.g. your post was liked, or you received a new follower. */
|
71
71
|
reason:
|
72
72
|
| 'like'
|
73
73
|
| 'repost'
|
@@ -78,6 +78,8 @@ export interface Notification {
|
|
78
78
|
| 'starterpack-joined'
|
79
79
|
| 'verified'
|
80
80
|
| 'unverified'
|
81
|
+
| 'like-via-repost'
|
82
|
+
| 'repost-via-repost'
|
81
83
|
| (string & {})
|
82
84
|
reasonSubject?: string
|
83
85
|
record: { [_ in string]: unknown }
|
@@ -0,0 +1,93 @@
|
|
1
|
+
/**
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
3
|
+
*/
|
4
|
+
import express from 'express'
|
5
|
+
import { type ValidationResult, BlobRef } from '@atproto/lexicon'
|
6
|
+
import { CID } from 'multiformats/cid'
|
7
|
+
import { validate as _validate } from '../../../../lexicons'
|
8
|
+
import {
|
9
|
+
type $Typed,
|
10
|
+
is$typed as _is$typed,
|
11
|
+
type OmitKey,
|
12
|
+
} from '../../../../util'
|
13
|
+
import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
|
14
|
+
import type * as AppBskyFeedDefs from '../feed/defs.js'
|
15
|
+
|
16
|
+
const is$typed = _is$typed,
|
17
|
+
validate = _validate
|
18
|
+
const id = 'app.bsky.unspecced.getPostThreadHiddenV2'
|
19
|
+
|
20
|
+
export interface QueryParams {
|
21
|
+
/** Reference (AT-URI) to post record. This is the anchor post. */
|
22
|
+
anchor: string
|
23
|
+
}
|
24
|
+
|
25
|
+
export type InputSchema = undefined
|
26
|
+
|
27
|
+
export interface OutputSchema {
|
28
|
+
/** A flat list of thread hidden items. The depth of each item is indicated by the depth property inside the item. */
|
29
|
+
thread: ThreadHiddenItem[]
|
30
|
+
}
|
31
|
+
|
32
|
+
export type HandlerInput = undefined
|
33
|
+
|
34
|
+
export interface HandlerSuccess {
|
35
|
+
encoding: 'application/json'
|
36
|
+
body: OutputSchema
|
37
|
+
headers?: { [key: string]: string }
|
38
|
+
}
|
39
|
+
|
40
|
+
export interface HandlerError {
|
41
|
+
status: number
|
42
|
+
message?: string
|
43
|
+
}
|
44
|
+
|
45
|
+
export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
|
46
|
+
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
47
|
+
auth: HA
|
48
|
+
params: QueryParams
|
49
|
+
input: HandlerInput
|
50
|
+
req: express.Request
|
51
|
+
res: express.Response
|
52
|
+
resetRouteRateLimits: () => Promise<void>
|
53
|
+
}
|
54
|
+
export type Handler<HA extends HandlerAuth = never> = (
|
55
|
+
ctx: HandlerReqCtx<HA>,
|
56
|
+
) => Promise<HandlerOutput> | HandlerOutput
|
57
|
+
|
58
|
+
export interface ThreadHiddenItem {
|
59
|
+
$type?: 'app.bsky.unspecced.getPostThreadHiddenV2#threadHiddenItem'
|
60
|
+
uri: string
|
61
|
+
/** The nesting level of this item in the thread. Depth 0 means the anchor item. Items above have negative depths, items below have positive depths. */
|
62
|
+
depth: number
|
63
|
+
value: $Typed<ThreadHiddenItemPost> | { $type: string }
|
64
|
+
}
|
65
|
+
|
66
|
+
const hashThreadHiddenItem = 'threadHiddenItem'
|
67
|
+
|
68
|
+
export function isThreadHiddenItem<V>(v: V) {
|
69
|
+
return is$typed(v, id, hashThreadHiddenItem)
|
70
|
+
}
|
71
|
+
|
72
|
+
export function validateThreadHiddenItem<V>(v: V) {
|
73
|
+
return validate<ThreadHiddenItem & V>(v, id, hashThreadHiddenItem)
|
74
|
+
}
|
75
|
+
|
76
|
+
export interface ThreadHiddenItemPost {
|
77
|
+
$type?: 'app.bsky.unspecced.getPostThreadHiddenV2#threadHiddenItemPost'
|
78
|
+
post: AppBskyFeedDefs.PostView
|
79
|
+
/** The threadgate created by the author indicates this post as a reply to be hidden for everyone consuming the thread. */
|
80
|
+
hiddenByThreadgate: boolean
|
81
|
+
/** This is by an account muted by the viewer requesting it. */
|
82
|
+
mutedByViewer: boolean
|
83
|
+
}
|
84
|
+
|
85
|
+
const hashThreadHiddenItemPost = 'threadHiddenItemPost'
|
86
|
+
|
87
|
+
export function isThreadHiddenItemPost<V>(v: V) {
|
88
|
+
return is$typed(v, id, hashThreadHiddenItemPost)
|
89
|
+
}
|
90
|
+
|
91
|
+
export function validateThreadHiddenItemPost<V>(v: V) {
|
92
|
+
return validate<ThreadHiddenItemPost & V>(v, id, hashThreadHiddenItemPost)
|
93
|
+
}
|