UNPKG

@apicart/store-sdk

Version:

Apicart SDK for integrating store into any web application

38 lines (23 loc) 1.35 kB
import { CustomerDaoInterface } from './Dao/Customer/CustomerDaoInterface'; import { CartDaoInterface } from './Dao/Cart/CartDaoInterface'; import { OrderDaoInterface } from './Dao/Order/OrderDaoInterface'; import { PaymentMethodDaoInterface } from './Dao/Payment/PaymentMethodDaoInterface'; import PaymentMethod from '../Entity/Payment/PaymentMethod'; import ShippingMethod from '../Entity/Shipping/ShippingMethod'; import { ShippingMethodDaoInterface } from './Dao/Shipping/ShippingMethodDaoInterface'; import Cart from '../Entity/Cart/Cart'; import Customer from '../Entity/Customer/Customer'; interface StoreInterface { createCart(customerHash: string): Promise<CartDaoInterface>; createCustomer(): Promise <CustomerDaoInterface>; getCart(hash: string): Promise <CartDaoInterface>; getCustomer(hash: string): Promise <CustomerDaoInterface>; getOrder(hash: string): OrderDaoInterface; getPaymentMethod(id: number): PaymentMethodDaoInterface; getPaymentMethods(onlyEnabled: boolean, clearCache: boolean): Promise <PaymentMethod[] | null>; getShippingMethod(id: number): ShippingMethodDaoInterface; getShippingMethods(onlyEnabled: boolean, clearCache: boolean): Promise <ShippingMethod[] | null>; saveCart(cartEntity: Cart): Promise <boolean>; saveCustomer(customerEntity: Customer): Promise <boolean>; getToken(): string; }