@atproto/bsky 0.0.94 → 0.0.96
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/feed/getFeed.d.ts.map +1 -1
- package/dist/api/app/bsky/feed/getFeed.js +5 -1
- package/dist/api/app/bsky/feed/getFeed.js.map +1 -1
- package/dist/api/app/bsky/feed/getPostThread.d.ts.map +1 -1
- package/dist/api/app/bsky/feed/getPostThread.js +9 -2
- package/dist/api/app/bsky/feed/getPostThread.js.map +1 -1
- package/dist/api/app/bsky/feed/getQuotes.d.ts.map +1 -1
- package/dist/api/app/bsky/feed/getQuotes.js +5 -4
- package/dist/api/app/bsky/feed/getQuotes.js.map +1 -1
- package/dist/api/app/bsky/graph/searchStarterPacks.d.ts +4 -0
- package/dist/api/app/bsky/graph/searchStarterPacks.d.ts.map +1 -0
- package/dist/api/app/bsky/graph/searchStarterPacks.js +76 -0
- package/dist/api/app/bsky/graph/searchStarterPacks.js.map +1 -0
- package/dist/api/app/bsky/notification/listNotifications.js +12 -4
- package/dist/api/app/bsky/notification/listNotifications.js.map +1 -1
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js +2 -0
- package/dist/api/index.js.map +1 -1
- package/dist/config.d.ts +6 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +19 -0
- package/dist/config.js.map +1 -1
- package/dist/data-plane/server/db/migrations/20241114T153108102Z-add-starter-packs-name.d.ts +4 -0
- package/dist/data-plane/server/db/migrations/20241114T153108102Z-add-starter-packs-name.d.ts.map +1 -0
- package/dist/data-plane/server/db/migrations/20241114T153108102Z-add-starter-packs-name.js +21 -0
- package/dist/data-plane/server/db/migrations/20241114T153108102Z-add-starter-packs-name.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/starter-pack.d.ts +1 -0
- package/dist/data-plane/server/db/tables/starter-pack.d.ts.map +1 -1
- package/dist/data-plane/server/indexing/plugins/starter-pack.d.ts.map +1 -1
- package/dist/data-plane/server/indexing/plugins/starter-pack.js +1 -0
- package/dist/data-plane/server/indexing/plugins/starter-pack.js.map +1 -1
- package/dist/data-plane/server/routes/search.d.ts.map +1 -1
- package/dist/data-plane/server/routes/search.js +21 -0
- package/dist/data-plane/server/routes/search.js.map +1 -1
- package/dist/hydration/actor.d.ts.map +1 -1
- package/dist/hydration/actor.js +6 -2
- package/dist/hydration/actor.js.map +1 -1
- package/dist/hydration/label.d.ts +1 -0
- package/dist/hydration/label.d.ts.map +1 -1
- package/dist/hydration/label.js +12 -1
- package/dist/hydration/label.js.map +1 -1
- package/dist/lexicon/index.d.ts +6 -0
- package/dist/lexicon/index.d.ts.map +1 -1
- package/dist/lexicon/index.js +12 -0
- package/dist/lexicon/index.js.map +1 -1
- package/dist/lexicon/lexicons.d.ts +151 -0
- package/dist/lexicon/lexicons.d.ts.map +1 -1
- package/dist/lexicon/lexicons.js +160 -1
- package/dist/lexicon/lexicons.js.map +1 -1
- package/dist/lexicon/types/app/bsky/actor/defs.d.ts +1 -1
- package/dist/lexicon/types/app/bsky/actor/defs.d.ts.map +1 -1
- package/dist/lexicon/types/app/bsky/actor/defs.js.map +1 -1
- package/dist/lexicon/types/app/bsky/graph/searchStarterPacks.d.ts +40 -0
- package/dist/lexicon/types/app/bsky/graph/searchStarterPacks.d.ts.map +1 -0
- package/dist/lexicon/types/app/bsky/graph/searchStarterPacks.js +3 -0
- package/dist/lexicon/types/app/bsky/graph/searchStarterPacks.js.map +1 -0
- package/dist/lexicon/types/app/bsky/unspecced/defs.d.ts +6 -0
- package/dist/lexicon/types/app/bsky/unspecced/defs.d.ts.map +1 -1
- package/dist/lexicon/types/app/bsky/unspecced/defs.js +10 -0
- package/dist/lexicon/types/app/bsky/unspecced/defs.js.map +1 -1
- package/dist/lexicon/types/app/bsky/unspecced/searchStarterPacksSkeleton.d.ts +46 -0
- package/dist/lexicon/types/app/bsky/unspecced/searchStarterPacksSkeleton.d.ts.map +1 -0
- package/dist/lexicon/types/app/bsky/unspecced/searchStarterPacksSkeleton.js +3 -0
- package/dist/lexicon/types/app/bsky/unspecced/searchStarterPacksSkeleton.js.map +1 -0
- package/dist/lexicon/types/com/atproto/temp/addReservedHandle.d.ts +39 -0
- package/dist/lexicon/types/com/atproto/temp/addReservedHandle.d.ts.map +1 -0
- package/dist/lexicon/types/com/atproto/temp/addReservedHandle.js +3 -0
- package/dist/lexicon/types/com/atproto/temp/addReservedHandle.js.map +1 -0
- 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 +49 -0
- package/dist/proto/bsky_pb.d.ts.map +1 -1
- package/dist/proto/bsky_pb.js +144 -3
- package/dist/proto/bsky_pb.js.map +1 -1
- package/dist/views/index.d.ts +1 -0
- package/dist/views/index.d.ts.map +1 -1
- package/dist/views/index.js +9 -0
- package/dist/views/index.js.map +1 -1
- package/package.json +4 -4
- package/proto/bsky.proto +14 -0
- package/src/api/app/bsky/feed/getFeed.ts +8 -1
- package/src/api/app/bsky/feed/getPostThread.ts +13 -7
- package/src/api/app/bsky/feed/getQuotes.ts +12 -5
- package/src/api/app/bsky/graph/searchStarterPacks.ts +118 -0
- package/src/api/app/bsky/notification/listNotifications.ts +14 -4
- package/src/api/index.ts +2 -0
- package/src/config.ts +26 -0
- package/src/data-plane/server/db/migrations/20241114T153108102Z-add-starter-packs-name.ts +19 -0
- package/src/data-plane/server/db/migrations/index.ts +1 -0
- package/src/data-plane/server/db/tables/starter-pack.ts +1 -0
- package/src/data-plane/server/indexing/plugins/starter-pack.ts +1 -0
- package/src/data-plane/server/routes/search.ts +30 -0
- package/src/hydration/actor.ts +11 -5
- package/src/hydration/label.ts +16 -1
- package/src/lexicon/index.ts +36 -0
- package/src/lexicon/lexicons.ts +167 -1
- package/src/lexicon/types/app/bsky/actor/defs.ts +7 -1
- package/src/lexicon/types/app/bsky/graph/searchStarterPacks.ts +50 -0
- package/src/lexicon/types/app/bsky/unspecced/defs.ts +24 -0
- package/src/lexicon/types/app/bsky/unspecced/searchStarterPacksSkeleton.ts +56 -0
- package/src/lexicon/types/com/atproto/temp/addReservedHandle.ts +48 -0
- package/src/proto/bsky_connect.ts +11 -0
- package/src/proto/bsky_pb.ts +137 -0
- package/src/views/index.ts +12 -0
- package/tests/__snapshots__/feed-generation.test.ts.snap +49 -7
- package/tests/feed-generation.test.ts +82 -28
- package/tests/query-labels.test.ts +1 -1
- package/tests/views/known-followers.test.ts +1 -1
- package/tests/views/labels-needs-review.test.ts +168 -0
- package/tests/views/starter-packs.test.ts +62 -0
- package/tsconfig.build.tsbuildinfo +1 -1
- package/tsconfig.tests.tsbuildinfo +1 -1
- /package/tests/views/{takedown-labels.test.ts → labels-takedown.test.ts} +0 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Kysely, sql } from 'kysely'
|
|
2
|
+
|
|
3
|
+
export async function up(db: Kysely<unknown>): Promise<void> {
|
|
4
|
+
await db.schema
|
|
5
|
+
.alterTable('starter_pack')
|
|
6
|
+
.addColumn('name', 'varchar')
|
|
7
|
+
.execute()
|
|
8
|
+
|
|
9
|
+
await db.schema // Supports starter pack search
|
|
10
|
+
.createIndex(`starter_pack_name_tgrm_idx`)
|
|
11
|
+
.on('starter_pack')
|
|
12
|
+
.using('gist')
|
|
13
|
+
.expression(sql`"name" gist_trgm_ops`)
|
|
14
|
+
.execute()
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export async function down(db: Kysely<unknown>): Promise<void> {
|
|
18
|
+
await db.schema.alterTable('starter_pack').dropColumn('name').execute()
|
|
19
|
+
}
|
|
@@ -44,3 +44,4 @@ export * as _20240801T193939827Z from './20240801T193939827Z-post-gate'
|
|
|
44
44
|
export * as _20240808T224251220Z from './20240808T224251220Z-post-gate-flags'
|
|
45
45
|
export * as _20240829T211238293Z from './20240829T211238293Z-simplify-actor-sync'
|
|
46
46
|
export * as _20240831T134810923Z from './20240831T134810923Z-pinned-posts'
|
|
47
|
+
export * as _20241114T153108102Z from './20241114T153108102Z-add-starter-packs-name'
|
|
@@ -55,6 +55,36 @@ export default (db: Database): Partial<ServiceImpl<typeof Service>> => ({
|
|
|
55
55
|
cursor: keyset.packFromResult(res),
|
|
56
56
|
}
|
|
57
57
|
},
|
|
58
|
+
|
|
59
|
+
async searchStarterPacks(req) {
|
|
60
|
+
const { term, limit, cursor } = req
|
|
61
|
+
const { ref } = db.db.dynamic
|
|
62
|
+
let builder = db.db
|
|
63
|
+
.selectFrom('starter_pack')
|
|
64
|
+
.where('starter_pack.name', 'ilike', `%${term}%`)
|
|
65
|
+
.selectAll()
|
|
66
|
+
|
|
67
|
+
const keyset = new TimeCidKeyset(
|
|
68
|
+
ref('starter_pack.sortAt'),
|
|
69
|
+
ref('starter_pack.cid'),
|
|
70
|
+
)
|
|
71
|
+
|
|
72
|
+
builder = paginate(builder, {
|
|
73
|
+
limit,
|
|
74
|
+
cursor,
|
|
75
|
+
keyset,
|
|
76
|
+
tryIndex: true,
|
|
77
|
+
})
|
|
78
|
+
|
|
79
|
+
const res = await builder.execute()
|
|
80
|
+
|
|
81
|
+
const cur = keyset.packFromResult(res)
|
|
82
|
+
|
|
83
|
+
return {
|
|
84
|
+
uris: res.map((row) => row.uri),
|
|
85
|
+
cursor: cur,
|
|
86
|
+
}
|
|
87
|
+
},
|
|
58
88
|
})
|
|
59
89
|
|
|
60
90
|
// Remove leading @ in case a handle is input that way
|
package/src/hydration/actor.ts
CHANGED
|
@@ -189,11 +189,17 @@ export class ActorHydrator {
|
|
|
189
189
|
viewer: string | null,
|
|
190
190
|
): Promise<KnownFollowers> {
|
|
191
191
|
if (!viewer) return new HydrationMap<ProfileViewerState['knownFollowers']>()
|
|
192
|
-
const { results: knownFollowersResults } =
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
192
|
+
const { results: knownFollowersResults } = await this.dataplane
|
|
193
|
+
.getFollowsFollowing(
|
|
194
|
+
{
|
|
195
|
+
actorDid: viewer,
|
|
196
|
+
targetDids: dids,
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
signal: AbortSignal.timeout(100),
|
|
200
|
+
},
|
|
201
|
+
)
|
|
202
|
+
.catch(() => ({ results: [] }))
|
|
197
203
|
return dids.reduce((acc, did, i) => {
|
|
198
204
|
const result = knownFollowersResults[i]?.dids
|
|
199
205
|
return acc.set(
|
package/src/hydration/label.ts
CHANGED
|
@@ -17,6 +17,7 @@ export type { Label } from '../lexicon/types/com/atproto/label/defs'
|
|
|
17
17
|
|
|
18
18
|
export type SubjectLabels = {
|
|
19
19
|
isTakendown: boolean
|
|
20
|
+
needsReview: boolean
|
|
20
21
|
labels: HydrationMap<Label> // src + val -> label
|
|
21
22
|
}
|
|
22
23
|
|
|
@@ -84,11 +85,21 @@ export class LabelHydrator {
|
|
|
84
85
|
if (!entry) {
|
|
85
86
|
entry = {
|
|
86
87
|
isTakendown: false,
|
|
88
|
+
needsReview: false,
|
|
87
89
|
labels: new HydrationMap(),
|
|
88
90
|
}
|
|
89
91
|
acc.set(label.uri, entry)
|
|
90
92
|
}
|
|
91
|
-
|
|
93
|
+
const isActionableNeedsReview =
|
|
94
|
+
label.val === NEEDS_REVIEW_LABEL &&
|
|
95
|
+
!label.neg &&
|
|
96
|
+
labelers.redact.has(label.src)
|
|
97
|
+
|
|
98
|
+
// we action needs review labels on backend for now so don't send to client until client has proper logic for them
|
|
99
|
+
if (!isActionableNeedsReview) {
|
|
100
|
+
entry.labels.set(Labels.key(label), label)
|
|
101
|
+
}
|
|
102
|
+
|
|
92
103
|
if (
|
|
93
104
|
TAKEDOWN_LABELS.includes(label.val) &&
|
|
94
105
|
!label.neg &&
|
|
@@ -96,6 +107,9 @@ export class LabelHydrator {
|
|
|
96
107
|
) {
|
|
97
108
|
entry.isTakendown = true
|
|
98
109
|
}
|
|
110
|
+
if (isActionableNeedsReview) {
|
|
111
|
+
entry.needsReview = true
|
|
112
|
+
}
|
|
99
113
|
return acc
|
|
100
114
|
}, new Labels())
|
|
101
115
|
}
|
|
@@ -147,3 +161,4 @@ const labelerDidToUri = (did: string): string => {
|
|
|
147
161
|
}
|
|
148
162
|
|
|
149
163
|
const TAKEDOWN_LABELS = ['!takedown', '!suspend']
|
|
164
|
+
const NEEDS_REVIEW_LABEL = 'needs-review'
|
package/src/lexicon/index.ts
CHANGED
|
@@ -80,6 +80,7 @@ import * as ComAtprotoSyncListRepos from './types/com/atproto/sync/listRepos'
|
|
|
80
80
|
import * as ComAtprotoSyncNotifyOfUpdate from './types/com/atproto/sync/notifyOfUpdate'
|
|
81
81
|
import * as ComAtprotoSyncRequestCrawl from './types/com/atproto/sync/requestCrawl'
|
|
82
82
|
import * as ComAtprotoSyncSubscribeRepos from './types/com/atproto/sync/subscribeRepos'
|
|
83
|
+
import * as ComAtprotoTempAddReservedHandle from './types/com/atproto/temp/addReservedHandle'
|
|
83
84
|
import * as ComAtprotoTempCheckSignupQueue from './types/com/atproto/temp/checkSignupQueue'
|
|
84
85
|
import * as ComAtprotoTempFetchLabels from './types/com/atproto/temp/fetchLabels'
|
|
85
86
|
import * as ComAtprotoTempRequestPhoneVerification from './types/com/atproto/temp/requestPhoneVerification'
|
|
@@ -125,6 +126,7 @@ import * as AppBskyGraphGetSuggestedFollowsByActor from './types/app/bsky/graph/
|
|
|
125
126
|
import * as AppBskyGraphMuteActor from './types/app/bsky/graph/muteActor'
|
|
126
127
|
import * as AppBskyGraphMuteActorList from './types/app/bsky/graph/muteActorList'
|
|
127
128
|
import * as AppBskyGraphMuteThread from './types/app/bsky/graph/muteThread'
|
|
129
|
+
import * as AppBskyGraphSearchStarterPacks from './types/app/bsky/graph/searchStarterPacks'
|
|
128
130
|
import * as AppBskyGraphUnmuteActor from './types/app/bsky/graph/unmuteActor'
|
|
129
131
|
import * as AppBskyGraphUnmuteActorList from './types/app/bsky/graph/unmuteActorList'
|
|
130
132
|
import * as AppBskyGraphUnmuteThread from './types/app/bsky/graph/unmuteThread'
|
|
@@ -140,6 +142,7 @@ import * as AppBskyUnspeccedGetSuggestionsSkeleton from './types/app/bsky/unspec
|
|
|
140
142
|
import * as AppBskyUnspeccedGetTaggedSuggestions from './types/app/bsky/unspecced/getTaggedSuggestions'
|
|
141
143
|
import * as AppBskyUnspeccedSearchActorsSkeleton from './types/app/bsky/unspecced/searchActorsSkeleton'
|
|
142
144
|
import * as AppBskyUnspeccedSearchPostsSkeleton from './types/app/bsky/unspecced/searchPostsSkeleton'
|
|
145
|
+
import * as AppBskyUnspeccedSearchStarterPacksSkeleton from './types/app/bsky/unspecced/searchStarterPacksSkeleton'
|
|
143
146
|
import * as AppBskyVideoGetJobStatus from './types/app/bsky/video/getJobStatus'
|
|
144
147
|
import * as AppBskyVideoGetUploadLimits from './types/app/bsky/video/getUploadLimits'
|
|
145
148
|
import * as AppBskyVideoUploadVideo from './types/app/bsky/video/uploadVideo'
|
|
@@ -1090,6 +1093,17 @@ export class ComAtprotoTempNS {
|
|
|
1090
1093
|
this._server = server
|
|
1091
1094
|
}
|
|
1092
1095
|
|
|
1096
|
+
addReservedHandle<AV extends AuthVerifier>(
|
|
1097
|
+
cfg: ConfigOf<
|
|
1098
|
+
AV,
|
|
1099
|
+
ComAtprotoTempAddReservedHandle.Handler<ExtractAuth<AV>>,
|
|
1100
|
+
ComAtprotoTempAddReservedHandle.HandlerReqCtx<ExtractAuth<AV>>
|
|
1101
|
+
>,
|
|
1102
|
+
) {
|
|
1103
|
+
const nsid = 'com.atproto.temp.addReservedHandle' // @ts-ignore
|
|
1104
|
+
return this._server.xrpc.method(nsid, cfg)
|
|
1105
|
+
}
|
|
1106
|
+
|
|
1093
1107
|
checkSignupQueue<AV extends AuthVerifier>(
|
|
1094
1108
|
cfg: ConfigOf<
|
|
1095
1109
|
AV,
|
|
@@ -1653,6 +1667,17 @@ export class AppBskyGraphNS {
|
|
|
1653
1667
|
return this._server.xrpc.method(nsid, cfg)
|
|
1654
1668
|
}
|
|
1655
1669
|
|
|
1670
|
+
searchStarterPacks<AV extends AuthVerifier>(
|
|
1671
|
+
cfg: ConfigOf<
|
|
1672
|
+
AV,
|
|
1673
|
+
AppBskyGraphSearchStarterPacks.Handler<ExtractAuth<AV>>,
|
|
1674
|
+
AppBskyGraphSearchStarterPacks.HandlerReqCtx<ExtractAuth<AV>>
|
|
1675
|
+
>,
|
|
1676
|
+
) {
|
|
1677
|
+
const nsid = 'app.bsky.graph.searchStarterPacks' // @ts-ignore
|
|
1678
|
+
return this._server.xrpc.method(nsid, cfg)
|
|
1679
|
+
}
|
|
1680
|
+
|
|
1656
1681
|
unmuteActor<AV extends AuthVerifier>(
|
|
1657
1682
|
cfg: ConfigOf<
|
|
1658
1683
|
AV,
|
|
@@ -1849,6 +1874,17 @@ export class AppBskyUnspeccedNS {
|
|
|
1849
1874
|
const nsid = 'app.bsky.unspecced.searchPostsSkeleton' // @ts-ignore
|
|
1850
1875
|
return this._server.xrpc.method(nsid, cfg)
|
|
1851
1876
|
}
|
|
1877
|
+
|
|
1878
|
+
searchStarterPacksSkeleton<AV extends AuthVerifier>(
|
|
1879
|
+
cfg: ConfigOf<
|
|
1880
|
+
AV,
|
|
1881
|
+
AppBskyUnspeccedSearchStarterPacksSkeleton.Handler<ExtractAuth<AV>>,
|
|
1882
|
+
AppBskyUnspeccedSearchStarterPacksSkeleton.HandlerReqCtx<ExtractAuth<AV>>
|
|
1883
|
+
>,
|
|
1884
|
+
) {
|
|
1885
|
+
const nsid = 'app.bsky.unspecced.searchStarterPacksSkeleton' // @ts-ignore
|
|
1886
|
+
return this._server.xrpc.method(nsid, cfg)
|
|
1887
|
+
}
|
|
1852
1888
|
}
|
|
1853
1889
|
|
|
1854
1890
|
export class AppBskyVideoNS {
|
package/src/lexicon/lexicons.ts
CHANGED
|
@@ -3959,6 +3959,35 @@ export const schemaDict = {
|
|
|
3959
3959
|
},
|
|
3960
3960
|
},
|
|
3961
3961
|
},
|
|
3962
|
+
ComAtprotoTempAddReservedHandle: {
|
|
3963
|
+
lexicon: 1,
|
|
3964
|
+
id: 'com.atproto.temp.addReservedHandle',
|
|
3965
|
+
defs: {
|
|
3966
|
+
main: {
|
|
3967
|
+
type: 'procedure',
|
|
3968
|
+
description: 'Add a handle to the set of reserved handles.',
|
|
3969
|
+
input: {
|
|
3970
|
+
encoding: 'application/json',
|
|
3971
|
+
schema: {
|
|
3972
|
+
type: 'object',
|
|
3973
|
+
required: ['handle'],
|
|
3974
|
+
properties: {
|
|
3975
|
+
handle: {
|
|
3976
|
+
type: 'string',
|
|
3977
|
+
},
|
|
3978
|
+
},
|
|
3979
|
+
},
|
|
3980
|
+
},
|
|
3981
|
+
output: {
|
|
3982
|
+
encoding: 'application/json',
|
|
3983
|
+
schema: {
|
|
3984
|
+
type: 'object',
|
|
3985
|
+
properties: {},
|
|
3986
|
+
},
|
|
3987
|
+
},
|
|
3988
|
+
},
|
|
3989
|
+
},
|
|
3990
|
+
},
|
|
3962
3991
|
ComAtprotoTempCheckSignupQueue: {
|
|
3963
3992
|
lexicon: 1,
|
|
3964
3993
|
id: 'com.atproto.temp.checkSignupQueue',
|
|
@@ -4461,7 +4490,13 @@ export const schemaDict = {
|
|
|
4461
4490
|
sort: {
|
|
4462
4491
|
type: 'string',
|
|
4463
4492
|
description: 'Sorting mode for threads.',
|
|
4464
|
-
knownValues: [
|
|
4493
|
+
knownValues: [
|
|
4494
|
+
'oldest',
|
|
4495
|
+
'newest',
|
|
4496
|
+
'most-likes',
|
|
4497
|
+
'random',
|
|
4498
|
+
'hotness',
|
|
4499
|
+
],
|
|
4465
4500
|
},
|
|
4466
4501
|
prioritizeFollowedUsers: {
|
|
4467
4502
|
type: 'boolean',
|
|
@@ -8488,6 +8523,56 @@ export const schemaDict = {
|
|
|
8488
8523
|
},
|
|
8489
8524
|
},
|
|
8490
8525
|
},
|
|
8526
|
+
AppBskyGraphSearchStarterPacks: {
|
|
8527
|
+
lexicon: 1,
|
|
8528
|
+
id: 'app.bsky.graph.searchStarterPacks',
|
|
8529
|
+
defs: {
|
|
8530
|
+
main: {
|
|
8531
|
+
type: 'query',
|
|
8532
|
+
description:
|
|
8533
|
+
'Find starter packs matching search criteria. Does not require auth.',
|
|
8534
|
+
parameters: {
|
|
8535
|
+
type: 'params',
|
|
8536
|
+
required: ['q'],
|
|
8537
|
+
properties: {
|
|
8538
|
+
q: {
|
|
8539
|
+
type: 'string',
|
|
8540
|
+
description:
|
|
8541
|
+
'Search query string. Syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended.',
|
|
8542
|
+
},
|
|
8543
|
+
limit: {
|
|
8544
|
+
type: 'integer',
|
|
8545
|
+
minimum: 1,
|
|
8546
|
+
maximum: 100,
|
|
8547
|
+
default: 25,
|
|
8548
|
+
},
|
|
8549
|
+
cursor: {
|
|
8550
|
+
type: 'string',
|
|
8551
|
+
},
|
|
8552
|
+
},
|
|
8553
|
+
},
|
|
8554
|
+
output: {
|
|
8555
|
+
encoding: 'application/json',
|
|
8556
|
+
schema: {
|
|
8557
|
+
type: 'object',
|
|
8558
|
+
required: ['starterPacks'],
|
|
8559
|
+
properties: {
|
|
8560
|
+
cursor: {
|
|
8561
|
+
type: 'string',
|
|
8562
|
+
},
|
|
8563
|
+
starterPacks: {
|
|
8564
|
+
type: 'array',
|
|
8565
|
+
items: {
|
|
8566
|
+
type: 'ref',
|
|
8567
|
+
ref: 'lex:app.bsky.graph.defs#starterPackViewBasic',
|
|
8568
|
+
},
|
|
8569
|
+
},
|
|
8570
|
+
},
|
|
8571
|
+
},
|
|
8572
|
+
},
|
|
8573
|
+
},
|
|
8574
|
+
},
|
|
8575
|
+
},
|
|
8491
8576
|
AppBskyGraphStarterpack: {
|
|
8492
8577
|
lexicon: 1,
|
|
8493
8578
|
id: 'app.bsky.graph.starterpack',
|
|
@@ -9153,6 +9238,16 @@ export const schemaDict = {
|
|
|
9153
9238
|
},
|
|
9154
9239
|
},
|
|
9155
9240
|
},
|
|
9241
|
+
skeletonSearchStarterPack: {
|
|
9242
|
+
type: 'object',
|
|
9243
|
+
required: ['uri'],
|
|
9244
|
+
properties: {
|
|
9245
|
+
uri: {
|
|
9246
|
+
type: 'string',
|
|
9247
|
+
format: 'at-uri',
|
|
9248
|
+
},
|
|
9249
|
+
},
|
|
9250
|
+
},
|
|
9156
9251
|
},
|
|
9157
9252
|
},
|
|
9158
9253
|
AppBskyUnspeccedGetConfig: {
|
|
@@ -9526,6 +9621,73 @@ export const schemaDict = {
|
|
|
9526
9621
|
},
|
|
9527
9622
|
},
|
|
9528
9623
|
},
|
|
9624
|
+
AppBskyUnspeccedSearchStarterPacksSkeleton: {
|
|
9625
|
+
lexicon: 1,
|
|
9626
|
+
id: 'app.bsky.unspecced.searchStarterPacksSkeleton',
|
|
9627
|
+
defs: {
|
|
9628
|
+
main: {
|
|
9629
|
+
type: 'query',
|
|
9630
|
+
description: 'Backend Starter Pack search, returns only skeleton.',
|
|
9631
|
+
parameters: {
|
|
9632
|
+
type: 'params',
|
|
9633
|
+
required: ['q'],
|
|
9634
|
+
properties: {
|
|
9635
|
+
q: {
|
|
9636
|
+
type: 'string',
|
|
9637
|
+
description:
|
|
9638
|
+
'Search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended.',
|
|
9639
|
+
},
|
|
9640
|
+
viewer: {
|
|
9641
|
+
type: 'string',
|
|
9642
|
+
format: 'did',
|
|
9643
|
+
description:
|
|
9644
|
+
'DID of the account making the request (not included for public/unauthenticated queries).',
|
|
9645
|
+
},
|
|
9646
|
+
limit: {
|
|
9647
|
+
type: 'integer',
|
|
9648
|
+
minimum: 1,
|
|
9649
|
+
maximum: 100,
|
|
9650
|
+
default: 25,
|
|
9651
|
+
},
|
|
9652
|
+
cursor: {
|
|
9653
|
+
type: 'string',
|
|
9654
|
+
description:
|
|
9655
|
+
'Optional pagination mechanism; may not necessarily allow scrolling through entire result set.',
|
|
9656
|
+
},
|
|
9657
|
+
},
|
|
9658
|
+
},
|
|
9659
|
+
output: {
|
|
9660
|
+
encoding: 'application/json',
|
|
9661
|
+
schema: {
|
|
9662
|
+
type: 'object',
|
|
9663
|
+
required: ['starterPacks'],
|
|
9664
|
+
properties: {
|
|
9665
|
+
cursor: {
|
|
9666
|
+
type: 'string',
|
|
9667
|
+
},
|
|
9668
|
+
hitsTotal: {
|
|
9669
|
+
type: 'integer',
|
|
9670
|
+
description:
|
|
9671
|
+
'Count of search hits. Optional, may be rounded/truncated, and may not be possible to paginate through all hits.',
|
|
9672
|
+
},
|
|
9673
|
+
starterPacks: {
|
|
9674
|
+
type: 'array',
|
|
9675
|
+
items: {
|
|
9676
|
+
type: 'ref',
|
|
9677
|
+
ref: 'lex:app.bsky.unspecced.defs#skeletonSearchStarterPack',
|
|
9678
|
+
},
|
|
9679
|
+
},
|
|
9680
|
+
},
|
|
9681
|
+
},
|
|
9682
|
+
},
|
|
9683
|
+
errors: [
|
|
9684
|
+
{
|
|
9685
|
+
name: 'BadQueryString',
|
|
9686
|
+
},
|
|
9687
|
+
],
|
|
9688
|
+
},
|
|
9689
|
+
},
|
|
9690
|
+
},
|
|
9529
9691
|
AppBskyVideoDefs: {
|
|
9530
9692
|
lexicon: 1,
|
|
9531
9693
|
id: 'app.bsky.video.defs',
|
|
@@ -10656,6 +10818,7 @@ export const ids = {
|
|
|
10656
10818
|
ComAtprotoSyncNotifyOfUpdate: 'com.atproto.sync.notifyOfUpdate',
|
|
10657
10819
|
ComAtprotoSyncRequestCrawl: 'com.atproto.sync.requestCrawl',
|
|
10658
10820
|
ComAtprotoSyncSubscribeRepos: 'com.atproto.sync.subscribeRepos',
|
|
10821
|
+
ComAtprotoTempAddReservedHandle: 'com.atproto.temp.addReservedHandle',
|
|
10659
10822
|
ComAtprotoTempCheckSignupQueue: 'com.atproto.temp.checkSignupQueue',
|
|
10660
10823
|
ComAtprotoTempFetchLabels: 'com.atproto.temp.fetchLabels',
|
|
10661
10824
|
ComAtprotoTempRequestPhoneVerification:
|
|
@@ -10724,6 +10887,7 @@ export const ids = {
|
|
|
10724
10887
|
AppBskyGraphMuteActor: 'app.bsky.graph.muteActor',
|
|
10725
10888
|
AppBskyGraphMuteActorList: 'app.bsky.graph.muteActorList',
|
|
10726
10889
|
AppBskyGraphMuteThread: 'app.bsky.graph.muteThread',
|
|
10890
|
+
AppBskyGraphSearchStarterPacks: 'app.bsky.graph.searchStarterPacks',
|
|
10727
10891
|
AppBskyGraphStarterpack: 'app.bsky.graph.starterpack',
|
|
10728
10892
|
AppBskyGraphUnmuteActor: 'app.bsky.graph.unmuteActor',
|
|
10729
10893
|
AppBskyGraphUnmuteActorList: 'app.bsky.graph.unmuteActorList',
|
|
@@ -10749,6 +10913,8 @@ export const ids = {
|
|
|
10749
10913
|
AppBskyUnspeccedSearchActorsSkeleton:
|
|
10750
10914
|
'app.bsky.unspecced.searchActorsSkeleton',
|
|
10751
10915
|
AppBskyUnspeccedSearchPostsSkeleton: 'app.bsky.unspecced.searchPostsSkeleton',
|
|
10916
|
+
AppBskyUnspeccedSearchStarterPacksSkeleton:
|
|
10917
|
+
'app.bsky.unspecced.searchStarterPacksSkeleton',
|
|
10752
10918
|
AppBskyVideoDefs: 'app.bsky.video.defs',
|
|
10753
10919
|
AppBskyVideoGetJobStatus: 'app.bsky.video.getJobStatus',
|
|
10754
10920
|
AppBskyVideoGetUploadLimits: 'app.bsky.video.getUploadLimits',
|
|
@@ -332,7 +332,13 @@ export function validateFeedViewPref(v: unknown): ValidationResult {
|
|
|
332
332
|
|
|
333
333
|
export interface ThreadViewPref {
|
|
334
334
|
/** Sorting mode for threads. */
|
|
335
|
-
sort?:
|
|
335
|
+
sort?:
|
|
336
|
+
| 'oldest'
|
|
337
|
+
| 'newest'
|
|
338
|
+
| 'most-likes'
|
|
339
|
+
| 'random'
|
|
340
|
+
| 'hotness'
|
|
341
|
+
| (string & {})
|
|
336
342
|
/** Show followed users at the top of all replies. */
|
|
337
343
|
prioritizeFollowedUsers?: boolean
|
|
338
344
|
[k: string]: unknown
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import express from 'express'
|
|
5
|
+
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
6
|
+
import { lexicons } from '../../../../lexicons'
|
|
7
|
+
import { isObj, hasProp } from '../../../../util'
|
|
8
|
+
import { CID } from 'multiformats/cid'
|
|
9
|
+
import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
|
|
10
|
+
import * as AppBskyGraphDefs from './defs'
|
|
11
|
+
|
|
12
|
+
export interface QueryParams {
|
|
13
|
+
/** Search query string. Syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. */
|
|
14
|
+
q: string
|
|
15
|
+
limit: number
|
|
16
|
+
cursor?: string
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export type InputSchema = undefined
|
|
20
|
+
|
|
21
|
+
export interface OutputSchema {
|
|
22
|
+
cursor?: string
|
|
23
|
+
starterPacks: AppBskyGraphDefs.StarterPackViewBasic[]
|
|
24
|
+
[k: string]: unknown
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export type HandlerInput = undefined
|
|
28
|
+
|
|
29
|
+
export interface HandlerSuccess {
|
|
30
|
+
encoding: 'application/json'
|
|
31
|
+
body: OutputSchema
|
|
32
|
+
headers?: { [key: string]: string }
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface HandlerError {
|
|
36
|
+
status: number
|
|
37
|
+
message?: string
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
|
|
41
|
+
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
|
42
|
+
auth: HA
|
|
43
|
+
params: QueryParams
|
|
44
|
+
input: HandlerInput
|
|
45
|
+
req: express.Request
|
|
46
|
+
res: express.Response
|
|
47
|
+
}
|
|
48
|
+
export type Handler<HA extends HandlerAuth = never> = (
|
|
49
|
+
ctx: HandlerReqCtx<HA>,
|
|
50
|
+
) => Promise<HandlerOutput> | HandlerOutput
|
|
@@ -39,3 +39,27 @@ export function isSkeletonSearchActor(v: unknown): v is SkeletonSearchActor {
|
|
|
39
39
|
export function validateSkeletonSearchActor(v: unknown): ValidationResult {
|
|
40
40
|
return lexicons.validate('app.bsky.unspecced.defs#skeletonSearchActor', v)
|
|
41
41
|
}
|
|
42
|
+
|
|
43
|
+
export interface SkeletonSearchStarterPack {
|
|
44
|
+
uri: string
|
|
45
|
+
[k: string]: unknown
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export function isSkeletonSearchStarterPack(
|
|
49
|
+
v: unknown,
|
|
50
|
+
): v is SkeletonSearchStarterPack {
|
|
51
|
+
return (
|
|
52
|
+
isObj(v) &&
|
|
53
|
+
hasProp(v, '$type') &&
|
|
54
|
+
v.$type === 'app.bsky.unspecced.defs#skeletonSearchStarterPack'
|
|
55
|
+
)
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function validateSkeletonSearchStarterPack(
|
|
59
|
+
v: unknown,
|
|
60
|
+
): ValidationResult {
|
|
61
|
+
return lexicons.validate(
|
|
62
|
+
'app.bsky.unspecced.defs#skeletonSearchStarterPack',
|
|
63
|
+
v,
|
|
64
|
+
)
|
|
65
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import express from 'express'
|
|
5
|
+
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
6
|
+
import { lexicons } from '../../../../lexicons'
|
|
7
|
+
import { isObj, hasProp } from '../../../../util'
|
|
8
|
+
import { CID } from 'multiformats/cid'
|
|
9
|
+
import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
|
|
10
|
+
import * as AppBskyUnspeccedDefs from './defs'
|
|
11
|
+
|
|
12
|
+
export interface QueryParams {
|
|
13
|
+
/** Search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. */
|
|
14
|
+
q: string
|
|
15
|
+
/** DID of the account making the request (not included for public/unauthenticated queries). */
|
|
16
|
+
viewer?: string
|
|
17
|
+
limit: number
|
|
18
|
+
/** Optional pagination mechanism; may not necessarily allow scrolling through entire result set. */
|
|
19
|
+
cursor?: string
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export type InputSchema = undefined
|
|
23
|
+
|
|
24
|
+
export interface OutputSchema {
|
|
25
|
+
cursor?: string
|
|
26
|
+
/** Count of search hits. Optional, may be rounded/truncated, and may not be possible to paginate through all hits. */
|
|
27
|
+
hitsTotal?: number
|
|
28
|
+
starterPacks: AppBskyUnspeccedDefs.SkeletonSearchStarterPack[]
|
|
29
|
+
[k: string]: unknown
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export type HandlerInput = undefined
|
|
33
|
+
|
|
34
|
+
export interface HandlerSuccess {
|
|
35
|
+
encoding: 'application/json'
|
|
36
|
+
body: OutputSchema
|
|
37
|
+
headers?: { [key: string]: string }
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export interface HandlerError {
|
|
41
|
+
status: number
|
|
42
|
+
message?: string
|
|
43
|
+
error?: 'BadQueryString'
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
|
|
47
|
+
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
|
48
|
+
auth: HA
|
|
49
|
+
params: QueryParams
|
|
50
|
+
input: HandlerInput
|
|
51
|
+
req: express.Request
|
|
52
|
+
res: express.Response
|
|
53
|
+
}
|
|
54
|
+
export type Handler<HA extends HandlerAuth = never> = (
|
|
55
|
+
ctx: HandlerReqCtx<HA>,
|
|
56
|
+
) => Promise<HandlerOutput> | HandlerOutput
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import express from 'express'
|
|
5
|
+
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
6
|
+
import { lexicons } from '../../../../lexicons'
|
|
7
|
+
import { isObj, hasProp } from '../../../../util'
|
|
8
|
+
import { CID } from 'multiformats/cid'
|
|
9
|
+
import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
|
|
10
|
+
|
|
11
|
+
export interface QueryParams {}
|
|
12
|
+
|
|
13
|
+
export interface InputSchema {
|
|
14
|
+
handle: string
|
|
15
|
+
[k: string]: unknown
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface OutputSchema {
|
|
19
|
+
[k: string]: unknown
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface HandlerInput {
|
|
23
|
+
encoding: 'application/json'
|
|
24
|
+
body: InputSchema
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface HandlerSuccess {
|
|
28
|
+
encoding: 'application/json'
|
|
29
|
+
body: OutputSchema
|
|
30
|
+
headers?: { [key: string]: string }
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export interface HandlerError {
|
|
34
|
+
status: number
|
|
35
|
+
message?: string
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
|
|
39
|
+
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
|
40
|
+
auth: HA
|
|
41
|
+
params: QueryParams
|
|
42
|
+
input: HandlerInput
|
|
43
|
+
req: express.Request
|
|
44
|
+
res: express.Response
|
|
45
|
+
}
|
|
46
|
+
export type Handler<HA extends HandlerAuth = never> = (
|
|
47
|
+
ctx: HandlerReqCtx<HA>,
|
|
48
|
+
) => Promise<HandlerOutput> | HandlerOutput
|
|
@@ -176,6 +176,8 @@ import {
|
|
|
176
176
|
SearchFeedGeneratorsResponse,
|
|
177
177
|
SearchPostsRequest,
|
|
178
178
|
SearchPostsResponse,
|
|
179
|
+
SearchStarterPacksRequest,
|
|
180
|
+
SearchStarterPacksResponse,
|
|
179
181
|
TakedownActorRequest,
|
|
180
182
|
TakedownActorResponse,
|
|
181
183
|
TakedownBlobRequest,
|
|
@@ -819,6 +821,15 @@ export const Service = {
|
|
|
819
821
|
O: SearchPostsResponse,
|
|
820
822
|
kind: MethodKind.Unary,
|
|
821
823
|
},
|
|
824
|
+
/**
|
|
825
|
+
* @generated from rpc bsky.Service.SearchStarterPacks
|
|
826
|
+
*/
|
|
827
|
+
searchStarterPacks: {
|
|
828
|
+
name: 'SearchStarterPacks',
|
|
829
|
+
I: SearchStarterPacksRequest,
|
|
830
|
+
O: SearchStarterPacksResponse,
|
|
831
|
+
kind: MethodKind.Unary,
|
|
832
|
+
},
|
|
822
833
|
/**
|
|
823
834
|
* Suggestions
|
|
824
835
|
*
|