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.

77 lines (76 loc) 4.91 kB
import { SaleorState } from "../../state"; import { LocalStorageHandler } from "../../helpers/LocalStorageHandler/LocalStorageHandler"; export declare class LocalStorageManager { private handler; private saleorState; constructor(handler: LocalStorageHandler, saleorState: SaleorState); getHandler: () => LocalStorageHandler; addItemToCart: (variantId: string, quantity: number) => { lines: import("../../helpers").ICheckoutModelLine[]; id?: string | undefined; token?: any; email?: string | undefined; shippingAddress?: import("../../helpers").ICheckoutAddress | null | undefined; billingAddress?: import("../../helpers").ICheckoutAddress | null | undefined; selectedShippingAddressId?: string | undefined; selectedBillingAddressId?: string | undefined; billingAsShipping?: boolean | undefined; promoCodeDiscount?: import("../../helpers").ICheckoutModelPromoCodeDiscount | undefined; availableShippingMethods?: import("../../fragments/gqlTypes/Checkout").Checkout_availableShippingMethods[] | undefined; availablePaymentGateways?: import("../../fragments/gqlTypes/Checkout").Checkout_availablePaymentGateways[] | undefined; shippingMethod?: import("../../helpers").ICheckoutModelShippingMethod | null | undefined; shippingPrice?: import("../../helpers").ITaxedMoney | null | undefined; channel?: string | null | undefined; }; removeItemFromCart: (variantId: string) => { lines: import("../../helpers").ICheckoutModelLine[]; id?: string | undefined; token?: any; email?: string | undefined; shippingAddress?: import("../../helpers").ICheckoutAddress | null | undefined; billingAddress?: import("../../helpers").ICheckoutAddress | null | undefined; selectedShippingAddressId?: string | undefined; selectedBillingAddressId?: string | undefined; billingAsShipping?: boolean | undefined; promoCodeDiscount?: import("../../helpers").ICheckoutModelPromoCodeDiscount | undefined; availableShippingMethods?: import("../../fragments/gqlTypes/Checkout").Checkout_availableShippingMethods[] | undefined; availablePaymentGateways?: import("../../fragments/gqlTypes/Checkout").Checkout_availablePaymentGateways[] | undefined; shippingMethod?: import("../../helpers").ICheckoutModelShippingMethod | null | undefined; shippingPrice?: import("../../helpers").ITaxedMoney | null | undefined; channel?: string | null | undefined; }; subtractItemFromCart: (variantId: string) => { lines: import("../../helpers").ICheckoutModelLine[]; id?: string | undefined; token?: any; email?: string | undefined; shippingAddress?: import("../../helpers").ICheckoutAddress | null | undefined; billingAddress?: import("../../helpers").ICheckoutAddress | null | undefined; selectedShippingAddressId?: string | undefined; selectedBillingAddressId?: string | undefined; billingAsShipping?: boolean | undefined; promoCodeDiscount?: import("../../helpers").ICheckoutModelPromoCodeDiscount | undefined; availableShippingMethods?: import("../../fragments/gqlTypes/Checkout").Checkout_availableShippingMethods[] | undefined; availablePaymentGateways?: import("../../fragments/gqlTypes/Checkout").Checkout_availablePaymentGateways[] | undefined; shippingMethod?: import("../../helpers").ICheckoutModelShippingMethod | null | undefined; shippingPrice?: import("../../helpers").ITaxedMoney | null | undefined; channel?: string | null | undefined; }; updateItemInCart: (variantId: string, quantity: number) => { lines: import("../../helpers").ICheckoutModelLine[]; id?: string | undefined; token?: any; email?: string | undefined; shippingAddress?: import("../../helpers").ICheckoutAddress | null | undefined; billingAddress?: import("../../helpers").ICheckoutAddress | null | undefined; selectedShippingAddressId?: string | undefined; selectedBillingAddressId?: string | undefined; billingAsShipping?: boolean | undefined; promoCodeDiscount?: import("../../helpers").ICheckoutModelPromoCodeDiscount | undefined; availableShippingMethods?: import("../../fragments/gqlTypes/Checkout").Checkout_availableShippingMethods[] | undefined; availablePaymentGateways?: import("../../fragments/gqlTypes/Checkout").Checkout_availablePaymentGateways[] | undefined; shippingMethod?: import("../../helpers").ICheckoutModelShippingMethod | null | undefined; shippingPrice?: import("../../helpers").ITaxedMoney | null | undefined; channel?: string | null | undefined; }; }