@shopify/ui-extensions 2026.1.0-rc.2 → 2026.1.0-rc.5
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/Choice.d.ts +17 -62
- package/build/ts/surfaces/admin/components/shared.d.ts +102 -3
- 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/camera-api/camera-api.d.ts +54 -0
- package/build/ts/surfaces/point-of-sale/api/camera-api/camera-api.d.ts.map +1 -0
- 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/cash-drawer-api/cash-drawer-api.d.ts +6 -4
- package/build/ts/surfaces/point-of-sale/api/cash-drawer-api/cash-drawer-api.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/api/connectivity-api/connectivity-api.d.ts +6 -4
- package/build/ts/surfaces/point-of-sale/api/connectivity-api/connectivity-api.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/api/customer-api/customer-api.d.ts +4 -1
- package/build/ts/surfaces/point-of-sale/api/customer-api/customer-api.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/api/device-api/device-api.d.ts +4 -4
- package/build/ts/surfaces/point-of-sale/api/draft-order-api/draft-order-api.d.ts +6 -3
- package/build/ts/surfaces/point-of-sale/api/draft-order-api/draft-order-api.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/api/locale-api/locale-api.d.ts +2 -3
- package/build/ts/surfaces/point-of-sale/api/locale-api/locale-api.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/api/navigation-api/navigation-api.d.ts +17 -9
- package/build/ts/surfaces/point-of-sale/api/navigation-api/navigation-api.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/api/order-api/order-api.d.ts +5 -5
- package/build/ts/surfaces/point-of-sale/api/pin-pad-api.d.ts +6 -10
- package/build/ts/surfaces/point-of-sale/api/pin-pad-api.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/api/print-api/print-api.d.ts +10 -11
- package/build/ts/surfaces/point-of-sale/api/print-api/print-api.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/api/product-api/product-api.d.ts +5 -2
- package/build/ts/surfaces/point-of-sale/api/product-api/product-api.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/api/product-search-api/product-search-api.d.ts +24 -10
- package/build/ts/surfaces/point-of-sale/api/product-search-api/product-search-api.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/api/scanner-api/scanner-api.d.ts +26 -8
- package/build/ts/surfaces/point-of-sale/api/scanner-api/scanner-api.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/api/session-api/session-api.d.ts +3 -6
- package/build/ts/surfaces/point-of-sale/api/session-api/session-api.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/api/standard/standard-api.d.ts +2 -1
- 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 -0
- 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 -64
- 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 +18 -16
- 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 +5 -12
- 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 +150 -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/components/Choice.d.ts +17 -62
- package/src/surfaces/admin/components/shared.d.ts +102 -3
- package/src/surfaces/admin/components.d.ts +517 -389
- package/src/surfaces/point-of-sale/api/action-api/action-api.ts +3 -5
- package/src/surfaces/point-of-sale/api/camera-api/camera-api.ts +56 -0
- 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/cash-drawer-api/cash-drawer-api.ts +6 -4
- package/src/surfaces/point-of-sale/api/connectivity-api/connectivity-api.ts +6 -4
- package/src/surfaces/point-of-sale/api/customer-api/customer-api.ts +4 -1
- package/src/surfaces/point-of-sale/api/device-api/device-api.ts +4 -4
- package/src/surfaces/point-of-sale/api/draft-order-api/draft-order-api.ts +6 -3
- package/src/surfaces/point-of-sale/api/locale-api/locale-api.ts +2 -3
- package/src/surfaces/point-of-sale/api/navigation-api/navigation-api.ts +17 -9
- package/src/surfaces/point-of-sale/api/order-api/order-api.ts +5 -5
- package/src/surfaces/point-of-sale/api/pin-pad-api.ts +6 -10
- package/src/surfaces/point-of-sale/api/print-api/print-api.ts +10 -11
- package/src/surfaces/point-of-sale/api/product-api/product-api.ts +5 -2
- package/src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts +24 -10
- package/src/surfaces/point-of-sale/api/scanner-api/scanner-api.ts +26 -8
- package/src/surfaces/point-of-sale/api/session-api/session-api.ts +3 -6
- package/src/surfaces/point-of-sale/api/standard/standard-api.ts +3 -1
- 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 +7 -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.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 -64
- 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 +18 -16
- 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 +5 -12
- 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 +150 -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/src/surfaces/point-of-sale/components/EmailField/examples/accessory-slot.jsx +0 -9
|
@@ -1,26 +1,33 @@
|
|
|
1
1
|
import type { ReadonlySignalLike } from '../../../../shared';
|
|
2
2
|
import type { Address, Cart, CartUpdateInput, Customer, CustomSale, SetLineItemDiscountInput, SetLineItemPropertiesInput, SetLineItemSellingPlanInput } from '../../types/cart';
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* The `CartApi` object provides access to cart management functionality and real-time cart state monitoring. Access these properties through `shopify.cart` to interact with the current POS cart.
|
|
5
5
|
*/
|
|
6
6
|
export interface CartApi {
|
|
7
7
|
cart: CartApiContent;
|
|
8
8
|
}
|
|
9
|
+
/**
|
|
10
|
+
* Defines the type of discount applied at the cart level. Specifies whether the discount is percentage-based, fixed amount, or discount code redemption.
|
|
11
|
+
*/
|
|
9
12
|
export type CartDiscountType = 'Percentage' | 'FixedAmount' | 'Code';
|
|
13
|
+
/**
|
|
14
|
+
* Defines the type of discount applied to individual line items. Specifies whether the discount is percentage-based or a fixed amount reduction.
|
|
15
|
+
*/
|
|
10
16
|
export type LineItemDiscountType = 'Percentage' | 'FixedAmount';
|
|
11
17
|
export interface CartApiContent {
|
|
12
18
|
/**
|
|
13
|
-
* Provides read-only access to the current cart state and allows subscribing to cart changes.
|
|
14
|
-
* The `value` property provides the current cart state, and `subscribe` allows listening to changes.
|
|
19
|
+
* Provides read-only access to the current cart state and allows subscribing to cart changes. The `value` property provides the current cart state, and `subscribe` allows listening to changes with improved performance and memory management.
|
|
15
20
|
*/
|
|
16
21
|
current: ReadonlySignalLike<Cart>;
|
|
17
|
-
/**
|
|
22
|
+
/**
|
|
23
|
+
* 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.
|
|
18
24
|
*
|
|
19
25
|
* @param cartState the cart state to set
|
|
20
26
|
* @returns the updated cart
|
|
21
27
|
*/
|
|
22
28
|
bulkCartUpdate(cartState: CartUpdateInput): Promise<Cart>;
|
|
23
|
-
/**
|
|
29
|
+
/**
|
|
30
|
+
* 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.
|
|
24
31
|
*
|
|
25
32
|
* @param type the type of discount applied (example: 'Percentage')
|
|
26
33
|
* @param title the title attributed with the discount
|
|
@@ -28,93 +35,91 @@ export interface CartApiContent {
|
|
|
28
35
|
*/
|
|
29
36
|
applyCartDiscount(type: CartDiscountType, title: string, amount?: string): Promise<void>;
|
|
30
37
|
/**
|
|
31
|
-
*
|
|
38
|
+
* 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.
|
|
32
39
|
*
|
|
33
40
|
* @param code the code for the discount to add to the cart
|
|
34
41
|
*/
|
|
35
42
|
addCartCodeDiscount(code: string): Promise<void>;
|
|
36
43
|
/**
|
|
37
|
-
* Remove the cart discount
|
|
44
|
+
* Remove the current cart-level discount. This only affects cart-level discounts and does not impact line item discounts or automatic discount eligibility.
|
|
38
45
|
*/
|
|
39
46
|
removeCartDiscount(): Promise<void>;
|
|
40
47
|
/**
|
|
41
|
-
* Remove all cart and line
|
|
48
|
+
* 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.
|
|
42
49
|
*
|
|
43
50
|
* @param disableAutomaticDiscounts Whether or not automatic discounts should be enabled after removing the discounts.
|
|
44
51
|
*/
|
|
45
52
|
removeAllDiscounts(disableAutomaticDiscounts: boolean): Promise<void>;
|
|
46
53
|
/**
|
|
47
|
-
*
|
|
54
|
+
* 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.
|
|
48
55
|
*/
|
|
49
56
|
clearCart(): Promise<void>;
|
|
50
57
|
/**
|
|
51
|
-
*
|
|
58
|
+
* 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.
|
|
52
59
|
*
|
|
53
60
|
* @param customer the customer object to add to the cart
|
|
54
61
|
*/
|
|
55
62
|
setCustomer(customer: Customer): Promise<void>;
|
|
56
63
|
/**
|
|
57
|
-
* Remove the
|
|
64
|
+
* 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.
|
|
58
65
|
*/
|
|
59
66
|
removeCustomer(): Promise<void>;
|
|
60
67
|
/**
|
|
61
|
-
* Add a custom sale to the cart
|
|
68
|
+
* 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.
|
|
62
69
|
*
|
|
63
70
|
* @param customSale the custom sale object to add to the cart
|
|
64
|
-
* @returns {string} the
|
|
71
|
+
* @returns {string} the UUID of the line item added
|
|
65
72
|
*/
|
|
66
73
|
addCustomSale(customSale: CustomSale): Promise<string>;
|
|
67
74
|
/**
|
|
68
|
-
* Add a
|
|
69
|
-
* Returns the uuid of the line item added, or the empty string if the user dismissed an oversell guard modal without adding anything.
|
|
70
|
-
* Throws if POS fails to add the line item. Throws if POS fails to add the line item.
|
|
75
|
+
* 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.
|
|
71
76
|
*
|
|
72
77
|
* @param variantId the product variant's numeric ID to add to the cart
|
|
73
78
|
* @param quantity the number of this variant to add to the cart
|
|
74
|
-
* @returns {string} the
|
|
79
|
+
* @returns {string} the UUID of the line item added, or the empty string if the user dismissed an oversell guard modal
|
|
75
80
|
* @throws {Error} if POS fails to add the line item
|
|
76
81
|
*/
|
|
77
82
|
addLineItem(variantId: number, quantity: number): Promise<string>;
|
|
78
83
|
/**
|
|
79
|
-
* Remove the line item
|
|
84
|
+
* 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.
|
|
80
85
|
*
|
|
81
86
|
* @param uuid the uuid of the line item that should be removed
|
|
82
87
|
*/
|
|
83
88
|
removeLineItem(uuid: string): Promise<void>;
|
|
84
89
|
/**
|
|
85
|
-
*
|
|
90
|
+
* 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.
|
|
86
91
|
*
|
|
87
92
|
* @param properties the custom key to value object to attribute to the cart
|
|
88
93
|
*/
|
|
89
94
|
addCartProperties(properties: Record<string, string>): Promise<void>;
|
|
90
95
|
/**
|
|
91
|
-
*
|
|
96
|
+
* 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.
|
|
92
97
|
*
|
|
93
98
|
* @param keys the collection of keys to be removed from the cart properties
|
|
94
99
|
*/
|
|
95
100
|
removeCartProperties(keys: string[]): Promise<void>;
|
|
96
101
|
/**
|
|
97
|
-
*
|
|
102
|
+
* 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.
|
|
98
103
|
*
|
|
99
104
|
* @param uuid the uuid of the line item to which the properties should be stringd
|
|
100
105
|
* @param properties the custom key to value object to attribute to the line item
|
|
101
106
|
*/
|
|
102
107
|
addLineItemProperties(uuid: string, properties: Record<string, string>): Promise<void>;
|
|
103
108
|
/**
|
|
104
|
-
*
|
|
109
|
+
* 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.
|
|
105
110
|
*
|
|
106
111
|
* @param lineItemProperties the collection of custom line item properties to apply to their respective line items.
|
|
107
112
|
*/
|
|
108
113
|
bulkAddLineItemProperties(lineItemProperties: SetLineItemPropertiesInput[]): Promise<void>;
|
|
109
114
|
/**
|
|
110
|
-
*
|
|
115
|
+
* 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.
|
|
111
116
|
*
|
|
112
117
|
* @param uuid the uuid of the line item to which the properties should be removed
|
|
113
118
|
* @param keys the collection of keys to be removed from the line item properties
|
|
114
119
|
*/
|
|
115
120
|
removeLineItemProperties(uuid: string, keys: string[]): Promise<void>;
|
|
116
121
|
/**
|
|
117
|
-
*
|
|
122
|
+
* 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.
|
|
118
123
|
*
|
|
119
124
|
* @param uuid the uuid of the line item that should receive a discount
|
|
120
125
|
* @param type the type of discount applied (example: 'Percentage')
|
|
@@ -123,57 +128,57 @@ export interface CartApiContent {
|
|
|
123
128
|
*/
|
|
124
129
|
setLineItemDiscount(uuid: string, type: LineItemDiscountType, title: string, amount: string): Promise<void>;
|
|
125
130
|
/**
|
|
126
|
-
*
|
|
131
|
+
* 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.
|
|
127
132
|
*
|
|
128
133
|
* @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.
|
|
129
134
|
*/
|
|
130
135
|
bulkSetLineItemDiscounts(lineItemDiscounts: SetLineItemDiscountInput[]): Promise<void>;
|
|
131
136
|
/**
|
|
132
|
-
*
|
|
137
|
+
* 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.
|
|
133
138
|
*
|
|
134
139
|
* @param staffId the ID of the staff. Providing undefined will clear the attributed staff from all line items.
|
|
135
140
|
*/
|
|
136
141
|
setAttributedStaff(staffId: number | undefined): Promise<void>;
|
|
137
142
|
/**
|
|
138
|
-
*
|
|
143
|
+
* 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.
|
|
139
144
|
*
|
|
140
145
|
* @param staffId the ID of the staff. Providing undefined will clear the attributed staff on the line item.
|
|
141
146
|
* @param lineItemUuid the UUID of the line item.
|
|
142
147
|
*/
|
|
143
148
|
setAttributedStaffToLineItem(staffId: number | undefined, lineItemUuid: string): Promise<void>;
|
|
144
149
|
/**
|
|
145
|
-
* Remove all discounts from a line item
|
|
150
|
+
* 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.
|
|
146
151
|
*
|
|
147
152
|
* @param uuid the uuid of the line item whose discounts should be removed
|
|
148
153
|
*/
|
|
149
154
|
removeLineItemDiscount(uuid: string): Promise<void>;
|
|
150
155
|
/**
|
|
151
|
-
* Add
|
|
156
|
+
* 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.
|
|
152
157
|
*
|
|
153
158
|
* @param address the address object to add to the customer in cart
|
|
154
159
|
*/
|
|
155
160
|
addAddress(address: Address): Promise<void>;
|
|
156
161
|
/**
|
|
157
|
-
* Delete an address from the customer
|
|
162
|
+
* 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`.
|
|
158
163
|
*
|
|
159
164
|
* @param addressId the address ID to delete
|
|
160
165
|
*/
|
|
161
166
|
deleteAddress(addressId: number): Promise<void>;
|
|
162
167
|
/**
|
|
163
|
-
*
|
|
168
|
+
* 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.
|
|
164
169
|
*
|
|
165
170
|
* @param addressId the address ID to set as the default address
|
|
166
171
|
*/
|
|
167
172
|
updateDefaultAddress(addressId: number): Promise<void>;
|
|
168
173
|
/**
|
|
169
|
-
* Add a selling plan to a line item in the cart.
|
|
174
|
+
* Add a selling plan to a line item in the cart using the line item `UUID`, selling plan `ID`, and selling plan name. Optionally provide delivery interval and interval count for improved performance, otherwise POS will fetch them after syncing the cart.
|
|
170
175
|
*
|
|
171
176
|
* @param uuid the uuid of the line item that should receive the selling plan
|
|
172
177
|
* @param sellingPlanId the ID of the selling plan to add to the line item
|
|
173
178
|
*/
|
|
174
179
|
addLineItemSellingPlan(input: SetLineItemSellingPlanInput): Promise<void>;
|
|
175
180
|
/**
|
|
176
|
-
* Remove the selling plan from a line item in the cart.
|
|
181
|
+
* Remove the selling plan from a line item in the cart using the line item `UUID`. This will clear any subscription or recurring purchase configuration from the line item.
|
|
177
182
|
*
|
|
178
183
|
* @param uuid the uuid of the line item whose selling plan should be removed
|
|
179
184
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cart-api.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/point-of-sale/api/cart-api/cart-api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,oBAAoB,CAAC;AAC3D,OAAO,KAAK,EACV,OAAO,EACP,IAAI,EACJ,eAAe,EACf,QAAQ,EACR,UAAU,EACV,wBAAwB,EACxB,0BAA0B,EAC1B,2BAA2B,EAC5B,MAAM,kBAAkB,CAAC;AAE1B;;GAEG;AACH,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,cAAc,CAAC;CACtB;AAED,MAAM,MAAM,gBAAgB,GAAG,YAAY,GAAG,aAAa,GAAG,MAAM,CAAC;AAErE,MAAM,MAAM,oBAAoB,GAAG,YAAY,GAAG,aAAa,CAAC;AAEhE,MAAM,WAAW,cAAc;IAC7B
|
|
1
|
+
{"version":3,"file":"cart-api.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/point-of-sale/api/cart-api/cart-api.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { LineItem } from '../../types/cart';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* The `CartLineItemApi` object provides access to the current line item. Access this property through `api.cartLineItem` to interact with the current line item context.
|
|
4
4
|
*/
|
|
5
5
|
export interface CartLineItemApi {
|
|
6
6
|
/**
|
|
7
|
-
* The selected line item in the merchant
|
|
7
|
+
* 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.
|
|
8
8
|
*/
|
|
9
9
|
cartLineItem: LineItem;
|
|
10
10
|
}
|
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The
|
|
2
|
+
* The `CashDrawerApi` object provides methods for controlling cash drawer hardware. Access these methods through `shopify.cashDrawer` to trigger cash drawer operations.
|
|
3
3
|
*/
|
|
4
4
|
export interface CashDrawerApiContent {
|
|
5
5
|
/**
|
|
6
|
-
* Opens the connected cash drawer.
|
|
6
|
+
* Opens the connected cash drawer device. The drawer will automatically open if a compatible cash drawer is connected to the POS device. Use for manual cash drawer operations, implementing custom payment workflows, or providing explicit cash drawer access in register management interfaces.
|
|
7
7
|
*
|
|
8
8
|
* @returns Void
|
|
9
|
-
*
|
|
10
9
|
*/
|
|
11
10
|
open(): Promise<void>;
|
|
12
11
|
}
|
|
13
12
|
/**
|
|
14
|
-
*
|
|
13
|
+
* The `CashDrawerApi` object provides methods for controlling cash drawer hardware. Access these methods through `shopify.cashDrawer` to trigger cash drawer operations.
|
|
15
14
|
*/
|
|
16
15
|
export interface CashDrawerApi {
|
|
16
|
+
/**
|
|
17
|
+
* The `CashDrawerApi` object provides methods for controlling cash drawer hardware. Access these methods through `shopify.cashDrawer` to trigger cash drawer operations.
|
|
18
|
+
*/
|
|
17
19
|
cashDrawer: CashDrawerApiContent;
|
|
18
20
|
}
|
|
19
21
|
//# sourceMappingURL=cash-drawer-api.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cash-drawer-api.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/point-of-sale/api/cash-drawer-api/cash-drawer-api.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC
|
|
1
|
+
{"version":3,"file":"cash-drawer-api.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/point-of-sale/api/cash-drawer-api/cash-drawer-api.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC;;;;OAIG;IACH,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,UAAU,EAAE,oBAAoB,CAAC;CAClC"}
|
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
import type { ReadonlySignalLike } from '../../../../shared';
|
|
2
2
|
export type ConnectivityStateSeverity = 'Connected' | 'Disconnected';
|
|
3
|
+
/**
|
|
4
|
+
* Represents the current Internet connectivity status of the device. Indicates whether the device is connected or disconnected from the Internet.
|
|
5
|
+
*/
|
|
3
6
|
export interface ConnectivityState {
|
|
4
7
|
/**
|
|
5
|
-
*
|
|
8
|
+
* The Internet connection status of the POS device.
|
|
6
9
|
*/
|
|
7
10
|
internetConnected: ConnectivityStateSeverity;
|
|
8
11
|
}
|
|
9
12
|
export interface ConnectivityApiContent {
|
|
10
13
|
/**
|
|
11
|
-
* Provides read-only access to the current connectivity state and allows subscribing to connectivity changes.
|
|
12
|
-
* The `value` property provides the current connectivity state, and `subscribe` allows listening to changes.
|
|
14
|
+
* Provides read-only access to the current connectivity state and allows subscribing to connectivity changes. Use for implementing connectivity-aware functionality and reactive connectivity handling.
|
|
13
15
|
*/
|
|
14
16
|
current: ReadonlySignalLike<ConnectivityState>;
|
|
15
17
|
}
|
|
16
18
|
/**
|
|
17
|
-
*
|
|
19
|
+
* The `ConnectivityApi` object provides access to current connectivity information and change notifications. Access these properties through `shopify.connectivity` to monitor network status.
|
|
18
20
|
*/
|
|
19
21
|
export interface ConnectivityApi {
|
|
20
22
|
connectivity: ConnectivityApiContent;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connectivity-api.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/point-of-sale/api/connectivity-api/connectivity-api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,oBAAoB,CAAC;AAE3D,MAAM,MAAM,yBAAyB,GAAG,WAAW,GAAG,cAAc,CAAC;AAErE,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,iBAAiB,EAAE,yBAAyB,CAAC;CAC9C;AAED,MAAM,WAAW,sBAAsB;IACrC
|
|
1
|
+
{"version":3,"file":"connectivity-api.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/point-of-sale/api/connectivity-api/connectivity-api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,oBAAoB,CAAC;AAE3D,MAAM,MAAM,yBAAyB,GAAG,WAAW,GAAG,cAAc,CAAC;AAErE;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,iBAAiB,EAAE,yBAAyB,CAAC;CAC9C;AAED,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,OAAO,EAAE,kBAAkB,CAAC,iBAAiB,CAAC,CAAC;CAChD;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,YAAY,EAAE,sBAAsB,CAAC;CACtC"}
|
|
@@ -1,9 +1,12 @@
|
|
|
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
|
export interface CustomerApiContent {
|
|
5
8
|
/**
|
|
6
|
-
* The unique identifier for the customer
|
|
9
|
+
* The unique identifier for the customer. Use for customer lookups, applying customer-specific pricing, enabling personalized features, and integrating with external systems.
|
|
7
10
|
*/
|
|
8
11
|
id: number;
|
|
9
12
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customer-api.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/point-of-sale/api/customer-api/customer-api.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,kBAAkB,CAAC;CAC9B;AAED,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;CACZ"}
|
|
1
|
+
{"version":3,"file":"customer-api.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/point-of-sale/api/customer-api/customer-api.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,kBAAkB,CAAC;CAC9B;AAED,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;CACZ"}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
export interface DeviceApiContent {
|
|
2
2
|
/**
|
|
3
|
-
* The name of the device
|
|
3
|
+
* The name of the device as configured by the merchant or system. Use for displaying device information in interfaces, logging, or support contexts where device identification is helpful.
|
|
4
4
|
*/
|
|
5
5
|
name: string;
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* Retrieves the unique string identifier for the device. Returns a promise that resolves to the device ID. Use for device-specific data storage, analytics tracking, or implementing device-based permissions and configurations.
|
|
8
8
|
*/
|
|
9
9
|
getDeviceId(): Promise<string>;
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
11
|
+
* Determines whether the device is a tablet form factor. Returns a promise that resolves to `true` for tablets, `false` for other device types. Use for implementing responsive design, optimizing touch targets, or providing device-appropriate user experiences.
|
|
12
12
|
*/
|
|
13
13
|
isTablet(): Promise<boolean>;
|
|
14
14
|
}
|
|
15
15
|
/**
|
|
16
|
-
*
|
|
16
|
+
* The `DeviceApi` object provides access to device information and capabilities. Access these properties and methods through `shopify.device` to retrieve device details and check device characteristics.
|
|
17
17
|
*/
|
|
18
18
|
export interface DeviceApi {
|
|
19
19
|
device: DeviceApiContent;
|
|
@@ -1,17 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `DraftOrderApi` object provides access to draft order data in draft order-specific extension contexts. Access this property through `shopify.draftOrder` to retrieve information about the draft order currently being viewed or interacted with in the POS interface.
|
|
3
|
+
*/
|
|
1
4
|
export interface DraftOrderApi {
|
|
2
5
|
draftOrder: DraftOrderApiContent;
|
|
3
6
|
}
|
|
4
7
|
export interface DraftOrderApiContent {
|
|
5
8
|
/**
|
|
6
|
-
* The unique identifier for the draft order
|
|
9
|
+
* The unique identifier for the draft order. Use for draft order lookups, implementing order-specific functionality, and integrating with external systems.
|
|
7
10
|
*/
|
|
8
11
|
id: number;
|
|
9
12
|
/**
|
|
10
|
-
* The name of the draft order
|
|
13
|
+
* The name of the draft order as configured by the merchant. Use for draft order identification, displays, and customer-facing interfaces.
|
|
11
14
|
*/
|
|
12
15
|
name: string;
|
|
13
16
|
/**
|
|
14
|
-
* The unique identifier of the customer associated with the draft order
|
|
17
|
+
* The unique identifier of the customer associated with the draft order. Returns `undefined` if no customer is associated. Use for customer-specific functionality and personalized experiences.
|
|
15
18
|
*/
|
|
16
19
|
customerId?: number;
|
|
17
20
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"draft-order-api.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/point-of-sale/api/draft-order-api/draft-order-api.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa;IAC5B,UAAU,EAAE,oBAAoB,CAAC;CAClC;AAED,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB"}
|
|
1
|
+
{"version":3,"file":"draft-order-api.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/point-of-sale/api/draft-order-api/draft-order-api.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,UAAU,EAAE,oBAAoB,CAAC;CAClC;AAED,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB"}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import type { ReadonlySignalLike } from '../../../../shared';
|
|
2
2
|
export interface LocaleApiContent {
|
|
3
3
|
/**
|
|
4
|
-
* Provides read-only access to the current IETF-formatted locale and allows subscribing to locale changes.
|
|
5
|
-
* The `value` property provides the current locale, and `subscribe` allows listening to changes.
|
|
4
|
+
* Provides read-only access to the current IETF-formatted locale and allows subscribing to locale changes. The `value` property provides the current locale, and `subscribe` allows listening to changes. Use for internationalization, locale-specific formatting, and reactive updates when merchants change language settings.
|
|
6
5
|
*/
|
|
7
6
|
current: ReadonlySignalLike<string>;
|
|
8
7
|
}
|
|
9
8
|
/**
|
|
10
|
-
*
|
|
9
|
+
* The `LocaleApi` object provides access to current locale information and change notifications. Access these properties through `shopify.locale` to retrieve and monitor locale data.
|
|
11
10
|
*/
|
|
12
11
|
export interface LocaleApi {
|
|
13
12
|
locale: LocaleApiContent;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"locale-api.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/point-of-sale/api/locale-api/locale-api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,oBAAoB,CAAC;AAE3D,MAAM,WAAW,gBAAgB;IAC/B
|
|
1
|
+
{"version":3,"file":"locale-api.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/point-of-sale/api/locale-api/locale-api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,oBAAoB,CAAC;AAE3D,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,OAAO,EAAE,kBAAkB,CAAC,MAAM,CAAC,CAAC;CACrC;AAED;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,MAAM,EAAE,gBAAgB,CAAC;CAC1B"}
|
|
@@ -1,41 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Specifies configuration options for navigation operations. Allows passing state data that persists across navigation transitions.
|
|
3
|
+
*/
|
|
1
4
|
export interface NavigationNavigateOptions {
|
|
2
5
|
/**
|
|
3
|
-
* Developer-defined information to be stored in the associated NavigationHistoryEntry once the navigation is complete, retrievable
|
|
6
|
+
* Developer-defined information to be stored in the associated `NavigationHistoryEntry` once the navigation is complete, retrievable using `getState()`. Use to pass data between navigation states or implement stateful navigation workflows.
|
|
4
7
|
*/
|
|
5
8
|
state?: unknown;
|
|
6
9
|
}
|
|
7
10
|
/**
|
|
8
|
-
*
|
|
11
|
+
* Represents a single entry in the navigation history stack. Contains the URL and unique identifier for tracking navigation state and implementing history-based navigation.
|
|
9
12
|
*/
|
|
10
13
|
export interface NavigationHistoryEntry {
|
|
11
|
-
/**
|
|
14
|
+
/**
|
|
15
|
+
* A unique, UA-generated value that represents the history entry's slot in the entries list rather than the entry itself. Use for tracking navigation history or implementing navigation-based logic.
|
|
16
|
+
*/
|
|
12
17
|
key: string;
|
|
13
18
|
/**
|
|
14
|
-
*
|
|
19
|
+
* The URL of this history entry. Returns `null` if no URL is associated with the entry. Use for URL-based navigation logic, deep-linking, or displaying current location information.
|
|
15
20
|
*/
|
|
16
21
|
url: string | null;
|
|
17
22
|
/**
|
|
18
|
-
* Returns a clone of the available state associated with this history entry.
|
|
23
|
+
* Returns a clone of the available state associated with this history entry. Use to retrieve navigation state data that was passed during navigation or to implement state-based navigation logic.
|
|
19
24
|
*/
|
|
20
25
|
getState(): unknown;
|
|
21
26
|
}
|
|
22
27
|
export interface Navigation {
|
|
23
28
|
/**
|
|
24
|
-
*
|
|
29
|
+
* Navigates to a specific URL, updating any provided state in the history entries list. Returns a promise that resolves when navigation is complete. Use for programmatic navigation between screens, implementing custom navigation controls, or deep-linking to specific modal states.
|
|
25
30
|
*/
|
|
26
31
|
navigate: (url: string, options?: NavigationNavigateOptions) => Promise<void>;
|
|
27
32
|
/**
|
|
28
|
-
*
|
|
33
|
+
* Returns a `NavigationHistoryEntry` object representing the location the user is currently navigated to. Use to access current URL, navigation state, or implement navigation-aware functionality based on the current location.
|
|
29
34
|
*/
|
|
30
35
|
currentEntry: NavigationHistoryEntry;
|
|
31
36
|
/**
|
|
32
|
-
*
|
|
37
|
+
* Navigates to the previous entry in the history list. Use for implementing back buttons, breadcrumb navigation, or allowing users to return to previous screens in multi-step workflows.
|
|
33
38
|
*/
|
|
34
39
|
back(): void;
|
|
35
40
|
}
|
|
41
|
+
/**
|
|
42
|
+
* The global `window` object provides control over the extension modal lifecycle. Access these properties and methods directly through the global `window` object to manage the modal interface programmatically.
|
|
43
|
+
*/
|
|
36
44
|
export interface Window {
|
|
37
45
|
/**
|
|
38
|
-
*
|
|
46
|
+
* Closes the extension screen and dismisses the modal interface. Use to programmatically close the modal after completing a workflow, canceling an operation, or when user action is no longer required. This provides the same behavior as the user dismissing the modal through the UI.
|
|
39
47
|
*/
|
|
40
48
|
close(): void;
|
|
41
49
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navigation-api.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/point-of-sale/api/navigation-api/navigation-api.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC
|
|
1
|
+
{"version":3,"file":"navigation-api.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/point-of-sale/api/navigation-api/navigation-api.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB;;OAEG;IACH,QAAQ,IAAI,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,UAAU;IACzB;;OAEG;IACH,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,yBAAyB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9E;;OAEG;IACH,YAAY,EAAE,sBAAsB,CAAC;IACrC;;OAEG;IACH,IAAI,IAAI,IAAI,CAAC;CACd;AAED;;GAEG;AACH,MAAM,WAAW,MAAM;IACrB;;OAEG;IACH,KAAK,IAAI,IAAI,CAAC;CACf"}
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* The `OrderApi` object provides access to order data in order-specific extension contexts. Access this property through `shopify.order` to retrieve information about the order currently being viewed or interacted with in the POS interface.
|
|
3
3
|
*/
|
|
4
4
|
export interface OrderApi {
|
|
5
5
|
order: OrderApiContent;
|
|
6
6
|
}
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* The `OrderApi` object provides access to order data. Access this property through `shopify.order` to interact with the current order context.
|
|
9
9
|
*/
|
|
10
10
|
export interface OrderApiContent {
|
|
11
11
|
/**
|
|
12
|
-
* The unique identifier for the order
|
|
12
|
+
* The unique identifier for the order. Use for order lookups, implementing order-specific functionality, and integrating with external systems.
|
|
13
13
|
*/
|
|
14
14
|
id: number;
|
|
15
15
|
/**
|
|
16
|
-
* The name of the order
|
|
16
|
+
* The name of the order as configured by the merchant. Use for order identification, displays, and customer-facing interfaces.
|
|
17
17
|
*/
|
|
18
18
|
name: string;
|
|
19
19
|
/**
|
|
20
|
-
* The unique identifier of the customer associated with the order
|
|
20
|
+
* The unique identifier of the customer associated with the order. Returns `undefined` if no customer is associated. Use for customer-specific functionality and personalized experiences.
|
|
21
21
|
*/
|
|
22
22
|
customerId?: number;
|
|
23
23
|
}
|
|
@@ -1,22 +1,18 @@
|
|
|
1
1
|
import { PinPadOptions, PinValidationResult } from '../types/pin-pad';
|
|
2
2
|
export interface PinPadApiContent {
|
|
3
|
-
/**
|
|
3
|
+
/**
|
|
4
|
+
* Shows a PIN pad to the user in a modal dialog. The `onSubmit` function is called when the PIN is submitted and should validate the PIN, returning `'accept'` or `'reject'`.
|
|
4
5
|
*
|
|
5
|
-
*
|
|
6
|
-
* should validate the PIN and accept or reject it.
|
|
6
|
+
* • **When accepted**: Modal dismisses and triggers the `onDismissed` callback—perform any post-validation navigation in this callback rather than in `onSubmit`.
|
|
7
7
|
*
|
|
8
|
-
*
|
|
9
|
-
* (provided via `options`) will be called. It is recommended that any post-validation
|
|
10
|
-
* navigation is performed in this callback rather than in `onSubmit`.
|
|
11
|
-
*
|
|
12
|
-
* If the PIN is rejected, the optional `errorMessage` will be displayed to the user and the modal
|
|
13
|
-
* will not be dismissed.
|
|
8
|
+
* • **When rejected**: Displays the optional `errorMessage` and keeps the modal open.
|
|
14
9
|
*
|
|
10
|
+
* Use for implementing secure authentication workflows, access control, or PIN-based verification systems.
|
|
15
11
|
*/
|
|
16
12
|
showPinPad(onSubmit: (pin: number[]) => Promise<PinValidationResult> | PinValidationResult, options?: PinPadOptions): void;
|
|
17
13
|
}
|
|
18
14
|
/**
|
|
19
|
-
*
|
|
15
|
+
* The `PinPadApi` object provides methods for displaying secure PIN entry interfaces. Access these methods through `shopify.pinPad` to show PIN pad modals and handle PIN validation.
|
|
20
16
|
*/
|
|
21
17
|
export interface PinPadApi {
|
|
22
18
|
pinPad: PinPadApiContent;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pin-pad-api.d.ts","sourceRoot":"","sources":["../../../../../src/surfaces/point-of-sale/api/pin-pad-api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,aAAa,EAAE,mBAAmB,EAAC,MAAM,kBAAkB,CAAC;AAEpE,MAAM,WAAW,gBAAgB;IAC/B
|
|
1
|
+
{"version":3,"file":"pin-pad-api.d.ts","sourceRoot":"","sources":["../../../../../src/surfaces/point-of-sale/api/pin-pad-api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,aAAa,EAAE,mBAAmB,EAAC,MAAM,kBAAkB,CAAC;AAEpE,MAAM,WAAW,gBAAgB;IAC/B;;;;;;;;OAQG;IACH,UAAU,CACR,QAAQ,EAAE,CACR,GAAG,EAAE,MAAM,EAAE,KACV,OAAO,CAAC,mBAAmB,CAAC,GAAG,mBAAmB,EACvD,OAAO,CAAC,EAAE,aAAa,GACtB,IAAI,CAAC;CACT;AAED;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,MAAM,EAAE,gBAAgB,CAAC;CAC1B"}
|
|
@@ -1,19 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* The `PrintApi` object provides methods for triggering document printing. Access these methods through `shopify.print` to initiate print operations with various document types.
|
|
3
3
|
*/
|
|
4
4
|
export interface PrintApiContent {
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* Triggers a print dialog for the specified document source. The `print()` method accepts either:
|
|
7
7
|
*
|
|
8
|
-
*
|
|
9
|
-
* - A relative path that will be appended to your app's [application_url](/docs/apps/build/cli-for-apps/app-configuration#application_url)
|
|
10
|
-
* - A full URL to your app's backend that will be used to return the document to print
|
|
8
|
+
* • A relative path that will be appended to your app's [`application_url`](/docs/apps/build/cli-for-apps/app-configuration)
|
|
11
9
|
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* - Image files (PNG, JPEG, etc.)
|
|
16
|
-
* - PDF files (Note: On Android devices, PDFs will be downloaded and must be printed using an external application)
|
|
10
|
+
* • A full URL to your app's backend that will be used to return the document to print
|
|
11
|
+
*
|
|
12
|
+
* Returns a promise that resolves when content is ready and the native print dialog appears. Use for printing custom documents, receipts, labels, or reports.
|
|
17
13
|
*
|
|
18
14
|
* @param src the source URL of the content to print.
|
|
19
15
|
* @returns Promise<void> that resolves when content is ready and native print dialog appears.
|
|
@@ -21,9 +17,12 @@ export interface PrintApiContent {
|
|
|
21
17
|
print(src: string): Promise<void>;
|
|
22
18
|
}
|
|
23
19
|
/**
|
|
24
|
-
*
|
|
20
|
+
* The `PrintApi` object provides methods for triggering document printing. Access these methods through `shopify.print` to initiate print operations with various document types.
|
|
25
21
|
*/
|
|
26
22
|
export interface PrintApi {
|
|
23
|
+
/**
|
|
24
|
+
* The `PrintApi` object provides methods for triggering document printing. Access these methods through `shopify.print` to initiate print operations with various document types.
|
|
25
|
+
*/
|
|
27
26
|
print: PrintApiContent;
|
|
28
27
|
}
|
|
29
28
|
//# sourceMappingURL=print-api.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"print-api.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/point-of-sale/api/print-api/print-api.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B
|
|
1
|
+
{"version":3,"file":"print-api.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/point-of-sale/api/print-api/print-api.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B;;;;;;;;;;;OAWG;IACH,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACnC;AAED;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB;;OAEG;IACH,KAAK,EAAE,eAAe,CAAC;CACxB"}
|