@shopify/ui-extensions 2026.1.0-rc.3 → 2026.1.0-rc.5

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 (252) hide show
  1. package/build/cjs/surfaces/point-of-sale/types/storage.js +3 -0
  2. package/build/esm/surfaces/point-of-sale/types/storage.mjs +3 -0
  3. package/build/esnext/surfaces/point-of-sale/types/storage.esnext +3 -0
  4. package/build/ts/shared.d.ts +7 -7
  5. package/build/ts/shared.d.ts.map +1 -1
  6. package/build/ts/surfaces/point-of-sale/api/action-api/action-api.d.ts +3 -5
  7. package/build/ts/surfaces/point-of-sale/api/action-api/action-api.d.ts.map +1 -1
  8. package/build/ts/surfaces/point-of-sale/api/camera-api/camera-api.d.ts +54 -0
  9. package/build/ts/surfaces/point-of-sale/api/camera-api/camera-api.d.ts.map +1 -0
  10. package/build/ts/surfaces/point-of-sale/api/cart-api/cart-api.d.ts +38 -33
  11. package/build/ts/surfaces/point-of-sale/api/cart-api/cart-api.d.ts.map +1 -1
  12. package/build/ts/surfaces/point-of-sale/api/cart-line-item-api/cart-line-item-api.d.ts +2 -2
  13. package/build/ts/surfaces/point-of-sale/api/cash-drawer-api/cash-drawer-api.d.ts +6 -4
  14. package/build/ts/surfaces/point-of-sale/api/cash-drawer-api/cash-drawer-api.d.ts.map +1 -1
  15. package/build/ts/surfaces/point-of-sale/api/connectivity-api/connectivity-api.d.ts +6 -4
  16. package/build/ts/surfaces/point-of-sale/api/connectivity-api/connectivity-api.d.ts.map +1 -1
  17. package/build/ts/surfaces/point-of-sale/api/customer-api/customer-api.d.ts +4 -1
  18. package/build/ts/surfaces/point-of-sale/api/customer-api/customer-api.d.ts.map +1 -1
  19. package/build/ts/surfaces/point-of-sale/api/device-api/device-api.d.ts +4 -4
  20. package/build/ts/surfaces/point-of-sale/api/draft-order-api/draft-order-api.d.ts +6 -3
  21. package/build/ts/surfaces/point-of-sale/api/draft-order-api/draft-order-api.d.ts.map +1 -1
  22. package/build/ts/surfaces/point-of-sale/api/locale-api/locale-api.d.ts +2 -3
  23. package/build/ts/surfaces/point-of-sale/api/locale-api/locale-api.d.ts.map +1 -1
  24. package/build/ts/surfaces/point-of-sale/api/navigation-api/navigation-api.d.ts +17 -9
  25. package/build/ts/surfaces/point-of-sale/api/navigation-api/navigation-api.d.ts.map +1 -1
  26. package/build/ts/surfaces/point-of-sale/api/order-api/order-api.d.ts +5 -5
  27. package/build/ts/surfaces/point-of-sale/api/pin-pad-api.d.ts +6 -10
  28. package/build/ts/surfaces/point-of-sale/api/pin-pad-api.d.ts.map +1 -1
  29. package/build/ts/surfaces/point-of-sale/api/print-api/print-api.d.ts +10 -11
  30. package/build/ts/surfaces/point-of-sale/api/print-api/print-api.d.ts.map +1 -1
  31. package/build/ts/surfaces/point-of-sale/api/product-api/product-api.d.ts +5 -2
  32. package/build/ts/surfaces/point-of-sale/api/product-api/product-api.d.ts.map +1 -1
  33. package/build/ts/surfaces/point-of-sale/api/product-search-api/product-search-api.d.ts +24 -10
  34. package/build/ts/surfaces/point-of-sale/api/product-search-api/product-search-api.d.ts.map +1 -1
  35. package/build/ts/surfaces/point-of-sale/api/scanner-api/scanner-api.d.ts +26 -8
  36. package/build/ts/surfaces/point-of-sale/api/scanner-api/scanner-api.d.ts.map +1 -1
  37. package/build/ts/surfaces/point-of-sale/api/session-api/session-api.d.ts +3 -6
  38. package/build/ts/surfaces/point-of-sale/api/session-api/session-api.d.ts.map +1 -1
  39. package/build/ts/surfaces/point-of-sale/api/standard/standard-api.d.ts +2 -1
  40. package/build/ts/surfaces/point-of-sale/api/standard/standard-api.d.ts.map +1 -1
  41. package/build/ts/surfaces/point-of-sale/api/storage-api/storage-api.d.ts +3 -0
  42. package/build/ts/surfaces/point-of-sale/api/storage-api/storage-api.d.ts.map +1 -1
  43. package/build/ts/surfaces/point-of-sale/api/toast-api/toast-api.d.ts +11 -1
  44. package/build/ts/surfaces/point-of-sale/api/toast-api/toast-api.d.ts.map +1 -1
  45. package/build/ts/surfaces/point-of-sale/api.d.ts +1 -0
  46. package/build/ts/surfaces/point-of-sale/api.d.ts.map +1 -1
  47. package/build/ts/surfaces/point-of-sale/components/Badge/Badge.doc.d.ts.map +1 -1
  48. package/build/ts/surfaces/point-of-sale/components/Badge.d.ts +23 -4
  49. package/build/ts/surfaces/point-of-sale/components/Banner/Banner.doc.d.ts.map +1 -1
  50. package/build/ts/surfaces/point-of-sale/components/Banner.d.ts +24 -6
  51. package/build/ts/surfaces/point-of-sale/components/Box/Box.doc.d.ts.map +1 -1
  52. package/build/ts/surfaces/point-of-sale/components/Box.d.ts +34 -37
  53. package/build/ts/surfaces/point-of-sale/components/Button/Button.doc.d.ts.map +1 -1
  54. package/build/ts/surfaces/point-of-sale/components/Button.d.ts +56 -16
  55. package/build/ts/surfaces/point-of-sale/components/Choice.d.ts +14 -2
  56. package/build/ts/surfaces/point-of-sale/components/ChoiceList/ChoiceList.doc.d.ts.map +1 -1
  57. package/build/ts/surfaces/point-of-sale/components/ChoiceList.d.ts +41 -5
  58. package/build/ts/surfaces/point-of-sale/components/Clickable/Clickable.doc.d.ts.map +1 -1
  59. package/build/ts/surfaces/point-of-sale/components/Clickable.d.ts +40 -4
  60. package/build/ts/surfaces/point-of-sale/components/DateField/DateField.doc.d.ts.map +1 -1
  61. package/build/ts/surfaces/point-of-sale/components/DateField.d.ts +42 -6
  62. package/build/ts/surfaces/point-of-sale/components/DatePicker/DatePicker.doc.d.ts.map +1 -1
  63. package/build/ts/surfaces/point-of-sale/components/DatePicker.d.ts +42 -6
  64. package/build/ts/surfaces/point-of-sale/components/DateSpinner/DateSpinner.doc.d.ts.map +1 -1
  65. package/build/ts/surfaces/point-of-sale/components/DateSpinner.d.ts +42 -6
  66. package/build/ts/surfaces/point-of-sale/components/Divider/Divider.doc.d.ts.map +1 -1
  67. package/build/ts/surfaces/point-of-sale/components/Divider.d.ts +14 -2
  68. package/build/ts/surfaces/point-of-sale/components/EmailField/EmailField.doc.d.ts.map +1 -1
  69. package/build/ts/surfaces/point-of-sale/components/EmailField.d.ts +43 -64
  70. package/build/ts/surfaces/point-of-sale/components/Heading/Heading.doc.d.ts.map +1 -1
  71. package/build/ts/surfaces/point-of-sale/components/Heading.d.ts +15 -3
  72. package/build/ts/surfaces/point-of-sale/components/Icon/Icon.doc.d.ts.map +1 -1
  73. package/build/ts/surfaces/point-of-sale/components/Icon.d.ts +17 -2
  74. package/build/ts/surfaces/point-of-sale/components/Image/Image.doc.d.ts.map +1 -1
  75. package/build/ts/surfaces/point-of-sale/components/Image.d.ts +18 -16
  76. package/build/ts/surfaces/point-of-sale/components/Modal/Modal.doc.d.ts.map +1 -1
  77. package/build/ts/surfaces/point-of-sale/components/Modal.d.ts +43 -11
  78. package/build/ts/surfaces/point-of-sale/components/NumberField/NumberField.doc.d.ts.map +1 -1
  79. package/build/ts/surfaces/point-of-sale/components/NumberField.d.ts +56 -41
  80. package/build/ts/surfaces/point-of-sale/components/Page/Page.doc.d.ts.map +1 -1
  81. package/build/ts/surfaces/point-of-sale/components/Page.d.ts +19 -7
  82. package/build/ts/surfaces/point-of-sale/components/PosBlock/PosBlock.doc.d.ts.map +1 -1
  83. package/build/ts/surfaces/point-of-sale/components/PosBlock.d.ts +16 -4
  84. package/build/ts/surfaces/point-of-sale/components/QrCode.d.ts +14 -2
  85. package/build/ts/surfaces/point-of-sale/components/ScrollBox/ScrollBox.doc.d.ts.map +1 -1
  86. package/build/ts/surfaces/point-of-sale/components/ScrollBox.d.ts +33 -36
  87. package/build/ts/surfaces/point-of-sale/components/SearchField/SearchField.doc.d.ts.map +1 -1
  88. package/build/ts/surfaces/point-of-sale/components/SearchField.d.ts +42 -6
  89. package/build/ts/surfaces/point-of-sale/components/Section/Section.doc.d.ts.map +1 -1
  90. package/build/ts/surfaces/point-of-sale/components/Section.d.ts +17 -7
  91. package/build/ts/surfaces/point-of-sale/components/Stack/Stack.doc.d.ts.map +1 -1
  92. package/build/ts/surfaces/point-of-sale/components/Stack.d.ts +47 -61
  93. package/build/ts/surfaces/point-of-sale/components/Text/Text.doc.d.ts.map +1 -1
  94. package/build/ts/surfaces/point-of-sale/components/Text.d.ts +28 -6
  95. package/build/ts/surfaces/point-of-sale/components/TextArea/TextArea.doc.d.ts.map +1 -1
  96. package/build/ts/surfaces/point-of-sale/components/TextArea.d.ts +5 -12
  97. package/build/ts/surfaces/point-of-sale/components/TextField/TextField.doc.d.ts.map +1 -1
  98. package/build/ts/surfaces/point-of-sale/components/TextField.d.ts +43 -7
  99. package/build/ts/surfaces/point-of-sale/components/Tile/Tile.doc.d.ts.map +1 -1
  100. package/build/ts/surfaces/point-of-sale/components/Tile.d.ts +40 -4
  101. package/build/ts/surfaces/point-of-sale/components/TimeField/TimeField.doc.d.ts.map +1 -1
  102. package/build/ts/surfaces/point-of-sale/components/TimeField.d.ts +42 -6
  103. package/build/ts/surfaces/point-of-sale/components/TimePicker/TimePicker.doc.d.ts.map +1 -1
  104. package/build/ts/surfaces/point-of-sale/components/TimePicker.d.ts +42 -6
  105. package/build/ts/surfaces/point-of-sale/components/components-shared.d.ts +638 -878
  106. package/build/ts/surfaces/point-of-sale/components/targets/StandardComponents.d.ts +1 -1
  107. package/build/ts/surfaces/point-of-sale/components/targets/StandardComponents.d.ts.map +1 -1
  108. package/build/ts/surfaces/point-of-sale/event/data/BaseApi.d.ts +3 -0
  109. package/build/ts/surfaces/point-of-sale/event/data/BaseApi.d.ts.map +1 -1
  110. package/build/ts/surfaces/point-of-sale/event/data/BaseData.d.ts +15 -0
  111. package/build/ts/surfaces/point-of-sale/event/data/BaseData.d.ts.map +1 -1
  112. package/build/ts/surfaces/point-of-sale/event/data/CartUpdateEventData.d.ts +6 -0
  113. package/build/ts/surfaces/point-of-sale/event/data/CartUpdateEventData.d.ts.map +1 -1
  114. package/build/ts/surfaces/point-of-sale/event/data/CashTrackingSessionData.d.ts +27 -0
  115. package/build/ts/surfaces/point-of-sale/event/data/CashTrackingSessionData.d.ts.map +1 -1
  116. package/build/ts/surfaces/point-of-sale/event/data/ExchangeTransactionData.d.ts +18 -0
  117. package/build/ts/surfaces/point-of-sale/event/data/ExchangeTransactionData.d.ts.map +1 -1
  118. package/build/ts/surfaces/point-of-sale/event/data/ReprintReceiptData.d.ts +9 -0
  119. package/build/ts/surfaces/point-of-sale/event/data/ReprintReceiptData.d.ts.map +1 -1
  120. package/build/ts/surfaces/point-of-sale/event/data/ReturnTransactionData.d.ts +18 -0
  121. package/build/ts/surfaces/point-of-sale/event/data/ReturnTransactionData.d.ts.map +1 -1
  122. package/build/ts/surfaces/point-of-sale/event/data/SaleTransactionData.d.ts +12 -0
  123. package/build/ts/surfaces/point-of-sale/event/data/SaleTransactionData.d.ts.map +1 -1
  124. package/build/ts/surfaces/point-of-sale/event/data/TransactionCompleteData.d.ts +27 -0
  125. package/build/ts/surfaces/point-of-sale/event/data/TransactionCompleteData.d.ts.map +1 -1
  126. package/build/ts/surfaces/point-of-sale/event/output/BaseOutput.d.ts +17 -0
  127. package/build/ts/surfaces/point-of-sale/event/output/BaseOutput.d.ts.map +1 -1
  128. package/build/ts/surfaces/point-of-sale/extension-targets.d.ts +150 -0
  129. package/build/ts/surfaces/point-of-sale/extension-targets.d.ts.map +1 -1
  130. package/build/ts/surfaces/point-of-sale/types/base-transaction-complete.d.ts +43 -1
  131. package/build/ts/surfaces/point-of-sale/types/base-transaction-complete.d.ts.map +1 -1
  132. package/build/ts/surfaces/point-of-sale/types/cart.d.ts +227 -31
  133. package/build/ts/surfaces/point-of-sale/types/cart.d.ts.map +1 -1
  134. package/build/ts/surfaces/point-of-sale/types/country-code.d.ts +3 -0
  135. package/build/ts/surfaces/point-of-sale/types/country-code.d.ts.map +1 -1
  136. package/build/ts/surfaces/point-of-sale/types/device.d.ts +6 -3
  137. package/build/ts/surfaces/point-of-sale/types/device.d.ts.map +1 -1
  138. package/build/ts/surfaces/point-of-sale/types/direct-api-request-body.d.ts +3 -3
  139. package/build/ts/surfaces/point-of-sale/types/discount-allocation.d.ts +6 -0
  140. package/build/ts/surfaces/point-of-sale/types/discount-allocation.d.ts.map +1 -1
  141. package/build/ts/surfaces/point-of-sale/types/money.d.ts +18 -0
  142. package/build/ts/surfaces/point-of-sale/types/money.d.ts.map +1 -1
  143. package/build/ts/surfaces/point-of-sale/types/multiple-resource-result.d.ts +1 -2
  144. package/build/ts/surfaces/point-of-sale/types/multiple-resource-result.d.ts.map +1 -1
  145. package/build/ts/surfaces/point-of-sale/types/order.d.ts +18 -0
  146. package/build/ts/surfaces/point-of-sale/types/order.d.ts.map +1 -1
  147. package/build/ts/surfaces/point-of-sale/types/paginated-result.d.ts +2 -3
  148. package/build/ts/surfaces/point-of-sale/types/paginated-result.d.ts.map +1 -1
  149. package/build/ts/surfaces/point-of-sale/types/payment.d.ts +15 -0
  150. package/build/ts/surfaces/point-of-sale/types/payment.d.ts.map +1 -1
  151. package/build/ts/surfaces/point-of-sale/types/pin-pad.d.ts +36 -16
  152. package/build/ts/surfaces/point-of-sale/types/pin-pad.d.ts.map +1 -1
  153. package/build/ts/surfaces/point-of-sale/types/product.d.ts +170 -0
  154. package/build/ts/surfaces/point-of-sale/types/product.d.ts.map +1 -1
  155. package/build/ts/surfaces/point-of-sale/types/session.d.ts +7 -5
  156. package/build/ts/surfaces/point-of-sale/types/session.d.ts.map +1 -1
  157. package/build/ts/surfaces/point-of-sale/types/shipping-line.d.ts +32 -0
  158. package/build/ts/surfaces/point-of-sale/types/shipping-line.d.ts.map +1 -1
  159. package/build/ts/surfaces/point-of-sale/types/storage.d.ts +13 -11
  160. package/build/ts/surfaces/point-of-sale/types/storage.d.ts.map +1 -1
  161. package/build/ts/surfaces/point-of-sale/types/tax-line.d.ts +21 -0
  162. package/build/ts/surfaces/point-of-sale/types/tax-line.d.ts.map +1 -1
  163. package/build/ts/surfaces/point-of-sale/types/transaction-type.d.ts +7 -0
  164. package/build/ts/surfaces/point-of-sale/types/transaction-type.d.ts.map +1 -1
  165. package/build/tsconfig.tsbuildinfo +1 -1
  166. package/package.json +6 -1
  167. package/src/shared.ts +7 -7
  168. package/src/surfaces/point-of-sale/api/action-api/action-api.ts +3 -5
  169. package/src/surfaces/point-of-sale/api/camera-api/camera-api.ts +56 -0
  170. package/src/surfaces/point-of-sale/api/cart-api/cart-api.ts +38 -33
  171. package/src/surfaces/point-of-sale/api/cart-line-item-api/cart-line-item-api.ts +2 -2
  172. package/src/surfaces/point-of-sale/api/cash-drawer-api/cash-drawer-api.ts +6 -4
  173. package/src/surfaces/point-of-sale/api/connectivity-api/connectivity-api.ts +6 -4
  174. package/src/surfaces/point-of-sale/api/customer-api/customer-api.ts +4 -1
  175. package/src/surfaces/point-of-sale/api/device-api/device-api.ts +4 -4
  176. package/src/surfaces/point-of-sale/api/draft-order-api/draft-order-api.ts +6 -3
  177. package/src/surfaces/point-of-sale/api/locale-api/locale-api.ts +2 -3
  178. package/src/surfaces/point-of-sale/api/navigation-api/navigation-api.ts +17 -9
  179. package/src/surfaces/point-of-sale/api/order-api/order-api.ts +5 -5
  180. package/src/surfaces/point-of-sale/api/pin-pad-api.ts +6 -10
  181. package/src/surfaces/point-of-sale/api/print-api/print-api.ts +10 -11
  182. package/src/surfaces/point-of-sale/api/product-api/product-api.ts +5 -2
  183. package/src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts +24 -10
  184. package/src/surfaces/point-of-sale/api/scanner-api/scanner-api.ts +26 -8
  185. package/src/surfaces/point-of-sale/api/session-api/session-api.ts +3 -6
  186. package/src/surfaces/point-of-sale/api/standard/standard-api.ts +3 -1
  187. package/src/surfaces/point-of-sale/api/storage-api/storage-api.ts +3 -0
  188. package/src/surfaces/point-of-sale/api/toast-api/toast-api.ts +11 -1
  189. package/src/surfaces/point-of-sale/api.ts +7 -0
  190. package/src/surfaces/point-of-sale/components/Badge.d.ts +23 -4
  191. package/src/surfaces/point-of-sale/components/Banner.d.ts +24 -6
  192. package/src/surfaces/point-of-sale/components/Box.d.ts +34 -37
  193. package/src/surfaces/point-of-sale/components/Button.d.ts +56 -16
  194. package/src/surfaces/point-of-sale/components/Choice.d.ts +14 -2
  195. package/src/surfaces/point-of-sale/components/ChoiceList.d.ts +41 -5
  196. package/src/surfaces/point-of-sale/components/Clickable.d.ts +40 -4
  197. package/src/surfaces/point-of-sale/components/DateField.d.ts +42 -6
  198. package/src/surfaces/point-of-sale/components/DatePicker.d.ts +42 -6
  199. package/src/surfaces/point-of-sale/components/DateSpinner.d.ts +42 -6
  200. package/src/surfaces/point-of-sale/components/Divider.d.ts +14 -2
  201. package/src/surfaces/point-of-sale/components/EmailField.d.ts +43 -64
  202. package/src/surfaces/point-of-sale/components/Heading.d.ts +15 -3
  203. package/src/surfaces/point-of-sale/components/Icon.d.ts +17 -2
  204. package/src/surfaces/point-of-sale/components/Image.d.ts +18 -16
  205. package/src/surfaces/point-of-sale/components/Modal.d.ts +43 -11
  206. package/src/surfaces/point-of-sale/components/NumberField.d.ts +56 -41
  207. package/src/surfaces/point-of-sale/components/Page.d.ts +19 -7
  208. package/src/surfaces/point-of-sale/components/PosBlock.d.ts +16 -4
  209. package/src/surfaces/point-of-sale/components/QrCode.d.ts +14 -2
  210. package/src/surfaces/point-of-sale/components/ScrollBox.d.ts +33 -36
  211. package/src/surfaces/point-of-sale/components/SearchField.d.ts +42 -6
  212. package/src/surfaces/point-of-sale/components/Section.d.ts +17 -7
  213. package/src/surfaces/point-of-sale/components/Stack.d.ts +47 -61
  214. package/src/surfaces/point-of-sale/components/Text.d.ts +28 -6
  215. package/src/surfaces/point-of-sale/components/TextArea.d.ts +5 -12
  216. package/src/surfaces/point-of-sale/components/TextField.d.ts +43 -7
  217. package/src/surfaces/point-of-sale/components/Tile.d.ts +40 -4
  218. package/src/surfaces/point-of-sale/components/TimeField.d.ts +42 -6
  219. package/src/surfaces/point-of-sale/components/TimePicker.d.ts +42 -6
  220. package/src/surfaces/point-of-sale/components/components-shared.d.ts +638 -878
  221. package/src/surfaces/point-of-sale/components/targets/StandardComponents.ts +0 -1
  222. package/src/surfaces/point-of-sale/components.d.ts +1506 -1537
  223. package/src/surfaces/point-of-sale/event/data/BaseApi.ts +3 -0
  224. package/src/surfaces/point-of-sale/event/data/BaseData.ts +15 -0
  225. package/src/surfaces/point-of-sale/event/data/CartUpdateEventData.ts +6 -0
  226. package/src/surfaces/point-of-sale/event/data/CashTrackingSessionData.ts +27 -0
  227. package/src/surfaces/point-of-sale/event/data/ExchangeTransactionData.ts +18 -0
  228. package/src/surfaces/point-of-sale/event/data/ReprintReceiptData.ts +9 -0
  229. package/src/surfaces/point-of-sale/event/data/ReturnTransactionData.ts +18 -0
  230. package/src/surfaces/point-of-sale/event/data/SaleTransactionData.ts +12 -0
  231. package/src/surfaces/point-of-sale/event/data/TransactionCompleteData.ts +27 -0
  232. package/src/surfaces/point-of-sale/event/output/BaseOutput.ts +17 -0
  233. package/src/surfaces/point-of-sale/extension-targets.ts +150 -0
  234. package/src/surfaces/point-of-sale/types/base-transaction-complete.ts +43 -1
  235. package/src/surfaces/point-of-sale/types/cart.ts +227 -31
  236. package/src/surfaces/point-of-sale/types/country-code.ts +3 -0
  237. package/src/surfaces/point-of-sale/types/device.ts +6 -3
  238. package/src/surfaces/point-of-sale/types/direct-api-request-body.ts +3 -3
  239. package/src/surfaces/point-of-sale/types/discount-allocation.ts +6 -0
  240. package/src/surfaces/point-of-sale/types/money.ts +18 -0
  241. package/src/surfaces/point-of-sale/types/multiple-resource-result.ts +1 -2
  242. package/src/surfaces/point-of-sale/types/order.ts +18 -1
  243. package/src/surfaces/point-of-sale/types/paginated-result.ts +2 -3
  244. package/src/surfaces/point-of-sale/types/payment.ts +16 -0
  245. package/src/surfaces/point-of-sale/types/pin-pad.ts +32 -14
  246. package/src/surfaces/point-of-sale/types/product.ts +170 -0
  247. package/src/surfaces/point-of-sale/types/session.ts +7 -5
  248. package/src/surfaces/point-of-sale/types/shipping-line.ts +32 -0
  249. package/src/surfaces/point-of-sale/types/storage.ts +13 -11
  250. package/src/surfaces/point-of-sale/types/tax-line.ts +21 -0
  251. package/src/surfaces/point-of-sale/types/transaction-type.ts +7 -0
  252. package/src/surfaces/point-of-sale/components/EmailField/examples/accessory-slot.jsx +0 -9
