@shopify/ui-extensions 2026.1.0-rc.2 → 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 (257) 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/admin/components/Choice.d.ts +17 -62
  7. package/build/ts/surfaces/admin/components/shared.d.ts +102 -3
  8. package/build/ts/surfaces/point-of-sale/api/action-api/action-api.d.ts +3 -5
  9. package/build/ts/surfaces/point-of-sale/api/action-api/action-api.d.ts.map +1 -1
  10. package/build/ts/surfaces/point-of-sale/api/camera-api/camera-api.d.ts +54 -0
  11. package/build/ts/surfaces/point-of-sale/api/camera-api/camera-api.d.ts.map +1 -0
  12. package/build/ts/surfaces/point-of-sale/api/cart-api/cart-api.d.ts +38 -33
  13. package/build/ts/surfaces/point-of-sale/api/cart-api/cart-api.d.ts.map +1 -1
  14. package/build/ts/surfaces/point-of-sale/api/cart-line-item-api/cart-line-item-api.d.ts +2 -2
  15. package/build/ts/surfaces/point-of-sale/api/cash-drawer-api/cash-drawer-api.d.ts +6 -4
  16. package/build/ts/surfaces/point-of-sale/api/cash-drawer-api/cash-drawer-api.d.ts.map +1 -1
  17. package/build/ts/surfaces/point-of-sale/api/connectivity-api/connectivity-api.d.ts +6 -4
  18. package/build/ts/surfaces/point-of-sale/api/connectivity-api/connectivity-api.d.ts.map +1 -1
  19. package/build/ts/surfaces/point-of-sale/api/customer-api/customer-api.d.ts +4 -1
  20. package/build/ts/surfaces/point-of-sale/api/customer-api/customer-api.d.ts.map +1 -1
  21. package/build/ts/surfaces/point-of-sale/api/device-api/device-api.d.ts +4 -4
  22. package/build/ts/surfaces/point-of-sale/api/draft-order-api/draft-order-api.d.ts +6 -3
  23. package/build/ts/surfaces/point-of-sale/api/draft-order-api/draft-order-api.d.ts.map +1 -1
  24. package/build/ts/surfaces/point-of-sale/api/locale-api/locale-api.d.ts +2 -3
  25. package/build/ts/surfaces/point-of-sale/api/locale-api/locale-api.d.ts.map +1 -1
  26. package/build/ts/surfaces/point-of-sale/api/navigation-api/navigation-api.d.ts +17 -9
  27. package/build/ts/surfaces/point-of-sale/api/navigation-api/navigation-api.d.ts.map +1 -1
  28. package/build/ts/surfaces/point-of-sale/api/order-api/order-api.d.ts +5 -5
  29. package/build/ts/surfaces/point-of-sale/api/pin-pad-api.d.ts +6 -10
  30. package/build/ts/surfaces/point-of-sale/api/pin-pad-api.d.ts.map +1 -1
  31. package/build/ts/surfaces/point-of-sale/api/print-api/print-api.d.ts +10 -11
  32. package/build/ts/surfaces/point-of-sale/api/print-api/print-api.d.ts.map +1 -1
  33. package/build/ts/surfaces/point-of-sale/api/product-api/product-api.d.ts +5 -2
  34. package/build/ts/surfaces/point-of-sale/api/product-api/product-api.d.ts.map +1 -1
  35. package/build/ts/surfaces/point-of-sale/api/product-search-api/product-search-api.d.ts +24 -10
  36. package/build/ts/surfaces/point-of-sale/api/product-search-api/product-search-api.d.ts.map +1 -1
  37. package/build/ts/surfaces/point-of-sale/api/scanner-api/scanner-api.d.ts +26 -8
  38. package/build/ts/surfaces/point-of-sale/api/scanner-api/scanner-api.d.ts.map +1 -1
  39. package/build/ts/surfaces/point-of-sale/api/session-api/session-api.d.ts +3 -6
  40. package/build/ts/surfaces/point-of-sale/api/session-api/session-api.d.ts.map +1 -1
  41. package/build/ts/surfaces/point-of-sale/api/standard/standard-api.d.ts +2 -1
  42. package/build/ts/surfaces/point-of-sale/api/standard/standard-api.d.ts.map +1 -1
  43. package/build/ts/surfaces/point-of-sale/api/storage-api/storage-api.d.ts +3 -0
  44. package/build/ts/surfaces/point-of-sale/api/storage-api/storage-api.d.ts.map +1 -1
  45. package/build/ts/surfaces/point-of-sale/api/toast-api/toast-api.d.ts +11 -1
  46. package/build/ts/surfaces/point-of-sale/api/toast-api/toast-api.d.ts.map +1 -1
  47. package/build/ts/surfaces/point-of-sale/api.d.ts +1 -0
  48. package/build/ts/surfaces/point-of-sale/api.d.ts.map +1 -1
  49. package/build/ts/surfaces/point-of-sale/components/Badge/Badge.doc.d.ts.map +1 -1
  50. package/build/ts/surfaces/point-of-sale/components/Badge.d.ts +23 -4
  51. package/build/ts/surfaces/point-of-sale/components/Banner/Banner.doc.d.ts.map +1 -1
  52. package/build/ts/surfaces/point-of-sale/components/Banner.d.ts +24 -6
  53. package/build/ts/surfaces/point-of-sale/components/Box/Box.doc.d.ts.map +1 -1
  54. package/build/ts/surfaces/point-of-sale/components/Box.d.ts +34 -37
  55. package/build/ts/surfaces/point-of-sale/components/Button/Button.doc.d.ts.map +1 -1
  56. package/build/ts/surfaces/point-of-sale/components/Button.d.ts +56 -16
  57. package/build/ts/surfaces/point-of-sale/components/Choice.d.ts +14 -2
  58. package/build/ts/surfaces/point-of-sale/components/ChoiceList/ChoiceList.doc.d.ts.map +1 -1
  59. package/build/ts/surfaces/point-of-sale/components/ChoiceList.d.ts +41 -5
  60. package/build/ts/surfaces/point-of-sale/components/Clickable/Clickable.doc.d.ts.map +1 -1
  61. package/build/ts/surfaces/point-of-sale/components/Clickable.d.ts +40 -4
  62. package/build/ts/surfaces/point-of-sale/components/DateField/DateField.doc.d.ts.map +1 -1
  63. package/build/ts/surfaces/point-of-sale/components/DateField.d.ts +42 -6
  64. package/build/ts/surfaces/point-of-sale/components/DatePicker/DatePicker.doc.d.ts.map +1 -1
  65. package/build/ts/surfaces/point-of-sale/components/DatePicker.d.ts +42 -6
  66. package/build/ts/surfaces/point-of-sale/components/DateSpinner/DateSpinner.doc.d.ts.map +1 -1
  67. package/build/ts/surfaces/point-of-sale/components/DateSpinner.d.ts +42 -6
  68. package/build/ts/surfaces/point-of-sale/components/Divider/Divider.doc.d.ts.map +1 -1
  69. package/build/ts/surfaces/point-of-sale/components/Divider.d.ts +14 -2
  70. package/build/ts/surfaces/point-of-sale/components/EmailField/EmailField.doc.d.ts.map +1 -1
  71. package/build/ts/surfaces/point-of-sale/components/EmailField.d.ts +43 -64
  72. package/build/ts/surfaces/point-of-sale/components/Heading/Heading.doc.d.ts.map +1 -1
  73. package/build/ts/surfaces/point-of-sale/components/Heading.d.ts +15 -3
  74. package/build/ts/surfaces/point-of-sale/components/Icon/Icon.doc.d.ts.map +1 -1
  75. package/build/ts/surfaces/point-of-sale/components/Icon.d.ts +17 -2
  76. package/build/ts/surfaces/point-of-sale/components/Image/Image.doc.d.ts.map +1 -1
  77. package/build/ts/surfaces/point-of-sale/components/Image.d.ts +18 -16
  78. package/build/ts/surfaces/point-of-sale/components/Modal/Modal.doc.d.ts.map +1 -1
  79. package/build/ts/surfaces/point-of-sale/components/Modal.d.ts +43 -11
  80. package/build/ts/surfaces/point-of-sale/components/NumberField/NumberField.doc.d.ts.map +1 -1
  81. package/build/ts/surfaces/point-of-sale/components/NumberField.d.ts +56 -41
  82. package/build/ts/surfaces/point-of-sale/components/Page/Page.doc.d.ts.map +1 -1
  83. package/build/ts/surfaces/point-of-sale/components/Page.d.ts +19 -7
  84. package/build/ts/surfaces/point-of-sale/components/PosBlock/PosBlock.doc.d.ts.map +1 -1
  85. package/build/ts/surfaces/point-of-sale/components/PosBlock.d.ts +16 -4
  86. package/build/ts/surfaces/point-of-sale/components/QrCode.d.ts +14 -2
  87. package/build/ts/surfaces/point-of-sale/components/ScrollBox/ScrollBox.doc.d.ts.map +1 -1
  88. package/build/ts/surfaces/point-of-sale/components/ScrollBox.d.ts +33 -36
  89. package/build/ts/surfaces/point-of-sale/components/SearchField/SearchField.doc.d.ts.map +1 -1
  90. package/build/ts/surfaces/point-of-sale/components/SearchField.d.ts +42 -6
  91. package/build/ts/surfaces/point-of-sale/components/Section/Section.doc.d.ts.map +1 -1
  92. package/build/ts/surfaces/point-of-sale/components/Section.d.ts +17 -7
  93. package/build/ts/surfaces/point-of-sale/components/Stack/Stack.doc.d.ts.map +1 -1
  94. package/build/ts/surfaces/point-of-sale/components/Stack.d.ts +47 -61
  95. package/build/ts/surfaces/point-of-sale/components/Text/Text.doc.d.ts.map +1 -1
  96. package/build/ts/surfaces/point-of-sale/components/Text.d.ts +28 -6
  97. package/build/ts/surfaces/point-of-sale/components/TextArea/TextArea.doc.d.ts.map +1 -1
  98. package/build/ts/surfaces/point-of-sale/components/TextArea.d.ts +5 -12
  99. package/build/ts/surfaces/point-of-sale/components/TextField/TextField.doc.d.ts.map +1 -1
  100. package/build/ts/surfaces/point-of-sale/components/TextField.d.ts +43 -7
  101. package/build/ts/surfaces/point-of-sale/components/Tile/Tile.doc.d.ts.map +1 -1
  102. package/build/ts/surfaces/point-of-sale/components/Tile.d.ts +40 -4
  103. package/build/ts/surfaces/point-of-sale/components/TimeField/TimeField.doc.d.ts.map +1 -1
  104. package/build/ts/surfaces/point-of-sale/components/TimeField.d.ts +42 -6
  105. package/build/ts/surfaces/point-of-sale/components/TimePicker/TimePicker.doc.d.ts.map +1 -1
  106. package/build/ts/surfaces/point-of-sale/components/TimePicker.d.ts +42 -6
  107. package/build/ts/surfaces/point-of-sale/components/components-shared.d.ts +638 -878
  108. package/build/ts/surfaces/point-of-sale/components/targets/StandardComponents.d.ts +1 -1
  109. package/build/ts/surfaces/point-of-sale/components/targets/StandardComponents.d.ts.map +1 -1
  110. package/build/ts/surfaces/point-of-sale/event/data/BaseApi.d.ts +3 -0
  111. package/build/ts/surfaces/point-of-sale/event/data/BaseApi.d.ts.map +1 -1
  112. package/build/ts/surfaces/point-of-sale/event/data/BaseData.d.ts +15 -0
  113. package/build/ts/surfaces/point-of-sale/event/data/BaseData.d.ts.map +1 -1
  114. package/build/ts/surfaces/point-of-sale/event/data/CartUpdateEventData.d.ts +6 -0
  115. package/build/ts/surfaces/point-of-sale/event/data/CartUpdateEventData.d.ts.map +1 -1
  116. package/build/ts/surfaces/point-of-sale/event/data/CashTrackingSessionData.d.ts +27 -0
  117. package/build/ts/surfaces/point-of-sale/event/data/CashTrackingSessionData.d.ts.map +1 -1
  118. package/build/ts/surfaces/point-of-sale/event/data/ExchangeTransactionData.d.ts +18 -0
  119. package/build/ts/surfaces/point-of-sale/event/data/ExchangeTransactionData.d.ts.map +1 -1
  120. package/build/ts/surfaces/point-of-sale/event/data/ReprintReceiptData.d.ts +9 -0
  121. package/build/ts/surfaces/point-of-sale/event/data/ReprintReceiptData.d.ts.map +1 -1
  122. package/build/ts/surfaces/point-of-sale/event/data/ReturnTransactionData.d.ts +18 -0
  123. package/build/ts/surfaces/point-of-sale/event/data/ReturnTransactionData.d.ts.map +1 -1
  124. package/build/ts/surfaces/point-of-sale/event/data/SaleTransactionData.d.ts +12 -0
  125. package/build/ts/surfaces/point-of-sale/event/data/SaleTransactionData.d.ts.map +1 -1
  126. package/build/ts/surfaces/point-of-sale/event/data/TransactionCompleteData.d.ts +27 -0
  127. package/build/ts/surfaces/point-of-sale/event/data/TransactionCompleteData.d.ts.map +1 -1
  128. package/build/ts/surfaces/point-of-sale/event/output/BaseOutput.d.ts +17 -0
  129. package/build/ts/surfaces/point-of-sale/event/output/BaseOutput.d.ts.map +1 -1
  130. package/build/ts/surfaces/point-of-sale/extension-targets.d.ts +150 -0
  131. package/build/ts/surfaces/point-of-sale/extension-targets.d.ts.map +1 -1
  132. package/build/ts/surfaces/point-of-sale/types/base-transaction-complete.d.ts +43 -0
  133. package/build/ts/surfaces/point-of-sale/types/base-transaction-complete.d.ts.map +1 -1
  134. package/build/ts/surfaces/point-of-sale/types/cart.d.ts +227 -31
  135. package/build/ts/surfaces/point-of-sale/types/cart.d.ts.map +1 -1
  136. package/build/ts/surfaces/point-of-sale/types/country-code.d.ts +3 -0
  137. package/build/ts/surfaces/point-of-sale/types/country-code.d.ts.map +1 -1
  138. package/build/ts/surfaces/point-of-sale/types/device.d.ts +6 -3
  139. package/build/ts/surfaces/point-of-sale/types/device.d.ts.map +1 -1
  140. package/build/ts/surfaces/point-of-sale/types/direct-api-request-body.d.ts +3 -3
  141. package/build/ts/surfaces/point-of-sale/types/discount-allocation.d.ts +6 -0
  142. package/build/ts/surfaces/point-of-sale/types/discount-allocation.d.ts.map +1 -1
  143. package/build/ts/surfaces/point-of-sale/types/money.d.ts +18 -0
  144. package/build/ts/surfaces/point-of-sale/types/money.d.ts.map +1 -1
  145. package/build/ts/surfaces/point-of-sale/types/multiple-resource-result.d.ts +1 -2
  146. package/build/ts/surfaces/point-of-sale/types/multiple-resource-result.d.ts.map +1 -1
  147. package/build/ts/surfaces/point-of-sale/types/order.d.ts +18 -0
  148. package/build/ts/surfaces/point-of-sale/types/order.d.ts.map +1 -1
  149. package/build/ts/surfaces/point-of-sale/types/paginated-result.d.ts +2 -3
  150. package/build/ts/surfaces/point-of-sale/types/paginated-result.d.ts.map +1 -1
  151. package/build/ts/surfaces/point-of-sale/types/payment.d.ts +15 -0
  152. package/build/ts/surfaces/point-of-sale/types/payment.d.ts.map +1 -1
  153. package/build/ts/surfaces/point-of-sale/types/pin-pad.d.ts +36 -16
  154. package/build/ts/surfaces/point-of-sale/types/pin-pad.d.ts.map +1 -1
  155. package/build/ts/surfaces/point-of-sale/types/product.d.ts +170 -0
  156. package/build/ts/surfaces/point-of-sale/types/product.d.ts.map +1 -1
  157. package/build/ts/surfaces/point-of-sale/types/session.d.ts +7 -5
  158. package/build/ts/surfaces/point-of-sale/types/session.d.ts.map +1 -1
  159. package/build/ts/surfaces/point-of-sale/types/shipping-line.d.ts +32 -0
  160. package/build/ts/surfaces/point-of-sale/types/shipping-line.d.ts.map +1 -1
  161. package/build/ts/surfaces/point-of-sale/types/storage.d.ts +13 -11
  162. package/build/ts/surfaces/point-of-sale/types/storage.d.ts.map +1 -1
  163. package/build/ts/surfaces/point-of-sale/types/tax-line.d.ts +21 -0
  164. package/build/ts/surfaces/point-of-sale/types/tax-line.d.ts.map +1 -1
  165. package/build/ts/surfaces/point-of-sale/types/transaction-type.d.ts +7 -0
  166. package/build/ts/surfaces/point-of-sale/types/transaction-type.d.ts.map +1 -1
  167. package/build/tsconfig.tsbuildinfo +1 -1
  168. package/package.json +6 -1
  169. package/src/shared.ts +7 -7
  170. package/src/surfaces/admin/components/Choice.d.ts +17 -62
  171. package/src/surfaces/admin/components/shared.d.ts +102 -3
  172. package/src/surfaces/admin/components.d.ts +517 -389
  173. package/src/surfaces/point-of-sale/api/action-api/action-api.ts +3 -5
  174. package/src/surfaces/point-of-sale/api/camera-api/camera-api.ts +56 -0
  175. package/src/surfaces/point-of-sale/api/cart-api/cart-api.ts +38 -33
  176. package/src/surfaces/point-of-sale/api/cart-line-item-api/cart-line-item-api.ts +2 -2
  177. package/src/surfaces/point-of-sale/api/cash-drawer-api/cash-drawer-api.ts +6 -4
  178. package/src/surfaces/point-of-sale/api/connectivity-api/connectivity-api.ts +6 -4
  179. package/src/surfaces/point-of-sale/api/customer-api/customer-api.ts +4 -1
  180. package/src/surfaces/point-of-sale/api/device-api/device-api.ts +4 -4
  181. package/src/surfaces/point-of-sale/api/draft-order-api/draft-order-api.ts +6 -3
  182. package/src/surfaces/point-of-sale/api/locale-api/locale-api.ts +2 -3
  183. package/src/surfaces/point-of-sale/api/navigation-api/navigation-api.ts +17 -9
  184. package/src/surfaces/point-of-sale/api/order-api/order-api.ts +5 -5
  185. package/src/surfaces/point-of-sale/api/pin-pad-api.ts +6 -10
  186. package/src/surfaces/point-of-sale/api/print-api/print-api.ts +10 -11
  187. package/src/surfaces/point-of-sale/api/product-api/product-api.ts +5 -2
  188. package/src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts +24 -10
  189. package/src/surfaces/point-of-sale/api/scanner-api/scanner-api.ts +26 -8
  190. package/src/surfaces/point-of-sale/api/session-api/session-api.ts +3 -6
  191. package/src/surfaces/point-of-sale/api/standard/standard-api.ts +3 -1
  192. package/src/surfaces/point-of-sale/api/storage-api/storage-api.ts +3 -0
  193. package/src/surfaces/point-of-sale/api/toast-api/toast-api.ts +11 -1
  194. package/src/surfaces/point-of-sale/api.ts +7 -0
  195. package/src/surfaces/point-of-sale/components/Badge.d.ts +23 -4
  196. package/src/surfaces/point-of-sale/components/Banner.d.ts +24 -6
  197. package/src/surfaces/point-of-sale/components/Box.d.ts +34 -37
  198. package/src/surfaces/point-of-sale/components/Button.d.ts +56 -16
  199. package/src/surfaces/point-of-sale/components/Choice.d.ts +14 -2
  200. package/src/surfaces/point-of-sale/components/ChoiceList.d.ts +41 -5
  201. package/src/surfaces/point-of-sale/components/Clickable.d.ts +40 -4
  202. package/src/surfaces/point-of-sale/components/DateField.d.ts +42 -6
  203. package/src/surfaces/point-of-sale/components/DatePicker.d.ts +42 -6
  204. package/src/surfaces/point-of-sale/components/DateSpinner.d.ts +42 -6
  205. package/src/surfaces/point-of-sale/components/Divider.d.ts +14 -2
  206. package/src/surfaces/point-of-sale/components/EmailField.d.ts +43 -64
  207. package/src/surfaces/point-of-sale/components/Heading.d.ts +15 -3
  208. package/src/surfaces/point-of-sale/components/Icon.d.ts +17 -2
  209. package/src/surfaces/point-of-sale/components/Image.d.ts +18 -16
  210. package/src/surfaces/point-of-sale/components/Modal.d.ts +43 -11
  211. package/src/surfaces/point-of-sale/components/NumberField.d.ts +56 -41
  212. package/src/surfaces/point-of-sale/components/Page.d.ts +19 -7
  213. package/src/surfaces/point-of-sale/components/PosBlock.d.ts +16 -4
  214. package/src/surfaces/point-of-sale/components/QrCode.d.ts +14 -2
  215. package/src/surfaces/point-of-sale/components/ScrollBox.d.ts +33 -36
  216. package/src/surfaces/point-of-sale/components/SearchField.d.ts +42 -6
  217. package/src/surfaces/point-of-sale/components/Section.d.ts +17 -7
  218. package/src/surfaces/point-of-sale/components/Stack.d.ts +47 -61
  219. package/src/surfaces/point-of-sale/components/Text.d.ts +28 -6
  220. package/src/surfaces/point-of-sale/components/TextArea.d.ts +5 -12
  221. package/src/surfaces/point-of-sale/components/TextField.d.ts +43 -7
  222. package/src/surfaces/point-of-sale/components/Tile.d.ts +40 -4
  223. package/src/surfaces/point-of-sale/components/TimeField.d.ts +42 -6
  224. package/src/surfaces/point-of-sale/components/TimePicker.d.ts +42 -6
  225. package/src/surfaces/point-of-sale/components/components-shared.d.ts +638 -878
  226. package/src/surfaces/point-of-sale/components/targets/StandardComponents.ts +0 -1
  227. package/src/surfaces/point-of-sale/components.d.ts +1506 -1537
  228. package/src/surfaces/point-of-sale/event/data/BaseApi.ts +3 -0
  229. package/src/surfaces/point-of-sale/event/data/BaseData.ts +15 -0
  230. package/src/surfaces/point-of-sale/event/data/CartUpdateEventData.ts +6 -0
  231. package/src/surfaces/point-of-sale/event/data/CashTrackingSessionData.ts +27 -0
  232. package/src/surfaces/point-of-sale/event/data/ExchangeTransactionData.ts +18 -0
  233. package/src/surfaces/point-of-sale/event/data/ReprintReceiptData.ts +9 -0
  234. package/src/surfaces/point-of-sale/event/data/ReturnTransactionData.ts +18 -0
  235. package/src/surfaces/point-of-sale/event/data/SaleTransactionData.ts +12 -0
  236. package/src/surfaces/point-of-sale/event/data/TransactionCompleteData.ts +27 -0
  237. package/src/surfaces/point-of-sale/event/output/BaseOutput.ts +17 -0
  238. package/src/surfaces/point-of-sale/extension-targets.ts +150 -0
  239. package/src/surfaces/point-of-sale/types/base-transaction-complete.ts +43 -0
  240. package/src/surfaces/point-of-sale/types/cart.ts +227 -31
  241. package/src/surfaces/point-of-sale/types/country-code.ts +3 -0
  242. package/src/surfaces/point-of-sale/types/device.ts +6 -3
  243. package/src/surfaces/point-of-sale/types/direct-api-request-body.ts +3 -3
  244. package/src/surfaces/point-of-sale/types/discount-allocation.ts +6 -0
  245. package/src/surfaces/point-of-sale/types/money.ts +18 -0
  246. package/src/surfaces/point-of-sale/types/multiple-resource-result.ts +1 -2
  247. package/src/surfaces/point-of-sale/types/order.ts +18 -1
  248. package/src/surfaces/point-of-sale/types/paginated-result.ts +2 -3
  249. package/src/surfaces/point-of-sale/types/payment.ts +16 -0
  250. package/src/surfaces/point-of-sale/types/pin-pad.ts +32 -14
  251. package/src/surfaces/point-of-sale/types/product.ts +170 -0
  252. package/src/surfaces/point-of-sale/types/session.ts +7 -5
  253. package/src/surfaces/point-of-sale/types/shipping-line.ts +32 -0
  254. package/src/surfaces/point-of-sale/types/storage.ts +13 -11
  255. package/src/surfaces/point-of-sale/types/tax-line.ts +21 -0
  256. package/src/surfaces/point-of-sale/types/transaction-type.ts +7 -0
  257. package/src/surfaces/point-of-sale/components/EmailField/examples/accessory-slot.jsx +0 -9
