@shopify/ui-extensions 2026.10.0-rc.9 → 2026.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (329) hide show
  1. package/build/cjs/surfaces/customer-account/preact/authenticated-account.js +1 -1
  2. package/build/cjs/surfaces/point-of-sale/events.js +39 -22
  3. package/build/cjs/surfaces/point-of-sale/pos-list-template.js +339 -0
  4. package/build/cjs/surfaces/point-of-sale.js +2 -0
  5. package/build/esm/surfaces/customer-account/preact/authenticated-account.mjs +1 -1
  6. package/build/esm/surfaces/point-of-sale/events.mjs +39 -22
  7. package/build/esm/surfaces/point-of-sale/pos-list-template.mjs +331 -0
  8. package/build/esm/surfaces/point-of-sale.mjs +1 -0
  9. package/build/esnext/surfaces/customer-account/preact/authenticated-account.esnext +1 -1
  10. package/build/esnext/surfaces/point-of-sale/events.esnext +39 -22
  11. package/build/esnext/surfaces/point-of-sale/pos-list-template.esnext +331 -0
  12. package/build/esnext/surfaces/point-of-sale.esnext +1 -0
  13. package/build/ts/shared.d.ts +6 -20
  14. package/build/ts/shared.d.ts.map +1 -1
  15. package/build/ts/surfaces/admin/api/picker/picker.d.ts +2 -2
  16. package/build/ts/surfaces/admin/api/picker/picker.d.ts.map +1 -1
  17. package/build/ts/surfaces/admin/components/AdminAction.d.ts +2 -2
  18. package/build/ts/surfaces/admin/components/AdminBlock.d.ts +3 -3
  19. package/build/ts/surfaces/admin/components/AdminPrintAction.d.ts +2 -2
  20. package/build/ts/surfaces/admin/components/AppNav.d.ts +1 -1
  21. package/build/ts/surfaces/admin/components/Avatar.d.ts +1 -1
  22. package/build/ts/surfaces/admin/components/Badge.d.ts +1 -1
  23. package/build/ts/surfaces/admin/components/Banner.d.ts +1 -1
  24. package/build/ts/surfaces/admin/components/Box.d.ts +1 -1
  25. package/build/ts/surfaces/admin/components/Button.d.ts +1 -1
  26. package/build/ts/surfaces/admin/components/ButtonGroup.d.ts +1 -1
  27. package/build/ts/surfaces/admin/components/Checkbox.d.ts +3 -3
  28. package/build/ts/surfaces/admin/components/Chip.d.ts +1 -1
  29. package/build/ts/surfaces/admin/components/Choice.d.ts +3 -3
  30. package/build/ts/surfaces/admin/components/ChoiceList.d.ts +3 -3
  31. package/build/ts/surfaces/admin/components/Clickable.d.ts +1 -1
  32. package/build/ts/surfaces/admin/components/ClickableChip.d.ts +1 -1
  33. package/build/ts/surfaces/admin/components/ColorField.d.ts +1 -1
  34. package/build/ts/surfaces/admin/components/ColorPicker.d.ts +1 -1
  35. package/build/ts/surfaces/admin/components/DateField.d.ts +1 -1
  36. package/build/ts/surfaces/admin/components/DatePicker.d.ts +1 -1
  37. package/build/ts/surfaces/admin/components/Divider.d.ts +1 -1
  38. package/build/ts/surfaces/admin/components/DropZone.d.ts +1 -1
  39. package/build/ts/surfaces/admin/components/EmailField.d.ts +1 -1
  40. package/build/ts/surfaces/admin/components/EmptyState.d.ts +1 -1
  41. package/build/ts/surfaces/admin/components/Form.d.ts +1 -1
  42. package/build/ts/surfaces/admin/components/FunctionSettings.d.ts +1 -1
  43. package/build/ts/surfaces/admin/components/Grid.d.ts +1 -1
  44. package/build/ts/surfaces/admin/components/GridItem.d.ts +1 -1
  45. package/build/ts/surfaces/admin/components/Heading.d.ts +1 -1
  46. package/build/ts/surfaces/admin/components/Icon.d.ts +1 -1
  47. package/build/ts/surfaces/admin/components/Image.d.ts +1 -1
  48. package/build/ts/surfaces/admin/components/Link.d.ts +1 -1
  49. package/build/ts/surfaces/admin/components/ListItem.d.ts +1 -1
  50. package/build/ts/surfaces/admin/components/Menu.d.ts +1 -1
  51. package/build/ts/surfaces/admin/components/Modal.d.ts +1 -1
  52. package/build/ts/surfaces/admin/components/MoneyField.d.ts +1 -1
  53. package/build/ts/surfaces/admin/components/Number.d.ts +1 -1
  54. package/build/ts/surfaces/admin/components/NumberField.d.ts +1 -1
  55. package/build/ts/surfaces/admin/components/Option.d.ts +3 -3
  56. package/build/ts/surfaces/admin/components/OptionGroup.d.ts +1 -1
  57. package/build/ts/surfaces/admin/components/OrderedList.d.ts +1 -1
  58. package/build/ts/surfaces/admin/components/Page.d.ts +1 -1
  59. package/build/ts/surfaces/admin/components/Paragraph.d.ts +1 -1
  60. package/build/ts/surfaces/admin/components/PasswordField.d.ts +1 -1
  61. package/build/ts/surfaces/admin/components/Popover.d.ts +1 -1
  62. package/build/ts/surfaces/admin/components/Progress.d.ts +155 -0
  63. package/build/ts/surfaces/admin/components/QueryContainer.d.ts +1 -1
  64. package/build/ts/surfaces/admin/components/SearchField.d.ts +1 -1
  65. package/build/ts/surfaces/admin/components/Section.d.ts +11 -3
  66. package/build/ts/surfaces/admin/components/Select.d.ts +1 -1
  67. package/build/ts/surfaces/admin/components/Spinner.d.ts +1 -1
  68. package/build/ts/surfaces/admin/components/Stack.d.ts +1 -1
  69. package/build/ts/surfaces/admin/components/StandardComponents.d.ts +1 -1
  70. package/build/ts/surfaces/admin/components/StandardComponents.d.ts.map +1 -1
  71. package/build/ts/surfaces/admin/components/Switch.d.ts +3 -3
  72. package/build/ts/surfaces/admin/components/Table.d.ts +1 -1
  73. package/build/ts/surfaces/admin/components/TableBody.d.ts +1 -1
  74. package/build/ts/surfaces/admin/components/TableCell.d.ts +1 -1
  75. package/build/ts/surfaces/admin/components/TableHeader.d.ts +1 -1
  76. package/build/ts/surfaces/admin/components/TableHeaderRow.d.ts +1 -1
  77. package/build/ts/surfaces/admin/components/TableRow.d.ts +1 -1
  78. package/build/ts/surfaces/admin/components/Text.d.ts +1 -1
  79. package/build/ts/surfaces/admin/components/TextArea.d.ts +1 -1
  80. package/build/ts/surfaces/admin/components/TextField.d.ts +1 -1
  81. package/build/ts/surfaces/admin/components/Thumbnail.d.ts +1 -1
  82. package/build/ts/surfaces/admin/components/Tooltip.d.ts +1 -1
  83. package/build/ts/surfaces/admin/components/URLField.d.ts +1 -1
  84. package/build/ts/surfaces/admin/components/UnorderedList.d.ts +1 -1
  85. package/build/ts/surfaces/admin/components/shared.d.ts +47 -7
  86. package/build/ts/surfaces/admin/targets/admin.abandoned-checkout-details.action.render.d.ts +3 -0
  87. package/build/ts/surfaces/admin/targets/admin.abandoned-checkout-details.block.render.d.ts +3 -0
  88. package/build/ts/surfaces/admin/targets/admin.abandoned-checkout-index.action.render.d.ts +3 -0
  89. package/build/ts/surfaces/admin/targets/admin.app.home.render.d.ts +3 -0
  90. package/build/ts/surfaces/admin/targets/admin.app.intent.render.d.ts +3 -0
  91. package/build/ts/surfaces/admin/targets/admin.catalog-details.action.render.d.ts +3 -0
  92. package/build/ts/surfaces/admin/targets/admin.catalog-details.block.render.d.ts +3 -0
  93. package/build/ts/surfaces/admin/targets/admin.collection-details.action.render.d.ts +3 -0
  94. package/build/ts/surfaces/admin/targets/admin.collection-details.block.render.d.ts +3 -0
  95. package/build/ts/surfaces/admin/targets/admin.collection-index.action.render.d.ts +3 -0
  96. package/build/ts/surfaces/admin/targets/admin.company-details.action.render.d.ts +3 -0
  97. package/build/ts/surfaces/admin/targets/admin.company-details.block.render.d.ts +3 -0
  98. package/build/ts/surfaces/admin/targets/admin.company-location-details.block.render.d.ts +3 -0
  99. package/build/ts/surfaces/admin/targets/admin.customer-details.action.render.d.ts +3 -0
  100. package/build/ts/surfaces/admin/targets/admin.customer-details.block.render.d.ts +3 -0
  101. package/build/ts/surfaces/admin/targets/admin.customer-index.action.render.d.ts +3 -0
  102. package/build/ts/surfaces/admin/targets/admin.customer-index.selection-action.render.d.ts +3 -0
  103. package/build/ts/surfaces/admin/targets/admin.customer-segment-details.action.render.d.ts +3 -0
  104. package/build/ts/surfaces/admin/targets/admin.discount-details.action.render.d.ts +3 -0
  105. package/build/ts/surfaces/admin/targets/admin.discount-details.function-settings.render.d.ts +3 -0
  106. package/build/ts/surfaces/admin/targets/admin.discount-index.action.render.d.ts +3 -0
  107. package/build/ts/surfaces/admin/targets/admin.discount-index.selection-action.render.d.ts +3 -0
  108. package/build/ts/surfaces/admin/targets/admin.draft-order-details.action.render.d.ts +3 -0
  109. package/build/ts/surfaces/admin/targets/admin.draft-order-details.block.render.d.ts +3 -0
  110. package/build/ts/surfaces/admin/targets/admin.draft-order-index.action.render.d.ts +3 -0
  111. package/build/ts/surfaces/admin/targets/admin.draft-order-index.selection-action.render.d.ts +3 -0
  112. package/build/ts/surfaces/admin/targets/admin.gift-card-details.action.render.d.ts +3 -0
  113. package/build/ts/surfaces/admin/targets/admin.gift-card-details.block.render.d.ts +3 -0
  114. package/build/ts/surfaces/admin/targets/admin.order-details.action.render.d.ts +3 -0
  115. package/build/ts/surfaces/admin/targets/admin.order-details.block.render.d.ts +3 -0
  116. package/build/ts/surfaces/admin/targets/admin.order-details.print-action.render.d.ts +3 -0
  117. package/build/ts/surfaces/admin/targets/admin.order-fulfilled-card.action.render.d.ts +3 -0
  118. package/build/ts/surfaces/admin/targets/admin.order-index.action.render.d.ts +3 -0
  119. package/build/ts/surfaces/admin/targets/admin.order-index.selection-action.render.d.ts +3 -0
  120. package/build/ts/surfaces/admin/targets/admin.order-index.selection-print-action.render.d.ts +3 -0
  121. package/build/ts/surfaces/admin/targets/admin.product-details.action.render.d.ts +3 -0
  122. package/build/ts/surfaces/admin/targets/admin.product-details.block.render.d.ts +3 -0
  123. package/build/ts/surfaces/admin/targets/admin.product-details.configuration.render.d.ts +3 -0
  124. package/build/ts/surfaces/admin/targets/admin.product-details.print-action.render.d.ts +3 -0
  125. package/build/ts/surfaces/admin/targets/admin.product-details.reorder.render.d.ts +3 -0
  126. package/build/ts/surfaces/admin/targets/admin.product-index.action.render.d.ts +3 -0
  127. package/build/ts/surfaces/admin/targets/admin.product-index.selection-action.render.d.ts +3 -0
  128. package/build/ts/surfaces/admin/targets/admin.product-index.selection-print-action.render.d.ts +3 -0
  129. package/build/ts/surfaces/admin/targets/admin.product-purchase-option.action.render.d.ts +3 -0
  130. package/build/ts/surfaces/admin/targets/admin.product-variant-details.action.render.d.ts +3 -0
  131. package/build/ts/surfaces/admin/targets/admin.product-variant-details.block.render.d.ts +3 -0
  132. package/build/ts/surfaces/admin/targets/admin.product-variant-details.configuration.render.d.ts +3 -0
  133. package/build/ts/surfaces/admin/targets/admin.product-variant-purchase-option.action.render.d.ts +3 -0
  134. package/build/ts/surfaces/admin/targets/admin.settings.internal-order-routing-rule.render.d.ts +3 -0
  135. package/build/ts/surfaces/admin/targets/admin.settings.order-routing-rule.render.d.ts +3 -0
  136. package/build/ts/surfaces/admin/targets/admin.settings.validation.render.d.ts +3 -0
  137. package/build/ts/surfaces/checkout/api/address-autocomplete/format-suggestion.d.ts +7 -0
  138. package/build/ts/surfaces/checkout/api/address-autocomplete/format-suggestion.d.ts.map +1 -1
  139. package/build/ts/surfaces/checkout/api/address-autocomplete/shared.d.ts +8 -1
  140. package/build/ts/surfaces/checkout/api/address-autocomplete/shared.d.ts.map +1 -1
  141. package/build/ts/surfaces/checkout/api/address-autocomplete/standard.d.ts +2 -2
  142. package/build/ts/surfaces/checkout/api/address-autocomplete/standard.d.ts.map +1 -1
  143. package/build/ts/surfaces/checkout/api/address-autocomplete/suggest.d.ts +7 -0
  144. package/build/ts/surfaces/checkout/api/address-autocomplete/suggest.d.ts.map +1 -1
  145. package/build/ts/surfaces/checkout/api/checkout/checkout.d.ts +15 -4
  146. package/build/ts/surfaces/checkout/api/checkout/checkout.d.ts.map +1 -1
  147. package/build/ts/surfaces/checkout/api/shared.d.ts +102 -1
  148. package/build/ts/surfaces/checkout/api/shared.d.ts.map +1 -1
  149. package/build/ts/surfaces/checkout/api/standard/standard.d.ts +8 -2
  150. package/build/ts/surfaces/checkout/api/standard/standard.d.ts.map +1 -1
  151. package/build/ts/surfaces/checkout/components/MoneyField.d.ts +3 -1
  152. package/build/ts/surfaces/checkout/components/NumberField.d.ts +3 -1
  153. package/build/ts/surfaces/checkout/components/components-shared.d.ts +1 -1
  154. package/build/ts/surfaces/checkout/preact/country.d.ts +1 -1
  155. package/build/ts/surfaces/checkout/preact/country.d.ts.map +1 -1
  156. package/build/ts/surfaces/checkout.d.ts +2 -2
  157. package/build/ts/surfaces/checkout.d.ts.map +1 -1
  158. package/build/ts/surfaces/customer-account/api/shared.d.ts +26 -7
  159. package/build/ts/surfaces/customer-account/api/shared.d.ts.map +1 -1
  160. package/build/ts/surfaces/customer-account/api.d.ts +1 -1
  161. package/build/ts/surfaces/customer-account/api.d.ts.map +1 -1
  162. package/build/ts/surfaces/customer-account/components/MoneyField.d.ts +3 -1
  163. package/build/ts/surfaces/customer-account/components/NumberField.d.ts +3 -1
  164. package/build/ts/surfaces/customer-account/components/components-shared.d.ts +1 -1
  165. package/build/ts/surfaces/customer-account/preact/authenticated-account.d.ts +3 -3
  166. package/build/ts/surfaces/customer-account/preact/authenticated-account.d.ts.map +1 -1
  167. package/build/ts/surfaces/point-of-sale/api/cart-api/cart-api.d.ts +13 -0
  168. package/build/ts/surfaces/point-of-sale/api/cart-api/cart-api.d.ts.map +1 -1
  169. package/build/ts/surfaces/point-of-sale/api/device-api/device-api.d.ts +4 -0
  170. package/build/ts/surfaces/point-of-sale/api/device-api/device-api.d.ts.map +1 -1
  171. package/build/ts/surfaces/point-of-sale/api/docs.d.ts +7 -0
  172. package/build/ts/surfaces/point-of-sale/api/docs.d.ts.map +1 -1
  173. package/build/ts/surfaces/point-of-sale/api/extension-api/extension-api.d.ts +25 -5
  174. package/build/ts/surfaces/point-of-sale/api/extension-api/extension-api.d.ts.map +1 -1
  175. package/build/ts/surfaces/point-of-sale/api/navigation-api/navigation-api.d.ts +19 -7
  176. package/build/ts/surfaces/point-of-sale/api/navigation-api/navigation-api.d.ts.map +1 -1
  177. package/build/ts/surfaces/point-of-sale/api/resolution-api/resolution-api.d.ts +28 -3
  178. package/build/ts/surfaces/point-of-sale/api/resolution-api/resolution-api.d.ts.map +1 -1
  179. package/build/ts/surfaces/point-of-sale/api/session-api/session-api.d.ts +1 -1
  180. package/build/ts/surfaces/point-of-sale/api.d.ts +2 -2
  181. package/build/ts/surfaces/point-of-sale/api.d.ts.map +1 -1
  182. package/build/ts/surfaces/point-of-sale/components/POSList.d.ts +179 -0
  183. package/build/ts/surfaces/point-of-sale/components/targets/BlockExtensionComponents.d.ts +1 -1
  184. package/build/ts/surfaces/point-of-sale/components/targets/BlockExtensionComponents.d.ts.map +1 -1
  185. package/build/ts/surfaces/point-of-sale/components/targets/ResolutionComponents.d.ts +1 -1
  186. package/build/ts/surfaces/point-of-sale/components/targets/ResolutionComponents.d.ts.map +1 -1
  187. package/build/ts/surfaces/point-of-sale/components/targets/StandardComponents.d.ts +1 -1
  188. package/build/ts/surfaces/point-of-sale/components/targets/StandardComponents.d.ts.map +1 -1
  189. package/build/ts/surfaces/point-of-sale/event/data/BaseData.d.ts +12 -1
  190. package/build/ts/surfaces/point-of-sale/event/data/BaseData.d.ts.map +1 -1
  191. package/build/ts/surfaces/point-of-sale/event/data.d.ts +1 -1
  192. package/build/ts/surfaces/point-of-sale/event/data.d.ts.map +1 -1
  193. package/build/ts/surfaces/point-of-sale/events/scan-event.d.ts +34 -0
  194. package/build/ts/surfaces/point-of-sale/events/scan-event.d.ts.map +1 -0
  195. package/build/ts/surfaces/point-of-sale/events.d.ts +58 -28
  196. package/build/ts/surfaces/point-of-sale/events.d.ts.map +1 -1
  197. package/build/ts/surfaces/point-of-sale/extension-targets.d.ts +4 -4
  198. package/build/ts/surfaces/point-of-sale/extension-targets.d.ts.map +1 -1
  199. package/build/ts/surfaces/point-of-sale/globals.d.ts +0 -2
  200. package/build/ts/surfaces/point-of-sale/globals.d.ts.map +1 -1
  201. package/build/ts/surfaces/point-of-sale/pos-list-template.d.ts +36 -0
  202. package/build/ts/surfaces/point-of-sale/pos-list-template.d.ts.map +1 -0
  203. package/build/ts/surfaces/point-of-sale/targets/pos.cart.line-item-details.action.render.d.ts +1 -0
  204. package/build/ts/surfaces/point-of-sale/targets/pos.cart.validations.resolution.render.d.ts +1 -0
  205. package/build/ts/surfaces/point-of-sale/targets/pos.customer-details.action.render.d.ts +1 -0
  206. package/build/ts/surfaces/point-of-sale/targets/pos.draft-order-details.action.render.d.ts +1 -0
  207. package/build/ts/surfaces/point-of-sale/targets/pos.exchange.post.action.render.d.ts +1 -0
  208. package/build/ts/surfaces/point-of-sale/targets/pos.home.modal.render.d.ts +1 -0
  209. package/build/ts/surfaces/point-of-sale/targets/pos.order-details.action.render.d.ts +1 -0
  210. package/build/ts/surfaces/point-of-sale/targets/pos.payment.validations.resolution.render.d.ts +1 -0
  211. package/build/ts/surfaces/point-of-sale/targets/pos.product-details.action.render.d.ts +1 -0
  212. package/build/ts/surfaces/point-of-sale/targets/pos.purchase.post.action.render.d.ts +1 -0
  213. package/build/ts/surfaces/point-of-sale/targets/pos.register-details.action.render.d.ts +1 -0
  214. package/build/ts/surfaces/point-of-sale/targets/pos.return.post.action.render.d.ts +1 -0
  215. package/build/ts/surfaces/point-of-sale/types/session.d.ts +0 -6
  216. package/build/ts/surfaces/point-of-sale/types/session.d.ts.map +1 -1
  217. package/build/ts/surfaces/point-of-sale.d.ts +1 -0
  218. package/build/ts/surfaces/point-of-sale.d.ts.map +1 -1
  219. package/build/tsconfig.tsbuildinfo +1 -1
  220. package/package.json +2 -1
  221. package/src/shared.ts +22 -21
  222. package/src/surfaces/admin/api/picker/picker.ts +5 -2
  223. package/src/surfaces/admin/components/AdminAction.d.ts +2 -2
  224. package/src/surfaces/admin/components/AdminBlock.d.ts +3 -3
  225. package/src/surfaces/admin/components/AdminPrintAction.d.ts +2 -2
  226. package/src/surfaces/admin/components/AppNav.d.ts +1 -1
  227. package/src/surfaces/admin/components/Avatar.d.ts +1 -1
  228. package/src/surfaces/admin/components/Badge.d.ts +1 -1
  229. package/src/surfaces/admin/components/Banner.d.ts +1 -1
  230. package/src/surfaces/admin/components/Box.d.ts +1 -1
  231. package/src/surfaces/admin/components/Button.d.ts +1 -1
  232. package/src/surfaces/admin/components/ButtonGroup.d.ts +1 -1
  233. package/src/surfaces/admin/components/Checkbox.d.ts +3 -3
  234. package/src/surfaces/admin/components/Chip.d.ts +1 -1
  235. package/src/surfaces/admin/components/Choice.d.ts +3 -3
  236. package/src/surfaces/admin/components/ChoiceList.d.ts +3 -3
  237. package/src/surfaces/admin/components/Clickable.d.ts +1 -1
  238. package/src/surfaces/admin/components/ClickableChip.d.ts +1 -1
  239. package/src/surfaces/admin/components/ColorField.d.ts +1 -1
  240. package/src/surfaces/admin/components/ColorPicker.d.ts +1 -1
  241. package/src/surfaces/admin/components/DateField.d.ts +1 -1
  242. package/src/surfaces/admin/components/DatePicker.d.ts +1 -1
  243. package/src/surfaces/admin/components/Divider.d.ts +1 -1
  244. package/src/surfaces/admin/components/DropZone.d.ts +1 -1
  245. package/src/surfaces/admin/components/EmailField.d.ts +1 -1
  246. package/src/surfaces/admin/components/EmptyState.d.ts +1 -1
  247. package/src/surfaces/admin/components/Form.d.ts +1 -1
  248. package/src/surfaces/admin/components/FunctionSettings.d.ts +1 -1
  249. package/src/surfaces/admin/components/Grid.d.ts +1 -1
  250. package/src/surfaces/admin/components/GridItem.d.ts +1 -1
  251. package/src/surfaces/admin/components/Heading.d.ts +1 -1
  252. package/src/surfaces/admin/components/Icon.d.ts +1 -1
  253. package/src/surfaces/admin/components/Image.d.ts +1 -1
  254. package/src/surfaces/admin/components/Link.d.ts +1 -1
  255. package/src/surfaces/admin/components/ListItem.d.ts +1 -1
  256. package/src/surfaces/admin/components/Menu.d.ts +1 -1
  257. package/src/surfaces/admin/components/Modal.d.ts +1 -1
  258. package/src/surfaces/admin/components/MoneyField.d.ts +1 -1
  259. package/src/surfaces/admin/components/Number.d.ts +1 -1
  260. package/src/surfaces/admin/components/NumberField.d.ts +1 -1
  261. package/src/surfaces/admin/components/Option.d.ts +3 -3
  262. package/src/surfaces/admin/components/OptionGroup.d.ts +1 -1
  263. package/src/surfaces/admin/components/OrderedList.d.ts +1 -1
  264. package/src/surfaces/admin/components/Page.d.ts +1 -1
  265. package/src/surfaces/admin/components/Paragraph.d.ts +1 -1
  266. package/src/surfaces/admin/components/PasswordField.d.ts +1 -1
  267. package/src/surfaces/admin/components/Popover.d.ts +1 -1
  268. package/src/surfaces/admin/components/Progress.d.ts +155 -0
  269. package/src/surfaces/admin/components/QueryContainer.d.ts +1 -1
  270. package/src/surfaces/admin/components/SearchField.d.ts +1 -1
  271. package/src/surfaces/admin/components/Section.d.ts +11 -3
  272. package/src/surfaces/admin/components/Select.d.ts +1 -1
  273. package/src/surfaces/admin/components/Spinner.d.ts +1 -1
  274. package/src/surfaces/admin/components/Stack.d.ts +1 -1
  275. package/src/surfaces/admin/components/StandardComponents.ts +3 -0
  276. package/src/surfaces/admin/components/Switch.d.ts +3 -3
  277. package/src/surfaces/admin/components/Table.d.ts +1 -1
  278. package/src/surfaces/admin/components/TableBody.d.ts +1 -1
  279. package/src/surfaces/admin/components/TableCell.d.ts +1 -1
  280. package/src/surfaces/admin/components/TableHeader.d.ts +1 -1
  281. package/src/surfaces/admin/components/TableHeaderRow.d.ts +1 -1
  282. package/src/surfaces/admin/components/TableRow.d.ts +1 -1
  283. package/src/surfaces/admin/components/Text.d.ts +1 -1
  284. package/src/surfaces/admin/components/TextArea.d.ts +1 -1
  285. package/src/surfaces/admin/components/TextField.d.ts +1 -1
  286. package/src/surfaces/admin/components/Thumbnail.d.ts +1 -1
  287. package/src/surfaces/admin/components/Tooltip.d.ts +1 -1
  288. package/src/surfaces/admin/components/URLField.d.ts +1 -1
  289. package/src/surfaces/admin/components/UnorderedList.d.ts +1 -1
  290. package/src/surfaces/admin/components/shared.d.ts +47 -7
  291. package/src/surfaces/admin/components.d.ts +8216 -2635
  292. package/src/surfaces/checkout/api/address-autocomplete/format-suggestion.ts +9 -0
  293. package/src/surfaces/checkout/api/address-autocomplete/shared.ts +9 -0
  294. package/src/surfaces/checkout/api/address-autocomplete/standard.ts +1 -2
  295. package/src/surfaces/checkout/api/address-autocomplete/suggest.ts +8 -0
  296. package/src/surfaces/checkout/api/checkout/checkout.ts +19 -9
  297. package/src/surfaces/checkout/api/shared.ts +110 -1
  298. package/src/surfaces/checkout/api/standard/standard.ts +11 -1
  299. package/src/surfaces/checkout/components/MoneyField.d.ts +3 -1
  300. package/src/surfaces/checkout/components/NumberField.d.ts +3 -1
  301. package/src/surfaces/checkout/components/components-shared.d.ts +1 -1
  302. package/src/surfaces/checkout/preact/country.ts +1 -1
  303. package/src/surfaces/checkout.ts +3 -0
  304. package/src/surfaces/customer-account/api/shared.ts +25 -7
  305. package/src/surfaces/customer-account/api.ts +1 -0
  306. package/src/surfaces/customer-account/preact/authenticated-account.ts +3 -3
  307. package/src/surfaces/point-of-sale/api/cart-api/cart-api.ts +14 -0
  308. package/src/surfaces/point-of-sale/api/device-api/device-api.ts +4 -0
  309. package/src/surfaces/point-of-sale/api/docs.ts +8 -0
  310. package/src/surfaces/point-of-sale/api/extension-api/extension-api.ts +25 -5
  311. package/src/surfaces/point-of-sale/api/navigation-api/navigation-api.ts +22 -7
  312. package/src/surfaces/point-of-sale/api/resolution-api/resolution-api.ts +30 -3
  313. package/src/surfaces/point-of-sale/api/session-api/session-api.ts +1 -1
  314. package/src/surfaces/point-of-sale/api.ts +2 -0
  315. package/src/surfaces/point-of-sale/components/POSList.d.ts +179 -0
  316. package/src/surfaces/point-of-sale/components/targets/BlockExtensionComponents.ts +0 -4
  317. package/src/surfaces/point-of-sale/components/targets/ResolutionComponents.ts +1 -1
  318. package/src/surfaces/point-of-sale/components/targets/StandardComponents.ts +1 -3
  319. package/src/surfaces/point-of-sale/components.d.ts +194 -0
  320. package/src/surfaces/point-of-sale/event/data/BaseData.ts +13 -1
  321. package/src/surfaces/point-of-sale/event/data.ts +1 -1
  322. package/src/surfaces/point-of-sale/events/scan-event.ts +34 -0
  323. package/src/surfaces/point-of-sale/events.ts +58 -27
  324. package/src/surfaces/point-of-sale/extension-targets.ts +4 -4
  325. package/src/surfaces/point-of-sale/globals.ts +0 -2
  326. package/src/surfaces/point-of-sale/pos-list-template.ts +351 -0
  327. package/src/surfaces/point-of-sale/tests/pos-list-template.test.ts +306 -0
  328. package/src/surfaces/point-of-sale/types/session.ts +0 -7
  329. package/src/surfaces/point-of-sale.ts +1 -0
