@atproto/bsky 0.0.94 → 0.0.95
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 +7 -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 +7 -0
- 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 +17817 -7728
- package/dist/lexicon/lexicons.d.ts.map +1 -1
- package/dist/lexicon/lexicons.js +153 -0
- package/dist/lexicon/lexicons.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 +10 -0
- package/src/lexicon/index.ts +36 -0
- package/src/lexicon/lexicons.ts +163 -2
- 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,6 +85,7 @@ 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)
|
|
@@ -96,6 +98,13 @@ export class LabelHydrator {
|
|
|
96
98
|
) {
|
|
97
99
|
entry.isTakendown = true
|
|
98
100
|
}
|
|
101
|
+
if (
|
|
102
|
+
label.val === NEEDS_REVIEW_LABEL &&
|
|
103
|
+
!label.neg &&
|
|
104
|
+
labelers.redact.has(label.src)
|
|
105
|
+
) {
|
|
106
|
+
entry.needsReview = true
|
|
107
|
+
}
|
|
99
108
|
return acc
|
|
100
109
|
}, new Labels())
|
|
101
110
|
}
|
|
@@ -147,3 +156,4 @@ const labelerDidToUri = (did: string): string => {
|
|
|
147
156
|
}
|
|
148
157
|
|
|
149
158
|
const TAKEDOWN_LABELS = ['!takedown', '!suspend']
|
|
159
|
+
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',
|
|
@@ -8488,6 +8517,56 @@ export const schemaDict = {
|
|
|
8488
8517
|
},
|
|
8489
8518
|
},
|
|
8490
8519
|
},
|
|
8520
|
+
AppBskyGraphSearchStarterPacks: {
|
|
8521
|
+
lexicon: 1,
|
|
8522
|
+
id: 'app.bsky.graph.searchStarterPacks',
|
|
8523
|
+
defs: {
|
|
8524
|
+
main: {
|
|
8525
|
+
type: 'query',
|
|
8526
|
+
description:
|
|
8527
|
+
'Find starter packs matching search criteria. Does not require auth.',
|
|
8528
|
+
parameters: {
|
|
8529
|
+
type: 'params',
|
|
8530
|
+
required: ['q'],
|
|
8531
|
+
properties: {
|
|
8532
|
+
q: {
|
|
8533
|
+
type: 'string',
|
|
8534
|
+
description:
|
|
8535
|
+
'Search query string. Syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended.',
|
|
8536
|
+
},
|
|
8537
|
+
limit: {
|
|
8538
|
+
type: 'integer',
|
|
8539
|
+
minimum: 1,
|
|
8540
|
+
maximum: 100,
|
|
8541
|
+
default: 25,
|
|
8542
|
+
},
|
|
8543
|
+
cursor: {
|
|
8544
|
+
type: 'string',
|
|
8545
|
+
},
|
|
8546
|
+
},
|
|
8547
|
+
},
|
|
8548
|
+
output: {
|
|
8549
|
+
encoding: 'application/json',
|
|
8550
|
+
schema: {
|
|
8551
|
+
type: 'object',
|
|
8552
|
+
required: ['starterPacks'],
|
|
8553
|
+
properties: {
|
|
8554
|
+
cursor: {
|
|
8555
|
+
type: 'string',
|
|
8556
|
+
},
|
|
8557
|
+
starterPacks: {
|
|
8558
|
+
type: 'array',
|
|
8559
|
+
items: {
|
|
8560
|
+
type: 'ref',
|
|
8561
|
+
ref: 'lex:app.bsky.graph.defs#starterPackViewBasic',
|
|
8562
|
+
},
|
|
8563
|
+
},
|
|
8564
|
+
},
|
|
8565
|
+
},
|
|
8566
|
+
},
|
|
8567
|
+
},
|
|
8568
|
+
},
|
|
8569
|
+
},
|
|
8491
8570
|
AppBskyGraphStarterpack: {
|
|
8492
8571
|
lexicon: 1,
|
|
8493
8572
|
id: 'app.bsky.graph.starterpack',
|
|
@@ -9153,6 +9232,16 @@ export const schemaDict = {
|
|
|
9153
9232
|
},
|
|
9154
9233
|
},
|
|
9155
9234
|
},
|
|
9235
|
+
skeletonSearchStarterPack: {
|
|
9236
|
+
type: 'object',
|
|
9237
|
+
required: ['uri'],
|
|
9238
|
+
properties: {
|
|
9239
|
+
uri: {
|
|
9240
|
+
type: 'string',
|
|
9241
|
+
format: 'at-uri',
|
|
9242
|
+
},
|
|
9243
|
+
},
|
|
9244
|
+
},
|
|
9156
9245
|
},
|
|
9157
9246
|
},
|
|
9158
9247
|
AppBskyUnspeccedGetConfig: {
|
|
@@ -9526,6 +9615,73 @@ export const schemaDict = {
|
|
|
9526
9615
|
},
|
|
9527
9616
|
},
|
|
9528
9617
|
},
|
|
9618
|
+
AppBskyUnspeccedSearchStarterPacksSkeleton: {
|
|
9619
|
+
lexicon: 1,
|
|
9620
|
+
id: 'app.bsky.unspecced.searchStarterPacksSkeleton',
|
|
9621
|
+
defs: {
|
|
9622
|
+
main: {
|
|
9623
|
+
type: 'query',
|
|
9624
|
+
description: 'Backend Starter Pack search, returns only skeleton.',
|
|
9625
|
+
parameters: {
|
|
9626
|
+
type: 'params',
|
|
9627
|
+
required: ['q'],
|
|
9628
|
+
properties: {
|
|
9629
|
+
q: {
|
|
9630
|
+
type: 'string',
|
|
9631
|
+
description:
|
|
9632
|
+
'Search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended.',
|
|
9633
|
+
},
|
|
9634
|
+
viewer: {
|
|
9635
|
+
type: 'string',
|
|
9636
|
+
format: 'did',
|
|
9637
|
+
description:
|
|
9638
|
+
'DID of the account making the request (not included for public/unauthenticated queries).',
|
|
9639
|
+
},
|
|
9640
|
+
limit: {
|
|
9641
|
+
type: 'integer',
|
|
9642
|
+
minimum: 1,
|
|
9643
|
+
maximum: 100,
|
|
9644
|
+
default: 25,
|
|
9645
|
+
},
|
|
9646
|
+
cursor: {
|
|
9647
|
+
type: 'string',
|
|
9648
|
+
description:
|
|
9649
|
+
'Optional pagination mechanism; may not necessarily allow scrolling through entire result set.',
|
|
9650
|
+
},
|
|
9651
|
+
},
|
|
9652
|
+
},
|
|
9653
|
+
output: {
|
|
9654
|
+
encoding: 'application/json',
|
|
9655
|
+
schema: {
|
|
9656
|
+
type: 'object',
|
|
9657
|
+
required: ['starterPacks'],
|
|
9658
|
+
properties: {
|
|
9659
|
+
cursor: {
|
|
9660
|
+
type: 'string',
|
|
9661
|
+
},
|
|
9662
|
+
hitsTotal: {
|
|
9663
|
+
type: 'integer',
|
|
9664
|
+
description:
|
|
9665
|
+
'Count of search hits. Optional, may be rounded/truncated, and may not be possible to paginate through all hits.',
|
|
9666
|
+
},
|
|
9667
|
+
starterPacks: {
|
|
9668
|
+
type: 'array',
|
|
9669
|
+
items: {
|
|
9670
|
+
type: 'ref',
|
|
9671
|
+
ref: 'lex:app.bsky.unspecced.defs#skeletonSearchStarterPack',
|
|
9672
|
+
},
|
|
9673
|
+
},
|
|
9674
|
+
},
|
|
9675
|
+
},
|
|
9676
|
+
},
|
|
9677
|
+
errors: [
|
|
9678
|
+
{
|
|
9679
|
+
name: 'BadQueryString',
|
|
9680
|
+
},
|
|
9681
|
+
],
|
|
9682
|
+
},
|
|
9683
|
+
},
|
|
9684
|
+
},
|
|
9529
9685
|
AppBskyVideoDefs: {
|
|
9530
9686
|
lexicon: 1,
|
|
9531
9687
|
id: 'app.bsky.video.defs',
|
|
@@ -10566,8 +10722,9 @@ export const schemaDict = {
|
|
|
10566
10722
|
},
|
|
10567
10723
|
},
|
|
10568
10724
|
},
|
|
10569
|
-
}
|
|
10570
|
-
|
|
10725
|
+
} as const satisfies Record<string, LexiconDoc>
|
|
10726
|
+
|
|
10727
|
+
export const schemas = Object.values(schemaDict)
|
|
10571
10728
|
export const lexicons: Lexicons = new Lexicons(schemas)
|
|
10572
10729
|
export const ids = {
|
|
10573
10730
|
ComAtprotoAdminDefs: 'com.atproto.admin.defs',
|
|
@@ -10656,6 +10813,7 @@ export const ids = {
|
|
|
10656
10813
|
ComAtprotoSyncNotifyOfUpdate: 'com.atproto.sync.notifyOfUpdate',
|
|
10657
10814
|
ComAtprotoSyncRequestCrawl: 'com.atproto.sync.requestCrawl',
|
|
10658
10815
|
ComAtprotoSyncSubscribeRepos: 'com.atproto.sync.subscribeRepos',
|
|
10816
|
+
ComAtprotoTempAddReservedHandle: 'com.atproto.temp.addReservedHandle',
|
|
10659
10817
|
ComAtprotoTempCheckSignupQueue: 'com.atproto.temp.checkSignupQueue',
|
|
10660
10818
|
ComAtprotoTempFetchLabels: 'com.atproto.temp.fetchLabels',
|
|
10661
10819
|
ComAtprotoTempRequestPhoneVerification:
|
|
@@ -10724,6 +10882,7 @@ export const ids = {
|
|
|
10724
10882
|
AppBskyGraphMuteActor: 'app.bsky.graph.muteActor',
|
|
10725
10883
|
AppBskyGraphMuteActorList: 'app.bsky.graph.muteActorList',
|
|
10726
10884
|
AppBskyGraphMuteThread: 'app.bsky.graph.muteThread',
|
|
10885
|
+
AppBskyGraphSearchStarterPacks: 'app.bsky.graph.searchStarterPacks',
|
|
10727
10886
|
AppBskyGraphStarterpack: 'app.bsky.graph.starterpack',
|
|
10728
10887
|
AppBskyGraphUnmuteActor: 'app.bsky.graph.unmuteActor',
|
|
10729
10888
|
AppBskyGraphUnmuteActorList: 'app.bsky.graph.unmuteActorList',
|
|
@@ -10749,6 +10908,8 @@ export const ids = {
|
|
|
10749
10908
|
AppBskyUnspeccedSearchActorsSkeleton:
|
|
10750
10909
|
'app.bsky.unspecced.searchActorsSkeleton',
|
|
10751
10910
|
AppBskyUnspeccedSearchPostsSkeleton: 'app.bsky.unspecced.searchPostsSkeleton',
|
|
10911
|
+
AppBskyUnspeccedSearchStarterPacksSkeleton:
|
|
10912
|
+
'app.bsky.unspecced.searchStarterPacksSkeleton',
|
|
10752
10913
|
AppBskyVideoDefs: 'app.bsky.video.defs',
|
|
10753
10914
|
AppBskyVideoGetJobStatus: 'app.bsky.video.getJobStatus',
|
|
10754
10915
|
AppBskyVideoGetUploadLimits: 'app.bsky.video.getUploadLimits',
|
|
@@ -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
|
*
|