@shopify/ui-extensions 2025.7.2 → 2025.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/surfaces/point-of-sale/render/components/Badge/Badge.js +0 -7
- package/build/cjs/surfaces/point-of-sale/render/components/Banner/Banner.js +0 -9
- package/build/cjs/surfaces/point-of-sale/render/components/Button/Button.js +0 -8
- package/build/cjs/surfaces/point-of-sale/render/components/CameraScanner/CameraScanner.js +0 -6
- package/build/cjs/surfaces/point-of-sale/render/components/DatePicker/DatePicker.js +0 -8
- package/build/cjs/surfaces/point-of-sale/render/components/Dialog/Dialog.js +0 -12
- package/build/cjs/surfaces/point-of-sale/render/components/Image/Image.js +7 -2
- package/build/cjs/surfaces/point-of-sale/render/components/Navigator/Navigator.js +0 -4
- package/build/cjs/surfaces/point-of-sale/render/components/NumberField/NumberField.js +0 -6
- package/build/cjs/surfaces/point-of-sale/render/components/POSBlock/POSBlock.js +0 -6
- package/build/cjs/surfaces/point-of-sale/render/components/POSBlock/POSBlockRow.js +0 -4
- package/build/cjs/surfaces/point-of-sale/render/components/POSReceiptBlock/POSReceiptBlock.js +0 -5
- package/build/cjs/surfaces/point-of-sale/render/components/PinPad/PinPad.js +16 -20
- package/build/cjs/surfaces/point-of-sale/render/components/QRCode/QRCode.js +0 -5
- package/build/cjs/surfaces/point-of-sale/render/components/Screen/Screen.js +0 -22
- package/build/cjs/surfaces/point-of-sale/render/components/Section/Section.js +2 -8
- package/build/cjs/surfaces/point-of-sale/render/components/SegmentedControl/SegmentedControl.js +4 -0
- package/build/cjs/surfaces/point-of-sale/render/components/Stack/Stack.js +4 -0
- package/build/cjs/surfaces/point-of-sale/render/components/Text/Text.js +28 -0
- package/build/cjs/surfaces/point-of-sale/render/components/TextArea/TextArea.js +0 -6
- package/build/cjs/surfaces/point-of-sale/render/components/Tile/Tile.js +0 -10
- package/build/cjs/surfaces/point-of-sale/render/components/TimePicker/TimePicker.js +0 -9
- package/build/cjs/surfaces/point-of-sale/types/storage.js +3 -0
- package/build/esm/surfaces/point-of-sale/render/components/Badge/Badge.mjs +0 -7
- package/build/esm/surfaces/point-of-sale/render/components/Banner/Banner.mjs +0 -9
- package/build/esm/surfaces/point-of-sale/render/components/Button/Button.mjs +0 -8
- package/build/esm/surfaces/point-of-sale/render/components/CameraScanner/CameraScanner.mjs +0 -6
- package/build/esm/surfaces/point-of-sale/render/components/DatePicker/DatePicker.mjs +0 -8
- package/build/esm/surfaces/point-of-sale/render/components/Dialog/Dialog.mjs +0 -12
- package/build/esm/surfaces/point-of-sale/render/components/Image/Image.mjs +7 -2
- package/build/esm/surfaces/point-of-sale/render/components/Navigator/Navigator.mjs +0 -4
- package/build/esm/surfaces/point-of-sale/render/components/NumberField/NumberField.mjs +0 -6
- package/build/esm/surfaces/point-of-sale/render/components/POSBlock/POSBlock.mjs +0 -6
- package/build/esm/surfaces/point-of-sale/render/components/POSBlock/POSBlockRow.mjs +0 -4
- package/build/esm/surfaces/point-of-sale/render/components/POSReceiptBlock/POSReceiptBlock.mjs +0 -5
- package/build/esm/surfaces/point-of-sale/render/components/PinPad/PinPad.mjs +16 -20
- package/build/esm/surfaces/point-of-sale/render/components/QRCode/QRCode.mjs +0 -5
- package/build/esm/surfaces/point-of-sale/render/components/Screen/Screen.mjs +0 -22
- package/build/esm/surfaces/point-of-sale/render/components/Section/Section.mjs +2 -8
- package/build/esm/surfaces/point-of-sale/render/components/SegmentedControl/SegmentedControl.mjs +4 -0
- package/build/esm/surfaces/point-of-sale/render/components/Stack/Stack.mjs +4 -0
- package/build/esm/surfaces/point-of-sale/render/components/Text/Text.mjs +28 -0
- package/build/esm/surfaces/point-of-sale/render/components/TextArea/TextArea.mjs +0 -6
- package/build/esm/surfaces/point-of-sale/render/components/Tile/Tile.mjs +0 -10
- package/build/esm/surfaces/point-of-sale/render/components/TimePicker/TimePicker.mjs +0 -9
- package/build/esm/surfaces/point-of-sale/types/storage.mjs +3 -0
- package/build/esnext/surfaces/point-of-sale/render/components/Badge/Badge.esnext +0 -7
- package/build/esnext/surfaces/point-of-sale/render/components/Banner/Banner.esnext +0 -9
- package/build/esnext/surfaces/point-of-sale/render/components/Button/Button.esnext +0 -8
- package/build/esnext/surfaces/point-of-sale/render/components/CameraScanner/CameraScanner.esnext +0 -6
- package/build/esnext/surfaces/point-of-sale/render/components/DatePicker/DatePicker.esnext +0 -8
- package/build/esnext/surfaces/point-of-sale/render/components/Dialog/Dialog.esnext +0 -12
- package/build/esnext/surfaces/point-of-sale/render/components/Image/Image.esnext +7 -2
- package/build/esnext/surfaces/point-of-sale/render/components/Navigator/Navigator.esnext +0 -4
- package/build/esnext/surfaces/point-of-sale/render/components/NumberField/NumberField.esnext +0 -6
- package/build/esnext/surfaces/point-of-sale/render/components/POSBlock/POSBlock.esnext +0 -6
- package/build/esnext/surfaces/point-of-sale/render/components/POSBlock/POSBlockRow.esnext +0 -4
- package/build/esnext/surfaces/point-of-sale/render/components/POSReceiptBlock/POSReceiptBlock.esnext +0 -5
- package/build/esnext/surfaces/point-of-sale/render/components/PinPad/PinPad.esnext +16 -20
- package/build/esnext/surfaces/point-of-sale/render/components/QRCode/QRCode.esnext +0 -5
- package/build/esnext/surfaces/point-of-sale/render/components/Screen/Screen.esnext +0 -22
- package/build/esnext/surfaces/point-of-sale/render/components/Section/Section.esnext +2 -8
- package/build/esnext/surfaces/point-of-sale/render/components/SegmentedControl/SegmentedControl.esnext +4 -0
- package/build/esnext/surfaces/point-of-sale/render/components/Stack/Stack.esnext +4 -0
- package/build/esnext/surfaces/point-of-sale/render/components/Text/Text.esnext +28 -0
- package/build/esnext/surfaces/point-of-sale/render/components/TextArea/TextArea.esnext +0 -6
- package/build/esnext/surfaces/point-of-sale/render/components/Tile/Tile.esnext +0 -10
- package/build/esnext/surfaces/point-of-sale/render/components/TimePicker/TimePicker.esnext +0 -9
- package/build/esnext/surfaces/point-of-sale/types/storage.esnext +3 -0
- package/build/ts/surfaces/admin/api/order-routing-rule/order-routing-rule.doc.d.ts +4 -0
- package/build/ts/surfaces/admin/api/order-routing-rule/order-routing-rule.doc.d.ts.map +1 -0
- package/build/ts/surfaces/admin/api/picker/picker.doc.d.ts.map +1 -1
- package/build/ts/surfaces/admin/api/product-configuration/product-details-configuration.doc.d.ts +4 -0
- package/build/ts/surfaces/admin/api/product-configuration/product-details-configuration.doc.d.ts.map +1 -0
- package/build/ts/surfaces/admin/api/product-configuration/product-variant-details-configuration.doc.d.ts +4 -0
- package/build/ts/surfaces/admin/api/product-configuration/product-variant-details-configuration.doc.d.ts.map +1 -0
- package/build/ts/surfaces/admin/api/purchase-options-card-action/purchase-options-card-action.doc.d.ts +4 -0
- package/build/ts/surfaces/admin/api/purchase-options-card-action/purchase-options-card-action.doc.d.ts.map +1 -0
- package/build/ts/surfaces/admin/api/resource-picker/resource-picker.doc.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/api.d.ts +1 -1
- package/build/ts/surfaces/point-of-sale/api.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 +14 -0
- package/build/ts/surfaces/point-of-sale/event/output/BaseOutput.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/render/api/action-api/action-api.d.ts +3 -5
- package/build/ts/surfaces/point-of-sale/render/api/action-api/action-api.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/render/api/cart-api/cart-api.d.ts +37 -31
- package/build/ts/surfaces/point-of-sale/render/api/cart-api/cart-api.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/render/api/cart-line-item-api/cart-line-item-api.d.ts +2 -2
- package/build/ts/surfaces/point-of-sale/render/api/connectivity-api/connectivity-api.d.ts +6 -4
- package/build/ts/surfaces/point-of-sale/render/api/connectivity-api/connectivity-api.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/render/api/customer-api/customer-api.d.ts +4 -1
- package/build/ts/surfaces/point-of-sale/render/api/customer-api/customer-api.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/render/api/device-api/device-api.d.ts +8 -4
- package/build/ts/surfaces/point-of-sale/render/api/device-api/device-api.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/render/api/draft-order-api/draft-order-api.d.ts +6 -3
- package/build/ts/surfaces/point-of-sale/render/api/draft-order-api/draft-order-api.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/render/api/locale-api/locale-api.d.ts +3 -4
- package/build/ts/surfaces/point-of-sale/render/api/locale-api/locale-api.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/render/api/navigation-api/navigation-api.d.ts +9 -7
- package/build/ts/surfaces/point-of-sale/render/api/navigation-api/navigation-api.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/render/api/order-api/order-api.d.ts +5 -5
- package/build/ts/surfaces/point-of-sale/render/api/print-api/print-api.d.ts +7 -12
- package/build/ts/surfaces/point-of-sale/render/api/print-api/print-api.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/render/api/product-api/product-api.d.ts +5 -2
- package/build/ts/surfaces/point-of-sale/render/api/product-api/product-api.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/render/api/product-search-api/product-search-api.d.ts +24 -10
- package/build/ts/surfaces/point-of-sale/render/api/product-search-api/product-search-api.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/render/api/scanner-api/scanner-api.d.ts +22 -10
- package/build/ts/surfaces/point-of-sale/render/api/scanner-api/scanner-api.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/render/api/session-api/session-api.d.ts +3 -6
- package/build/ts/surfaces/point-of-sale/render/api/session-api/session-api.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/render/api/storage-api/storage-api.d.ts +7 -0
- package/build/ts/surfaces/point-of-sale/render/api/storage-api/storage-api.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/render/api/toast-api/toast-api.d.ts +11 -1
- package/build/ts/surfaces/point-of-sale/render/api/toast-api/toast-api.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/render/components/Badge/Badge.d.ts +12 -9
- package/build/ts/surfaces/point-of-sale/render/components/Badge/Badge.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/render/components/Banner/Banner.d.ts +13 -14
- package/build/ts/surfaces/point-of-sale/render/components/Banner/Banner.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/render/components/Button/Button.d.ts +9 -15
- package/build/ts/surfaces/point-of-sale/render/components/Button/Button.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/render/components/CameraScanner/CameraScanner.d.ts +6 -8
- package/build/ts/surfaces/point-of-sale/render/components/CameraScanner/CameraScanner.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/render/components/DatePicker/DatePicker.d.ts +8 -11
- package/build/ts/surfaces/point-of-sale/render/components/DatePicker/DatePicker.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/render/components/Dialog/Dialog.d.ts +13 -20
- package/build/ts/surfaces/point-of-sale/render/components/Dialog/Dialog.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/render/components/Icon/Icon.d.ts +10 -8
- package/build/ts/surfaces/point-of-sale/render/components/Icon/Icon.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/render/components/Image/Image.d.ts +10 -5
- package/build/ts/surfaces/point-of-sale/render/components/Image/Image.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/render/components/List/List.d.ts +30 -25
- package/build/ts/surfaces/point-of-sale/render/components/List/List.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/render/components/Navigator/Navigator.d.ts +1 -4
- package/build/ts/surfaces/point-of-sale/render/components/Navigator/Navigator.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/render/components/NumberField/NumberField.d.ts +7 -7
- package/build/ts/surfaces/point-of-sale/render/components/NumberField/NumberField.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/render/components/POSBlock/POSBlock.d.ts +8 -10
- package/build/ts/surfaces/point-of-sale/render/components/POSBlock/POSBlock.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/render/components/POSBlock/POSBlockRow.d.ts +1 -4
- package/build/ts/surfaces/point-of-sale/render/components/POSBlock/POSBlockRow.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/render/components/POSReceiptBlock/POSReceiptBlock.d.ts +0 -4
- package/build/ts/surfaces/point-of-sale/render/components/POSReceiptBlock/POSReceiptBlock.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/render/components/PinPad/PinPad.d.ts +25 -28
- package/build/ts/surfaces/point-of-sale/render/components/PinPad/PinPad.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/render/components/PrintPreview/PrintPreview.d.ts +1 -11
- package/build/ts/surfaces/point-of-sale/render/components/PrintPreview/PrintPreview.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/render/components/QRCode/QRCode.d.ts +1 -5
- package/build/ts/surfaces/point-of-sale/render/components/QRCode/QRCode.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/render/components/RadioButtonList/RadioButtonList.d.ts +7 -5
- package/build/ts/surfaces/point-of-sale/render/components/RadioButtonList/RadioButtonList.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/render/components/Screen/Screen.d.ts +13 -33
- package/build/ts/surfaces/point-of-sale/render/components/Screen/Screen.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/render/components/SearchBar/SearchBar.d.ts +7 -7
- package/build/ts/surfaces/point-of-sale/render/components/Section/Section.d.ts +6 -11
- package/build/ts/surfaces/point-of-sale/render/components/Section/Section.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/render/components/SectionHeader/SectionHeader.d.ts +9 -7
- package/build/ts/surfaces/point-of-sale/render/components/SectionHeader/SectionHeader.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/render/components/SegmentedControl/SegmentedControl.d.ts +9 -6
- package/build/ts/surfaces/point-of-sale/render/components/SegmentedControl/SegmentedControl.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/render/components/Selectable/Selectable.d.ts +2 -2
- package/build/ts/surfaces/point-of-sale/render/components/Stack/Stack.d.ts +22 -22
- package/build/ts/surfaces/point-of-sale/render/components/Stack/Stack.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/render/components/Stepper/Stepper.d.ts +8 -6
- package/build/ts/surfaces/point-of-sale/render/components/Stepper/Stepper.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/render/components/Text/Text.d.ts +28 -2
- package/build/ts/surfaces/point-of-sale/render/components/Text/Text.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/render/components/TextArea/TextArea.d.ts +1 -6
- package/build/ts/surfaces/point-of-sale/render/components/TextArea/TextArea.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/render/components/TextField/TextField.d.ts +30 -0
- package/build/ts/surfaces/point-of-sale/render/components/TextField/TextField.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/render/components/Tile/Tile.d.ts +6 -15
- package/build/ts/surfaces/point-of-sale/render/components/Tile/Tile.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/render/components/TimeField/TimeField.d.ts +2 -1
- package/build/ts/surfaces/point-of-sale/render/components/TimeField/TimeField.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/render/components/TimePicker/TimePicker.d.ts +10 -14
- package/build/ts/surfaces/point-of-sale/render/components/TimePicker/TimePicker.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/render/components/shared/BaseTextField.d.ts +6 -14
- package/build/ts/surfaces/point-of-sale/render/components/shared/BaseTextField.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/render/components/shared/InputField.d.ts +16 -37
- package/build/ts/surfaces/point-of-sale/render/components/shared/InputField.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/render/components/shared/box.d.ts +31 -42
- package/build/ts/surfaces/point-of-sale/render/components/shared/box.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/render/components/shared/deprecated-types.d.ts +12 -0
- package/build/ts/surfaces/point-of-sale/render/components/shared/deprecated-types.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/render/components/shared/inner-layouts.d.ts +13 -7
- package/build/ts/surfaces/point-of-sale/render/components/shared/inner-layouts.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/render/components/shared/sizes.d.ts +3 -1
- package/build/ts/surfaces/point-of-sale/render/components/shared/sizes.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/targets.d.ts +135 -0
- package/build/ts/surfaces/point-of-sale/targets.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/types/base-transaction-complete.d.ts +39 -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 +265 -22
- 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/product.d.ts +172 -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/surfaces/admin/api/action/action.doc.ts +2 -2
- package/src/surfaces/admin/api/block/block.doc.ts +2 -2
- package/src/surfaces/admin/api/checkout-rules/validation-settings.doc.ts +2 -2
- package/src/surfaces/admin/api/customer-segment-template/customer-segment-template.doc.ts +3 -3
- package/src/surfaces/admin/api/discount-function-settings/discount-function-settings.doc.ts +2 -2
- package/src/surfaces/admin/api/order-routing-rule/order-routing-rule.doc.ts +21 -0
- package/src/surfaces/admin/api/picker/picker.doc.ts +4 -3
- package/src/surfaces/admin/api/print-action/print-action.doc.ts +2 -2
- package/src/surfaces/admin/api/product-configuration/product-details-configuration.doc.ts +21 -0
- package/src/surfaces/admin/api/product-configuration/product-variant-details-configuration.doc.ts +21 -0
- package/src/surfaces/admin/api/purchase-options-card-action/purchase-options-card-action.doc.ts +21 -0
- package/src/surfaces/admin/api/resource-picker/resource-picker.doc.ts +4 -3
- package/src/surfaces/admin/api/should-render/should-render.doc.ts +3 -3
- package/src/surfaces/admin/api/standard/standard.doc.ts +2 -2
- package/src/surfaces/admin/components/AdminAction/AdminAction.doc.ts +2 -2
- package/src/surfaces/admin/components/AdminBlock/AdminBlock.doc.ts +2 -2
- package/src/surfaces/admin/components/AdminPrintAction/AdminPrintAction.doc.ts +2 -2
- package/src/surfaces/admin/components/Badge/Badge.doc.ts +2 -2
- package/src/surfaces/admin/components/Banner/Banner.doc.ts +2 -2
- package/src/surfaces/admin/components/BlockStack/BlockStack.doc.ts +2 -2
- package/src/surfaces/admin/components/Box/Box.doc.ts +2 -2
- package/src/surfaces/admin/components/Button/Button.doc.ts +1 -1
- package/src/surfaces/admin/components/Checkbox/Checkbox.doc.ts +1 -1
- package/src/surfaces/admin/components/ChoiceList/ChoiceList.doc.ts +1 -1
- package/src/surfaces/admin/components/ColorPicker/ColorPicker.doc.ts +1 -1
- package/src/surfaces/admin/components/CustomerSegmentTemplate/CustomerSegmentTemplate.doc.ts +2 -2
- package/src/surfaces/admin/components/DateField/DateField.doc.ts +1 -1
- package/src/surfaces/admin/components/DatePicker/DatePicker.doc.ts +1 -1
- package/src/surfaces/admin/components/Divider/Divider.doc.ts +2 -2
- package/src/surfaces/admin/components/EmailField/EmailField.doc.ts +1 -1
- package/src/surfaces/admin/components/Form/Form.doc.ts +1 -1
- package/src/surfaces/admin/components/FunctionSettings/FunctionSettings.doc.ts +1 -1
- package/src/surfaces/admin/components/Heading/Heading.doc.ts +2 -2
- package/src/surfaces/admin/components/HeadingGroup/HeadingGroup.doc.ts +2 -2
- package/src/surfaces/admin/components/Icon/Icon.doc.ts +2 -2
- package/src/surfaces/admin/components/Image/Image.doc.ts +2 -2
- package/src/surfaces/admin/components/InlineStack/InlineStack.doc.ts +2 -2
- package/src/surfaces/admin/components/Link/Link.doc.ts +1 -1
- package/src/surfaces/admin/components/MoneyField/MoneyField.doc.ts +1 -1
- package/src/surfaces/admin/components/NumberField/NumberField.doc.ts +1 -1
- package/src/surfaces/admin/components/Paragraph/Paragraph.doc.ts +2 -2
- package/src/surfaces/admin/components/PasswordField/PasswordField.doc.ts +1 -1
- package/src/surfaces/admin/components/Pressable/Pressable.doc.ts +1 -1
- package/src/surfaces/admin/components/ProgressIndicator/ProgressIndicator.doc.ts +2 -2
- package/src/surfaces/admin/components/Section/Section.doc.ts +2 -2
- package/src/surfaces/admin/components/Select/Select.doc.ts +1 -1
- package/src/surfaces/admin/components/Text/Text.doc.ts +2 -2
- package/src/surfaces/admin/components/TextArea/TextArea.doc.ts +1 -1
- package/src/surfaces/admin/components/TextField/TextField.doc.ts +1 -1
- package/src/surfaces/admin/components/URLField/URLField.doc.ts +1 -1
- package/src/surfaces/point-of-sale/api.ts +1 -0
- 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 +14 -0
- package/src/surfaces/point-of-sale/render/api/action-api/action-api.ts +3 -5
- package/src/surfaces/point-of-sale/render/api/cart-api/cart-api.ts +37 -31
- package/src/surfaces/point-of-sale/render/api/cart-line-item-api/cart-line-item-api.ts +2 -2
- package/src/surfaces/point-of-sale/render/api/connectivity-api/connectivity-api.ts +6 -4
- package/src/surfaces/point-of-sale/render/api/customer-api/customer-api.ts +4 -1
- package/src/surfaces/point-of-sale/render/api/device-api/device-api.ts +8 -4
- package/src/surfaces/point-of-sale/render/api/draft-order-api/draft-order-api.ts +6 -3
- package/src/surfaces/point-of-sale/render/api/locale-api/locale-api.ts +3 -4
- package/src/surfaces/point-of-sale/render/api/navigation-api/navigation-api.ts +9 -7
- package/src/surfaces/point-of-sale/render/api/order-api/order-api.ts +5 -5
- package/src/surfaces/point-of-sale/render/api/print-api/print-api.ts +7 -12
- package/src/surfaces/point-of-sale/render/api/product-api/product-api.ts +5 -2
- package/src/surfaces/point-of-sale/render/api/product-search-api/product-search-api.ts +24 -10
- package/src/surfaces/point-of-sale/render/api/scanner-api/scanner-api.ts +22 -10
- package/src/surfaces/point-of-sale/render/api/session-api/session-api.ts +3 -6
- package/src/surfaces/point-of-sale/render/api/storage-api/storage-api.ts +7 -0
- package/src/surfaces/point-of-sale/render/api/toast-api/toast-api.ts +11 -1
- package/src/surfaces/point-of-sale/render/components/Badge/Badge.ts +12 -10
- package/src/surfaces/point-of-sale/render/components/Banner/Banner.ts +13 -14
- package/src/surfaces/point-of-sale/render/components/Button/Button.ts +9 -15
- package/src/surfaces/point-of-sale/render/components/CameraScanner/CameraScanner.ts +6 -8
- package/src/surfaces/point-of-sale/render/components/DatePicker/DatePicker.ts +8 -11
- package/src/surfaces/point-of-sale/render/components/Dialog/Dialog.ts +13 -20
- package/src/surfaces/point-of-sale/render/components/Icon/Icon.ts +254 -248
- package/src/surfaces/point-of-sale/render/components/Image/Image.ts +14 -5
- package/src/surfaces/point-of-sale/render/components/List/List.ts +30 -25
- package/src/surfaces/point-of-sale/render/components/Navigator/Navigator.ts +1 -4
- package/src/surfaces/point-of-sale/render/components/NumberField/NumberField.ts +7 -7
- package/src/surfaces/point-of-sale/render/components/POSBlock/POSBlock.ts +5 -9
- package/src/surfaces/point-of-sale/render/components/POSBlock/POSBlockRow.ts +1 -4
- package/src/surfaces/point-of-sale/render/components/POSReceiptBlock/POSReceiptBlock.ts +0 -4
- package/src/surfaces/point-of-sale/render/components/PinPad/PinPad.ts +25 -28
- package/src/surfaces/point-of-sale/render/components/PrintPreview/PrintPreview.ts +1 -11
- package/src/surfaces/point-of-sale/render/components/QRCode/QRCode.ts +1 -5
- package/src/surfaces/point-of-sale/render/components/RadioButtonList/RadioButtonList.ts +4 -4
- package/src/surfaces/point-of-sale/render/components/Screen/Screen.ts +13 -33
- package/src/surfaces/point-of-sale/render/components/SearchBar/SearchBar.ts +7 -7
- package/src/surfaces/point-of-sale/render/components/Section/Section.ts +6 -11
- package/src/surfaces/point-of-sale/render/components/SectionHeader/SectionHeader.ts +6 -6
- package/src/surfaces/point-of-sale/render/components/SegmentedControl/SegmentedControl.ts +9 -7
- package/src/surfaces/point-of-sale/render/components/Selectable/Selectable.ts +2 -2
- package/src/surfaces/point-of-sale/render/components/Stack/Stack.ts +27 -22
- package/src/surfaces/point-of-sale/render/components/Stepper/Stepper.ts +8 -6
- package/src/surfaces/point-of-sale/render/components/Text/Text.ts +28 -2
- package/src/surfaces/point-of-sale/render/components/TextArea/TextArea.ts +1 -6
- package/src/surfaces/point-of-sale/render/components/TextField/TextField.ts +30 -0
- package/src/surfaces/point-of-sale/render/components/Tile/Tile.ts +6 -15
- package/src/surfaces/point-of-sale/render/components/TimeField/TimeField.ts +2 -1
- package/src/surfaces/point-of-sale/render/components/TimePicker/TimePicker.ts +10 -14
- package/src/surfaces/point-of-sale/render/components/shared/BaseTextField.ts +6 -14
- package/src/surfaces/point-of-sale/render/components/shared/InputField.ts +16 -37
- package/src/surfaces/point-of-sale/render/components/shared/box.ts +33 -42
- package/src/surfaces/point-of-sale/render/components/shared/deprecated-types.ts +12 -0
- package/src/surfaces/point-of-sale/render/components/shared/inner-layouts.ts +14 -7
- package/src/surfaces/point-of-sale/render/components/shared/sizes.ts +3 -1
- package/src/surfaces/point-of-sale/targets.ts +135 -0
- package/src/surfaces/point-of-sale/types/base-transaction-complete.ts +39 -0
- package/src/surfaces/point-of-sale/types/cart.ts +267 -22
- 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 -0
- 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/product.ts +172 -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
|
@@ -15,8 +15,8 @@ const data: ReferenceEntityTemplateSchema = {
|
|
|
15
15
|
type: 'TextProps',
|
|
16
16
|
},
|
|
17
17
|
],
|
|
18
|
-
category: '
|
|
19
|
-
subCategory: '
|
|
18
|
+
category: 'UI components',
|
|
19
|
+
subCategory: 'Typography and content',
|
|
20
20
|
defaultExample: {
|
|
21
21
|
image: 'text-default.png',
|
|
22
22
|
codeblock: {
|
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
import {StorageApi} from '../../render/api/storage-api/storage-api';
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* Base API access provided to extension targets, currently providing access to persistent storage for saving and retrieving extension data across sessions.
|
|
5
|
+
*/
|
|
3
6
|
export type BaseApi = StorageApi;
|
|
@@ -1,8 +1,23 @@
|
|
|
1
1
|
import type {ConnectivityState, Device, Session} from '../../../point-of-sale';
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* Base data object provided to all extension targets containing device information, session context, and connectivity state. This data is available at extension initialization and provides essential context about the runtime environment.
|
|
5
|
+
*/
|
|
3
6
|
export interface BaseData {
|
|
7
|
+
/**
|
|
8
|
+
* The current Internet connectivity state of the POS device. Indicates whether the device is connected to or disconnected from the Internet. This state updates in real-time as connectivity changes, allowing extensions to adapt behavior for offline scenarios, show connectivity warnings, or queue operations for when connectivity is restored.
|
|
9
|
+
*/
|
|
4
10
|
connectivity: ConnectivityState;
|
|
11
|
+
/**
|
|
12
|
+
* Comprehensive information about the physical POS device where the extension is currently running. Includes the device name, unique device ID, and form factor information (tablet vs other). This data is static for the session and helps extensions adapt to different device types, log device-specific information, or implement device-based configurations.
|
|
13
|
+
*/
|
|
5
14
|
device: Device;
|
|
15
|
+
/**
|
|
16
|
+
* The [IETF BCP 47](https://en.wikipedia.org/wiki/IETF_language_tag) locale string for the current POS session (for example, `"en-US"`, `"fr-CA"`, `"de-DE"`). This indicates the merchant's language and regional preferences. Commonly used for internationalization (i18n), locale-specific date/time/number formatting, translating UI text, and providing localized content. The locale remains constant for the session and reflects the language selected in POS settings.
|
|
17
|
+
*/
|
|
6
18
|
locale: string;
|
|
19
|
+
/**
|
|
20
|
+
* Comprehensive information about the current POS session including shop ID and domain, authenticated user, pinned staff member, active location, currency settings, and POS version. This session data remains constant for the session duration and provides critical context for business logic, permissions, API authentication, and transaction processing. Session data updates when users switch locations or change pinned staff members.
|
|
21
|
+
*/
|
|
7
22
|
session: Session;
|
|
8
23
|
}
|
|
@@ -2,6 +2,12 @@ import {BaseData} from './BaseData';
|
|
|
2
2
|
import {Cart} from '../../api';
|
|
3
3
|
import {BaseApi} from './BaseApi';
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* The data object provided to cart update extension targets. Contains the current cart state along with device, session, and connectivity information. This data is passed to extensions whenever the cart changes, enabling real-time cart monitoring and cart-based business logic.
|
|
7
|
+
*/
|
|
5
8
|
export interface CartUpdateEventData extends BaseData, BaseApi {
|
|
9
|
+
/**
|
|
10
|
+
* The complete current `Cart` object containing all cart data including line items with products and quantities, pricing totals (subtotal, tax, grand total), associated customer information, applied discounts, custom properties, and editability state. This represents the cart's state at the moment the extension is triggered, reflecting all recent changes. The cart object is read-only in this context—modifications should be made through the Cart API methods.
|
|
11
|
+
*/
|
|
6
12
|
cart: Cart;
|
|
7
13
|
}
|
|
@@ -1,17 +1,44 @@
|
|
|
1
1
|
import {BaseData} from './BaseData';
|
|
2
2
|
import {BaseApi} from './BaseApi';
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* The data object provided to cash tracking session start extension targets. Contains information about a newly opened cash tracking session along with device and session context.
|
|
6
|
+
*/
|
|
4
7
|
export interface CashTrackingSessionStartData extends BaseData, BaseApi {
|
|
8
|
+
/**
|
|
9
|
+
* The cash tracking session start data containing the session identifier and the time when the session began. Cash tracking sessions represent the period during which a cash drawer is open and being used for transactions, typically corresponding to a staff member's shift.
|
|
10
|
+
*/
|
|
5
11
|
cashTrackingSessionStart: {
|
|
12
|
+
/**
|
|
13
|
+
* The unique numeric identifier for this cash tracking session. This ID matches the ID from when the session was opened and can be used to correlate session start and end events, retrieve session-specific data, or link all transactions that occurred during this session.
|
|
14
|
+
*/
|
|
6
15
|
id: number;
|
|
16
|
+
/**
|
|
17
|
+
* The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp when the cash tracking session was opened and began (for example, `"2024-05-15T09:00:00Z"`). This marks the start of the session and can be compared with `closingTime` to calculate the total session duration or shift length.
|
|
18
|
+
*/
|
|
7
19
|
openingTime: string;
|
|
8
20
|
};
|
|
9
21
|
}
|
|
10
22
|
|
|
23
|
+
/**
|
|
24
|
+
* The data object provided to cash tracking session complete extension targets. Contains information about a completed cash tracking session including when it opened and closed, along with device and session context.
|
|
25
|
+
*/
|
|
11
26
|
export interface CashTrackingSessionCompleteData extends BaseData, BaseApi {
|
|
27
|
+
/**
|
|
28
|
+
* The cash tracking session complete data containing the session identifier, opening time, and closing time. This represents the full lifecycle of a cash drawer session from opening to closing.
|
|
29
|
+
*/
|
|
12
30
|
cashTrackingSessionComplete: {
|
|
31
|
+
/**
|
|
32
|
+
* The unique numeric identifier for this cash tracking session. This ID matches the ID from when the session was opened and can be used to correlate session start and end events, retrieve session-specific data, or link all transactions that occurred during this session.
|
|
33
|
+
*/
|
|
13
34
|
id: number;
|
|
35
|
+
/**
|
|
36
|
+
* The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp when the cash tracking session was opened and began (for example, `"2024-05-15T09:00:00Z"`). This marks the start of the session and can be compared with `closingTime` to calculate the total session duration or shift length.
|
|
37
|
+
*/
|
|
14
38
|
openingTime: string;
|
|
39
|
+
/**
|
|
40
|
+
* The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp when the cash tracking session was closed and ended (for example, `"2024-05-15T17:30:00Z"`). This marks when the staff member completed their shift, closed out the cash drawer, and finalized the session. The time between `openingTime` and `closingTime` represents the active session duration. Commonly used for shift reporting, calculating hours worked, or determining the timeframe for session-specific transactions.
|
|
41
|
+
*/
|
|
15
42
|
closingTime: string;
|
|
16
43
|
};
|
|
17
44
|
}
|
|
@@ -1,10 +1,28 @@
|
|
|
1
1
|
import {BaseTransactionComplete} from '../../types/base-transaction-complete';
|
|
2
2
|
import {LineItem} from '../../types/cart';
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* Defines the data structure for completed exchange transactions.
|
|
6
|
+
*/
|
|
4
7
|
export interface ExchangeTransactionData extends BaseTransactionComplete {
|
|
8
|
+
/**
|
|
9
|
+
* The transaction type identifier, always 'Sale' for sale transactions.
|
|
10
|
+
*/
|
|
5
11
|
transactionType: 'Exchange';
|
|
12
|
+
/**
|
|
13
|
+
* The return ID for the completed return transaction.
|
|
14
|
+
*/
|
|
6
15
|
returnId?: number;
|
|
16
|
+
/**
|
|
17
|
+
* The exchange ID if the return is part of an exchange transaction.
|
|
18
|
+
*/
|
|
7
19
|
exchangeId?: number;
|
|
20
|
+
/**
|
|
21
|
+
* An array of line items added to the customer in the exchange.
|
|
22
|
+
*/
|
|
8
23
|
lineItemsAdded: LineItem[];
|
|
24
|
+
/**
|
|
25
|
+
* An array of line items removed from the customer in the exchange.
|
|
26
|
+
*/
|
|
9
27
|
lineItemsRemoved: LineItem[];
|
|
10
28
|
}
|
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
import {BaseTransactionComplete} from '../../types/base-transaction-complete';
|
|
2
2
|
import {OrderLineItem} from '../../types/order';
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* Defines the data structure for receipt reprint requests.
|
|
6
|
+
*/
|
|
4
7
|
export interface ReprintReceiptData extends BaseTransactionComplete {
|
|
8
|
+
/**
|
|
9
|
+
* The transaction type identifier, always 'Sale' for sale transactions.
|
|
10
|
+
*/
|
|
5
11
|
transactionType: 'Reprint';
|
|
12
|
+
/**
|
|
13
|
+
* An array of line items included in the sale transaction.
|
|
14
|
+
*/
|
|
6
15
|
lineItems: OrderLineItem[];
|
|
7
16
|
}
|
|
@@ -1,10 +1,28 @@
|
|
|
1
1
|
import {BaseTransactionComplete} from '../../types/base-transaction-complete';
|
|
2
2
|
import {LineItem} from '../../types/cart';
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* Defines the data structure for completed return transactions.
|
|
6
|
+
*/
|
|
4
7
|
export interface ReturnTransactionData extends BaseTransactionComplete {
|
|
8
|
+
/**
|
|
9
|
+
* The transaction type identifier, always 'Sale' for sale transactions.
|
|
10
|
+
*/
|
|
5
11
|
transactionType: 'Return';
|
|
12
|
+
/**
|
|
13
|
+
* The refund ID if a refund was issued for the return.
|
|
14
|
+
*/
|
|
6
15
|
refundId?: number;
|
|
16
|
+
/**
|
|
17
|
+
* The return ID for the completed return transaction.
|
|
18
|
+
*/
|
|
7
19
|
returnId?: number;
|
|
20
|
+
/**
|
|
21
|
+
* The exchange ID if the return is part of an exchange transaction.
|
|
22
|
+
*/
|
|
8
23
|
exchangeId?: number;
|
|
24
|
+
/**
|
|
25
|
+
* An array of line items included in the sale transaction.
|
|
26
|
+
*/
|
|
9
27
|
lineItems: LineItem[];
|
|
10
28
|
}
|
|
@@ -1,8 +1,20 @@
|
|
|
1
1
|
import {BaseTransactionComplete} from '../../types/base-transaction-complete';
|
|
2
2
|
import {LineItem} from '../../types/cart';
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* Defines the data structure for completed sale transactions.
|
|
6
|
+
*/
|
|
4
7
|
export interface SaleTransactionData extends BaseTransactionComplete {
|
|
8
|
+
/**
|
|
9
|
+
* The transaction type identifier, always 'Sale' for sale transactions.
|
|
10
|
+
*/
|
|
5
11
|
transactionType: 'Sale';
|
|
12
|
+
/**
|
|
13
|
+
* The UUID of the draft checkout if the sale originated from a draft order.
|
|
14
|
+
*/
|
|
6
15
|
draftCheckoutUuid?: string;
|
|
16
|
+
/**
|
|
17
|
+
* An array of line items included in the sale transaction.
|
|
18
|
+
*/
|
|
7
19
|
lineItems: LineItem[];
|
|
8
20
|
}
|
|
@@ -5,14 +5,41 @@ import type {ReturnTransactionData} from './ReturnTransactionData';
|
|
|
5
5
|
import type {ReprintReceiptData} from './ReprintReceiptData';
|
|
6
6
|
import {BaseApi} from './BaseApi';
|
|
7
7
|
|
|
8
|
+
/**
|
|
9
|
+
* The data object provided to receipt targets containing transaction details.
|
|
10
|
+
*/
|
|
8
11
|
export interface TransactionCompleteData extends BaseData, BaseApi {
|
|
12
|
+
/**
|
|
13
|
+
* Provides access to persistent local storage methods for your POS UI extension. Use this to store, retrieve, and manage data that persists across sessions.
|
|
14
|
+
*/
|
|
15
|
+
storage: BaseApi['storage'];
|
|
16
|
+
/**
|
|
17
|
+
* The transaction data, which can be one of the following types:
|
|
18
|
+
* - `SaleTransactionData`: Defines the data structure for completed sale transactions.
|
|
19
|
+
* - `ReturnTransactionData`: Defines the data structure for completed return transactions.
|
|
20
|
+
* - `ExchangeTransactionData`: Defines the data structure for completed exchange transactions.
|
|
21
|
+
*/
|
|
9
22
|
transaction:
|
|
10
23
|
| SaleTransactionData
|
|
11
24
|
| ReturnTransactionData
|
|
12
25
|
| ExchangeTransactionData;
|
|
13
26
|
}
|
|
14
27
|
|
|
28
|
+
/**
|
|
29
|
+
* The data object provided to receipt targets containing transaction details and reprint information.
|
|
30
|
+
*/
|
|
15
31
|
export interface TransactionCompleteWithReprintData extends BaseData, BaseApi {
|
|
32
|
+
/**
|
|
33
|
+
* Provides access to persistent local storage methods for your POS UI extension. Use this to store, retrieve, and manage data that persists across sessions.
|
|
34
|
+
*/
|
|
35
|
+
storage: BaseApi['storage'];
|
|
36
|
+
/**
|
|
37
|
+
* The transaction data, which can be one of the following types:
|
|
38
|
+
* - `SaleTransactionData`: Defines the data structure for completed sale transactions.
|
|
39
|
+
* - `ReturnTransactionData`: Defines the data structure for completed return transactions.
|
|
40
|
+
* - `ExchangeTransactionData`: Defines the data structure for completed exchange transactions.
|
|
41
|
+
* - `ReprintReceiptData`: Defines the data structure for receipt reprint requests.
|
|
42
|
+
*/
|
|
16
43
|
transaction:
|
|
17
44
|
| SaleTransactionData
|
|
18
45
|
| ReturnTransactionData
|
|
@@ -1,8 +1,22 @@
|
|
|
1
1
|
interface ExtensionError extends Error {
|
|
2
|
+
/**
|
|
3
|
+
* The severity level of this error:
|
|
4
|
+
* - `'error'`: A critical error that prevents the extension from completing successfully. Errors typically block the user workflow and require resolution before proceeding.
|
|
5
|
+
* - `'warning'`: A non-critical issue that doesn't prevent extension execution but indicates a problem or unexpected condition. Warnings allow the workflow to continue but should be logged or displayed to users.
|
|
6
|
+
*/
|
|
2
7
|
level: 'error' | 'warning';
|
|
8
|
+
/**
|
|
9
|
+
* The human-readable error message describing what went wrong. This message should be clear and actionable, helping merchants understand the issue and how to resolve it (for example, "Product not found", "Invalid discount code", "Insufficient inventory"). The message may be displayed to users in the POS interface depending on the error severity and context.
|
|
10
|
+
*/
|
|
3
11
|
message: string;
|
|
4
12
|
}
|
|
5
13
|
|
|
14
|
+
/**
|
|
15
|
+
* Base output structure that extensions can return to communicate errors and warnings back to the POS system. Extensions populate this interface when they encounter issues during execution.
|
|
16
|
+
*/
|
|
6
17
|
export interface BaseOutput {
|
|
18
|
+
/**
|
|
19
|
+
* An array of errors or warnings encountered during extension execution. Each error includes a severity level (`'error'` or `'warning'`) and a descriptive message. Multiple errors can be reported simultaneously. Returns `undefined` or empty array when the extension executes successfully without issues. Critical errors may prevent transaction completion, while warnings allow the transaction to proceed but indicate issues that should be addressed.
|
|
20
|
+
*/
|
|
7
21
|
errors?: ExtensionError[];
|
|
8
22
|
}
|
|
@@ -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 `api.action` to launch full-screen modal experiences.
|
|
12
10
|
*/
|
|
13
11
|
export interface ActionApi {
|
|
14
12
|
action: ActionApiContent;
|
|
@@ -10,33 +10,38 @@ import type {
|
|
|
10
10
|
} from '../../../types/cart';
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* The `CartApi` object provides access to cart management functionality and real-time cart state monitoring. Access these properties through `api.cart` to interact with the current POS cart.
|
|
14
14
|
*/
|
|
15
15
|
export interface CartApi {
|
|
16
16
|
cart: CartApiContent;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
+
/**
|
|
20
|
+
* Defines the type of discount applied at the cart level. Specifies whether the discount is percentage-based, fixed amount, or discount code redemption.
|
|
21
|
+
*/
|
|
19
22
|
export type CartDiscountType = 'Percentage' | 'FixedAmount' | 'Code';
|
|
20
23
|
|
|
24
|
+
/**
|
|
25
|
+
* Defines the type of discount applied to individual line items. Specifies whether the discount is percentage-based or a fixed amount reduction.
|
|
26
|
+
*/
|
|
21
27
|
export type LineItemDiscountType = 'Percentage' | 'FixedAmount';
|
|
22
28
|
|
|
23
29
|
export interface CartApiContent {
|
|
24
30
|
/**
|
|
25
|
-
* Provides
|
|
26
|
-
* Provides an initial value and a callback to subscribe to value changes. Currently supports only one subscription.
|
|
27
|
-
* You can utilize `makeStatefulSubscribable` on a `RemoteSubscribable` to implement multiple subscriptions.
|
|
28
|
-
* Using `makeStatefulSubscribable` or the corresponding hooks counts as a subscription.
|
|
31
|
+
* Subscribes to real-time cart state changes. Provides initial cart value and triggers callbacks on updates. Supports only one active subscription—use `makeStatefulSubscribable` for multiple subscribers.
|
|
29
32
|
*/
|
|
30
33
|
subscribable: RemoteSubscribable<Cart>;
|
|
31
34
|
|
|
32
|
-
/**
|
|
35
|
+
/**
|
|
36
|
+
* 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.
|
|
33
37
|
*
|
|
34
38
|
* @param cartState the cart state to set
|
|
35
39
|
* @returns the updated cart
|
|
36
40
|
*/
|
|
37
41
|
bulkCartUpdate(cartState: CartUpdateInput): Promise<Cart>;
|
|
38
42
|
|
|
39
|
-
/**
|
|
43
|
+
/**
|
|
44
|
+
* 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.
|
|
40
45
|
*
|
|
41
46
|
* @param type the type of discount applied (example: 'Percentage')
|
|
42
47
|
* @param title the title attributed with the discount
|
|
@@ -49,81 +54,82 @@ export interface CartApiContent {
|
|
|
49
54
|
): Promise<void>;
|
|
50
55
|
|
|
51
56
|
/**
|
|
52
|
-
*
|
|
57
|
+
* 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.
|
|
53
58
|
*
|
|
54
59
|
* @param code the code for the discount to add to the cart
|
|
55
60
|
*/
|
|
56
61
|
addCartCodeDiscount(code: string): Promise<void>;
|
|
57
62
|
|
|
58
63
|
/**
|
|
59
|
-
* Remove the cart discount
|
|
64
|
+
* Remove the current cart-level discount. This only affects cart-level discounts and does not impact line item discounts or automatic discount eligibility.
|
|
60
65
|
*/
|
|
61
66
|
removeCartDiscount(): Promise<void>;
|
|
62
67
|
|
|
63
68
|
/**
|
|
64
|
-
* Remove all cart and line
|
|
69
|
+
* 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.
|
|
65
70
|
*
|
|
66
71
|
* @param disableAutomaticDiscounts Whether or not automatic discounts should be enabled after removing the discounts.
|
|
67
72
|
*/
|
|
68
73
|
removeAllDiscounts(disableAutomaticDiscounts: boolean): Promise<void>;
|
|
69
74
|
|
|
70
75
|
/**
|
|
71
|
-
*
|
|
76
|
+
* 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.
|
|
72
77
|
*/
|
|
73
78
|
clearCart(): Promise<void>;
|
|
74
79
|
|
|
75
80
|
/**
|
|
76
|
-
*
|
|
81
|
+
* 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.
|
|
77
82
|
*
|
|
78
83
|
* @param customer the customer object to add to the cart
|
|
79
84
|
*/
|
|
80
85
|
setCustomer(customer: Customer): Promise<void>;
|
|
81
86
|
|
|
82
87
|
/**
|
|
83
|
-
* Remove the
|
|
88
|
+
* 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.
|
|
84
89
|
*/
|
|
85
90
|
removeCustomer(): Promise<void>;
|
|
86
91
|
|
|
87
92
|
/**
|
|
88
|
-
* Add a custom sale to the cart
|
|
93
|
+
* 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.
|
|
89
94
|
*
|
|
90
95
|
* @param customSale the custom sale object to add to the cart
|
|
91
|
-
* @returns {string} the
|
|
96
|
+
* @returns {string} the UUID of the line item added
|
|
92
97
|
*/
|
|
93
98
|
addCustomSale(customSale: CustomSale): Promise<string>;
|
|
94
99
|
|
|
95
100
|
/**
|
|
96
|
-
* Add a
|
|
101
|
+
* 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.
|
|
97
102
|
*
|
|
98
103
|
* @param variantId the product variant's numeric ID to add to the cart
|
|
99
104
|
* @param quantity the number of this variant to add to the cart
|
|
100
|
-
* @returns {string} the
|
|
105
|
+
* @returns {string} the UUID of the line item added, or the empty string if the user dismissed an oversell guard modal
|
|
106
|
+
* @throws {Error} if POS fails to add the line item
|
|
101
107
|
*/
|
|
102
108
|
addLineItem(variantId: number, quantity: number): Promise<string>;
|
|
103
109
|
|
|
104
110
|
/**
|
|
105
|
-
* Remove the line item
|
|
111
|
+
* 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.
|
|
106
112
|
*
|
|
107
113
|
* @param uuid the uuid of the line item that should be removed
|
|
108
114
|
*/
|
|
109
115
|
removeLineItem(uuid: string): Promise<void>;
|
|
110
116
|
|
|
111
117
|
/**
|
|
112
|
-
*
|
|
118
|
+
* 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.
|
|
113
119
|
*
|
|
114
120
|
* @param properties the custom key to value object to attribute to the cart
|
|
115
121
|
*/
|
|
116
122
|
addCartProperties(properties: Record<string, string>): Promise<void>;
|
|
117
123
|
|
|
118
124
|
/**
|
|
119
|
-
*
|
|
125
|
+
* 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.
|
|
120
126
|
*
|
|
121
127
|
* @param keys the collection of keys to be removed from the cart properties
|
|
122
128
|
*/
|
|
123
129
|
removeCartProperties(keys: string[]): Promise<void>;
|
|
124
130
|
|
|
125
131
|
/**
|
|
126
|
-
*
|
|
132
|
+
* 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.
|
|
127
133
|
*
|
|
128
134
|
* @param uuid the uuid of the line item to which the properties should be stringd
|
|
129
135
|
* @param properties the custom key to value object to attribute to the line item
|
|
@@ -134,7 +140,7 @@ export interface CartApiContent {
|
|
|
134
140
|
): Promise<void>;
|
|
135
141
|
|
|
136
142
|
/**
|
|
137
|
-
*
|
|
143
|
+
* 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.
|
|
138
144
|
*
|
|
139
145
|
* @param lineItemProperties the collection of custom line item properties to apply to their respective line items.
|
|
140
146
|
*/
|
|
@@ -143,7 +149,7 @@ export interface CartApiContent {
|
|
|
143
149
|
): Promise<void>;
|
|
144
150
|
|
|
145
151
|
/**
|
|
146
|
-
*
|
|
152
|
+
* 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.
|
|
147
153
|
*
|
|
148
154
|
* @param uuid the uuid of the line item to which the properties should be removed
|
|
149
155
|
* @param keys the collection of keys to be removed from the line item properties
|
|
@@ -151,7 +157,7 @@ export interface CartApiContent {
|
|
|
151
157
|
removeLineItemProperties(uuid: string, keys: string[]): Promise<void>;
|
|
152
158
|
|
|
153
159
|
/**
|
|
154
|
-
*
|
|
160
|
+
* 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.
|
|
155
161
|
*
|
|
156
162
|
* @param uuid the uuid of the line item that should receive a discount
|
|
157
163
|
* @param type the type of discount applied (example: 'Percentage')
|
|
@@ -166,7 +172,7 @@ export interface CartApiContent {
|
|
|
166
172
|
): Promise<void>;
|
|
167
173
|
|
|
168
174
|
/**
|
|
169
|
-
*
|
|
175
|
+
* 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.
|
|
170
176
|
*
|
|
171
177
|
* @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.
|
|
172
178
|
*/
|
|
@@ -175,14 +181,14 @@ export interface CartApiContent {
|
|
|
175
181
|
): Promise<void>;
|
|
176
182
|
|
|
177
183
|
/**
|
|
178
|
-
*
|
|
184
|
+
* 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.
|
|
179
185
|
*
|
|
180
186
|
* @param staffId the ID of the staff. Providing undefined will clear the attributed staff from all line items.
|
|
181
187
|
*/
|
|
182
188
|
setAttributedStaff(staffId: number | undefined): Promise<void>;
|
|
183
189
|
|
|
184
190
|
/**
|
|
185
|
-
*
|
|
191
|
+
* 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.
|
|
186
192
|
*
|
|
187
193
|
* @param staffId the ID of the staff. Providing undefined will clear the attributed staff on the line item.
|
|
188
194
|
* @param lineItemUuid the UUID of the line item.
|
|
@@ -193,28 +199,28 @@ export interface CartApiContent {
|
|
|
193
199
|
): Promise<void>;
|
|
194
200
|
|
|
195
201
|
/**
|
|
196
|
-
* Remove all discounts from a line item
|
|
202
|
+
* 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.
|
|
197
203
|
*
|
|
198
204
|
* @param uuid the uuid of the line item whose discounts should be removed
|
|
199
205
|
*/
|
|
200
206
|
removeLineItemDiscount(uuid: string): Promise<void>;
|
|
201
207
|
|
|
202
208
|
/**
|
|
203
|
-
* Add
|
|
209
|
+
* 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.
|
|
204
210
|
*
|
|
205
211
|
* @param address the address object to add to the customer in cart
|
|
206
212
|
*/
|
|
207
213
|
addAddress(address: Address): Promise<void>;
|
|
208
214
|
|
|
209
215
|
/**
|
|
210
|
-
* Delete an address from the customer
|
|
216
|
+
* 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`.
|
|
211
217
|
*
|
|
212
218
|
* @param addressId the address ID to delete
|
|
213
219
|
*/
|
|
214
220
|
deleteAddress(addressId: number): Promise<void>;
|
|
215
221
|
|
|
216
222
|
/**
|
|
217
|
-
*
|
|
223
|
+
* 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.
|
|
218
224
|
*
|
|
219
225
|
* @param addressId the address ID to set as the default address
|
|
220
226
|
*/
|
|
@@ -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 {RemoteSubscribable} from '@remote-ui/async-subscription';
|
|
|
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
|
-
* Whether the device is connected to the
|
|
10
|
+
* Whether the device is connected to the Internet. Returns either `Connected` or `Disconnected` to indicate the current Internet connectivity status. Use for implementing connectivity-aware functionality, displaying connectivity indicators, or controlling network-dependent features.
|
|
8
11
|
*/
|
|
9
12
|
internetConnected: ConnectivityStateSeverity;
|
|
10
13
|
}
|
|
11
14
|
|
|
12
15
|
export interface ConnectivityApiContent {
|
|
13
16
|
/**
|
|
14
|
-
* Creates a subscription to changes in connectivity.
|
|
15
|
-
* Provides an initial value and a callback to subscribe to value changes.
|
|
17
|
+
* Creates a subscription to changes in connectivity. Provides an initial value and a callback to subscribe to value changes. Use for implementing connectivity-aware functionality and reactive connectivity handling.
|
|
16
18
|
*/
|
|
17
19
|
subscribable: RemoteSubscribable<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 `api.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
|
}
|