kibo-chandradeeptalaha 0e5c68ef58
Feature/icky 194 (#5)
* folder and env setup

* codegen.json headers removed

* use-cart code flow updated

* use-cart code flow updated

* Implemented get-cart functionality

* removed unused file

* getAnonymousShopperToken function added

* normalization mapping updated

* PR points resolved

* Anonymous shopper token query added

* getAnonymousShopperToken function added

* Anonymous shopper token query added

Co-authored-by: Chandradeepta <43542673+Chandradeepta@users.noreply.github.com>
2021-08-30 10:41:10 -05:00

27 lines
699 B
TypeScript

import { GetAPISchema, createEndpoint } from '@commerce/api'
import cartEndpoint from '@commerce/api/endpoints/cart'
// import type { CartSchema } from '../../../types/cart'
import type { KiboCommerceAPI } from '../..'
import getCart from './get-cart'
// import addItem from './add-item'
// import updateItem from './update-item'
// import removeItem from './remove-item'
export type CartAPI = GetAPISchema<KiboCommerceAPI, any>
export type CartEndpoint = CartAPI['endpoint']
export const handlers: CartEndpoint['handlers'] = {
getCart,
// addItem,
// updateItem,
// removeItem,
}
const cartApi = createEndpoint<CartAPI>({
handler: cartEndpoint,
handlers,
})
export default cartApi