mirror of
https://github.com/vercel/commerce.git
synced 2025-08-15 05:11:22 +00:00
.vscode
assets
components
config
framework
bigcommerce
commerce
commercejs
commercelayer
api
endpoints
operations
get-all-pages.ts
get-all-product-paths.ts
get-all-products.ts
get-customer-wishlist.ts
get-page.ts
get-product.ts
get-site-info.ts
index.ts
utils
index.ts
auth
cart
customer
product
utils
wishlist
.env.template
README.md
commerce.config.json
const.ts
data.json
fetcher.ts
index.tsx
next.config.js
provider.ts
kibocommerce
local
ordercloud
saleor
shopify
spree
swell
vendure
lib
pages
public
.editorconfig
.env.template
.eslintrc
.gitignore
.prettierignore
.prettierrc
README.md
codegen.bigcommerce.json
codegen.json
commerce.config.json
global.d.ts
license.md
next-env.d.ts
next.config.js
package-lock.json
package.json
postcss.config.js
swell-js.d.ts
tailwind.config.js
tsconfig.json
16 lines
373 B
TypeScript
16 lines
373 B
TypeScript
import data from '../../data.json'
|
|
|
|
export type GetAllProductPathsResult = {
|
|
products: Array<{ path: string }>
|
|
}
|
|
|
|
export default function getAllProductPathsOperation() {
|
|
function getAllProductPaths(): Promise<GetAllProductPathsResult> {
|
|
return Promise.resolve({
|
|
products: data.products.map(({ path }) => ({ path })),
|
|
})
|
|
}
|
|
|
|
return getAllProductPaths
|
|
}
|