@@ -6,7 +6,7 @@ var api = require('./api.js');
6
6
  var subscription = require('./subscription.js');
7
7
 
8
8
  /**
9
- * Returns the current authenticated `Customer`.
9
+ * Returns the current `AuthenticatedAccountCustomer`.
10
10
  *
11
11
  * The value is `undefined` if the customer isn't authenticated.
12
12
  */
@@ -11,7 +11,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
11
11
  const POS_EVENT_NAMES = {
12
12
  TRANSACTION_COMPLETE: 'transactioncomplete',
13
13
  CASH_TRACKING_SESSION_START: 'cashtrackingsessionstart',
14
- CASH_TRACKING_SESSION_COMPLETE: 'cashtrackingsessioncomplete'
14
+ CASH_TRACKING_SESSION_COMPLETE: 'cashtrackingsessioncomplete',
15
+ SCAN: 'scan'
15
16
  };
16
17
 
17
18
  /**
@@ -39,26 +40,26 @@ const POS_INTERCEPT_NAMES = {
39
40
  *
40
41
  * Used as the generic type parameter for `shopify.intercept`.
41
42
  *
42
- * @private
43
+ * @publicDocs
43
44
  */
44
45
 
45
46
  /**
46
47
  * The data carried by a `cartvalidations` event.
47
48
  *
48
- * @private
49
+ * @publicDocs
49
50
  */
