@shopify/ui-extensions 2026.7.0-rc.7 → 2026.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (130) hide show
  1. package/build/cjs/surfaces/checkout/preact/buyer-journey.js +3 -0
  2. package/build/cjs/surfaces/point-of-sale/events.js +1 -1
  3. package/build/esm/surfaces/checkout/preact/buyer-journey.mjs +3 -0
  4. package/build/esm/surfaces/point-of-sale/events.mjs +1 -1
  5. package/build/esnext/surfaces/checkout/preact/buyer-journey.esnext +3 -0
  6. package/build/esnext/surfaces/point-of-sale/events.esnext +1 -1
  7. package/build/ts/surfaces/admin/api/discount-function-settings/launch-options.d.ts +21 -0
  8. package/build/ts/surfaces/admin/api/discount-function-settings/launch-options.d.ts.map +1 -1
  9. package/build/ts/surfaces/admin/api/intents/intents.d.ts +11 -4
  10. package/build/ts/surfaces/admin/api/intents/intents.d.ts.map +1 -1
  11. package/build/ts/surfaces/admin/components/Badge.d.ts +1 -1
  12. package/build/ts/surfaces/admin/components/Button.d.ts +1 -1
  13. package/build/ts/surfaces/admin/components/Clickable.d.ts +7 -7
  14. package/build/ts/surfaces/admin/components/Grid.d.ts +12 -12
  15. package/build/ts/surfaces/admin/components/GridItem.d.ts +7 -7
  16. package/build/ts/surfaces/admin/components/Image.d.ts +7 -7
  17. package/build/ts/surfaces/admin/components/Stack.d.ts +11 -11
  18. package/build/ts/surfaces/admin/components/TextField.d.ts +1 -1
  19. package/build/ts/surfaces/checkout/api/shipping/shipping-option-item.d.ts +5 -0
  20. package/build/ts/surfaces/checkout/api/shipping/shipping-option-item.d.ts.map +1 -1
  21. package/build/ts/surfaces/checkout/api/standard/standard.d.ts +3 -3
  22. package/build/ts/surfaces/checkout/api/standard/standard.d.ts.map +1 -1
  23. package/build/ts/surfaces/checkout/components/Chat.d.ts +101 -3
  24. package/build/ts/surfaces/checkout/preact/buyer-journey.d.ts +3 -0
  25. package/build/ts/surfaces/checkout/preact/buyer-journey.d.ts.map +1 -1
  26. package/build/ts/surfaces/checkout/preact/shipping-option-target.d.ts +3 -0
  27. package/build/ts/surfaces/checkout/preact/shipping-option-target.d.ts.map +1 -1
  28. package/build/ts/surfaces/customer-account/components/Chat.d.ts +101 -3
  29. package/build/ts/surfaces/point-of-sale/api/cart-api/cart-api.d.ts +5 -2
  30. package/build/ts/surfaces/point-of-sale/api/cart-api/cart-api.d.ts.map +1 -1
  31. package/build/ts/surfaces/point-of-sale/api/docs.d.ts +8 -0
  32. package/build/ts/surfaces/point-of-sale/api/docs.d.ts.map +1 -0
  33. package/build/ts/surfaces/point-of-sale/api/print-api/print-api.d.ts +4 -0
  34. package/build/ts/surfaces/point-of-sale/api/print-api/print-api.d.ts.map +1 -1
  35. package/build/ts/surfaces/point-of-sale/api/printing-api/printing-api.d.ts +100 -0
  36. package/build/ts/surfaces/point-of-sale/api/printing-api/printing-api.d.ts.map +1 -0
  37. package/build/ts/surfaces/point-of-sale/api/standard/standard-api.d.ts +2 -1
  38. package/build/ts/surfaces/point-of-sale/api/standard/standard-api.d.ts.map +1 -1
  39. package/build/ts/surfaces/point-of-sale/api.d.ts +3 -1
  40. package/build/ts/surfaces/point-of-sale/api.d.ts.map +1 -1
  41. package/build/ts/surfaces/point-of-sale/components/QrCode.d.ts +1 -1
  42. package/build/ts/surfaces/point-of-sale/components/components-shared.d.ts +1 -1
  43. package/build/ts/surfaces/point-of-sale/components/targets/ReceiptComponents.d.ts +1 -1
  44. package/build/ts/surfaces/point-of-sale/components/targets/StandardComponents.d.ts +1 -1
  45. package/build/ts/surfaces/point-of-sale/components/targets/StandardComponents.d.ts.map +1 -1
  46. package/build/ts/surfaces/point-of-sale/event/data/ExchangeTransactionData.d.ts +2 -1
  47. package/build/ts/surfaces/point-of-sale/event/data/ExchangeTransactionData.d.ts.map +1 -1
  48. package/build/ts/surfaces/point-of-sale/event/data/ReprintReceiptData.d.ts +2 -1
  49. package/build/ts/surfaces/point-of-sale/event/data/ReprintReceiptData.d.ts.map +1 -1
  50. package/build/ts/surfaces/point-of-sale/event/data/ReturnTransactionData.d.ts +2 -1
  51. package/build/ts/surfaces/point-of-sale/event/data/ReturnTransactionData.d.ts.map +1 -1
  52. package/build/ts/surfaces/point-of-sale/event/data/SaleTransactionData.d.ts +2 -1
  53. package/build/ts/surfaces/point-of-sale/event/data/SaleTransactionData.d.ts.map +1 -1
  54. package/build/ts/surfaces/point-of-sale/event/data/TransactionCompleteData.d.ts +2 -18
  55. package/build/ts/surfaces/point-of-sale/event/data/TransactionCompleteData.d.ts.map +1 -1
  56. package/build/ts/surfaces/point-of-sale/event/data.d.ts +1 -3
  57. package/build/ts/surfaces/point-of-sale/event/data.d.ts.map +1 -1
  58. package/build/ts/surfaces/point-of-sale/events/cash-tracking-session-events.d.ts +1 -1
  59. package/build/ts/surfaces/point-of-sale/events/cash-tracking-session-events.d.ts.map +1 -1
  60. package/build/ts/surfaces/point-of-sale/events/transaction-complete-event.d.ts +1 -1
  61. package/build/ts/surfaces/point-of-sale/events/transaction-complete-event.d.ts.map +1 -1
  62. package/build/ts/surfaces/point-of-sale/events.d.ts +7 -1
  63. package/build/ts/surfaces/point-of-sale/events.d.ts.map +1 -1
  64. package/build/ts/surfaces/point-of-sale/extension-targets.d.ts +17 -49
  65. package/build/ts/surfaces/point-of-sale/extension-targets.d.ts.map +1 -1
  66. package/build/ts/surfaces/point-of-sale/targets/pos.cart.line-item-details.action.render.d.ts +0 -1
  67. package/build/ts/surfaces/point-of-sale/targets/pos.customer-details.action.render.d.ts +0 -1
  68. package/build/ts/surfaces/point-of-sale/targets/pos.draft-order-details.action.render.d.ts +0 -1
  69. package/build/ts/surfaces/point-of-sale/targets/pos.exchange.post.action.render.d.ts +0 -1
  70. package/build/ts/surfaces/point-of-sale/targets/pos.home.modal.render.d.ts +0 -1
  71. package/build/ts/surfaces/point-of-sale/targets/pos.order-details.action.render.d.ts +0 -1
  72. package/build/ts/surfaces/point-of-sale/targets/pos.product-details.action.render.d.ts +0 -1
  73. package/build/ts/surfaces/point-of-sale/targets/pos.purchase.post.action.render.d.ts +0 -1
  74. package/build/ts/surfaces/point-of-sale/targets/pos.register-details.action.render.d.ts +0 -1
  75. package/build/ts/surfaces/point-of-sale/targets/pos.return.post.action.render.d.ts +0 -1
  76. package/build/ts/surfaces/point-of-sale/types/base-transaction-complete.d.ts +2 -1
  77. package/build/ts/surfaces/point-of-sale/types/base-transaction-complete.d.ts.map +1 -1
  78. package/build/ts/surfaces/point-of-sale/types/cart.d.ts +14 -0
  79. package/build/ts/surfaces/point-of-sale/types/cart.d.ts.map +1 -1
  80. package/build/tsconfig.tsbuildinfo +1 -1
  81. package/package.json +1 -1
  82. package/src/surfaces/admin/api/discount-function-settings/launch-options.ts +22 -0
  83. package/src/surfaces/admin/api/intents/intents.ts +11 -3
  84. package/src/surfaces/admin/components/Badge.d.ts +1 -1
  85. package/src/surfaces/admin/components/Button.d.ts +1 -1
  86. package/src/surfaces/admin/components/Clickable.d.ts +7 -7
  87. package/src/surfaces/admin/components/Grid.d.ts +12 -12
  88. package/src/surfaces/admin/components/GridItem.d.ts +7 -7
  89. package/src/surfaces/admin/components/Image.d.ts +7 -7
  90. package/src/surfaces/admin/components/Stack.d.ts +11 -11
  91. package/src/surfaces/admin/components/TextField.d.ts +1 -1
  92. package/src/surfaces/admin/components.d.ts +22 -22
  93. package/src/surfaces/checkout/api/shipping/shipping-option-item.ts +5 -0
  94. package/src/surfaces/checkout/api/standard/standard.ts +3 -3
  95. package/src/surfaces/checkout/components/Chat.d.ts +101 -3
  96. package/src/surfaces/checkout/preact/buyer-journey.ts +3 -0
  97. package/src/surfaces/checkout/preact/shipping-option-target.ts +3 -0
  98. package/src/surfaces/point-of-sale/api/cart-api/cart-api.ts +9 -1
  99. package/src/surfaces/point-of-sale/api/docs.ts +11 -0
  100. package/src/surfaces/point-of-sale/api/print-api/print-api.ts +4 -0
  101. package/src/surfaces/point-of-sale/api/printing-api/printing-api.ts +105 -0
  102. package/src/surfaces/point-of-sale/api/standard/standard-api.ts +4 -0
  103. package/src/surfaces/point-of-sale/api.ts +10 -0
  104. package/src/surfaces/point-of-sale/components/QrCode.d.ts +1 -1
  105. package/src/surfaces/point-of-sale/components/components-shared.d.ts +1 -1
  106. package/src/surfaces/point-of-sale/components/targets/ReceiptComponents.ts +1 -1
  107. package/src/surfaces/point-of-sale/components/targets/StandardComponents.ts +0 -2
  108. package/src/surfaces/point-of-sale/components.d.ts +1 -0
  109. package/src/surfaces/point-of-sale/event/data/ExchangeTransactionData.ts +2 -1
  110. package/src/surfaces/point-of-sale/event/data/ReprintReceiptData.ts +2 -1
  111. package/src/surfaces/point-of-sale/event/data/ReturnTransactionData.ts +2 -1
  112. package/src/surfaces/point-of-sale/event/data/SaleTransactionData.ts +2 -1
  113. package/src/surfaces/point-of-sale/event/data/TransactionCompleteData.ts +2 -22
  114. package/src/surfaces/point-of-sale/event/data.ts +1 -11
  115. package/src/surfaces/point-of-sale/events/cash-tracking-session-events.ts +1 -1
  116. package/src/surfaces/point-of-sale/events/transaction-complete-event.ts +1 -1
  117. package/src/surfaces/point-of-sale/events.ts +7 -1
  118. package/src/surfaces/point-of-sale/extension-targets.ts +16 -68
  119. package/src/surfaces/point-of-sale/types/base-transaction-complete.ts +2 -1
  120. package/src/surfaces/point-of-sale/types/cart.ts +15 -0
  121. package/build/ts/surfaces/point-of-sale/event/data/CartUpdateEventData.d.ts +0 -16
  122. package/build/ts/surfaces/point-of-sale/event/data/CartUpdateEventData.d.ts.map +0 -1
  123. package/build/ts/surfaces/point-of-sale/event/data/CashTrackingSessionData.d.ts +0 -51
  124. package/build/ts/surfaces/point-of-sale/event/data/CashTrackingSessionData.d.ts.map +0 -1
  125. package/build/ts/surfaces/point-of-sale/targets/pos.cart-update.event.observe.d.ts +0 -8
  126. package/build/ts/surfaces/point-of-sale/targets/pos.cash-tracking-session-complete.event.observe.d.ts +0 -8
  127. package/build/ts/surfaces/point-of-sale/targets/pos.cash-tracking-session-start.event.observe.d.ts +0 -8
  128. package/build/ts/surfaces/point-of-sale/targets/pos.transaction-complete.event.observe.d.ts +0 -8
  129. package/src/surfaces/point-of-sale/event/data/CartUpdateEventData.ts +0 -16
  130. package/src/surfaces/point-of-sale/event/data/CashTrackingSessionData.ts +0 -52
