mirror of
https://github.com/vercel/commerce.git
synced 2025-06-11 02:16:58 +00:00
28 lines
626 B
TypeScript
28 lines
626 B
TypeScript
import type { BigcommerceAPI, Provider } from '..'
|
|
|
|
import createEndpoints from '@vercel/commerce/api/endpoints'
|
|
|
|
import cart from './cart'
|
|
import login from './login'
|
|
import logout from './logout'
|
|
import signup from './signup'
|
|
import checkout from './checkout'
|
|
import customer from './customer'
|
|
import wishlist from './wishlist'
|
|
import products from './catalog/products'
|
|
|
|
const endpoints = {
|
|
cart,
|
|
login,
|
|
logout,
|
|
signup,
|
|
checkout,
|
|
wishlist,
|
|
customer,
|
|
'catalog/products': products,
|
|
}
|
|
|
|
export default function bigcommerceAPI(commerce: BigcommerceAPI) {
|
|
return createEndpoints<Provider>(commerce, endpoints)
|
|
}
|