50
51
 
51
52
  /**
52
53
  * The event a `cartvalidations` interceptor receives. Carries a snapshot of
53
54
  * the POS cart taken when the event was produced.
54
55
  *
55
- * @private
56
+ * @publicDocs
56
57
  */
57
58
 
58
59
  /**
59
60
  * The kind of payment method being attempted.
60
61
  *
61
- * @private
62
+ * @publicDocs
62
63
  */
63
64
 
64
65
  /**
@@ -68,7 +69,7 @@ const POS_INTERCEPT_NAMES = {
68
69
  * disambiguates method types a shop can have several of (for example custom
69
70
  * payment methods) as they become interceptable.
70
71
  *
71
- * @private
72
+ * @publicDocs
72
73
  */
73
74
 
74
75
  /**
@@ -76,77 +77,93 @@ const POS_INTERCEPT_NAMES = {
76
77
  * attempt's payment method and amount; split payments produce one event per
77
78
  * tender, each with its own amount.
78
79
  *
79
- * @private
80
+ * @publicDocs
80
81
  */
81
82
 
82
83
  /**
83
84
  * The data carried by a `paymentvalidations` event.
84
85
  *
85
- * @private
86
+ * @publicDocs
86
87
  */
87
88
 
88
89
  /**
89
90
  * Targets the whole cart rather than a specific line item.
90
91
  *
91
- * @private
92
+ * @publicDocs
92
93
  */