@@ -1,3 +1,6 @@
1
1
  import {StorageApi} from '../../api/storage-api/storage-api';
2
2
 
3
+ /**
4
+ * Base API access provided to extension targets, currently providing access to persistent storage for saving and retrieving extension data across sessions.
5
+ */
3
6
  export type BaseApi = StorageApi;
@@ -1,8 +1,23 @@
1
1
  import type {ConnectivityState, Device, Session} from '../../../point-of-sale';
2
2
 
3
+ /**
4
+ * Base data object provided to all extension targets containing device information, session context, and connectivity state. This data is available at extension initialization and provides essential context about the runtime environment.
5
+ */
3
6
  export interface BaseData {
7
+ /**
8
+ * The current Internet connectivity state of the POS device. Indicates whether the device is connected to or disconnected from the Internet. This state updates in real-time as connectivity changes, allowing extensions to adapt behavior for offline scenarios, show connectivity warnings, or queue operations for when connectivity is restored.
9
+ */
4
10
  connectivity: ConnectivityState;
11
+ /**
12
+ * Comprehensive information about the physical POS device where the extension is currently running. Includes the device name, unique device ID, and form factor information (tablet vs other). This data is static for the session and helps extensions adapt to different device types, log device-specific information, or implement device-based configurations.
13
+ */
5
14
  device: Device;
15
+ /**
16
+ * The [IETF BCP 47](https://en.wikipedia.org/wiki/IETF_language_tag) locale string for the current POS session (for example, `"en-US"`, `"fr-CA"`, `"de-DE"`). This indicates the merchant's language and regional preferences. Commonly used for internationalization (i18n), locale-specific date/time/number formatting, translating UI text, and providing localized content. The locale remains constant for the session and reflects the language selected in POS settings.
17
+ */
6
18
  locale: string;
19
+ /**
20
+ * Comprehensive information about the current POS session including shop ID and domain, authenticated user, pinned staff member, active location, currency settings, and POS version. This session data remains constant for the session duration and provides critical context for business logic, permissions, API authentication, and transaction processing. Session data updates when users switch locations or change pinned staff members.
21
+ */
7
22
  session: Session;
8
23
  }
