@atproto/api 0.15.11 → 0.15.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 (34) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/client/index.d.ts +6 -6
  3. package/dist/client/index.d.ts.map +1 -1
  4. package/dist/client/index.js +9 -9
  5. package/dist/client/index.js.map +1 -1
  6. package/dist/client/lexicons.d.ts +200 -220
  7. package/dist/client/lexicons.d.ts.map +1 -1
  8. package/dist/client/lexicons.js +112 -117
  9. package/dist/client/lexicons.js.map +1 -1
  10. package/dist/client/types/app/bsky/unspecced/defs.d.ts +33 -0
  11. package/dist/client/types/app/bsky/unspecced/defs.d.ts.map +1 -1
  12. package/dist/client/types/app/bsky/unspecced/defs.js +36 -0
  13. package/dist/client/types/app/bsky/unspecced/defs.js.map +1 -1
  14. package/dist/client/types/app/bsky/unspecced/getPostThreadOtherV2.d.ts +40 -0
  15. package/dist/client/types/app/bsky/unspecced/getPostThreadOtherV2.d.ts.map +1 -0
  16. package/dist/client/types/app/bsky/unspecced/getPostThreadOtherV2.js +20 -0
  17. package/dist/client/types/app/bsky/unspecced/getPostThreadOtherV2.js.map +1 -0
  18. package/dist/client/types/app/bsky/unspecced/getPostThreadV2.d.ts +4 -31
  19. package/dist/client/types/app/bsky/unspecced/getPostThreadV2.d.ts.map +1 -1
  20. package/dist/client/types/app/bsky/unspecced/getPostThreadV2.js +0 -36
  21. package/dist/client/types/app/bsky/unspecced/getPostThreadV2.js.map +1 -1
  22. package/package.json +1 -1
  23. package/src/client/index.ts +16 -16
  24. package/src/client/lexicons.ts +119 -124
  25. package/src/client/types/app/bsky/unspecced/defs.ts +73 -0
  26. package/src/client/types/app/bsky/unspecced/getPostThreadOtherV2.ts +64 -0
  27. package/src/client/types/app/bsky/unspecced/getPostThreadV2.ts +7 -74
  28. package/tsconfig.build.tsbuildinfo +1 -1
  29. package/tsconfig.tests.tsbuildinfo +1 -1
  30. package/dist/client/types/app/bsky/unspecced/getPostThreadHiddenV2.d.ts +0 -50
  31. package/dist/client/types/app/bsky/unspecced/getPostThreadHiddenV2.d.ts.map +0 -1
  32. package/dist/client/types/app/bsky/unspecced/getPostThreadHiddenV2.js +0 -29
  33. package/dist/client/types/app/bsky/unspecced/getPostThreadHiddenV2.js.map +0 -1
  34. package/src/client/types/app/bsky/unspecced/getPostThreadHiddenV2.ts +0 -83
@@ -7239,6 +7239,48 @@ export const schemaDict = {
7239
7239
  },
7240
7240
  },
7241
7241
  },
7242
+ AppBskyFeedGetPosts: {
7243
+ lexicon: 1,
7244
+ id: 'app.bsky.feed.getPosts',
7245
+ defs: {
7246
+ main: {
7247
+ type: 'query',
7248
+ description:
7249
+ "Gets post views for a specified list of posts (by AT-URI). This is sometimes referred to as 'hydrating' a 'feed skeleton'.",
7250
+ parameters: {
7251
+ type: 'params',
7252
+ required: ['uris'],
7253
+ properties: {
7254
+ uris: {
7255
+ type: 'array',
7256
+ description: 'List of post AT-URIs to return hydrated views for.',
7257
+ items: {
7258
+ type: 'string',
7259
+ format: 'at-uri',
7260
+ },
7261
+ maxLength: 25,
7262
+ },
7263
+ },
7264
+ },
7265
+ output: {
7266
+ encoding: 'application/json',
7267
+ schema: {
7268
+ type: 'object',
7269
+ required: ['posts'],
7270
+ properties: {
7271
+ posts: {
7272
+ type: 'array',
7273
+ items: {
7274
+ type: 'ref',
7275
+ ref: 'lex:app.bsky.feed.defs#postView',
7276
+ },
7277
+ },
7278
+ },
7279
+ },
7280
+ },
7281
+ },
7282
+ },
7283
+ },
7242
7284
  AppBskyFeedGetPostThread: {
7243
7285
  lexicon: 1,
7244
7286
  id: 'app.bsky.feed.getPostThread',
@@ -7303,48 +7345,6 @@ export const schemaDict = {
7303
7345
  },
7304
7346
  },
