Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/vast-planes-flow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@shopify/ui-extensions': minor
---

Adds components to point of sale cart LineItem interface to represent product bundle items.
27 changes: 27 additions & 0 deletions packages/ui-extensions/src/surfaces/point-of-sale/types/cart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,33 @@ export interface LineItem {
* The currently selected selling plan for this line item.
*/
sellingPlan?: SellingPlan;
/**
* Bundle components for this line item. Only present for product bundles.
* Each component represents an individual item within the bundle with its own tax information.
*/
components?: LineItemComponent[];
}

/**
* Represents a component of a product bundle line item.
* Bundle components contain the individual items that make up a bundle,
* each with their own pricing and tax information.
*/
export interface LineItemComponent {
/** The title/name of the component product */
title?: string;
/** The quantity of this component in the bundle */
quantity: number;
/** The price of this component */
price?: number;
/** Whether this component is taxable */
taxable: boolean;
/** Tax lines applied to this component */
taxLines: TaxLine[];
/** The variant ID of this component, if applicable */
variantId?: number;
/** The product ID of this component, if applicable */
productId?: number;
}

/**
Expand Down