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

    Interface AddSetParams

    POST /cart/:cartId/sets: a set from a collection page, added in one request, everything or nothing. items are plain lines; configured option groups in the shape of configured-items. A configured entry without (some of) its selections inherits them from the set's first group of the same profile, and parts of one product in the same choices become one group.

    interface AddSetParams {
        configured?: {
            items: { quantity: number; sku: string }[];
            productId?: string;
            selections?: {
                optionItemCode: string;
                positionCode: string;
                reference?: string;
            }[];
            sku?: string;
        }[];
        items?: { quantity: number; sku: string }[];
        layout?: SetLayout | null;
        name: string;
        sourceSku?: string | null;
        sourceType?: LineSetSourceType | null;
    }

    Hierarchy (View Summary)

    Index
    configured?: {
        items: { quantity: number; sku: string }[];
        productId?: string;
        selections?: {
            optionItemCode: string;
            positionCode: string;
            reference?: string;
        }[];
        sku?: string;
    }[]
    items?: { quantity: number; sku: string }[]
    layout?: SetLayout | null

    The plan a module builder drew (≤ 8 KB as sent). Every part's sku must be a goods line of the set.

    name: string
    sourceSku?: string | null
    sourceType?: LineSetSourceType | null

    Defaults to "collection" when sourceSku is given.