@@ -1,26 +1,33 @@
1
1
  import type { ReadonlySignalLike } from '../../../../shared';
2
2
  import type { Address, Cart, CartUpdateInput, Customer, CustomSale, SetLineItemDiscountInput, SetLineItemPropertiesInput, SetLineItemSellingPlanInput } from '../../types/cart';
3
3
  /**
4
- * Access and modify the merchant’s current cart.
4
+ * The `CartApi` object provides access to cart management functionality and real-time cart state monitoring. Access these properties through `shopify.cart` to interact with the current POS cart.
5
5
  */
6
6
  export interface CartApi {
7
7
  cart: CartApiContent;
8
8
  }
9
+ /**
10
+ * Defines the type of discount applied at the cart level. Specifies whether the discount is percentage-based, fixed amount, or discount code redemption.
11
+ */
9
12
  export type CartDiscountType = 'Percentage' | 'FixedAmount' | 'Code';
13
+ /**
14
+ * Defines the type of discount applied to individual line items. Specifies whether the discount is percentage-based or a fixed amount reduction.
15
+ */
10
16
  export type LineItemDiscountType = 'Percentage' | 'FixedAmount';
11
17
  export interface CartApiContent {
12
18
  /**
13
- * Provides read-only access to the current cart state and allows subscribing to cart changes.
14
- * The `value` property provides the current cart state, and `subscribe` allows listening to changes.
19
+ * Provides read-only access to the current cart state and allows subscribing to cart changes. The `value` property provides the current cart state, and `subscribe` allows listening to changes with improved performance and memory management.
15
20
  */
16
21
  current: ReadonlySignalLike<Cart>;
17
- /** Bulk update the cart
22
+ /**
23
+ * Perform a bulk update of the entire cart state including note, discounts, customer, line items, and properties. Returns the updated cart object after the operation completes with enhanced validation and error handling.
18
24
  *
19
25
  * @param cartState the cart state to set
20
26
  * @returns the updated cart
21
27
  */
22
28
  bulkCartUpdate(cartState: CartUpdateInput): Promise<Cart>;
23
- /** Apply a cart level discount
29
+ /**
30
+ * Apply a cart-level discount with the specified type (`'Percentage'`, `'FixedAmount'`, or `'Code'`), title, and optional amount. For discount codes, omit the `amount` parameter. Enhanced validation ensures proper discount application.
24
31
  *
25
32
  * @param type the type of discount applied (example: 'Percentage')
26
33
  * @param title the title attributed with the discount
@@ -28,93 +35,91 @@ export interface CartApiContent {
28
35
  */
29
36
  applyCartDiscount(type: CartDiscountType, title: string, amount?: string): Promise<void>;
30
37
  /**
31
- * Add a code discount to the cart
38
+ * Apply a discount code to the cart. The system will validate the code and apply the appropriate discount if the code is valid and applicable to the current cart contents with improved error messaging.
32
39
  *
33
40
  * @param code the code for the discount to add to the cart
34
41
  */
35
42
  addCartCodeDiscount(code: string): Promise<void>;
36
43
  /**
37
- * Remove the cart discount
44
+ * Remove the current cart-level discount. This only affects cart-level discounts and does not impact line item discounts or automatic discount eligibility.
38
45
  */
39
46
  removeCartDiscount(): Promise<void>;
40
47
  /**
41
- * Remove all cart and line item discounts
48
+ * Remove all discounts from both the cart and individual line items. Set `disableAutomaticDiscounts` to `true` to prevent automatic discounts from being reapplied after removal with enhanced discount allocation handling.
42
49
  *
43
50
  * @param disableAutomaticDiscounts Whether or not automatic discounts should be enabled after removing the discounts.
44
51
  */
45
52
  removeAllDiscounts(disableAutomaticDiscounts: boolean): Promise<void>;
46
53
  /**
47
- * Clear the cart
54
+ * Remove all line items and reset the cart to an empty state. This action can't be undone and will clear all cart contents including line items, discounts, properties, and selling plans.
48
55
  */
49
56
  clearCart(): Promise<void>;
50
57
  /**
51
- * Set the customer in the cart
58
+ * Associate a customer with the current cart using the customer object containing the customer `ID`. This enables customer-specific pricing, discounts, and checkout features with enhanced customer data validation.
52
59
  *
53
60
  * @param customer the customer object to add to the cart
54
61
  */
55
62
  setCustomer(customer: Customer): Promise<void>;
56
63
  /**
57
- * Remove the current customer from the cart
64
+ * Remove the currently associated customer from the cart, converting it back to a guest cart without customer-specific benefits or information while preserving cart contents.
58
65
  */
59
66
  removeCustomer(): Promise<void>;
60
67
  /**
61
- * Add a custom sale to the cart
68
+ * Add a custom sale item to the cart with specified quantity, title, price, and taxable status. Returns the `UUID` of the created line item for future operations and property management.
62
69
  *
63
70
  * @param customSale the custom sale object to add to the cart
64
- * @returns {string} the uuid of the line item added
71
+ * @returns {string} the UUID of the line item added
65
72
  */
66
73
  addCustomSale(customSale: CustomSale): Promise<string>;
67
74
  /**
68
- * Add a line item by variant ID to the cart.
69
- * Returns the uuid of the line item added, or the empty string if the user dismissed an oversell guard modal without adding anything.
70
- * Throws if POS fails to add the line item. Throws if POS fails to add the line item.
75
+ * Add a product variant to the cart by its numeric `ID` with the specified quantity. Returns the `UUID` of the newly added line item, or an empty string if the user dismissed an oversell guard modal. Throws an error if POS fails to add the line item due to validation or system errors.
71
76
  *
72
77
  * @param variantId the product variant's numeric ID to add to the cart
73
78
  * @param quantity the number of this variant to add to the cart
74
- * @returns {string} the uuid of the line item added, or the empty string if the user dismissed an oversell guard modal
79
+ * @returns {string} the UUID of the line item added, or the empty string if the user dismissed an oversell guard modal
75
80
  * @throws {Error} if POS fails to add the line item
76
81
  */
77
82
  addLineItem(variantId: number, quantity: number): Promise<string>;
78
83
  /**
79
- * Remove the line item at this uuid from the cart
84
+ * Remove a specific line item from the cart using its `UUID`. The line item will be completely removed from the cart along with any associated discounts, properties, or selling plans.
80
85
  *
81
86
  * @param uuid the uuid of the line item that should be removed
82
87
  */
83
88
  removeLineItem(uuid: string): Promise<void>;
84
89
  /**
85
- * Adds custom properties to the cart
90
+ * Add custom key-value properties to the cart for storing metadata, tracking information, or integration data. Properties are merged with existing cart properties with enhanced validation and conflict resolution.
86
91
  *
87
92
  * @param properties the custom key to value object to attribute to the cart
88
93
  */
89
94
  addCartProperties(properties: Record<string, string>): Promise<void>;
90
95
  /**
91
- * Removes the specified cart properties
96
+ * Remove specific cart properties by their keys. Only the specified property keys will be removed while other properties remain intact with improved error handling for non-existent keys.
92
97
  *
93
98
  * @param keys the collection of keys to be removed from the cart properties
94
99
  */
95
100
  removeCartProperties(keys: string[]): Promise<void>;
96
101
  /**
97
- * Adds custom properties to the specified line item
102
+ * Add custom properties to a specific line item using its `UUID`. Properties are merged with existing line item properties for metadata storage and tracking with enhanced validation.
98
103
  *
99
104
  * @param uuid the uuid of the line item to which the properties should be stringd
100
105
  * @param properties the custom key to value object to attribute to the line item
101
106
  */
102
107
  addLineItemProperties(uuid: string, properties: Record<string, string>): Promise<void>;
103
108
  /**
104
- * Adds custom properties to multiple line items at the same time.
109
+ * Add properties to multiple line items simultaneously using an array of inputs containing line item `UUIDs` and their respective properties for efficient bulk operations with enhanced validation and error reporting.
105
110
  *
106
111
  * @param lineItemProperties the collection of custom line item properties to apply to their respective line items.
107
112
  */
108
113
  bulkAddLineItemProperties(lineItemProperties: SetLineItemPropertiesInput[]): Promise<void>;
109
114
  /**
110
- * Removes the specified line item properties
115
+ * Remove specific properties from a line item by `UUID` and property keys. Only the specified keys will be removed while other properties remain intact with improved error handling.
111
116
  *
112
117
  * @param uuid the uuid of the line item to which the properties should be removed
113
118
  * @param keys the collection of keys to be removed from the line item properties
114
119
  */
115
120
  removeLineItemProperties(uuid: string, keys: string[]): Promise<void>;
116
121
  /**
117
- * Add a discount on a line item to the cart
122
+ * Apply a discount to a specific line item using its `UUID`. Specify the discount type (`'Percentage'` or `'FixedAmount'`), title, and amount value with improved discount allocation tracking.
118
123
  *
119
124
  * @param uuid the uuid of the line item that should receive a discount
120
125
  * @param type the type of discount applied (example: 'Percentage')
@@ -123,57 +128,57 @@ export interface CartApiContent {
123
128
  */
124
129
  setLineItemDiscount(uuid: string, type: LineItemDiscountType, title: string, amount: string): Promise<void>;
125
130
  /**
126
- * Set line item discounts to multiple line items at the same time.
131
+ * Apply discounts to multiple line items simultaneously. Each input specifies the line item `UUID` and discount details for efficient bulk discount operations with enhanced validation and allocation tracking.
127
132
  *
128
133
  * @param lineItemDiscounts a map of discounts to add. They key is the uuid of the line item you want to add the discount to. The value is the discount input.
129
134
  */
130
135
  bulkSetLineItemDiscounts(lineItemDiscounts: SetLineItemDiscountInput[]): Promise<void>;
131
136
  /**
132
- * Sets an attributed staff to all line items in the cart.
137
+ * Set the attributed staff member for all line items in the cart using the staff `ID`. Pass `undefined` to clear staff attribution from all line items with enhanced staff validation and tracking.
133
138
  *
134
139
  * @param staffId the ID of the staff. Providing undefined will clear the attributed staff from all line items.
135
140
  */
136
141
  setAttributedStaff(staffId: number | undefined): Promise<void>;
137
142
  /**
138
- * Sets an attributed staff to a specific line items in the cart.
143
+ * Set the attributed staff member for a specific line item using the staff `ID` and line item `UUID`. Pass `undefined` as `staffId` to clear attribution from the line item with improved validation and error handling.
139
144
  *
140
145
  * @param staffId the ID of the staff. Providing undefined will clear the attributed staff on the line item.
141
146
  * @param lineItemUuid the UUID of the line item.
142
147
  */
143
148
  setAttributedStaffToLineItem(staffId: number | undefined, lineItemUuid: string): Promise<void>;
144
149
  /**
145
- * Remove all discounts from a line item
150
+ * Remove all discounts from a specific line item identified by its `UUID`. This will clear any custom discounts applied to the line item while preserving discount allocation history.
146
151
  *
147
152
  * @param uuid the uuid of the line item whose discounts should be removed
148
153
  */
149
154
  removeLineItemDiscount(uuid: string): Promise<void>;
150
155
  /**
151
- * Add an address to the customer (Customer must be present)
156
+ * Add a new address to the customer associated with the cart. The customer must be present in the cart before adding addresses with enhanced address validation and formatting.
152
157
  *
153
158
  * @param address the address object to add to the customer in cart
154
159
  */
155
160
  addAddress(address: Address): Promise<void>;
156
161
  /**
157
- * Delete an address from the customer (Customer must be present)
162
+ * Delete an existing address from the customer using the address `ID`. The customer must be present in the cart to perform this operation with improved error handling for invalid address `IDs`.
158
163
  *
159
164
  * @param addressId the address ID to delete
160
165
  */
161
166
  deleteAddress(addressId: number): Promise<void>;
162
167
  /**
163
- * Update the default address for the customer (Customer must be present)
168
+ * Set a specific address as the default address for the customer using the address `ID`. The customer must be present in the cart to update the default address with enhanced validation.
164
169
  *
165
170
  * @param addressId the address ID to set as the default address
166
171
  */
167
172
  updateDefaultAddress(addressId: number): Promise<void>;
168
173
  /**
169
- * Add a selling plan to a line item in the cart.
174
+ * Add a selling plan to a line item in the cart using the line item `UUID`, selling plan `ID`, and selling plan name. Optionally provide delivery interval and interval count for improved performance, otherwise POS will fetch them after syncing the cart.
170
175
  *
171
176
  * @param uuid the uuid of the line item that should receive the selling plan
172
177
  * @param sellingPlanId the ID of the selling plan to add to the line item
173
178
  */
174
179
  addLineItemSellingPlan(input: SetLineItemSellingPlanInput): Promise<void>;
175
180
  /**
176
- * Remove the selling plan from a line item in the cart.
181
+ * Remove the selling plan from a line item in the cart using the line item `UUID`. This will clear any subscription or recurring purchase configuration from the line item.
177
182
  *
178
183
  * @param uuid the uuid of the line item whose selling plan should be removed
179
184
  */
@@ -1 +1 @@
1
- {"version":3,"file":"cart-api.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/point-of-sale/api/cart-api/cart-api.ts"],"names":[],"mappings":"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"}
1
+ {"version":3,"file":"cart-api.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/point-of-sale/api/cart-api/cart-api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,oBAAoB,CAAC;AAC3D,OAAO,KAAK,EACV,OAAO,EACP,IAAI,EACJ,eAAe,EACf,QAAQ,EACR,UAAU,EACV,wBAAwB,EACxB,0BAA0B,EAC1B,2BAA2B,EAC5B,MAAM,kBAAkB,CAAC;AAE1B;;GAEG;AACH,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,cAAc,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,YAAY,GAAG,aAAa,GAAG,MAAM,CAAC;AAErE;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,YAAY,GAAG,aAAa,CAAC;AAEhE,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,OAAO,EAAE,kBAAkB,CAAC,IAAI,CAAC,CAAC;IAElC;;;;;OAKG;IACH,cAAc,CAAC,SAAS,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE1D;;;;;;OAMG;IACH,iBAAiB,CACf,IAAI,EAAE,gBAAgB,EACtB,KAAK,EAAE,MAAM,EACb,MAAM,CAAC,EAAE,MAAM,GACd,OAAO,CAAC,IAAI,CAAC,CAAC;IAEjB;;;;OAIG;IACH,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEjD;;OAEG;IACH,kBAAkB,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAEpC;;;;OAIG;IACH,kBAAkB,CAAC,yBAAyB,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEtE;;OAEG;IACH,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAE3B;;;;OAIG;IACH,WAAW,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE/C;;OAEG;IACH,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAEhC;;;;;OAKG;IACH,aAAa,CAAC,UAAU,EAAE,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAEvD;;;;;;;OAOG;IACH,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAElE;;;;OAIG;IACH,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE5C;;;;OAIG;IACH,iBAAiB,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAErE;;;;OAIG;IACH,oBAAoB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEpD;;;;;OAKG;IACH,qBAAqB,CACnB,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GACjC,OAAO,CAAC,IAAI,CAAC,CAAC;IAEjB;;;;OAIG;IACH,yBAAyB,CACvB,kBAAkB,EAAE,0BAA0B,EAAE,GAC/C,OAAO,CAAC,IAAI,CAAC,CAAC;IAEjB;;;;;OAKG;IACH,wBAAwB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEtE;;;;;;;OAOG;IACH,mBAAmB,CACjB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,oBAAoB,EAC1B,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,IAAI,CAAC,CAAC;IAEjB;;;;OAIG;IACH,wBAAwB,CACtB,iBAAiB,EAAE,wBAAwB,EAAE,GAC5C,OAAO,CAAC,IAAI,CAAC,CAAC;IAEjB;;;;OAIG;IACH,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE/D;;;;;OAKG;IACH,4BAA4B,CAC1B,OAAO,EAAE,MAAM,GAAG,SAAS,EAC3B,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC,IAAI,CAAC,CAAC;IAEjB;;;;OAIG;IACH,sBAAsB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEpD;;;;OAIG;IACH,UAAU,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE5C;;;;OAIG;IACH,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEhD;;;;OAIG;IACH,oBAAoB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEvD;;;;;OAKG;IACH,sBAAsB,CAAC,KAAK,EAAE,2BAA2B,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE1E;;;;OAIG;IACH,yBAAyB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACxD"}
@@ -1,10 +1,10 @@
1
1
  import type { LineItem } from '../../types/cart';
