UNPKG

usimple-saleor-sdk

Version:

This package contains all queries and mutations that are used in our sample storefront. It can be used for semi-custom or fully-custom (with ability to extend existing queries) storefront solutions.

34 lines (33 loc) 1.31 kB
import { LocalStorageManager } from "../../data"; import { ErrorListener } from "../../helpers"; import { JobsManager } from "../../jobs"; import { SaleorState } from "../../state"; import { ApolloClientManager } from "../../data/ApolloClientManager"; import { Config } from "../../types"; import { IDiscount, IItems, IShippingPrice, ISubtotalPrice, ITotalPrice } from "./types"; export declare class SaleorCartAPI extends ErrorListener { loaded: boolean; items: IItems; totalPrice: ITotalPrice; subtotalPrice: ISubtotalPrice; shippingPrice: IShippingPrice; discount?: IDiscount; private apolloClientManager; private jobsManager; private localStorageManager; private saleorState; private config; constructor(localStorageManager: LocalStorageManager, apolloClientManager: ApolloClientManager, saleorState: SaleorState, jobsManager: JobsManager, config: Config); addItem: (variantId: string, quantity: number) => Promise<{ pending: boolean; }>; removeItem: (variantId: string) => Promise<{ pending: boolean; }>; subtractItem: (variantId: string) => Promise<{ pending: boolean; }>; updateItem: (variantId: string, quantity: number) => Promise<{ pending: boolean; }>; }