Return StarterPackView instead of StarterPackViewBasic from getSuggestedStarterPacks ()

This commit is contained in:
Eric Bailey 2025-04-01 15:58:55 -05:00 committed by GitHub
parent a26813da21
commit 04b6230cd2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
13 changed files with 20 additions and 17 deletions
.changeset
lexicons/app/bsky/unspecced
packages
api/src/client
bsky
ozone/src/lexicon
pds/src/lexicon

@ -0,0 +1,6 @@
---
"@atproto/bsky": patch
"@atproto/api": patch
---
Return `StarterPackView` instead of `StarterPackViewBasic` from `getSuggestedStarterPacks`

@ -26,7 +26,7 @@
"type": "array",
"items": {
"type": "ref",
"ref": "app.bsky.graph.defs#starterPackViewBasic"
"ref": "app.bsky.graph.defs#starterPackView"
}
}
}

@ -9912,7 +9912,7 @@ export const schemaDict = {
type: 'array',
items: {
type: 'ref',
ref: 'lex:app.bsky.graph.defs#starterPackViewBasic',
ref: 'lex:app.bsky.graph.defs#starterPackView',
},
},
},

@ -23,7 +23,7 @@ export interface QueryParams {
export type InputSchema = undefined
export interface OutputSchema {
starterPacks: AppBskyGraphDefs.StarterPackViewBasic[]
starterPacks: AppBskyGraphDefs.StarterPackView[]
}
export interface CallOptions {

@ -89,10 +89,7 @@ const hydration = async (
pairs.set(params.viewer, dids)
}
const [starterPacksState, bidirectionalBlocks] = await Promise.all([
ctx.hydrator.hydrateStarterPacksBasic(
skeleton.starterPacks,
params.hydrateCtx,
),
ctx.hydrator.hydrateStarterPacks(skeleton.starterPacks, params.hydrateCtx),
ctx.hydrator.hydrateBidirectionalBlocks(pairs),
])
@ -129,7 +126,7 @@ const presentation = (
return {
starterPacks: mapDefined(skeleton.starterPacks, (uri) =>
ctx.views.starterPackBasic(uri, hydration),
ctx.views.starterPack(uri, hydration),
),
}
}

@ -9912,7 +9912,7 @@ export const schemaDict = {
type: 'array',
items: {
type: 'ref',
ref: 'lex:app.bsky.graph.defs#starterPackViewBasic',
ref: 'lex:app.bsky.graph.defs#starterPackView',
},
},
},

@ -24,7 +24,7 @@ export interface QueryParams {
export type InputSchema = undefined
export interface OutputSchema {
starterPacks: AppBskyGraphDefs.StarterPackViewBasic[]
starterPacks: AppBskyGraphDefs.StarterPackView[]
}
export type HandlerInput = undefined

@ -36,7 +36,7 @@ const users = {
export type Users = typeof users
export type StarterPacks = SeedClient['starterpacks']
export async function trendsSeed(
export async function starterPacksSeed(
sc: SeedClient<TestNetwork | TestNetworkNoAppView>,
) {
const u = structuredClone(users)

@ -9,7 +9,7 @@ import { OutputSchema } from '../../src/lexicon/types/app/bsky/unspecced/getSugg
import {
StarterPacks,
Users,
trendsSeed,
starterPacksSeed,
} from '../seed/get-suggested-starter-packs'
describe('getSuggestedStarterPacks', () => {
@ -34,7 +34,7 @@ describe('getSuggestedStarterPacks', () => {
agent = network.bsky.getClient()
sc = network.getSeedClient()
const result = await trendsSeed(sc)
const result = await starterPacksSeed(sc)
users = result.users
starterpacks = result.starterpacks

@ -9912,7 +9912,7 @@ export const schemaDict = {
type: 'array',
items: {
type: 'ref',
ref: 'lex:app.bsky.graph.defs#starterPackViewBasic',
ref: 'lex:app.bsky.graph.defs#starterPackView',
},
},
},

@ -24,7 +24,7 @@ export interface QueryParams {
export type InputSchema = undefined
export interface OutputSchema {
starterPacks: AppBskyGraphDefs.StarterPackViewBasic[]
starterPacks: AppBskyGraphDefs.StarterPackView[]
}
export type HandlerInput = undefined

@ -9912,7 +9912,7 @@ export const schemaDict = {
type: 'array',
items: {
type: 'ref',
ref: 'lex:app.bsky.graph.defs#starterPackViewBasic',
ref: 'lex:app.bsky.graph.defs#starterPackView',
},
},
},

@ -24,7 +24,7 @@ export interface QueryParams {
export type InputSchema = undefined
export interface OutputSchema {
starterPacks: AppBskyGraphDefs.StarterPackViewBasic[]
starterPacks: AppBskyGraphDefs.StarterPackView[]
}
export type HandlerInput = undefined