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 }
|
import { Page } from '@vercel/commerce/types/page'
|
||||||
export type GetAllPagesResult = { pages: Page[] }
|
import type { SyliusConfig } from '../index'
|
||||||
import type { LocalConfig } from '../index'
|
|
||||||
|
|
||||||
export default function getAllPagesOperation() {
|
export default function getAllPagesOperation() {
|
||||||
function getAllPages({
|
async function getAllPages(opts?: {
|
||||||
config,
|
config?: Partial<SyliusConfig>
|
||||||
preview,
|
|
||||||
}: {
|
|
||||||
url?: string
|
|
||||||
config?: Partial<LocalConfig>
|
|
||||||
preview?: boolean
|
preview?: boolean
|
||||||
}): Promise<GetAllPagesResult> {
|
}): Promise<{ pages: Page[] }> {
|
||||||
return Promise.resolve({
|
return Promise.resolve({
|
||||||
pages: [],
|
pages: [],
|
||||||
})
|
})
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import type { LocalConfig } from '../index'
|
import type { SyliusConfig } from '../index'
|
||||||
import { Product } from '@vercel/commerce/types/product'
|
import { Product } from '@vercel/commerce/types/product'
|
||||||
import { GetProductOperation } from '@vercel/commerce/types/product'
|
import { GetProductOperation } from '@vercel/commerce/types/product'
|
||||||
import type { OperationContext } from '@vercel/commerce/api/operations'
|
import type { OperationContext } from '@vercel/commerce/api/operations'
|
||||||
@ -13,7 +13,7 @@ export default function getProductOperation({
|
|||||||
}: {
|
}: {
|
||||||
query?: string
|
query?: string
|
||||||
variables?: T['variables']
|
variables?: T['variables']
|
||||||
config?: Partial<LocalConfig>
|
config?: Partial<SyliusConfig>
|
||||||
preview?: boolean
|
preview?: boolean
|
||||||
} = {}): Promise<Product | {} | any> {
|
} = {}): Promise<Product | {} | any> {
|
||||||
return {
|
return {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { OperationContext } from '@vercel/commerce/api/operations'
|
import { OperationContext } from '@vercel/commerce/api/operations'
|
||||||
import { Category } from '@vercel/commerce/types/site'
|
import { Category } from '@vercel/commerce/types/site'
|
||||||
import { LocalConfig } from '../index'
|
import { SyliusConfig } from '../index'
|
||||||
|
|
||||||
export type GetSiteInfoResult<
|
export type GetSiteInfoResult<
|
||||||
T extends { categories: any[]; brands: any[] } = {
|
T extends { categories: any[]; brands: any[] } = {
|
||||||
@ -17,7 +17,7 @@ export default function getSiteInfoOperation({}: OperationContext<any>) {
|
|||||||
}: {
|
}: {
|
||||||
query?: string
|
query?: string
|
||||||
variables?: any
|
variables?: any
|
||||||
config?: Partial<LocalConfig>
|
config?: Partial<SyliusConfig>
|
||||||
preview?: boolean
|
preview?: boolean
|
||||||
} = {}): Promise<GetSiteInfoResult> {
|
} = {}): Promise<GetSiteInfoResult> {
|
||||||
return Promise.resolve({
|
return Promise.resolve({
|
||||||
|
Loading…
x
Reference in New Issue
Block a user