@atproto/pds 0.4.32 → 0.4.34

Sign up to get free protection for your applications and to get access to all the features.
Files changed (63) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/actor-store/preference/reader.d.ts +2 -1
  3. package/dist/actor-store/preference/reader.d.ts.map +1 -1
  4. package/dist/actor-store/preference/reader.js +3 -1
  5. package/dist/actor-store/preference/reader.js.map +1 -1
  6. package/dist/actor-store/preference/transactor.d.ts +2 -1
  7. package/dist/actor-store/preference/transactor.d.ts.map +1 -1
  8. package/dist/actor-store/preference/transactor.js +7 -1
  9. package/dist/actor-store/preference/transactor.js.map +1 -1
  10. package/dist/actor-store/preference/util.d.ts +3 -0
  11. package/dist/actor-store/preference/util.d.ts.map +1 -0
  12. package/dist/actor-store/preference/util.js +12 -0
  13. package/dist/actor-store/preference/util.js.map +1 -0
  14. package/dist/api/app/bsky/actor/getPreferences.d.ts.map +1 -1
  15. package/dist/api/app/bsky/actor/getPreferences.js +1 -6
  16. package/dist/api/app/bsky/actor/getPreferences.js.map +1 -1
  17. package/dist/api/app/bsky/actor/putPreferences.d.ts.map +1 -1
  18. package/dist/api/app/bsky/actor/putPreferences.js +1 -1
  19. package/dist/api/app/bsky/actor/putPreferences.js.map +1 -1
  20. package/dist/lexicon/index.d.ts +6 -0
  21. package/dist/lexicon/index.d.ts.map +1 -1
  22. package/dist/lexicon/index.js +12 -0
  23. package/dist/lexicon/index.js.map +1 -1
  24. package/dist/lexicon/lexicons.d.ts +127 -0
  25. package/dist/lexicon/lexicons.d.ts.map +1 -1
  26. package/dist/lexicon/lexicons.js +127 -0
  27. package/dist/lexicon/lexicons.js.map +1 -1
  28. package/dist/lexicon/types/app/bsky/actor/defs.d.ts +9 -0
  29. package/dist/lexicon/types/app/bsky/actor/defs.d.ts.map +1 -1
  30. package/dist/lexicon/types/app/bsky/actor/defs.js +11 -1
  31. package/dist/lexicon/types/app/bsky/actor/defs.js.map +1 -1
  32. package/dist/lexicon/types/app/bsky/feed/defs.d.ts +1 -0
  33. package/dist/lexicon/types/app/bsky/feed/defs.d.ts.map +1 -1
  34. package/dist/lexicon/types/app/bsky/feed/defs.js.map +1 -1
  35. package/dist/lexicon/types/app/bsky/graph/getKnownFollowers.d.ts +40 -0
  36. package/dist/lexicon/types/app/bsky/graph/getKnownFollowers.d.ts.map +1 -0
  37. package/dist/lexicon/types/app/bsky/graph/getKnownFollowers.js +3 -0
  38. package/dist/lexicon/types/app/bsky/graph/getKnownFollowers.js.map +1 -0
  39. package/dist/lexicon/types/app/bsky/graph/muteThread.d.ts +29 -0
  40. package/dist/lexicon/types/app/bsky/graph/muteThread.d.ts.map +1 -0
  41. package/dist/lexicon/types/app/bsky/graph/muteThread.js +3 -0
  42. package/dist/lexicon/types/app/bsky/graph/muteThread.js.map +1 -0
  43. package/dist/lexicon/types/app/bsky/graph/unmuteThread.d.ts +29 -0
  44. package/dist/lexicon/types/app/bsky/graph/unmuteThread.d.ts.map +1 -0
  45. package/dist/lexicon/types/app/bsky/graph/unmuteThread.js +3 -0
  46. package/dist/lexicon/types/app/bsky/graph/unmuteThread.js.map +1 -0
  47. package/package.json +4 -4
  48. package/src/actor-store/preference/reader.ts +7 -1
  49. package/src/actor-store/preference/transactor.ts +10 -0
  50. package/src/actor-store/preference/util.ts +8 -0
  51. package/src/api/app/bsky/actor/getPreferences.ts +2 -9
  52. package/src/api/app/bsky/actor/putPreferences.ts +5 -1
  53. package/src/lexicon/index.ts +36 -0
  54. package/src/lexicon/lexicons.ts +129 -0
  55. package/src/lexicon/types/app/bsky/actor/defs.ts +20 -0
  56. package/src/lexicon/types/app/bsky/feed/defs.ts +1 -0
  57. package/src/lexicon/types/app/bsky/graph/getKnownFollowers.ts +50 -0
  58. package/src/lexicon/types/app/bsky/graph/muteThread.ts +38 -0
  59. package/src/lexicon/types/app/bsky/graph/unmuteThread.ts +38 -0
  60. package/tests/handle-validation.test.ts +1 -1
  61. package/tests/preferences.test.ts +67 -1
  62. package/tests/proxied/__snapshots__/feedgen.test.ts.snap +4 -1
  63. package/tests/proxied/__snapshots__/views.test.ts.snap +193 -42
