mirror of
https://github.com/vercel/commerce.git
synced 2025-07-27 12:11:23 +00:00
Create needed files
This commit is contained in:
22
framework/ordercloud/api/operations/get-all-pages.ts
Normal file
22
framework/ordercloud/api/operations/get-all-pages.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import type { OrdercloudConfig } from '../'
|
||||
|
||||
import { GetAllPagesOperation } from '@commerce/types/page'
|
||||
|
||||
export type Page = { url: string }
|
||||
export type GetAllPagesResult = { pages: Page[] }
|
||||
|
||||
export default function getAllPagesOperation() {
|
||||
async function getAllPages<T extends GetAllPagesOperation>({
|
||||
config,
|
||||
preview,
|
||||
}: {
|
||||
url?: string
|
||||
config?: Partial<OrdercloudConfig>
|
||||
preview?: boolean
|
||||
} = {}): Promise<T['data']> {
|
||||
return Promise.resolve({
|
||||
pages: [],
|
||||
})
|
||||
}
|
||||
return getAllPages
|
||||
}
|
Reference in New Issue
Block a user