@atproto/bsky 0.0.151 → 0.0.153

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 (104) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/api/app/bsky/unspecced/getPostThreadHiddenV2.d.ts +4 -0
  3. package/dist/api/app/bsky/unspecced/getPostThreadHiddenV2.d.ts.map +1 -0
  4. package/dist/api/app/bsky/unspecced/getPostThreadHiddenV2.js +77 -0
  5. package/dist/api/app/bsky/unspecced/getPostThreadHiddenV2.js.map +1 -0
  6. package/dist/api/app/bsky/unspecced/getPostThreadV2.d.ts +4 -0
  7. package/dist/api/app/bsky/unspecced/getPostThreadV2.d.ts.map +1 -0
  8. package/dist/api/app/bsky/unspecced/getPostThreadV2.js +86 -0
  9. package/dist/api/app/bsky/unspecced/getPostThreadV2.js.map +1 -0
  10. package/dist/api/com/atproto/repo/getRecord.d.ts.map +1 -1
  11. package/dist/api/com/atproto/repo/getRecord.js +1 -1
  12. package/dist/api/com/atproto/repo/getRecord.js.map +1 -1
  13. package/dist/api/index.d.ts.map +1 -1
  14. package/dist/api/index.js +4 -0
  15. package/dist/api/index.js.map +1 -1
  16. package/dist/config.d.ts +6 -0
  17. package/dist/config.d.ts.map +1 -1
  18. package/dist/config.js +17 -0
  19. package/dist/config.js.map +1 -1
  20. package/dist/data-plane/server/db/migrations/20250528T221913281Z-add-record-tags.d.ts +4 -0
  21. package/dist/data-plane/server/db/migrations/20250528T221913281Z-add-record-tags.d.ts.map +1 -0
  22. package/dist/data-plane/server/db/migrations/20250528T221913281Z-add-record-tags.js +11 -0
  23. package/dist/data-plane/server/db/migrations/20250528T221913281Z-add-record-tags.js.map +1 -0
  24. package/dist/data-plane/server/db/migrations/index.d.ts +1 -0
  25. package/dist/data-plane/server/db/migrations/index.d.ts.map +1 -1
  26. package/dist/data-plane/server/db/migrations/index.js +2 -1
  27. package/dist/data-plane/server/db/migrations/index.js.map +1 -1
  28. package/dist/data-plane/server/db/tables/record.d.ts +1 -0
  29. package/dist/data-plane/server/db/tables/record.d.ts.map +1 -1
  30. package/dist/data-plane/server/db/tables/record.js.map +1 -1
  31. package/dist/data-plane/server/routes/records.d.ts.map +1 -1
  32. package/dist/data-plane/server/routes/records.js +1 -0
  33. package/dist/data-plane/server/routes/records.js.map +1 -1
  34. package/dist/hydration/feed.d.ts +1 -0
  35. package/dist/hydration/feed.d.ts.map +1 -1
  36. package/dist/hydration/feed.js +2 -0
  37. package/dist/hydration/feed.js.map +1 -1
  38. package/dist/index.d.ts.map +1 -1
  39. package/dist/index.js +2 -0
  40. package/dist/index.js.map +1 -1
  41. package/dist/lexicon/index.d.ts +6 -2
  42. package/dist/lexicon/index.d.ts.map +1 -1
  43. package/dist/lexicon/index.js +12 -4
  44. package/dist/lexicon/index.js.map +1 -1
  45. package/dist/lexicon/lexicons.d.ts +508 -82
  46. package/dist/lexicon/lexicons.d.ts.map +1 -1
  47. package/dist/lexicon/lexicons.js +264 -42
  48. package/dist/lexicon/lexicons.js.map +1 -1
  49. package/dist/lexicon/types/app/bsky/unspecced/getPostThreadHiddenV2.d.ts +63 -0
  50. package/dist/lexicon/types/app/bsky/unspecced/getPostThreadHiddenV2.d.ts.map +1 -0
  51. package/dist/lexicon/types/app/bsky/unspecced/getPostThreadHiddenV2.js +25 -0
  52. package/dist/lexicon/types/app/bsky/unspecced/getPostThreadHiddenV2.js.map +1 -0
  53. package/dist/lexicon/types/app/bsky/unspecced/getPostThreadV2.d.ts +92 -0
  54. package/dist/lexicon/types/app/bsky/unspecced/getPostThreadV2.d.ts.map +1 -0
  55. package/dist/lexicon/types/app/bsky/unspecced/getPostThreadV2.js +52 -0
  56. package/dist/lexicon/types/app/bsky/unspecced/getPostThreadV2.js.map +1 -0
  57. package/dist/proto/bsky_pb.d.ts +4 -0
  58. package/dist/proto/bsky_pb.d.ts.map +1 -1
  59. package/dist/proto/bsky_pb.js +16 -0
  60. package/dist/proto/bsky_pb.js.map +1 -1
  61. package/dist/proto/bsync_connect.d.ts +19 -1
  62. package/dist/proto/bsync_connect.d.ts.map +1 -1
  63. package/dist/proto/bsync_connect.js +18 -0
  64. package/dist/proto/bsync_connect.js.map +1 -1
  65. package/dist/proto/bsync_pb.d.ts +150 -0
  66. package/dist/proto/bsync_pb.d.ts.map +1 -1
  67. package/dist/proto/bsync_pb.js +401 -1
  68. package/dist/proto/bsync_pb.js.map +1 -1
  69. package/dist/views/index.d.ts +40 -0
  70. package/dist/views/index.d.ts.map +1 -1
  71. package/dist/views/index.js +499 -0
  72. package/dist/views/index.js.map +1 -1
  73. package/dist/views/threads-v2.d.ts +65 -0
  74. package/dist/views/threads-v2.d.ts.map +1 -0
  75. package/dist/views/threads-v2.js +205 -0
  76. package/dist/views/threads-v2.js.map +1 -0
  77. package/package.json +5 -5
  78. package/proto/bsky.proto +1 -0
  79. package/src/api/app/bsky/unspecced/getPostThreadHiddenV2.ts +117 -0
  80. package/src/api/app/bsky/unspecced/getPostThreadV2.ts +130 -0
  81. package/src/api/com/atproto/repo/getRecord.ts +4 -1
  82. package/src/api/index.ts +4 -0
  83. package/src/config.ts +24 -0
  84. package/src/data-plane/server/db/migrations/20250528T221913281Z-add-record-tags.ts +9 -0
  85. package/src/data-plane/server/db/migrations/index.ts +1 -0
  86. package/src/data-plane/server/db/tables/record.ts +1 -0
  87. package/src/data-plane/server/routes/records.ts +1 -0
  88. package/src/hydration/feed.ts +4 -0
  89. package/src/index.ts +2 -0
  90. package/src/lexicon/index.ts +33 -9
  91. package/src/lexicon/lexicons.ts +284 -43
  92. package/src/lexicon/types/app/bsky/unspecced/getPostThreadHiddenV2.ts +95 -0
  93. package/src/lexicon/types/app/bsky/unspecced/getPostThreadV2.ts +160 -0
  94. package/src/proto/bsky_pb.ts +12 -0
  95. package/src/proto/bsync_connect.ts +22 -0
  96. package/src/proto/bsync_pb.ts +355 -0
  97. package/src/views/index.ts +780 -0
  98. package/src/views/threads-v2.ts +381 -0
  99. package/tests/seed/thread-v2.ts +874 -0
  100. package/tests/seed/util.ts +52 -0
  101. package/tests/views/__snapshots__/thread-v2.test.ts.snap +1091 -0
  102. package/tests/views/thread-v2.test.ts +2121 -0
  103. package/tsconfig.build.tsbuildinfo +1 -1
  104. package/tsconfig.tests.tsbuildinfo +1 -1
