@shopify/ui-extensions 2025.10.8 → 2025.10.9
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.
- package/build/cjs/surfaces/point-of-sale/types/storage.js +3 -0
- package/build/esm/surfaces/point-of-sale/types/storage.mjs +3 -0
- package/build/esnext/surfaces/point-of-sale/types/storage.esnext +3 -0
- package/build/ts/shared.d.ts +7 -7
- package/build/ts/shared.d.ts.map +1 -1
- package/build/ts/surfaces/admin/components/Avatar/Avatar.doc.d.ts.map +1 -1
- package/build/ts/surfaces/admin/components/Badge/Badge.doc.d.ts.map +1 -1
- package/build/ts/surfaces/admin/components/Banner/Banner.doc.d.ts.map +1 -1
- package/build/ts/surfaces/admin/components/Box/Box.doc.d.ts.map +1 -1
- package/build/ts/surfaces/admin/components/Button/Button.doc.d.ts.map +1 -1
- package/build/ts/surfaces/admin/components/ButtonGroup/ButtonGroup.doc.d.ts.map +1 -1
- package/build/ts/surfaces/admin/components/Checkbox/Checkbox.doc.d.ts.map +1 -1
- package/build/ts/surfaces/admin/components/Chip/Chip.doc.d.ts.map +1 -1
- package/build/ts/surfaces/admin/components/ChoiceList/ChoiceList.doc.d.ts.map +1 -1
- package/build/ts/surfaces/admin/components/ClickableChip/ClickableChip.doc.d.ts.map +1 -1
- package/build/ts/surfaces/admin/components/ColorField/ColorField.doc.d.ts.map +1 -1
- package/build/ts/surfaces/admin/components/ColorPicker/ColorPicker.doc.d.ts.map +1 -1
- package/build/ts/surfaces/admin/components/DateField/DateField.doc.d.ts.map +1 -1
- package/build/ts/surfaces/admin/components/DatePicker/DatePicker.doc.d.ts.map +1 -1
- package/build/ts/surfaces/admin/components/DropZone/{DropZone.ab.doc.d.ts → DropZone.doc.d.ts} +1 -1
- package/build/ts/surfaces/admin/components/DropZone/DropZone.doc.d.ts.map +1 -0
- package/build/ts/surfaces/admin/components/Grid/Grid.doc.d.ts.map +1 -1
- package/build/ts/surfaces/admin/components/Icon/Icon.doc.d.ts.map +1 -1
- package/build/ts/surfaces/admin/components/Image/Image.doc.d.ts.map +1 -1
- package/build/ts/surfaces/admin/components/Link/Link.doc.d.ts.map +1 -1
- package/build/ts/surfaces/admin/components/Menu/Menu.doc.d.ts.map +1 -1
- package/build/ts/surfaces/admin/components/Modal/Modal.ab.doc.d.ts.map +1 -1
- package/build/ts/surfaces/admin/components/OrderedList/OrderedList.doc.d.ts.map +1 -1
- package/build/ts/surfaces/admin/components/Page/Page.ab.doc.d.ts.map +1 -1
- package/build/ts/surfaces/admin/components/Popover/Popover.ab.doc.d.ts.map +1 -1
- package/build/ts/surfaces/admin/components/SearchField/SearchField.doc.d.ts.map +1 -1
- package/build/ts/surfaces/admin/components/Spinner/Spinner.doc.d.ts.map +1 -1
- package/build/ts/surfaces/admin/components/Stack/Stack.doc.d.ts.map +1 -1
- package/build/ts/surfaces/admin/components/Table/Table.doc.d.ts.map +1 -1
- package/build/ts/surfaces/admin/components/Text/Text.doc.d.ts.map +1 -1
- package/build/ts/surfaces/admin/components/Thumbnail/Thumbnail.doc.d.ts.map +1 -1
- package/build/ts/surfaces/admin/components/Tooltip/Tooltip.doc.d.ts.map +1 -1
- package/build/ts/surfaces/admin/components/UnorderedList/UnorderedList.doc.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/api/action-api/action-api.d.ts +3 -5
- package/build/ts/surfaces/point-of-sale/api/action-api/action-api.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/api/cart-api/cart-api.d.ts +38 -33
- package/build/ts/surfaces/point-of-sale/api/cart-api/cart-api.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/api/cart-line-item-api/cart-line-item-api.d.ts +2 -2
- package/build/ts/surfaces/point-of-sale/api/connectivity-api/connectivity-api.d.ts +6 -4
- package/build/ts/surfaces/point-of-sale/api/connectivity-api/connectivity-api.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/api/customer-api/customer-api.d.ts +4 -1
- package/build/ts/surfaces/point-of-sale/api/customer-api/customer-api.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/api/device-api/device-api.d.ts +4 -4
- package/build/ts/surfaces/point-of-sale/api/draft-order-api/draft-order-api.d.ts +6 -3
- package/build/ts/surfaces/point-of-sale/api/draft-order-api/draft-order-api.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/api/locale-api/locale-api.d.ts +2 -3
- package/build/ts/surfaces/point-of-sale/api/locale-api/locale-api.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/api/navigation-api/navigation-api.d.ts +17 -9
- package/build/ts/surfaces/point-of-sale/api/navigation-api/navigation-api.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/api/order-api/order-api.d.ts +5 -5
- package/build/ts/surfaces/point-of-sale/api/pin-pad-api.d.ts +6 -10
- package/build/ts/surfaces/point-of-sale/api/pin-pad-api.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/api/print-api/print-api.d.ts +10 -11
- package/build/ts/surfaces/point-of-sale/api/print-api/print-api.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/api/product-api/product-api.d.ts +5 -2
- package/build/ts/surfaces/point-of-sale/api/product-api/product-api.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/api/product-search-api/product-search-api.d.ts +24 -10
- package/build/ts/surfaces/point-of-sale/api/product-search-api/product-search-api.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/api/scanner-api/scanner-api.d.ts +26 -8
- package/build/ts/surfaces/point-of-sale/api/scanner-api/scanner-api.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/api/session-api/session-api.d.ts +3 -6
- package/build/ts/surfaces/point-of-sale/api/session-api/session-api.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/api/storage-api/storage-api.d.ts +3 -0
- package/build/ts/surfaces/point-of-sale/api/storage-api/storage-api.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/api/toast-api/toast-api.d.ts +11 -1
- package/build/ts/surfaces/point-of-sale/api/toast-api/toast-api.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/components/Badge/Badge.doc.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/components/Badge.d.ts +23 -4
- package/build/ts/surfaces/point-of-sale/components/Banner/Banner.doc.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/components/Banner.d.ts +24 -6
- package/build/ts/surfaces/point-of-sale/components/Box/Box.doc.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/components/Box.d.ts +34 -37
- package/build/ts/surfaces/point-of-sale/components/Button/Button.doc.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/components/Button.d.ts +56 -16
- package/build/ts/surfaces/point-of-sale/components/Choice.d.ts +14 -2
- package/build/ts/surfaces/point-of-sale/components/ChoiceList/ChoiceList.doc.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/components/ChoiceList.d.ts +41 -5
- package/build/ts/surfaces/point-of-sale/components/Clickable/Clickable.doc.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/components/Clickable.d.ts +40 -4
- package/build/ts/surfaces/point-of-sale/components/DateField/DateField.doc.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/components/DateField.d.ts +42 -6
- package/build/ts/surfaces/point-of-sale/components/DatePicker/DatePicker.doc.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/components/DatePicker.d.ts +42 -6
- package/build/ts/surfaces/point-of-sale/components/DateSpinner/DateSpinner.doc.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/components/DateSpinner.d.ts +42 -6
- package/build/ts/surfaces/point-of-sale/components/Divider/Divider.doc.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/components/Divider.d.ts +14 -2
- package/build/ts/surfaces/point-of-sale/components/EmailField/EmailField.doc.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/components/EmailField.d.ts +43 -7
- package/build/ts/surfaces/point-of-sale/components/Heading/Heading.doc.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/components/Heading.d.ts +15 -3
- package/build/ts/surfaces/point-of-sale/components/Icon/Icon.doc.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/components/Icon.d.ts +17 -2
- package/build/ts/surfaces/point-of-sale/components/Image/Image.doc.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/components/Image.d.ts +6 -3
- package/build/ts/surfaces/point-of-sale/components/Modal/Modal.doc.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/components/Modal.d.ts +43 -11
- package/build/ts/surfaces/point-of-sale/components/NumberField/NumberField.doc.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/components/NumberField.d.ts +56 -41
- package/build/ts/surfaces/point-of-sale/components/Page/Page.doc.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/components/Page.d.ts +19 -7
- package/build/ts/surfaces/point-of-sale/components/PosBlock/PosBlock.doc.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/components/PosBlock.d.ts +16 -4
- package/build/ts/surfaces/point-of-sale/components/QrCode.d.ts +14 -2
- package/build/ts/surfaces/point-of-sale/components/ScrollBox/ScrollBox.doc.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/components/ScrollBox.d.ts +33 -36
- package/build/ts/surfaces/point-of-sale/components/SearchField/SearchField.doc.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/components/SearchField.d.ts +42 -6
- package/build/ts/surfaces/point-of-sale/components/Section/Section.doc.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/components/Section.d.ts +17 -7
- package/build/ts/surfaces/point-of-sale/components/Stack/Stack.doc.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/components/Stack.d.ts +47 -61
- package/build/ts/surfaces/point-of-sale/components/Text/Text.doc.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/components/Text.d.ts +28 -6
- package/build/ts/surfaces/point-of-sale/components/TextArea/TextArea.doc.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/components/TextArea.d.ts +43 -7
- package/build/ts/surfaces/point-of-sale/components/TextField/TextField.doc.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/components/TextField.d.ts +43 -7
- package/build/ts/surfaces/point-of-sale/components/Tile/Tile.doc.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/components/Tile.d.ts +40 -4
- package/build/ts/surfaces/point-of-sale/components/TimeField/TimeField.doc.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/components/TimeField.d.ts +42 -6
- package/build/ts/surfaces/point-of-sale/components/TimePicker/TimePicker.doc.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/components/TimePicker.d.ts +42 -6
- package/build/ts/surfaces/point-of-sale/components/components-shared.d.ts +638 -878
- package/build/ts/surfaces/point-of-sale/components/targets/StandardComponents.d.ts +1 -1
- package/build/ts/surfaces/point-of-sale/components/targets/StandardComponents.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/event/data/BaseApi.d.ts +3 -0
- package/build/ts/surfaces/point-of-sale/event/data/BaseApi.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/event/data/BaseData.d.ts +15 -0
- package/build/ts/surfaces/point-of-sale/event/data/BaseData.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/event/data/CartUpdateEventData.d.ts +6 -0
- package/build/ts/surfaces/point-of-sale/event/data/CartUpdateEventData.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/event/data/CashTrackingSessionData.d.ts +27 -0
- package/build/ts/surfaces/point-of-sale/event/data/CashTrackingSessionData.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/event/data/ExchangeTransactionData.d.ts +18 -0
- package/build/ts/surfaces/point-of-sale/event/data/ExchangeTransactionData.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/event/data/ReprintReceiptData.d.ts +9 -0
- package/build/ts/surfaces/point-of-sale/event/data/ReprintReceiptData.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/event/data/ReturnTransactionData.d.ts +18 -0
- package/build/ts/surfaces/point-of-sale/event/data/ReturnTransactionData.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/event/data/SaleTransactionData.d.ts +12 -0
- package/build/ts/surfaces/point-of-sale/event/data/SaleTransactionData.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/event/data/TransactionCompleteData.d.ts +27 -0
- package/build/ts/surfaces/point-of-sale/event/data/TransactionCompleteData.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/event/output/BaseOutput.d.ts +17 -0
- package/build/ts/surfaces/point-of-sale/event/output/BaseOutput.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/extension-targets.d.ts +135 -0
- package/build/ts/surfaces/point-of-sale/extension-targets.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/types/base-transaction-complete.d.ts +43 -0
- package/build/ts/surfaces/point-of-sale/types/base-transaction-complete.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/types/cart.d.ts +227 -31
- package/build/ts/surfaces/point-of-sale/types/cart.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/types/country-code.d.ts +3 -0
- package/build/ts/surfaces/point-of-sale/types/country-code.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/types/device.d.ts +6 -3
- package/build/ts/surfaces/point-of-sale/types/device.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/types/direct-api-request-body.d.ts +3 -3
- package/build/ts/surfaces/point-of-sale/types/discount-allocation.d.ts +6 -0
- package/build/ts/surfaces/point-of-sale/types/discount-allocation.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/types/money.d.ts +18 -0
- package/build/ts/surfaces/point-of-sale/types/money.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/types/multiple-resource-result.d.ts +1 -2
- package/build/ts/surfaces/point-of-sale/types/multiple-resource-result.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/types/order.d.ts +18 -0
- package/build/ts/surfaces/point-of-sale/types/order.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/types/paginated-result.d.ts +2 -3
- package/build/ts/surfaces/point-of-sale/types/paginated-result.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/types/payment.d.ts +15 -0
- package/build/ts/surfaces/point-of-sale/types/payment.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/types/pin-pad.d.ts +36 -16
- package/build/ts/surfaces/point-of-sale/types/pin-pad.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/types/product.d.ts +170 -0
- package/build/ts/surfaces/point-of-sale/types/product.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/types/session.d.ts +7 -5
- package/build/ts/surfaces/point-of-sale/types/session.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/types/shipping-line.d.ts +32 -0
- package/build/ts/surfaces/point-of-sale/types/shipping-line.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/types/storage.d.ts +13 -11
- package/build/ts/surfaces/point-of-sale/types/storage.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/types/tax-line.d.ts +21 -0
- package/build/ts/surfaces/point-of-sale/types/tax-line.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/types/transaction-type.d.ts +7 -0
- package/build/ts/surfaces/point-of-sale/types/transaction-type.d.ts.map +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/package.json +6 -1
- package/src/shared.ts +7 -7
- package/src/surfaces/admin/api/intents/examples/edit-metafield-definition.js +1 -0
- package/src/surfaces/admin/api/intents/examples/edit-metaobject-definition.js +1 -1
- package/src/surfaces/admin/components/Icon/icon-data.json +9 -0
- package/src/surfaces/point-of-sale/api/action-api/action-api.ts +3 -5
- package/src/surfaces/point-of-sale/api/cart-api/cart-api.ts +38 -33
- package/src/surfaces/point-of-sale/api/cart-line-item-api/cart-line-item-api.ts +2 -2
- package/src/surfaces/point-of-sale/api/connectivity-api/connectivity-api.ts +6 -4
- package/src/surfaces/point-of-sale/api/customer-api/customer-api.ts +4 -1
- package/src/surfaces/point-of-sale/api/device-api/device-api.ts +4 -4
- package/src/surfaces/point-of-sale/api/draft-order-api/draft-order-api.ts +6 -3
- package/src/surfaces/point-of-sale/api/locale-api/locale-api.ts +2 -3
- package/src/surfaces/point-of-sale/api/navigation-api/navigation-api.ts +17 -9
- package/src/surfaces/point-of-sale/api/order-api/order-api.ts +5 -5
- package/src/surfaces/point-of-sale/api/pin-pad-api.ts +6 -10
- package/src/surfaces/point-of-sale/api/print-api/print-api.ts +10 -11
- package/src/surfaces/point-of-sale/api/product-api/product-api.ts +5 -2
- package/src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts +24 -10
- package/src/surfaces/point-of-sale/api/scanner-api/scanner-api.ts +26 -8
- package/src/surfaces/point-of-sale/api/session-api/session-api.ts +3 -6
- package/src/surfaces/point-of-sale/api/storage-api/storage-api.ts +3 -0
- package/src/surfaces/point-of-sale/api/toast-api/toast-api.ts +11 -1
- package/src/surfaces/point-of-sale/components/Badge.d.ts +23 -4
- package/src/surfaces/point-of-sale/components/Banner.d.ts +24 -6
- package/src/surfaces/point-of-sale/components/Box.d.ts +34 -37
- package/src/surfaces/point-of-sale/components/Button.d.ts +56 -16
- package/src/surfaces/point-of-sale/components/Choice.d.ts +14 -2
- package/src/surfaces/point-of-sale/components/ChoiceList/examples/composed-choices.jsx +35 -0
- package/src/surfaces/point-of-sale/components/ChoiceList.d.ts +41 -5
- package/src/surfaces/point-of-sale/components/Clickable.d.ts +40 -4
- package/src/surfaces/point-of-sale/components/DateField.d.ts +42 -6
- package/src/surfaces/point-of-sale/components/DatePicker.d.ts +42 -6
- package/src/surfaces/point-of-sale/components/DateSpinner.d.ts +42 -6
- package/src/surfaces/point-of-sale/components/Divider.d.ts +14 -2
- package/src/surfaces/point-of-sale/components/EmailField.d.ts +43 -7
- package/src/surfaces/point-of-sale/components/Heading.d.ts +15 -3
- package/src/surfaces/point-of-sale/components/Icon.d.ts +17 -2
- package/src/surfaces/point-of-sale/components/Image.d.ts +6 -3
- package/src/surfaces/point-of-sale/components/Modal.d.ts +43 -11
- package/src/surfaces/point-of-sale/components/NumberField.d.ts +56 -41
- package/src/surfaces/point-of-sale/components/Page.d.ts +19 -7
- package/src/surfaces/point-of-sale/components/PosBlock.d.ts +16 -4
- package/src/surfaces/point-of-sale/components/QrCode.d.ts +14 -2
- package/src/surfaces/point-of-sale/components/ScrollBox.d.ts +33 -36
- package/src/surfaces/point-of-sale/components/SearchField.d.ts +42 -6
- package/src/surfaces/point-of-sale/components/Section.d.ts +17 -7
- package/src/surfaces/point-of-sale/components/Stack.d.ts +47 -61
- package/src/surfaces/point-of-sale/components/Text.d.ts +28 -6
- package/src/surfaces/point-of-sale/components/TextArea.d.ts +43 -7
- package/src/surfaces/point-of-sale/components/TextField.d.ts +43 -7
- package/src/surfaces/point-of-sale/components/Tile.d.ts +40 -4
- package/src/surfaces/point-of-sale/components/TimeField.d.ts +42 -6
- package/src/surfaces/point-of-sale/components/TimePicker.d.ts +42 -6
- package/src/surfaces/point-of-sale/components/components-shared.d.ts +638 -878
- package/src/surfaces/point-of-sale/components/targets/StandardComponents.ts +0 -1
- package/src/surfaces/point-of-sale/components.d.ts +1506 -1537
- package/src/surfaces/point-of-sale/event/data/BaseApi.ts +3 -0
- package/src/surfaces/point-of-sale/event/data/BaseData.ts +15 -0
- package/src/surfaces/point-of-sale/event/data/CartUpdateEventData.ts +6 -0
- package/src/surfaces/point-of-sale/event/data/CashTrackingSessionData.ts +27 -0
- package/src/surfaces/point-of-sale/event/data/ExchangeTransactionData.ts +18 -0
- package/src/surfaces/point-of-sale/event/data/ReprintReceiptData.ts +9 -0
- package/src/surfaces/point-of-sale/event/data/ReturnTransactionData.ts +18 -0
- package/src/surfaces/point-of-sale/event/data/SaleTransactionData.ts +12 -0
- package/src/surfaces/point-of-sale/event/data/TransactionCompleteData.ts +27 -0
- package/src/surfaces/point-of-sale/event/output/BaseOutput.ts +17 -0
- package/src/surfaces/point-of-sale/extension-targets.ts +135 -0
- package/src/surfaces/point-of-sale/types/base-transaction-complete.ts +43 -0
- package/src/surfaces/point-of-sale/types/cart.ts +227 -31
- package/src/surfaces/point-of-sale/types/country-code.ts +3 -0
- package/src/surfaces/point-of-sale/types/device.ts +6 -3
- package/src/surfaces/point-of-sale/types/direct-api-request-body.ts +3 -3
- package/src/surfaces/point-of-sale/types/discount-allocation.ts +6 -0
- package/src/surfaces/point-of-sale/types/money.ts +18 -0
- package/src/surfaces/point-of-sale/types/multiple-resource-result.ts +1 -2
- package/src/surfaces/point-of-sale/types/order.ts +18 -1
- package/src/surfaces/point-of-sale/types/paginated-result.ts +2 -3
- package/src/surfaces/point-of-sale/types/payment.ts +16 -0
- package/src/surfaces/point-of-sale/types/pin-pad.ts +32 -14
- package/src/surfaces/point-of-sale/types/product.ts +170 -0
- package/src/surfaces/point-of-sale/types/session.ts +7 -5
- package/src/surfaces/point-of-sale/types/shipping-line.ts +32 -0
- package/src/surfaces/point-of-sale/types/storage.ts +13 -11
- package/src/surfaces/point-of-sale/types/tax-line.ts +21 -0
- package/src/surfaces/point-of-sale/types/transaction-type.ts +7 -0
- package/build/ts/surfaces/admin/components/DropZone/DropZone.ab.doc.d.ts.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shopify/ui-extensions",
|
|
3
|
-
"version": "2025.10.
|
|
3
|
+
"version": "2025.10.9",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"docs:admin": "node ./docs/surfaces/admin/build-docs.mjs",
|
|
6
6
|
"docs:checkout": "bash ./docs/surfaces/checkout/build-docs.sh",
|
|
@@ -152,6 +152,11 @@
|
|
|
152
152
|
"access": "public",
|
|
153
153
|
"@shopify:registry": "https://registry.npmjs.org/"
|
|
154
154
|
},
|
|
155
|
+
"repository": {
|
|
156
|
+
"type": "git",
|
|
157
|
+
"url": "https://github.com/Shopify/ui-extensions.git",
|
|
158
|
+
"directory": "packages/ui-extensions"
|
|
159
|
+
},
|
|
155
160
|
"files": [
|
|
156
161
|
"build",
|
|
157
162
|
"src",
|
package/src/shared.ts
CHANGED
|
@@ -940,15 +940,15 @@ export interface GraphQLError {
|
|
|
940
940
|
}
|
|
941
941
|
|
|
942
942
|
/**
|
|
943
|
-
* Represents a
|
|
944
|
-
*
|
|
945
|
-
* Example: Checkout uses this to manage the state of an object and
|
|
946
|
-
* communicate state changes to extensions running in a sandboxed web worker.
|
|
947
|
-
*
|
|
948
|
-
* This interface is compatible with [Preact's ReadonlySignal](https://github.com/preactjs/signals/blob/a023a132a81bd4ba4a0bebb8cbbeffbd8c8bbafc/packages/core/src/index.ts#L700-L709).
|
|
949
|
-
*
|
|
943
|
+
* Represents a reactive signal interface that provides both immediate value access and subscription-based updates. Enables real-time synchronization with changing data through the observer pattern.
|
|
950
944
|
*/
|
|
951
945
|
export interface ReadonlySignalLike<T> {
|
|
946
|
+
/**
|
|
947
|
+
* The current value of the locale string in IETF format. For example, `"en-US"`, `"fr-CA"`, or `"de-DE"`. This property provides immediate access to the current locale without requiring subscription setup. Use for one-time locale checks or initial internationalization setup.
|
|
948
|
+
*/
|
|
952
949
|
readonly value: T;
|
|
950
|
+
/**
|
|
951
|
+
* Subscribes to locale changes and calls the provided function whenever the locale updates. Returns an unsubscribe function to clean up the subscription. Use to automatically update your extension content when merchants change their language settings during POS sessions.
|
|
952
|
+
*/
|
|
953
953
|
subscribe(fn: (value: T) => void): () => void;
|
|
954
954
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const {intents} = useApi(TARGET);
|
|
2
2
|
|
|
3
3
|
const activity = await intents.invoke('edit:shopify/MetaobjectDefinition', {
|
|
4
|
-
|
|
4
|
+
data: {type: 'my_metaobject_definition_type'},
|
|
5
5
|
});
|
|
6
6
|
|
|
7
7
|
const response = await activity.complete;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"iconPreviewData": {
|
|
3
|
+
"jsxFile": "./templates/icon-renderer/icon-preview.jsx",
|
|
4
|
+
"icons": "__AUTO_GENERATED_ICONS__",
|
|
5
|
+
"bodyContent": "<div id=\"app\"></div>",
|
|
6
|
+
"customStyles": "padding: 0px; margin: 0px; margin-top: 8px; max-width: 584px; overflow: hidden; background: #FFF, border: 1px solid #ccc; border-radius: 8px;",
|
|
7
|
+
"hashes": "__AUTO_GENERATED_HASHES__"
|
|
8
|
+
}
|
|
9
|
+
}
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
export interface ActionApiContent {
|
|
2
|
-
/**
|
|
3
|
-
*
|
|
4
|
-
* For example: if we are calling presentModal() from pos.purchase.post.action.menu-item.render,
|
|
5
|
-
* it should present pos.purchase.post.action.render.
|
|
2
|
+
/**
|
|
3
|
+
* Presents the corresponding action (modal) target on top of the current view as a full-screen modal. For example, calling this method from `pos.purchase.post.action.menu-item.render` presents `pos.purchase.post.action.render`. Use to launch detailed workflows, complex forms, or multi-step processes that require more screen space than simple components provide.
|
|
6
4
|
*/
|
|
7
5
|
presentModal(): void;
|
|
8
6
|
}
|
|
9
7
|
|
|
10
8
|
/**
|
|
11
|
-
*
|
|
9
|
+
* The `ActionApi` object provides methods for presenting modal interfaces. Access these methods through `shopify.action` to launch full-screen modal experiences.
|
|
12
10
|
*/
|
|
13
11
|
export interface ActionApi {
|
|
14
12
|
action: ActionApiContent;
|
|
@@ -11,31 +11,38 @@ import type {
|
|
|
11
11
|
} from '../../types/cart';
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
14
|
+
* 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.
|
|
15
15
|
*/
|
|
16
16
|
export interface CartApi {
|
|
17
17
|
cart: CartApiContent;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
+
/**
|
|
21
|
+
* Defines the type of discount applied at the cart level. Specifies whether the discount is percentage-based, fixed amount, or discount code redemption.
|
|
22
|
+
*/
|
|
20
23
|
export type CartDiscountType = 'Percentage' | 'FixedAmount' | 'Code';
|
|
21
24
|
|
|
25
|
+
/**
|
|
26
|
+
* Defines the type of discount applied to individual line items. Specifies whether the discount is percentage-based or a fixed amount reduction.
|
|
27
|
+
*/
|
|
22
28
|
export type LineItemDiscountType = 'Percentage' | 'FixedAmount';
|
|
23
29
|
|
|
24
30
|
export interface CartApiContent {
|
|
25
31
|
/**
|
|
26
|
-
* Provides read-only access to the current cart state and allows subscribing to cart changes.
|
|
27
|
-
* The `value` property provides the current cart state, and `subscribe` allows listening to changes.
|
|
32
|
+
* 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.
|
|
28
33
|
*/
|
|
29
34
|
current: ReadonlySignalLike<Cart>;
|
|
30
35
|
|
|
31
|
-
/**
|
|
36
|
+
/**
|
|
37
|
+
* 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.
|
|
32
38
|
*
|
|
33
39
|
* @param cartState the cart state to set
|
|
34
40
|
* @returns the updated cart
|
|
35
41
|
*/
|
|
36
42
|
bulkCartUpdate(cartState: CartUpdateInput): Promise<Cart>;
|
|
37
43
|
|
|
38
|
-
/**
|
|
44
|
+
/**
|
|
45
|
+
* 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.
|
|
39
46
|
*
|
|
40
47
|
* @param type the type of discount applied (example: 'Percentage')
|
|
41
48
|
* @param title the title attributed with the discount
|
|
@@ -48,84 +55,82 @@ export interface CartApiContent {
|
|
|
48
55
|
): Promise<void>;
|
|
49
56
|
|
|
50
57
|
/**
|
|
51
|
-
*
|
|
58
|
+
* 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.
|
|
52
59
|
*
|
|
53
60
|
* @param code the code for the discount to add to the cart
|
|
54
61
|
*/
|
|
55
62
|
addCartCodeDiscount(code: string): Promise<void>;
|
|
56
63
|
|
|
57
64
|
/**
|
|
58
|
-
* Remove the cart discount
|
|
65
|
+
* Remove the current cart-level discount. This only affects cart-level discounts and does not impact line item discounts or automatic discount eligibility.
|
|
59
66
|
*/
|
|
60
67
|
removeCartDiscount(): Promise<void>;
|
|
61
68
|
|
|
62
69
|
/**
|
|
63
|
-
* Remove all cart and line
|
|
70
|
+
* 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.
|
|
64
71
|
*
|
|
65
72
|
* @param disableAutomaticDiscounts Whether or not automatic discounts should be enabled after removing the discounts.
|
|
66
73
|
*/
|
|
67
74
|
removeAllDiscounts(disableAutomaticDiscounts: boolean): Promise<void>;
|
|
68
75
|
|
|
69
76
|
/**
|
|
70
|
-
*
|
|
77
|
+
* 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.
|
|
71
78
|
*/
|
|
72
79
|
clearCart(): Promise<void>;
|
|
73
80
|
|
|
74
81
|
/**
|
|
75
|
-
*
|
|
82
|
+
* 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.
|
|
76
83
|
*
|
|
77
84
|
* @param customer the customer object to add to the cart
|
|
78
85
|
*/
|
|
79
86
|
setCustomer(customer: Customer): Promise<void>;
|
|
80
87
|
|
|
81
88
|
/**
|
|
82
|
-
* Remove the
|
|
89
|
+
* 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.
|
|
83
90
|
*/
|
|
84
91
|
removeCustomer(): Promise<void>;
|
|
85
92
|
|
|
86
93
|
/**
|
|
87
|
-
* Add a custom sale to the cart
|
|
94
|
+
* 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.
|
|
88
95
|
*
|
|
89
96
|
* @param customSale the custom sale object to add to the cart
|
|
90
|
-
* @returns {string} the
|
|
97
|
+
* @returns {string} the UUID of the line item added
|
|
91
98
|
*/
|
|
92
99
|
addCustomSale(customSale: CustomSale): Promise<string>;
|
|
93
100
|
|
|
94
101
|
/**
|
|
95
|
-
* Add a
|
|
96
|
-
* Returns the uuid of the line item added, or the empty string if the user dismissed an oversell guard modal without adding anything.
|
|
97
|
-
* Throws if POS fails to add the line item. Throws if POS fails to add the line item.
|
|
102
|
+
* 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.
|
|
98
103
|
*
|
|
99
104
|
* @param variantId the product variant's numeric ID to add to the cart
|
|
100
105
|
* @param quantity the number of this variant to add to the cart
|
|
101
|
-
* @returns {string} the
|
|
106
|
+
* @returns {string} the UUID of the line item added, or the empty string if the user dismissed an oversell guard modal
|
|
102
107
|
* @throws {Error} if POS fails to add the line item
|
|
103
108
|
*/
|
|
104
109
|
addLineItem(variantId: number, quantity: number): Promise<string>;
|
|
105
110
|
|
|
106
111
|
/**
|
|
107
|
-
* Remove the line item
|
|
112
|
+
* 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.
|
|
108
113
|
*
|
|
109
114
|
* @param uuid the uuid of the line item that should be removed
|
|
110
115
|
*/
|
|
111
116
|
removeLineItem(uuid: string): Promise<void>;
|
|
112
117
|
|
|
113
118
|
/**
|
|
114
|
-
*
|
|
119
|
+
* 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.
|
|
115
120
|
*
|
|
116
121
|
* @param properties the custom key to value object to attribute to the cart
|
|
117
122
|
*/
|
|
118
123
|
addCartProperties(properties: Record<string, string>): Promise<void>;
|
|
119
124
|
|
|
120
125
|
/**
|
|
121
|
-
*
|
|
126
|
+
* 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.
|
|
122
127
|
*
|
|
123
128
|
* @param keys the collection of keys to be removed from the cart properties
|
|
124
129
|
*/
|
|
125
130
|
removeCartProperties(keys: string[]): Promise<void>;
|
|
126
131
|
|
|
127
132
|
/**
|
|
128
|
-
*
|
|
133
|
+
* 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.
|
|
129
134
|
*
|
|
130
135
|
* @param uuid the uuid of the line item to which the properties should be stringd
|
|
131
136
|
* @param properties the custom key to value object to attribute to the line item
|
|
@@ -136,7 +141,7 @@ export interface CartApiContent {
|
|
|
136
141
|
): Promise<void>;
|
|
137
142
|
|
|
138
143
|
/**
|
|
139
|
-
*
|
|
144
|
+
* 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.
|
|
140
145
|
*
|
|
141
146
|
* @param lineItemProperties the collection of custom line item properties to apply to their respective line items.
|
|
142
147
|
*/
|
|
@@ -145,7 +150,7 @@ export interface CartApiContent {
|
|
|
145
150
|
): Promise<void>;
|
|
146
151
|
|
|
147
152
|
/**
|
|
148
|
-
*
|
|
153
|
+
* 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.
|
|
149
154
|
*
|
|
150
155
|
* @param uuid the uuid of the line item to which the properties should be removed
|
|
151
156
|
* @param keys the collection of keys to be removed from the line item properties
|
|
@@ -153,7 +158,7 @@ export interface CartApiContent {
|
|
|
153
158
|
removeLineItemProperties(uuid: string, keys: string[]): Promise<void>;
|
|
154
159
|
|
|
155
160
|
/**
|
|
156
|
-
*
|
|
161
|
+
* 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.
|
|
157
162
|
*
|
|
158
163
|
* @param uuid the uuid of the line item that should receive a discount
|
|
159
164
|
* @param type the type of discount applied (example: 'Percentage')
|
|
@@ -168,7 +173,7 @@ export interface CartApiContent {
|
|
|
168
173
|
): Promise<void>;
|
|
169
174
|
|
|
170
175
|
/**
|
|
171
|
-
*
|
|
176
|
+
* 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.
|
|
172
177
|
*
|
|
173
178
|
* @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.
|
|
174
179
|
*/
|
|
@@ -177,14 +182,14 @@ export interface CartApiContent {
|
|
|
177
182
|
): Promise<void>;
|
|
178
183
|
|
|
179
184
|
/**
|
|
180
|
-
*
|
|
185
|
+
* 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.
|
|
181
186
|
*
|
|
182
187
|
* @param staffId the ID of the staff. Providing undefined will clear the attributed staff from all line items.
|
|
183
188
|
*/
|
|
184
189
|
setAttributedStaff(staffId: number | undefined): Promise<void>;
|
|
185
190
|
|
|
186
191
|
/**
|
|
187
|
-
*
|
|
192
|
+
* 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.
|
|
188
193
|
*
|
|
189
194
|
* @param staffId the ID of the staff. Providing undefined will clear the attributed staff on the line item.
|
|
190
195
|
* @param lineItemUuid the UUID of the line item.
|
|
@@ -195,35 +200,35 @@ export interface CartApiContent {
|
|
|
195
200
|
): Promise<void>;
|
|
196
201
|
|
|
197
202
|
/**
|
|
198
|
-
* Remove all discounts from a line item
|
|
203
|
+
* 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.
|
|
199
204
|
*
|
|
200
205
|
* @param uuid the uuid of the line item whose discounts should be removed
|
|
201
206
|
*/
|
|
202
207
|
removeLineItemDiscount(uuid: string): Promise<void>;
|
|
203
208
|
|
|
204
209
|
/**
|
|
205
|
-
* Add
|
|
210
|
+
* 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.
|
|
206
211
|
*
|
|
207
212
|
* @param address the address object to add to the customer in cart
|
|
208
213
|
*/
|
|
209
214
|
addAddress(address: Address): Promise<void>;
|
|
210
215
|
|
|
211
216
|
/**
|
|
212
|
-
* Delete an address from the customer
|
|
217
|
+
* 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`.
|
|
213
218
|
*
|
|
214
219
|
* @param addressId the address ID to delete
|
|
215
220
|
*/
|
|
216
221
|
deleteAddress(addressId: number): Promise<void>;
|
|
217
222
|
|
|
218
223
|
/**
|
|
219
|
-
*
|
|
224
|
+
* 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.
|
|
220
225
|
*
|
|
221
226
|
* @param addressId the address ID to set as the default address
|
|
222
227
|
*/
|
|
223
228
|
updateDefaultAddress(addressId: number): Promise<void>;
|
|
224
229
|
|
|
225
230
|
/**
|
|
226
|
-
* Add a selling plan to a line item in the cart.
|
|
231
|
+
* 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.
|
|
227
232
|
*
|
|
228
233
|
* @param uuid the uuid of the line item that should receive the selling plan
|
|
229
234
|
* @param sellingPlanId the ID of the selling plan to add to the line item
|
|
@@ -231,7 +236,7 @@ export interface CartApiContent {
|
|
|
231
236
|
addLineItemSellingPlan(input: SetLineItemSellingPlanInput): Promise<void>;
|
|
232
237
|
|
|
233
238
|
/**
|
|
234
|
-
* Remove the selling plan from a line item in the cart.
|
|
239
|
+
* 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.
|
|
235
240
|
*
|
|
236
241
|
* @param uuid the uuid of the line item whose selling plan should be removed
|
|
237
242
|
*/
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type {LineItem} from '../../types/cart';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* The `CartLineItemApi` object provides access to the current line item. Access this property through `api.cartLineItem` to interact with the current line item context.
|
|
5
5
|
*/
|
|
6
6
|
export interface CartLineItemApi {
|
|
7
7
|
/**
|
|
8
|
-
* The selected line item in the merchant
|
|
8
|
+
* 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.
|
|
9
9
|
*/
|
|
10
10
|
cartLineItem: LineItem;
|
|
11
11
|
}
|
|
@@ -2,23 +2,25 @@ import type {ReadonlySignalLike} from '../../../../shared';
|
|
|
2
2
|
|
|
3
3
|
export type ConnectivityStateSeverity = 'Connected' | 'Disconnected';
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* Represents the current Internet connectivity status of the device. Indicates whether the device is connected or disconnected from the Internet.
|
|
7
|
+
*/
|
|
5
8
|
export interface ConnectivityState {
|
|
6
9
|
/**
|
|
7
|
-
*
|
|
10
|
+
* The Internet connection status of the POS device.
|
|
8
11
|
*/
|
|
9
12
|
internetConnected: ConnectivityStateSeverity;
|
|
10
13
|
}
|
|
11
14
|
|
|
12
15
|
export interface ConnectivityApiContent {
|
|
13
16
|
/**
|
|
14
|
-
* Provides read-only access to the current connectivity state and allows subscribing to connectivity changes.
|
|
15
|
-
* The `value` property provides the current connectivity state, and `subscribe` allows listening to changes.
|
|
17
|
+
* 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.
|
|
16
18
|
*/
|
|
17
19
|
current: ReadonlySignalLike<ConnectivityState>;
|
|
18
20
|
}
|
|
19
21
|
|
|
20
22
|
/**
|
|
21
|
-
*
|
|
23
|
+
* The `ConnectivityApi` object provides access to current connectivity information and change notifications. Access these properties through `shopify.connectivity` to monitor network status.
|
|
22
24
|
*/
|
|
23
25
|
export interface ConnectivityApi {
|
|
24
26
|
connectivity: ConnectivityApiContent;
|
|
@@ -1,10 +1,13 @@
|
|
|
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
|
|
|
5
8
|
export interface CustomerApiContent {
|
|
6
9
|
/**
|
|
7
|
-
* The unique identifier for the customer
|
|
10
|
+
* The unique identifier for the customer. Use for customer lookups, applying customer-specific pricing, enabling personalized features, and integrating with external systems.
|
|
8
11
|
*/
|
|
9
12
|
id: number;
|
|
10
13
|
}
|
|
@@ -1,20 +1,20 @@
|
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
16
|
/**
|
|
17
|
-
*
|
|
17
|
+
* 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.
|
|
18
18
|
*/
|
|
19
19
|
export interface DeviceApi {
|
|
20
20
|
device: DeviceApiContent;
|
|
@@ -1,20 +1,23 @@
|
|
|
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
|
|
|
5
8
|
export interface DraftOrderApiContent {
|
|
6
9
|
/**
|
|
7
|
-
* The unique identifier for the draft order
|
|
10
|
+
* The unique identifier for the draft order. Use for draft order lookups, implementing order-specific functionality, and integrating with external systems.
|
|
8
11
|
*/
|
|
9
12
|
id: number;
|
|
10
13
|
|
|
11
14
|
/**
|
|
12
|
-
* The name of the draft order
|
|
15
|
+
* The name of the draft order as configured by the merchant. Use for draft order identification, displays, and customer-facing interfaces.
|
|
13
16
|
*/
|
|
14
17
|
name: string;
|
|
15
18
|
|
|
16
19
|
/**
|
|
17
|
-
* The unique identifier of the customer associated with the draft order
|
|
20
|
+
* 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.
|
|
18
21
|
*/
|
|
19
22
|
customerId?: number;
|
|
20
23
|
}
|
|
@@ -2,14 +2,13 @@ import type {ReadonlySignalLike} from '../../../../shared';
|
|
|
2
2
|
|
|
3
3
|
export interface LocaleApiContent {
|
|
4
4
|
/**
|
|
5
|
-
* Provides read-only access to the current IETF-formatted locale and allows subscribing to locale changes.
|
|
6
|
-
* The `value` property provides the current locale, and `subscribe` allows listening to changes.
|
|
5
|
+
* 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.
|
|
7
6
|
*/
|
|
8
7
|
current: ReadonlySignalLike<string>;
|
|
9
8
|
}
|
|
10
9
|
|
|
11
10
|
/**
|
|
12
|
-
*
|
|
11
|
+
* The `LocaleApi` object provides access to current locale information and change notifications. Access these properties through `shopify.locale` to retrieve and monitor locale data.
|
|
13
12
|
*/
|
|
14
13
|
export interface LocaleApi {
|
|
15
14
|
locale: LocaleApiContent;
|
|
@@ -1,44 +1,52 @@
|
|
|
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
|
|
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
11
|
/**
|
|
9
|
-
*
|
|
12
|
+
* Represents a single entry in the navigation history stack. Contains the URL and unique identifier for tracking navigation state and implementing history-based navigation.
|
|
10
13
|
*/
|
|
11
14
|
export interface NavigationHistoryEntry {
|
|
12
|
-
/**
|
|
15
|
+
/**
|
|
16
|
+
* 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.
|
|
17
|
+
*/
|
|
13
18
|
key: string;
|
|
14
19
|
/**
|
|
15
|
-
*
|
|
20
|
+
* 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.
|
|
16
21
|
*/
|
|
17
22
|
url: string | null;
|
|
18
23
|
/**
|
|
19
|
-
* Returns a clone of the available state associated with this history entry.
|
|
24
|
+
* 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.
|
|
20
25
|
*/
|
|
21
26
|
getState(): unknown;
|
|
22
27
|
}
|
|
23
28
|
|
|
24
29
|
export interface Navigation {
|
|
25
30
|
/**
|
|
26
|
-
*
|
|
31
|
+
* 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.
|
|
27
32
|
*/
|
|
28
33
|
navigate: (url: string, options?: NavigationNavigateOptions) => Promise<void>;
|
|
29
34
|
/**
|
|
30
|
-
*
|
|
35
|
+
* 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.
|
|
31
36
|
*/
|
|
32
37
|
currentEntry: NavigationHistoryEntry;
|
|
33
38
|
/**
|
|
34
|
-
*
|
|
39
|
+
* 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.
|
|
35
40
|
*/
|
|
36
41
|
back(): void;
|
|
37
42
|
}
|
|
38
43
|
|
|
44
|
+
/**
|
|
45
|
+
* 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.
|
|
46
|
+
*/
|
|
39
47
|
export interface Window {
|
|
40
48
|
/**
|
|
41
|
-
*
|
|
49
|
+
* 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.
|
|
42
50
|
*/
|
|
43
51
|
close(): void;
|
|
44
52
|
}
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
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
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* The `OrderApi` object provides access to order data. Access this property through `shopify.order` to interact with the current order context.
|
|
10
10
|
*/
|
|
11
11
|
export interface OrderApiContent {
|
|
12
12
|
/**
|
|
13
|
-
* The unique identifier for the order
|
|
13
|
+
* The unique identifier for the order. Use for order lookups, implementing order-specific functionality, and integrating with external systems.
|
|
14
14
|
*/
|
|
15
15
|
id: number;
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
|
-
* The name of the order
|
|
18
|
+
* The name of the order as configured by the merchant. Use for order identification, displays, and customer-facing interfaces.
|
|
19
19
|
*/
|
|
20
20
|
name: string;
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
|
-
* The unique identifier of the customer associated with the order
|
|
23
|
+
* 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.
|
|
24
24
|
*/
|
|
25
25
|
customerId?: number;
|
|
26
26
|
}
|
|
@@ -1,18 +1,14 @@
|
|
|
1
1
|
import {PinPadOptions, PinValidationResult} from '../types/pin-pad';
|
|
2
2
|
|
|
3
3
|
export interface PinPadApiContent {
|
|
4
|
-
/**
|
|
4
|
+
/**
|
|
5
|
+
* 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'`.
|
|
5
6
|
*
|
|
6
|
-
*
|
|
7
|
-
* should validate the PIN and accept or reject it.
|
|
7
|
+
* • **When accepted**: Modal dismisses and triggers the `onDismissed` callback—perform any post-validation navigation in this callback rather than in `onSubmit`.
|
|
8
8
|
*
|
|
9
|
-
*
|
|
10
|
-
* (provided via `options`) will be called. It is recommended that any post-validation
|
|
11
|
-
* navigation is performed in this callback rather than in `onSubmit`.
|
|
12
|
-
*
|
|
13
|
-
* If the PIN is rejected, the optional `errorMessage` will be displayed to the user and the modal
|
|
14
|
-
* will not be dismissed.
|
|
9
|
+
* • **When rejected**: Displays the optional `errorMessage` and keeps the modal open.
|
|
15
10
|
*
|
|
11
|
+
* Use for implementing secure authentication workflows, access control, or PIN-based verification systems.
|
|
16
12
|
*/
|
|
17
13
|
showPinPad(
|
|
18
14
|
onSubmit: (
|
|
@@ -23,7 +19,7 @@ export interface PinPadApiContent {
|
|
|
23
19
|
}
|
|
24
20
|
|
|
25
21
|
/**
|
|
26
|
-
*
|
|
22
|
+
* 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.
|
|
27
23
|
*/
|
|
28
24
|
export interface PinPadApi {
|
|
29
25
|
pinPad: PinPadApiContent;
|