forked from crowetic/commerce
Type fixes
This commit is contained in:
@@ -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[]
|
||||
|
@@ -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 (
|
||||
|
Reference in New Issue
Block a user