7305
7347
  },
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
- },
7348
7348
  AppBskyFeedGetQuotes: {
7349
7349
  lexicon: 1,
7350
7350
  id: 'app.bsky.feed.getQuotes',
@@ -10201,6 +10201,66 @@ export const schemaDict = {
10201
10201
  },
10202
10202
  },
10203
10203
  },
10204
+ threadItemPost: {
10205
+ type: 'object',
10206
+ required: [
10207
+ 'post',
10208
+ 'moreParents',
10209
+ 'moreReplies',
10210
+ 'opThread',
10211
+ 'hiddenByThreadgate',
10212
+ 'mutedByViewer',
10213
+ ],
10214
+ properties: {
10215
+ post: {
10216
+ type: 'ref',
10217
+ ref: 'lex:app.bsky.feed.defs#postView',
10218
+ },
10219
+ moreParents: {
10220
+ type: 'boolean',
10221
+ description:
10222
+ 'This post has more parents that were not present in the response. This is just a boolean, without the number of parents.',
10223
+ },
10224
+ moreReplies: {
10225
+ type: 'integer',
10226
+ description:
10227
+ '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.',
10228
+ },
10229
+ opThread: {
10230
+ type: 'boolean',
10231
+ description:
10232
+ '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.',
10233
+ },
10234
+ hiddenByThreadgate: {
10235
+ type: 'boolean',
10236
+ description:
10237
+ 'The threadgate created by the author indicates this post as a reply to be hidden for everyone consuming the thread.',
10238
+ },
10239
+ mutedByViewer: {
10240
+ type: 'boolean',
10241
+ description:
10242
+ 'This is by an account muted by the viewer requesting it.',
10243
+ },
10244
+ },
10245
+ },
10246
+ threadItemNoUnauthenticated: {
10247
+ type: 'object',
10248
+ properties: {},
10249
+ },
10250
+ threadItemNotFound: {
10251
+ type: 'object',
10252
+ properties: {},
10253
+ },
10254
+ threadItemBlocked: {
10255
+ type: 'object',
10256
+ required: ['author'],
10257
+ properties: {
10258
+ author: {
10259
+ type: 'ref',
10260
+ ref: 'lex:app.bsky.feed.defs#blockedAuthor',
10261
+ },
10262
+ },
10263
+ },
10204
10264
  },
10205
10265
  },
10206
10266
  AppBskyUnspeccedGetConfig: {
@@ -10294,14 +10354,14 @@ export const schemaDict = {
10294
10354
  },
10295
10355
  },
10296
10356
  },
