1
0
mirror of https://github.com/vercel/commerce.git synced 2025-07-27 12:11:23 +00:00
Files
.vscode
assets
components
config
framework
bigcommerce
commerce
local
local-old
shopify
swell
api
cart
catalog
checkout
customers
operations
get-page.ts
utils
wishlist
customer.ts
index.ts
auth
cart
common
customer
product
utils
wishlist
.env.template
commerce.config.json
const.ts
fetcher.ts
index.tsx
next.config.js
provider.ts
schema.d.ts
schema.graphql
swell-js.d.ts
types.ts
vendure
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
commerce/framework/swell/api/operations/get-page.ts
2021-03-27 16:06:07 -06:00

26 lines
454 B
TypeScript

import { Page } from '../../schema'
import { SwellConfig, getConfig } from '..'
export type GetPageResult<T extends { page?: any } = { page?: Page }> = T
export type PageVariables = {
id: string
}
async function getPage({
url,
variables,
config,
preview,
}: {
url?: string
variables: PageVariables
config?: SwellConfig
preview?: boolean
}): Promise<GetPageResult> {
config = getConfig(config)
return {}
}
export default getPage