import type { OperationOptions } from '@commerce/api/operations' import type { GetPageOperation } from '@commerce/types/page' import type { SpreeApiConfig } from '..' export type Page = any export type GetPageResult = { page?: Page } export type PageVariables = { id: number } export default function getPageOperation() { async function getPage(opts: { variables: T['variables'] config?: Partial preview?: boolean }): Promise async function getPage( opts: { variables: T['variables'] config?: Partial preview?: boolean } & OperationOptions ): Promise async function getPage({ url, variables, config, preview, }: { url?: string variables: T['variables'] config?: Partial preview?: boolean }): Promise { return Promise.resolve({}) } return getPage }