4
0
forked from crowetic/commerce

Type fixes

This commit is contained in:
Luis Alvarez
2020-10-11 02:04:26 -05:00
parent f1b9ea605e
commit 6595b3de96
6 changed files with 22 additions and 8 deletions

View File

@@ -35,6 +35,11 @@ export type Cart = {
base_amount: number
discount_amount: number
cart_amount: number
redirect_urls: {
cart_url: string
checkout_url: string
embedded_checkout_url: string
}
line_items: {
custom_items: any[]
digital_items: any[]

View File

@@ -5,8 +5,16 @@ import createApiHandler, {
import isAllowedMethod from './utils/is-allowed-method'
import { BigcommerceApiError } from './utils/errors'
type Body<T> = Partial<T> | undefined
export type Customer = any
export type AddCustomerBody = { item: any }
export type CartHandlers = {
addItem: BigcommerceHandler<Customer, { cartId?: string } & Body<any>>
}
const METHODS = ['POST']
const customersApi: BigcommerceApiHandler<Customer> = async (