93
94
 
94
95
  /**
95
96
  * Targets one cart line item by its `uuid` from this event's `cart` snapshot,
96
97
  * for example `$.cart.lineItems['adfd6b06-4a24-4f5f-9f4b-ea21f4432dd4']`.
97
98
  *
98
- * @private
99
+ * @publicDocs
99
100
  */
100
101
 
101
- /** @private */
102
+ /**
103
+ * A target that a `cartvalidations` interceptor can use: the whole cart or
104
+ * one cart line item.
105
+ *
106
+ * @publicDocs
107
+ */
102
108
 
103
109
  /**
104
110
  * Targets the payment attempt being intercepted.
105
111
  *
106
- * @private
112
+ * @publicDocs
107
113
  */
108
114
 
109
- /** @private */
115
+ /**
116
+ * A target that a `paymentvalidations` interceptor can use. The only
117
+ * supported target is the payment attempt.
118
+ *
119
+ * @publicDocs
120
+ */
110
121
 
111
122
  /**
112
123
  * Where a validation applies, as an enumerated token. Targets are matched
113
124
  * as exact strings, never evaluated as JSON paths.
114
125
  *
115
- * @private
126
+ * @publicDocs
116
127
  */
117
128
 
118
129
  /**
119
130
  * Maps POS interceptable workflow names to their valid validation targets.
120
131
  *
121
- * @private
132
+ * @publicDocs
122
133
  */