@@ -0,0 +1,1091 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`appview thread views v2 simple thread returns thread anchored on 1 1`] = `
4
+ Object {
5
+ "hasHiddenReplies": false,
6
+ "thread": Array [
7
+ Object {
8
+ "depth": -1,
9
+ "uri": "record(0)",
10
+ "value": Object {
11
+ "$type": "app.bsky.unspecced.getPostThreadV2#threadItemPost",
12
+ "moreParents": false,
13
+ "moreReplies": 0,
14
+ "opThread": true,
15
+ "post": Object {
16
+ "author": Object {
17
+ "did": "user(0)",
18
+ "handle": "simple-op.test",
19
+ "labels": Array [],
20
+ "viewer": Object {
21
+ "blockedBy": false,
22
+ "muted": false,
23
+ },
24
+ },
25
+ "cid": "cids(0)",
26
+ "indexedAt": "1970-01-01T00:00:00.000Z",
27
+ "labels": Array [],
28
+ "likeCount": 0,
29
+ "quoteCount": 0,
30
+ "record": Object {
31
+ "$type": "app.bsky.feed.post",
32
+ "createdAt": "1970-01-01T00:00:00.000Z",
33
+ "text": "root",
34
+ },
35
+ "replyCount": 4,
36
+ "repostCount": 0,
37
+ "uri": "record(0)",
38
+ "viewer": Object {
39
+ "embeddingDisabled": false,
40
+ "threadMuted": false,
41
+ },
42
+ },
43
+ },
44
+ },
45
+ Object {
46
+ "depth": 0,
47
+ "uri": "record(1)",
48
+ "value": Object {
49
+ "$type": "app.bsky.unspecced.getPostThreadV2#threadItemPost",
50
+ "moreParents": false,
51
+ "moreReplies": 0,
52
+ "opThread": false,
53
+ "post": Object {
54
+ "author": Object {
55
+ "did": "user(1)",
56
+ "handle": "simple-alice.test",
57
+ "labels": Array [],
58
+ "viewer": Object {
59
+ "blockedBy": false,
60
+ "muted": false,
61
+ },
62
+ },
63
+ "cid": "cids(1)",
64
+ "indexedAt": "1970-01-01T00:00:00.000Z",
65
+ "labels": Array [],
66
+ "likeCount": 0,
67
+ "quoteCount": 0,
68
+ "record": Object {
69
+ "$type": "app.bsky.feed.post",
70
+ "createdAt": "1970-01-01T00:00:00.000Z",
71
+ "reply": Object {
72
+ "parent": Object {
73
+ "cid": "cids(0)",
74
+ "uri": "record(0)",
75
+ },
76
+ "root": Object {
77
+ "cid": "cids(0)",
78
+ "uri": "record(0)",
79
+ },
80
+ },
81
+ "text": "1",
82
+ },
83
+ "replyCount": 0,
84
+ "repostCount": 0,
85
+ "uri": "record(1)",
86
+ "viewer": Object {
87
+ "embeddingDisabled": false,
88
+ "threadMuted": false,
89
+ },
90
+ },
91
+ },
92
+ },
93
+ ],
94
+ }
95
+ `;
96
+
97
+ exports[`appview thread views v2 simple thread returns thread anchored on 2 1`] = `
98
+ Object {
99
+ "hasHiddenReplies": false,
100
+ "thread": Array [
101
+ Object {
102
+ "depth": -1,
103
+ "uri": "record(0)",
104
+ "value": Object {
105
+ "$type": "app.bsky.unspecced.getPostThreadV2#threadItemPost",
106
+ "moreParents": false,
107
+ "moreReplies": 0,
108
+ "opThread": true,
109
+ "post": Object {
110
+ "author": Object {
111
+ "did": "user(0)",
112
+ "handle": "simple-op.test",
113
+ "labels": Array [],
114
+ "viewer": Object {
115
+ "blockedBy": false,
116
+ "muted": false,
117
+ },
118
+ },
119
+ "cid": "cids(0)",
120
+ "indexedAt": "1970-01-01T00:00:00.000Z",
121
+ "labels": Array [],
122
+ "likeCount": 0,
123
+ "quoteCount": 0,
124
+ "record": Object {
125
+ "$type": "app.bsky.feed.post",
126
+ "createdAt": "1970-01-01T00:00:00.000Z",
127
+ "text": "root",
128
+ },
129
+ "replyCount": 4,
130
+ "repostCount": 0,
131
+ "uri": "record(0)",
132
+ "viewer": Object {
133
+ "embeddingDisabled": false,
134
+ "threadMuted": false,
135
+ },
136
+ },
137
+ },
138
+ },
139
+ Object {
140
+ "depth": 0,
141
+ "uri": "record(1)",
142
+ "value": Object {
143
+ "$type": "app.bsky.unspecced.getPostThreadV2#threadItemPost",
144
+ "moreParents": false,
145
+ "moreReplies": 0,
146
+ "opThread": false,
147
+ "post": Object {
148
+ "author": Object {
149
+ "did": "user(1)",
150
+ "handle": "simple-bob.test",
151
+ "labels": Array [],
152
+ "viewer": Object {
153
+ "blockedBy": false,
154
+ "muted": false,
155
+ },
156
+ },
157
+ "cid": "cids(1)",
158
+ "indexedAt": "1970-01-01T00:00:00.000Z",
159
+ "labels": Array [],
160
+ "likeCount": 0,
161
+ "quoteCount": 0,
162
+ "record": Object {
163
+ "$type": "app.bsky.feed.post",
164
+ "createdAt": "1970-01-01T00:00:00.000Z",
165
+ "reply": Object {
166
+ "parent": Object {
167
+ "cid": "cids(0)",
168
+ "uri": "record(0)",
169
+ },
170
+ "root": Object {
171
+ "cid": "cids(0)",
172
+ "uri": "record(0)",
173
+ },
174
+ },
175
+ "text": "2",
176
+ },
177
+ "replyCount": 1,
178
+ "repostCount": 0,
179
+ "uri": "record(1)",
180
+ "viewer": Object {
181
+ "embeddingDisabled": false,
182
+ "threadMuted": false,
183
+ },
184
+ },
185
+ },
186
+ },
187
+ Object {
188
+ "depth": 1,
189
+ "uri": "record(2)",
190
+ "value": Object {
191
+ "$type": "app.bsky.unspecced.getPostThreadV2#threadItemPost",
192
+ "moreParents": false,
193
+ "moreReplies": 0,
194
+ "opThread": false,
195
+ "post": Object {
196
+ "author": Object {
197
+ "did": "user(2)",
198
+ "handle": "simple-alice.test",
199
+ "labels": Array [],
200
+ "viewer": Object {
201
+ "blockedBy": false,
202
+ "muted": false,
203
+ },
204
+ },
205
+ "cid": "cids(2)",
206
+ "indexedAt": "1970-01-01T00:00:00.000Z",
207
+ "labels": Array [],
208
+ "likeCount": 0,
209
+ "quoteCount": 0,
210
+ "record": Object {
211
+ "$type": "app.bsky.feed.post",
212
+ "createdAt": "1970-01-01T00:00:00.000Z",
213
+ "reply": Object {
214
+ "parent": Object {
215
+ "cid": "cids(1)",
216
+ "uri": "record(1)",
217
+ },
218
+ "root": Object {
219
+ "cid": "cids(0)",
220
+ "uri": "record(0)",
221
+ },
222
+ },
223
+ "text": "2.0",
224
+ },
225
+ "replyCount": 0,
226
+ "repostCount": 0,
227
+ "uri": "record(2)",
228
+ "viewer": Object {
229
+ "embeddingDisabled": false,
230
+ "threadMuted": false,
231
+ },
232
+ },
233
+ },
234
+ },
235
+ ],
236
+ }
237
+ `;
238
+
239
+ exports[`appview thread views v2 simple thread returns thread anchored on 2.0 1`] = `
240
+ Object {
241
+ "hasHiddenReplies": false,
242
+ "thread": Array [
243
+ Object {
244
+ "depth": -2,
245
+ "uri": "record(0)",
246
+ "value": Object {
247
+ "$type": "app.bsky.unspecced.getPostThreadV2#threadItemPost",
248
+ "moreParents": false,
249
+ "moreReplies": 0,
250
+ "opThread": true,
251
+ "post": Object {
252
+ "author": Object {
253
+ "did": "user(0)",
254
+ "handle": "simple-op.test",
255
+ "labels": Array [],
256
+ "viewer": Object {
257
+ "blockedBy": false,
258
+ "muted": false,
259
+ },
260
+ },
261
+ "cid": "cids(0)",
262
+ "indexedAt": "1970-01-01T00:00:00.000Z",
263
+ "labels": Array [],
264
+ "likeCount": 0,
265
+ "quoteCount": 0,
266
+ "record": Object {
267
+ "$type": "app.bsky.feed.post",
268
+ "createdAt": "1970-01-01T00:00:00.000Z",
269
+ "text": "root",
270
+ },
271
+ "replyCount": 4,
272
+ "repostCount": 0,
273
+ "uri": "record(0)",
274
+ "viewer": Object {
275
+ "embeddingDisabled": false,
276
+ "threadMuted": false,
277
+ },
278
+ },
279
+ },
280
+ },
281
+ Object {
282
+ "depth": -1,
283
+ "uri": "record(1)",
284
+ "value": Object {
285
+ "$type": "app.bsky.unspecced.getPostThreadV2#threadItemPost",
286
+ "moreParents": false,
287
+ "moreReplies": 0,
288
+ "opThread": false,
289
+ "post": Object {
290
+ "author": Object {
291
+ "did": "user(1)",
292
+ "handle": "simple-bob.test",
293
+ "labels": Array [],
294
+ "viewer": Object {
295
+ "blockedBy": false,
296
+ "muted": false,
297
+ },
298
+ },
299
+ "cid": "cids(1)",
300
+ "indexedAt": "1970-01-01T00:00:00.000Z",
301
+ "labels": Array [],
302
+ "likeCount": 0,
303
+ "quoteCount": 0,
304
+ "record": Object {
305
+ "$type": "app.bsky.feed.post",
306
+ "createdAt": "1970-01-01T00:00:00.000Z",
307
+ "reply": Object {
308
+ "parent": Object {
309
+ "cid": "cids(0)",
310
+ "uri": "record(0)",
311
+ },
312
+ "root": Object {
313
+ "cid": "cids(0)",
314
+ "uri": "record(0)",
315
+ },
316
+ },
317
+ "text": "2",
318
+ },
319
+ "replyCount": 1,
320
+ "repostCount": 0,
321
+ "uri": "record(1)",
322
+ "viewer": Object {
323
+ "embeddingDisabled": false,
324
+ "threadMuted": false,
325
+ },
326
+ },
327
+ },
328
+ },
329
+ Object {
330
+ "depth": 0,
331
+ "uri": "record(2)",
332
+ "value": Object {
333
+ "$type": "app.bsky.unspecced.getPostThreadV2#threadItemPost",
334
+ "moreParents": false,
335
+ "moreReplies": 0,
336
+ "opThread": false,
337
+ "post": Object {
338
+ "author": Object {
339
+ "did": "user(2)",
340
+ "handle": "simple-alice.test",
341
+ "labels": Array [],
342
+ "viewer": Object {
343
+ "blockedBy": false,
344
+ "muted": false,
345
+ },
346
+ },
347
+ "cid": "cids(2)",
348
+ "indexedAt": "1970-01-01T00:00:00.000Z",
349
+ "labels": Array [],
350
+ "likeCount": 0,
351
+ "quoteCount": 0,
352
+ "record": Object {
353
+ "$type": "app.bsky.feed.post",
354
+ "createdAt": "1970-01-01T00:00:00.000Z",
355
+ "reply": Object {
356
+ "parent": Object {
357
+ "cid": "cids(1)",
358
+ "uri": "record(1)",
359
+ },
360
+ "root": Object {
361
+ "cid": "cids(0)",
362
+ "uri": "record(0)",
363
+ },
364
+ },
365
+ "text": "2.0",
366
+ },
367
+ "replyCount": 0,
368
+ "repostCount": 0,
369
+ "uri": "record(2)",
370
+ "viewer": Object {
371
+ "embeddingDisabled": false,
372
+ "threadMuted": false,
373
+ },
374
+ },
375
+ },
376
+ },
377
+ ],
378
+ }
379
+ `;
380
+
381
+ exports[`appview thread views v2 simple thread returns thread anchored on 3 1`] = `
382
+ Object {
383
+ "hasHiddenReplies": false,
384
+ "thread": Array [
385
+ Object {
386
+ "depth": -1,
387
+ "uri": "record(0)",
388
+ "value": Object {
389
+ "$type": "app.bsky.unspecced.getPostThreadV2#threadItemPost",
390
+ "moreParents": false,
391
+ "moreReplies": 0,
392
+ "opThread": true,
393
+ "post": Object {
394
+ "author": Object {
395
+ "did": "user(0)",
396
+ "handle": "simple-op.test",
397
+ "labels": Array [],
398
+ "viewer": Object {
399
+ "blockedBy": false,
400
+ "muted": false,
401
+ },
402
+ },
403
+ "cid": "cids(0)",
404
+ "indexedAt": "1970-01-01T00:00:00.000Z",
405
+ "labels": Array [],
406
+ "likeCount": 0,
407
+ "quoteCount": 0,
408
+ "record": Object {
409
+ "$type": "app.bsky.feed.post",
410
+ "createdAt": "1970-01-01T00:00:00.000Z",
411
+ "text": "root",
412
+ },
413
+ "replyCount": 4,
414
+ "repostCount": 0,
415
+ "uri": "record(0)",
416
+ "viewer": Object {
417
+ "embeddingDisabled": false,
418
+ "threadMuted": false,
419
+ },
420
+ },
421
+ },
422
+ },
423
+ Object {
424
+ "depth": 0,
425
+ "uri": "record(1)",
426
+ "value": Object {
427
+ "$type": "app.bsky.unspecced.getPostThreadV2#threadItemPost",
428
+ "moreParents": false,
429
+ "moreReplies": 0,
430
+ "opThread": false,
431
+ "post": Object {
432
+ "author": Object {
433
+ "did": "user(1)",
434
+ "handle": "simple-carol.test",
435
+ "labels": Array [],
436
+ "viewer": Object {
437
+ "blockedBy": false,
438
+ "muted": false,
439
+ },
440
+ },
441
+ "cid": "cids(1)",
442
+ "indexedAt": "1970-01-01T00:00:00.000Z",
443
+ "labels": Array [],
444
+ "likeCount": 0,
445
+ "quoteCount": 0,
446
+ "record": Object {
447
+ "$type": "app.bsky.feed.post",
448
+ "createdAt": "1970-01-01T00:00:00.000Z",
449
+ "reply": Object {
450
+ "parent": Object {
451
+ "cid": "cids(0)",
452
+ "uri": "record(0)",
453
+ },
454
+ "root": Object {
455
+ "cid": "cids(0)",
456
+ "uri": "record(0)",
457
+ },
458
+ },
459
+ "text": "3",
460
+ },
461
+ "replyCount": 0,
462
+ "repostCount": 0,
463
+ "uri": "record(1)",
464
+ "viewer": Object {
465
+ "embeddingDisabled": false,
466
+ "threadMuted": false,
467
+ },
468
+ },
469
+ },
470
+ },
471
+ ],
472
+ }
473
+ `;
474
+
475
+ exports[`appview thread views v2 simple thread returns thread anchored on r 0 1`] = `
476
+ Object {
477
+ "hasHiddenReplies": false,
478
+ "thread": Array [
479
+ Object {
480
+ "depth": -1,
481
+ "uri": "record(0)",
482
+ "value": Object {
483
+ "$type": "app.bsky.unspecced.getPostThreadV2#threadItemPost",
484
+ "moreParents": false,
485
+ "moreReplies": 0,
486
+ "opThread": true,
487
+ "post": Object {
488
+ "author": Object {
489
+ "did": "user(0)",
490
+ "handle": "simple-op.test",
491
+ "labels": Array [],
492
+ "viewer": Object {
493
+ "blockedBy": false,
494
+ "muted": false,
495
+ },
496
+ },
497
+ "cid": "cids(0)",
498
+ "indexedAt": "1970-01-01T00:00:00.000Z",
499
+ "labels": Array [],
500
+ "likeCount": 0,
501
+ "quoteCount": 0,
502
+ "record": Object {
503
+ "$type": "app.bsky.feed.post",
504
+ "createdAt": "1970-01-01T00:00:00.000Z",
505
+ "text": "root",
506
+ },
507
+ "replyCount": 4,
508
+ "repostCount": 0,
509
+ "uri": "record(0)",
510
+ "viewer": Object {
511
+ "embeddingDisabled": false,
512
+ "threadMuted": false,
513
+ },
514
+ },
515
+ },
516
+ },
517
+ Object {
518
+ "depth": 0,
519
+ "uri": "record(1)",
520
+ "value": Object {
521
+ "$type": "app.bsky.unspecced.getPostThreadV2#threadItemPost",
522
+ "moreParents": false,
523
+ "moreReplies": 0,
524
+ "opThread": true,
525
+ "post": Object {
526
+ "author": Object {
527
+ "did": "user(0)",
528
+ "handle": "simple-op.test",
529
+ "labels": Array [],
530
+ "viewer": Object {
531
+ "blockedBy": false,
532
+ "muted": false,
533
+ },
534
+ },
535
+ "cid": "cids(1)",
536
+ "indexedAt": "1970-01-01T00:00:00.000Z",
537
+ "labels": Array [],
538
+ "likeCount": 0,
539
+ "quoteCount": 0,
540
+ "record": Object {
541
+ "$type": "app.bsky.feed.post",
542
+ "createdAt": "1970-01-01T00:00:00.000Z",
543
+ "reply": Object {
544
+ "parent": Object {
545
+ "cid": "cids(0)",
546
+ "uri": "record(0)",
547
+ },
548
+ "root": Object {
549
+ "cid": "cids(0)",
550
+ "uri": "record(0)",
551
+ },
552
+ },
553
+ "text": "0",
554
+ },
555
+ "replyCount": 1,
556
+ "repostCount": 0,
557
+ "uri": "record(1)",
558
+ "viewer": Object {
559
+ "embeddingDisabled": false,
560
+ "threadMuted": false,
561
+ },
562
+ },
563
+ },
564
+ },
565
+ Object {
566
+ "depth": 1,
567
+ "uri": "record(2)",
568
+ "value": Object {
569
+ "$type": "app.bsky.unspecced.getPostThreadV2#threadItemPost",
570
+ "moreParents": false,
571
+ "moreReplies": 0,
572
+ "opThread": true,
573
+ "post": Object {
574
+ "author": Object {
575
+ "did": "user(0)",
576
+ "handle": "simple-op.test",
577
+ "labels": Array [],
578
+ "viewer": Object {
579
+ "blockedBy": false,
580
+ "muted": false,
581
+ },
582
+ },
583
+ "cid": "cids(2)",
584
+ "indexedAt": "1970-01-01T00:00:00.000Z",
585
+ "labels": Array [],
586
+ "likeCount": 0,
587
+ "quoteCount": 0,
588
+ "record": Object {
589
+ "$type": "app.bsky.feed.post",
590
+ "createdAt": "1970-01-01T00:00:00.000Z",
591
+ "reply": Object {
592
+ "parent": Object {
593
+ "cid": "cids(1)",
594
+ "uri": "record(1)",
595
+ },
596
+ "root": Object {
597
+ "cid": "cids(0)",
598
+ "uri": "record(0)",
599
+ },
600
+ },
601
+ "text": "0.0",
602
+ },
603
+ "replyCount": 0,
604
+ "repostCount": 0,
605
+ "uri": "record(2)",
606
+ "viewer": Object {
607
+ "embeddingDisabled": false,
608
+ "threadMuted": false,
609
+ },
610
+ },
611
+ },
612
+ },
613
+ ],
614
+ }
615
+ `;
616
+
617
+ exports[`appview thread views v2 simple thread returns thread anchored on r 0.0 1`] = `
618
+ Object {
619
+ "hasHiddenReplies": false,
620
+ "thread": Array [
621
+ Object {
622
+ "depth": -2,
623
+ "uri": "record(0)",
624
+ "value": Object {
625
+ "$type": "app.bsky.unspecced.getPostThreadV2#threadItemPost",
626
+ "moreParents": false,
627
+ "moreReplies": 0,
628
+ "opThread": true,
629
+ "post": Object {
630
+ "author": Object {
631
+ "did": "user(0)",
632
+ "handle": "simple-op.test",
633
+ "labels": Array [],
634
+ "viewer": Object {
635
+ "blockedBy": false,
636
+ "muted": false,
637
+ },
638
+ },
639
+ "cid": "cids(0)",
640
+ "indexedAt": "1970-01-01T00:00:00.000Z",
641
+ "labels": Array [],
642
+ "likeCount": 0,
643
+ "quoteCount": 0,
644
+ "record": Object {
645
+ "$type": "app.bsky.feed.post",
646
+ "createdAt": "1970-01-01T00:00:00.000Z",
647
+ "text": "root",
648
+ },
649
+ "replyCount": 4,
650
+ "repostCount": 0,
651
+ "uri": "record(0)",
652
+ "viewer": Object {
653
+ "embeddingDisabled": false,
654
+ "threadMuted": false,
655
+ },
656
+ },
657
+ },
658
+ },
659
+ Object {
660
+ "depth": -1,
661
+ "uri": "record(1)",
662
+ "value": Object {
663
+ "$type": "app.bsky.unspecced.getPostThreadV2#threadItemPost",
664
+ "moreParents": false,
665
+ "moreReplies": 0,
666
+ "opThread": true,
667
+ "post": Object {
668
+ "author": Object {
669
+ "did": "user(0)",
670
+ "handle": "simple-op.test",
671
+ "labels": Array [],
672
+ "viewer": Object {
673
+ "blockedBy": false,
674
+ "muted": false,
675
+ },
676
+ },
677
+ "cid": "cids(1)",
678
+ "indexedAt": "1970-01-01T00:00:00.000Z",
679
+ "labels": Array [],
680
+ "likeCount": 0,
681
+ "quoteCount": 0,
682
+ "record": Object {
683
+ "$type": "app.bsky.feed.post",
684
+ "createdAt": "1970-01-01T00:00:00.000Z",
685
+ "reply": Object {
686
+ "parent": Object {
687
+ "cid": "cids(0)",
688
+ "uri": "record(0)",
689
+ },
690
+ "root": Object {
691
+ "cid": "cids(0)",
692
+ "uri": "record(0)",
693
+ },
694
+ },
695
+ "text": "0",
696
+ },
697
+ "replyCount": 1,
698
+ "repostCount": 0,
699
+ "uri": "record(1)",
700
+ "viewer": Object {
701
+ "embeddingDisabled": false,
702
+ "threadMuted": false,
703
+ },
704
+ },
705
+ },
706
+ },
707
+ Object {
708
+ "depth": 0,
709
+ "uri": "record(2)",
710
+ "value": Object {
711
+ "$type": "app.bsky.unspecced.getPostThreadV2#threadItemPost",
712
+ "moreParents": false,
713
+ "moreReplies": 0,
714
+ "opThread": true,
715
+ "post": Object {
716
+ "author": Object {
717
+ "did": "user(0)",
718
+ "handle": "simple-op.test",
719
+ "labels": Array [],
720
+ "viewer": Object {
721
+ "blockedBy": false,
722
+ "muted": false,
723
+ },
724
+ },
725
+ "cid": "cids(2)",
726
+ "indexedAt": "1970-01-01T00:00:00.000Z",
727
+ "labels": Array [],
728
+ "likeCount": 0,
729
+ "quoteCount": 0,
730
+ "record": Object {
731
+ "$type": "app.bsky.feed.post",
732
+ "createdAt": "1970-01-01T00:00:00.000Z",
733
+ "reply": Object {
734
+ "parent": Object {
735
+ "cid": "cids(1)",
736
+ "uri": "record(1)",
737
+ },
738
+ "root": Object {
739
+ "cid": "cids(0)",
740
+ "uri": "record(0)",
741
+ },
742
+ },
743
+ "text": "0.0",
744
+ },
745
+ "replyCount": 0,
746
+ "repostCount": 0,
747
+ "uri": "record(2)",
748
+ "viewer": Object {
749
+ "embeddingDisabled": false,
750
+ "threadMuted": false,
751
+ },
752
+ },
753
+ },
754
+ },
755
+ ],
756
+ }
757
+ `;
758
+
759
+ exports[`appview thread views v2 simple thread returns thread anchored on root 1`] = `
760
+ Object {
761
+ "hasHiddenReplies": false,
762
+ "thread": Array [
763
+ Object {
764
+ "depth": 0,
765
+ "uri": "record(0)",
766
+ "value": Object {
767
+ "$type": "app.bsky.unspecced.getPostThreadV2#threadItemPost",
768
+ "moreParents": false,
769
+ "moreReplies": 0,
770
+ "opThread": true,
771
+ "post": Object {
772
+ "author": Object {
773
+ "did": "user(0)",
774
+ "handle": "simple-op.test",
775
+ "labels": Array [],
776
+ "viewer": Object {
777
+ "blockedBy": false,
778
+ "muted": false,
779
+ },
780
+ },
781
+ "cid": "cids(0)",
782
+ "indexedAt": "1970-01-01T00:00:00.000Z",
783
+ "labels": Array [],
784
+ "likeCount": 0,
785
+ "quoteCount": 0,
786
+ "record": Object {
787
+ "$type": "app.bsky.feed.post",
788
+ "createdAt": "1970-01-01T00:00:00.000Z",
789
+ "text": "root",
790
+ },
791
+ "replyCount": 4,
792
+ "repostCount": 0,
793
+ "uri": "record(0)",
794
+ "viewer": Object {
795
+ "embeddingDisabled": false,
796
+ "threadMuted": false,
797
+ },
798
+ },
799
+ },
800
+ },
801
+ Object {
802
+ "depth": 1,
803
+ "uri": "record(1)",
804
+ "value": Object {
805
+ "$type": "app.bsky.unspecced.getPostThreadV2#threadItemPost",
806
+ "moreParents": false,
807
+ "moreReplies": 0,
808
+ "opThread": true,
809
+ "post": Object {
810
+ "author": Object {
811
+ "did": "user(0)",
812
+ "handle": "simple-op.test",
813
+ "labels": Array [],
814
+ "viewer": Object {
815
+ "blockedBy": false,
816
+ "muted": false,
817
+ },
818
+ },
819
+ "cid": "cids(1)",
820
+ "indexedAt": "1970-01-01T00:00:00.000Z",
821
+ "labels": Array [],
822
+ "likeCount": 0,
823
+ "quoteCount": 0,
824
+ "record": Object {
825
+ "$type": "app.bsky.feed.post",
826
+ "createdAt": "1970-01-01T00:00:00.000Z",
827
+ "reply": Object {
828
+ "parent": Object {
829
+ "cid": "cids(0)",
830
+ "uri": "record(0)",
831
+ },
832
+ "root": Object {
833
+ "cid": "cids(0)",
834
+ "uri": "record(0)",
835
+ },
836
+ },
837
+ "text": "0",
838
+ },
839
+ "replyCount": 1,
840
+ "repostCount": 0,
841
+ "uri": "record(1)",
842
+ "viewer": Object {
843
+ "embeddingDisabled": false,
844
+ "threadMuted": false,
845
+ },
846
+ },
847
+ },
848
+ },
849
+ Object {
850
+ "depth": 2,
851
+ "uri": "record(2)",
852
+ "value": Object {
853
+ "$type": "app.bsky.unspecced.getPostThreadV2#threadItemPost",
854
+ "moreParents": false,
855
+ "moreReplies": 0,
856
+ "opThread": true,
857
+ "post": Object {
858
+ "author": Object {
859
+ "did": "user(0)",
860
+ "handle": "simple-op.test",
861
+ "labels": Array [],
862
+ "viewer": Object {
863
+ "blockedBy": false,
864
+ "muted": false,
865
+ },
866
+ },
867
+ "cid": "cids(2)",
868
+ "indexedAt": "1970-01-01T00:00:00.000Z",
869
+ "labels": Array [],
870
+ "likeCount": 0,
871
+ "quoteCount": 0,
872
+ "record": Object {
873
+ "$type": "app.bsky.feed.post",
874
+ "createdAt": "1970-01-01T00:00:00.000Z",
875
+ "reply": Object {
876
+ "parent": Object {
877
+ "cid": "cids(1)",
878
+ "uri": "record(1)",
879
+ },
880
+ "root": Object {
881
+ "cid": "cids(0)",
882
+ "uri": "record(0)",
883
+ },
884
+ },
885
+ "text": "0.0",
886
+ },
887
+ "replyCount": 0,
888
+ "repostCount": 0,
889
+ "uri": "record(2)",
890
+ "viewer": Object {
891
+ "embeddingDisabled": false,
892
+ "threadMuted": false,
893
+ },
894
+ },
895
+ },
896
+ },
897
+ Object {
898
+ "depth": 1,
899
+ "uri": "record(3)",
900
+ "value": Object {
901
+ "$type": "app.bsky.unspecced.getPostThreadV2#threadItemPost",
902
+ "moreParents": false,
903
+ "moreReplies": 0,
904
+ "opThread": false,
905
+ "post": Object {
906
+ "author": Object {
907
+ "did": "user(1)",
908
+ "handle": "simple-alice.test",
909
+ "labels": Array [],
910
+ "viewer": Object {
911
+ "blockedBy": false,
912
+ "muted": false,
913
+ },
914
+ },
915
+ "cid": "cids(3)",
916
+ "indexedAt": "1970-01-01T00:00:00.000Z",
917
+ "labels": Array [],
918
+ "likeCount": 0,
919
+ "quoteCount": 0,
920
+ "record": Object {
921
+ "$type": "app.bsky.feed.post",
922
+ "createdAt": "1970-01-01T00:00:00.000Z",
923
+ "reply": Object {
924
+ "parent": Object {
925
+ "cid": "cids(0)",
926
+ "uri": "record(0)",
927
+ },
928
+ "root": Object {
929
+ "cid": "cids(0)",
930
+ "uri": "record(0)",
931
+ },
932
+ },
933
+ "text": "1",
934
+ },
935
+ "replyCount": 0,
936
+ "repostCount": 0,
937
+ "uri": "record(3)",
938
+ "viewer": Object {
939
+ "embeddingDisabled": false,
940
+ "threadMuted": false,
941
+ },
942
+ },
943
+ },
944
+ },
945
+ Object {
946
+ "depth": 1,
947
+ "uri": "record(4)",
948
+ "value": Object {
949
+ "$type": "app.bsky.unspecced.getPostThreadV2#threadItemPost",
950
+ "moreParents": false,
951
+ "moreReplies": 0,
952
+ "opThread": false,
953
+ "post": Object {
954
+ "author": Object {
955
+ "did": "user(2)",
956
+ "handle": "simple-bob.test",
957
+ "labels": Array [],
958
+ "viewer": Object {
959
+ "blockedBy": false,
960
+ "muted": false,
961
+ },
962
+ },
963
+ "cid": "cids(4)",
964
+ "indexedAt": "1970-01-01T00:00:00.000Z",
965
+ "labels": Array [],
966
+ "likeCount": 0,
967
+ "quoteCount": 0,
968
+ "record": Object {
969
+ "$type": "app.bsky.feed.post",
970
+ "createdAt": "1970-01-01T00:00:00.000Z",
971
+ "reply": Object {
972
+ "parent": Object {
973
+ "cid": "cids(0)",
974
+ "uri": "record(0)",
975
+ },
976
+ "root": Object {
977
+ "cid": "cids(0)",
978
+ "uri": "record(0)",
979
+ },
980
+ },
981
+ "text": "2",
982
+ },
983
+ "replyCount": 1,
984
+ "repostCount": 0,
985
+ "uri": "record(4)",
986
+ "viewer": Object {
987
+ "embeddingDisabled": false,
988
+ "threadMuted": false,
989
+ },
990
+ },
991
+ },
992
+ },
993
+ Object {
994
+ "depth": 2,
995
+ "uri": "record(5)",
996
+ "value": Object {
997
+ "$type": "app.bsky.unspecced.getPostThreadV2#threadItemPost",
998
+ "moreParents": false,
999
+ "moreReplies": 0,
1000
+ "opThread": false,
1001
+ "post": Object {
1002
+ "author": Object {
1003
+ "did": "user(1)",
1004
+ "handle": "simple-alice.test",
1005
+ "labels": Array [],
1006
+ "viewer": Object {
1007
+ "blockedBy": false,
1008
+ "muted": false,
1009
+ },
1010
+ },
1011
+ "cid": "cids(5)",
1012
+ "indexedAt": "1970-01-01T00:00:00.000Z",
1013
+ "labels": Array [],
1014
+ "likeCount": 0,
1015
+ "quoteCount": 0,
1016
+ "record": Object {
1017
+ "$type": "app.bsky.feed.post",
1018
+ "createdAt": "1970-01-01T00:00:00.000Z",
1019
+ "reply": Object {
1020
+ "parent": Object {
1021
+ "cid": "cids(4)",
1022
+ "uri": "record(4)",
1023
+ },
1024
+ "root": Object {
1025
+ "cid": "cids(0)",
1026
+ "uri": "record(0)",
1027
+ },
1028
+ },
1029
+ "text": "2.0",
1030
+ },
1031
+ "replyCount": 0,
1032
+ "repostCount": 0,
1033
+ "uri": "record(5)",
1034
+ "viewer": Object {
1035
+ "embeddingDisabled": false,
1036
+ "threadMuted": false,
1037
+ },
1038
+ },
1039
+ },
1040
+ },
1041
+ Object {
1042
+ "depth": 1,
1043
+ "uri": "record(6)",
1044
+ "value": Object {
1045
+ "$type": "app.bsky.unspecced.getPostThreadV2#threadItemPost",
1046
+ "moreParents": false,
1047
+ "moreReplies": 0,
1048
+ "opThread": false,
1049
+ "post": Object {
1050
+ "author": Object {
1051
+ "did": "user(3)",
1052
+ "handle": "simple-carol.test",
1053
+ "labels": Array [],
1054
+ "viewer": Object {
1055
+ "blockedBy": false,
1056
+ "muted": false,
1057
+ },
1058
+ },
1059
+ "cid": "cids(6)",
1060
+ "indexedAt": "1970-01-01T00:00:00.000Z",
1061
+ "labels": Array [],
1062
+ "likeCount": 0,
1063
+ "quoteCount": 0,
1064
+ "record": Object {
1065
+ "$type": "app.bsky.feed.post",
1066
+ "createdAt": "1970-01-01T00:00:00.000Z",
1067
+ "reply": Object {
1068
+ "parent": Object {
1069
+ "cid": "cids(0)",
1070
+ "uri": "record(0)",
1071
+ },
1072
+ "root": Object {
1073
+ "cid": "cids(0)",
1074
+ "uri": "record(0)",
1075
+ },
1076
+ },
1077
+ "text": "3",
1078
+ },
1079
+ "replyCount": 0,
1080
+ "repostCount": 0,
1081
+ "uri": "record(6)",
1082
+ "viewer": Object {
1083
+ "embeddingDisabled": false,
1084
+ "threadMuted": false,
1085
+ },
1086
+ },
1087
+ },
1088
+ },
1089
+ ],
1090
+ }
1091
+ `;