@shopify/ui-extensions 2025.10.7 → 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 +22 -8
- 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/standard/standard-api.d.ts +2 -0
- package/build/ts/surfaces/point-of-sale/api/standard/standard-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/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/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/admin/components/Page/examples/page-with-breadcrumbs-and-title.html +7 -0
- package/src/surfaces/admin/components/Page/examples/page-with-breadcrumbs-and-title.jsx +7 -0
- package/src/surfaces/admin/components/Page/examples/page-with-secondary-actions.html +8 -0
- package/src/surfaces/admin/components/Page/examples/page-with-secondary-actions.jsx +8 -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 +23 -8
- 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/standard/standard-api.ts +2 -0
- 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/api.ts +1 -0
- 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
|
@@ -2,90 +2,210 @@ import {CountryCode} from './country-code';
|
|
|
2
2
|
import {TaxLine} from './tax-line';
|
|
3
3
|
import {DiscountAllocation} from './discount-allocation';
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* Represents the shopping cart state, including line items, pricing, customer information, and applied discounts. Provides comprehensive access to all cart data and operations.
|
|
7
|
+
*/
|
|
5
8
|
export interface Cart {
|
|
6
9
|
/**
|
|
7
|
-
* Indicates whether the cart is currently editable.
|
|
8
|
-
*
|
|
9
|
-
* An undefined value should be treated as `true` for backward compatibility.
|
|
10
|
+
* Indicates whether the cart is currently editable. An `undefined` value should be treated as `true` for backward compatibility. Use this to determine if cart modification operations are allowed.
|
|
10
11
|
*/
|
|
11
12
|
editable?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* The subtotal amount of the cart before taxes and discounts, formatted as a currency string.
|
|
15
|
+
*/
|
|
12
16
|
subtotal: string;
|
|
17
|
+
/**
|
|
18
|
+
* The total tax amount for the cart, formatted as a currency string.
|
|
19
|
+
*/
|
|
13
20
|
taxTotal: string;
|
|
21
|
+
/**
|
|
22
|
+
* The final total amount including all items, taxes, and discounts, formatted as a currency string.
|
|
23
|
+
*/
|
|
14
24
|
grandTotal: string;
|
|
25
|
+
/**
|
|
26
|
+
* The cart note to set during bulk update. Replaces existing note or sets new note if none exists. Set to `undefined` to remove current note.
|
|
27
|
+
*/
|
|
15
28
|
note?: string;
|
|
29
|
+
/**
|
|
30
|
+
* The cart-level discount to apply during bulk update. Replaces existing cart discount. Set to `undefined` to remove current discount.
|
|
31
|
+
*/
|
|
16
32
|
cartDiscount?: Discount;
|
|
33
|
+
/**
|
|
34
|
+
* An array of cart-level discounts to apply during bulk update. Replaces all existing cart discounts with the provided array.
|
|
35
|
+
*/
|
|
17
36
|
cartDiscounts: Discount[];
|
|
37
|
+
/**
|
|
38
|
+
* The customer to associate with the cart during bulk update. Replaces existing customer or converts guest cart to customer cart.
|
|
39
|
+
*/
|
|
18
40
|
customer?: Customer;
|
|
41
|
+
/**
|
|
42
|
+
* An array of line items to set during bulk update. Completely replaces existing cart contents—removes all current items and adds the provided ones.
|
|
43
|
+
*/
|
|
19
44
|
lineItems: LineItem[];
|
|
45
|
+
/**
|
|
46
|
+
* The custom key-value properties to apply to the line item. Merged with existing properties—duplicate keys overwrite existing values.
|
|
47
|
+
*/
|
|
20
48
|
properties: Record<string, string>;
|
|
21
49
|
}
|
|
22
50
|
|
|
51
|
+
/**
|
|
52
|
+
* Specifies the parameters for updating cart information. Includes options for modifying customer data, notes, references, and other cart-level metadata.
|
|
53
|
+
*/
|
|
23
54
|
export interface CartUpdateInput {
|
|
55
|
+
/**
|
|
56
|
+
* The cart note to set during bulk update. Replaces existing note or sets new note if none exists. Set to `undefined` to remove current note.
|
|
57
|
+
*/
|
|
24
58
|
note?: string;
|
|
59
|
+
/**
|
|
60
|
+
* The cart-level discount to apply during bulk update. Replaces existing cart discount. Set to `undefined` to remove current discount.
|
|
61
|
+
*/
|
|
25
62
|
cartDiscount?: Discount;
|
|
63
|
+
/**
|
|
64
|
+
* An array of cart-level discounts to apply during bulk update. Replaces all existing cart discounts with the provided array.
|
|
65
|
+
*/
|
|
26
66
|
cartDiscounts: Discount[];
|
|
67
|
+
/**
|
|
68
|
+
* The customer to associate with the cart during bulk update. Replaces existing customer or converts guest cart to customer cart.
|
|
69
|
+
*/
|
|
27
70
|
customer?: Customer;
|
|
71
|
+
/**
|
|
72
|
+
* An array of line items to set during bulk update. Completely replaces existing cart contents—removes all current items and adds the provided ones.
|
|
73
|
+
*/
|
|
28
74
|
lineItems: LineItem[];
|
|
75
|
+
/**
|
|
76
|
+
* The custom key-value properties to apply to the line item. Merged with existing properties—duplicate keys overwrite existing values.
|
|
77
|
+
*/
|
|
29
78
|
properties: Record<string, string>;
|
|
30
79
|
}
|
|
31
80
|
|
|
81
|
+
/**
|
|
82
|
+
* Represents basic customer identification information. Contains the customer ID for linking to detailed customer data and enabling customer-specific features.
|
|
83
|
+
*/
|
|
32
84
|
export interface Customer {
|
|
85
|
+
/**
|
|
86
|
+
* The unique numeric identifier for the customer in Shopify's system. This ID is consistent across all Shopify systems and APIs. Used to link this customer reference to the full customer record with complete profile information. Commonly used for customer lookups, applying customer-specific pricing or discounts, linking orders to customer accounts, or integrating with customer management systems.
|
|
87
|
+
*/
|
|
33
88
|
id: number;
|
|
34
89
|
}
|
|
35
90
|
|
|
91
|
+
/**
|
|
92
|
+
* Represents an individual item in the shopping cart. Contains product information, pricing, quantity, discounts, and customization details for a single cart entry.
|
|
93
|
+
*/
|
|
36
94
|
export interface LineItem {
|
|
95
|
+
/**
|
|
96
|
+
* The unique identifier for this line item within the cart. Use for line item-specific operations like updates, removals, or property modifications.
|
|
97
|
+
*/
|
|
37
98
|
uuid: string;
|
|
99
|
+
/**
|
|
100
|
+
* The unit price of the line item. Returns 'undefined' for custom sales without set prices. Use for pricing calculations and displays.
|
|
101
|
+
*/
|
|
38
102
|
price?: number;
|
|
103
|
+
/**
|
|
104
|
+
* The quantity of this item in the cart. Always a positive integer. Use for quantity displays, calculations, and inventory management.
|
|
105
|
+
*/
|
|
39
106
|
quantity: number;
|
|
107
|
+
/**
|
|
108
|
+
* The display title of the line item. Returns 'undefined' for items without titles. Use for customer-facing displays and cart item identification.
|
|
109
|
+
*/
|
|
40
110
|
title?: string;
|
|
111
|
+
/**
|
|
112
|
+
* The product variant 'ID' this line item represents. Returns 'undefined' for custom sales or non-variant items. Use for variant-specific operations and product details.
|
|
113
|
+
*/
|
|
41
114
|
variantId?: number;
|
|
115
|
+
/**
|
|
116
|
+
* The product 'ID' this line item represents. Returns 'undefined' for custom sales or non-product items. Use for product-specific operations and linking to product details.
|
|
117
|
+
*/
|
|
42
118
|
productId?: number;
|
|
119
|
+
/**
|
|
120
|
+
* An array of discounts applied to this line item. Empty array if no discounts are active. Use for displaying line item savings and discount details.
|
|
121
|
+
*/
|
|
43
122
|
discounts: Discount[];
|
|
123
|
+
/**
|
|
124
|
+
* An array of discount allocations applied to this line item, providing detailed breakdown of how discounts are distributed. Returns 'undefined' if no allocations exist. Use for enhanced discount tracking and reporting.
|
|
125
|
+
*/
|
|
44
126
|
discountAllocations?: DiscountAllocation[];
|
|
127
|
+
/**
|
|
128
|
+
* Determines whether this line item is subject to tax calculations. Use for tax computation, compliance, and pricing displays.
|
|
129
|
+
*/
|
|
45
130
|
taxable: boolean;
|
|
131
|
+
/**
|
|
132
|
+
* An array of tax lines applied to this line item, containing tax amounts and rates. Use for detailed tax reporting and compliance.
|
|
133
|
+
*/
|
|
46
134
|
taxLines: TaxLine[];
|
|
135
|
+
/**
|
|
136
|
+
* The Stock Keeping Unit (SKU) identifier for this line item. Returns 'undefined' if no SKU is configured. Use for inventory tracking and product identification.
|
|
137
|
+
*/
|
|
47
138
|
sku?: string;
|
|
139
|
+
/**
|
|
140
|
+
* The vendor or brand name for this line item. Returns 'undefined' if no vendor is set. Use for vendor-specific displays and organization.
|
|
141
|
+
*/
|
|
48
142
|
vendor?: string;
|
|
143
|
+
/**
|
|
144
|
+
* The custom key-value properties attached to this line item. Empty object if no properties are set. Use for metadata, customization options, or integration data.
|
|
145
|
+
*/
|
|
49
146
|
properties: {[key: string]: string};
|
|
147
|
+
/**
|
|
148
|
+
* Determines whether this line item is a gift card. Gift cards have special handling requirements and business logic. Use for implementing gift card-specific workflows.
|
|
149
|
+
*/
|
|
50
150
|
isGiftCard: boolean;
|
|
151
|
+
/**
|
|
152
|
+
* The staff member 'ID' attributed to this line item. Returns 'undefined' if no staff attribution is set. Use for commission tracking and performance analytics.
|
|
153
|
+
*/
|
|
51
154
|
attributedUserId?: number;
|
|
155
|
+
/**
|
|
156
|
+
* Determines whether this line item requires a selling plan (subscription) to be purchased. Returns 'undefined' if selling plan information is unavailable. Use for implementing subscription-based product handling.
|
|
157
|
+
*/
|
|
52
158
|
requiresSellingPlan?: boolean;
|
|
159
|
+
/**
|
|
160
|
+
* Determines whether this line item has selling plan groups (subscription options) available. Returns 'undefined' if selling plan information is unavailable. Use for displaying subscription options.
|
|
161
|
+
*/
|
|
53
162
|
hasSellingPlanGroups?: boolean;
|
|
54
163
|
/**
|
|
55
|
-
* The currently selected selling plan for this line item.
|
|
164
|
+
* The currently selected selling plan for this line item. Returns 'undefined' if no selling plan is applied. Contains selling plan details including 'ID', name, and delivery intervals. Use for subscription management and recurring purchase functionality.
|
|
56
165
|
*/
|
|
57
166
|
sellingPlan?: SellingPlan;
|
|
58
167
|
/**
|
|
59
|
-
* Bundle components for this line item. Only present for product bundles.
|
|
60
|
-
* Each component represents an individual item within the bundle with its own tax information.
|
|
168
|
+
* Bundle components for this line item. Only present for [product bundles](/docs/apps/build/product-merchandising/bundles). Each component represents an individual item within the bundle with its own tax information.
|
|
61
169
|
*/
|
|
62
170
|
components?: LineItemComponent[];
|
|
63
171
|
}
|
|
64
172
|
|
|
65
173
|
/**
|
|
66
|
-
* Represents a component of a product bundle line item.
|
|
67
|
-
* Bundle components contain the individual items that make up a bundle,
|
|
68
|
-
* each with their own pricing and tax information.
|
|
174
|
+
* Represents a component of a [product bundle](/docs/apps/build/product-merchandising/bundles) line item. Bundle components contain the individual items that make up a bundle, each with their own pricing and tax information.
|
|
69
175
|
*/
|
|
70
176
|
export interface LineItemComponent {
|
|
71
|
-
/**
|
|
177
|
+
/**
|
|
178
|
+
* The display name for the custom sale item. Appears on receipts and in cart displays. Should be descriptive and customer-friendly.
|
|
179
|
+
*/
|
|
72
180
|
title?: string;
|
|
73
|
-
/**
|
|
181
|
+
/**
|
|
182
|
+
* The quantity of the custom sale item. Must be a positive integer. Use for quantity-based pricing and inventory management.
|
|
183
|
+
*/
|
|
74
184
|
quantity: number;
|
|
75
|
-
/**
|
|
185
|
+
/**
|
|
186
|
+
* The price for the custom sale item as currency string. Must be a valid positive amount. Use for non-catalog items and custom pricing.
|
|
187
|
+
*/
|
|
76
188
|
price?: number;
|
|
77
|
-
/**
|
|
189
|
+
/**
|
|
190
|
+
* Determines whether the custom sale item is taxable. Set to `true` to apply tax calculations, `false` to exempt from taxes.
|
|
191
|
+
*/
|
|
78
192
|
taxable: boolean;
|
|
79
|
-
/**
|
|
193
|
+
/**
|
|
194
|
+
* An array of tax lines applied to this component.
|
|
195
|
+
*/
|
|
80
196
|
taxLines: TaxLine[];
|
|
81
|
-
/**
|
|
197
|
+
/**
|
|
198
|
+
* The unique numeric identifier for the product variant this component represents, if applicable.
|
|
199
|
+
*/
|
|
82
200
|
variantId?: number;
|
|
83
|
-
/**
|
|
201
|
+
/**
|
|
202
|
+
* The unique numeric identifier for the product this component represents, if applicable.
|
|
203
|
+
*/
|
|
84
204
|
productId?: number;
|
|
85
205
|
}
|
|
86
206
|
|
|
87
207
|
/**
|
|
88
|
-
* Represents a selling plan associated with a line item.
|
|
208
|
+
* Represents a selling plan (subscription) associated with a line item, containing delivery schedule and plan identification details.
|
|
89
209
|
*/
|
|
90
210
|
export interface SellingPlan {
|
|
91
211
|
/**
|
|
@@ -93,12 +213,11 @@ export interface SellingPlan {
|
|
|
93
213
|
*/
|
|
94
214
|
id: number;
|
|
95
215
|
/**
|
|
96
|
-
* The name of the
|
|
216
|
+
* The name of the POS device.
|
|
97
217
|
*/
|
|
98
218
|
name: string;
|
|
99
219
|
/**
|
|
100
|
-
* The fingerprint of the applied selling plan within this cart session.
|
|
101
|
-
* Provided by POS. Not available during refund / exchanges.
|
|
220
|
+
* The fingerprint of the applied selling plan within this cart session. Provided by POS. Not available during refund / exchanges.
|
|
102
221
|
*/
|
|
103
222
|
digest?: string;
|
|
104
223
|
/**
|
|
@@ -111,44 +230,62 @@ export interface SellingPlan {
|
|
|
111
230
|
deliveryIntervalCount?: number;
|
|
112
231
|
}
|
|
113
232
|
|
|
233
|
+
/**
|
|
234
|
+
* Represents a discount applied to a cart or transaction, including amount and description.
|
|
235
|
+
*/
|
|
114
236
|
export interface Discount {
|
|
237
|
+
/**
|
|
238
|
+
* The discount value to apply. For `'Percentage'` type, this represents the percentage value (For example, "10" for 10% off). For `'FixedAmount'` type, this represents the fixed monetary amount to deduct from the line item price. Commonly used for discount calculations and displaying the discount value to merchants.
|
|
239
|
+
*/
|
|
115
240
|
amount: number;
|
|
241
|
+
/**
|
|
242
|
+
* The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code associated with the location currently active on POS.
|
|
243
|
+
*/
|
|
116
244
|
currency?: string;
|
|
245
|
+
/**
|
|
246
|
+
* A human-readable description of the discount shown to merchants and customers. This typically includes the discount name, promotion details, or discount code (for example, "SUMMER2024", "10% off entire order", "Buy 2 Get 1 Free"). Returns `undefined` when no description is provided.
|
|
247
|
+
*/
|
|
117
248
|
discountDescription?: string;
|
|
249
|
+
/**
|
|
250
|
+
* The [discount type](https://help.shopify.com/en/manual/discounts/discount-types) applied to this line item. Can be either `'Percentage'` for percentage-based discounts or `'FixedAmount'` for fixed monetary amount discounts. This determines how the discount amount is calculated and displayed.
|
|
251
|
+
*/
|
|
118
252
|
type?: string;
|
|
119
253
|
}
|
|
120
254
|
|
|
121
255
|
/**
|
|
122
|
-
*
|
|
256
|
+
* Specifies the parameters for adding custom properties to line items. Properties are key-value pairs used for storing metadata, tracking information, or integration data.
|
|
123
257
|
*/
|
|
124
258
|
export interface SetLineItemPropertiesInput {
|
|
125
259
|
/**
|
|
126
|
-
* The
|
|
260
|
+
* The target line item `UUID` for selling plan assignment. Must match an existing line item in the cart.
|
|
127
261
|
*/
|
|
128
262
|
lineItemUuid: string;
|
|
129
263
|
/**
|
|
130
|
-
* The custom properties to apply to the line item.
|
|
264
|
+
* The custom key-value properties to apply to the line item. Merged with existing properties—duplicate keys overwrite existing values.
|
|
131
265
|
*/
|
|
132
266
|
properties: Record<string, string>;
|
|
133
267
|
}
|
|
134
268
|
|
|
135
269
|
/**
|
|
136
|
-
*
|
|
270
|
+
* Specifies the parameters for applying discounts to individual line items. Includes the discount type, value, and reason for audit and reporting purposes.
|
|
137
271
|
*/
|
|
138
272
|
export interface SetLineItemDiscountInput {
|
|
139
273
|
/**
|
|
140
|
-
* The
|
|
274
|
+
* The target line item `UUID` for selling plan assignment. Must match an existing line item in the cart.
|
|
141
275
|
*/
|
|
142
276
|
lineItemUuid: string;
|
|
143
277
|
/**
|
|
144
|
-
* The discount to
|
|
278
|
+
* The discount details to apply to the line item. Contains title, type (`'Percentage'` or `'FixedAmount'`), and amount value.
|
|
145
279
|
*/
|
|
146
280
|
lineItemDiscount: LineItemDiscount;
|
|
147
281
|
}
|
|
148
282
|
|
|
283
|
+
/**
|
|
284
|
+
* Represents a discount applied to an individual line item in the cart.
|
|
285
|
+
*/
|
|
149
286
|
export interface LineItemDiscount {
|
|
150
287
|
/**
|
|
151
|
-
* The
|
|
288
|
+
* The display name for the custom sale item. Appears on receipts and in cart displays. Should be descriptive and customer-friendly.
|
|
152
289
|
*/
|
|
153
290
|
title: string;
|
|
154
291
|
/**
|
|
@@ -161,41 +298,100 @@ export interface LineItemDiscount {
|
|
|
161
298
|
amount: string;
|
|
162
299
|
}
|
|
163
300
|
|
|
301
|
+
/**
|
|
302
|
+
* Represents a custom sale item that is not associated with a product in the catalog. Includes pricing, taxation, and descriptive information for manually created line items.
|
|
303
|
+
*/
|
|
164
304
|
export interface CustomSale {
|
|
305
|
+
/**
|
|
306
|
+
* The quantity of the custom sale item. Must be a positive integer. Use for quantity-based pricing and inventory management.
|
|
307
|
+
*/
|
|
165
308
|
quantity: number;
|
|
309
|
+
/**
|
|
310
|
+
* The display name for the custom sale item. Appears on receipts and in cart displays. Should be descriptive and customer-friendly.
|
|
311
|
+
*/
|
|
166
312
|
title: string;
|
|
313
|
+
/**
|
|
314
|
+
* The price for the custom sale item as currency string. Must be a valid positive amount. Use for non-catalog items and custom pricing.
|
|
315
|
+
*/
|
|
167
316
|
price: string;
|
|
317
|
+
/**
|
|
318
|
+
* Determines whether the custom sale item is taxable. Set to `true` to apply tax calculations, `false` to exempt from taxes.
|
|
319
|
+
*/
|
|
168
320
|
taxable: boolean;
|
|
169
321
|
}
|
|
170
322
|
|
|
323
|
+
/**
|
|
324
|
+
* Represents physical address information for customer shipping and billing. Contains standard address fields including street, city, region, postal code, and country data.
|
|
325
|
+
*/
|
|
171
326
|
export interface Address {
|
|
327
|
+
/**
|
|
328
|
+
* The primary street address line. Required for most shipping and billing operations. Should contain street number and name.
|
|
329
|
+
*/
|
|
172
330
|
address1?: string;
|
|
331
|
+
/**
|
|
332
|
+
* The secondary address line for apartment, suite, or unit information. Optional field for additional address details.
|
|
333
|
+
*/
|
|
173
334
|
address2?: string;
|
|
335
|
+
/**
|
|
336
|
+
* The city name for the address. Required for shipping calculations and location-based services.
|
|
337
|
+
*/
|
|
174
338
|
city?: string;
|
|
339
|
+
/**
|
|
340
|
+
* The company name associated with the address. Optional field for business customers and B2B transactions.
|
|
341
|
+
*/
|
|
175
342
|
company?: string;
|
|
343
|
+
/**
|
|
344
|
+
* The first name for the address contact. Used for personalized shipping labels and customer communication.
|
|
345
|
+
*/
|
|
176
346
|
firstName?: string;
|
|
347
|
+
/**
|
|
348
|
+
* The last name for the address contact. Required for complete customer identification and shipping labels.
|
|
349
|
+
*/
|
|
177
350
|
lastName?: string;
|
|
351
|
+
/**
|
|
352
|
+
* The phone number for the address contact. Used for delivery notifications, shipping updates, and customer communication.
|
|
353
|
+
*/
|
|
178
354
|
phone?: string;
|
|
355
|
+
/**
|
|
356
|
+
* The province or state name for the address. Required for regional shipping rates and tax calculations.
|
|
357
|
+
*/
|
|
179
358
|
province?: string;
|
|
359
|
+
/**
|
|
360
|
+
* The country name for the address. Required for international shipping, tax calculations, and compliance.
|
|
361
|
+
*/
|
|
180
362
|
country?: string;
|
|
363
|
+
/**
|
|
364
|
+
* The postal or ZIP code for the address. Required for accurate shipping rates and location-based services.
|
|
365
|
+
*/
|
|
181
366
|
zip?: string;
|
|
367
|
+
/**
|
|
368
|
+
* The full name for the address contact. Use when first and last names are combined or unavailable as separate fields.
|
|
369
|
+
*/
|
|
182
370
|
name?: string;
|
|
371
|
+
/**
|
|
372
|
+
* The standardized province or state code. Use for precise regional identification and automated shipping calculations.
|
|
373
|
+
*/
|
|
183
374
|
provinceCode?: string;
|
|
375
|
+
/**
|
|
376
|
+
* The standardized country code (ISO format). Use for precise country identification and international shipping operations.
|
|
377
|
+
*/
|
|
184
378
|
countryCode?: CountryCode;
|
|
185
379
|
}
|
|
186
380
|
|
|
381
|
+
/**
|
|
382
|
+
* Specifies the parameters for assigning selling plans to line items. Used to add subscription or purchase option configurations to products.
|
|
383
|
+
*/
|
|
187
384
|
export interface SetLineItemSellingPlanInput {
|
|
188
385
|
/**
|
|
189
|
-
* The
|
|
386
|
+
* The target line item `UUID` for selling plan assignment. Must match an existing line item in the cart.
|
|
190
387
|
*/
|
|
191
388
|
lineItemUuid: string;
|
|
192
389
|
/**
|
|
193
|
-
* The
|
|
390
|
+
* The selling plan `ID` to apply to the line item. Must be a valid selling plan available for the product.
|
|
194
391
|
*/
|
|
195
392
|
sellingPlanId: number;
|
|
196
393
|
/**
|
|
197
|
-
* The name
|
|
198
|
-
* If not provided, POS will try to fetch it from the server after syncing the cart.
|
|
394
|
+
* The selling plan name for display purposes. Required for proper selling plan display in the cart.
|
|
199
395
|
*/
|
|
200
396
|
sellingPlanName?: string;
|
|
201
397
|
}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
/* eslint @shopify/typescript/prefer-pascal-case-enums: off */
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* The two-letter [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes representing all countries and territories. These standard codes are used for addresses, shipping destinations, tax jurisdictions, and regional settings.
|
|
5
|
+
*/
|
|
3
6
|
export enum CountryCode {
|
|
4
7
|
AF = 'AF',
|
|
5
8
|
AX = 'AX',
|
|
@@ -1,14 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Defines information about the POS device where the extension is running.
|
|
3
|
+
*/
|
|
1
4
|
export interface Device {
|
|
2
5
|
/**
|
|
3
|
-
* The name of the device
|
|
6
|
+
* The name of the POS device.
|
|
4
7
|
*/
|
|
5
8
|
name: string;
|
|
6
9
|
/**
|
|
7
|
-
* The
|
|
10
|
+
* The unique identifier for the POS device.
|
|
8
11
|
*/
|
|
9
12
|
deviceId: number;
|
|
10
13
|
/**
|
|
11
|
-
* Whether the device is a tablet
|
|
14
|
+
* Whether the device is a tablet form factor.
|
|
12
15
|
*/
|
|
13
16
|
isTablet: boolean;
|
|
14
17
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Represents the structure of a direct API request body for [GraphQL](https://graphql.org/) operations. Contains the query/mutation string and optional variables for parameterized queries.
|
|
3
3
|
*/
|
|
4
4
|
export interface DirectApiRequestBody {
|
|
5
5
|
/**
|
|
6
|
-
* The GraphQL query or mutation string to be executed.
|
|
6
|
+
* The GraphQL query or mutation string to be executed against the Shopify API. This is the complete GraphQL operation definition including operation type (query/mutation), field selections, and any embedded arguments. For example, a query string might be `"query { product(id: 123) { title price } }"` or a mutation like `"mutation UpdateProduct($id: ID!, $title: String!) { productUpdate(id: $id, title: $title) { product { title } } }"`. Variables should be extracted into the `variables` field rather than embedded directly in the query string for security and reusability.
|
|
7
7
|
*/
|
|
8
8
|
query: string;
|
|
9
9
|
/**
|
|
10
|
-
* Optional variables to be passed along with the GraphQL query.
|
|
10
|
+
* Optional variables to be passed along with the GraphQL query, used for parameterized queries and mutations. This is a key-value object where keys match the variable names declared in the `query` string (prefixed with `$`) and values are the actual data to substitute. For example, if the query declares `$id: ID!`, the variables object would include `{id: "123"}`. Variables provide security by preventing injection attacks, enable query reuse with different parameters, and improve GraphQL caching. Returns `undefined` when the query has no variables or uses inline arguments instead.
|
|
11
11
|
*/
|
|
12
12
|
variables?: Record<string, any>;
|
|
13
13
|
}
|
|
@@ -1,9 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents a monetary amount with currency information.
|
|
3
|
+
*/
|
|
1
4
|
export interface Money {
|
|
5
|
+
/**
|
|
6
|
+
* The monetary amount as a number.
|
|
7
|
+
*/
|
|
2
8
|
amount: number;
|
|
9
|
+
/**
|
|
10
|
+
* The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code associated with the location currently active on POS.
|
|
11
|
+
*/
|
|
3
12
|
currency: string;
|
|
4
13
|
}
|
|
5
14
|
|
|
15
|
+
/**
|
|
16
|
+
* Represents a monetary amount as a string with explicit currency code.
|
|
17
|
+
*/
|
|
6
18
|
export interface MoneyV2 {
|
|
19
|
+
/**
|
|
20
|
+
* The monetary amount as a string.
|
|
21
|
+
*/
|
|
7
22
|
amount: string;
|
|
23
|
+
/**
|
|
24
|
+
* The ISO currency code (for example, USD, CAD).
|
|
25
|
+
*/
|
|
8
26
|
currencyCode: string;
|
|
9
27
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* This object contains the resources that were found, as well as an array of IDs specifying which IDs, if any, did not correspond to a resource.
|
|
2
|
+
* Represents the result of a bulk resource lookup operation. Contains successfully found resources and identifiers for resources that were not found.
|
|
4
3
|
*/
|
|
5
4
|
export interface MultipleResourceResult<T> {
|
|
6
5
|
/**
|
|
@@ -1,12 +1,29 @@
|
|
|
1
1
|
import {LineItem} from './cart';
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* Represents a refund applied to a line item, including when it was created and the quantity refunded.
|
|
5
|
+
*/
|
|
3
6
|
export interface LineItemRefund {
|
|
7
|
+
/**
|
|
8
|
+
* The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp when the refund was created and processed (for example, `"2024-05-15T14:30:00Z"`). This indicates when the refund was initiated and can be used for chronological sorting, refund history displays, or audit trails.
|
|
9
|
+
*/
|
|
4
10
|
createdAt: string;
|
|
11
|
+
/**
|
|
12
|
+
* The number of units refunded in this refund transaction. This must be a positive integer representing how many items were returned to inventory or credited back to the customer. Multiple refunds can exist for the same line item if partial refunds were processed over time.
|
|
13
|
+
*/
|
|
5
14
|
quantity: number;
|
|
6
15
|
}
|
|
7
16
|
|
|
17
|
+
/**
|
|
18
|
+
* Represents a line item from an order, extending the base line item with current quantity and refund information.
|
|
19
|
+
*/
|
|
8
20
|
export interface OrderLineItem extends LineItem {
|
|
9
|
-
|
|
21
|
+
/**
|
|
22
|
+
* The current quantity of items that remain with the customer after accounting for refunds. This is calculated as the original `quantity` minus any refunded quantities. For example, if 5 items were ordered and 2 were refunded, `currentQuantity` would be `3`. This value reflects the net quantity the customer kept from this line item.
|
|
23
|
+
*/
|
|
10
24
|
currentQuantity: number;
|
|
25
|
+
/**
|
|
26
|
+
* An array of all refund transactions applied to this line item, ordered chronologically. Each refund entry tracks when the refund occurred and how many units were refunded. Multiple entries indicate partial refunds processed over time. Returns `undefined` or empty array when no refunds have been applied to this line item.
|
|
27
|
+
*/
|
|
11
28
|
refunds?: LineItemRefund[];
|
|
12
29
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Represents the result of a paginated query. Contains the data items, pagination cursors for navigating pages, and information about whether more results exist.
|
|
3
3
|
*/
|
|
4
4
|
export interface PaginatedResult<T> {
|
|
5
5
|
/**
|
|
@@ -8,8 +8,7 @@ export interface PaginatedResult<T> {
|
|
|
8
8
|
items: T[];
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
|
-
* The cursor of the last item. This can be used to fetch more results.
|
|
12
|
-
* The format of this cursor may look different depending on if POS is fetching results from the remote API, or its local database. However, that should not affect its usage with the search functions.
|
|
11
|
+
* The cursor of the last item. This can be used to fetch more results. The format of this cursor may look different depending on if POS is fetching results from the remote API, or its local database. However, that should not affect its usage with the search functions.
|
|
13
12
|
*/
|
|
14
13
|
lastCursor?: string;
|
|
15
14
|
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The available payment method types for POS transactions.
|
|
3
|
+
*/
|
|
1
4
|
export type PaymentMethod =
|
|
2
5
|
| 'Cash'
|
|
3
6
|
| 'Custom'
|
|
@@ -9,8 +12,21 @@ export type PaymentMethod =
|
|
|
9
12
|
| 'ShopPay'
|
|
10
13
|
| 'StoreCredit'
|
|
11
14
|
| 'Unknown';
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Represents a payment applied to a transaction, including the amount, currency, and payment method type.
|
|
18
|
+
*/
|
|
12
19
|
export interface Payment {
|
|
20
|
+
/**
|
|
21
|
+
* The payment amount.
|
|
22
|
+
*/
|
|
13
23
|
amount: number;
|
|
24
|
+
/**
|
|
25
|
+
* The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code associated with the location currently active on POS.
|
|
26
|
+
*/
|
|
14
27
|
currency: string;
|
|
28
|
+
/**
|
|
29
|
+
* The payment method type.
|
|
30
|
+
*/
|
|
15
31
|
type: PaymentMethod;
|
|
16
32
|
}
|