@@ -2,6 +2,12 @@ import {BaseData} from './BaseData';
2
2
  import {Cart} from '../../api';
3
3
  import {BaseApi} from './BaseApi';
4
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
+ */
5
8
  export interface CartUpdateEventData extends BaseData, BaseApi {
9
+ /**
10
+ * 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.
11
+ */
6
12
  cart: Cart;
7
13
  }
@@ -1,17 +1,44 @@
1
1
  import {BaseData} from './BaseData';
2
2
  import {BaseApi} from './BaseApi';
3
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
+ */
4
7
  export interface CashTrackingSessionStartData extends BaseData, BaseApi {
8
+ /**
9
+ * 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.
10
+ */
5
11
  cashTrackingSessionStart: {
12
+ /**
13
+ * 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.
14
+ */
6
15
  id: number;
16
+ /**
17
+ * 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.
18
+ */
7
19
  openingTime: string;
8
20
  };
9
21
  }
10
22
 
23
+ /**
24
+ * 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.
25
+ */
11
26
  export interface CashTrackingSessionCompleteData extends BaseData, BaseApi {
27
+ /**
28
+ * 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.
29
+ */
12
30
  cashTrackingSessionComplete: {
31
+ /**
32
+ * 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.
33
+ */
13
34
  id: number;
35
+ /**
36
+ * 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.
37
+ */
14
38
  openingTime: string;
39
+ /**
40
+ * 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.
41
+ */
15
42
  closingTime: string;
16
43
  };
17
44
  }
