@avvyr/storefront-sdk - v0.19.0
    Preparing search index...

    Interface StorefrontCart

    interface StorefrontCart {
        _id?: string;
        appliedDiscountCodes?: AppliedDiscountCode[];
        businessUnitId?: string;
        cartAccessToken?: string;
        consent?: CartConsent | null;
        couponDiscountAmount?: number;
        created?: { date: string };
        currencyCode: string;
        customer?: CartCustomer;
        deliveryType?: "pickup" | "delivery" | null;
        deliveryWarehouseId?: string;
        fullyPaid?: boolean;
        id: string;
        lineItems: CartLineItem[];
        marketId: string;
        metadata?: { key: string; value: string }[];
        orderType: "pointOfSales" | "online" | "phone";
        pickupLocation?: {
            address?: Address;
            pickupId?: string | null;
            type?: "internal" | "external" | null;
        };
        remainingAmount: number;
        shipmentOrders?: CartShipmentOrder[];
        shipmentPreference?: ShipmentPreference
        | null;
        shippingAddress?: Address;
        shippingDetails?: CartShippingDetails;
        shippingLines?: ShippingLine[];
        shortCode?: string;
        status:
            | "open"
            | "awaiting-customer"
            | "awaiting-shipment"
            | "shipped"
            | "completed"
            | "archived"
            | "parked"
            | "shared";
        totalAmountExVat: number;
        totalAmountIncVat: number;
        updated?: { date: string };
        vatAmount: number;
    }
    Index
    _id?: string
    appliedDiscountCodes?: AppliedDiscountCode[]
    businessUnitId?: string
    cartAccessToken?: string

    Only returned once from createCart

    consent?: CartConsent | null

    Cookie consent snapshot, see CartConsent. null/absent = unknown.

    couponDiscountAmount?: number
    created?: { date: string }
    currencyCode: string
    customer?: CartCustomer
    deliveryType?: "pickup" | "delivery" | null

    The coarse choice, matching the cart model's own enum. The fine-grained distinction (in-store pickup, pickup point, home delivery) is carried by the chosen ShippingProduct and derived downstream when the order is created.

    deliveryWarehouseId?: string
    fullyPaid?: boolean
    id: string
    lineItems: CartLineItem[]
    marketId: string
    metadata?: { key: string; value: string }[]

    Key/value pairs the platform stamps on the cart, among them paymentSessionState (read it with paymentSessionState(cart)) and the provider's session ids.

    orderType: "pointOfSales" | "online" | "phone"
    pickupLocation?: {
        address?: Address;
        pickupId?: string | null;
        type?: "internal" | "external" | null;
    }

    Where a pickup happens: "internal" is one of our own locations.

    remainingAmount: number
    shipmentOrders?: CartShipmentOrder[]

    The cart's shipments. Only meaningful to a storefront when shipmentPreference is "split".

    shipmentPreference?: ShipmentPreference | null

    The customer's choice when not everything is in stock, see cart.getShipmentOptions. "split": the cart is split into shipmentOrders, each with its own shipping selection and its own line in shippingLines. null: no choice made, the order ships together.

    shippingAddress?: Address
    shippingDetails?: CartShippingDetails
    shippingLines?: ShippingLine[]

    Every shipping charge on the cart (source of truth for shipping money).

    shortCode?: string
    status:
        | "open"
        | "awaiting-customer"
        | "awaiting-shipment"
        | "shipped"
        | "completed"
        | "archived"
        | "parked"
        | "shared"
    totalAmountExVat: number
    totalAmountIncVat: number
    updated?: { date: string }
    vatAmount: number