forked from crowetic/commerce
28 lines
485 B
TypeScript
28 lines
485 B
TypeScript
import { ShopifyConfig, getConfig } from '../api'
|
|
import type { Page } from '../types'
|
|
|
|
export type { Page }
|
|
|
|
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?: ShopifyConfig
|
|
preview?: boolean
|
|
}): Promise<GetPageResult> {
|
|
config = getConfig(config)
|
|
return {}
|
|
}
|
|
|
|
export default getPage
|