123
134
 
124
135
  /**
125
136
  * The interceptor callback for a POS interceptable workflow, keyed by the
126
137
  * workflow name so the event and its valid validation targets stay paired.
127
138
  *
128
- * @private
139
+ * @publicDocs
129
140
  */
130
141
 
131
142
  /**
132
- * The result an interceptor returns. An empty `operations` list allows the
133
- * workflow; an `ERROR` validation blocks it.
143
+ * The result an interceptor returns. An empty `operations` list adds no
144
+ * findings from this interceptor and doesn't remove or override findings from
145
+ * other interceptors.
134
146
  *
135
- * @private
147
+ * @publicDocs
136
148
  */
137
149
 
138
150
  /**
139
151
  * A single host operation produced by an interceptor.
140
152
  *
141
- * @private
153
+ * @publicDocs
142
154
  */
143
155
 
144
- /** @private */
156
+ /**
157
+ * The severity of a validation. `ERROR` can block the workflow when blocking
158
+ * is declared and allowed by the store. `WARNING` never blocks.
159
+ *
160
+ * @publicDocs
161
+ */
145
162
 
146
163
  /**
147
164
  * Adds a validation to the workflow being intercepted.
148
165
  *
149
- * @private
166
+ * @publicDocs
150
167
  */
151
168
 