@@ -21,6 +21,28 @@ Object {
21
21
  "blockedBy": false,
22
22
  "followedBy": "record(1)",
23
23
  "following": "record(0)",
24
+ "knownFollowers": Object {
25
+ "count": 1,
26
+ "followers": Array [
27
+ Object {
28
+ "did": "user(2)",
29
+ "handle": "dan.test",
30
+ "labels": Array [
31
+ Object {
32
+ "cts": "1970-01-01T00:00:00.000Z",
33
+ "src": "did:example:labeler",
34
+ "uri": "user(2)",
35
+ "val": "repo-action-label",
36
+ },
37
+ ],
38
+ "viewer": Object {
39
+ "blockedBy": false,
40
+ "following": "record(2)",
41
+ "muted": false,
42
+ },
43
+ },
44
+ ],
45
+ },
24
46
  "muted": false,
25
47
  },
26
48
  }
@@ -48,20 +70,49 @@ Object {
48
70
  "cid": "cids(1)",
49
71
  "cts": "1970-01-01T00:00:00.000Z",
50
72
  "src": "user(0)",
51
- "uri": "record(0)",
73
+ "uri": "record(4)",
52
74
  "val": "self-label-a",
53
75
  },
54
76
  Object {
55
77
  "cid": "cids(1)",
56
78
  "cts": "1970-01-01T00:00:00.000Z",
57
79
  "src": "user(0)",
58
- "uri": "record(0)",
80
+ "uri": "record(4)",
59
81
  "val": "self-label-b",
60
82
  },
61
83
  ],
62
84
  "postsCount": 4,
63
85
  "viewer": Object {
64
86
  "blockedBy": false,
87
+ "knownFollowers": Object {
88
+ "count": 2,
89
+ "followers": Array [
90
+ Object {
91
+ "avatar": "https://bsky.public.url/img/avatar/plain/user(3)/cids(0)@jpeg",
92
+ "did": "user(2)",
93
+ "displayName": "bobby",
94
+ "handle": "bob.test",
95
+ "labels": Array [],
96
+ "viewer": Object {
97
+ "blockedBy": false,
98
+ "followedBy": "record(1)",
99
+ "following": "record(0)",
100
+ "muted": false,
101
+ },
102
+ },
103
+ Object {
104
+ "did": "user(4)",
105
+ "handle": "carol.test",
106
+ "labels": Array [],
107
+ "viewer": Object {
108
+ "blockedBy": false,
109
+ "followedBy": "record(3)",
110
+ "following": "record(2)",
111
+ "muted": false,
112
+ },
113
+ },
114
+ ],
115
+ },
65
116
  "muted": false,
66
117
  },
67
118
  },
