mirror of
https://github.com/vercel/commerce.git
synced 2025-05-17 15:06:59 +00:00
Refacto config name
This commit is contained in:
parent
b4c088f4ca
commit
8b2c415e1a
@ -1,16 +1,11 @@
|
||||
export type Page = { url: string }
|
||||
export type GetAllPagesResult = { pages: Page[] }
|
||||
import type { LocalConfig } from '../index'
|
||||
import { Page } from '@vercel/commerce/types/page'
|
||||
import type { SyliusConfig } from '../index'
|
||||
|
||||
export default function getAllPagesOperation() {
|
||||
function getAllPages({
|
||||
config,
|
||||
preview,
|
||||
}: {
|
||||
url?: string
|
||||
config?: Partial<LocalConfig>
|
||||
async function getAllPages(opts?: {
|
||||
config?: Partial<SyliusConfig>
|
||||
preview?: boolean
|
||||
}): Promise<GetAllPagesResult> {
|
||||
}): Promise<{ pages: Page[] }> {
|
||||
return Promise.resolve({
|
||||
pages: [],
|
||||
})
|
||||
|
@ -1,4 +1,4 @@
|
||||
import type { LocalConfig } from '../index'
|
||||
import type { SyliusConfig } from '../index'
|
||||
import { Product } from '@vercel/commerce/types/product'
|
||||
import { GetProductOperation } from '@vercel/commerce/types/product'
|
||||
import type { OperationContext } from '@vercel/commerce/api/operations'
|
||||
@ -13,7 +13,7 @@ export default function getProductOperation({
|
||||
}: {
|
||||
query?: string
|
||||
variables?: T['variables']
|
||||
config?: Partial<LocalConfig>
|
||||
config?: Partial<SyliusConfig>
|
||||
preview?: boolean
|
||||
} = {}): Promise<Product | {} | any> {
|
||||
return {
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { OperationContext } from '@vercel/commerce/api/operations'
|
||||
import { Category } from '@vercel/commerce/types/site'
|
||||
import { LocalConfig } from '../index'
|
||||
import { SyliusConfig } from '../index'
|
||||
|
||||
export type GetSiteInfoResult<
|
||||
T extends { categories: any[]; brands: any[] } = {
|
||||
@ -17,7 +17,7 @@ export default function getSiteInfoOperation({}: OperationContext<any>) {
|
||||
}: {
|
||||
query?: string
|
||||
variables?: any
|
||||
config?: Partial<LocalConfig>
|
||||
config?: Partial<SyliusConfig>
|
||||
preview?: boolean
|
||||
} = {}): Promise<GetSiteInfoResult> {
|
||||
return Promise.resolve({
|
||||
|
Loading…
x
Reference in New Issue
Block a user