Home > widget-integration > CartUpdateRequest

CartUpdateRequest interface

Cart update request for queue management

Used internally to queue cart updates and prevent race conditions.

Signature:

export interface CartUpdateRequest 

Example

const updateRequest: CartUpdateRequest = {
  operation: CartUpdateOperation.CHANGE_QUANTITY,
  productId: '12345',
  quantity: 3,
  timestamp: Date.now()
};

Properties

Property

Modifiers

Type

Description

operation

CartUpdateOperation

Type of update operation

productId?

string

(Optional) Product variant ID

properties?

Record<string, unknown>

(Optional) Item properties

quantity?

number

(Optional) New quantity

timestamp

number

Request timestamp for ordering