@@ -5,30 +5,10 @@ import type {ReturnTransactionData} from './ReturnTransactionData';
5
5
  import type {ReprintReceiptData} from './ReprintReceiptData';
6
6
  import {BaseApi} from './BaseApi';
7
7
 
8
- /**
9
- * The data object provided to receipt targets containing transaction details.
10
- * @publicDocs
11
- */
12
- export interface TransactionCompleteData extends BaseData, BaseApi {
13
- /**
14
- * Provides access to persistent local storage methods for your POS UI extension. Use this to store, retrieve, and manage data that persists across sessions.
15
- */
16
- storage: BaseApi['storage'];
17
- /**
18
- * The transaction data, which can be one of the following types:
19
- * - `SaleTransactionData`: Defines the data structure for completed sale transactions.
20
- * - `ReturnTransactionData`: Defines the data structure for completed return transactions.
21
- * - `ExchangeTransactionData`: Defines the data structure for completed exchange transactions.
22
- */
23
- transaction:
24
- | SaleTransactionData
25
- | ReturnTransactionData
26
- | ExchangeTransactionData;
27
- }
28
-
29
8
  /**
30
9
  * The data object provided to receipt targets containing transaction details and reprint information.
31
- * @publicDocs
10
+ *
11
+ * @private
32
12
  */
