mirror of
https://github.com/vercel/commerce.git
synced 2025-08-16 13:51:24 +00:00
.vscode
assets
components
config
docs
framework
bigcommerce
api
cart
handlers
add-item.ts
get-cart.ts
index.ts
remove-item.ts
update-item.ts
catalog
customers
definitions
endpoints
fragments
utils
wishlist
checkout.ts
index.ts
auth
cart
common
customer
lib
product
scripts
types
wishlist
.env.template
README.md
commerce.config.json
fetcher.ts
index.tsx
next.config.js
provider.ts
schema.d.ts
schema.graphql
commerce
shopify
lib
pages
public
.editorconfig
.env.template
.gitignore
.prettierignore
.prettierrc
README.md
codegen.json
commerce.config.json
global.d.ts
license.md
next-env.d.ts
next.config.js
package.json
postcss.config.js
tailwind.config.js
tsconfig.json
yarn.lock
14 lines
464 B
TypeScript
14 lines
464 B
TypeScript
import type { GetAPISchema } from '@commerce/api'
|
|
import type { CartSchema } from '../../types/cart'
|
|
import type { CommerceAPI } 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<CommerceAPI, CartSchema>
|
|
|
|
export type CartEndpoint = CartAPI['endpoint']
|
|
|
|
export const operations = { getCart, addItem, updateItem, removeItem }
|