10297
- AppBskyUnspeccedGetPostThreadHiddenV2: {
10357
+ AppBskyUnspeccedGetPostThreadOtherV2: {
10298
10358
  lexicon: 1,
10299
- id: 'app.bsky.unspecced.getPostThreadHiddenV2',
10359
+ id: 'app.bsky.unspecced.getPostThreadOtherV2',
10300
10360
  defs: {
10301
10361
  main: {
10302
10362
  type: 'query',
10303
10363
  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.",
10364
+ "(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 additional posts under a thread e.g. replies hidden by threadgate. Based on an anchor post at any depth of the tree, returns top-level replies below that anchor. It does not include ancestors nor the anchor itself. 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
10365
  parameters: {
10306
10366
  type: 'params',
10307
10367
  required: ['anchor'],
@@ -10329,17 +10389,17 @@ export const schemaDict = {
10329
10389
  thread: {
10330
10390
  type: 'array',
10331
10391
  description:
10332
- 'A flat list of thread hidden items. The depth of each item is indicated by the depth property inside the item.',
10392
+ 'A flat list of other thread items. The depth of each item is indicated by the depth property inside the item.',
10333
10393
  items: {
10334
10394
  type: 'ref',
10335
- ref: 'lex:app.bsky.unspecced.getPostThreadHiddenV2#threadHiddenItem',
10395
+ ref: 'lex:app.bsky.unspecced.getPostThreadOtherV2#threadItem',
10336
10396
  },
10337
10397
  },
10338
10398
  },
10339
10399
  },
10340
10400
  },
10341
10401
  },
10342
- threadHiddenItem: {
10402
+ threadItem: {
10343
10403
  type: 'object',
10344
10404
  required: ['uri', 'depth', 'value'],
10345
10405
  properties: {
@@ -10354,29 +10414,7 @@ export const schemaDict = {
10354
10414
  },
10355
10415
  value: {
10356
10416
  type: 'union',
10357
- refs: [
10358
- 'lex:app.bsky.unspecced.getPostThreadHiddenV2#threadHiddenItemPost',
10359
- ],
10360
- },
10361
- },
10362
- },
10363
- threadHiddenItemPost: {
10364
- type: 'object',
10365
- required: ['post', 'hiddenByThreadgate', 'mutedByViewer'],
10366
- properties: {
10367
- post: {
10368
- type: 'ref',
10369
- ref: 'lex:app.bsky.feed.defs#postView',
10370
- },
10371
- hiddenByThreadgate: {
10372
- type: 'boolean',
10373
- description:
10374
- 'The threadgate created by the author indicates this post as a reply to be hidden for everyone consuming the thread.',
10375
- },
10376
- mutedByViewer: {
10377
- type: 'boolean',
10378
- description:
10379
- 'This is by an account muted by the viewer requesting it.',
10417
+ refs: ['lex:app.bsky.unspecced.defs#threadItemPost'],
10380
10418
  },
10381
10419
  },
10382
10420
  },
@@ -10439,7 +10477,7 @@ export const schemaDict = {
10439
10477
  encoding: 'application/json',
10440
10478
  schema: {
10441
10479
  type: 'object',
10442
- required: ['thread', 'hasHiddenReplies'],
10480
+ required: ['thread', 'hasOtherReplies'],
10443
10481
  properties: {
10444
10482
  thread: {
10445
10483
  type: 'array',
@@ -10454,10 +10492,10 @@ export const schemaDict = {
10454
10492
  type: 'ref',
10455
10493
  ref: 'lex:app.bsky.feed.defs#threadgateView',
10456
10494
  },
10457
- hasHiddenReplies: {
10495
+ hasOtherReplies: {
10458
10496
  type: 'boolean',
10459
10497
  description:
10460
- 'Whether this thread has hidden replies. If true, a call can be made to the `getPostThreadHiddenV2` endpoint to retrieve them.',
10498
+ 'Whether this thread has additional replies. If true, a call can be made to the `getPostThreadOtherV2` endpoint to retrieve them.',
10461
10499
  },
10462
10500
  },
10463
10501
  },
@@ -10479,57 +10517,14 @@ export const schemaDict = {
10479
10517
  value: {
10480
10518
  type: 'union',
10481
10519
  refs: [
10482
- 'lex:app.bsky.unspecced.getPostThreadV2#threadItemPost',
10483
- 'lex:app.bsky.unspecced.getPostThreadV2#threadItemNoUnauthenticated',
10484
- 'lex:app.bsky.unspecced.getPostThreadV2#threadItemNotFound',
10485
- 'lex:app.bsky.unspecced.getPostThreadV2#threadItemBlocked',
10520
+ 'lex:app.bsky.unspecced.defs#threadItemPost',
10521
+ 'lex:app.bsky.unspecced.defs#threadItemNoUnauthenticated',
10522
+ 'lex:app.bsky.unspecced.defs#threadItemNotFound',
10523
+ 'lex:app.bsky.unspecced.defs#threadItemBlocked',
10486
10524
  ],
10487
10525
  },
10488
10526
  },
10489
10527
  },
10490
- threadItemPost: {
10491
- type: 'object',
10492
- required: ['post', 'moreParents', 'moreReplies', 'opThread'],
10493
- properties: {
10494
- post: {
10495
- type: 'ref',
10496
- ref: 'lex:app.bsky.feed.defs#postView',
10497
- },
10498
- moreParents: {
10499
- type: 'boolean',
10500
- description:
10501
- 'This post has more parents that were not present in the response. This is just a boolean, without the number of parents.',
10502
- },
10503
- moreReplies: {
10504
- type: 'integer',
10505
- description:
10506
- '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.',
10507
- },
10508
- opThread: {
10509
- type: 'boolean',
10510
- description:
10511
- '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.',
10512
- },
10513
- },
10514
- },
10515
- threadItemNoUnauthenticated: {
10516
- type: 'object',
10517
- properties: {},
10518
- },
10519
- threadItemNotFound: {
10520
- type: 'object',
10521
- properties: {},
10522
- },
10523
- threadItemBlocked: {
10524
- type: 'object',
10525
- required: ['author'],
10526
- properties: {
10527
- author: {
10528
- type: 'ref',
10529
- ref: 'lex:app.bsky.feed.defs#blockedAuthor',
10530
- },
10531
- },
10532
- },
10533
10528
  },
10534
10529
  },
10535
10530
  AppBskyUnspeccedGetSuggestedFeeds: {
@@ -16515,8 +16510,8 @@ export const ids = {
16515
16510
  AppBskyFeedGetFeedSkeleton: 'app.bsky.feed.getFeedSkeleton',
16516
16511
  AppBskyFeedGetLikes: 'app.bsky.feed.getLikes',
16517
16512
  AppBskyFeedGetListFeed: 'app.bsky.feed.getListFeed',
16518
- AppBskyFeedGetPostThread: 'app.bsky.feed.getPostThread',
16519
16513
  AppBskyFeedGetPosts: 'app.bsky.feed.getPosts',
16514
+ AppBskyFeedGetPostThread: 'app.bsky.feed.getPostThread',
16520
16515
  AppBskyFeedGetQuotes: 'app.bsky.feed.getQuotes',
16521
16516
  AppBskyFeedGetRepostedBy: 'app.bsky.feed.getRepostedBy',
16522
16517
  AppBskyFeedGetSuggestedFeeds: 'app.bsky.feed.getSuggestedFeeds',
@@ -16573,8 +16568,8 @@ export const ids = {
16573
16568
  AppBskyUnspeccedGetConfig: 'app.bsky.unspecced.getConfig',
16574
16569
  AppBskyUnspeccedGetPopularFeedGenerators:
16575
16570
  'app.bsky.unspecced.getPopularFeedGenerators',
16576
- AppBskyUnspeccedGetPostThreadHiddenV2:
16577
- 'app.bsky.unspecced.getPostThreadHiddenV2',
16571
+ AppBskyUnspeccedGetPostThreadOtherV2:
16572
+ 'app.bsky.unspecced.getPostThreadOtherV2',
16578
16573
  AppBskyUnspeccedGetPostThreadV2: 'app.bsky.unspecced.getPostThreadV2',
16579
16574
  AppBskyUnspeccedGetSuggestedFeeds: 'app.bsky.unspecced.getSuggestedFeeds',
16580
16575
  AppBskyUnspeccedGetSuggestedFeedsSkeleton:
@@ -10,6 +10,7 @@ import {
10
10
  type OmitKey,
11
11
  } from '../../../../util'
12
12
  import type * as AppBskyActorDefs from '../actor/defs.js'
13
+ import type * as AppBskyFeedDefs from '../feed/defs.js'
13
14
 
14
15
  const is$typed = _is$typed,
15
16
  validate = _validate
@@ -125,3 +126,75 @@ export function isTrendView<V>(v: V) {
125
126
  export function validateTrendView<V>(v: V) {
126
127
  return validate<TrendView & V>(v, id, hashTrendView)
127
128
  }
129
+
130
+ export interface ThreadItemPost {
131
+ $type?: 'app.bsky.unspecced.defs#threadItemPost'
132
+ post: AppBskyFeedDefs.PostView
133
+ /** This post has more parents that were not present in the response. This is just a boolean, without the number of parents. */
134
+ moreParents: boolean
135
+ /** 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. */
136
+ moreReplies: number
137
+ /** 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. */
138
+ opThread: boolean
139
+ /** The threadgate created by the author indicates this post as a reply to be hidden for everyone consuming the thread. */
140
+ hiddenByThreadgate: boolean
141
+ /** This is by an account muted by the viewer requesting it. */
142
+ mutedByViewer: boolean
143
+ }
144
+
145
+ const hashThreadItemPost = 'threadItemPost'
146
+
147
+ export function isThreadItemPost<V>(v: V) {
148
+ return is$typed(v, id, hashThreadItemPost)
149
+ }
150
+
151
+ export function validateThreadItemPost<V>(v: V) {
152
+ return validate<ThreadItemPost & V>(v, id, hashThreadItemPost)
153
+ }
154
+
155
+ export interface ThreadItemNoUnauthenticated {
156
+ $type?: 'app.bsky.unspecced.defs#threadItemNoUnauthenticated'
157
+ }
158
+
159
+ const hashThreadItemNoUnauthenticated = 'threadItemNoUnauthenticated'
160
+
161
+ export function isThreadItemNoUnauthenticated<V>(v: V) {
162
+ return is$typed(v, id, hashThreadItemNoUnauthenticated)
163
+ }
164
+
165
+ export function validateThreadItemNoUnauthenticated<V>(v: V) {
166
+ return validate<ThreadItemNoUnauthenticated & V>(
167
+ v,
168
+ id,
169
+ hashThreadItemNoUnauthenticated,
170
+ )
171
+ }
172
+
173
+ export interface ThreadItemNotFound {
174
+ $type?: 'app.bsky.unspecced.defs#threadItemNotFound'
175
+ }
176
+
177
+ const hashThreadItemNotFound = 'threadItemNotFound'
178
+
179
+ export function isThreadItemNotFound<V>(v: V) {
180
+ return is$typed(v, id, hashThreadItemNotFound)
181
+ }
182
+
183
+ export function validateThreadItemNotFound<V>(v: V) {
184
+ return validate<ThreadItemNotFound & V>(v, id, hashThreadItemNotFound)
185
+ }
186
+
187
+ export interface ThreadItemBlocked {
188
+ $type?: 'app.bsky.unspecced.defs#threadItemBlocked'
189
+ author: AppBskyFeedDefs.BlockedAuthor
190
+ }
191
+
192
+ const hashThreadItemBlocked = 'threadItemBlocked'
193
+
194
+ export function isThreadItemBlocked<V>(v: V) {
195
+ return is$typed(v, id, hashThreadItemBlocked)
196
+ }
197
+
198
+ export function validateThreadItemBlocked<V>(v: V) {
199
+ return validate<ThreadItemBlocked & V>(v, id, hashThreadItemBlocked)
200
+ }
@@ -0,0 +1,64 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { HeadersMap, XRPCError } from '@atproto/xrpc'
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 type * as AppBskyUnspeccedDefs from './defs.js'
14
+
15
+ const is$typed = _is$typed,
16
+ validate = _validate
17
+ const id = 'app.bsky.unspecced.getPostThreadOtherV2'
18
+
19
+ export interface QueryParams {
20
+ /** Reference (AT-URI) to post record. This is the anchor post. */
21
+ anchor: string
22
+ /** Whether to prioritize posts from followed users. It only has effect when the user is authenticated. */
23
+ prioritizeFollowedUsers?: boolean
24
+ }
25
+
26
+ export type InputSchema = undefined
27
+
28
+ export interface OutputSchema {
29
+ /** A flat list of other thread items. The depth of each item is indicated by the depth property inside the item. */
30
+ thread: ThreadItem[]
31
+ }
32
+
33
+ export interface CallOptions {
34
+ signal?: AbortSignal
35
+ headers?: HeadersMap
36
+ }
37
+
38
+ export interface Response {
39
+ success: boolean
40
+ headers: HeadersMap
41
+ data: OutputSchema
42
+ }
43
+
44
+ export function toKnownErr(e: any) {
45
+ return e
46
+ }
47
+
48
+ export interface ThreadItem {
49
+ $type?: 'app.bsky.unspecced.getPostThreadOtherV2#threadItem'
50
+ uri: string
51
+ /** 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. */
52
+ depth: number
53
+ value: $Typed<AppBskyUnspeccedDefs.ThreadItemPost> | { $type: string }
54
+ }
55
+
56
+ const hashThreadItem = 'threadItem'
57
+
58
+ export function isThreadItem<V>(v: V) {
59
+ return is$typed(v, id, hashThreadItem)
60
+ }
61
+
62
+ export function validateThreadItem<V>(v: V) {
63
+ return validate<ThreadItem & V>(v, id, hashThreadItem)
64
+ }
@@ -11,6 +11,7 @@ import {
11
11
  type OmitKey,
12
12
  } from '../../../../util'
13
13
  import type * as AppBskyFeedDefs from '../feed/defs.js'
14
+ import type * as AppBskyUnspeccedDefs from './defs.js'
14
15
 
15
16
  const is$typed = _is$typed,
16
17
  validate = _validate
@@ -37,8 +38,8 @@ export interface OutputSchema {
37
38
  /** A flat list of thread items. The depth of each item is indicated by the depth property inside the item. */
38
39
  thread: ThreadItem[]
39
40
  threadgate?: AppBskyFeedDefs.ThreadgateView
40
- /** Whether this thread has hidden replies. If true, a call can be made to the `getPostThreadHiddenV2` endpoint to retrieve them. */
41
- hasHiddenReplies: boolean
41
+ /** Whether this thread has additional replies. If true, a call can be made to the `getPostThreadOtherV2` endpoint to retrieve them. */
42
+ hasOtherReplies: boolean
42
43
  }
43
44
 
44
45
  export interface CallOptions {
@@ -62,10 +63,10 @@ export interface ThreadItem {
62
63
  /** 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. */
63
64
  depth: number
64
65
  value:
65
- | $Typed<ThreadItemPost>
66
- | $Typed<ThreadItemNoUnauthenticated>
67
- | $Typed<ThreadItemNotFound>
68
- | $Typed<ThreadItemBlocked>
66
+ | $Typed<AppBskyUnspeccedDefs.ThreadItemPost>
67
+ | $Typed<AppBskyUnspeccedDefs.ThreadItemNoUnauthenticated>
68
+ | $Typed<AppBskyUnspeccedDefs.ThreadItemNotFound>
69
+ | $Typed<AppBskyUnspeccedDefs.ThreadItemBlocked>
69
70
  | { $type: string }
70
71
  }
71
72
 
@@ -78,71 +79,3 @@ export function isThreadItem<V>(v: V) {
78
79
  export function validateThreadItem<V>(v: V) {
79
80
  return validate<ThreadItem & V>(v, id, hashThreadItem)
80
81
  }
81
-
82
- export interface ThreadItemPost {
83
- $type?: 'app.bsky.unspecced.getPostThreadV2#threadItemPost'
84
- post: AppBskyFeedDefs.PostView
85
- /** This post has more parents that were not present in the response. This is just a boolean, without the number of parents. */
86
- moreParents: boolean
87
- /** 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. */
88
- moreReplies: number
89
- /** 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. */
90
- opThread: boolean
91
- }
92
-
93
- const hashThreadItemPost = 'threadItemPost'
94
-
95
- export function isThreadItemPost<V>(v: V) {
96
- return is$typed(v, id, hashThreadItemPost)
97
- }
98
-
99
- export function validateThreadItemPost<V>(v: V) {
100
- return validate<ThreadItemPost & V>(v, id, hashThreadItemPost)
101
- }
102
-
103
- export interface ThreadItemNoUnauthenticated {
104
- $type?: 'app.bsky.unspecced.getPostThreadV2#threadItemNoUnauthenticated'
105
- }
106
-
107
- const hashThreadItemNoUnauthenticated = 'threadItemNoUnauthenticated'
108
-
109
- export function isThreadItemNoUnauthenticated<V>(v: V) {
110
- return is$typed(v, id, hashThreadItemNoUnauthenticated)
111
- }
112
-
113
- export function validateThreadItemNoUnauthenticated<V>(v: V) {
114
- return validate<ThreadItemNoUnauthenticated & V>(
115
- v,
116
- id,
117
- hashThreadItemNoUnauthenticated,
118
- )
119
- }
120
-
121
- export interface ThreadItemNotFound {
122
- $type?: 'app.bsky.unspecced.getPostThreadV2#threadItemNotFound'
123
- }
124
-
125
- const hashThreadItemNotFound = 'threadItemNotFound'
126
-
127
- export function isThreadItemNotFound<V>(v: V) {
128
- return is$typed(v, id, hashThreadItemNotFound)
129
- }
130
-
131
- export function validateThreadItemNotFound<V>(v: V) {
132
- return validate<ThreadItemNotFound & V>(v, id, hashThreadItemNotFound)
133
- }
134
-
135
- export interface ThreadItemBlocked {
136
- $type?: 'app.bsky.unspecced.getPostThreadV2#threadItemBlocked'
137
- author: AppBskyFeedDefs.BlockedAuthor
138
- }
139
-
140
- const hashThreadItemBlocked = 'threadItemBlocked'
141
-
142
- export function isThreadItemBlocked<V>(v: V) {
143
- return is$typed(v, id, hashThreadItemBlocked)
144
- }
145
-
146
- export function validateThreadItemBlocked<V>(v: V) {
147
- return validate<ThreadItemBlocked & V>(v, id, hashThreadItemBlocked)
148
- }