Minimal list/detail views working with Vendure

This commit is contained in:
Michael Bromley
2021-01-22 20:26:50 +01:00
parent 8fb6c7b206
commit d199e3ef32
78 changed files with 13619 additions and 5 deletions

View File

@@ -0,0 +1,37 @@
import type { RecursivePartial, RecursiveRequired } from '../api/utils/types'
import { VendureConfig, getConfig } from '../api'
import { definitions } from '../api/definitions/store-content'
export type Page = definitions['page_Full']
export type GetAllPagesResult<
T extends { pages: any[] } = { pages: Page[] }
> = T
async function getAllPages(opts?: {
config?: VendureConfig
preview?: boolean
}): Promise<GetAllPagesResult>
async function getAllPages<T extends { pages: any[] }>(opts: {
url: string
config?: VendureConfig
preview?: boolean
}): Promise<GetAllPagesResult<T>>
async function getAllPages({
config,
preview,
}: {
url?: string
config?: VendureConfig
preview?: boolean
} = {}): Promise<GetAllPagesResult> {
config = getConfig(config)
return {
pages: [],
}
}
export default getAllPages