152
169
  exports.POS_EVENT_NAMES = POS_EVENT_NAMES;
@@ -0,0 +1,339 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var htm = require('htm');
6
+
7
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
+
9
+ var htm__default = /*#__PURE__*/_interopDefaultLegacy(htm);
10
+
11
+ /**
12
+ * The tagged template that compiles `<s-pos-list-item>` markup into the
13
+ * `itemTemplates` value `<s-pos-list>` accepts. Templates are static: the
14
+ * result contains no functions. Compilation and validation happen when the
15
+ * helper executes, not during the extension build. Define templates at module
16
+ * scope to compile once per module execution.
17
+ * Invalid templates throw synchronously and return no partial collection.
18
+ * An uncaught module-scope exception aborts module evaluation; catch the helper
19
+ * invocation to recover explicitly. There is no automatic list-only fallback.
20
+ *
21
+ * @publicDocs
22
+ */
23
+
24
+ const ITEM_TAG = 's-pos-list-item';
25
+ const LIST_TAG = 's-pos-list';
26
+ const PATH_PATTERN = /^[\w.]+$/;
27
+ const EVENT_PROP_PATTERN = /^on/i;
28
+ const BIND_PREFIX = 'bind:';
29
+ /** `{{#if path}}`, `{{/if}}`, or `{{path}}`; anything else inside `{{ }}` is unsupported. */
30
+ const EXPRESSION_PATTERN = /\{\{\s*(?:#if\s+([\w.]+)|(\/if)|([\w.]+))\s*\}\}/g;
31
+ const ANY_EXPRESSION_PATTERN = /\{\{([\s\S]*?)\}\}/g;
32
+ function fail(message) {
33
+ throw new Error(`posListTemplate: ${message}`);
34
+ }
35
+ function isRawElement(value) {
36
+ return typeof value === 'object' && value !== null && 'tag' in value && 'props' in value && 'children' in value;
37
+ }
38
+ function createRawElement(type, props, ...children) {
39
+ if (typeof type !== 'string') {
40
+ fail('interpolated values are not supported; templates must be static');
41
+ }
42
+ return {
43
+ tag: type,
44
+ props: props !== null && props !== void 0 ? props : {},
45
+ children
46
+ };
47
+ }
48
+ const parse = htm__default["default"].bind(createRawElement);
49
+
50
+ /**
51
+ * Splits a string into literal and `{{path}}` segments. Used for attribute
52
+ * values, where block expressions have no meaning.
53
+ */
54
+ function parseSegments(value) {
55
+ const segments = [];
56
+ let lastIndex = 0;
57
+ for (const match of value.matchAll(ANY_EXPRESSION_PATTERN)) {
58
+ var _match$index;
59
+ const expression = match[1].trim();
60
+ if (!PATH_PATTERN.test(expression)) {
61
+ if (expression.startsWith('#if') || expression === '/if') {
62
+ fail(`{{#if}} is not supported inside an attribute value: "${match[0]}"`);
63
+ }
64
+ fail(`unsupported template expression "${match[0]}"`);
65
+ }
66
+ const index = (_match$index = match.index) !== null && _match$index !== void 0 ? _match$index : 0;
67
+ if (index > lastIndex) {
68
+ segments.push(value.slice(lastIndex, index));
69
+ }
70
+ segments.push({
71
+ path: expression
72
+ });
73
+ lastIndex = index + match[0].length;
74
+ }
75
+ if (lastIndex < value.length) {
76
+ segments.push(value.slice(lastIndex));
77
+ }
78
+ return segments;
79
+ }
80
+ function tokenizeText(value, tokens) {
81
+ let lastIndex = 0;
82
+ for (const match of value.matchAll(ANY_EXPRESSION_PATTERN)) {
83
+ var _match$index2;
84
+ const index = (_match$index2 = match.index) !== null && _match$index2 !== void 0 ? _match$index2 : 0;
85
+ if (index > lastIndex) {
86
+ tokens.push({
87
+ kind: 'text',
88
+ value: value.slice(lastIndex, index)
89
+ });
90
+ }
91
+ EXPRESSION_PATTERN.lastIndex = 0;
92
+ const expression = EXPRESSION_PATTERN.exec(match[0]);
93
+ if (expression === null || expression[0].length !== match[0].length) {
94
+ fail(`unsupported template expression "${match[0]}"`);
95
+ }
96
+ const [, ifPath, endIf, path] = expression;
97
+ if (ifPath !== undefined) {
98
+ tokens.push({
99
+ kind: 'if',
100
+ path: ifPath
101
+ });
102
+ } else if (endIf !== undefined) {
103
+ tokens.push({
104
+ kind: 'endif'
105
+ });
106
+ } else if (path !== undefined) {
107
+ tokens.push({
108
+ kind: 'path',
109
+ path
110
+ });
111
+ }
112
+ lastIndex = index + match[0].length;
113
+ }
114
+ if (lastIndex < value.length) {
115
+ tokens.push({
116
+ kind: 'text',
117
+ value: value.slice(lastIndex)
118
+ });
119
+ }
120
+ }
121
+ function tokenize(rawChildren) {
122
+ const tokens = [];
123
+ for (const child of rawChildren.flat()) {
124
+ if (typeof child === 'string') {
125
+ if (child.trim().length > 0) {
126
+ tokenizeText(child, tokens);
127
+ }
128
+ } else if (isRawElement(child)) {
129
+ tokens.push({
130
+ kind: 'element',
131
+ element: child
132
+ });
133
+ } else if (child !== null && child !== undefined && child !== false) {
134
+ fail('interpolated values are not supported; templates must be static');
135
+ }
136
+ }
137
+ return tokens;
138
+ }
139
+ function compileProp(name, value, props) {
140
+ const isBinding = name.startsWith(BIND_PREFIX);
141
+ const propName = isBinding ? name.slice(BIND_PREFIX.length) : name;
142
+ if (EVENT_PROP_PATTERN.test(propName)) {
143
+ fail(`event handlers are not supported in templates; use onRowClick on <${LIST_TAG}>`);
144
+ }
145
+ if (isBinding) {
146
+ if (typeof value !== 'string' || !PATH_PATTERN.test(value)) {
147
+ fail(`${name} must name a row field path`);
148
+ }
149
+ if (propName in props) {
150
+ fail(`"${propName}" is set both as an attribute and through ${name}`);
151
+ }
152
+ props[propName] = {
153
+ kind: 'field',
154
+ path: value
155
+ };
156
+ return;
157
+ }
158
+ if (typeof value === 'string') {
159
+ props[name] = value.includes('{{') ? {
160
+ kind: 'segments',
161
+ segments: parseSegments(value)
162
+ } : {
163
+ kind: 'literal',
164
+ value
165
+ };
166
+ return;
167
+ }
168
+ if (typeof value === 'boolean') {
169
+ props[name] = {
170
+ kind: 'literal',
171
+ value
172
+ };
173
+ return;
174
+ }
175
+ fail('interpolated values are not supported; templates must be static');
176
+ }
177
+ function compileElement(element, parentIfPath) {
178
+ if (element.tag === ITEM_TAG || element.tag === LIST_TAG) {
179
+ fail(`<${element.tag}> can only appear as a template root`);
180
+ }
181
+ const props = {};
182
+ // Plain attributes first so `bind:` can detect a collision with one.
183
+ const entries = Object.entries(element.props);
184
+ for (const [name, value] of entries) {
185
+ if (!name.startsWith(BIND_PREFIX)) {
186
+ compileProp(name, value, props);
187
+ }
188
+ }
189
+ for (const [name, value] of entries) {
190
+ if (name.startsWith(BIND_PREFIX)) {
191
+ compileProp(name, value, props);
192
+ }
193
+ }
194
+ const node = {
195
+ kind: 'element',
196
+ tag: element.tag,
197
+ props
198
+ };
199
+ const children = compileChildren(element.children, false, parentIfPath);
200
+ if (children.length > 0) {
201
+ node.children = children;
202
+ }
203
+ return node;
204
+ }
205
+ function compileChildren(rawChildren, atRoot, parentIfPath) {
206
+ var _openIf$path2, _openIf2;
207
+ const nodes = [];
208
+ let pendingText = [];
209
+ let openIf;
210
+ const target = () => openIf ? openIf.children : nodes;
211
+ const flushText = () => {
212
+ if (pendingText.length === 0) {
213
+ return;
214
+ }
215
+ if (atRoot) {
216
+ fail('text must be inside a component such as <s-text>');
217
+ }
218
+ target().push({
219
+ kind: 'text',
220
+ segments: pendingText
221
+ });
222
+ pendingText = [];
223
+ };
224
+ for (const token of tokenize(rawChildren)) {
225
+ switch (token.kind) {
226
+ case 'text':
227
+ pendingText.push(token.value);
228
+ break;
229
+ case 'path':
230
+ pendingText.push({
231
+ path: token.path
232
+ });
233
+ break;
234
+ case 'if':
235
+ {
236
+ var _openIf$path, _openIf;
237
+ flushText();
238
+ const enclosingIfPath = (_openIf$path = (_openIf = openIf) === null || _openIf === void 0 ? void 0 : _openIf.path) !== null && _openIf$path !== void 0 ? _openIf$path : parentIfPath;
239
+ if (enclosingIfPath !== undefined) {
240
+ fail(`{{#if}} cannot be nested: {{#if ${token.path}}} inside {{#if ${enclosingIfPath}}}`);
241
+ }
242
+ openIf = {
243
+ path: token.path,
244
+ children: []
245
+ };
246
+ break;
247
+ }
248
+ case 'endif':
249
+ flushText();
250
+ if (!openIf) {
251
+ fail('{{/if}} without a matching {{#if}}');
252
+ }
253
+ nodes.push({
254
+ kind: 'if',
255
+ path: openIf.path,
256
+ children: openIf.children
257
+ });
258
+ openIf = undefined;
259
+ break;
260
+ case 'element':
261
+ flushText();
262
+ target().push(compileElement(token.element, (_openIf$path2 = (_openIf2 = openIf) === null || _openIf2 === void 0 ? void 0 : _openIf2.path) !== null && _openIf$path2 !== void 0 ? _openIf$path2 : parentIfPath));
263
+ break;
264
+ }
265
+ }
266
+ flushText();
267
+ if (openIf) {
268
+ fail(`{{#if ${openIf.path}}} is missing its {{/if}}`);
269
+ }
270
+ return nodes;
271
+ }
272
+ function compileRoot(root, seen) {
273
+ if (!isRawElement(root) || root.tag !== ITEM_TAG) {
274
+ fail(`every template root must be an <${ITEM_TAG} templateId="…"> element`);
275
+ }
276
+ let templateId;
277
+ let type = 'button';
278
+ for (const [name, value] of Object.entries(root.props)) {
279
+ if (name === 'templateId') {
280
+ if (typeof value !== 'string' || value.length === 0) {
281
+ fail(`<${ITEM_TAG}> requires a literal, non-empty templateId`);
282
+ }
283
+ templateId = value;
284
+ } else if (name === 'type') {
285
+ if (value !== 'button' && value !== 'text') {
286
+ fail(`<${ITEM_TAG}> type must be "button" or "text", got ${JSON.stringify(value)}`);
287
+ }
288
+ type = value;
289
+ } else {
290
+ fail(`<${ITEM_TAG}> does not accept a "${name}" attribute; only templateId and type are allowed`);
291
+ }
292
+ }
293
+ if (templateId === undefined) {
294
+ fail(`<${ITEM_TAG}> requires a literal, non-empty templateId`);
295
+ }
296
+ if (seen.has(templateId)) {
297
+ fail(`duplicate templateId "${templateId}"`);
298
+ }
299
+ seen.add(templateId);
300
+ return {
301
+ templateId,
302
+ type,
303
+ children: compileChildren(root.children, true)
304
+ };
305
+ }
306
+
307
+ /**
308
+ * Compiles `<s-pos-list-item>` markup into the `itemTemplates` value for
309
+ * `<s-pos-list>`.
310
+ *
311
+ * Compilation and validation happen when this helper executes, not during the
312
+ * extension build. Define templates at module scope to compile once per module
313
+ * execution.
314
+ * Invalid templates throw synchronously and return no partial collection.
315
+ * An uncaught module-scope exception aborts module evaluation; catch the helper
316
+ * invocation to recover explicitly. There is no automatic list-only fallback.
317
+ *
318
+ * Inside a template, `{{path}}` interpolates a row field as text, `bind:prop="path"`
319
+ * passes a row field to a component prop with its own type, and
320
+ * `{{#if path}}…{{/if}}` renders its content only when the field is truthy.
321
+ * Event handlers, interpolated values, and any other `{{…}}` expression are
322
+ * rejected when the template is compiled.
323
+ *
324
+ * @publicDocs
325
+ */
326
+ const posListTemplate = (strings, ...values) => {
327
+ if (values.length > 0) {
328
+ fail('interpolated values are not supported; templates must be static');
329
+ }
330
+ const parsed = parse(strings);
331
+ const roots = Array.isArray(parsed) ? parsed : [parsed];
332
+ const seen = new Set();
333
+ const templates = roots.filter(root => !(typeof root === 'string' && root.trim().length === 0)).map(root => compileRoot(root, seen));
334
+ return {
335
+ templates
336
+ };
337
+ };
338
+
339
+ exports.posListTemplate = posListTemplate;
@@ -3,10 +3,12 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var events = require('./point-of-sale/events.js');
6
+ var posListTemplate = require('./point-of-sale/pos-list-template.js');
6
7
  var storage = require('./point-of-sale/types/storage.js');
7
8
 
8
9
 
9
10
 
10
11
  exports.POS_EVENT_NAMES = events.POS_EVENT_NAMES;
11
12
  exports.POS_INTERCEPT_NAMES = events.POS_INTERCEPT_NAMES;
13
+ exports.posListTemplate = posListTemplate.posListTemplate;
12
14
  exports.StorageError = storage.StorageError;
@@ -2,7 +2,7 @@ import { useApi } from './api.mjs';
2
2
  import { useSubscription } from './subscription.mjs';
3
3
 
4
4
  /**
5
- * Returns the current authenticated `Customer`.
5
+ * Returns the current `AuthenticatedAccountCustomer`.
6
6
  *
7
7
  * The value is `undefined` if the customer isn't authenticated.
8
8
  */
@@ -7,7 +7,8 @@
7
7
  const POS_EVENT_NAMES = {
8
8
  TRANSACTION_COMPLETE: 'transactioncomplete',
9
9
  CASH_TRACKING_SESSION_START: 'cashtrackingsessionstart',
10
- CASH_TRACKING_SESSION_COMPLETE: 'cashtrackingsessioncomplete'
10
+ CASH_TRACKING_SESSION_COMPLETE: 'cashtrackingsessioncomplete',
11
+ SCAN: 'scan'
11
12
  };
12
13
 
13
14
  /**
@@ -35,26 +36,26 @@ const POS_INTERCEPT_NAMES = {
35
36
  *
36
37
  * Used as the generic type parameter for `shopify.intercept`.
37
38
  *
38
- * @private
39
+ * @publicDocs
39
40
  */
40
41
 
41
42
  /**
42
43
  * The data carried by a `cartvalidations` event.
43
44
  *
44
- * @private
45
+ * @publicDocs
45
46
  */
46
47
 
47
48
  /**
48
49
  * The event a `cartvalidations` interceptor receives. Carries a snapshot of
49
50
  * the POS cart taken when the event was produced.
50
51
  *
51
- * @private
52
+ * @publicDocs
52
53
  */
53
54
 
54
55
  /**
55
56
  * The kind of payment method being attempted.
56
57
  *
57
- * @private
58
+ * @publicDocs
58
59
  */
59
60
 
60
61
  /**
@@ -64,7 +65,7 @@ const POS_INTERCEPT_NAMES = {
64
65
  * disambiguates method types a shop can have several of (for example custom
65
66
  * payment methods) as they become interceptable.
66
67
  *
67
- * @private
68
+ * @publicDocs
68
69
  */
69
70
 
70
71
  /**
@@ -72,77 +73,93 @@ const POS_INTERCEPT_NAMES = {
72
73
  * attempt's payment method and amount; split payments produce one event per
73
74
  * tender, each with its own amount.
74
75
  *
75
- * @private
76
+ * @publicDocs
76
77
  */
77
78
 
78
79
  /**
79
80
  * The data carried by a `paymentvalidations` event.
80
81
  *
81
- * @private
82
+ * @publicDocs
82
83
  */
83
84
 
84
85
  /**
85
86
  * Targets the whole cart rather than a specific line item.
86
87
  *
87
- * @private
88
+ * @publicDocs
88
89
  */
89
90
 
90
91
  /**
91
92
  * Targets one cart line item by its `uuid` from this event's `cart` snapshot,
92
93
  * for example `$.cart.lineItems['adfd6b06-4a24-4f5f-9f4b-ea21f4432dd4']`.
93
94
  *
94
- * @private
95
+ * @publicDocs
95
96
  */
96
97
 
97
- /** @private */
98
+ /**
99
+ * A target that a `cartvalidations` interceptor can use: the whole cart or
100
+ * one cart line item.
101
+ *
102
+ * @publicDocs
103
+ */
98
104
 
99
105
  /**
100
106
  * Targets the payment attempt being intercepted.
101
107
  *
102
- * @private
108
+ * @publicDocs
103
109
  */
104
110
 
105
- /** @private */
111
+ /**
112
+ * A target that a `paymentvalidations` interceptor can use. The only
113
+ * supported target is the payment attempt.
114
+ *
115
+ * @publicDocs
116
+ */
106
117
 
107
118
  /**
108
119
  * Where a validation applies, as an enumerated token. Targets are matched
109
120
  * as exact strings, never evaluated as JSON paths.
110
121
  *
111
- * @private
122
+ * @publicDocs
112
123
  */
113
124
 
114
125
  /**
115
126
  * Maps POS interceptable workflow names to their valid validation targets.
116
127
  *
117
- * @private
128
+ * @publicDocs
118
129
  */
119
130
 
120
131
  /**
121
132
  * The interceptor callback for a POS interceptable workflow, keyed by the
122
133
  * workflow name so the event and its valid validation targets stay paired.
123
134
  *
124
- * @private
135
+ * @publicDocs
125
136
  */
126
137
 
127
138
  /**
128
- * The result an interceptor returns. An empty `operations` list allows the
129
- * workflow; an `ERROR` validation blocks it.
139
+ * The result an interceptor returns. An empty `operations` list adds no
140
+ * findings from this interceptor and doesn't remove or override findings from
141
+ * other interceptors.
130
142
  *
131
- * @private
143
+ * @publicDocs
132
144
  */
133
145
 
134
146
  /**
135
147
  * A single host operation produced by an interceptor.
136
148
  *
137
- * @private
149
+ * @publicDocs
138
150
  */
139
151
 
140
- /** @private */
152
+ /**
153
+ * The severity of a validation. `ERROR` can block the workflow when blocking
154
+ * is declared and allowed by the store. `WARNING` never blocks.
155
+ *
156
+ * @publicDocs
157
+ */
141
158
 
142
159
  /**
143
160
  * Adds a validation to the workflow being intercepted.
144
161
  *
145
- * @private
162
+ * @publicDocs
146
163
  */
147
164
 
148
165
  export { POS_EVENT_NAMES, POS_INTERCEPT_NAMES };