2
2
  /**
3
- * Access to the selected line item in the merchant’s current cart.
3
+ * The `CartLineItemApi` object provides access to the current line item. Access this property through `api.cartLineItem` to interact with the current line item context.
4
4
  */
5
5
  export interface CartLineItemApi {
6
6
  /**
7
- * The selected line item in the merchants current cart.
7
+ * The selected line item in the merchant's current cart. Provides complete line item data including product information, pricing, discounts, properties, and metadata. Use for displaying item details and implementing item-specific functionality.
8
8
  */
9
9
  cartLineItem: LineItem;
10
10
  }
@@ -1,19 +1,21 @@
1
1
  /**
2
- * The Cash Drawer API in POS UI extensions includes select cash drawer functionality.
2
+ * The `CashDrawerApi` object provides methods for controlling cash drawer hardware. Access these methods through `shopify.cashDrawer` to trigger cash drawer operations.
3
3
  */
4
4
  export interface CashDrawerApiContent {
5
5
  /**
6
- * Opens the connected cash drawer.
6
+ * Opens the connected cash drawer device. The drawer will automatically open if a compatible cash drawer is connected to the POS device. Use for manual cash drawer operations, implementing custom payment workflows, or providing explicit cash drawer access in register management interfaces.
7
7
  *
8
8
  * @returns Void
9
- *
10
9
  */
11
10
  open(): Promise<void>;
12
11
  }
