Skip to content

Commit 58fef36

Browse files
Adds components to POS cart line item interface
1 parent 678d077 commit 58fef36

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

.changeset/vast-planes-flow.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@shopify/ui-extensions': minor
3+
---
4+
5+
Adds components to point of sale cart LineItem interface to represent product bundle items.

packages/ui-extensions/src/surfaces/point-of-sale/types/cart.ts

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,33 @@ export interface LineItem {
5555
* The currently selected selling plan for this line item.
5656
*/
5757
sellingPlan?: SellingPlan;
58+
/**
59+
* Bundle components for this line item. Only present for product bundles.
60+
* Each component represents an individual item within the bundle with its own tax information.
61+
*/
62+
components?: LineItemComponent[];
63+
}
64+
65+
/**
66+
* Represents a component of a product bundle line item.
67+
* Bundle components contain the individual items that make up a bundle,
68+
* each with their own pricing and tax information.
69+
*/
70+
export interface LineItemComponent {
71+
/** The title/name of the component product */
72+
title?: string;
73+
/** The quantity of this component in the bundle */
74+
quantity: number;
75+
/** The price of this component */
76+
price?: number;
77+
/** Whether this component is taxable */
78+
taxable: boolean;
79+
/** Tax lines applied to this component */
80+
taxLines: TaxLine[];
81+
/** The variant ID of this component, if applicable */
82+
variantId?: number;
83+
/** The product ID of this component, if applicable */
84+
productId?: number;
5885
}
5986

6087
/**

0 commit comments

Comments
 (0)