@@ -1,10 +1,28 @@
1
1
  import {BaseTransactionComplete} from '../../types/base-transaction-complete';
2
2
  import {LineItem} from '../../types/cart';
3
3
 
4
+ /**
5
+ * Defines the data structure for completed exchange transactions.
6
+ */
4
7
  export interface ExchangeTransactionData extends BaseTransactionComplete {
8
+ /**
9
+ * The transaction type identifier, always 'Sale' for sale transactions.
10
+ */
5
11
  transactionType: 'Exchange';
12
+ /**
13
+ * The return ID for the completed return transaction.
14
+ */
6
15
  returnId?: number;
16
+ /**
17
+ * The exchange ID if the return is part of an exchange transaction.
18
+ */
7
19
  exchangeId?: number;
20
+ /**
21
+ * An array of line items added to the customer in the exchange.
22
+ */
8
23
  lineItemsAdded: LineItem[];
24
+ /**
25
+ * An array of line items removed from the customer in the exchange.
26
+ */
9
27
  lineItemsRemoved: LineItem[];
10
28
  }
@@ -1,7 +1,16 @@
1
1
  import {BaseTransactionComplete} from '../../types/base-transaction-complete';
2
2
  import {OrderLineItem} from '../../types/order';
3
3
 
4
+ /**
5
+ * Defines the data structure for receipt reprint requests.
6
+ */
4
7
  export interface ReprintReceiptData extends BaseTransactionComplete {
8
+ /**
9
+ * The transaction type identifier, always 'Sale' for sale transactions.
10
+ */
5
11
  transactionType: 'Reprint';
12
+ /**
13
+ * An array of line items included in the sale transaction.
14
+ */
6
15
  lineItems: OrderLineItem[];
7
16
  }
