@atproto/bsky 0.0.155 → 0.0.157
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 +18 -0
- package/dist/api/app/bsky/{unspecced/getPostThreadHiddenV2.d.ts → notification/getPreferences.d.ts} +1 -1
- package/dist/api/app/bsky/notification/getPreferences.d.ts.map +1 -0
- package/dist/api/app/bsky/notification/getPreferences.js +39 -0
- package/dist/api/app/bsky/notification/getPreferences.js.map +1 -0
- package/dist/api/app/bsky/notification/putPreferencesV2.d.ts +4 -0
- package/dist/api/app/bsky/notification/putPreferencesV2.d.ts.map +1 -0
- package/dist/api/app/bsky/notification/putPreferencesV2.js +47 -0
- package/dist/api/app/bsky/notification/putPreferencesV2.js.map +1 -0
- package/dist/api/app/bsky/notification/util.d.ts +9 -0
- package/dist/api/app/bsky/notification/util.d.ts.map +1 -0
- package/dist/api/app/bsky/notification/util.js +84 -0
- package/dist/api/app/bsky/notification/util.js.map +1 -0
- package/dist/api/app/bsky/unspecced/getPostThreadOtherV2.d.ts +4 -0
- package/dist/api/app/bsky/unspecced/getPostThreadOtherV2.d.ts.map +1 -0
- package/dist/api/app/bsky/unspecced/{getPostThreadHiddenV2.js → getPostThreadOtherV2.js} +5 -5
- package/dist/api/app/bsky/unspecced/getPostThreadOtherV2.js.map +1 -0
- package/dist/api/app/bsky/unspecced/getPostThreadV2.js +2 -2
- package/dist/api/app/bsky/unspecced/getPostThreadV2.js.map +1 -1
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js +6 -2
- package/dist/api/index.js.map +1 -1
- package/dist/context.d.ts +3 -0
- package/dist/context.d.ts.map +1 -1
- package/dist/context.js +3 -0
- package/dist/context.js.map +1 -1
- package/dist/data-plane/bsync/index.d.ts.map +1 -1
- package/dist/data-plane/bsync/index.js +84 -0
- 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/20250602T190357447Z-add-private-data.d.ts +4 -0
- package/dist/data-plane/server/db/migrations/20250602T190357447Z-add-private-data.d.ts.map +1 -0
- package/dist/data-plane/server/db/migrations/20250602T190357447Z-add-private-data.js +24 -0
- package/dist/data-plane/server/db/migrations/20250602T190357447Z-add-private-data.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/tables/private-data.d.ts +13 -0
- package/dist/data-plane/server/db/tables/private-data.d.ts.map +1 -0
- package/dist/data-plane/server/db/tables/private-data.js +5 -0
- package/dist/data-plane/server/db/tables/private-data.js.map +1 -0
- package/dist/data-plane/server/routes/index.d.ts.map +1 -1
- package/dist/data-plane/server/routes/index.js +2 -0
- package/dist/data-plane/server/routes/index.js.map +1 -1
- package/dist/data-plane/server/routes/private-data.d.ts +9 -0
- package/dist/data-plane/server/routes/private-data.d.ts.map +1 -0
- package/dist/data-plane/server/routes/private-data.js +63 -0
- package/dist/data-plane/server/routes/private-data.js.map +1 -0
- package/dist/data-plane/server/util.d.ts +6 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/lexicon/index.d.ts +8 -4
- package/dist/lexicon/index.d.ts.map +1 -1
- package/dist/lexicon/index.js +14 -6
- package/dist/lexicon/index.js.map +1 -1
- package/dist/lexicon/lexicons.d.ts +518 -100
- package/dist/lexicon/lexicons.d.ts.map +1 -1
- package/dist/lexicon/lexicons.js +277 -52
- package/dist/lexicon/lexicons.js.map +1 -1
- package/dist/lexicon/types/app/bsky/notification/defs.d.ts +40 -0
- package/dist/lexicon/types/app/bsky/notification/defs.d.ts.map +1 -1
- package/dist/lexicon/types/app/bsky/notification/defs.js +36 -0
- package/dist/lexicon/types/app/bsky/notification/defs.js.map +1 -1
- package/dist/lexicon/types/app/bsky/notification/getPreferences.d.ts +35 -0
- package/dist/lexicon/types/app/bsky/notification/getPreferences.d.ts.map +1 -0
- package/dist/lexicon/types/app/bsky/notification/getPreferences.js +7 -0
- package/dist/lexicon/types/app/bsky/notification/getPreferences.js.map +1 -0
- package/dist/lexicon/types/app/bsky/notification/putPreferencesV2.d.ts +52 -0
- package/dist/lexicon/types/app/bsky/notification/putPreferencesV2.d.ts.map +1 -0
- package/dist/lexicon/types/app/bsky/notification/putPreferencesV2.js +7 -0
- package/dist/lexicon/types/app/bsky/notification/putPreferencesV2.js.map +1 -0
- package/dist/lexicon/types/app/bsky/unspecced/{getPostThreadHiddenV2.d.ts → getPostThreadOtherV2.d.ts} +7 -7
- package/dist/lexicon/types/app/bsky/unspecced/getPostThreadOtherV2.d.ts.map +1 -0
- package/dist/lexicon/types/app/bsky/unspecced/getPostThreadOtherV2.js +16 -0
- package/dist/lexicon/types/app/bsky/unspecced/getPostThreadOtherV2.js.map +1 -0
- package/dist/lexicon/types/app/bsky/unspecced/getPostThreadV2.d.ts +2 -2
- package/dist/lexicon/types/app/bsky/unspecced/getPostThreadV2.d.ts.map +1 -1
- package/dist/proto/bsky_connect.d.ts +10 -1
- package/dist/proto/bsky_connect.d.ts.map +1 -1
- package/dist/proto/bsky_connect.js +9 -0
- package/dist/proto/bsky_connect.js.map +1 -1
- package/dist/proto/bsky_pb.d.ts +234 -0
- package/dist/proto/bsky_pb.d.ts.map +1 -1
- package/dist/proto/bsky_pb.js +693 -5
- package/dist/proto/bsky_pb.js.map +1 -1
- package/dist/proto/bsync_pb.d.ts +10 -10
- package/dist/proto/bsync_pb.d.ts.map +1 -1
- package/dist/proto/bsync_pb.js +15 -15
- package/dist/proto/bsync_pb.js.map +1 -1
- package/dist/stash.d.ts +26 -0
- package/dist/stash.d.ts.map +1 -0
- package/dist/stash.js +56 -0
- package/dist/stash.js.map +1 -0
- package/dist/views/index.d.ts +8 -8
- package/dist/views/index.d.ts.map +1 -1
- package/dist/views/index.js +32 -32
- package/dist/views/index.js.map +1 -1
- package/dist/views/threads-v2.d.ts +11 -11
- package/dist/views/threads-v2.d.ts.map +1 -1
- package/dist/views/threads-v2.js.map +1 -1
- package/package.json +4 -4
- package/proto/bsky.proto +61 -0
- package/src/api/app/bsky/notification/getPreferences.ts +50 -0
- package/src/api/app/bsky/notification/putPreferencesV2.ts +62 -0
- package/src/api/app/bsky/notification/util.ts +123 -0
- package/src/api/app/bsky/unspecced/{getPostThreadHiddenV2.ts → getPostThreadOtherV2.ts} +5 -5
- package/src/api/app/bsky/unspecced/getPostThreadV2.ts +2 -2
- package/src/api/index.ts +6 -2
- package/src/context.ts +6 -0
- package/src/data-plane/bsync/index.ts +109 -1
- package/src/data-plane/server/db/database-schema.ts +3 -1
- package/src/data-plane/server/db/migrations/20250602T190357447Z-add-private-data.ts +22 -0
- package/src/data-plane/server/db/migrations/index.ts +1 -0
- package/src/data-plane/server/db/tables/private-data.ts +13 -0
- package/src/data-plane/server/routes/index.ts +2 -0
- package/src/data-plane/server/routes/private-data.ts +90 -0
- package/src/index.ts +4 -0
- package/src/lexicon/index.ts +38 -14
- package/src/lexicon/lexicons.ts +281 -54
- package/src/lexicon/types/app/bsky/notification/defs.ts +76 -0
- package/src/lexicon/types/app/bsky/notification/getPreferences.ts +52 -0
- package/src/lexicon/types/app/bsky/notification/putPreferencesV2.ts +69 -0
- package/src/lexicon/types/app/bsky/unspecced/{getPostThreadHiddenV2.ts → getPostThreadOtherV2.ts} +10 -10
- package/src/lexicon/types/app/bsky/unspecced/getPostThreadV2.ts +2 -2
- package/src/proto/bsky_connect.ts +11 -0
- package/src/proto/bsky_pb.ts +669 -0
- package/src/proto/bsync_pb.ts +15 -15
- package/src/stash.ts +75 -0
- package/src/views/index.ts +46 -46
- package/src/views/threads-v2.ts +23 -23
- package/tests/stash.test.ts +156 -0
- package/tests/views/__snapshots__/thread-v2.test.ts.snap +7 -7
- package/tests/views/notifications.test.ts +221 -0
- package/tests/views/thread-v2.test.ts +93 -93
- package/tsconfig.build.tsbuildinfo +1 -1
- package/tsconfig.tests.tsbuildinfo +1 -1
- package/dist/api/app/bsky/unspecced/getPostThreadHiddenV2.d.ts.map +0 -1
- package/dist/api/app/bsky/unspecced/getPostThreadHiddenV2.js.map +0 -1
- package/dist/lexicon/types/app/bsky/unspecced/getPostThreadHiddenV2.d.ts.map +0 -1
- package/dist/lexicon/types/app/bsky/unspecced/getPostThreadHiddenV2.js +0 -16
- package/dist/lexicon/types/app/bsky/unspecced/getPostThreadHiddenV2.js.map +0 -1
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { ServiceImpl } from '@connectrpc/connect'
|
|
2
|
+
import { keyBy } from '@atproto/common'
|
|
3
|
+
import {
|
|
4
|
+
ChatPreference,
|
|
5
|
+
FilterablePreference,
|
|
6
|
+
Preference,
|
|
7
|
+
Preferences,
|
|
8
|
+
} from '../../../lexicon/types/app/bsky/notification/defs'
|
|
9
|
+
import { Service } from '../../../proto/bsky_connect'
|
|
10
|
+
import {
|
|
11
|
+
ChatNotificationFilter,
|
|
12
|
+
ChatNotificationPreference,
|
|
13
|
+
FilterableNotificationPreference,
|
|
14
|
+
NotificationFilter,
|
|
15
|
+
NotificationPreference,
|
|
16
|
+
NotificationPreferences,
|
|
17
|
+
} from '../../../proto/bsky_pb'
|
|
18
|
+
import { Database } from '../db'
|
|
19
|
+
|
|
20
|
+
export default (db: Database): Partial<ServiceImpl<typeof Service>> => ({
|
|
21
|
+
async getNotificationPreferences(req) {
|
|
22
|
+
const { dids } = req
|
|
23
|
+
const res = await db.db
|
|
24
|
+
.selectFrom('private_data')
|
|
25
|
+
.selectAll()
|
|
26
|
+
.where('actorDid', 'in', dids)
|
|
27
|
+
.where('namespace', '=', 'app.bsky.notification.defs#preferences')
|
|
28
|
+
.where('key', '=', 'self')
|
|
29
|
+
.execute()
|
|
30
|
+
|
|
31
|
+
const byDid = keyBy(res, 'actorDid')
|
|
32
|
+
const preferences = dids.map((did) => {
|
|
33
|
+
const row = byDid.get(did)
|
|
34
|
+
if (!row) {
|
|
35
|
+
return {}
|
|
36
|
+
}
|
|
37
|
+
const p: Preferences = JSON.parse(row.payload)
|
|
38
|
+
return lexToProtobuf(p)
|
|
39
|
+
})
|
|
40
|
+
|
|
41
|
+
return { preferences }
|
|
42
|
+
},
|
|
43
|
+
})
|
|
44
|
+
|
|
45
|
+
export const lexToProtobuf = (p: Preferences): NotificationPreferences => {
|
|
46
|
+
return new NotificationPreferences({
|
|
47
|
+
chat: lexChatPreferenceToProtobuf(p.chat),
|
|
48
|
+
follow: lexFilterablePreferenceToProtobuf(p.follow),
|
|
49
|
+
like: lexFilterablePreferenceToProtobuf(p.like),
|
|
50
|
+
likeViaRepost: lexFilterablePreferenceToProtobuf(p.likeViaRepost),
|
|
51
|
+
mention: lexFilterablePreferenceToProtobuf(p.mention),
|
|
52
|
+
quote: lexFilterablePreferenceToProtobuf(p.quote),
|
|
53
|
+
reply: lexFilterablePreferenceToProtobuf(p.reply),
|
|
54
|
+
repost: lexFilterablePreferenceToProtobuf(p.repost),
|
|
55
|
+
repostViaRepost: lexFilterablePreferenceToProtobuf(p.repostViaRepost),
|
|
56
|
+
starterpackJoined: lexPreferenceToProtobuf(p.starterpackJoined),
|
|
57
|
+
subscribedPost: lexPreferenceToProtobuf(p.subscribedPost),
|
|
58
|
+
unverified: lexPreferenceToProtobuf(p.unverified),
|
|
59
|
+
verified: lexPreferenceToProtobuf(p.verified),
|
|
60
|
+
})
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
const lexChatPreferenceToProtobuf = (
|
|
64
|
+
p: ChatPreference,
|
|
65
|
+
): ChatNotificationPreference =>
|
|
66
|
+
new ChatNotificationPreference({
|
|
67
|
+
filter:
|
|
68
|
+
p.filter === 'accepted'
|
|
69
|
+
? ChatNotificationFilter.ACCEPTED
|
|
70
|
+
: ChatNotificationFilter.ALL,
|
|
71
|
+
push: { enabled: p.push ?? true },
|
|
72
|
+
})
|
|
73
|
+
|
|
74
|
+
const lexFilterablePreferenceToProtobuf = (
|
|
75
|
+
p: FilterablePreference,
|
|
76
|
+
): FilterableNotificationPreference =>
|
|
77
|
+
new FilterableNotificationPreference({
|
|
78
|
+
filter:
|
|
79
|
+
p.filter === 'follows'
|
|
80
|
+
? NotificationFilter.FOLLOWS
|
|
81
|
+
: NotificationFilter.ALL,
|
|
82
|
+
list: { enabled: p.list ?? true },
|
|
83
|
+
push: { enabled: p.push ?? true },
|
|
84
|
+
})
|
|
85
|
+
|
|
86
|
+
const lexPreferenceToProtobuf = (p: Preference): NotificationPreference =>
|
|
87
|
+
new NotificationPreference({
|
|
88
|
+
list: { enabled: p.list ?? true },
|
|
89
|
+
push: { enabled: p.push ?? true },
|
|
90
|
+
})
|
package/src/index.ts
CHANGED
|
@@ -29,6 +29,7 @@ import * as imageServer from './image/server'
|
|
|
29
29
|
import { ImageUriBuilder } from './image/uri'
|
|
30
30
|
import { createServer } from './lexicon'
|
|
31
31
|
import { loggerMiddleware } from './logger'
|
|
32
|
+
import { createStashClient } from './stash'
|
|
32
33
|
import { Views } from './views'
|
|
33
34
|
import { VideoUriBuilder } from './views/util'
|
|
34
35
|
|
|
@@ -136,6 +137,8 @@ export class BskyAppView {
|
|
|
136
137
|
interceptors: config.bsyncApiKey ? [bsyncAuth(config.bsyncApiKey)] : [],
|
|
137
138
|
})
|
|
138
139
|
|
|
140
|
+
const stashClient = createStashClient(bsyncClient)
|
|
141
|
+
|
|
139
142
|
const courierClient = config.courierUrl
|
|
140
143
|
? createCourierClient({
|
|
141
144
|
baseUrl: config.courierUrl,
|
|
@@ -178,6 +181,7 @@ export class BskyAppView {
|
|
|
178
181
|
signingKey,
|
|
179
182
|
idResolver,
|
|
180
183
|
bsyncClient,
|
|
184
|
+
stashClient,
|
|
181
185
|
courierClient,
|
|
182
186
|
authVerifier,
|
|
183
187
|
featureGates,
|
package/src/lexicon/index.ts
CHANGED
|
@@ -108,8 +108,8 @@ import * as AppBskyFeedGetFeedGenerators from './types/app/bsky/feed/getFeedGene
|
|
|
108
108
|
import * as AppBskyFeedGetFeedSkeleton from './types/app/bsky/feed/getFeedSkeleton.js'
|
|
109
109
|
import * as AppBskyFeedGetLikes from './types/app/bsky/feed/getLikes.js'
|
|
110
110
|
import * as AppBskyFeedGetListFeed from './types/app/bsky/feed/getListFeed.js'
|
|
111
|
-
import * as AppBskyFeedGetPostThread from './types/app/bsky/feed/getPostThread.js'
|
|
112
111
|
import * as AppBskyFeedGetPosts from './types/app/bsky/feed/getPosts.js'
|
|
112
|
+
import * as AppBskyFeedGetPostThread from './types/app/bsky/feed/getPostThread.js'
|
|
113
113
|
import * as AppBskyFeedGetQuotes from './types/app/bsky/feed/getQuotes.js'
|
|
114
114
|
import * as AppBskyFeedGetRepostedBy from './types/app/bsky/feed/getRepostedBy.js'
|
|
115
115
|
import * as AppBskyFeedGetSuggestedFeeds from './types/app/bsky/feed/getSuggestedFeeds.js'
|
|
@@ -138,14 +138,16 @@ import * as AppBskyGraphUnmuteActor from './types/app/bsky/graph/unmuteActor.js'
|
|
|
138
138
|
import * as AppBskyGraphUnmuteActorList from './types/app/bsky/graph/unmuteActorList.js'
|
|
139
139
|
import * as AppBskyGraphUnmuteThread from './types/app/bsky/graph/unmuteThread.js'
|
|
140
140
|
import * as AppBskyLabelerGetServices from './types/app/bsky/labeler/getServices.js'
|
|
141
|
+
import * as AppBskyNotificationGetPreferences from './types/app/bsky/notification/getPreferences.js'
|
|
141
142
|
import * as AppBskyNotificationGetUnreadCount from './types/app/bsky/notification/getUnreadCount.js'
|
|
142
143
|
import * as AppBskyNotificationListNotifications from './types/app/bsky/notification/listNotifications.js'
|
|
143
144
|
import * as AppBskyNotificationPutPreferences from './types/app/bsky/notification/putPreferences.js'
|
|
145
|
+
import * as AppBskyNotificationPutPreferencesV2 from './types/app/bsky/notification/putPreferencesV2.js'
|
|
144
146
|
import * as AppBskyNotificationRegisterPush from './types/app/bsky/notification/registerPush.js'
|
|
145
147
|
import * as AppBskyNotificationUpdateSeen from './types/app/bsky/notification/updateSeen.js'
|
|
146
148
|
import * as AppBskyUnspeccedGetConfig from './types/app/bsky/unspecced/getConfig.js'
|
|
147
149
|
import * as AppBskyUnspeccedGetPopularFeedGenerators from './types/app/bsky/unspecced/getPopularFeedGenerators.js'
|
|
148
|
-
import * as
|
|
150
|
+
import * as AppBskyUnspeccedGetPostThreadOtherV2 from './types/app/bsky/unspecced/getPostThreadOtherV2.js'
|
|
149
151
|
import * as AppBskyUnspeccedGetPostThreadV2 from './types/app/bsky/unspecced/getPostThreadV2.js'
|
|
150
152
|
import * as AppBskyUnspeccedGetSuggestedFeeds from './types/app/bsky/unspecced/getSuggestedFeeds.js'
|
|
151
153
|
import * as AppBskyUnspeccedGetSuggestedFeedsSkeleton from './types/app/bsky/unspecced/getSuggestedFeedsSkeleton.js'
|
|
@@ -1499,25 +1501,25 @@ export class AppBskyFeedNS {
|
|
|
1499
1501
|
return this._server.xrpc.method(nsid, cfg)
|
|
1500
1502
|
}
|
|
1501
1503
|
|
|
1502
|
-
|
|
1504
|
+
getPosts<AV extends AuthVerifier>(
|
|
1503
1505
|
cfg: ConfigOf<
|
|
1504
1506
|
AV,
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
+
AppBskyFeedGetPosts.Handler<ExtractAuth<AV>>,
|
|
1508
|
+
AppBskyFeedGetPosts.HandlerReqCtx<ExtractAuth<AV>>
|
|
1507
1509
|
>,
|
|
1508
1510
|
) {
|
|
1509
|
-
const nsid = 'app.bsky.feed.
|
|
1511
|
+
const nsid = 'app.bsky.feed.getPosts' // @ts-ignore
|
|
1510
1512
|
return this._server.xrpc.method(nsid, cfg)
|
|
1511
1513
|
}
|
|
1512
1514
|
|
|
1513
|
-
|
|
1515
|
+
getPostThread<AV extends AuthVerifier>(
|
|
1514
1516
|
cfg: ConfigOf<
|
|
1515
1517
|
AV,
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
+
AppBskyFeedGetPostThread.Handler<ExtractAuth<AV>>,
|
|
1519
|
+
AppBskyFeedGetPostThread.HandlerReqCtx<ExtractAuth<AV>>
|
|
1518
1520
|
>,
|
|
1519
1521
|
) {
|
|
1520
|
-
const nsid = 'app.bsky.feed.
|
|
1522
|
+
const nsid = 'app.bsky.feed.getPostThread' // @ts-ignore
|
|
1521
1523
|
return this._server.xrpc.method(nsid, cfg)
|
|
1522
1524
|
}
|
|
1523
1525
|
|
|
@@ -1853,6 +1855,17 @@ export class AppBskyNotificationNS {
|
|
|
1853
1855
|
this._server = server
|
|
1854
1856
|
}
|
|
1855
1857
|
|
|
1858
|
+
getPreferences<AV extends AuthVerifier>(
|
|
1859
|
+
cfg: ConfigOf<
|
|
1860
|
+
AV,
|
|
1861
|
+
AppBskyNotificationGetPreferences.Handler<ExtractAuth<AV>>,
|
|
1862
|
+
AppBskyNotificationGetPreferences.HandlerReqCtx<ExtractAuth<AV>>
|
|
1863
|
+
>,
|
|
1864
|
+
) {
|
|
1865
|
+
const nsid = 'app.bsky.notification.getPreferences' // @ts-ignore
|
|
1866
|
+
return this._server.xrpc.method(nsid, cfg)
|
|
1867
|
+
}
|
|
1868
|
+
|
|
1856
1869
|
getUnreadCount<AV extends AuthVerifier>(
|
|
1857
1870
|
cfg: ConfigOf<
|
|
1858
1871
|
AV,
|
|
@@ -1886,6 +1899,17 @@ export class AppBskyNotificationNS {
|
|
|
1886
1899
|
return this._server.xrpc.method(nsid, cfg)
|
|
1887
1900
|
}
|
|
1888
1901
|
|
|
1902
|
+
putPreferencesV2<AV extends AuthVerifier>(
|
|
1903
|
+
cfg: ConfigOf<
|
|
1904
|
+
AV,
|
|
1905
|
+
AppBskyNotificationPutPreferencesV2.Handler<ExtractAuth<AV>>,
|
|
1906
|
+
AppBskyNotificationPutPreferencesV2.HandlerReqCtx<ExtractAuth<AV>>
|
|
1907
|
+
>,
|
|
1908
|
+
) {
|
|
1909
|
+
const nsid = 'app.bsky.notification.putPreferencesV2' // @ts-ignore
|
|
1910
|
+
return this._server.xrpc.method(nsid, cfg)
|
|
1911
|
+
}
|
|
1912
|
+
|
|
1889
1913
|
registerPush<AV extends AuthVerifier>(
|
|
1890
1914
|
cfg: ConfigOf<
|
|
1891
1915
|
AV,
|
|
@@ -1946,14 +1970,14 @@ export class AppBskyUnspeccedNS {
|
|
|
1946
1970
|
return this._server.xrpc.method(nsid, cfg)
|
|
1947
1971
|
}
|
|
1948
1972
|
|
|
1949
|
-
|
|
1973
|
+
getPostThreadOtherV2<AV extends AuthVerifier>(
|
|
1950
1974
|
cfg: ConfigOf<
|
|
1951
1975
|
AV,
|
|
1952
|
-
|
|
1953
|
-
|
|
1976
|
+
AppBskyUnspeccedGetPostThreadOtherV2.Handler<ExtractAuth<AV>>,
|
|
1977
|
+
AppBskyUnspeccedGetPostThreadOtherV2.HandlerReqCtx<ExtractAuth<AV>>
|
|
1954
1978
|
>,
|
|
1955
1979
|
) {
|
|
1956
|
-
const nsid = 'app.bsky.unspecced.
|
|
1980
|
+
const nsid = 'app.bsky.unspecced.getPostThreadOtherV2' // @ts-ignore
|
|
1957
1981
|
return this._server.xrpc.method(nsid, cfg)
|
|
1958
1982
|
}
|
|
1959
1983
|
|
package/src/lexicon/lexicons.ts
CHANGED
|
@@ -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',
|
|
@@ -9732,6 +9732,147 @@ export const schemaDict = {
|
|
|
9732
9732
|
type: 'object',
|
|
9733
9733
|
properties: {},
|
|
9734
9734
|
},
|
|
9735
|
+
chatPreference: {
|
|
9736
|
+
type: 'object',
|
|
9737
|
+
required: ['filter', 'push'],
|
|
9738
|
+
properties: {
|
|
9739
|
+
filter: {
|
|
9740
|
+
type: 'string',
|
|
9741
|
+
knownValues: ['all', 'accepted'],
|
|
9742
|
+
},
|
|
9743
|
+
push: {
|
|
9744
|
+
type: 'boolean',
|
|
9745
|
+
},
|
|
9746
|
+
},
|
|
9747
|
+
},
|
|
9748
|
+
filterablePreference: {
|
|
9749
|
+
type: 'object',
|
|
9750
|
+
required: ['filter', 'list', 'push'],
|
|
9751
|
+
properties: {
|
|
9752
|
+
filter: {
|
|
9753
|
+
type: 'string',
|
|
9754
|
+
knownValues: ['all', 'follows'],
|
|
9755
|
+
},
|
|
9756
|
+
list: {
|
|
9757
|
+
type: 'boolean',
|
|
9758
|
+
},
|
|
9759
|
+
push: {
|
|
9760
|
+
type: 'boolean',
|
|
9761
|
+
},
|
|
9762
|
+
},
|
|
9763
|
+
},
|
|
9764
|
+
preference: {
|
|
9765
|
+
type: 'object',
|
|
9766
|
+
required: ['list', 'push'],
|
|
9767
|
+
properties: {
|
|
9768
|
+
list: {
|
|
9769
|
+
type: 'boolean',
|
|
9770
|
+
},
|
|
9771
|
+
push: {
|
|
9772
|
+
type: 'boolean',
|
|
9773
|
+
},
|
|
9774
|
+
},
|
|
9775
|
+
},
|
|
9776
|
+
preferences: {
|
|
9777
|
+
type: 'object',
|
|
9778
|
+
required: [
|
|
9779
|
+
'chat',
|
|
9780
|
+
'follow',
|
|
9781
|
+
'like',
|
|
9782
|
+
'likeViaRepost',
|
|
9783
|
+
'mention',
|
|
9784
|
+
'quote',
|
|
9785
|
+
'reply',
|
|
9786
|
+
'repost',
|
|
9787
|
+
'repostViaRepost',
|
|
9788
|
+
'starterpackJoined',
|
|
9789
|
+
'subscribedPost',
|
|
9790
|
+
'unverified',
|
|
9791
|
+
'verified',
|
|
9792
|
+
],
|
|
9793
|
+
properties: {
|
|
9794
|
+
chat: {
|
|
9795
|
+
type: 'ref',
|
|
9796
|
+
ref: 'lex:app.bsky.notification.defs#chatPreference',
|
|
9797
|
+
},
|
|
9798
|
+
follow: {
|
|
9799
|
+
type: 'ref',
|
|
9800
|
+
ref: 'lex:app.bsky.notification.defs#filterablePreference',
|
|
9801
|
+
},
|
|
9802
|
+
like: {
|
|
9803
|
+
type: 'ref',
|
|
9804
|
+
ref: 'lex:app.bsky.notification.defs#filterablePreference',
|
|
9805
|
+
},
|
|
9806
|
+
likeViaRepost: {
|
|
9807
|
+
type: 'ref',
|
|
9808
|
+
ref: 'lex:app.bsky.notification.defs#filterablePreference',
|
|
9809
|
+
},
|
|
9810
|
+
mention: {
|
|
9811
|
+
type: 'ref',
|
|
9812
|
+
ref: 'lex:app.bsky.notification.defs#filterablePreference',
|
|
9813
|
+
},
|
|
9814
|
+
quote: {
|
|
9815
|
+
type: 'ref',
|
|
9816
|
+
ref: 'lex:app.bsky.notification.defs#filterablePreference',
|
|
9817
|
+
},
|
|
9818
|
+
reply: {
|
|
9819
|
+
type: 'ref',
|
|
9820
|
+
ref: 'lex:app.bsky.notification.defs#filterablePreference',
|
|
9821
|
+
},
|
|
9822
|
+
repost: {
|
|
9823
|
+
type: 'ref',
|
|
9824
|
+
ref: 'lex:app.bsky.notification.defs#filterablePreference',
|
|
9825
|
+
},
|
|
9826
|
+
repostViaRepost: {
|
|
9827
|
+
type: 'ref',
|
|
9828
|
+
ref: 'lex:app.bsky.notification.defs#filterablePreference',
|
|
9829
|
+
},
|
|
9830
|
+
starterpackJoined: {
|
|
9831
|
+
type: 'ref',
|
|
9832
|
+
ref: 'lex:app.bsky.notification.defs#preference',
|
|
9833
|
+
},
|
|
9834
|
+
subscribedPost: {
|
|
9835
|
+
type: 'ref',
|
|
9836
|
+
ref: 'lex:app.bsky.notification.defs#preference',
|
|
9837
|
+
},
|
|
9838
|
+
unverified: {
|
|
9839
|
+
type: 'ref',
|
|
9840
|
+
ref: 'lex:app.bsky.notification.defs#preference',
|
|
9841
|
+
},
|
|
9842
|
+
verified: {
|
|
9843
|
+
type: 'ref',
|
|
9844
|
+
ref: 'lex:app.bsky.notification.defs#preference',
|
|
9845
|
+
},
|
|
9846
|
+
},
|
|
9847
|
+
},
|
|
9848
|
+
},
|
|
9849
|
+
},
|
|
9850
|
+
AppBskyNotificationGetPreferences: {
|
|
9851
|
+
lexicon: 1,
|
|
9852
|
+
id: 'app.bsky.notification.getPreferences',
|
|
9853
|
+
defs: {
|
|
9854
|
+
main: {
|
|
9855
|
+
type: 'query',
|
|
9856
|
+
description:
|
|
9857
|
+
'Get notification-related preferences for an account. Requires auth.',
|
|
9858
|
+
parameters: {
|
|
9859
|
+
type: 'params',
|
|
9860
|
+
properties: {},
|
|
9861
|
+
},
|
|
9862
|
+
output: {
|
|
9863
|
+
encoding: 'application/json',
|
|
9864
|
+
schema: {
|
|
9865
|
+
type: 'object',
|
|
9866
|
+
required: ['preferences'],
|
|
9867
|
+
properties: {
|
|
9868
|
+
preferences: {
|
|
9869
|
+
type: 'ref',
|
|
9870
|
+
ref: 'lex:app.bsky.notification.defs#preferences',
|
|
9871
|
+
},
|
|
9872
|
+
},
|
|
9873
|
+
},
|
|
9874
|
+
},
|
|
9875
|
+
},
|
|
9735
9876
|
},
|
|
9736
9877
|
},
|
|
9737
9878
|
AppBskyNotificationGetUnreadCount: {
|
|
@@ -9924,6 +10065,90 @@ export const schemaDict = {
|
|
|
9924
10065
|
},
|
|
9925
10066
|
},
|
|
9926
10067
|
},
|
|
10068
|
+
AppBskyNotificationPutPreferencesV2: {
|
|
10069
|
+
lexicon: 1,
|
|
10070
|
+
id: 'app.bsky.notification.putPreferencesV2',
|
|
10071
|
+
defs: {
|
|
10072
|
+
main: {
|
|
10073
|
+
type: 'procedure',
|
|
10074
|
+
description:
|
|
10075
|
+
'Set notification-related preferences for an account. Requires auth.',
|
|
10076
|
+
input: {
|
|
10077
|
+
encoding: 'application/json',
|
|
10078
|
+
schema: {
|
|
10079
|
+
type: 'object',
|
|
10080
|
+
properties: {
|
|
10081
|
+
chat: {
|
|
10082
|
+
type: 'ref',
|
|
10083
|
+
ref: 'lex:app.bsky.notification.defs#chatPreference',
|
|
10084
|
+
},
|
|
10085
|
+
follow: {
|
|
10086
|
+
type: 'ref',
|
|
10087
|
+
ref: 'lex:app.bsky.notification.defs#filterablePreference',
|
|
10088
|
+
},
|
|
10089
|
+
like: {
|
|
10090
|
+
type: 'ref',
|
|
10091
|
+
ref: 'lex:app.bsky.notification.defs#filterablePreference',
|
|
10092
|
+
},
|
|
10093
|
+
likeViaRepost: {
|
|
10094
|
+
type: 'ref',
|
|
10095
|
+
ref: 'lex:app.bsky.notification.defs#filterablePreference',
|
|
10096
|
+
},
|
|
10097
|
+
mention: {
|
|
10098
|
+
type: 'ref',
|
|
10099
|
+
ref: 'lex:app.bsky.notification.defs#filterablePreference',
|
|
10100
|
+
},
|
|
10101
|
+
quote: {
|
|
10102
|
+
type: 'ref',
|
|
10103
|
+
ref: 'lex:app.bsky.notification.defs#filterablePreference',
|
|
10104
|
+
},
|
|
10105
|
+
reply: {
|
|
10106
|
+
type: 'ref',
|
|
10107
|
+
ref: 'lex:app.bsky.notification.defs#filterablePreference',
|
|
10108
|
+
},
|
|
10109
|
+
repost: {
|
|
10110
|
+
type: 'ref',
|
|
10111
|
+
ref: 'lex:app.bsky.notification.defs#filterablePreference',
|
|
10112
|
+
},
|
|
10113
|
+
repostViaRepost: {
|
|
10114
|
+
type: 'ref',
|
|
10115
|
+
ref: 'lex:app.bsky.notification.defs#filterablePreference',
|
|
10116
|
+
},
|
|
10117
|
+
starterpackJoined: {
|
|
10118
|
+
type: 'ref',
|
|
10119
|
+
ref: 'lex:app.bsky.notification.defs#preference',
|
|
10120
|
+
},
|
|
10121
|
+
subscribedPost: {
|
|
10122
|
+
type: 'ref',
|
|
10123
|
+
ref: 'lex:app.bsky.notification.defs#preference',
|
|
10124
|
+
},
|
|
10125
|
+
unverified: {
|
|
10126
|
+
type: 'ref',
|
|
10127
|
+
ref: 'lex:app.bsky.notification.defs#preference',
|
|
10128
|
+
},
|
|
10129
|
+
verified: {
|
|
10130
|
+
type: 'ref',
|
|
10131
|
+
ref: 'lex:app.bsky.notification.defs#preference',
|
|
10132
|
+
},
|
|
10133
|
+
},
|
|
10134
|
+
},
|
|
10135
|
+
},
|
|
10136
|
+
output: {
|
|
10137
|
+
encoding: 'application/json',
|
|
10138
|
+
schema: {
|
|
10139
|
+
type: 'object',
|
|
10140
|
+
required: ['preferences'],
|
|
10141
|
+
properties: {
|
|
10142
|
+
preferences: {
|
|
10143
|
+
type: 'ref',
|
|
10144
|
+
ref: 'lex:app.bsky.notification.defs#preferences',
|
|
10145
|
+
},
|
|
10146
|
+
},
|
|
10147
|
+
},
|
|
10148
|
+
},
|
|
10149
|
+
},
|
|
10150
|
+
},
|
|
10151
|
+
},
|
|
9927
10152
|
AppBskyNotificationRegisterPush: {
|
|
9928
10153
|
lexicon: 1,
|
|
9929
10154
|
id: 'app.bsky.notification.registerPush',
|
|
@@ -10354,14 +10579,14 @@ export const schemaDict = {
|
|
|
10354
10579
|
},
|
|
10355
10580
|
},
|
|
10356
10581
|
},
|
|
10357
|
-
|
|
10582
|
+
AppBskyUnspeccedGetPostThreadOtherV2: {
|
|
10358
10583
|
lexicon: 1,
|
|
10359
|
-
id: 'app.bsky.unspecced.
|
|
10584
|
+
id: 'app.bsky.unspecced.getPostThreadOtherV2',
|
|
10360
10585
|
defs: {
|
|
10361
10586
|
main: {
|
|
10362
10587
|
type: 'query',
|
|
10363
10588
|
description:
|
|
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
|
|
10589
|
+
"(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.",
|
|
10365
10590
|
parameters: {
|
|
10366
10591
|
type: 'params',
|
|
10367
10592
|
required: ['anchor'],
|
|
@@ -10389,17 +10614,17 @@ export const schemaDict = {
|
|
|
10389
10614
|
thread: {
|
|
10390
10615
|
type: 'array',
|
|
10391
10616
|
description:
|
|
10392
|
-
'A flat list of
|
|
10617
|
+
'A flat list of other thread items. The depth of each item is indicated by the depth property inside the item.',
|
|
10393
10618
|
items: {
|
|
10394
10619
|
type: 'ref',
|
|
10395
|
-
ref: 'lex:app.bsky.unspecced.
|
|
10620
|
+
ref: 'lex:app.bsky.unspecced.getPostThreadOtherV2#threadItem',
|
|
10396
10621
|
},
|
|
10397
10622
|
},
|
|
10398
10623
|
},
|
|
10399
10624
|
},
|
|
10400
10625
|
},
|
|
10401
10626
|
},
|
|
10402
|
-
|
|
10627
|
+
threadItem: {
|
|
10403
10628
|
type: 'object',
|
|
10404
10629
|
required: ['uri', 'depth', 'value'],
|
|
10405
10630
|
properties: {
|
|
@@ -10477,7 +10702,7 @@ export const schemaDict = {
|
|
|
10477
10702
|
encoding: 'application/json',
|
|
10478
10703
|
schema: {
|
|
10479
10704
|
type: 'object',
|
|
10480
|
-
required: ['thread', '
|
|
10705
|
+
required: ['thread', 'hasOtherReplies'],
|
|
10481
10706
|
properties: {
|
|
10482
10707
|
thread: {
|
|
10483
10708
|
type: 'array',
|
|
@@ -10492,10 +10717,10 @@ export const schemaDict = {
|
|
|
10492
10717
|
type: 'ref',
|
|
10493
10718
|
ref: 'lex:app.bsky.feed.defs#threadgateView',
|
|
10494
10719
|
},
|
|
10495
|
-
|
|
10720
|
+
hasOtherReplies: {
|
|
10496
10721
|
type: 'boolean',
|
|
10497
10722
|
description:
|
|
10498
|
-
'Whether this thread has
|
|
10723
|
+
'Whether this thread has additional replies. If true, a call can be made to the `getPostThreadOtherV2` endpoint to retrieve them.',
|
|
10499
10724
|
},
|
|
10500
10725
|
},
|
|
10501
10726
|
},
|
|
@@ -12892,8 +13117,8 @@ export const ids = {
|
|
|
12892
13117
|
AppBskyFeedGetFeedSkeleton: 'app.bsky.feed.getFeedSkeleton',
|
|
12893
13118
|
AppBskyFeedGetLikes: 'app.bsky.feed.getLikes',
|
|
12894
13119
|
AppBskyFeedGetListFeed: 'app.bsky.feed.getListFeed',
|
|
12895
|
-
AppBskyFeedGetPostThread: 'app.bsky.feed.getPostThread',
|
|
12896
13120
|
AppBskyFeedGetPosts: 'app.bsky.feed.getPosts',
|
|
13121
|
+
AppBskyFeedGetPostThread: 'app.bsky.feed.getPostThread',
|
|
12897
13122
|
AppBskyFeedGetQuotes: 'app.bsky.feed.getQuotes',
|
|
12898
13123
|
AppBskyFeedGetRepostedBy: 'app.bsky.feed.getRepostedBy',
|
|
12899
13124
|
AppBskyFeedGetSuggestedFeeds: 'app.bsky.feed.getSuggestedFeeds',
|
|
@@ -12939,10 +13164,12 @@ export const ids = {
|
|
|
12939
13164
|
AppBskyLabelerGetServices: 'app.bsky.labeler.getServices',
|
|
12940
13165
|
AppBskyLabelerService: 'app.bsky.labeler.service',
|
|
12941
13166
|
AppBskyNotificationDefs: 'app.bsky.notification.defs',
|
|
13167
|
+
AppBskyNotificationGetPreferences: 'app.bsky.notification.getPreferences',
|
|
12942
13168
|
AppBskyNotificationGetUnreadCount: 'app.bsky.notification.getUnreadCount',
|
|
12943
13169
|
AppBskyNotificationListNotifications:
|
|
12944
13170
|
'app.bsky.notification.listNotifications',
|
|
12945
13171
|
AppBskyNotificationPutPreferences: 'app.bsky.notification.putPreferences',
|
|
13172
|
+
AppBskyNotificationPutPreferencesV2: 'app.bsky.notification.putPreferencesV2',
|
|
12946
13173
|
AppBskyNotificationRegisterPush: 'app.bsky.notification.registerPush',
|
|
12947
13174
|
AppBskyNotificationUpdateSeen: 'app.bsky.notification.updateSeen',
|
|
12948
13175
|
AppBskyRichtextFacet: 'app.bsky.richtext.facet',
|
|
@@ -12950,8 +13177,8 @@ export const ids = {
|
|
|
12950
13177
|
AppBskyUnspeccedGetConfig: 'app.bsky.unspecced.getConfig',
|
|
12951
13178
|
AppBskyUnspeccedGetPopularFeedGenerators:
|
|
12952
13179
|
'app.bsky.unspecced.getPopularFeedGenerators',
|
|
12953
|
-
|
|
12954
|
-
'app.bsky.unspecced.
|
|
13180
|
+
AppBskyUnspeccedGetPostThreadOtherV2:
|
|
13181
|
+
'app.bsky.unspecced.getPostThreadOtherV2',
|
|
12955
13182
|
AppBskyUnspeccedGetPostThreadV2: 'app.bsky.unspecced.getPostThreadV2',
|
|
12956
13183
|
AppBskyUnspeccedGetSuggestedFeeds: 'app.bsky.unspecced.getSuggestedFeeds',
|
|
12957
13184
|
AppBskyUnspeccedGetSuggestedFeedsSkeleton:
|