Skip to content

Commit 7072ef3

Browse files
Adds components to POS cart line item interface
1 parent 678d077 commit 7072ef3

File tree

1 file changed

+28
-0
lines changed
  • packages/ui-extensions/src/surfaces/point-of-sale/types

1 file changed

+28
-0
lines changed

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

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import {CountryCode} from './country-code';
22
import {TaxLine} from './tax-line';
33
import {DiscountAllocation} from './discount-allocation';
4+
import {Money} from './money';
45

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

6088
/**

0 commit comments

Comments
 (0)