@@ -83,8 +134,30 @@ Object {
83
134
  "postsCount": 3,
84
135
  "viewer": Object {
85
136
  "blockedBy": false,
86
- "followedBy": "record(2)",
87
- "following": "record(1)",
137
+ "followedBy": "record(1)",
138
+ "following": "record(0)",
139
+ "knownFollowers": Object {
140
+ "count": 1,
141
+ "followers": Array [
142
+ Object {
143
+ "did": "user(5)",
144
+ "handle": "dan.test",
145
+ "labels": Array [
146
+ Object {
147
+ "cts": "1970-01-01T00:00:00.000Z",
148
+ "src": "did:example:labeler",
149
+ "uri": "user(5)",
150
+ "val": "repo-action-label",
151
+ },
152
+ ],
153
+ "viewer": Object {
154
+ "blockedBy": false,
155
+ "following": "record(5)",
156
+ "muted": false,
157
+ },
158
+ },
159
+ ],
160
+ },
88
161
  "muted": false,
89
162
  },
90
163
  },
@@ -373,7 +446,9 @@ Object {
373
446
  "replyCount": 1,
374
447
  "repostCount": 0,
375
448
  "uri": "record(0)",
376
- "viewer": Object {},
449
+ "viewer": Object {
450
+ "threadMuted": false,
451
+ },
377
452
  },
378
453
  "reply": Object {
379
454
  "parent": Object {
@@ -416,7 +491,9 @@ Object {
416
491
  "replyCount": 2,
417
492
  "repostCount": 1,
418
493
  "uri": "record(3)",
419
- "viewer": Object {},
494
+ "viewer": Object {
495
+ "threadMuted": false,
496
+ },
420
497
  },
421
498
  "root": Object {
422
499
  "$type": "app.bsky.feed.defs#postView",
@@ -458,7 +535,9 @@ Object {
458
535
  "replyCount": 2,
459
536
  "repostCount": 1,
460
537
  "uri": "record(3)",
461
- "viewer": Object {},
538
+ "viewer": Object {
539
+ "threadMuted": false,
540
+ },
462
541
  },
463
542
  },
464
543
  },
@@ -489,7 +568,9 @@ Object {
489
568
  "replyCount": 0,
490
569
  "repostCount": 0,
491
570
  "uri": "record(5)",
492
- "viewer": Object {},
571
+ "viewer": Object {
572
+ "threadMuted": false,
573
+ },
493
574
  },
494
575
  },
495
576
  Object {
@@ -523,7 +604,9 @@ Object {
523
604
  "replyCount": 0,
524
605
  "repostCount": 0,
525
606
  "uri": "record(6)",
526
- "viewer": Object {},
607
+ "viewer": Object {
608
+ "threadMuted": false,
609
+ },
527
610
  },
528
611
  },
529
612
  ],
@@ -734,7 +817,9 @@ Object {
734
817
  "replyCount": 0,
735
818
  "repostCount": 1,
736
819
  "uri": "record(0)",
737
- "viewer": Object {},
820
+ "viewer": Object {
821
+ "threadMuted": false,
822
+ },
738
823
  },