@@ -1,10 +1,28 @@
1
1
  import {BaseTransactionComplete} from '../../types/base-transaction-complete';
2
2
  import {LineItem} from '../../types/cart';
3
3
 
4
+ /**
5
+ * Defines the data structure for completed return transactions.
6
+ */
4
7
  export interface ReturnTransactionData extends BaseTransactionComplete {
8
+ /**
9
+ * The transaction type identifier, always 'Sale' for sale transactions.
10
+ */
5
11
  transactionType: 'Return';
12
+ /**
13
+ * The refund ID if a refund was issued for the return.
14
+ */
6
15
  refundId?: number;
16
+ /**
17
+ * The return ID for the completed return transaction.
18
+ */
7
19
  returnId?: number;
20
+ /**
21
+ * The exchange ID if the return is part of an exchange transaction.
22
+ */
8
23
  exchangeId?: number;
24
+ /**
25
+ * An array of line items included in the sale transaction.
26
+ */
9
27
  lineItems: LineItem[];
10
28
  }
@@ -1,8 +1,20 @@
1
1
  import {BaseTransactionComplete} from '../../types/base-transaction-complete';
2
2
  import {LineItem} from '../../types/cart';
3
3
 
4
+ /**
5
+ * Defines the data structure for completed sale transactions.
6
+ */
4
7
  export interface SaleTransactionData extends BaseTransactionComplete {
8
+ /**
9
+ * The transaction type identifier, always 'Sale' for sale transactions.
10
+ */
5
11
  transactionType: 'Sale';
12
+ /**
13
+ * The UUID of the draft checkout if the sale originated from a draft order.
14
+ */
6
15
  draftCheckoutUuid?: string;
16
+ /**
17
+ * An array of line items included in the sale transaction.
18
+ */
7
19
  lineItems: LineItem[];
8
20
  }
@@ -5,14 +5,41 @@ 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
+ */
8
11
  export interface TransactionCompleteData extends BaseData, BaseApi {
12
+ /**
13
+ * Provides access to persistent local storage methods for your POS UI extension. Use this to store, retrieve, and manage data that persists across sessions.
14
+ */
15
+ storage: BaseApi['storage'];
16
+ /**
17
+ * The transaction data, which can be one of the following types:
18
+ * - `SaleTransactionData`: Defines the data structure for completed sale transactions.
19
+ * - `ReturnTransactionData`: Defines the data structure for completed return transactions.
20
+ * - `ExchangeTransactionData`: Defines the data structure for completed exchange transactions.
21
+ */
9
22
  transaction:
10
23
  | SaleTransactionData
11
24
  | ReturnTransactionData
12
25
  | ExchangeTransactionData;
13
26
  }
14
27
 