13
12
  /**
14
- * Interface for the Cash Drawer API
13
+ * The `CashDrawerApi` object provides methods for controlling cash drawer hardware. Access these methods through `shopify.cashDrawer` to trigger cash drawer operations.
15
14
  */
16
15
  export interface CashDrawerApi {
16
+ /**
17
+ * The `CashDrawerApi` object provides methods for controlling cash drawer hardware. Access these methods through `shopify.cashDrawer` to trigger cash drawer operations.
18
+ */
17
19
  cashDrawer: CashDrawerApiContent;
18
20
  }
19
21
  //# sourceMappingURL=cash-drawer-api.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cash-drawer-api.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/point-of-sale/api/cash-drawer-api/cash-drawer-api.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC;;;;;OAKG;IACH,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,UAAU,EAAE,oBAAoB,CAAC;CAClC"}
1
+ {"version":3,"file":"cash-drawer-api.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/point-of-sale/api/cash-drawer-api/cash-drawer-api.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC;;;;OAIG;IACH,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,UAAU,EAAE,oBAAoB,CAAC;CAClC"}
@@ -1,20 +1,22 @@
1
1
  import type { ReadonlySignalLike } from '../../../../shared';
2
2
  export type ConnectivityStateSeverity = 'Connected' | 'Disconnected';
