@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
|
@@ -1,7 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The available payment method types for POS transactions.
|
|
3
|
+
*/
|
|
1
4
|
export type PaymentMethod = 'Cash' | 'Custom' | 'CreditCard' | 'CardPresentRefund' | 'StripeCardPresentRefund' | 'GiftCard' | 'StripeCreditCard' | 'ShopPay' | 'StoreCredit' | 'Unknown';
|
|
5
|
+
/**
|
|
6
|
+
* Represents a payment applied to a transaction, including the amount, currency, and payment method type.
|
|
7
|
+
*/
|
|
2
8
|
export interface Payment {
|
|
9
|
+
/**
|
|
10
|
+
* The payment amount.
|
|
11
|
+
*/
|
|
3
12
|
amount: number;
|
|
13
|
+
/**
|
|
14
|
+
* The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code associated with the location currently active on POS.
|
|
15
|
+
*/
|
|
4
16
|
currency: string;
|
|
17
|
+
/**
|
|
18
|
+
* The payment method type.
|
|
19
|
+
*/
|
|
5
20
|
type: PaymentMethod;
|
|
6
21
|
}
|
|
7
22
|
//# sourceMappingURL=payment.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payment.d.ts","sourceRoot":"","sources":["../../../../../src/surfaces/point-of-sale/types/payment.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GACrB,MAAM,GACN,QAAQ,GACR,YAAY,GACZ,mBAAmB,GACnB,yBAAyB,GACzB,UAAU,GACV,kBAAkB,GAClB,SAAS,GACT,aAAa,GACb,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"payment.d.ts","sourceRoot":"","sources":["../../../../../src/surfaces/point-of-sale/types/payment.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,aAAa,GACrB,MAAM,GACN,QAAQ,GACR,YAAY,GACZ,mBAAmB,GACnB,yBAAyB,GACzB,UAAU,GACV,kBAAkB,GAClB,SAAS,GACT,aAAa,GACb,SAAS,CAAC;AAEd;;GAEG;AACH,MAAM,WAAW,OAAO;IACtB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,IAAI,EAAE,aAAa,CAAC;CACrB"}
|
|
@@ -1,70 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents the result of a PIN pad interaction, indicating whether PIN entry was completed and providing the entered PIN if available.
|
|
3
|
+
*/
|
|
1
4
|
export interface PinPadResult {
|
|
2
5
|
/**
|
|
3
|
-
* Whether the PIN entry was completed (
|
|
6
|
+
* Whether the PIN entry was completed successfully. When `true`, the user entered a PIN and submitted it (or it was auto-submitted). When `false`, the user canceled the PIN pad modal without completing entry, typically by clicking a cancel button or dismissing the modal.
|
|
4
7
|
*/
|
|
5
8
|
completed: boolean;
|
|
6
9
|
/**
|
|
7
|
-
* The entered PIN (
|
|
10
|
+
* The entered PIN as an array of individual digits (for example, `[1, 2, 3, 4]` for PIN "1234"). Each element is a number from 0-9. This array's length will be between `minPinLength` and `maxPinLength` inclusive. Only present when `completed` is `true`—when `completed` is `false`, this field is `undefined` since no PIN was entered.
|
|
8
11
|
*/
|
|
9
12
|
pin?: number[];
|
|
10
13
|
}
|
|
11
14
|
/**
|
|
12
|
-
* Represents the
|
|
13
|
-
* @typedef {{result: 'accept'} | {result: 'reject'; errorMessage?: string}} PinValidationResult
|
|
15
|
+
* Represents the validation outcome for an entered PIN. Indicates whether the PIN should be accepted or rejected, with optional error messaging for rejected PINs.
|
|
14
16
|
*/
|
|
15
|
-
export type PinValidationResult =
|
|
17
|
+
export type PinValidationResult =
|
|
18
|
+
/** The validation result indicating the PIN should be accepted for valid PINs. */
|
|
19
|
+
{
|
|
16
20
|
result: 'accept';
|
|
17
|
-
}
|
|
21
|
+
}
|
|
22
|
+
/** The validation result indicating the PIN should be rejected. Optionally includes an error message to display to the user explaining why the PIN was rejected. For example, "Invalid PIN" or "PIN expired". */
|
|
23
|
+
| {
|
|
18
24
|
result: 'reject';
|
|
19
25
|
errorMessage?: string;
|
|
20
26
|
};
|
|
27
|
+
/**
|
|
28
|
+
* The valid PIN length values (4-10 digits). Commonly used to configure minimum and maximum PIN length requirements.
|
|
29
|
+
*/
|
|
21
30
|
export type PinLength = 4 | 5 | 6 | 7 | 8 | 9 | 10;
|
|
31
|
+
/**
|
|
32
|
+
* Defines a custom action button for the PIN pad interface with a label and click handler.
|
|
33
|
+
*/
|
|
22
34
|
export interface PinPadActionType {
|
|
35
|
+
/**
|
|
36
|
+
* The content for the prompt on the pin pad. Use to provide clear instructions or context about what the PIN is being used for.
|
|
37
|
+
*/
|
|
23
38
|
label: string;
|
|
39
|
+
/**
|
|
40
|
+
* Called when the action button is clicked. Can return the PIN digits directly as an array of numbers, or return a Promise that resolves to the PIN array. Use for implementing custom PIN retrieval logic or validation workflows.
|
|
41
|
+
*/
|
|
24
42
|
onClick: () => Promise<number[]> | number[];
|
|
25
43
|
}
|
|
44
|
+
/**
|
|
45
|
+
* Specifies configuration options for displaying the PIN pad interface. Includes callback functions for PIN entry events, dismissal handling, and customizable labels and messaging.
|
|
46
|
+
*/
|
|
26
47
|
export interface PinPadOptions {
|
|
27
48
|
/**
|
|
28
|
-
* The function to be called
|
|
49
|
+
* The function to be called when a pin is entered. Use for real-time PIN validation, progress feedback, or implementing custom PIN entry handling logic.
|
|
29
50
|
*/
|
|
30
51
|
onPinEntry?: (pin: number[]) => void;
|
|
31
52
|
/**
|
|
32
|
-
* The function to be called when the
|
|
53
|
+
* The function to be called when the pin pad modal is dismissed. Receives a `PinPadResult` indicating whether PIN entry was completed and the entered PIN if available. Use for handling modal dismissal and processing final PIN results.
|
|
33
54
|
*/
|
|
34
55
|
onDismissed?: (result: PinPadResult) => void;
|
|
35
56
|
/**
|
|
36
|
-
* The content for the prompt on the
|
|
37
|
-
* `errorMessage` provided when rejecting a PIN from the `onSubmit` callback.
|
|
57
|
+
* The content for the prompt on the pin pad. Use to provide clear instructions or context about what the PIN is being used for.
|
|
38
58
|
*/
|
|
39
59
|
label?: string;
|
|
40
60
|
/**
|
|
41
|
-
* Whether the entered PIN should be masked
|
|
61
|
+
* Whether the entered PIN should be masked for security. When `true`, PIN digits are hidden from view. Use for secure PIN entry where visual privacy is important.
|
|
42
62
|
*
|
|
43
63
|
* @default true
|
|
44
64
|
*/
|
|
45
65
|
masked?: boolean;
|
|
46
66
|
/**
|
|
47
|
-
* The minimum length of the PIN
|
|
67
|
+
* The minimum length of the PIN (4-10 digits). Use to enforce PIN length requirements based on your security policies or authentication system requirements.
|
|
48
68
|
*
|
|
49
69
|
* @default 4
|
|
50
70
|
*/
|
|
51
71
|
minPinLength?: PinLength;
|
|
52
72
|
/**
|
|
53
|
-
* The maximum length of the PIN
|
|
73
|
+
* The maximum length of the PIN (4-10 digits). Use to limit PIN length based on your security policies or authentication system constraints.
|
|
54
74
|
*
|
|
55
75
|
* @default 6
|
|
56
76
|
*/
|
|
57
77
|
maxPinLength?: PinLength;
|
|
58
78
|
/**
|
|
59
|
-
* The call to action between the entry view and the keypad
|
|
79
|
+
* The call to action between the entry view and the keypad, consisting of a label and function that returns the pin. Use for custom PIN entry workflows or implementing specific authentication patterns.
|
|
60
80
|
*/
|
|
61
81
|
pinPadAction?: PinPadActionType;
|
|
62
82
|
/**
|
|
63
|
-
*
|
|
83
|
+
* The title shown in the modal header. Use to provide context about the PIN entry purpose or identify the specific authentication requirement.
|
|
64
84
|
*/
|
|
65
85
|
title?: string;
|
|
66
86
|
/**
|
|
67
|
-
* Whether the
|
|
87
|
+
* Whether the pin should be automatically submitted when the user has entered the maximum PIN length. Use for PIN entry experiences where users don't need to manually submit after entering the required digits.
|
|
68
88
|
*
|
|
69
89
|
* @default false
|
|
70
90
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pin-pad.d.ts","sourceRoot":"","sources":["../../../../../src/surfaces/point-of-sale/types/pin-pad.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,SAAS,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,EAAE,CAAC;CAChB;AAED
|
|
1
|
+
{"version":3,"file":"pin-pad.d.ts","sourceRoot":"","sources":["../../../../../src/surfaces/point-of-sale/types/pin-pad.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,SAAS,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,EAAE,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,MAAM,mBAAmB;AAC7B,kFAAkF;AAChF;IAAC,MAAM,EAAE,QAAQ,CAAA;CAAC;AACpB,iNAAiN;GAC/M;IAAC,MAAM,EAAE,QAAQ,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,CAAA;CAAC,CAAC;AAE9C;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC;AAEnD;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,OAAO,EAAE,MAAM,OAAO,CAAC,MAAM,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC;CAC7C;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACrC;;OAEG;IACH,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,IAAI,CAAC;IAC7C;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;;OAIG;IACH,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB;;;;OAIG;IACH,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB;;OAEG;IACH,YAAY,CAAC,EAAE,gBAAgB,CAAC;IAChC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB"}
|
|
@@ -1,61 +1,231 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents comprehensive product information including metadata, pricing, variants, and availability. Contains all data needed to display and work with products in the POS interface.
|
|
3
|
+
*/
|
|
1
4
|
export interface Product {
|
|
5
|
+
/**
|
|
6
|
+
* The unique identifier for the product. Use this ID for product-specific operations, API calls, or linking to product details. This ID is consistent across all Shopify systems and can be used for external integrations.
|
|
7
|
+
*/
|
|
2
8
|
id: number;
|
|
9
|
+
/**
|
|
10
|
+
* The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp when the product was created. Use for sorting products by creation date, implementing "new product" features, or tracking product catalog growth over time.
|
|
11
|
+
*/
|
|
3
12
|
createdAt: string;
|
|
13
|
+
/**
|
|
14
|
+
* The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp when the product was last updated. Use for cache invalidation, tracking recent changes, or implementing "recently updated" product features.
|
|
15
|
+
*/
|
|
4
16
|
updatedAt: string;
|
|
17
|
+
/**
|
|
18
|
+
* The product's display name as configured by the merchant. Use for product listings, search results, and customer-facing displays. This is the primary product identifier that customers will recognize.
|
|
19
|
+
*/
|
|
5
20
|
title: string;
|
|
21
|
+
/**
|
|
22
|
+
* The product's plain text description without HTML formatting. Use for displaying product information in contexts where HTML is not supported or when you need clean text content for processing.
|
|
23
|
+
*/
|
|
6
24
|
description: string;
|
|
25
|
+
/**
|
|
26
|
+
* The product's description with HTML formatting preserved. Use when you need to display rich text content with formatting, links, or other HTML elements in your extension interface.
|
|
27
|
+
*/
|
|
7
28
|
descriptionHtml: string;
|
|
29
|
+
/**
|
|
30
|
+
* The URL of the product's featured image, if one is set. Returns `undefined` if no featured image is configured. Use for displaying product images in search results, product listings, or detailed product views.
|
|
31
|
+
*/
|
|
8
32
|
featuredImage?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Whether this product is a gift card. Gift cards have special handling requirements and different business logic. Use to implement gift card-specific workflows, validation, or display special gift card interfaces.
|
|
35
|
+
*/
|
|
9
36
|
isGiftCard: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Whether inventory tracking is enabled for this product. When `false`, inventory quantities may not be accurate or meaningful. Use to determine whether to display inventory information or implement inventory-based business logic.
|
|
39
|
+
*/
|
|
10
40
|
tracksInventory: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* The product's vendor or brand name as configured by the merchant. Use for filtering products by brand, displaying vendor information, or organizing products by supplier.
|
|
43
|
+
*/
|
|
11
44
|
vendor: string;
|
|
45
|
+
/**
|
|
46
|
+
* The lowest price among all product variants, formatted as a string. Use for displaying price ranges, implementing price-based filtering, or showing starting prices in product listings.
|
|
47
|
+
*/
|
|
12
48
|
minVariantPrice: string;
|
|
49
|
+
/**
|
|
50
|
+
* The highest price among all product variants, formatted as a string. Use for displaying price ranges, implementing price-based filtering, or showing complete pricing information for products with multiple variants.
|
|
51
|
+
*/
|
|
13
52
|
maxVariantPrice: string;
|
|
53
|
+
/**
|
|
54
|
+
* The product type category as defined by the merchant (For example, "T-Shirt," "Electronics," "Books"). Use for product categorization, filtering, or implementing category-specific business logic.
|
|
55
|
+
*/
|
|
14
56
|
productType: string;
|
|
57
|
+
/**
|
|
58
|
+
* The standardized product category classification. Use for product categorization, implementing category-specific business logic, or organizing products by standardized categories.
|
|
59
|
+
*/
|
|
15
60
|
productCategory: string;
|
|
61
|
+
/**
|
|
62
|
+
* An array of tags associated with the product for categorization and organization. Use for product filtering, search enhancement, or implementing tag-based business logic and promotions.
|
|
63
|
+
*/
|
|
16
64
|
tags: string[];
|
|
65
|
+
/**
|
|
66
|
+
* The total number of variants available for this product. Use to determine whether to show variant selection interfaces, implement variant-specific logic, or optimize variant loading strategies.
|
|
67
|
+
*/
|
|
17
68
|
numVariants: number;
|
|
69
|
+
/**
|
|
70
|
+
* The total available inventory across all variants and locations, if tracking is enabled. Returns `undefined` when inventory tracking is disabled. Use for availability checks, stock level displays, or implementing low-stock alerts.
|
|
71
|
+
*/
|
|
18
72
|
totalAvailableInventory?: number;
|
|
73
|
+
/**
|
|
74
|
+
* The total inventory count across all variants and locations for this product. Use for inventory management, stock level displays, or implementing low-stock warnings and alerts.
|
|
75
|
+
*/
|
|
19
76
|
totalInventory: number;
|
|
77
|
+
/**
|
|
78
|
+
* An array of all product variants associated with this product. Each variant contains detailed information including pricing, inventory, and options. Use for building variant selectors, displaying inventory information, or implementing variant-specific functionality.
|
|
79
|
+
*/
|
|
20
80
|
variants: ProductVariant[];
|
|
81
|
+
/**
|
|
82
|
+
* An array of product options that define available variant configurations. For example, size and color. Each option includes available values. Use for building variant selection interfaces or understanding product configuration possibilities.
|
|
83
|
+
*/
|
|
21
84
|
options: ProductOption[];
|
|
85
|
+
/**
|
|
86
|
+
* Whether the product has only a default variant (no custom options). When `true`, the product doesn't require variant selection. Use to simplify product interfaces and skip variant selection steps for single-variant products.
|
|
87
|
+
*/
|
|
22
88
|
hasOnlyDefaultVariant: boolean;
|
|
89
|
+
/**
|
|
90
|
+
* Whether the product has any variants currently in stock. Returns `undefined` when inventory information is not available. Use for stock status displays, availability filtering, or implementing out-of-stock product handling.
|
|
91
|
+
*/
|
|
23
92
|
hasInStockVariants?: boolean;
|
|
93
|
+
/**
|
|
94
|
+
* The URL of the product on the online store, if available. Returns `undefined` when the product is not published online or the store doesn't have an online presence. Use for linking to online product pages or sharing product information.
|
|
95
|
+
*/
|
|
24
96
|
onlineStoreUrl?: string;
|
|
97
|
+
/**
|
|
98
|
+
* Indicates whether this product or line item requires a selling plan (subscription) to be purchased. When `true`, the customer must select a subscription or payment plan before adding to cart. When `false`, the item can be purchased as a one-time purchase without a selling plan.
|
|
99
|
+
*/
|
|
25
100
|
requiresSellingPlan?: boolean;
|
|
101
|
+
/**
|
|
102
|
+
* Indicates whether this product or line item has selling plan groups (subscription options) available. When `true`, the product offers subscription or recurring payment options that customers can select. When `false`, the product is only available for one-time purchase without subscription options.
|
|
103
|
+
*/
|
|
26
104
|
hasSellingPlanGroups?: boolean;
|
|
27
105
|
}
|
|
106
|
+
/**
|
|
107
|
+
* Represents a specific variant of a product with its own SKU, price, and inventory. Contains variant-specific attributes including options, availability, and identification data.
|
|
108
|
+
*/
|
|
28
109
|
export interface ProductVariant {
|
|
110
|
+
/**
|
|
111
|
+
* The unique identifier for the product variant. Use this ID for variant-specific operations, cart additions, or inventory lookups. This ID is consistent across all Shopify systems.
|
|
112
|
+
*/
|
|
29
113
|
id: number;
|
|
114
|
+
/**
|
|
115
|
+
* The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp when the product variant was created. Use for sorting variants by creation date, implementing "new product" features, or tracking product catalog changes over time.
|
|
116
|
+
*/
|
|
30
117
|
createdAt: string;
|
|
118
|
+
/**
|
|
119
|
+
* The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp when the product variant was last updated. Use for cache invalidation, tracking recent changes, or implementing "recently updated" product features.
|
|
120
|
+
*/
|
|
31
121
|
updatedAt: string;
|
|
122
|
+
/**
|
|
123
|
+
* The variant's display title, typically showing the option combinations. For example, `"Large / Blue"`. Use for variant selection interfaces, cart displays, or anywhere users need to distinguish between variants.
|
|
124
|
+
*/
|
|
32
125
|
title: string;
|
|
126
|
+
/**
|
|
127
|
+
* The variant's selling price formatted as a string. Use for price displays, cart calculations, or implementing pricing logic. This represents the current selling price for the variant.
|
|
128
|
+
*/
|
|
33
129
|
price: string;
|
|
130
|
+
/**
|
|
131
|
+
* The variant's compare-at price (original or MSRP price) formatted as a string, if set. Returns `undefined` when no compare-at price is configured. Use for displaying discounts, sale pricing, or savings calculations.
|
|
132
|
+
*/
|
|
34
133
|
compareAtPrice?: string;
|
|
134
|
+
/**
|
|
135
|
+
* Whether this variant is subject to tax calculations. Use for tax computation logic, pricing displays, or implementing tax-exempt product handling.
|
|
136
|
+
*/
|
|
35
137
|
taxable: boolean;
|
|
138
|
+
/**
|
|
139
|
+
* The variant's Stock Keeping Unit (SKU) identifier, if configured. Returns `undefined` when no SKU is set. Use for inventory management, product identification, or integration with external systems that use SKU-based tracking.
|
|
140
|
+
*/
|
|
36
141
|
sku?: string;
|
|
142
|
+
/**
|
|
143
|
+
* The variant's barcode identifier, if configured. Returns `undefined` when no barcode is set. Use for barcode scanning functionality, inventory tracking, or integration with barcode-based systems.
|
|
144
|
+
*/
|
|
37
145
|
barcode?: string;
|
|
146
|
+
/**
|
|
147
|
+
* The variant's formatted display name for user interfaces. This may differ from the title and is optimized for display purposes. Use for customer-facing variant names in product listings, cart items, or receipt displays.
|
|
148
|
+
*/
|
|
38
149
|
displayName: string;
|
|
150
|
+
/**
|
|
151
|
+
* The URL of the variant-specific image, if one is configured. Returns `undefined` when no variant image is set. Use for displaying variant-specific images in selection interfaces or product galleries.
|
|
152
|
+
*/
|
|
39
153
|
image?: string;
|
|
154
|
+
/**
|
|
155
|
+
* Whether inventory tracking is enabled for this specific variant. When `false`, inventory quantities may not be accurate. Use to determine whether to display inventory information or implement inventory-based business logic for this variant.
|
|
156
|
+
*/
|
|
40
157
|
inventoryIsTracked: boolean;
|
|
158
|
+
/**
|
|
159
|
+
* The inventory quantity available at the current POS location, if inventory tracking is enabled. Returns `undefined` when inventory tracking is disabled. Use for location-specific inventory displays, stock availability checks, or local inventory management.
|
|
160
|
+
*/
|
|
41
161
|
inventoryAtLocation?: number;
|
|
162
|
+
/**
|
|
163
|
+
* The total inventory quantity across all locations for this variant, if available. Returns `undefined` when this information is not available. Use for comprehensive inventory views, transfer planning, or multi-location inventory management.
|
|
164
|
+
*/
|
|
42
165
|
inventoryAtAllLocations?: number;
|
|
166
|
+
/**
|
|
167
|
+
* The inventory policy for this variant, either "DENY" (prevent sales when out of stock) or "CONTINUE" (allow sales when out of stock). Use to implement inventory validation logic and determine whether to allow purchases of out-of-stock items.
|
|
168
|
+
*/
|
|
43
169
|
inventoryPolicy: ProductVariantInventoryPolicy;
|
|
170
|
+
/**
|
|
171
|
+
* Whether this variant currently has inventory in stock. Returns `undefined` when inventory information is not available. Use for stock status displays, availability checks, or filtering in-stock variants.
|
|
172
|
+
*/
|
|
44
173
|
hasInStockVariants?: boolean;
|
|
174
|
+
/**
|
|
175
|
+
* An array of option name-value pairs that define this variant's configuration. For example, `[{name: "Size," value: "Large"}, {name: "Color," value: "Blue"}]`. Returns `undefined` for products with only default variants. Use for displaying variant options, building variant selectors, or implementing variant-based logic.
|
|
176
|
+
*/
|
|
45
177
|
options?: ProductVariantOption[];
|
|
178
|
+
/**
|
|
179
|
+
* Reference to the parent Product object that this variant belongs to. Returns `undefined` in some contexts to avoid circular references. Use when you need access to product-level information from a variant context.
|
|
180
|
+
*/
|
|
46
181
|
product?: Product;
|
|
182
|
+
/**
|
|
183
|
+
* The ID of the parent product that this variant belongs to. Use for linking variants back to their parent product, implementing product-level operations, or organizing variants by product.
|
|
184
|
+
*/
|
|
47
185
|
productId: number;
|
|
186
|
+
/**
|
|
187
|
+
* The variant's position order within the product's variant list. Use for maintaining consistent variant ordering in selection interfaces or implementing custom variant sorting logic.
|
|
188
|
+
*/
|
|
48
189
|
position: number;
|
|
49
190
|
}
|
|
191
|
+
/**
|
|
192
|
+
* Represents a single option selection for a product variant, showing one chosen value from a product's configuration options. For example, if a product has Size and Color options, a variant might have one option for Size=Large and another for Color=Blue.
|
|
193
|
+
*/
|
|
50
194
|
export interface ProductVariantOption {
|
|
195
|
+
/**
|
|
196
|
+
* The option category name (for example, "Size", "Color", "Material", "Style", "Flavor"). This is the attribute or dimension along which the product varies. Each product can have up to 3 option names, and each option name can have multiple values. The name is visible to customers in variant selection interfaces. Commonly used for displaying option labels in variant selectors ("Select Size:", "Choose Color:"), building dynamic product configuration UI, or organizing product variations by attribute type.
|
|
197
|
+
*/
|
|
51
198
|
name: string;
|
|
199
|
+
/**
|
|
200
|
+
* The selected value for this option that defines this specific variant (for example, "Large", "Blue", "Cotton", "V-Neck"). This is the specific choice from the available option values that characterizes this variant. For example, if `name` is "Size", the `value` might be "Large" or "Small". Values are set at the variant level—each variant has a unique combination of option values. Commonly used for displaying the variant's configuration ("Size: Large, Color: Blue"), building variant selection dropdowns, or matching user selections to variants.
|
|
201
|
+
*/
|
|
52
202
|
value: string;
|
|
53
203
|
}
|
|
204
|
+
/**
|
|
205
|
+
* The inventory policy determining whether sales can continue when a variant has no inventory available:
|
|
206
|
+
* - `'DENY'`: Sales are prevented when inventory reaches zero. Customers can't purchase out-of-stock variants. The "Add to cart" action is disabled or shows "Out of stock". This is the default and recommended policy for most physical products to prevent overselling.
|
|
207
|
+
* - `'CONTINUE'`: Sales are allowed even when inventory is zero or negative. Customers can purchase out-of-stock variants, creating backorders. This enables pre-orders, made-to-order products, or drop-shipped items where inventory tracking is less critical.
|
|
208
|
+
*/
|
|
54
209
|
export type ProductVariantInventoryPolicy = 'DENY' | 'CONTINUE';
|
|
210
|
+
/**
|
|
211
|
+
* Represents a product option definition showing one of the configurable attributes for a product (like Size, Color, Material) along with all the possible values customers can choose from. Products can have up to 3 options.
|
|
212
|
+
*/
|
|
55
213
|
export interface ProductOption {
|
|
214
|
+
/**
|
|
215
|
+
* The unique numeric identifier for this product option configuration. This ID identifies the option definition itself (not a specific option value or variant). Commonly used for option-specific operations, tracking option configurations, or linking options in external systems.
|
|
216
|
+
*/
|
|
56
217
|
id: number;
|
|
218
|
+
/**
|
|
219
|
+
* The option category name (for example, "Size", "Color", "Material", "Style", "Flavor"). This is the attribute or dimension along which the product varies. Each product can have up to 3 option names, and each option name can have multiple values. The name is visible to customers in variant selection interfaces. Commonly used for displaying option labels in variant selectors ("Select Size:", "Choose Color:"), building dynamic product configuration UI, or organizing product variations by attribute type.
|
|
220
|
+
*/
|
|
57
221
|
name: string;
|
|
222
|
+
/**
|
|
223
|
+
* An array of all available values for this option that customers can choose from (for example, `["Small", "Medium", "Large", "X-Large"]` for a Size option, or `["Red", "Blue", "Green", "Black"]` for a Color option). The order of values in this array typically represents the display order in variant selectors. Each combination of option values across all options creates a unique variant. For example, a product with Size: [Small, Large] and Color: [Red, Blue] would have 4 variants (Small/Red, Small/Blue, Large/Red, Large/Blue). Commonly used for building variant selection dropdowns, radio buttons, or swatches, validating user selections, or displaying all available choices for an attribute.
|
|
224
|
+
*/
|
|
58
225
|
optionValues: string[];
|
|
226
|
+
/**
|
|
227
|
+
* The unique numeric identifier of the parent product to which this option belongs. This links the option definition back to the product it configures. Commonly used for linking options to their parent product, organizing options by product, or implementing product-level option management.
|
|
228
|
+
*/
|
|
59
229
|
productId: number;
|
|
60
230
|
}
|
|
61
231
|
//# sourceMappingURL=product.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"product.d.ts","sourceRoot":"","sources":["../../../../../src/surfaces/point-of-sale/types/product.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,OAAO,CAAC;IACpB,eAAe,EAAE,OAAO,CAAC;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;IACxB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,cAAc,EAAE,CAAC;IAC3B,OAAO,EAAE,aAAa,EAAE,CAAC;IACzB,qBAAqB,EAAE,OAAO,CAAC;IAC/B,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC;AAED,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,OAAO,EAAE,OAAO,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kBAAkB,EAAE,OAAO,CAAC;IAC5B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,eAAe,EAAE,6BAA6B,CAAC;IAC/C,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,OAAO,CAAC,EAAE,oBAAoB,EAAE,CAAC;IACjC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,MAAM,6BAA6B,GAAG,MAAM,GAAG,UAAU,CAAC;AAEhE,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;CACnB"}
|
|
1
|
+
{"version":3,"file":"product.d.ts","sourceRoot":"","sources":["../../../../../src/surfaces/point-of-sale/types/product.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,OAAO;IACtB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,eAAe,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,UAAU,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,eAAe,EAAE,OAAO,CAAC;IACzB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,eAAe,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,eAAe,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,eAAe,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,IAAI,EAAE,MAAM,EAAE,CAAC;IACf;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,QAAQ,EAAE,cAAc,EAAE,CAAC;IAC3B;;OAEG;IACH,OAAO,EAAE,aAAa,EAAE,CAAC;IACzB;;OAEG;IACH,qBAAqB,EAAE,OAAO,CAAC;IAC/B;;OAEG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B;;OAEG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,kBAAkB,EAAE,OAAO,CAAC;IAC5B;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B;;OAEG;IACH,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC;;OAEG;IACH,eAAe,EAAE,6BAA6B,CAAC;IAC/C;;OAEG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B;;OAEG;IACH,OAAO,CAAC,EAAE,oBAAoB,EAAE,CAAC;IACjC;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;;GAIG;AACH,MAAM,MAAM,6BAA6B,GAAG,MAAM,GAAG,UAAU,CAAC;AAEhE;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB"}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import type { CurrencyCode } from '../../../shared';
|
|
2
|
+
/**
|
|
3
|
+
* Defines information about the current POS session.
|
|
4
|
+
*/
|
|
2
5
|
export interface Session {
|
|
3
6
|
/**
|
|
4
7
|
* The shop ID associated with the shop currently logged into POS.
|
|
@@ -13,20 +16,19 @@ export interface Session {
|
|
|
13
16
|
*/
|
|
14
17
|
shopDomain: string;
|
|
15
18
|
/**
|
|
16
|
-
* The location ID associated with the POS' current location.
|
|
19
|
+
* The location ID associated with the POS device's current location.
|
|
17
20
|
*/
|
|
18
21
|
locationId: number;
|
|
19
22
|
/**
|
|
20
|
-
* The staff ID
|
|
21
|
-
* Note that this staff member ID may be different to the User ID, as the staff member who enters their PIN may be different to the User who logged onto POS.
|
|
23
|
+
* The staff ID of the staff member currently pinned into the POS. This may differ from the user ID if the pinned staff member is different from the logged-in user.
|
|
22
24
|
*/
|
|
23
25
|
staffMemberId?: number;
|
|
24
26
|
/**
|
|
25
|
-
* The currency code associated with the location currently
|
|
27
|
+
* The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code associated with the location currently active on POS.
|
|
26
28
|
*/
|
|
27
29
|
currency: CurrencyCode;
|
|
28
30
|
/**
|
|
29
|
-
* The POS
|
|
31
|
+
* The version of [the POS app](https://apps.shopify.com/shopify-pos) currently running.
|
|
30
32
|
*/
|
|
31
33
|
posVersion: string;
|
|
32
34
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../../../../src/surfaces/point-of-sale/types/session.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,iBAAiB,CAAC;AAElD,MAAM,WAAW,OAAO;IACtB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB
|
|
1
|
+
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../../../../src/surfaces/point-of-sale/types/session.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,iBAAiB,CAAC;AAElD;;GAEG;AACH,MAAM,WAAW,OAAO;IACtB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,QAAQ,EAAE,YAAY,CAAC;IAEvB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;CACpB"}
|
|
@@ -1,16 +1,48 @@
|
|
|
1
1
|
import type { Money } from './money';
|
|
2
2
|
import type { TaxLine } from './tax-line';
|
|
3
|
+
/**
|
|
4
|
+
* Represents a shipping charge applied to an order, including the price and applicable taxes.
|
|
5
|
+
*/
|
|
3
6
|
export interface ShippingLine {
|
|
7
|
+
/**
|
|
8
|
+
* The handle identifier for the shipping method.
|
|
9
|
+
*/
|
|
4
10
|
handle?: string;
|
|
11
|
+
/**
|
|
12
|
+
* The price of the shipping as a Money object.
|
|
13
|
+
*/
|
|
5
14
|
price: Money;
|
|
15
|
+
/**
|
|
16
|
+
* The display title of the shipping method.
|
|
17
|
+
*/
|
|
6
18
|
title?: string;
|
|
19
|
+
/**
|
|
20
|
+
* An array of individual tax lines showing tax breakdown.
|
|
21
|
+
*/
|
|
7
22
|
taxLines?: TaxLine[];
|
|
8
23
|
}
|
|
24
|
+
/**
|
|
25
|
+
* Represents a calculated shipping line with specific shipping or retail method type.
|
|
26
|
+
*/
|
|
9
27
|
export interface CalculatedShippingLine extends ShippingLine {
|
|
28
|
+
/**
|
|
29
|
+
* The type identifier for calculated shipping. This is always `'Calculated'` to distinguish from custom shipping lines. Calculated shipping rates are determined by carrier APIs, zone-based rules, or automated shipping calculators.
|
|
30
|
+
*/
|
|
10
31
|
type: 'Calculated';
|
|
32
|
+
/**
|
|
33
|
+
* The shipping method category indicating whether this is standard shipping delivery or in-store retail pickup:
|
|
34
|
+
* - `'SHIPPING'`: Traditional carrier-based shipping where items are delivered to a customer address.
|
|
35
|
+
* - `'RETAIL'`: In-store pickup or buy-online-pickup-in-store (BOPIS) where customers collect items at a physical location.
|
|
36
|
+
*/
|
|
11
37
|
methodType: 'SHIPPING' | 'RETAIL';
|
|
12
38
|
}
|
|
39
|
+
/**
|
|
40
|
+
* Represents a custom shipping line with merchant-defined shipping charges.
|
|
41
|
+
*/
|
|
13
42
|
export interface CustomShippingLine extends ShippingLine {
|
|
43
|
+
/**
|
|
44
|
+
* The type identifier for custom shipping. This is always `'Custom'` to distinguish from calculated shipping lines. Custom shipping rates are manually set by merchants rather than calculated by carrier APIs or automated systems.
|
|
45
|
+
*/
|
|
14
46
|
type: 'Custom';
|
|
15
47
|
}
|
|
16
48
|
//# sourceMappingURL=shipping-line.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shipping-line.d.ts","sourceRoot":"","sources":["../../../../../src/surfaces/point-of-sale/types/shipping-line.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,KAAK,EAAC,MAAM,SAAS,CAAC;AACnC,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,YAAY,CAAC;AAExC,MAAM,WAAW,YAAY;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,KAAK,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAC;CACtB;AAED,MAAM,WAAW,sBAAuB,SAAQ,YAAY;IAC1D,IAAI,EAAE,YAAY,CAAC;IACnB,UAAU,EAAE,UAAU,GAAG,QAAQ,CAAC;CACnC;AAED,MAAM,WAAW,kBAAmB,SAAQ,YAAY;IACtD,IAAI,EAAE,QAAQ,CAAC;CAChB"}
|
|
1
|
+
{"version":3,"file":"shipping-line.d.ts","sourceRoot":"","sources":["../../../../../src/surfaces/point-of-sale/types/shipping-line.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,KAAK,EAAC,MAAM,SAAS,CAAC;AACnC,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,YAAY,CAAC;AAExC;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,KAAK,EAAE,KAAK,CAAC;IACb;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,sBAAuB,SAAQ,YAAY;IAC1D;;OAEG;IACH,IAAI,EAAE,YAAY,CAAC;IACnB;;;;OAIG;IACH,UAAU,EAAE,UAAU,GAAG,QAAQ,CAAC;CACnC;AAED;;GAEG;AACH,MAAM,WAAW,kBAAmB,SAAQ,YAAY;IACtD;;OAEG;IACH,IAAI,EAAE,QAAQ,CAAC;CAChB"}
|
|
@@ -3,40 +3,42 @@ export declare class StorageError extends Error {
|
|
|
3
3
|
name: string;
|
|
4
4
|
constructor(code: 'RecordsCount' | 'RecordSize' | 'KeyType' | 'KeySize', message: string);
|
|
5
5
|
}
|
|
6
|
+
/**
|
|
7
|
+
* Defines the storage interface for persisting extension data across sessions.
|
|
8
|
+
*/
|
|
6
9
|
export interface Storage<BaseStorageTypes extends Record<string, any> = Record<string, unknown>> {
|
|
7
10
|
/**
|
|
8
|
-
*
|
|
11
|
+
* Stores a value under the specified key, overwriting any existing value. Values must be JSON-serializable and return `StorageError` when storage limits are exceeded. Commonly used for storing user preferences, caching API responses, or passing contextual data from tiles to modals.
|
|
9
12
|
*
|
|
10
13
|
* @param key - The key to set the value for.
|
|
11
14
|
* @param value - The value to set for the key.
|
|
12
|
-
* Can be any primitive type supported by `JSON.stringify`.
|
|
13
15
|
* @throws StorageError when:
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
16
|
+
* - Maximum number of records is exceeded (`code: 'RecordsCount'`)
|
|
17
|
+
* - Individual record size exceeds the limit (`code: 'RecordSize'`)
|
|
18
|
+
* - Key is not a string (`code: 'KeyType'`)
|
|
19
|
+
* - Key size exceeds the limit (`code: 'KeySize'`)
|
|
17
20
|
*/
|
|
18
21
|
set<StorageTypes extends BaseStorageTypes = BaseStorageTypes, Keys extends keyof StorageTypes = keyof StorageTypes>(key: Keys, value: StorageTypes[Keys]): Promise<void>;
|
|
19
22
|
/**
|
|
20
|
-
*
|
|
23
|
+
* Retrieves the value associated with a key, returning `undefined` if the key doesn't exist. Always handle the `undefined` case by providing fallback values or conditional logic. Commonly used for loading user preferences, retrieving cached data, or accessing contextual information passed between extension targets.
|
|
21
24
|
*
|
|
22
25
|
* @param key - The key to get the value for.
|
|
23
26
|
* @returns The value of the key.
|
|
24
|
-
*
|
|
25
|
-
* @throws StorageError when the key is not a string or exceeds its allotted size.
|
|
27
|
+
* @throws StorageError when the key isn't a string or exceeds its allotted size.
|
|
26
28
|
*/
|
|
27
29
|
get<StorageTypes extends BaseStorageTypes = BaseStorageTypes, Keys extends keyof StorageTypes = keyof StorageTypes>(key: Keys): Promise<StorageTypes[Keys] | undefined>;
|
|
28
30
|
/**
|
|
29
|
-
* Clears
|
|
31
|
+
* Clears all data from storage, removing all key-value pairs.
|
|
30
32
|
*/
|
|
31
33
|
clear: () => Promise<void>;
|
|
32
34
|
/**
|
|
33
|
-
* Deletes a key from the
|
|
35
|
+
* Deletes a specific key from storage and returns `true` if the key existed, `false` if it didn't exist. Returns `false` for non-existent keys rather than throwing an error. Commonly used for cleaning up temporary workflow data, removing expired cache entries, or handling user preference changes.
|
|
34
36
|
*
|
|
35
37
|
* @param key - The key to delete.
|
|
36
38
|
*/
|
|
37
39
|
delete<StorageTypes extends BaseStorageTypes = BaseStorageTypes, Keys extends keyof StorageTypes = keyof StorageTypes>(key: Keys): Promise<boolean>;
|
|
38
40
|
/**
|
|
39
|
-
*
|
|
41
|
+
* Retrieves all stored key-value pairs as an array of tuples, preserving original data types. Returns all data at once which may impact memory usage with large datasets. Commonly used for debugging storage contents, implementing data export features, or performing bulk operations across stored data.
|
|
40
42
|
*
|
|
41
43
|
* @returns An array containing all the keys and values in the storage.
|
|
42
44
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../../../../src/surfaces/point-of-sale/types/storage.ts"],"names":[],"mappings":"AAAA,qBAAa,YAAa,SAAQ,KAAK;IAG5B,IAAI,EAAE,cAAc,GAAG,YAAY,GAAG,SAAS,GAAG,SAAS;IAF7D,IAAI,SAAkB;gBAEpB,IAAI,EAAE,cAAc,GAAG,YAAY,GAAG,SAAS,GAAG,SAAS,EAClE,OAAO,EAAE,MAAM;CAIlB;AACD,MAAM,WAAW,OAAO,CACtB,gBAAgB,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAEtE;;;;;;;;;;OAUG;IACH,GAAG,CACD,YAAY,SAAS,gBAAgB,GAAG,gBAAgB,EACxD,IAAI,SAAS,MAAM,YAAY,GAAG,MAAM,YAAY,EAEpD,GAAG,EAAE,IAAI,EACT,KAAK,EAAE,YAAY,CAAC,IAAI,CAAC,GACxB,OAAO,CAAC,IAAI,CAAC,CAAC;IAEjB
|
|
1
|
+
{"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../../../../src/surfaces/point-of-sale/types/storage.ts"],"names":[],"mappings":"AAAA,qBAAa,YAAa,SAAQ,KAAK;IAG5B,IAAI,EAAE,cAAc,GAAG,YAAY,GAAG,SAAS,GAAG,SAAS;IAF7D,IAAI,SAAkB;gBAEpB,IAAI,EAAE,cAAc,GAAG,YAAY,GAAG,SAAS,GAAG,SAAS,EAClE,OAAO,EAAE,MAAM;CAIlB;AACD;;GAEG;AACH,MAAM,WAAW,OAAO,CACtB,gBAAgB,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAEtE;;;;;;;;;;OAUG;IACH,GAAG,CACD,YAAY,SAAS,gBAAgB,GAAG,gBAAgB,EACxD,IAAI,SAAS,MAAM,YAAY,GAAG,MAAM,YAAY,EAEpD,GAAG,EAAE,IAAI,EACT,KAAK,EAAE,YAAY,CAAC,IAAI,CAAC,GACxB,OAAO,CAAC,IAAI,CAAC,CAAC;IAEjB;;;;;;OAMG;IACH,GAAG,CACD,YAAY,SAAS,gBAAgB,GAAG,gBAAgB,EACxD,IAAI,SAAS,MAAM,YAAY,GAAG,MAAM,YAAY,EAEpD,GAAG,EAAE,IAAI,GACR,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC,CAAC;IAE3C;;OAEG;IACH,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAE3B;;;;OAIG;IACH,MAAM,CACJ,YAAY,SAAS,gBAAgB,GAAG,gBAAgB,EACxD,IAAI,SAAS,MAAM,YAAY,GAAG,MAAM,YAAY,EAEpD,GAAG,EAAE,IAAI,GACR,OAAO,CAAC,OAAO,CAAC,CAAC;IAEpB;;;;OAIG;IACH,OAAO,CACL,YAAY,SAAS,gBAAgB,GAAG,gBAAgB,EACxD,IAAI,SAAS,MAAM,YAAY,GAAG,MAAM,YAAY,KACjD,OAAO,CAAC,CAAC,IAAI,EAAE,YAAY,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC;CAC5C"}
|
|
@@ -1,13 +1,34 @@
|
|
|
1
1
|
import type { Money } from './money';
|
|
2
|
+
/**
|
|
3
|
+
* Represents a tax line applied to an item or transaction.
|
|
4
|
+
*/
|
|
2
5
|
export interface TaxLine {
|
|
6
|
+
/**
|
|
7
|
+
* The title or name of the tax.
|
|
8
|
+
*/
|
|
3
9
|
title: string;
|
|
10
|
+
/**
|
|
11
|
+
* The tax amount as a Money object.
|
|
12
|
+
*/
|
|
4
13
|
price: Money;
|
|
14
|
+
/**
|
|
15
|
+
* The tax rate as a decimal number.
|
|
16
|
+
*/
|
|
5
17
|
rate: number;
|
|
18
|
+
/**
|
|
19
|
+
* The unique identifier for this tax line.
|
|
20
|
+
*/
|
|
6
21
|
uuid?: string;
|
|
22
|
+
/**
|
|
23
|
+
* The range of tax rates if applicable.
|
|
24
|
+
*/
|
|
7
25
|
rateRange?: {
|
|
8
26
|
min: number;
|
|
9
27
|
max: number;
|
|
10
28
|
};
|
|
29
|
+
/**
|
|
30
|
+
* Whether this tax is currently enabled.
|
|
31
|
+
*/
|
|
11
32
|
enabled?: boolean;
|
|
12
33
|
}
|
|
13
34
|
//# sourceMappingURL=tax-line.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tax-line.d.ts","sourceRoot":"","sources":["../../../../../src/surfaces/point-of-sale/types/tax-line.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,KAAK,EAAC,MAAM,SAAS,CAAC;AAEnC,MAAM,WAAW,OAAO;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,KAAK,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE;QAAC,GAAG,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAC,CAAC;IACvC,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB"}
|
|
1
|
+
{"version":3,"file":"tax-line.d.ts","sourceRoot":"","sources":["../../../../../src/surfaces/point-of-sale/types/tax-line.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,KAAK,EAAC,MAAM,SAAS,CAAC;AAEnC;;GAEG;AACH,MAAM,WAAW,OAAO;IACtB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,KAAK,EAAE,KAAK,CAAC;IACb;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,SAAS,CAAC,EAAE;QAAC,GAAG,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAC,CAAC;IACvC;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB"}
|
|
@@ -1,2 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The types of transactions that can be processed in POS:
|
|
3
|
+
* - `'Sale'`: A new sale transaction where a customer purchases products or services. This creates a new order and processes payment. The most common transaction type in POS operations.
|
|
4
|
+
* - `'Return'`: A return transaction where a customer returns previously purchased items for a refund. This credits back payment to the customer and returns items to inventory.
|
|
5
|
+
* - `'Exchange'`: An exchange transaction where a customer returns items and simultaneously purchases replacement items. This combines return and sale operations in a single transaction, often with a price adjustment.
|
|
6
|
+
* - `'Reprint'`: A receipt reprint operation where an existing transaction's receipt is reprinted. No new transaction is created—this only regenerates the receipt document for an existing sale, return, or exchange.
|
|
7
|
+
*/
|
|
1
8
|
export type TransactionType = 'Sale' | 'Return' | 'Exchange' | 'Reprint';
|
|
2
9
|
//# sourceMappingURL=transaction-type.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transaction-type.d.ts","sourceRoot":"","sources":["../../../../../src/surfaces/point-of-sale/types/transaction-type.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,QAAQ,GAAG,UAAU,GAAG,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"transaction-type.d.ts","sourceRoot":"","sources":["../../../../../src/surfaces/point-of-sale/types/transaction-type.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,QAAQ,GAAG,UAAU,GAAG,SAAS,CAAC"}
|