28
+ /**
29
+ * The data object provided to receipt targets containing transaction details and reprint information.
30
+ */
15
31
  export interface TransactionCompleteWithReprintData extends BaseData, BaseApi {
32
+ /**
33
+ * Provides access to persistent local storage methods for your POS UI extension. Use this to store, retrieve, and manage data that persists across sessions.
34
+ */
35
+ storage: BaseApi['storage'];
36
+ /**
37
+ * The transaction data, which can be one of the following types:
38
+ * - `SaleTransactionData`: Defines the data structure for completed sale transactions.
39
+ * - `ReturnTransactionData`: Defines the data structure for completed return transactions.
40
+ * - `ExchangeTransactionData`: Defines the data structure for completed exchange transactions.
41
+ * - `ReprintReceiptData`: Defines the data structure for receipt reprint requests.
42
+ */
16
43
  transaction:
17
44
  | SaleTransactionData
18
45
  | ReturnTransactionData
@@ -1,8 +1,25 @@
1
+ /**
2
+ * Represents an error or warning generated during extension execution. Extends the standard JavaScript Error interface with severity level classification.
3
+ */
1
4
  interface ExtensionError extends Error {
5
+ /**
6
+ * The severity level of this error:
7
+ * - `'error'`: A critical error that prevents the extension from completing successfully. Errors typically block the user workflow and require resolution before proceeding.
8
+ * - `'warning'`: A non-critical issue that doesn't prevent extension execution but indicates a problem or unexpected condition. Warnings allow the workflow to continue but should be logged or displayed to users.
9
+ */
2
10
  level: 'error' | 'warning';
11
+ /**
12
+ * The human-readable error message describing what went wrong. This message should be clear and actionable, helping merchants understand the issue and how to resolve it (for example, "Product not found", "Invalid discount code", "Insufficient inventory"). The message may be displayed to users in the POS interface depending on the error severity and context.
13
+ */
3
14
  message: string;
4
15
  }
5
16
 
17
+ /**
18
+ * Base output structure that extensions can return to communicate errors and warnings back to the POS system. Extensions populate this interface when they encounter issues during execution.
19
+ */
6
20
  export interface BaseOutput {
21
+ /**
22
+ * An array of errors or warnings encountered during extension execution. Each error includes a severity level (`'error'` or `'warning'`) and a descriptive message. Multiple errors can be reported simultaneously. Returns `undefined` or empty array when the extension executes successfully without issues. Critical errors may prevent transaction completion, while warnings allow the transaction to proceed but indicate issues that should be addressed.
23
+ */
7
24
  errors?: ExtensionError[];
8
25
  }
@@ -44,56 +44,116 @@ export interface EventExtensionTargets {
44
44
  }
45
45
 
46
46
  export interface RenderExtensionTargets {
47
+ /**
48
+ * Renders a single interactive tile component on the POS home screen's smart grid. The tile appears once during home screen initialization and remains persistent until navigation occurs. Use this target for high-frequency actions, status displays, or entry points to workflows that merchants need daily.
49
+ *
50
+ * Extensions at this target can dynamically update properties like enabled state and badge values in response to cart changes or device conditions. Tiles typically invoke `shopify.action.presentModal()` to launch the companion modal for complete workflows.
51
+ */
47
52
  'pos.home.tile.render': RenderExtension<
48
53
  StandardApi<'pos.home.tile.render'> & ActionApi & CartApi,
49
54
  SmartGridComponents
50
55
  >;
56
+ /**
57
+ * Renders a full-screen modal interface launched from smart grid tiles. The modal appears when users tap a companion tile. Use this target for complete workflow experiences that require more space and functionality than the tile interface provides, such as multi-step processes, detailed information displays, or complex user interactions.
58
+ *
59
+ * Extensions at this target support full navigation hierarchies with multiple screens, scroll views, and interactive components to handle sophisticated workflows.
60
+ */
51
61
  'pos.home.modal.render': RenderExtension<
52
62
  ActionTargetApi<'pos.home.modal.render'> & CartApi,
53
63
  BasicComponents
54
64
  >;
65
+ /**
66
+ * 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.
67
+ *
68
+ * 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.
69
+ */
55
70
  'pos.return.post.action.menu-item.render': RenderExtension<
56
71
  StandardApi<'pos.return.post.action.menu-item.render'> &
57
72
  ActionApi &
58
73
  OrderApi,
59
74
  ActionExtensionComponents
60
75
  >;
76
+ /**
77
+ * 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.
78
+ *
79
+ * Extensions at this target have access to order data through the Order API and support workflows with multiple screens, navigation, and interactive components.
80
+ */
61
81
  'pos.return.post.action.render': RenderExtension<
62
82
  ActionTargetApi<'pos.return.post.action.render'> & OrderApi,
63
83
  BasicComponents
64
84
  >;
85
+ /**
86
+ * 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.
87
+ *
88
+ * 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.
89
+ */
65
90
  'pos.return.post.block.render': RenderExtension<
66
91
  StandardApi<'pos.return.post.block.render'> & OrderApi & ActionApi,
67
92
  BlockExtensionComponents
68
93
  >;
94
+ /**
95
+ * 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.
96
+ *
97
+ * 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.
98
+ */
69
99
  'pos.exchange.post.action.menu-item.render': RenderExtension<
70
100
  StandardApi<'pos.exchange.post.action.menu-item.render'> &
71
101
  ActionApi &
72
102
  OrderApi,
73
103
  ActionExtensionComponents
74
104
  >;
105
+ /**
106
+ * 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.
107
+ *
108
+ * Extensions at this target have access to order data through the Order API and support workflows with multiple screens, navigation, and interactive components.
109
+ */
75
110
  'pos.exchange.post.action.render': RenderExtension<
76
111
  ActionTargetApi<'pos.exchange.post.action.render'> & OrderApi,
77
112
  BasicComponents
78
113
  >;
114
+ /**
115
+ * 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.
116
+ *
117
+ * 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.
118
+ */
79
119
  'pos.exchange.post.block.render': RenderExtension<
80
120
  StandardApi<'pos.exchange.post.block.render'> & OrderApi & ActionApi,
81
121
  BlockExtensionComponents
82
122
  >;
123
+ /**
124
+ * Renders a single interactive button component as a menu item in the post-purchase action menu. Use this target for post-purchase operations like sending receipts, collecting customer feedback, or launching follow-up workflows after completing a sale.
125
+ *
126
+ * Extensions at this target can access the order identifier through the Order API to perform purchase-specific operations. Menu items typically invoke `shopify.action.presentModal()` to launch the companion modal for complete post-purchase workflows.
127
+ */
83
128
  'pos.purchase.post.action.menu-item.render': RenderExtension<
84
129
  StandardApi<'pos.purchase.post.action.menu-item.render'> &
85
130
  ActionApi &
86
131
  OrderApi,
87
132
  ActionExtensionComponents
88
133
  >;
134
+ /**
135
+ * Renders a full-screen modal interface launched from post-purchase menu items. Use this target for complex post-purchase workflows that require forms, multi-step processes, or detailed information displays beyond what a simple button can provide.
136
+ *
137
+ * Extensions at this target have access to order data through the Order API and support workflows with multiple screens, navigation, and interactive components.
138
+ */
89
139
  'pos.purchase.post.action.render': RenderExtension<
90
140
  ActionTargetApi<'pos.purchase.post.action.render'> & OrderApi,
91
141
  BasicComponents
92
142
  >;
143
+ /**
144
+ * Renders a custom information section within the post-purchase screen. Use this target for displaying supplementary purchase data like completion status, customer feedback prompts, or next-step workflows alongside standard purchase details.
145
+ *
146
+ * Extensions at this target appear as persistent blocks within the post-purchase interface and support interactive elements that can launch modal workflows using `shopify.action.presentModal()` for more complex post-purchase operations.
147
+ */
93
148
  'pos.purchase.post.block.render': RenderExtension<
94
149
  StandardApi<'pos.purchase.post.block.render'> & OrderApi & ActionApi,
95
150
  BlockExtensionComponents
96
151
  >;
152
+ /**
153
+ * Renders a single interactive button component as a menu item in the product details action menu. Use this target for product-specific operations like inventory adjustments, product analytics, or integration with external product management systems.
154
+ *
155
+ * Extensions at this target can access the product identifier through the Product API to perform product-specific operations. Menu items typically invoke `shopify.action.presentModal()` to launch the companion modal for complete product workflows.
156
+ */
97
157
  'pos.product-details.action.menu-item.render': RenderExtension<
98
158
  StandardApi<'pos.product-details.action.menu-item.render'> &
99
159
  ActionApi &
@@ -101,10 +161,20 @@ export interface RenderExtensionTargets {
101
161
  ProductApi,
102
162
  ActionExtensionComponents
103
163
  >;
164
+ /**
165
+ * Renders a full-screen modal interface launched from product details menu items. Use this target for complex product workflows that require forms, multi-step processes, or detailed information displays beyond what a simple button can provide.
166
+ *
167
+ * Extensions at this target have access to product and cart data through the Product API and support workflows with multiple screens, navigation, and interactive components.
168
+ */
104
169
  'pos.product-details.action.render': RenderExtension<
105
170
  ActionTargetApi<'pos.product-details.action.render'> & CartApi & ProductApi,
106
171
  BasicComponents
107
172
  >;
173
+ /**
174
+ * Renders a custom information section within the product details screen. Use this target for displaying supplementary product data like detailed specifications, inventory status, or related product recommendations alongside standard product details.
175
+ *
176
+ * Extensions at this target appear as persistent blocks within the product details interface and support interactive elements that can launch modal workflows using `shopify.action.presentModal()` for more complex product operations.
177
+ */
108
178
  'pos.product-details.block.render': RenderExtension<
109
179
  StandardApi<'pos.product-details.block.render'> &
110
180
  CartApi &
@@ -112,6 +182,11 @@ export interface RenderExtensionTargets {
112
182
  ActionApi,
113
183
  BlockExtensionComponents
114
184
  >;
185
+ /**
186
+ * Renders a single interactive button component as a menu item in the order details action menu. Use this target for order-specific operations like reprints, refunds, exchanges, or launching fulfillment workflows.
187
+ *
188
+ * Extensions at this target can access the order identifier through the Order API to perform order-specific operations. Menu items typically invoke `shopify.action.presentModal()` to launch the companion modal for complete order workflows.
189
+ */
115
190
  'pos.order-details.action.menu-item.render': RenderExtension<
116
191
  StandardApi<'pos.order-details.action.menu-item.render'> &
117
192
  ActionApi &
@@ -119,10 +194,20 @@ export interface RenderExtensionTargets {
119
194
  OrderApi,
120
195
  ActionExtensionComponents
121
196
  >;
197
+ /**
198
+ * Renders a full-screen modal interface launched from order details menu items. Use this target for complex order workflows that require forms, multi-step processes, or detailed information displays beyond what a simple button can provide.
199
+ *
200
+ * Extensions at this target have access to order data through the Order API and support workflows with multiple screens, navigation, and interactive components.
201
+ */
122
202
  'pos.order-details.action.render': RenderExtension<
123
203
  ActionTargetApi<'pos.order-details.action.render'> & CartApi & OrderApi,
124
204
  BasicComponents
125
205
  >;
206
+ /**
207
+ * Renders a custom information section within the order details screen. Use this target for displaying supplementary order data like fulfillment status, tracking numbers, or custom order analytics alongside standard order details.
208
+ *
209
+ * Extensions at this target appear as persistent blocks within the order details interface and support interactive elements that can launch modal workflows using `shopify.action.presentModal()` for more complex order operations.
210
+ */
126
211
  'pos.order-details.block.render': RenderExtension<
127
212
  StandardApi<'pos.order-details.block.render'> &
128
213
  CartApi &
@@ -130,6 +215,11 @@ export interface RenderExtensionTargets {
130
215
  ActionApi,
131
216
  BlockExtensionComponents
132
217
  >;
218
+ /**
219
+ * Renders a single interactive button component as a menu item in the draft order details action menu. Use this target for draft order-specific operations like sending invoices, updating payment status, or launching custom workflow processes for pending orders.
220
+ *
221
+ * Extensions at this target can access draft order information including order ID, name, and associated customer through the Draft Order API. Menu items typically invoke `shopify.action.presentModal()` to launch the companion modal for complete draft order workflows.
222
+ */
133
223
  'pos.draft-order-details.action.menu-item.render': RenderExtension<
134
224
  StandardApi<'pos.draft-order-details.action.menu-item.render'> &
135
225
  ActionApi &
@@ -137,12 +227,22 @@ export interface RenderExtensionTargets {
137
227
  DraftOrderApi,
138
228
  ActionExtensionComponents
139
229
  >;
230
+ /**
231
+ * Renders a full-screen modal interface launched from draft order details menu items. Use this target for complex draft order workflows that require forms, multi-step processes, or detailed information displays beyond what a simple button can provide.
232
+ *
233
+ * Extensions at this target have access to draft order data through the Draft Order API and support workflows with multiple screens, navigation, and interactive components.
234
+ */
140
235
  'pos.draft-order-details.action.render': RenderExtension<
141
236
  ActionTargetApi<'pos.draft-order-details.action.render'> &
142
237
  DraftOrderApi &
143
238
  CartApi,
144
239
  BasicComponents
145
240
  >;
241
+ /**
242
+ * Renders a custom information section within the draft order details screen. Use this target for displaying supplementary order information like processing status, payment status, or workflow indicators alongside standard draft order details.
243
+ *
244
+ * Extensions at this target appear as persistent blocks within the draft order interface and support interactive elements that can launch modal workflows using `shopify.action.presentModal()` for more complex draft order operations.
245
+ */
146
246
  'pos.draft-order-details.block.render': RenderExtension<
147
247
  StandardApi<'pos.draft-order-details.block.render'> &
148
248
  ActionApi &
@@ -150,6 +250,11 @@ export interface RenderExtensionTargets {
150
250
  DraftOrderApi,
151
251
  BlockExtensionComponents
152
252
  >;
253
+ /**
254
+ * Renders a single interactive button component as a menu item in the customer details action menu. Use this target for customer-specific operations like applying customer discounts, processing loyalty redemptions, or launching profile update workflows.
255
+ *
256
+ * Extensions at this target can access the customer identifier through the Customer API to perform customer-specific operations. Menu items typically invoke `shopify.action.presentModal()` to launch the companion modal for complete customer workflows.
257
+ */
153
258
  'pos.customer-details.action.menu-item.render': RenderExtension<
154
259
  StandardApi<'pos.customer-details.action.menu-item.render'> &
155
260
  ActionApi &
@@ -157,12 +262,22 @@ export interface RenderExtensionTargets {
157
262
  CustomerApi,
158
263
  ActionExtensionComponents
159
264
  >;
265
+ /**
266
+ * Renders a full-screen modal interface launched from customer details menu items. Use this target for complex customer workflows that require forms, multi-step processes, or detailed information displays beyond what a simple button can provide.
267
+ *
268
+ * Extensions at this target have access to customer data through the Customer API and support workflows with multiple screens, navigation, and interactive components.
269
+ */
160
270
  'pos.customer-details.action.render': RenderExtension<
161
271
  ActionTargetApi<'pos.customer-details.action.render'> &
162
272
  CartApi &
163
273
  CustomerApi,
164
274
  BasicComponents
165
275
  >;
276
+ /**
277
+ * Renders a custom information section within the customer details screen. Use this target for displaying supplementary customer data like loyalty status, points balance, or personalized information alongside standard customer details.
278
+ *
279
+ * Extensions at this target appear as persistent blocks within the customer details interface and support interactive elements that can launch modal workflows using `shopify.action.presentModal()` for more complex customer operations.
280
+ */
166
281
  'pos.customer-details.block.render': RenderExtension<
167
282
  StandardApi<'pos.customer-details.block.render'> &
168
283
  CartApi &
@@ -170,6 +285,11 @@ export interface RenderExtensionTargets {
170
285
  ActionApi,
171
286
  BlockExtensionComponents
172
287
  >;
288
+ /**
289
+ * Renders a single interactive button component as a menu item in the cart line item action menu. Use this target for item-specific operations like applying discounts, adding custom properties, or launching verification workflows for individual cart items.
290
+ *
291
+ * Extensions at this target can access detailed line item information including title, quantity, price, discounts, properties, and product metadata through the Cart Line Item API. Menu items typically invoke `shopify.action.presentModal()` to launch the companion modal for complete workflows.
292
+ */
173
293
  'pos.cart.line-item-details.action.menu-item.render': RenderExtension<
174
294
  StandardApi<'pos.cart.line-item-details.action.menu-item.render'> &
175
295
  ActionApi &
@@ -177,6 +297,11 @@ export interface RenderExtensionTargets {
177
297
  CartLineItemApi,
178
298
  ActionExtensionComponents
179
299
  >;
300
+ /**
301
+ * Renders a full-screen modal interface launched from cart line item menu items. Use this target for complex line item workflows that require forms, multi-step processes, or detailed information displays beyond what a simple button can provide.
302
+ *
303
+ * Extensions at this target have access to detailed line item data through the Cart Line Item API and support workflows with multiple screens, navigation, and interactive components.
304
+ */
180
305
  'pos.cart.line-item-details.action.render': RenderExtension<
181
306
  ActionTargetApi<'pos.cart.line-item-details.action.render'> &
182
307
  ActionApi &
@@ -184,24 +309,49 @@ export interface RenderExtensionTargets {
184
309
  CartLineItemApi,
185
310
  BasicComponents
186
311
  >;
312
+ /**
313
+ * 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.
314
+ *
315
+ * Extensions at this target appear in the receipt footer area and support limited components optimized for print formatting, including text content for information display.
316
+ */
187
317
  'pos.receipt-footer.block.render': RenderExtension<
188
318
  {[key: string]: any} & StorageApi & TransactionCompleteWithReprintData,
189
319
  ReceiptComponents
190
320
  >;
321
+ /**
322
+ * 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.
323
+ *
324
+ * Extensions at this target appear in the receipt header area and support limited components optimized for print formatting, including text content for information display.
325
+ */
191
326
  'pos.receipt-header.block.render': RenderExtension<
192
327
  {[key: string]: any} & StorageApi & TransactionCompleteWithReprintData,
193
328
  ReceiptComponents
194
329
  >;
330
+ /**
331
+ * Renders a single interactive button component as a menu item in the register details action menu. Use this target for register-specific operations like cash drawer management, shift reports, or launching cash reconciliation workflows.
332
+ *
333
+ * Extensions at this target can access cash drawer functionality through the Cash Drawer API to perform register-specific operations. Menu items typically invoke `shopify.action.presentModal()` to launch the companion modal for complete register workflows.
334
+ */
195
335
  'pos.register-details.action.menu-item.render': RenderExtension<
196
336
  StandardApi<'pos.register-details.action.menu-item.render'> &
197
337
  ActionApi &
198
338
  CashDrawerApi,
199
339
  ActionExtensionComponents
200
340
  >;
341
+ /**
342
+ * Renders a full-screen modal interface launched from register details menu items. Use this target for complex register workflows that require forms, multi-step processes, or detailed information displays beyond what a simple button can provide.
343
+ *
344
+ * Extensions at this target have access to cash drawer functionality through the Cash Drawer API and support workflows with multiple screens, navigation, and interactive components.
345
+ */
201
346
  'pos.register-details.action.render': RenderExtension<
202
347
  ActionTargetApi<'pos.register-details.action.render'> & CashDrawerApi,
203
348
  BasicComponents
204
349
  >;
350
+ /**
351
+ * Renders a custom information section within the register details screen. Use this target for displaying supplementary register data like cash drawer status, transaction summaries, or shift analytics alongside standard register details.
352
+ *
353
+ * Extensions at this target appear as persistent blocks within the register details interface and support interactive elements that can launch modal workflows using `shopify.action.presentModal()` for more complex register operations.
354
+ */
205
355
  'pos.register-details.block.render': RenderExtension<
206
356
  StandardApi<'pos.register-details.block.render'> &
207
357
  ActionApi &
@@ -5,18 +5,60 @@ import type {ShippingLine} from './shipping-line';
5
5
  import type {TaxLine} from './tax-line';
6
6
  import type {TransactionType} from './transaction-type';
7
7
 
8
+ /**
9
+ * Base interface for completed transaction data shared across all transaction types.
10
+ */
8
11
  export interface BaseTransactionComplete {
12
+ /**
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, `'Reprint'` for receipt reprints). This determines the transaction's business logic, receipt format, and inventory impact.
14
+ */
9
15
  transactionType: TransactionType;
16
+ /**
17
+ * The unique numeric identifier for the Shopify order created by this transaction. This ID links the POS transaction to the order record in Shopify's system and can be used for order lookups, tracking, and API operations. Returns `undefined` for transactions that don't create orders (for example, reprints) or when order creation is pending.
18
+ */
10
19
  orderId?: number;
20
+ /**
21
+ * The customer information if this transaction is associated with a customer account. Contains the customer ID for linking to customer records. Returns `undefined` for guest transactions where no customer was selected or when the transaction doesn't support customer association.
22
+ */
11
23
  customer?: Customer;
24
+ /**
25
+ * An array of all discounts applied to this transaction, including cart-level discounts, automatic discounts, and discount codes. Each discount entry contains the discount amount, type, and description. Returns `undefined` or empty array when no discounts were applied. The sum of discount amounts reduces the final transaction total.
26
+ */
12
27
  discounts?: Discount[];
28
+ /**
29
+ * The total tax amount charged on this transaction as a `Money` object. This is the sum of all tax lines and represents the combined tax from all applicable tax jurisdictions and rules. Tax calculations are based on the location, products, customer, and tax settings configured in Shopify.
30
+ */
13
31
  taxTotal: Money;
32
+ /**
33
+ * The subtotal amount before taxes and after discounts are applied, as a `Money` object. This represents the sum of all line item prices (quantity × unit price) minus any discounts, but before tax is added. This is the taxable base amount for most tax calculations.
34
+ */
14
35
  subtotal: Money;
36
+ /**
37
+ * The final total amount the customer pays for this transaction as a `Money` object. This includes all line items, shipping charges, taxes, and accounts for all discounts. This is the amount that must be tendered through payment methods. Calculated as: subtotal + taxTotal + shipping - discounts.
38
+ */
15
39
  grandTotal: Money;
40
+ /**
41
+ * An array of all payment methods used to complete this transaction. Each payment entry specifies the payment type (for example, cash, credit card), amount tendered, and currency. Multiple entries indicate split payments where the customer paid using multiple methods (for example, part cash, part credit card). The sum of all payment amounts should equal or exceed the `grandTotal`.
42
+ */
16
43
  paymentMethods: Payment[];
44
+ /**
45
+ * The remaining balance still owed on this transaction as a `Money` object. Typically `{amount: 0, currency: "USD"}` for fully paid transactions. A positive balance indicates partial payment or layaway scenarios. A negative balance indicates overpayment, where change should be returned to the customer. Calculated as: grandTotal minus sum of all payment amounts.
46
+ */
17
47
  balanceDue: Money;
48
+ /**
49
+ * An array of shipping charges applied to this transaction. Each shipping line represents a shipping method with its price and associated taxes. Multiple entries can exist when different shipping methods apply to different items or when combining shipping with pickup. Returns `undefined` or empty array for transactions with no shipping charges (for example, in-store purchases, digital products).
50
+ */
18
51
  shippingLines?: ShippingLine[];
52
+ /**
53
+ * An array of individual tax lines showing the detailed tax breakdown by jurisdiction and tax type. Each tax line represents a specific tax (for example, state tax, federal tax, VAT, GST) with its rate and calculated amount. Multiple tax lines can apply to a single transaction based on location, product taxability, and tax rules. Returns `undefined` or empty array for tax-exempt transactions or when detailed tax breakdown isn't available.
54
+ */
19
55
  taxLines?: TaxLine[];
20
- tipAmount?: Money;
56
+ /**
57
+ * The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp when the transaction was executed and completed (for example, `"2024-05-15T14:30:00Z"`). This marks the exact moment the transaction was finalized, payment was processed, and the order was created. Commonly used for transaction history, chronological sorting, reporting, audit trails, and synchronization with external systems.
58
+ */
21
59
  executedAt: string;
60
+ /**
61
+ * The tip amount added to this transaction as a `Money` object. This represents the gratuity the customer chose to add on top of the grand total, typically for service-based businesses or hospitality transactions. Tipping can be enabled through POS settings and may be added as a percentage or fixed amount. Returns `undefined` when no tip was added or when tipping is not enabled for the transaction.
62
+ */
63
+ tipAmount?: Money;
22
64
  }