mirror of
https://github.com/vercel/commerce.git
synced 2025-09-18 22:00:17 +00:00
.vscode
assets
components
config
framework
bigcommerce
commerce
shopify
swell
vendure
api
auth
cart
common
get-all-pages.ts
get-page.ts
get-site-info.ts
customer
lib
product
scripts
wishlist
README.md
codegen.json
index.tsx
schema.d.ts
schema.graphql
lib
pages
public
.editorconfig
.env.template
.gitignore
.prettierignore
.prettierrc
README.md
codegen.json
commerce.config.json
global.d.ts
license.md
next-env.d.ts
next.config.js
package.json
postcss.config.js
tailwind.config.js
tsconfig.json
yarn.lock
38 lines
837 B
TypeScript
38 lines
837 B
TypeScript
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
|