Return StarterPackView
instead of StarterPackViewBasic
from getSuggestedStarterPacks
(#3706)
This commit is contained in:
parent
a26813da21
commit
04b6230cd2
.changeset
lexicons/app/bsky/unspecced
packages
api/src/client
bsky
src
api/app/bsky/unspecced
lexicon
tests
ozone/src/lexicon
pds/src/lexicon
6
.changeset/little-snakes-repair.md
Normal file
6
.changeset/little-snakes-repair.md
Normal file
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user