739
824
  "reply": Object {
740
825
  "grandparentAuthor": Object {
@@ -826,7 +911,9 @@ Object {
826
911
  "replyCount": 1,
827
912
  "repostCount": 0,
828
913
  "uri": "record(3)",
829
- "viewer": Object {},
914
+ "viewer": Object {
915
+ "threadMuted": false,
916
+ },
830
917
  },
831
918
  "root": Object {
832
919
  "$type": "app.bsky.feed.defs#postView",
@@ -868,7 +955,9 @@ Object {
868
955
  "replyCount": 2,
869
956
  "repostCount": 1,
870
957
  "uri": "record(2)",
871
- "viewer": Object {},
958
+ "viewer": Object {
959
+ "threadMuted": false,
960
+ },
872
961
  },
873
962
  },
874
963
  },
@@ -935,7 +1024,9 @@ Object {
935
1024
  "replyCount": 1,
936
1025
  "repostCount": 0,
937
1026
  "uri": "record(3)",
938
- "viewer": Object {},
1027
+ "viewer": Object {
1028
+ "threadMuted": false,
1029
+ },
939
1030
  },
940
1031
  "reply": Object {
941
1032
  "parent": Object {
@@ -978,7 +1069,9 @@ Object {
978
1069
  "replyCount": 2,
979
1070
  "repostCount": 1,
980
1071
  "uri": "record(2)",
981
- "viewer": Object {},
1072
+ "viewer": Object {
1073
+ "threadMuted": false,
1074
+ },
982
1075
  },
983
1076
  "root": Object {
984
1077
  "$type": "app.bsky.feed.defs#postView",
@@ -1020,7 +1113,9 @@ Object {
1020
1113
  "replyCount": 2,
1021
1114
  "repostCount": 1,
1022
1115
  "uri": "record(2)",
1023
- "viewer": Object {},
1116
+ "viewer": Object {
1117
+ "threadMuted": false,
1118
+ },
1024
1119
  },
1025
1120
  },
1026
1121
  },
@@ -1194,7 +1289,9 @@ Object {
1194
1289
  "replyCount": 0,
1195
1290
  "repostCount": 0,
1196
1291
  "uri": "record(6)",
1197
- "viewer": Object {},
1292
+ "viewer": Object {
1293
+ "threadMuted": false,
1294
+ },
1198
1295
  },
1199
1296
  },
1200
1297
  Object {
@@ -1224,7 +1321,9 @@ Object {
1224
1321
  "replyCount": 0,
1225
1322
  "repostCount": 0,
1226
1323
  "uri": "record(13)",
1227
- "viewer": Object {},
1324
+ "viewer": Object {
1325
+ "threadMuted": false,
1326
+ },
1228
1327
  },
1229
1328
  },
1230
1329
  Object {
@@ -1267,7 +1366,9 @@ Object {
1267
1366
  "replyCount": 2,
1268
1367
  "repostCount": 1,
1269
1368
  "uri": "record(2)",
1270
- "viewer": Object {},
1369
+ "viewer": Object {
1370
+ "threadMuted": false,
1371
+ },
1271
1372
  },
1272
1373
  },
1273
1374
  Object {
@@ -1301,7 +1402,9 @@ Object {
1301
1402
  "replyCount": 0,
1302
1403
  "repostCount": 0,
1303
1404
  "uri": "record(12)",
1304
- "viewer": Object {},
1405
+ "viewer": Object {
1406
+ "threadMuted": false,
1407
+ },
1305
1408
  },
1306
1409
  },
1307
1410
  Object {
@@ -1360,7 +1463,9 @@ Object {
1360
1463
  "replyCount": 0,
1361
1464
  "repostCount": 0,
1362
1465
  "uri": "record(14)",
1363
- "viewer": Object {},
1466
+ "viewer": Object {
1467
+ "threadMuted": false,
1468
+ },
1364
1469
  },
1365
1470
  },
1366
1471
  ],
@@ -1400,7 +1505,9 @@ Object {
1400
1505
  "replyCount": 0,
1401
1506
  "repostCount": 0,
1402
1507
  "uri": "record(0)",
1403
- "viewer": Object {},
1508
+ "viewer": Object {
1509
+ "threadMuted": false,
1510
+ },
1404
1511
  },