33
13
  export interface TransactionCompleteWithReprintData extends BaseData, BaseApi {
34
14
  /**
@@ -1,17 +1,7 @@
1
1
  export type {BaseData} from './data/BaseData';
2
2
  export type {BaseApi} from './data/BaseApi';
3
3
  export type {ReprintReceiptData} from './data/ReprintReceiptData';
4
- export type {
5
- TransactionCompleteData,
6
- TransactionCompleteWithReprintData,
7
- } from './data/TransactionCompleteData';
8
- export type {
9
- CashTrackingSessionCompleteData,
10
- CashTrackingSessionStartData,
11
- } from './data/CashTrackingSessionData';
12
-
13
- export type {CartUpdateEventData} from './data/CartUpdateEventData';
14
-
4
+ export type {TransactionCompleteWithReprintData} from './data/TransactionCompleteData';
15
5
  export type {SaleTransactionData} from './data/SaleTransactionData';
16
6
  export type {ReturnTransactionData} from './data/ReturnTransactionData';
17
7
  export type {ExchangeTransactionData} from './data/ExchangeTransactionData';
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Shared fields for every cash tracking session event.
3
3
  */
4
- interface CashTrackingSessionEvent extends Event {
4
+ interface CashTrackingSessionEvent {
5
5
  /** The numeric identifier for the cash tracking session. */
6
6
  readonly id: number;
7
7
  /** ISO 8601 timestamp when the session was opened. */
@@ -8,7 +8,7 @@ import type {TaxLine} from '../types/tax-line';
8
8
  * Shared fields on every transaction-complete event, available regardless of
9
9
  * `transactionType`.
10
10
  */
11
- interface BaseTransactionCompleteEvent extends Event {
11
+ interface BaseTransactionCompleteEvent {
12
12
  /**
13
13
  * The transaction type identifier indicating which kind of transaction was completed (for example, `'Sale'` for new purchases, `'Return'` for refunds, `'Exchange'` for item swaps). Narrow on this field to access transaction-type-specific properties.
14
14
  */
@@ -17,7 +17,7 @@ export const POS_EVENT_NAMES = {
17
17
  } as const;
18
18
 
19
19
  /**
20
- * Maps Shopify POS event names to their corresponding `Event` subclass types.
20
+ * Maps Shopify POS event names to their corresponding payload types.
21
21
  *
22
22
  * Used as the generic type parameter for `shopify.addEventListener` and
23
23
  * `shopify.removeEventListener`.
@@ -25,8 +25,14 @@ export const POS_EVENT_NAMES = {
25
25
  * @publicDocs
26
26
  */
27
27
  export interface ShopifyEventMap {
28
+ /**
29
+ * Dispatched when a sale, return, or exchange transaction completes.
30
+ * Narrow on `transactionType` to access per-type fields.
31
+ */
28
32
  [POS_EVENT_NAMES.TRANSACTION_COMPLETE]: TransactionCompleteEvent;
33
+ /** Dispatched when a cash tracking session opens. */
29
34
  [POS_EVENT_NAMES.CASH_TRACKING_SESSION_START]: CashTrackingSessionStartEvent;
35
+ /** Dispatched when a cash tracking session closes after reconciliation. */
30
36
  [POS_EVENT_NAMES.CASH_TRACKING_SESSION_COMPLETE]: CashTrackingSessionCompleteEvent;
31
37
  }
32
38
 
@@ -1,14 +1,3 @@
1
- import {BaseOutput} from './event/output';
2
- import {
3
- // eslint-disable-next-line import/no-deprecated
4
- CashTrackingSessionStartData,
5
- // eslint-disable-next-line import/no-deprecated
6
- CashTrackingSessionCompleteData,
7
- } from './event/data/CashTrackingSessionData';
8
- import {TransactionCompleteData} from './event/data/TransactionCompleteData';
9
- // eslint-disable-next-line import/no-deprecated
10
- import {CartUpdateEventData} from './event/data/CartUpdateEventData';
11
-
12
1
  import type {RenderExtension, RunnableExtension} from '../../extension';
13
2
 
14
3
  import type {DataTargetApi} from './api/data-target-api/data-target-api';
@@ -33,58 +22,6 @@ import type {ReceiptComponents} from './components/targets/ReceiptComponents';
33
22
  import type {BasicComponents} from './components/targets/BasicComponents';
34
23
  import type {TransactionCompleteWithReprintData} from './event/data';
35
24
 
36
- /**
37
- * @publicDocs
38
- */
39
- export interface EventExtensionTargets {
40
- /**
41
- * Fires when a transaction completes successfully.
42
- *
43
- * @deprecated Deprecated as of version `2026-07`. Use the
44
- * [`pos.app.ready.data` target](/docs/api/pos-ui-extensions/{API_VERSION}/targets/pos-app-ready-data) with
45
- * `shopify.addEventListener('transactioncomplete', callback)` instead.
46
- * @private
47
- */
48
- 'pos.transaction-complete.event.observe': (
49
- data: TransactionCompleteData,
50
- ) => Promise<BaseOutput>;
51
- /**
52
- * Fires when a cash tracking session starts.
53
- *
54
- * @deprecated Deprecated as of version `2026-07`. Use the
55
- * [`pos.app.ready.data` target](/docs/api/pos-ui-extensions/{API_VERSION}/targets/pos-app-ready-data) with
56
- * `shopify.addEventListener('cashtrackingsessionstart', callback)` instead.
57
- * @private
58
- */
59
- 'pos.cash-tracking-session-start.event.observe': (
60
- // eslint-disable-next-line import/no-deprecated
61
- data: CashTrackingSessionStartData,
62
- ) => Promise<BaseOutput>;
63
- /**
64
- * Fires when a cash tracking session completes.
65
- *
66
- * @deprecated Deprecated as of version `2026-07`. Use the
67
- * [`pos.app.ready.data` target](/docs/api/pos-ui-extensions/{API_VERSION}/targets/pos-app-ready-data) with
68
- * `shopify.addEventListener('cashtrackingsessioncomplete', callback)` instead.
69
- * @private
70
- */
71
- 'pos.cash-tracking-session-complete.event.observe': (
72
- // eslint-disable-next-line import/no-deprecated
73
- data: CashTrackingSessionCompleteData,
74
- ) => Promise<BaseOutput>;
75
- /**
76
- * Fires when the cart is updated.
77
- *
78
- * @deprecated Deprecated as of version `2026-07`. Use `api.cart.current.subscribe()` on the
79
- * [`pos.app.ready.data` target](/docs/api/pos-ui-extensions/{API_VERSION}/targets/pos-app-ready-data) instead.
80
- * @private
81
- */
82
- 'pos.cart-update.event.observe': (
83
- // eslint-disable-next-line import/no-deprecated
84
- data: CartUpdateEventData,
85
- ) => Promise<BaseOutput>;
86
- }
87
-
88
25
  /**
89
26
  * @publicDocs
90
27
  */
@@ -126,6 +63,8 @@ export interface RenderExtensionTargets {
126
63
  * Renders a single interactive button component as a menu item in the post-return action menu. Use this target for post-return operations like generating return receipts, processing restocking workflows, or collecting return feedback.
127
64
  *
128
65
  * Extensions at this target can access the order identifier through the Order API to perform return-specific operations. Menu items typically invoke `shopify.action.presentModal()` to launch the companion modal for complete post-return workflows.
66
+ *
67
+ * @private
129
68
  */
130
69
  'pos.return.post.action.menu-item.render': RenderExtension<
131
70
  StandardApi<'pos.return.post.action.menu-item.render'> &
@@ -137,6 +76,8 @@ export interface RenderExtensionTargets {
137
76
  * Renders a full-screen modal interface launched from post-return menu items. Use this target for complex post-return workflows that require forms, multi-step processes, or detailed information displays beyond what a simple button can provide.
138
77
  *
139
78
  * Extensions at this target have access to order data through the Order API and support workflows with multiple screens, navigation, and interactive components.
79
+ *
80
+ * @private
140
81
  */
141
82
  'pos.return.post.action.render': RenderExtension<
142
83
  ActionTargetApi<'pos.return.post.action.render'> & OrderApi,
@@ -146,6 +87,8 @@ export interface RenderExtensionTargets {
146
87
  * Renders a custom information section within the post-return screen. Use this target for displaying supplementary return data like completion status, refund confirmations, or follow-up workflows alongside standard return details.
147
88
  *
148
89
  * Extensions at this target appear as persistent blocks within the post-return interface and support interactive elements that can launch modal workflows using `shopify.action.presentModal()` for more complex post-return operations.
90
+ *
91
+ * @private
149
92
  */
150
93
  'pos.return.post.block.render': RenderExtension<
151
94
  StandardApi<'pos.return.post.block.render'> & OrderApi & ActionApi,
@@ -155,6 +98,8 @@ export interface RenderExtensionTargets {
155
98
  * Renders a single interactive button component as a menu item in the post-exchange action menu. Use this target for post-exchange operations like generating exchange receipts, processing restocking workflows, or collecting exchange feedback.
156
99
  *
157
100
  * Extensions at this target can access the order identifier through the Order API to perform exchange-specific operations. Menu items typically invoke `shopify.action.presentModal()` to launch the companion modal for complete post-exchange workflows.
101
+ *
102
+ * @private
158
103
  */
159
104
  'pos.exchange.post.action.menu-item.render': RenderExtension<
160
105
  StandardApi<'pos.exchange.post.action.menu-item.render'> &
@@ -166,6 +111,8 @@ export interface RenderExtensionTargets {
166
111
  * Renders a full-screen modal interface launched from post-exchange menu items. Use this target for complex post-exchange workflows that require forms, multi-step processes, or detailed information displays beyond what a simple button can provide.
167
112
  *
168
113
  * Extensions at this target have access to order data through the Order API and support workflows with multiple screens, navigation, and interactive components.
114
+ *
115
+ * @private
169
116
  */
170
117
  'pos.exchange.post.action.render': RenderExtension<
171
118
  ActionTargetApi<'pos.exchange.post.action.render'> & OrderApi,
@@ -175,6 +122,8 @@ export interface RenderExtensionTargets {
175
122
  * Renders a custom information section within the post-exchange screen. Use this target for displaying supplementary exchange data like completion status, payment adjustments, or follow-up workflows alongside standard exchange details.
176
123
  *
177
124
  * Extensions at this target appear as persistent blocks within the post-exchange interface and support interactive elements that can launch modal workflows using `shopify.action.presentModal()` for more complex post-exchange operations.
125
+ *
126
+ * @private
178
127
  */
179
128
  'pos.exchange.post.block.render': RenderExtension<
180
129
  StandardApi<'pos.exchange.post.block.render'> & OrderApi & ActionApi,
@@ -373,6 +322,8 @@ export interface RenderExtensionTargets {
373
322
  * Renders a custom section in the footer of printed receipts. Use this target for adding contact details, return policies, social media links, or customer engagement elements like survey links or marketing campaigns at the bottom of receipts.
374
323
  *
375
324
  * Extensions at this target appear in the receipt footer area and support limited components optimized for print formatting, including text content for information display.
325
+ *
326
+ * @private
376
327
  */
377
328
  'pos.receipt-footer.block.render': RenderExtension<
378
329
  {[key: string]: any} & StorageApi & TransactionCompleteWithReprintData,
@@ -382,6 +333,8 @@ export interface RenderExtensionTargets {
382
333
  * Renders a custom section in the header of printed receipts. Use this target for adding custom branding, logos, promotional messages, or store-specific information at the top of receipts.
383
334
  *
384
335
  * Extensions at this target appear in the receipt header area and support limited components optimized for print formatting, including text content for information display.
336
+ *
337
+ * @private
385
338
  */
386
339
  'pos.receipt-header.block.render': RenderExtension<
387
340
  {[key: string]: any} & StorageApi & TransactionCompleteWithReprintData,
@@ -425,17 +378,12 @@ export interface RenderExtensionTargets {
425
378
  */
426
379
  export interface ExtensionTargets
427
380
  extends RenderExtensionTargets,
428
- EventExtensionTargets,
429
381
  DataExtensionTargets {}
430
382
 
431
383
  /**
432
384
  * @publicDocs
433
385
  */
434
386
  export type RenderExtensionTarget = keyof RenderExtensionTargets;
435
- /**
436
- * @publicDocs
437
- */
438
- export type EventExtensionTarget = keyof EventExtensionTargets;
439
387
  /**
440
388
  * @publicDocs
441
389
  */
@@ -7,7 +7,8 @@ import type {TransactionType} from './transaction-type';
7
7
 
8
8
  /**
9
9
  * Base interface for completed transaction data shared across all transaction types.
10
- * @publicDocs
10
+ *
11
+ * @private
11
12
  */
12
13
  export interface BaseTransactionComplete {
13
14
  /**
@@ -199,6 +199,10 @@ export interface LineItemComponent {
199
199
  * An array of tax lines applied to this component.
200
200
  */
201
201
  taxLines: TaxLine[];
202
+ /**
203
+ * An array of discount allocations applied to this component, providing a detailed breakdown of how discounts are distributed across bundle components. Returns `undefined` if no allocations exist.
204
+ */
205
+ discountAllocations?: DiscountAllocation[];
202
206
  /**
203
207
  * The unique numeric identifier for the product variant this component represents, if applicable.
204
208
  */
@@ -259,6 +263,17 @@ export interface Discount {
259
263
  type?: string;
260
264
  }
261
265
 
266
+ /**
267
+ * Optional configuration for `addLineItem`. Lets a single call create a line item and decorate it with line-item properties, avoiding the extra native call and cart sync of a separate `addLineItemProperties` call.
268
+ * @publicDocs
269
+ */
270
+ export interface AddLineItemOptions {
271
+ /**
272
+ * Custom key-value properties to attach to the newly created line item. Equivalent to calling `addLineItemProperties` with the returned `UUID`, but applied in the same operation.
273
+ */
274
+ properties?: Record<string, string>;
275
+ }
276
+
262
277
  /**
263
278
  * Specifies the parameters for adding custom properties to line items. Properties are key-value pairs used for storing metadata, tracking information, or integration data.
264
279
  * @publicDocs
@@ -1,16 +0,0 @@
1
- import { BaseData } from './BaseData';
2
- import { Cart } from '../../api';
3
- import { BaseApi } from './BaseApi';
4
- /**
5
- * The data object provided to cart update extension targets. Contains the current cart state along with device, session, and connectivity information. This data is passed to extensions whenever the cart changes, enabling real-time cart monitoring and cart-based business logic.
6
- * @deprecated Deprecated as of version `2026-07`. Use `api.cart.current.subscribe()` on the
7
- * [`pos.app.ready.data` target](/docs/api/pos-ui-extensions/{API_VERSION}/targets/pos-app-ready-data) instead.
8
- * @private
9
- */
10
- export interface CartUpdateEventData extends BaseData, BaseApi {
11
- /**
12
- * The complete current `Cart` object containing all cart data including line items with products and quantities, pricing totals (subtotal, tax, grand total), associated customer information, applied discounts, custom properties, and editability state. This represents the cart's state at the moment the extension is triggered, reflecting all recent changes. The cart object is read-only in this context—modifications should be made through the Cart API methods.
13
- */
14
- cart: Cart;
15
- }
16
- //# sourceMappingURL=CartUpdateEventData.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CartUpdateEventData.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/point-of-sale/event/data/CartUpdateEventData.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAC;AACpC,OAAO,EAAC,IAAI,EAAC,MAAM,WAAW,CAAC;AAC/B,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAElC;;;;;GAKG;AACH,MAAM,WAAW,mBAAoB,SAAQ,QAAQ,EAAE,OAAO;IAC5D;;OAEG;IACH,IAAI,EAAE,IAAI,CAAC;CACZ"}
@@ -1,51 +0,0 @@
1
- import { BaseData } from './BaseData';
2
- import { BaseApi } from './BaseApi';
3
- /**
4
- * The data object provided to cash tracking session start extension targets. Contains information about a newly opened cash tracking session along with device and session context.
5
- * @deprecated Deprecated as of version `2026-07`. Use `CashTrackingSessionStartEvent` on the
6
- * [`pos.app.ready.data` target](/docs/api/pos-ui-extensions/{API_VERSION}/targets/pos-app-ready-data) with
7
- * `shopify.addEventListener('cashtrackingsessionstart', callback)` instead.
8
- * @private
9
- */
10
- export interface CashTrackingSessionStartData extends BaseData, BaseApi {
11
- /**
12
- * The cash tracking session start data containing the session identifier and the time when the session began. Cash tracking sessions represent the period during which a cash drawer is open and being used for transactions, typically corresponding to a staff member's shift.
13
- */
14
- cashTrackingSessionStart: {
15
- /**
16
- * The unique numeric identifier for this cash tracking session. This ID distinguishes this session from other cash tracking sessions and can be used for session-specific operations, reporting, or linking transactions to sessions. The ID is assigned when the session opens and remains constant until the session closes.
17
- */
18
- id: number;
19
- /**
20
- * The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp when the cash tracking session was opened and cash drawer operations began (for example, `"2024-05-15T09:00:00Z"`). This marks the start of the staff member's shift or cash handling period. Commonly used for calculating session duration, shift reporting, or determining which transactions belong to which session.
21
- */
22
- openingTime: string;
23
- };
24
- }
25
- /**
26
- * The data object provided to cash tracking session complete extension targets. Contains information about a completed cash tracking session including when it opened and closed, along with device and session context.
27
- * @deprecated Deprecated as of version `2026-07`. Use `CashTrackingSessionCompleteEvent` on the
28
- * [`pos.app.ready.data` target](/docs/api/pos-ui-extensions/{API_VERSION}/targets/pos-app-ready-data) with
29
- * `shopify.addEventListener('cashtrackingsessioncomplete', callback)` instead.
30
- * @private
31
- */
32
- export interface CashTrackingSessionCompleteData extends BaseData, BaseApi {
33
- /**
34
- * The cash tracking session complete data containing the session identifier, opening time, and closing time. This represents the full lifecycle of a cash drawer session from opening to closing.
35
- */
36
- cashTrackingSessionComplete: {
37
- /**
38
- * The unique numeric identifier for this cash tracking session. This ID matches the ID from when the session was opened and can be used to correlate session start and end events, retrieve session-specific data, or link all transactions that occurred during this session.
39
- */
40
- id: number;
41
- /**
42
- * The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp when the cash tracking session was opened and began (for example, `"2024-05-15T09:00:00Z"`). This marks the start of the session and can be compared with `closingTime` to calculate the total session duration or shift length.
43
- */
44
- openingTime: string;
45
- /**
46
- * The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp when the cash tracking session was closed and ended (for example, `"2024-05-15T17:30:00Z"`). This marks when the staff member completed their shift, closed out the cash drawer, and finalized the session. The time between `openingTime` and `closingTime` represents the active session duration. Commonly used for shift reporting, calculating hours worked, or determining the timeframe for session-specific transactions.
47
- */
48
- closingTime: string;
49
- };
50
- }
51
- //# sourceMappingURL=CashTrackingSessionData.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CashTrackingSessionData.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/point-of-sale/event/data/CashTrackingSessionData.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAC;AACpC,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAElC;;;;;;GAMG;AACH,MAAM,WAAW,4BAA6B,SAAQ,QAAQ,EAAE,OAAO;IACrE;;OAEG;IACH,wBAAwB,EAAE;QACxB;;WAEG;QACH,EAAE,EAAE,MAAM,CAAC;QACX;;WAEG;QACH,WAAW,EAAE,MAAM,CAAC;KACrB,CAAC;CACH;AAED;;;;;;GAMG;AACH,MAAM,WAAW,+BAAgC,SAAQ,QAAQ,EAAE,OAAO;IACxE;;OAEG;IACH,2BAA2B,EAAE;QAC3B;;WAEG;QACH,EAAE,EAAE,MAAM,CAAC;QACX;;WAEG;QACH,WAAW,EAAE,MAAM,CAAC;QACpB;;WAEG;QACH,WAAW,EAAE,MAAM,CAAC;KACrB,CAAC;CACH"}
@@ -1,8 +0,0 @@
1
- import type { ExtensionTargets } from '../extension-targets';
2
- import '../globals';
3
- export type * from '../events';
4
-
5
- type Target = ExtensionTargets['pos.cart-update.event.observe'];
6
- export type Api = Target['api'];
7
- export type Output = Target['output'];
8
-
@@ -1,8 +0,0 @@
1
- import type { ExtensionTargets } from '../extension-targets';
2
- import '../globals';
3
- export type * from '../events';
4
-
5
- type Target = ExtensionTargets['pos.cash-tracking-session-complete.event.observe'];
6
- export type Api = Target['api'];
7
- export type Output = Target['output'];
8
-
@@ -1,8 +0,0 @@
1
- import type { ExtensionTargets } from '../extension-targets';
2
- import '../globals';
3
- export type * from '../events';
4
-
5
- type Target = ExtensionTargets['pos.cash-tracking-session-start.event.observe'];
6
- export type Api = Target['api'];
7
- export type Output = Target['output'];
8
-
@@ -1,8 +0,0 @@
1
- import type { ExtensionTargets } from '../extension-targets';
2
- import '../globals';
3
- export type * from '../events';
4
-
5
- type Target = ExtensionTargets['pos.transaction-complete.event.observe'];
6
- export type Api = Target['api'];
7
- export type Output = Target['output'];
8
-
@@ -1,16 +0,0 @@
1
- import {BaseData} from './BaseData';
2
- import {Cart} from '../../api';
3
- import {BaseApi} from './BaseApi';
4
-
5
- /**
6
- * The data object provided to cart update extension targets. Contains the current cart state along with device, session, and connectivity information. This data is passed to extensions whenever the cart changes, enabling real-time cart monitoring and cart-based business logic.
7
- * @deprecated Deprecated as of version `2026-07`. Use `api.cart.current.subscribe()` on the
8
- * [`pos.app.ready.data` target](/docs/api/pos-ui-extensions/{API_VERSION}/targets/pos-app-ready-data) instead.
9
- * @private
10
- */
11
- export interface CartUpdateEventData extends BaseData, BaseApi {
12
- /**
13
- * The complete current `Cart` object containing all cart data including line items with products and quantities, pricing totals (subtotal, tax, grand total), associated customer information, applied discounts, custom properties, and editability state. This represents the cart's state at the moment the extension is triggered, reflecting all recent changes. The cart object is read-only in this context—modifications should be made through the Cart API methods.
14
- */
15
- cart: Cart;
16
- }
@@ -1,52 +0,0 @@
1
- import {BaseData} from './BaseData';
2
- import {BaseApi} from './BaseApi';
3
-
4
- /**
5
- * The data object provided to cash tracking session start extension targets. Contains information about a newly opened cash tracking session along with device and session context.
6
- * @deprecated Deprecated as of version `2026-07`. Use `CashTrackingSessionStartEvent` on the
7
- * [`pos.app.ready.data` target](/docs/api/pos-ui-extensions/{API_VERSION}/targets/pos-app-ready-data) with
8
- * `shopify.addEventListener('cashtrackingsessionstart', callback)` instead.
9
- * @private
10
- */
11
- export interface CashTrackingSessionStartData extends BaseData, BaseApi {
12
- /**
13
- * The cash tracking session start data containing the session identifier and the time when the session began. Cash tracking sessions represent the period during which a cash drawer is open and being used for transactions, typically corresponding to a staff member's shift.
14
- */
15
- cashTrackingSessionStart: {
16
- /**
17
- * The unique numeric identifier for this cash tracking session. This ID distinguishes this session from other cash tracking sessions and can be used for session-specific operations, reporting, or linking transactions to sessions. The ID is assigned when the session opens and remains constant until the session closes.
18
- */
19
- id: number;
20
- /**
21
- * The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp when the cash tracking session was opened and cash drawer operations began (for example, `"2024-05-15T09:00:00Z"`). This marks the start of the staff member's shift or cash handling period. Commonly used for calculating session duration, shift reporting, or determining which transactions belong to which session.
22
- */
23
- openingTime: string;
24
- };
25
- }
26
-
27
- /**
28
- * The data object provided to cash tracking session complete extension targets. Contains information about a completed cash tracking session including when it opened and closed, along with device and session context.
29
- * @deprecated Deprecated as of version `2026-07`. Use `CashTrackingSessionCompleteEvent` on the
30
- * [`pos.app.ready.data` target](/docs/api/pos-ui-extensions/{API_VERSION}/targets/pos-app-ready-data) with
31
- * `shopify.addEventListener('cashtrackingsessioncomplete', callback)` instead.
32
- * @private
33
- */
34
- export interface CashTrackingSessionCompleteData extends BaseData, BaseApi {
35
- /**
36
- * The cash tracking session complete data containing the session identifier, opening time, and closing time. This represents the full lifecycle of a cash drawer session from opening to closing.
37
- */
38
- cashTrackingSessionComplete: {
39
- /**
40
- * The unique numeric identifier for this cash tracking session. This ID matches the ID from when the session was opened and can be used to correlate session start and end events, retrieve session-specific data, or link all transactions that occurred during this session.
41
- */
42
- id: number;
43
- /**
44
- * The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp when the cash tracking session was opened and began (for example, `"2024-05-15T09:00:00Z"`). This marks the start of the session and can be compared with `closingTime` to calculate the total session duration or shift length.
45
- */
46
- openingTime: string;
47
- /**
48
- * The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp when the cash tracking session was closed and ended (for example, `"2024-05-15T17:30:00Z"`). This marks when the staff member completed their shift, closed out the cash drawer, and finalized the session. The time between `openingTime` and `closingTime` represents the active session duration. Commonly used for shift reporting, calculating hours worked, or determining the timeframe for session-specific transactions.
49
- */
50
- closingTime: string;
51
- };
52
- }