@atproto/bsky 0.0.165 → 0.0.167
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 +16 -0
- package/dist/api/app/bsky/notification/listActivitySubscriptions.d.ts +4 -0
- package/dist/api/app/bsky/notification/listActivitySubscriptions.d.ts.map +1 -0
- package/dist/api/app/bsky/notification/listActivitySubscriptions.js +63 -0
- package/dist/api/app/bsky/notification/listActivitySubscriptions.js.map +1 -0
- package/dist/api/app/bsky/notification/putActivitySubscription.d.ts +4 -0
- package/dist/api/app/bsky/notification/putActivitySubscription.d.ts.map +1 -0
- package/dist/api/app/bsky/notification/putActivitySubscription.js +63 -0
- package/dist/api/app/bsky/notification/putActivitySubscription.js.map +1 -0
- package/dist/api/app/bsky/notification/putPreferencesV2.d.ts.map +1 -1
- package/dist/api/app/bsky/notification/putPreferencesV2.js +2 -1
- package/dist/api/app/bsky/notification/putPreferencesV2.js.map +1 -1
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js +4 -0
- package/dist/api/index.js.map +1 -1
- package/dist/data-plane/bsync/index.d.ts.map +1 -1
- package/dist/data-plane/bsync/index.js +52 -38
- package/dist/data-plane/bsync/index.js.map +1 -1
- package/dist/data-plane/server/db/database-schema.d.ts +2 -1
- package/dist/data-plane/server/db/database-schema.d.ts.map +1 -1
- package/dist/data-plane/server/db/migrations/20250611T140649895Z-add-activity-subscription.d.ts +4 -0
- package/dist/data-plane/server/db/migrations/20250611T140649895Z-add-activity-subscription.d.ts.map +1 -0
- package/dist/data-plane/server/db/migrations/20250611T140649895Z-add-activity-subscription.js +24 -0
- package/dist/data-plane/server/db/migrations/20250611T140649895Z-add-activity-subscription.js.map +1 -0
- package/dist/data-plane/server/db/migrations/index.d.ts +1 -0
- package/dist/data-plane/server/db/migrations/index.d.ts.map +1 -1
- package/dist/data-plane/server/db/migrations/index.js +2 -1
- package/dist/data-plane/server/db/migrations/index.js.map +1 -1
- package/dist/data-plane/server/db/pagination.d.ts +22 -0
- package/dist/data-plane/server/db/pagination.d.ts.map +1 -1
- package/dist/data-plane/server/db/pagination.js +30 -1
- package/dist/data-plane/server/db/pagination.js.map +1 -1
- package/dist/data-plane/server/db/tables/activity-subscription.d.ts +13 -0
- package/dist/data-plane/server/db/tables/activity-subscription.d.ts.map +1 -0
- package/dist/data-plane/server/db/tables/activity-subscription.js +5 -0
- package/dist/data-plane/server/db/tables/activity-subscription.js.map +1 -0
- package/dist/data-plane/server/indexing/index.d.ts +2 -0
- package/dist/data-plane/server/indexing/index.d.ts.map +1 -1
- package/dist/data-plane/server/indexing/index.js +2 -0
- package/dist/data-plane/server/indexing/index.js.map +1 -1
- package/dist/data-plane/server/indexing/plugins/notif-declaration.d.ts +7 -0
- package/dist/data-plane/server/indexing/plugins/notif-declaration.d.ts.map +1 -0
- package/dist/data-plane/server/indexing/plugins/notif-declaration.js +72 -0
- package/dist/data-plane/server/indexing/plugins/notif-declaration.js.map +1 -0
- package/dist/data-plane/server/routes/activity-subscription.d.ts +6 -0
- package/dist/data-plane/server/routes/activity-subscription.d.ts.map +1 -0
- package/dist/data-plane/server/routes/activity-subscription.js +67 -0
- package/dist/data-plane/server/routes/activity-subscription.js.map +1 -0
- package/dist/data-plane/server/routes/index.js +2 -2
- package/dist/data-plane/server/routes/index.js.map +1 -1
- package/dist/data-plane/server/routes/notifs.d.ts +3 -0
- package/dist/data-plane/server/routes/notifs.d.ts.map +1 -1
- package/dist/data-plane/server/routes/notifs.js +64 -0
- package/dist/data-plane/server/routes/notifs.js.map +1 -1
- package/dist/data-plane/server/routes/profile.d.ts.map +1 -1
- package/dist/data-plane/server/routes/profile.js +20 -1
- package/dist/data-plane/server/routes/profile.js.map +1 -1
- package/dist/data-plane/server/routes/records.d.ts.map +1 -1
- package/dist/data-plane/server/routes/records.js +1 -0
- package/dist/data-plane/server/routes/records.js.map +1 -1
- package/dist/data-plane/server/util.d.ts +6 -6
- package/dist/hydration/actor.d.ts +20 -6
- package/dist/hydration/actor.d.ts.map +1 -1
- package/dist/hydration/actor.js +44 -1
- package/dist/hydration/actor.js.map +1 -1
- package/dist/hydration/hydrator.d.ts +4 -3
- package/dist/hydration/hydrator.d.ts.map +1 -1
- package/dist/hydration/hydrator.js +16 -2
- package/dist/hydration/hydrator.js.map +1 -1
- package/dist/hydration/util.d.ts +4 -0
- package/dist/hydration/util.d.ts.map +1 -1
- package/dist/hydration/util.js +3 -1
- package/dist/hydration/util.js.map +1 -1
- package/dist/lexicon/lexicons.d.ts +6 -2
- package/dist/lexicon/lexicons.d.ts.map +1 -1
- package/dist/lexicon/lexicons.js +3 -0
- package/dist/lexicon/lexicons.js.map +1 -1
- package/dist/lexicon/types/app/bsky/notification/listNotifications.d.ts +1 -1
- 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/proto/bsky_connect.d.ts +28 -1
- package/dist/proto/bsky_connect.d.ts.map +1 -1
- package/dist/proto/bsky_connect.js +27 -0
- package/dist/proto/bsky_connect.js.map +1 -1
- package/dist/proto/bsky_pb.d.ts +189 -0
- package/dist/proto/bsky_pb.d.ts.map +1 -1
- package/dist/proto/bsky_pb.js +598 -5
- package/dist/proto/bsky_pb.js.map +1 -1
- package/dist/stash.d.ts +1 -0
- package/dist/stash.d.ts.map +1 -1
- package/dist/stash.js +1 -0
- package/dist/stash.js.map +1 -1
- package/dist/views/index.d.ts +5 -3
- package/dist/views/index.d.ts.map +1 -1
- package/dist/views/index.js +29 -9
- package/dist/views/index.js.map +1 -1
- package/package.json +4 -4
- package/proto/bsky.proto +45 -0
- package/src/api/app/bsky/notification/listActivitySubscriptions.ts +110 -0
- package/src/api/app/bsky/notification/putActivitySubscription.ts +69 -0
- package/src/api/app/bsky/notification/putPreferencesV2.ts +2 -1
- package/src/api/index.ts +4 -0
- package/src/data-plane/bsync/index.ts +75 -44
- package/src/data-plane/server/db/database-schema.ts +3 -1
- package/src/data-plane/server/db/migrations/20250611T140649895Z-add-activity-subscription.ts +22 -0
- package/src/data-plane/server/db/migrations/index.ts +1 -0
- package/src/data-plane/server/db/pagination.ts +37 -0
- package/src/data-plane/server/db/tables/activity-subscription.ts +12 -0
- package/src/data-plane/server/indexing/index.ts +3 -0
- package/src/data-plane/server/indexing/plugins/notif-declaration.ts +59 -0
- package/src/data-plane/server/routes/activity-subscription.ts +83 -0
- package/src/data-plane/server/routes/index.ts +2 -2
- package/src/data-plane/server/routes/notifs.ts +95 -0
- package/src/data-plane/server/routes/profile.ts +33 -1
- package/src/data-plane/server/routes/records.ts +4 -0
- package/src/hydration/actor.ts +97 -10
- package/src/hydration/hydrator.ts +32 -6
- package/src/hydration/util.ts +8 -0
- package/src/lexicon/lexicons.ts +5 -0
- package/src/lexicon/types/app/bsky/notification/listNotifications.ts +1 -0
- package/src/proto/bsky_connect.ts +33 -0
- package/src/proto/bsky_pb.ts +648 -0
- package/src/stash.ts +6 -1
- package/src/views/index.ts +48 -11
- package/tests/__snapshots__/feed-generation.test.ts.snap +213 -0
- package/tests/data-plane/__snapshots__/indexing.test.ts.snap +88 -0
- package/tests/views/__snapshots__/author-feed.test.ts.snap +498 -0
- package/tests/views/__snapshots__/block-lists.test.ts.snap +56 -0
- package/tests/views/__snapshots__/blocks.test.ts.snap +28 -0
- package/tests/views/__snapshots__/follows.test.ts.snap +170 -0
- package/tests/views/__snapshots__/labeler-service.test.ts.snap +15 -0
- package/tests/views/__snapshots__/likes.test.ts.snap +23 -0
- package/tests/views/__snapshots__/list-feed.test.ts.snap +68 -0
- package/tests/views/__snapshots__/lists.test.ts.snap +120 -0
- package/tests/views/__snapshots__/mute-lists.test.ts.snap +63 -0
- package/tests/views/__snapshots__/mutes.test.ts.snap +55 -0
- package/tests/views/__snapshots__/notifications.test.ts.snap +299 -0
- package/tests/views/__snapshots__/posts.test.ts.snap +58 -0
- package/tests/views/__snapshots__/profile.test.ts.snap +74 -0
- package/tests/views/__snapshots__/quotes.test.ts.snap +35 -0
- package/tests/views/__snapshots__/reposts.test.ts.snap +26 -0
- package/tests/views/__snapshots__/starter-packs.test.ts.snap +113 -0
- package/tests/views/__snapshots__/thread-v2.test.ts.snap +115 -0
- package/tests/views/__snapshots__/thread.test.ts.snap +145 -0
- package/tests/views/__snapshots__/timeline.test.ts.snap +566 -0
- package/tests/views/notifications.test.ts +355 -19
- package/tsconfig.build.tsbuildinfo +1 -1
- package/dist/data-plane/server/routes/private-data.d.ts +0 -9
- package/dist/data-plane/server/routes/private-data.d.ts.map +0 -1
- package/dist/data-plane/server/routes/private-data.js +0 -65
- package/dist/data-plane/server/routes/private-data.js.map +0 -1
- package/src/data-plane/server/routes/private-data.ts +0 -95
|
@@ -4,6 +4,9 @@ exports[`indexing indexRepo updates indexes when records change. 1`] = `
|
|
|
4
4
|
Array [
|
|
5
5
|
Object {
|
|
6
6
|
"associated": Object {
|
|
7
|
+
"activitySubscription": Object {
|
|
8
|
+
"allowSubscriptions": "followers",
|
|
9
|
+
},
|
|
7
10
|
"feedgens": 0,
|
|
8
11
|
"labeler": false,
|
|
9
12
|
"lists": 0,
|
|
@@ -23,6 +26,11 @@ Array [
|
|
|
23
26
|
"count": 1,
|
|
24
27
|
"followers": Array [
|
|
25
28
|
Object {
|
|
29
|
+
"associated": Object {
|
|
30
|
+
"activitySubscription": Object {
|
|
31
|
+
"allowSubscriptions": "followers",
|
|
32
|
+
},
|
|
33
|
+
},
|
|
26
34
|
"avatar": "https://bsky.public.url/img/avatar/plain/user(2)/cids(0)@jpeg",
|
|
27
35
|
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
28
36
|
"did": "user(1)",
|
|
@@ -47,6 +55,11 @@ Array [
|
|
|
47
55
|
Object {
|
|
48
56
|
"post": Object {
|
|
49
57
|
"author": Object {
|
|
58
|
+
"associated": Object {
|
|
59
|
+
"activitySubscription": Object {
|
|
60
|
+
"allowSubscriptions": "followers",
|
|
61
|
+
},
|
|
62
|
+
},
|
|
50
63
|
"did": "user(0)",
|
|
51
64
|
"handle": "alice.test",
|
|
52
65
|
"labels": Array [],
|
|
@@ -77,6 +90,11 @@ Array [
|
|
|
77
90
|
Object {
|
|
78
91
|
"post": Object {
|
|
79
92
|
"author": Object {
|
|
93
|
+
"associated": Object {
|
|
94
|
+
"activitySubscription": Object {
|
|
95
|
+
"allowSubscriptions": "followers",
|
|
96
|
+
},
|
|
97
|
+
},
|
|
80
98
|
"did": "user(0)",
|
|
81
99
|
"handle": "alice.test",
|
|
82
100
|
"labels": Array [],
|
|
@@ -115,6 +133,11 @@ Array [
|
|
|
115
133
|
},
|
|
116
134
|
"reply": Object {
|
|
117
135
|
"grandparentAuthor": Object {
|
|
136
|
+
"associated": Object {
|
|
137
|
+
"activitySubscription": Object {
|
|
138
|
+
"allowSubscriptions": "followers",
|
|
139
|
+
},
|
|
140
|
+
},
|
|
118
141
|
"did": "user(0)",
|
|
119
142
|
"handle": "alice.test",
|
|
120
143
|
"labels": Array [],
|
|
@@ -126,6 +149,11 @@ Array [
|
|
|
126
149
|
"parent": Object {
|
|
127
150
|
"$type": "app.bsky.feed.defs#postView",
|
|
128
151
|
"author": Object {
|
|
152
|
+
"associated": Object {
|
|
153
|
+
"activitySubscription": Object {
|
|
154
|
+
"allowSubscriptions": "followers",
|
|
155
|
+
},
|
|
156
|
+
},
|
|
129
157
|
"avatar": "https://bsky.public.url/img/avatar/plain/user(2)/cids(0)@jpeg",
|
|
130
158
|
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
131
159
|
"did": "user(1)",
|
|
@@ -211,6 +239,11 @@ Array [
|
|
|
211
239
|
"root": Object {
|
|
212
240
|
"$type": "app.bsky.feed.defs#postView",
|
|
213
241
|
"author": Object {
|
|
242
|
+
"associated": Object {
|
|
243
|
+
"activitySubscription": Object {
|
|
244
|
+
"allowSubscriptions": "followers",
|
|
245
|
+
},
|
|
246
|
+
},
|
|
214
247
|
"did": "user(0)",
|
|
215
248
|
"handle": "alice.test",
|
|
216
249
|
"labels": Array [],
|
|
@@ -242,6 +275,11 @@ Array [
|
|
|
242
275
|
Object {
|
|
243
276
|
"post": Object {
|
|
244
277
|
"author": Object {
|
|
278
|
+
"associated": Object {
|
|
279
|
+
"activitySubscription": Object {
|
|
280
|
+
"allowSubscriptions": "followers",
|
|
281
|
+
},
|
|
282
|
+
},
|
|
245
283
|
"did": "user(0)",
|
|
246
284
|
"handle": "alice.test",
|
|
247
285
|
"labels": Array [],
|
|
@@ -257,6 +295,9 @@ Array [
|
|
|
257
295
|
"$type": "app.bsky.embed.record#viewRecord",
|
|
258
296
|
"author": Object {
|
|
259
297
|
"associated": Object {
|
|
298
|
+
"activitySubscription": Object {
|
|
299
|
+
"allowSubscriptions": "followers",
|
|
300
|
+
},
|
|
260
301
|
"chat": Object {
|
|
261
302
|
"allowIncoming": "none",
|
|
262
303
|
},
|
|
@@ -277,6 +318,11 @@ Array [
|
|
|
277
318
|
"record": Object {
|
|
278
319
|
"$type": "app.bsky.embed.record#viewRecord",
|
|
279
320
|
"author": Object {
|
|
321
|
+
"associated": Object {
|
|
322
|
+
"activitySubscription": Object {
|
|
323
|
+
"allowSubscriptions": "followers",
|
|
324
|
+
},
|
|
325
|
+
},
|
|
280
326
|
"did": "user(4)",
|
|
281
327
|
"handle": "carol.test",
|
|
282
328
|
"labels": Array [],
|
|
@@ -409,6 +455,11 @@ Array [
|
|
|
409
455
|
Object {
|
|
410
456
|
"post": Object {
|
|
411
457
|
"author": Object {
|
|
458
|
+
"associated": Object {
|
|
459
|
+
"activitySubscription": Object {
|
|
460
|
+
"allowSubscriptions": "followers",
|
|
461
|
+
},
|
|
462
|
+
},
|
|
412
463
|
"did": "user(0)",
|
|
413
464
|
"handle": "alice.test",
|
|
414
465
|
"labels": Array [],
|
|
@@ -439,6 +490,11 @@ Array [
|
|
|
439
490
|
Object {
|
|
440
491
|
"post": Object {
|
|
441
492
|
"author": Object {
|
|
493
|
+
"associated": Object {
|
|
494
|
+
"activitySubscription": Object {
|
|
495
|
+
"allowSubscriptions": "followers",
|
|
496
|
+
},
|
|
497
|
+
},
|
|
442
498
|
"did": "user(0)",
|
|
443
499
|
"handle": "alice.test",
|
|
444
500
|
"labels": Array [],
|
|
@@ -489,6 +545,9 @@ Array [
|
|
|
489
545
|
"follows": Array [
|
|
490
546
|
Object {
|
|
491
547
|
"associated": Object {
|
|
548
|
+
"activitySubscription": Object {
|
|
549
|
+
"allowSubscriptions": "followers",
|
|
550
|
+
},
|
|
492
551
|
"chat": Object {
|
|
493
552
|
"allowIncoming": "none",
|
|
494
553
|
},
|
|
@@ -503,6 +562,11 @@ Array [
|
|
|
503
562
|
},
|
|
504
563
|
},
|
|
505
564
|
Object {
|
|
565
|
+
"associated": Object {
|
|
566
|
+
"activitySubscription": Object {
|
|
567
|
+
"allowSubscriptions": "followers",
|
|
568
|
+
},
|
|
569
|
+
},
|
|
506
570
|
"avatar": "https://bsky.public.url/img/avatar/plain/user(2)/cids(0)@jpeg",
|
|
507
571
|
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
508
572
|
"description": "hi im bob label_me",
|
|
@@ -520,6 +584,11 @@ Array [
|
|
|
520
584
|
},
|
|
521
585
|
],
|
|
522
586
|
"subject": Object {
|
|
587
|
+
"associated": Object {
|
|
588
|
+
"activitySubscription": Object {
|
|
589
|
+
"allowSubscriptions": "followers",
|
|
590
|
+
},
|
|
591
|
+
},
|
|
523
592
|
"description": "freshening things up",
|
|
524
593
|
"did": "user(0)",
|
|
525
594
|
"handle": "alice.test",
|
|
@@ -540,6 +609,11 @@ Object {
|
|
|
540
609
|
"$type": "app.bsky.feed.defs#threadViewPost",
|
|
541
610
|
"post": Object {
|
|
542
611
|
"author": Object {
|
|
612
|
+
"associated": Object {
|
|
613
|
+
"activitySubscription": Object {
|
|
614
|
+
"allowSubscriptions": "followers",
|
|
615
|
+
},
|
|
616
|
+
},
|
|
543
617
|
"avatar": "https://bsky.public.url/img/avatar/plain/user(1)/cids(1)@jpeg",
|
|
544
618
|
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
545
619
|
"did": "user(0)",
|
|
@@ -610,6 +684,11 @@ Object {
|
|
|
610
684
|
"$type": "app.bsky.feed.defs#threadViewPost",
|
|
611
685
|
"post": Object {
|
|
612
686
|
"author": Object {
|
|
687
|
+
"associated": Object {
|
|
688
|
+
"activitySubscription": Object {
|
|
689
|
+
"allowSubscriptions": "followers",
|
|
690
|
+
},
|
|
691
|
+
},
|
|
613
692
|
"avatar": "https://bsky.public.url/img/avatar/plain/user(1)/cids(1)@jpeg",
|
|
614
693
|
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
615
694
|
"did": "user(0)",
|
|
@@ -707,6 +786,9 @@ Object {
|
|
|
707
786
|
exports[`indexing indexes profiles. 1`] = `
|
|
708
787
|
Object {
|
|
709
788
|
"associated": Object {
|
|
789
|
+
"activitySubscription": Object {
|
|
790
|
+
"allowSubscriptions": "followers",
|
|
791
|
+
},
|
|
710
792
|
"chat": Object {
|
|
711
793
|
"allowIncoming": "none",
|
|
712
794
|
},
|
|
@@ -733,6 +815,9 @@ Object {
|
|
|
733
815
|
exports[`indexing indexes profiles. 2`] = `
|
|
734
816
|
Object {
|
|
735
817
|
"associated": Object {
|
|
818
|
+
"activitySubscription": Object {
|
|
819
|
+
"allowSubscriptions": "followers",
|
|
820
|
+
},
|
|
736
821
|
"chat": Object {
|
|
737
822
|
"allowIncoming": "none",
|
|
738
823
|
},
|
|
@@ -759,6 +844,9 @@ Object {
|
|
|
759
844
|
exports[`indexing indexes profiles. 3`] = `
|
|
760
845
|
Object {
|
|
761
846
|
"associated": Object {
|
|
847
|
+
"activitySubscription": Object {
|
|
848
|
+
"allowSubscriptions": "followers",
|
|
849
|
+
},
|
|
762
850
|
"chat": Object {
|
|
763
851
|
"allowIncoming": "none",
|
|
764
852
|
},
|