1405
1512
  Object {
1406
1513
  "author": Object {
@@ -1517,6 +1624,7 @@ Object {
1517
1624
  "uri": "record(3)",
1518
1625
  "viewer": Object {
1519
1626
  "like": "record(6)",
1627
+ "threadMuted": false,
1520
1628
  },
1521
1629
  },
1522
1630
  ],
@@ -1597,7 +1705,9 @@ Object {
1597
1705
  "replyCount": 0,
1598
1706
  "repostCount": 1,
1599
1707
  "uri": "record(0)",
1600
- "viewer": Object {},
1708
+ "viewer": Object {
1709
+ "threadMuted": false,
1710
+ },
1601
1711
  },
1602
1712
  "reason": Object {
1603
1713
  "$type": "app.bsky.feed.defs#reasonRepost",
@@ -1710,7 +1820,9 @@ Object {
1710
1820
  "replyCount": 1,
1711
1821
  "repostCount": 0,
1712
1822
  "uri": "record(3)",
1713
- "viewer": Object {},
1823
+ "viewer": Object {
1824
+ "threadMuted": false,
1825
+ },
1714
1826
  },
1715
1827
  "root": Object {
1716
1828
  "$type": "app.bsky.feed.defs#postView",
@@ -1752,7 +1864,9 @@ Object {
1752
1864
  "replyCount": 2,
1753
1865
  "repostCount": 1,
1754
1866
  "uri": "record(2)",
1755
- "viewer": Object {},
1867
+ "viewer": Object {
1868
+ "threadMuted": false,
1869
+ },
1756
1870
  },
1757
1871
  },
1758
1872
  },
@@ -1796,7 +1910,9 @@ Object {
1796
1910
  "replyCount": 2,
1797
1911
  "repostCount": 1,
1798
1912
  "uri": "record(2)",
1799
- "viewer": Object {},
1913
+ "viewer": Object {
1914
+ "threadMuted": false,
1915
+ },
1800
1916
  },
1801
1917
  "reason": Object {
1802
1918
  "$type": "app.bsky.feed.defs#reasonRepost",
@@ -1991,7 +2107,9 @@ Object {
1991
2107
  "replyCount": 0,
1992
2108
  "repostCount": 1,
1993
2109
  "uri": "record(7)",
1994
- "viewer": Object {},
2110
+ "viewer": Object {
2111
+ "threadMuted": false,
2112
+ },
1995
2113
  },
1996
2114
  "reason": Object {
1997
2115
  "$type": "app.bsky.feed.defs#reasonRepost",
@@ -2059,7 +2177,9 @@ Object {
2059
2177
  "replyCount": 0,
2060
2178
  "repostCount": 1,
2061
2179
  "uri": "record(0)",
2062
- "viewer": Object {},
2180
+ "viewer": Object {
2181
+ "threadMuted": false,
2182
+ },
2063
2183
  },
2064
2184
  "reply": Object {
2065
2185
  "grandparentAuthor": Object {
@@ -2151,7 +2271,9 @@ Object {
2151
2271
  "replyCount": 1,
2152
2272
  "repostCount": 0,
2153
2273
  "uri": "record(3)",
2154
- "viewer": Object {},
2274
+ "viewer": Object {
2275
+ "threadMuted": false,
2276
+ },
2155
2277
  },
2156
2278
  "root": Object {
2157
2279
  "$type": "app.bsky.feed.defs#postView",
@@ -2193,7 +2315,9 @@ Object {
2193
2315
  "replyCount": 2,
2194
2316
  "repostCount": 1,
2195
2317
  "uri": "record(2)",
2196
- "viewer": Object {},
2318
+ "viewer": Object {
2319
+ "threadMuted": false,
2320
+ },
2197
2321
  },
2198
2322
  },
2199
2323
  },
@@ -2232,7 +2356,9 @@ Object {
2232
2356
  "replyCount": 0,
2233
2357
  "repostCount": 0,
2234
2358
  "uri": "record(12)",
2235
- "viewer": Object {},
2359
+ "viewer": Object {
2360
+ "threadMuted": false,
2361
+ },
2236
2362
  },
2237
2363
  "reply": Object {
2238
2364
  "parent": Object {
@@ -2275,7 +2401,9 @@ Object {
2275
2401
  "replyCount": 2,
2276
2402
  "repostCount": 1,
2277
2403
  "uri": "record(2)",
2278
- "viewer": Object {},
2404
+ "viewer": Object {
2405
+ "threadMuted": false,
2406
+ },
2279
2407
  },
2280
2408
  "root": Object {
2281
2409
  "$type": "app.bsky.feed.defs#postView",
@@ -2317,7 +2445,9 @@ Object {
2317
2445
  "replyCount": 2,
2318
2446
  "repostCount": 1,
2319
2447
  "uri": "record(2)",
2320
- "viewer": Object {},
2448
+ "viewer": Object {
2449
+ "threadMuted": false,
2450
+ },
2321
2451
  },
2322
2452
  },
2323
2453
  },
@@ -2384,7 +2514,9 @@ Object {
2384
2514
  "replyCount": 1,
2385
2515
  "repostCount": 0,
2386
2516
  "uri": "record(3)",
2387
- "viewer": Object {},
2517
+ "viewer": Object {
2518
+ "threadMuted": false,
2519
+ },
2388
2520
  },
2389
2521
  "reply": Object {
2390
2522
  "parent": Object {
@@ -2427,7 +2559,9 @@ Object {
2427
2559
  "replyCount": 2,
2428
2560
  "repostCount": 1,
2429
2561
  "uri": "record(2)",
2430
- "viewer": Object {},
2562
+ "viewer": Object {
2563
+ "threadMuted": false,
2564
+ },
2431
2565
  },
2432
2566
  "root": Object {
2433
2567
  "$type": "app.bsky.feed.defs#postView",
@@ -2469,7 +2603,9 @@ Object {
2469
2603
  "replyCount": 2,
2470
2604
  "repostCount": 1,
2471
2605
  "uri": "record(2)",
2472
- "viewer": Object {},
2606
+ "viewer": Object {
2607
+ "threadMuted": false,
2608
+ },
2473
2609
  },
2474
2610
  },
2475
2611
  },
@@ -2643,7 +2779,9 @@ Object {
2643
2779
  "replyCount": 0,
2644
2780
  "repostCount": 0,
2645
2781
  "uri": "record(13)",
2646
- "viewer": Object {},
2782
+ "viewer": Object {
2783
+ "threadMuted": false,
2784
+ },
2647
2785
  },
2648
2786
  },
2649
2787
  Object {
@@ -2673,7 +2811,9 @@ Object {
2673
2811
  "replyCount": 0,
2674
2812
  "repostCount": 0,
2675
2813
  "uri": "record(14)",
2676
- "viewer": Object {},
2814
+ "viewer": Object {
2815
+ "threadMuted": false,
2816
+ },
2677
2817
  },
2678
2818
  },
2679
2819
  Object {
@@ -2716,7 +2856,9 @@ Object {
2716
2856
  "replyCount": 2,
2717
2857
  "repostCount": 1,
2718
2858
  "uri": "record(2)",
2719
- "viewer": Object {},
2859
+ "viewer": Object {
2860
+ "threadMuted": false,
2861
+ },
2720
2862
  },
2721
2863
  },
2722
2864
  Object {
@@ -2890,7 +3032,9 @@ Object {
2890
3032
  "replyCount": 0,
2891
3033
  "repostCount": 1,
2892
3034
  "uri": "record(7)",
2893
- "viewer": Object {},
3035
+ "viewer": Object {
3036
+ "threadMuted": false,
3037
+ },
2894
3038
  },
2895
3039
  },
2896
3040
  Object {
@@ -2924,7 +3068,9 @@ Object {
2924
3068
  "replyCount": 0,
2925
3069
  "repostCount": 0,
2926
3070
  "uri": "record(15)",
2927
- "viewer": Object {},
3071
+ "viewer": Object {
3072
+ "threadMuted": false,
3073
+ },
2928
3074
  },
2929
3075
  },
2930
3076
  Object {
@@ -3043,6 +3189,7 @@ Object {
3043
3189
  "uri": "record(8)",
3044
3190
  "viewer": Object {
3045
3191
  "like": "record(16)",
3192
+ "threadMuted": false,
3046
3193
  },
3047
3194
  },
3048
3195
  },
@@ -3077,7 +3224,9 @@ Object {
3077
3224
  "replyCount": 0,
3078
3225
  "repostCount": 0,
3079
3226
  "uri": "record(11)",
3080
- "viewer": Object {},
3227
+ "viewer": Object {
3228
+ "threadMuted": false,
3229
+ },
3081
3230
  },
3082
3231
  },
3083
3232
  Object {
@@ -3136,7 +3285,9 @@ Object {
3136
3285
  "replyCount": 0,
3137
3286
  "repostCount": 0,
3138
3287
  "uri": "record(17)",
3139
- "viewer": Object {},
3288
+ "viewer": Object {
3289
+ "threadMuted": false,
3290
+ },
3140
3291
  },
3141
3292
  },
3142
3293
  ],