3
+ /**
4
+ * Represents the current Internet connectivity status of the device. Indicates whether the device is connected or disconnected from the Internet.
5
+ */
3
6
  export interface ConnectivityState {
4
7
  /**
5
- * Whether the device is connected to the internet
8
+ * The Internet connection status of the POS device.
6
9
  */
7
10
  internetConnected: ConnectivityStateSeverity;
8
11
  }
9
12
  export interface ConnectivityApiContent {
10
13
  /**
11
- * Provides read-only access to the current connectivity state and allows subscribing to connectivity changes.
12
- * The `value` property provides the current connectivity state, and `subscribe` allows listening to changes.
14
+ * Provides read-only access to the current connectivity state and allows subscribing to connectivity changes. Use for implementing connectivity-aware functionality and reactive connectivity handling.
13
15
  */
14
16
  current: ReadonlySignalLike<ConnectivityState>;
15
17
  }
16
18
  /**
17
- * Access information about the device connectivity
19
+ * The `ConnectivityApi` object provides access to current connectivity information and change notifications. Access these properties through `shopify.connectivity` to monitor network status.
18
20
  */
19
21
  export interface ConnectivityApi {
20
22
  connectivity: ConnectivityApiContent;
@@ -1 +1 @@
1
- {"version":3,"file":"connectivity-api.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/point-of-sale/api/connectivity-api/connectivity-api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,oBAAoB,CAAC;AAE3D,MAAM,MAAM,yBAAyB,GAAG,WAAW,GAAG,cAAc,CAAC;AAErE,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,iBAAiB,EAAE,yBAAyB,CAAC;CAC9C;AAED,MAAM,WAAW,sBAAsB;IACrC;;;OAGG;IACH,OAAO,EAAE,kBAAkB,CAAC,iBAAiB,CAAC,CAAC;CAChD;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,YAAY,EAAE,sBAAsB,CAAC;CACtC"}
1
+ {"version":3,"file":"connectivity-api.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/point-of-sale/api/connectivity-api/connectivity-api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,oBAAoB,CAAC;AAE3D,MAAM,MAAM,yBAAyB,GAAG,WAAW,GAAG,cAAc,CAAC;AAErE;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,iBAAiB,EAAE,yBAAyB,CAAC;CAC9C;AAED,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,OAAO,EAAE,kBAAkB,CAAC,iBAAiB,CAAC,CAAC;CAChD;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,YAAY,EAAE,sBAAsB,CAAC;CACtC"}
@@ -1,9 +1,12 @@
1
+ /**
2
+ * The `CustomerApi` object provides access to customer data in customer-specific extension contexts. Access this property through `shopify.customer` to retrieve information about the customer currently being viewed or interacted with in the POS interface.
3
+ */
1
4
  export interface CustomerApi {
2
5
  customer: CustomerApiContent;
3
6
  }
4
7
  export interface CustomerApiContent {
5
8
  /**
6
- * The unique identifier for the customer
9
+ * The unique identifier for the customer. Use for customer lookups, applying customer-specific pricing, enabling personalized features, and integrating with external systems.
7
10
  */
8
11
  id: number;
9
12
  }
@@ -1 +1 @@
1
- {"version":3,"file":"customer-api.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/point-of-sale/api/customer-api/customer-api.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,kBAAkB,CAAC;CAC9B;AAED,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;CACZ"}
1
+ {"version":3,"file":"customer-api.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/point-of-sale/api/customer-api/customer-api.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,kBAAkB,CAAC;CAC9B;AAED,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;CACZ"}
@@ -1,19 +1,19 @@
1
1
  export interface DeviceApiContent {
2
2
  /**
3
- * The name of the device
3
+ * The name of the device as configured by the merchant or system. Use for displaying device information in interfaces, logging, or support contexts where device identification is helpful.
4
4
  */
5
5
  name: string;
6
6
  /**
7
- * The string ID of the device
7
+ * Retrieves the unique string identifier for the device. Returns a promise that resolves to the device ID. Use for device-specific data storage, analytics tracking, or implementing device-based permissions and configurations.
8
8
  */
9
9
  getDeviceId(): Promise<string>;
10
10
  /**
11
- * Whether the device is a tablet
11
+ * Determines whether the device is a tablet form factor. Returns a promise that resolves to `true` for tablets, `false` for other device types. Use for implementing responsive design, optimizing touch targets, or providing device-appropriate user experiences.
12
12
  */
13
13
  isTablet(): Promise<boolean>;
14
14
  }
15
15
  /**
16
- * Access information about the device, like name and ID
16
+ * The `DeviceApi` object provides access to device information and capabilities. Access these properties and methods through `shopify.device` to retrieve device details and check device characteristics.
17
17
  */
18
18
  export interface DeviceApi {
19
19
  device: DeviceApiContent;
@@ -1,17 +1,20 @@
1
+ /**
2
+ * The `DraftOrderApi` object provides access to draft order data in draft order-specific extension contexts. Access this property through `shopify.draftOrder` to retrieve information about the draft order currently being viewed or interacted with in the POS interface.
3
+ */
1
4
  export interface DraftOrderApi {
2
5
  draftOrder: DraftOrderApiContent;
3
6
  }
4
7
  export interface DraftOrderApiContent {
5
8
  /**
6
- * The unique identifier for the draft order
9
+ * The unique identifier for the draft order. Use for draft order lookups, implementing order-specific functionality, and integrating with external systems.
7
10
  */
8
11
  id: number;
9
12
  /**
10
- * The name of the draft order
13
+ * The name of the draft order as configured by the merchant. Use for draft order identification, displays, and customer-facing interfaces.
11
14
  */
12
15
  name: string;
13
16
  /**
14
- * The unique identifier of the customer associated with the draft order
17
+ * The unique identifier of the customer associated with the draft order. Returns `undefined` if no customer is associated. Use for customer-specific functionality and personalized experiences.
15
18
  */
16
19
  customerId?: number;
17
20
  }
@@ -1 +1 @@
1
- {"version":3,"file":"draft-order-api.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/point-of-sale/api/draft-order-api/draft-order-api.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa;IAC5B,UAAU,EAAE,oBAAoB,CAAC;CAClC;AAED,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB"}
1
+ {"version":3,"file":"draft-order-api.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/point-of-sale/api/draft-order-api/draft-order-api.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,UAAU,EAAE,oBAAoB,CAAC;CAClC;AAED,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB"}
@@ -1,13 +1,12 @@
1
1
  import type { ReadonlySignalLike } from '../../../../shared';
2
2
  export interface LocaleApiContent {
3
3
  /**
4
- * Provides read-only access to the current IETF-formatted locale and allows subscribing to locale changes.
5
- * The `value` property provides the current locale, and `subscribe` allows listening to changes.
4
+ * Provides read-only access to the current IETF-formatted locale and allows subscribing to locale changes. The `value` property provides the current locale, and `subscribe` allows listening to changes. Use for internationalization, locale-specific formatting, and reactive updates when merchants change language settings.
6
5
  */
7
6
  current: ReadonlySignalLike<string>;
8
7
  }
9
8
  /**
10
- * Access the merchant’s current locale (in [IETF format](https://en.wikipedia.org/wiki/IETF_language_tag)) to internationalize your extension content.
9
+ * The `LocaleApi` object provides access to current locale information and change notifications. Access these properties through `shopify.locale` to retrieve and monitor locale data.
11
10
  */
12
11
  export interface LocaleApi {
13
12
  locale: LocaleApiContent;
@@ -1 +1 @@
1
- {"version":3,"file":"locale-api.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/point-of-sale/api/locale-api/locale-api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,oBAAoB,CAAC;AAE3D,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,OAAO,EAAE,kBAAkB,CAAC,MAAM,CAAC,CAAC;CACrC;AAED;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,MAAM,EAAE,gBAAgB,CAAC;CAC1B"}
1
+ {"version":3,"file":"locale-api.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/point-of-sale/api/locale-api/locale-api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,oBAAoB,CAAC;AAE3D,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,OAAO,EAAE,kBAAkB,CAAC,MAAM,CAAC,CAAC;CACrC;AAED;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,MAAM,EAAE,gBAAgB,CAAC;CAC1B"}
@@ -1,41 +1,49 @@
1
+ /**
2
+ * Specifies configuration options for navigation operations. Allows passing state data that persists across navigation transitions.
3
+ */
1
4
  export interface NavigationNavigateOptions {
2
5
  /**
3
- * Developer-defined information to be stored in the associated NavigationHistoryEntry once the navigation is complete, retrievable via getState().
6
+ * Developer-defined information to be stored in the associated `NavigationHistoryEntry` once the navigation is complete, retrievable using `getState()`. Use to pass data between navigation states or implement stateful navigation workflows.
4
7
  */
5
8
  state?: unknown;
6
9
  }
7
10
  /**
8
- * The NavigationHistoryEntry interface of the Navigation API represents a single navigation history entry.
11
+ * Represents a single entry in the navigation history stack. Contains the URL and unique identifier for tracking navigation state and implementing history-based navigation.
9
12
  */
10
13
  export interface NavigationHistoryEntry {
11
- /** Returns the key of the history entry. This is a unique, UA-generated value that represents the history entry's slot in the entries list rather than the entry itself. */
14
+ /**
15
+ * A unique, UA-generated value that represents the history entry's slot in the entries list rather than the entry itself. Use for tracking navigation history or implementing navigation-based logic.
16
+ */
12
17
  key: string;
13
18
  /**
14
- * Returns the URL of this history entry.
19
+ * The URL of this history entry. Returns `null` if no URL is associated with the entry. Use for URL-based navigation logic, deep-linking, or displaying current location information.
15
20
  */
16
21
  url: string | null;
17
22
  /**
18
- * Returns a clone of the available state associated with this history entry.
23
+ * Returns a clone of the available state associated with this history entry. Use to retrieve navigation state data that was passed during navigation or to implement state-based navigation logic.
19
24
  */
20
25
  getState(): unknown;
21
26
  }
22
27
  export interface Navigation {
23
28
  /**
24
- * The navigate() method navigates to a specific URL, updating any provided state in the history entries list.
29
+ * Navigates to a specific URL, updating any provided state in the history entries list. Returns a promise that resolves when navigation is complete. Use for programmatic navigation between screens, implementing custom navigation controls, or deep-linking to specific modal states.
25
30
  */
26
31
  navigate: (url: string, options?: NavigationNavigateOptions) => Promise<void>;
27
32
  /**
28
- * The currentEntry read-only property of the Navigation interface returns a NavigationHistoryEntry object representing the location the user is currently navigated to right now.
33
+ * Returns a `NavigationHistoryEntry` object representing the location the user is currently navigated to. Use to access current URL, navigation state, or implement navigation-aware functionality based on the current location.
29
34
  */
30
35
  currentEntry: NavigationHistoryEntry;
31
36
  /**
32
- * The back() method of the Navigation interface navigates to the previous entry in the history list.
37
+ * Navigates to the previous entry in the history list. Use for implementing back buttons, breadcrumb navigation, or allowing users to return to previous screens in multi-step workflows.
33
38
  */
34
39
  back(): void;
35
40
  }
41
+ /**
42
+ * The global `window` object provides control over the extension modal lifecycle. Access these properties and methods directly through the global `window` object to manage the modal interface programmatically.
43
+ */
36
44
  export interface Window {
37
45
  /**
38
- * The close() method of the window interface closes the extension screen.
46
+ * Closes the extension screen and dismisses the modal interface. Use to programmatically close the modal after completing a workflow, canceling an operation, or when user action is no longer required. This provides the same behavior as the user dismissing the modal through the UI.
39
47
  */
40
48
  close(): void;
41
49
  }
@@ -1 +1 @@
1
- {"version":3,"file":"navigation-api.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/point-of-sale/api/navigation-api/navigation-api.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,4KAA4K;IAC5K,GAAG,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB;;OAEG;IACH,QAAQ,IAAI,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,UAAU;IACzB;;OAEG;IACH,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,yBAAyB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9E;;OAEG;IACH,YAAY,EAAE,sBAAsB,CAAC;IACrC;;OAEG;IACH,IAAI,IAAI,IAAI,CAAC;CACd;AAED,MAAM,WAAW,MAAM;IACrB;;OAEG;IACH,KAAK,IAAI,IAAI,CAAC;CACf"}
1
+ {"version":3,"file":"navigation-api.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/point-of-sale/api/navigation-api/navigation-api.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB;;OAEG;IACH,QAAQ,IAAI,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,UAAU;IACzB;;OAEG;IACH,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,yBAAyB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9E;;OAEG;IACH,YAAY,EAAE,sBAAsB,CAAC;IACrC;;OAEG;IACH,IAAI,IAAI,IAAI,CAAC;CACd;AAED;;GAEG;AACH,MAAM,WAAW,MAAM;IACrB;;OAEG;IACH,KAAK,IAAI,IAAI,CAAC;CACf"}
@@ -1,23 +1,23 @@
1
1
  /**
2
- * Interface to access the order
2
+ * The `OrderApi` object provides access to order data in order-specific extension contexts. Access this property through `shopify.order` to retrieve information about the order currently being viewed or interacted with in the POS interface.
3
3
  */
4
4
  export interface OrderApi {
5
5
  order: OrderApiContent;
6
6
  }
7
7
  /**
8
- * Interface for Order details
8
+ * The `OrderApi` object provides access to order data. Access this property through `shopify.order` to interact with the current order context.
9
9
  */
10
10
  export interface OrderApiContent {
11
11
  /**
12
- * The unique identifier for the order
12
+ * The unique identifier for the order. Use for order lookups, implementing order-specific functionality, and integrating with external systems.
13
13
  */
14
14
  id: number;
15
15
  /**
16
- * The name of the order
16
+ * The name of the order as configured by the merchant. Use for order identification, displays, and customer-facing interfaces.
17
17
  */
18
18
  name: string;
19
19
  /**
20
- * The unique identifier of the customer associated with the order
20
+ * The unique identifier of the customer associated with the order. Returns `undefined` if no customer is associated. Use for customer-specific functionality and personalized experiences.
21
21
  */
22
22
  customerId?: number;
23
23
  }
@@ -1,22 +1,18 @@
1
1
  import { PinPadOptions, PinValidationResult } from '../types/pin-pad';
2
2
  export interface PinPadApiContent {
3
- /** Shows a PIN pad to the user in a modal dialog.
3
+ /**
4
+ * Shows a PIN pad to the user in a modal dialog. The `onSubmit` function is called when the PIN is submitted and should validate the PIN, returning `'accept'` or `'reject'`.
4
5
  *
5
- * `onSubmit` is called when the PIN is submitted for validation by the user. The callback
6
- * should validate the PIN and accept or reject it.
6
+ * **When accepted**: Modal dismisses and triggers the `onDismissed` callback—perform any post-validation navigation in this callback rather than in `onSubmit`.
7
7
  *
8
- * If the PIN is accepted, the modal will be dismissed and the `onDismissed` callback
9
- * (provided via `options`) will be called. It is recommended that any post-validation
10
- * navigation is performed in this callback rather than in `onSubmit`.
11
- *
12
- * If the PIN is rejected, the optional `errorMessage` will be displayed to the user and the modal
13
- * will not be dismissed.
8
+ * **When rejected**: Displays the optional `errorMessage` and keeps the modal open.
14
9
  *
10
+ * Use for implementing secure authentication workflows, access control, or PIN-based verification systems.
15
11
  */
16
12
  showPinPad(onSubmit: (pin: number[]) => Promise<PinValidationResult> | PinValidationResult, options?: PinPadOptions): void;
17
13
  }
18
14
  /**
19
- * Access the PIN Pad API for PIN pad functionality in a modal.
15
+ * The `PinPadApi` object provides methods for displaying secure PIN entry interfaces. Access these methods through `shopify.pinPad` to show PIN pad modals and handle PIN validation.
20
16
  */
21
17
  export interface PinPadApi {
22
18
  pinPad: PinPadApiContent;
@@ -1 +1 @@
1
- {"version":3,"file":"pin-pad-api.d.ts","sourceRoot":"","sources":["../../../../../src/surfaces/point-of-sale/api/pin-pad-api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,aAAa,EAAE,mBAAmB,EAAC,MAAM,kBAAkB,CAAC;AAEpE,MAAM,WAAW,gBAAgB;IAC/B;;;;;;;;;;;;OAYG;IACH,UAAU,CACR,QAAQ,EAAE,CACR,GAAG,EAAE,MAAM,EAAE,KACV,OAAO,CAAC,mBAAmB,CAAC,GAAG,mBAAmB,EACvD,OAAO,CAAC,EAAE,aAAa,GACtB,IAAI,CAAC;CACT;AAED;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,MAAM,EAAE,gBAAgB,CAAC;CAC1B"}
1
+ {"version":3,"file":"pin-pad-api.d.ts","sourceRoot":"","sources":["../../../../../src/surfaces/point-of-sale/api/pin-pad-api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,aAAa,EAAE,mBAAmB,EAAC,MAAM,kBAAkB,CAAC;AAEpE,MAAM,WAAW,gBAAgB;IAC/B;;;;;;;;OAQG;IACH,UAAU,CACR,QAAQ,EAAE,CACR,GAAG,EAAE,MAAM,EAAE,KACV,OAAO,CAAC,mBAAmB,CAAC,GAAG,mBAAmB,EACvD,OAAO,CAAC,EAAE,aAAa,GACtB,IAAI,CAAC;CACT;AAED;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,MAAM,EAAE,gBAAgB,CAAC;CAC1B"}
@@ -1,19 +1,15 @@
1
1
  /**
2
- * Access the print API for printing functionality
2
+ * The `PrintApi` object provides methods for triggering document printing. Access these methods through `shopify.print` to initiate print operations with various document types.
3
3
  */
4
4
  export interface PrintApiContent {
5
5
  /**
6
- * Trigger a print dialog.
6
+ * Triggers a print dialog for the specified document source. The `print()` method accepts either:
7
7
  *
8
- * The src must be either:
9
- * - A relative path that will be appended to your app's [application_url](/docs/apps/build/cli-for-apps/app-configuration#application_url)
10
- * - A full URL to your app's backend that will be used to return the document to print
8
+ * A relative path that will be appended to your app's [`application_url`](/docs/apps/build/cli-for-apps/app-configuration)
11
9
  *
12
- * Supported document types:
13
- * - HTML documents (recommended for best printing experience)
14
- * - Text files
15
- * - Image files (PNG, JPEG, etc.)
16
- * - PDF files (Note: On Android devices, PDFs will be downloaded and must be printed using an external application)
10
+ * A full URL to your app's backend that will be used to return the document to print
11
+ *
12
+ * Returns a promise that resolves when content is ready and the native print dialog appears. Use for printing custom documents, receipts, labels, or reports.
17
13
  *
18
14
  * @param src the source URL of the content to print.
19
15
  * @returns Promise<void> that resolves when content is ready and native print dialog appears.
@@ -21,9 +17,12 @@ export interface PrintApiContent {
21
17
  print(src: string): Promise<void>;
22
18
  }
23
19
  /**
24
- * Interface for printing
20
+ * The `PrintApi` object provides methods for triggering document printing. Access these methods through `shopify.print` to initiate print operations with various document types.
25
21
  */
26
22
  export interface PrintApi {
23
+ /**
24
+ * The `PrintApi` object provides methods for triggering document printing. Access these methods through `shopify.print` to initiate print operations with various document types.
25
+ */
27
26
  print: PrintApiContent;
28
27
  }
29
28
  //# sourceMappingURL=print-api.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"print-api.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/point-of-sale/api/print-api/print-api.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B;;;;;;;;;;;;;;;OAeG;IACH,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACnC;AAED;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB,KAAK,EAAE,eAAe,CAAC;CACxB"}
1
+ {"version":3,"file":"print-api.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/point-of-sale/api/print-api/print-api.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B;;;;;;;;;;;OAWG;IACH,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACnC;AAED;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB;;OAEG;IACH,KAAK,EAAE,eAAe,CAAC;CACxB"}