@shopify/ui-extensions 2022.10.5 → 2023.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/build/cjs/surfaces/admin/components/AdminAction/AdminAction.js +12 -0
- package/build/cjs/surfaces/admin/components/AdminBlock/AdminBlock.js +9 -0
- package/build/cjs/surfaces/admin/components/BlockStack/BlockStack.js +9 -0
- package/build/cjs/surfaces/admin/components/Box/Box.js +9 -0
- package/build/cjs/surfaces/admin/components/Button/Button.js +9 -0
- package/build/cjs/surfaces/admin/components/Checkbox/Checkbox.js +9 -0
- package/build/cjs/surfaces/admin/components/CustomerSegmentationTemplate/CustomerSegmentationTemplate.js +12 -0
- package/build/cjs/surfaces/admin/components/Divider/Divider.js +9 -0
- package/build/cjs/surfaces/admin/components/EmailField/EmailField.js +9 -0
- package/build/cjs/surfaces/admin/components/Form/Form.js +9 -0
- package/build/cjs/surfaces/admin/components/Heading/Heading.js +9 -0
- package/build/cjs/surfaces/admin/components/HeadingGroup/HeadingGroup.js +9 -0
- package/build/cjs/surfaces/admin/components/Icon/Icon.js +9 -0
- package/build/cjs/surfaces/admin/components/Image/Image.js +9 -0
- package/build/cjs/surfaces/admin/components/InlineStack/InlineStack.js +9 -0
- package/build/cjs/surfaces/admin/components/Link/Link.js +9 -0
- package/build/cjs/surfaces/admin/components/NumberField/NumberField.js +9 -0
- package/build/cjs/surfaces/admin/components/PasswordField/PasswordField.js +9 -0
- package/build/cjs/surfaces/admin/components/Select/Select.js +9 -0
- package/build/cjs/surfaces/admin/components/Text/Text.js +9 -0
- package/build/cjs/surfaces/admin/components/TextArea/TextArea.js +9 -0
- package/build/cjs/surfaces/admin/components/TextField/TextField.js +9 -0
- package/build/cjs/surfaces/admin/components/URLField/URLField.js +9 -0
- package/build/cjs/surfaces/admin/extension.js +11 -0
- package/build/cjs/surfaces/admin.js +56 -0
- package/build/cjs/surfaces/checkout/components/DateField/DateField.js +13 -0
- package/build/cjs/surfaces/checkout/components/DatePicker/DatePicker.js +22 -0
- package/build/cjs/surfaces/checkout/components/Disclosure/Disclosure.js +20 -0
- package/build/cjs/surfaces/checkout/components/Modal/Modal.js +17 -0
- package/build/cjs/surfaces/checkout/components/Popover/Popover.js +17 -0
- package/build/cjs/surfaces/checkout/components/View/View.js +0 -3
- package/build/cjs/surfaces/checkout/extension.js +35 -2
- package/build/cjs/surfaces/checkout/style/memoize.js +2 -0
- package/build/cjs/surfaces/checkout/style/style.js +0 -1
- package/build/cjs/surfaces/checkout.js +11 -0
- package/build/cjs/utilities/registration.js +26 -2
- package/build/esm/surfaces/admin/components/AdminAction/AdminAction.mjs +8 -0
- package/build/esm/surfaces/admin/components/AdminBlock/AdminBlock.mjs +5 -0
- package/build/esm/surfaces/admin/components/BlockStack/BlockStack.mjs +5 -0
- package/build/esm/surfaces/admin/components/Box/Box.mjs +5 -0
- package/build/esm/surfaces/admin/components/Button/Button.mjs +5 -0
- package/build/esm/surfaces/admin/components/Checkbox/Checkbox.mjs +5 -0
- package/build/esm/surfaces/admin/components/CustomerSegmentationTemplate/CustomerSegmentationTemplate.mjs +8 -0
- package/build/esm/surfaces/admin/components/Divider/Divider.mjs +5 -0
- package/build/esm/surfaces/admin/components/EmailField/EmailField.mjs +5 -0
- package/build/esm/surfaces/admin/components/Form/Form.mjs +5 -0
- package/build/esm/surfaces/admin/components/Heading/Heading.mjs +5 -0
- package/build/esm/surfaces/admin/components/HeadingGroup/HeadingGroup.mjs +5 -0
- package/build/esm/surfaces/admin/components/Icon/Icon.mjs +5 -0
- package/build/esm/surfaces/admin/components/Image/Image.mjs +5 -0
- package/build/esm/surfaces/admin/components/InlineStack/InlineStack.mjs +5 -0
- package/build/esm/surfaces/admin/components/Link/Link.mjs +5 -0
- package/build/esm/surfaces/admin/components/NumberField/NumberField.mjs +5 -0
- package/build/esm/surfaces/admin/components/PasswordField/PasswordField.mjs +5 -0
- package/build/esm/surfaces/admin/components/Select/Select.mjs +5 -0
- package/build/esm/surfaces/admin/components/Text/Text.mjs +5 -0
- package/build/esm/surfaces/admin/components/TextArea/TextArea.mjs +5 -0
- package/build/esm/surfaces/admin/components/TextField/TextField.mjs +5 -0
- package/build/esm/surfaces/admin/components/URLField/URLField.mjs +5 -0
- package/build/esm/surfaces/admin/extension.mjs +6 -0
- package/build/esm/surfaces/admin.mjs +24 -0
- package/build/esm/surfaces/checkout/components/DateField/DateField.mjs +9 -0
- package/build/esm/surfaces/checkout/components/DatePicker/DatePicker.mjs +18 -0
- package/build/esm/surfaces/checkout/components/Disclosure/Disclosure.mjs +16 -0
- package/build/esm/surfaces/checkout/components/Modal/Modal.mjs +13 -0
- package/build/esm/surfaces/checkout/components/Popover/Popover.mjs +13 -0
- package/build/esm/surfaces/checkout/components/View/View.mjs +0 -3
- package/build/esm/surfaces/checkout/extension.mjs +35 -3
- package/build/esm/surfaces/checkout/style/memoize.mjs +2 -0
- package/build/esm/surfaces/checkout/style/style.mjs +0 -1
- package/build/esm/surfaces/checkout.mjs +6 -1
- package/build/esm/utilities/registration.mjs +26 -2
- package/build/esnext/surfaces/admin/components/AdminAction/AdminAction.esnext +8 -0
- package/build/esnext/surfaces/admin/components/AdminBlock/AdminBlock.esnext +5 -0
- package/build/esnext/surfaces/admin/components/BlockStack/BlockStack.esnext +5 -0
- package/build/esnext/surfaces/admin/components/Box/Box.esnext +5 -0
- package/build/esnext/surfaces/admin/components/Button/Button.esnext +5 -0
- package/build/esnext/surfaces/admin/components/Checkbox/Checkbox.esnext +5 -0
- package/build/esnext/surfaces/admin/components/CustomerSegmentationTemplate/CustomerSegmentationTemplate.esnext +8 -0
- package/build/esnext/surfaces/admin/components/Divider/Divider.esnext +5 -0
- package/build/esnext/surfaces/admin/components/EmailField/EmailField.esnext +5 -0
- package/build/esnext/surfaces/admin/components/Form/Form.esnext +5 -0
- package/build/esnext/surfaces/admin/components/Heading/Heading.esnext +5 -0
- package/build/esnext/surfaces/admin/components/HeadingGroup/HeadingGroup.esnext +5 -0
- package/build/esnext/surfaces/admin/components/Icon/Icon.esnext +5 -0
- package/build/esnext/surfaces/admin/components/Image/Image.esnext +5 -0
- package/build/esnext/surfaces/admin/components/InlineStack/InlineStack.esnext +5 -0
- package/build/esnext/surfaces/admin/components/Link/Link.esnext +5 -0
- package/build/esnext/surfaces/admin/components/NumberField/NumberField.esnext +5 -0
- package/build/esnext/surfaces/admin/components/PasswordField/PasswordField.esnext +5 -0
- package/build/esnext/surfaces/admin/components/Select/Select.esnext +5 -0
- package/build/esnext/surfaces/admin/components/Text/Text.esnext +5 -0
- package/build/esnext/surfaces/admin/components/TextArea/TextArea.esnext +5 -0
- package/build/esnext/surfaces/admin/components/TextField/TextField.esnext +5 -0
- package/build/esnext/surfaces/admin/components/URLField/URLField.esnext +5 -0
- package/build/esnext/surfaces/admin/extension.esnext +6 -0
- package/build/esnext/surfaces/admin.esnext +24 -0
- package/build/esnext/surfaces/checkout/components/DateField/DateField.esnext +9 -0
- package/build/esnext/surfaces/checkout/components/DatePicker/DatePicker.esnext +18 -0
- package/build/esnext/surfaces/checkout/components/Disclosure/Disclosure.esnext +16 -0
- package/build/esnext/surfaces/checkout/components/Modal/Modal.esnext +13 -0
- package/build/esnext/surfaces/checkout/components/Popover/Popover.esnext +13 -0
- package/build/esnext/surfaces/checkout/components/View/View.esnext +0 -3
- package/build/esnext/surfaces/checkout/extension.esnext +35 -3
- package/build/esnext/surfaces/checkout/style/memoize.esnext +2 -0
- package/build/esnext/surfaces/checkout/style/style.esnext +0 -1
- package/build/esnext/surfaces/checkout.esnext +6 -1
- package/build/esnext/utilities/registration.esnext +26 -2
- package/build/ts/api.d.ts +62 -0
- package/build/ts/api.d.ts.map +1 -1
- package/build/ts/extension.d.ts +8 -1
- package/build/ts/extension.d.ts.map +1 -1
- package/build/ts/index.d.ts +0 -1
- package/build/ts/index.d.ts.map +1 -1
- package/build/ts/shared.d.ts +6 -0
- package/build/ts/shared.d.ts.map +1 -0
- package/build/ts/surfaces/admin/api/action/action.d.ts +11 -0
- package/build/ts/surfaces/admin/api/action/action.d.ts.map +1 -0
- package/build/ts/surfaces/admin/api/action/action.doc.d.ts +4 -0
- package/build/ts/surfaces/admin/api/action/action.doc.d.ts.map +1 -0
- package/build/ts/surfaces/admin/api/customer-segmentation-template/customer-segmentation-template.d.ts +11 -0
- package/build/ts/surfaces/admin/api/customer-segmentation-template/customer-segmentation-template.d.ts.map +1 -0
- package/build/ts/surfaces/admin/api/extension-targets/extension-targets.doc.d.ts +4 -0
- package/build/ts/surfaces/admin/api/extension-targets/extension-targets.doc.d.ts.map +1 -0
- package/build/ts/surfaces/admin/api/standard/standard.d.ts +13 -0
- package/build/ts/surfaces/admin/api/standard/standard.d.ts.map +1 -0
- package/build/ts/surfaces/admin/api/standard/standard.doc.d.ts +4 -0
- package/build/ts/surfaces/admin/api/standard/standard.doc.d.ts.map +1 -0
- package/build/ts/surfaces/admin/api.d.ts +5 -0
- package/build/ts/surfaces/admin/api.d.ts.map +1 -0
- package/build/ts/surfaces/admin/components/AdminAction/AdminAction.d.ts +25 -0
- package/build/ts/surfaces/admin/components/AdminAction/AdminAction.d.ts.map +1 -0
- package/build/ts/surfaces/admin/components/AdminAction/AdminAction.doc.d.ts +4 -0
- package/build/ts/surfaces/admin/components/AdminAction/AdminAction.doc.d.ts.map +1 -0
- package/build/ts/surfaces/admin/components/AdminBlock/AdminBlock.d.ts +17 -0
- package/build/ts/surfaces/admin/components/AdminBlock/AdminBlock.d.ts.map +1 -0
- package/build/ts/surfaces/admin/components/AdminBlock/AdminBlock.doc.d.ts +4 -0
- package/build/ts/surfaces/admin/components/AdminBlock/AdminBlock.doc.d.ts.map +1 -0
- package/build/ts/surfaces/admin/components/BlockStack/BlockStack.d.ts +15 -0
- package/build/ts/surfaces/admin/components/BlockStack/BlockStack.d.ts.map +1 -0
- package/build/ts/surfaces/admin/components/BlockStack/BlockStack.doc.d.ts +4 -0
- package/build/ts/surfaces/admin/components/BlockStack/BlockStack.doc.d.ts.map +1 -0
- package/build/ts/surfaces/admin/components/Box/Box.d.ts +9 -0
- package/build/ts/surfaces/admin/components/Box/Box.d.ts.map +1 -0
- package/build/ts/surfaces/admin/components/Box/Box.doc.d.ts +4 -0
- package/build/ts/surfaces/admin/components/Box/Box.doc.d.ts.map +1 -0
- package/build/ts/surfaces/admin/components/Button/Button.d.ts +87 -0
- package/build/ts/surfaces/admin/components/Button/Button.d.ts.map +1 -0
- package/build/ts/surfaces/admin/components/Button/Button.doc.d.ts +4 -0
- package/build/ts/surfaces/admin/components/Button/Button.doc.d.ts.map +1 -0
- package/build/ts/surfaces/admin/components/Checkbox/Checkbox.d.ts +55 -0
- package/build/ts/surfaces/admin/components/Checkbox/Checkbox.d.ts.map +1 -0
- package/build/ts/surfaces/admin/components/Checkbox/Checkbox.doc.d.ts +4 -0
- package/build/ts/surfaces/admin/components/Checkbox/Checkbox.doc.d.ts.map +1 -0
- package/build/ts/surfaces/admin/components/CustomerSegmentationTemplate/CustomerSegmentationTemplate.d.ts +27 -0
- package/build/ts/surfaces/admin/components/CustomerSegmentationTemplate/CustomerSegmentationTemplate.d.ts.map +1 -0
- package/build/ts/surfaces/admin/components/Divider/Divider.d.ts +14 -0
- package/build/ts/surfaces/admin/components/Divider/Divider.d.ts.map +1 -0
- package/build/ts/surfaces/admin/components/Divider/Divider.doc.d.ts +4 -0
- package/build/ts/surfaces/admin/components/Divider/Divider.doc.d.ts.map +1 -0
- package/build/ts/surfaces/admin/components/EmailField/EmailField.d.ts +10 -0
- package/build/ts/surfaces/admin/components/EmailField/EmailField.d.ts.map +1 -0
- package/build/ts/surfaces/admin/components/EmailField/EmailField.doc.d.ts +4 -0
- package/build/ts/surfaces/admin/components/EmailField/EmailField.doc.d.ts.map +1 -0
- package/build/ts/surfaces/admin/components/Form/Form.d.ts +30 -0
- package/build/ts/surfaces/admin/components/Form/Form.d.ts.map +1 -0
- package/build/ts/surfaces/admin/components/Form/Form.doc.d.ts +4 -0
- package/build/ts/surfaces/admin/components/Form/Form.doc.d.ts.map +1 -0
- package/build/ts/surfaces/admin/components/Heading/Heading.d.ts +14 -0
- package/build/ts/surfaces/admin/components/Heading/Heading.d.ts.map +1 -0
- package/build/ts/surfaces/admin/components/Heading/Heading.doc.d.ts +4 -0
- package/build/ts/surfaces/admin/components/Heading/Heading.doc.d.ts.map +1 -0
- package/build/ts/surfaces/admin/components/HeadingGroup/HeadingGroup.d.ts +8 -0
- package/build/ts/surfaces/admin/components/HeadingGroup/HeadingGroup.d.ts.map +1 -0
- package/build/ts/surfaces/admin/components/HeadingGroup/HeadingGroup.doc.d.ts +4 -0
- package/build/ts/surfaces/admin/components/HeadingGroup/HeadingGroup.doc.d.ts.map +1 -0
- package/build/ts/surfaces/admin/components/Icon/Icon.d.ts +23 -0
- package/build/ts/surfaces/admin/components/Icon/Icon.d.ts.map +1 -0
- package/build/ts/surfaces/admin/components/Icon/Icon.doc.d.ts +4 -0
- package/build/ts/surfaces/admin/components/Icon/Icon.doc.d.ts.map +1 -0
- package/build/ts/surfaces/admin/components/Image/Image.d.ts +114 -0
- package/build/ts/surfaces/admin/components/Image/Image.d.ts.map +1 -0
- package/build/ts/surfaces/admin/components/Image/Image.doc.d.ts +4 -0
- package/build/ts/surfaces/admin/components/Image/Image.doc.d.ts.map +1 -0
- package/build/ts/surfaces/admin/components/InlineStack/InlineStack.d.ts +15 -0
- package/build/ts/surfaces/admin/components/InlineStack/InlineStack.d.ts.map +1 -0
- package/build/ts/surfaces/admin/components/InlineStack/InlineStack.doc.d.ts +4 -0
- package/build/ts/surfaces/admin/components/InlineStack/InlineStack.doc.d.ts.map +1 -0
- package/build/ts/surfaces/admin/components/Link/Link.d.ts +57 -0
- package/build/ts/surfaces/admin/components/Link/Link.d.ts.map +1 -0
- package/build/ts/surfaces/admin/components/Link/Link.doc.d.ts +4 -0
- package/build/ts/surfaces/admin/components/Link/Link.doc.d.ts.map +1 -0
- package/build/ts/surfaces/admin/components/NumberField/NumberField.d.ts +41 -0
- package/build/ts/surfaces/admin/components/NumberField/NumberField.d.ts.map +1 -0
- package/build/ts/surfaces/admin/components/NumberField/NumberField.doc.d.ts +4 -0
- package/build/ts/surfaces/admin/components/NumberField/NumberField.doc.d.ts.map +1 -0
- package/build/ts/surfaces/admin/components/PasswordField/PasswordField.d.ts +10 -0
- package/build/ts/surfaces/admin/components/PasswordField/PasswordField.d.ts.map +1 -0
- package/build/ts/surfaces/admin/components/PasswordField/PasswordField.doc.d.ts +4 -0
- package/build/ts/surfaces/admin/components/PasswordField/PasswordField.doc.d.ts.map +1 -0
- package/build/ts/surfaces/admin/components/Select/Select.d.ts +127 -0
- package/build/ts/surfaces/admin/components/Select/Select.d.ts.map +1 -0
- package/build/ts/surfaces/admin/components/Select/Select.doc.d.ts +4 -0
- package/build/ts/surfaces/admin/components/Select/Select.doc.d.ts.map +1 -0
- package/build/ts/surfaces/admin/components/Text/Text.d.ts +97 -0
- package/build/ts/surfaces/admin/components/Text/Text.d.ts.map +1 -0
- package/build/ts/surfaces/admin/components/Text/Text.doc.d.ts +4 -0
- package/build/ts/surfaces/admin/components/Text/Text.doc.d.ts.map +1 -0
- package/build/ts/surfaces/admin/components/TextArea/TextArea.d.ts +15 -0
- package/build/ts/surfaces/admin/components/TextArea/TextArea.d.ts.map +1 -0
- package/build/ts/surfaces/admin/components/TextArea/TextArea.doc.d.ts +4 -0
- package/build/ts/surfaces/admin/components/TextArea/TextArea.doc.d.ts.map +1 -0
- package/build/ts/surfaces/admin/components/TextField/TextField.d.ts +9 -0
- package/build/ts/surfaces/admin/components/TextField/TextField.d.ts.map +1 -0
- package/build/ts/surfaces/admin/components/TextField/TextField.doc.d.ts +4 -0
- package/build/ts/surfaces/admin/components/TextField/TextField.doc.d.ts.map +1 -0
- package/build/ts/surfaces/admin/components/URLField/URLField.d.ts +10 -0
- package/build/ts/surfaces/admin/components/URLField/URLField.d.ts.map +1 -0
- package/build/ts/surfaces/admin/components/URLField/URLField.doc.d.ts +4 -0
- package/build/ts/surfaces/admin/components/URLField/URLField.doc.d.ts.map +1 -0
- package/build/ts/surfaces/admin/components/shared/index.d.ts +443 -0
- package/build/ts/surfaces/admin/components/shared/index.d.ts.map +1 -0
- package/build/ts/surfaces/admin/components.d.ts +47 -0
- package/build/ts/surfaces/admin/components.d.ts.map +1 -0
- package/build/ts/surfaces/admin/extension-points.d.ts +64 -0
- package/build/ts/surfaces/admin/extension-points.d.ts.map +1 -0
- package/build/ts/surfaces/admin/extension.d.ts +5 -0
- package/build/ts/surfaces/admin/extension.d.ts.map +1 -0
- package/build/ts/surfaces/admin/globals.d.ts +5 -0
- package/build/ts/surfaces/admin/globals.d.ts.map +1 -0
- package/build/ts/surfaces/admin/shared.d.ts +6 -0
- package/build/ts/surfaces/admin/shared.d.ts.map +1 -0
- package/build/ts/surfaces/admin.d.ts +7 -0
- package/build/ts/surfaces/admin.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/api/cart-line/cart-line-details.d.ts +9 -0
- package/build/ts/surfaces/checkout/api/cart-line/cart-line-details.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/api/checkout/checkout.d.ts +367 -0
- package/build/ts/surfaces/checkout/api/checkout/checkout.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/api/order-status/order-status.d.ts +27 -0
- package/build/ts/surfaces/checkout/api/order-status/order-status.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/api/payment-method/render.d.ts +44 -0
- package/build/ts/surfaces/checkout/api/payment-method/render.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/api/pickup/pickup-locations.d.ts +8 -0
- package/build/ts/surfaces/checkout/api/pickup/pickup-locations.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/api/pickup/pickup-points.d.ts +8 -0
- package/build/ts/surfaces/checkout/api/pickup/pickup-points.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/api/redeemable/render.d.ts +44 -0
- package/build/ts/surfaces/checkout/api/redeemable/render.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/api/shared.d.ts +46 -0
- package/build/ts/surfaces/checkout/api/shared.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/api/shipping/shipping-method-details.d.ts +13 -0
- package/build/ts/surfaces/checkout/api/shipping/shipping-method-details.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/api/standard/standard.d.ts +562 -406
- package/build/ts/surfaces/checkout/api/standard/standard.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/api.d.ts +10 -3
- package/build/ts/surfaces/checkout/api.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/Banner/Banner.d.ts +2 -2
- package/build/ts/surfaces/checkout/components/Banner/Banner.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/Banner/Banner.doc.d.ts +4 -0
- package/build/ts/surfaces/checkout/components/Banner/Banner.doc.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/BlockLayout/BlockLayout.doc.d.ts +4 -0
- package/build/ts/surfaces/checkout/components/BlockLayout/BlockLayout.doc.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/BlockSpacer/BlockSpacer.d.ts +2 -2
- package/build/ts/surfaces/checkout/components/BlockSpacer/BlockSpacer.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/BlockSpacer/BlockSpacer.doc.d.ts +4 -0
- package/build/ts/surfaces/checkout/components/BlockSpacer/BlockSpacer.doc.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/BlockStack/BlockStack.d.ts +20 -4
- package/build/ts/surfaces/checkout/components/BlockStack/BlockStack.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/BlockStack/BlockStack.doc.d.ts +4 -0
- package/build/ts/surfaces/checkout/components/BlockStack/BlockStack.doc.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/Button/Button.d.ts +3 -4
- package/build/ts/surfaces/checkout/components/Button/Button.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/Button/Button.doc.d.ts +4 -0
- package/build/ts/surfaces/checkout/components/Button/Button.doc.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/Checkbox/Checkbox.d.ts +5 -9
- package/build/ts/surfaces/checkout/components/Checkbox/Checkbox.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/Checkbox/Checkbox.doc.d.ts +4 -0
- package/build/ts/surfaces/checkout/components/Checkbox/Checkbox.doc.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/Choice/Choice.d.ts +2 -4
- package/build/ts/surfaces/checkout/components/Choice/Choice.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/Choice/Choice.doc.d.ts +4 -0
- package/build/ts/surfaces/checkout/components/Choice/Choice.doc.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/ChoiceList/ChoiceList.doc.d.ts +4 -0
- package/build/ts/surfaces/checkout/components/ChoiceList/ChoiceList.doc.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/DateField/DateField.d.ts +32 -0
- package/build/ts/surfaces/checkout/components/DateField/DateField.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/DateField/DateField.doc.d.ts +4 -0
- package/build/ts/surfaces/checkout/components/DateField/DateField.doc.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/DatePicker/DatePicker.d.ts +81 -0
- package/build/ts/surfaces/checkout/components/DatePicker/DatePicker.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/DatePicker/DatePicker.doc.d.ts +4 -0
- package/build/ts/surfaces/checkout/components/DatePicker/DatePicker.doc.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/Disclosure/Disclosure.d.ts +45 -0
- package/build/ts/surfaces/checkout/components/Disclosure/Disclosure.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/Disclosure/Disclosure.doc.d.ts +4 -0
- package/build/ts/surfaces/checkout/components/Disclosure/Disclosure.doc.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/Divider/Divider.d.ts +2 -2
- package/build/ts/surfaces/checkout/components/Divider/Divider.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/Divider/Divider.doc.d.ts +4 -0
- package/build/ts/surfaces/checkout/components/Divider/Divider.doc.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/Form/Form.doc.d.ts +4 -0
- package/build/ts/surfaces/checkout/components/Form/Form.doc.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/Grid/Grid.d.ts +20 -4
- package/build/ts/surfaces/checkout/components/Grid/Grid.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/Grid/Grid.doc.d.ts +4 -0
- package/build/ts/surfaces/checkout/components/Grid/Grid.doc.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/GridItem/GridItem.d.ts +20 -4
- package/build/ts/surfaces/checkout/components/GridItem/GridItem.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/GridItem/GridItem.doc.d.ts +4 -0
- package/build/ts/surfaces/checkout/components/GridItem/GridItem.doc.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/Heading/Heading.doc.d.ts +4 -0
- package/build/ts/surfaces/checkout/components/Heading/Heading.doc.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/HeadingGroup/HeadingGroup.doc.d.ts +4 -0
- package/build/ts/surfaces/checkout/components/HeadingGroup/HeadingGroup.doc.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/Icon/Icon.d.ts +7 -3
- package/build/ts/surfaces/checkout/components/Icon/Icon.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/Icon/Icon.doc.d.ts +4 -0
- package/build/ts/surfaces/checkout/components/Icon/Icon.doc.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/Image/Image.d.ts +2 -3
- package/build/ts/surfaces/checkout/components/Image/Image.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/Image/Image.doc.d.ts +4 -0
- package/build/ts/surfaces/checkout/components/Image/Image.doc.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/InlineLayout/InlineLayout.d.ts +2 -2
- package/build/ts/surfaces/checkout/components/InlineLayout/InlineLayout.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/InlineLayout/InlineLayout.doc.d.ts +4 -0
- package/build/ts/surfaces/checkout/components/InlineLayout/InlineLayout.doc.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/InlineSpacer/InlineSpacer.d.ts +2 -2
- package/build/ts/surfaces/checkout/components/InlineSpacer/InlineSpacer.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/InlineSpacer/InlineSpacer.doc.d.ts +4 -0
- package/build/ts/surfaces/checkout/components/InlineSpacer/InlineSpacer.doc.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/InlineStack/InlineStack.d.ts +23 -3
- package/build/ts/surfaces/checkout/components/InlineStack/InlineStack.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/InlineStack/InlineStack.doc.d.ts +4 -0
- package/build/ts/surfaces/checkout/components/InlineStack/InlineStack.doc.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/Link/Link.d.ts +3 -4
- package/build/ts/surfaces/checkout/components/Link/Link.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/Link/Link.doc.d.ts +4 -0
- package/build/ts/surfaces/checkout/components/Link/Link.doc.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/List/List.d.ts +2 -2
- package/build/ts/surfaces/checkout/components/List/List.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/List/List.doc.d.ts +4 -0
- package/build/ts/surfaces/checkout/components/List/List.doc.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/ListItem/ListItem.d.ts +2 -1
- package/build/ts/surfaces/checkout/components/ListItem/ListItem.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/ListItem/ListItem.doc.d.ts +4 -0
- package/build/ts/surfaces/checkout/components/ListItem/ListItem.doc.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/Modal/Modal.d.ts +44 -0
- package/build/ts/surfaces/checkout/components/Modal/Modal.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/Modal/Modal.doc.d.ts +4 -0
- package/build/ts/surfaces/checkout/components/Modal/Modal.doc.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/PhoneField/PhoneField.d.ts +87 -2
- package/build/ts/surfaces/checkout/components/PhoneField/PhoneField.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/PhoneField/PhoneField.doc.d.ts +4 -0
- package/build/ts/surfaces/checkout/components/PhoneField/PhoneField.doc.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/Popover/Popover.d.ts +36 -0
- package/build/ts/surfaces/checkout/components/Popover/Popover.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/Popover/Popover.doc.d.ts +4 -0
- package/build/ts/surfaces/checkout/components/Popover/Popover.doc.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/Pressable/Pressable.d.ts +20 -3
- package/build/ts/surfaces/checkout/components/Pressable/Pressable.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/Pressable/Pressable.doc.d.ts +4 -0
- package/build/ts/surfaces/checkout/components/Pressable/Pressable.doc.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/ScrollView/ScrollView.d.ts +7 -4
- package/build/ts/surfaces/checkout/components/ScrollView/ScrollView.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/ScrollView/ScrollView.doc.d.ts +4 -0
- package/build/ts/surfaces/checkout/components/ScrollView/ScrollView.doc.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/Select/Select.d.ts +2 -3
- package/build/ts/surfaces/checkout/components/Select/Select.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/Select/Select.doc.d.ts +4 -0
- package/build/ts/surfaces/checkout/components/Select/Select.doc.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/SkeletonImage/SkeletonImage.d.ts +2 -1
- package/build/ts/surfaces/checkout/components/SkeletonImage/SkeletonImage.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/SkeletonImage/SkeletonImage.doc.d.ts +4 -0
- package/build/ts/surfaces/checkout/components/SkeletonImage/SkeletonImage.doc.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/SkeletonText/SkeletonText.d.ts +7 -3
- package/build/ts/surfaces/checkout/components/SkeletonText/SkeletonText.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/SkeletonText/SkeletonText.doc.d.ts +4 -0
- package/build/ts/surfaces/checkout/components/SkeletonText/SkeletonText.doc.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/SkeletonTextBlock/SkeletonTextBlock.d.ts +7 -2
- package/build/ts/surfaces/checkout/components/SkeletonTextBlock/SkeletonTextBlock.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/SkeletonTextBlock/SkeletonTextBlock.doc.d.ts +4 -0
- package/build/ts/surfaces/checkout/components/SkeletonTextBlock/SkeletonTextBlock.doc.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/Spinner/Spinner.d.ts +2 -2
- package/build/ts/surfaces/checkout/components/Spinner/Spinner.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/Spinner/Spinner.doc.d.ts +4 -0
- package/build/ts/surfaces/checkout/components/Spinner/Spinner.doc.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/Stepper/Stepper.d.ts +98 -3
- package/build/ts/surfaces/checkout/components/Stepper/Stepper.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/Stepper/Stepper.doc.d.ts +4 -0
- package/build/ts/surfaces/checkout/components/Stepper/Stepper.doc.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/Tag/Tag.d.ts +5 -7
- package/build/ts/surfaces/checkout/components/Tag/Tag.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/Tag/Tag.doc.d.ts +4 -0
- package/build/ts/surfaces/checkout/components/Tag/Tag.doc.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/Text/Text.d.ts +2 -2
- package/build/ts/surfaces/checkout/components/Text/Text.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/Text/Text.doc.d.ts +4 -0
- package/build/ts/surfaces/checkout/components/Text/Text.doc.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/TextBlock/TextBlock.d.ts +3 -7
- package/build/ts/surfaces/checkout/components/TextBlock/TextBlock.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/TextBlock/TextBlock.doc.d.ts +4 -0
- package/build/ts/surfaces/checkout/components/TextBlock/TextBlock.doc.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/TextField/TextField.d.ts +2 -2
- package/build/ts/surfaces/checkout/components/TextField/TextField.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/TextField/TextField.doc.d.ts +4 -0
- package/build/ts/surfaces/checkout/components/TextField/TextField.doc.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/Tooltip/Tooltip.d.ts +2 -1
- package/build/ts/surfaces/checkout/components/Tooltip/Tooltip.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/Tooltip/Tooltip.doc.d.ts +4 -0
- package/build/ts/surfaces/checkout/components/Tooltip/Tooltip.doc.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/View/View.d.ts +16 -16
- package/build/ts/surfaces/checkout/components/View/View.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/View/View.doc.d.ts +4 -0
- package/build/ts/surfaces/checkout/components/View/View.doc.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/shared.d.ts +57 -18
- package/build/ts/surfaces/checkout/components/shared.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components.d.ts +13 -3
- package/build/ts/surfaces/checkout/components.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/extension-points.d.ts +136 -26
- package/build/ts/surfaces/checkout/extension-points.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/extension.d.ts +35 -3
- package/build/ts/surfaces/checkout/extension.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/globals.d.ts +1 -1
- package/build/ts/surfaces/checkout/globals.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/helper.docs.d.ts +16 -0
- package/build/ts/surfaces/checkout/helper.docs.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/shared.d.ts +3 -5
- package/build/ts/surfaces/checkout/shared.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/style/index.d.ts +3 -0
- package/build/ts/surfaces/checkout/style/index.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/style/memoize.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/style/style.d.ts +4 -0
- package/build/ts/surfaces/checkout/style/style.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/style/style.doc.d.ts +4 -0
- package/build/ts/surfaces/checkout/style/style.doc.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/style/types.d.ts +5 -0
- package/build/ts/surfaces/checkout/style/types.d.ts.map +1 -1
- package/build/ts/utilities/registration.d.ts +5 -1
- package/build/ts/utilities/registration.d.ts.map +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/package.json +21 -4
- package/src/api.ts +73 -0
- package/src/extension.ts +30 -1
- package/src/index.ts +0 -1
- package/src/shared.ts +13 -0
- package/src/surfaces/admin/api/action/action.doc.ts +19 -0
- package/src/surfaces/admin/api/action/action.ts +14 -0
- package/src/surfaces/admin/api/customer-segmentation-template/customer-segmentation-template.ts +19 -0
- package/src/surfaces/admin/api/extension-targets/extension-targets.doc.ts +20 -0
- package/src/surfaces/admin/api/standard/README.md +1 -0
- package/src/surfaces/admin/api/standard/standard.doc.ts +20 -0
- package/src/surfaces/admin/api/standard/standard.ts +14 -0
- package/src/surfaces/admin/api.ts +4 -0
- package/src/surfaces/admin/components/AdminAction/AdminAction.doc.ts +41 -0
- package/src/surfaces/admin/components/AdminAction/AdminAction.ts +28 -0
- package/src/surfaces/admin/components/AdminAction/examples/basic-adminaction.example.ts +16 -0
- package/src/surfaces/admin/components/AdminBlock/AdminBlock.doc.ts +41 -0
- package/src/surfaces/admin/components/AdminBlock/AdminBlock.ts +19 -0
- package/src/surfaces/admin/components/AdminBlock/examples/basic-adminblock.example.ts +11 -0
- package/src/surfaces/admin/components/BlockStack/BlockStack.doc.ts +42 -0
- package/src/surfaces/admin/components/BlockStack/BlockStack.ts +27 -0
- package/src/surfaces/admin/components/BlockStack/examples/basic-blockstack.example.ts +24 -0
- package/src/surfaces/admin/components/Box/Box.doc.ts +42 -0
- package/src/surfaces/admin/components/Box/Box.ts +13 -0
- package/src/surfaces/admin/components/Box/examples/basic-box.example.ts +11 -0
- package/src/surfaces/admin/components/Button/Button.doc.ts +41 -0
- package/src/surfaces/admin/components/Button/Button.ts +99 -0
- package/src/surfaces/admin/components/Button/README.md +3 -0
- package/src/surfaces/admin/components/Button/examples/basic-button.example.ts +11 -0
- package/src/surfaces/admin/components/Checkbox/Checkbox.doc.ts +42 -0
- package/src/surfaces/admin/components/Checkbox/Checkbox.ts +63 -0
- package/src/surfaces/admin/components/Checkbox/examples/basic-checkbox.example.ts +11 -0
- package/src/surfaces/admin/components/CustomerSegmentationTemplate/CustomerSegmentationTemplate.ts +68 -0
- package/src/surfaces/admin/components/CustomerSegmentationTemplate/examples/CustomerSegmentationTemplate.example.ts +37 -0
- package/src/surfaces/admin/components/Divider/Divider.doc.ts +42 -0
- package/src/surfaces/admin/components/Divider/Divider.ts +14 -0
- package/src/surfaces/admin/components/Divider/README.md +7 -0
- package/src/surfaces/admin/components/Divider/examples/basic-divider.example.ts +17 -0
- package/src/surfaces/admin/components/EmailField/EmailField.doc.ts +41 -0
- package/src/surfaces/admin/components/EmailField/EmailField.ts +22 -0
- package/src/surfaces/admin/components/EmailField/README.md +7 -0
- package/src/surfaces/admin/components/EmailField/examples/basic-emailfield.example.ts +9 -0
- package/src/surfaces/admin/components/Form/Form.doc.ts +41 -0
- package/src/surfaces/admin/components/Form/Form.ts +32 -0
- package/src/surfaces/admin/components/Form/examples/basic-form.example.ts +41 -0
- package/src/surfaces/admin/components/Heading/Heading.doc.ts +42 -0
- package/src/surfaces/admin/components/Heading/Heading.ts +15 -0
- package/src/surfaces/admin/components/Heading/README.md +9 -0
- package/src/surfaces/admin/components/Heading/examples/basic-heading.example.ts +7 -0
- package/src/surfaces/admin/components/HeadingGroup/HeadingGroup.doc.ts +42 -0
- package/src/surfaces/admin/components/HeadingGroup/HeadingGroup.ts +8 -0
- package/src/surfaces/admin/components/HeadingGroup/README.md +5 -0
- package/src/surfaces/admin/components/HeadingGroup/examples/basic-headinggroup.example.ts +20 -0
- package/src/surfaces/admin/components/Icon/Icon.doc.ts +42 -0
- package/src/surfaces/admin/components/Icon/Icon.ts +42 -0
- package/src/surfaces/admin/components/Icon/README.md +3 -0
- package/src/surfaces/admin/components/Icon/examples/basic-icon.example.ts +7 -0
- package/src/surfaces/admin/components/Image/Image.doc.ts +41 -0
- package/src/surfaces/admin/components/Image/Image.ts +120 -0
- package/src/surfaces/admin/components/Image/README.md +20 -0
- package/src/surfaces/admin/components/Image/examples/basic-image.example.ts +10 -0
- package/src/surfaces/admin/components/InlineStack/InlineStack.doc.ts +41 -0
- package/src/surfaces/admin/components/InlineStack/InlineStack.ts +28 -0
- package/src/surfaces/admin/components/InlineStack/examples/basic-inlinestack.example.ts +18 -0
- package/src/surfaces/admin/components/Link/Link.doc.ts +103 -0
- package/src/surfaces/admin/components/Link/Link.ts +63 -0
- package/src/surfaces/admin/components/Link/README.md +11 -0
- package/src/surfaces/admin/components/Link/examples/app-link.example.ts +17 -0
- package/src/surfaces/admin/components/Link/examples/external-link.example.ts +17 -0
- package/src/surfaces/admin/components/Link/examples/relative-link.example.ts +17 -0
- package/src/surfaces/admin/components/Link/examples/shopify-section-link.example.ts +17 -0
- package/src/surfaces/admin/components/NumberField/NumberField.doc.ts +42 -0
- package/src/surfaces/admin/components/NumberField/NumberField.ts +59 -0
- package/src/surfaces/admin/components/NumberField/README.md +7 -0
- package/src/surfaces/admin/components/NumberField/examples/basic-numberfield.example.ts +9 -0
- package/src/surfaces/admin/components/PasswordField/PasswordField.doc.ts +42 -0
- package/src/surfaces/admin/components/PasswordField/PasswordField.ts +22 -0
- package/src/surfaces/admin/components/PasswordField/README.md +7 -0
- package/src/surfaces/admin/components/PasswordField/examples/basic-passwordfield.example.ts +13 -0
- package/src/surfaces/admin/components/Select/README.md +99 -0
- package/src/surfaces/admin/components/Select/Select.doc.ts +42 -0
- package/src/surfaces/admin/components/Select/Select.ts +147 -0
- package/src/surfaces/admin/components/Select/examples/basic-select.example.ts +47 -0
- package/src/surfaces/admin/components/Text/README.md +7 -0
- package/src/surfaces/admin/components/Text/Text.doc.ts +42 -0
- package/src/surfaces/admin/components/Text/Text.ts +124 -0
- package/src/surfaces/admin/components/Text/examples/basic-text.example.ts +14 -0
- package/src/surfaces/admin/components/TextArea/TextArea.doc.ts +42 -0
- package/src/surfaces/admin/components/TextArea/TextArea.ts +24 -0
- package/src/surfaces/admin/components/TextArea/examples/basic-textarea.example.ts +10 -0
- package/src/surfaces/admin/components/TextField/README.md +7 -0
- package/src/surfaces/admin/components/TextField/TextField.doc.ts +42 -0
- package/src/surfaces/admin/components/TextField/TextField.ts +16 -0
- package/src/surfaces/admin/components/TextField/examples/basic-textfield.example.ts +9 -0
- package/src/surfaces/admin/components/URLField/README.md +7 -0
- package/src/surfaces/admin/components/URLField/URLField.doc.ts +41 -0
- package/src/surfaces/admin/components/URLField/URLField.ts +26 -0
- package/src/surfaces/admin/components/URLField/examples/basic-urlfield.example.ts +9 -0
- package/src/surfaces/admin/components/shared/index.ts +664 -0
- package/src/surfaces/admin/components.ts +52 -0
- package/src/surfaces/admin/extension-points.ts +143 -0
- package/src/surfaces/admin/extension.ts +8 -0
- package/src/surfaces/admin/globals.ts +8 -0
- package/src/surfaces/admin/shared.ts +6 -0
- package/src/surfaces/admin.ts +6 -0
- package/src/surfaces/checkout/api/{cart-line-details/render-after.ts → cart-line/cart-line-details.ts} +2 -3
- package/src/surfaces/checkout/api/checkout/checkout.ts +454 -0
- package/src/surfaces/checkout/api/order-status/order-status.ts +28 -0
- package/src/surfaces/checkout/api/payment-method/render.ts +55 -0
- package/src/surfaces/checkout/api/pickup/pickup-locations.ts +8 -0
- package/src/surfaces/checkout/api/pickup/pickup-points.ts +8 -0
- package/src/surfaces/checkout/api/redeemable/render.ts +55 -0
- package/src/surfaces/checkout/api/shared.ts +57 -0
- package/src/surfaces/checkout/api/shipping/shipping-method-details.ts +15 -0
- package/src/surfaces/checkout/api/standard/README.md +100 -1
- package/src/surfaces/checkout/api/standard/standard.ts +644 -483
- package/src/surfaces/checkout/api.ts +93 -35
- package/src/surfaces/checkout/components/Banner/Banner.doc.ts +57 -0
- package/src/surfaces/checkout/components/Banner/Banner.ts +2 -2
- package/src/surfaces/checkout/components/Banner/examples/basic-banner.example.ts +2 -2
- package/src/surfaces/checkout/components/BlockLayout/BlockLayout.doc.ts +50 -0
- package/src/surfaces/checkout/components/BlockLayout/examples/basic-blockLayout.example.ts +2 -2
- package/src/surfaces/checkout/components/BlockLayout/examples/basic-blocklayout.example.ts +16 -0
- package/src/surfaces/checkout/components/BlockSpacer/BlockSpacer.doc.ts +47 -0
- package/src/surfaces/checkout/components/BlockSpacer/BlockSpacer.ts +2 -2
- package/src/surfaces/checkout/components/BlockSpacer/examples/basic-blockspacer.example.ts +2 -2
- package/src/surfaces/checkout/components/BlockStack/BlockStack.doc.ts +60 -0
- package/src/surfaces/checkout/components/BlockStack/BlockStack.ts +20 -2
- package/src/surfaces/checkout/components/BlockStack/examples/basic-blockstack.example.ts +2 -2
- package/src/surfaces/checkout/components/Button/Button.doc.ts +64 -0
- package/src/surfaces/checkout/components/Button/Button.ts +8 -4
- package/src/surfaces/checkout/components/Button/examples/basic-button.example.ts +2 -2
- package/src/surfaces/checkout/components/Checkbox/Checkbox.doc.ts +49 -0
- package/src/surfaces/checkout/components/Checkbox/Checkbox.ts +5 -5
- package/src/surfaces/checkout/components/Checkbox/content/guidelines.md +1 -1
- package/src/surfaces/checkout/components/Checkbox/examples/basic-checkbox.example.ts +2 -2
- package/src/surfaces/checkout/components/Choice/Choice.doc.ts +57 -0
- package/src/surfaces/checkout/components/Choice/Choice.ts +2 -4
- package/src/surfaces/checkout/components/Choice/examples/basic-choice.example.ts +2 -2
- package/src/surfaces/checkout/components/ChoiceList/ChoiceList.doc.ts +63 -0
- package/src/surfaces/checkout/components/ChoiceList/content/guidelines.md +2 -2
- package/src/surfaces/checkout/components/ChoiceList/examples/basic-choicelist.example.ts +2 -2
- package/src/surfaces/checkout/components/DateField/DateField.doc.ts +49 -0
- package/src/surfaces/checkout/components/DateField/DateField.ts +50 -0
- package/src/surfaces/checkout/components/DateField/examples/basic-datefield.example.ts +9 -0
- package/src/surfaces/checkout/components/DatePicker/DatePicker.doc.ts +50 -0
- package/src/surfaces/checkout/components/DatePicker/DatePicker.ts +81 -0
- package/src/surfaces/checkout/components/DatePicker/examples/basic-datepicker.example.ts +9 -0
- package/src/surfaces/checkout/components/Disclosure/Disclosure.doc.ts +61 -0
- package/src/surfaces/checkout/components/Disclosure/Disclosure.ts +46 -0
- package/src/surfaces/checkout/components/Disclosure/examples/basic-disclosure.example.ts +19 -0
- package/src/surfaces/checkout/components/Divider/Divider.doc.ts +41 -0
- package/src/surfaces/checkout/components/Divider/Divider.ts +2 -2
- package/src/surfaces/checkout/components/Divider/examples/basic-divider.example.ts +2 -2
- package/src/surfaces/checkout/components/Form/Form.doc.ts +50 -0
- package/src/surfaces/checkout/components/Form/examples/basic-form.example.ts +2 -2
- package/src/surfaces/checkout/components/Grid/Grid.doc.ts +57 -0
- package/src/surfaces/checkout/components/Grid/Grid.ts +24 -3
- package/src/surfaces/checkout/components/Grid/examples/basic-grid.example.ts +2 -2
- package/src/surfaces/checkout/components/GridItem/GridItem.doc.ts +57 -0
- package/src/surfaces/checkout/components/GridItem/GridItem.ts +24 -3
- package/src/surfaces/checkout/components/GridItem/examples/basic-griditem.example.ts +2 -2
- package/src/surfaces/checkout/components/Heading/Heading.doc.ts +69 -0
- package/src/surfaces/checkout/components/Heading/examples/basic-heading.example.ts +2 -2
- package/src/surfaces/checkout/components/HeadingGroup/HeadingGroup.doc.ts +63 -0
- package/src/surfaces/checkout/components/HeadingGroup/examples/basic-headinggroup.example.ts +2 -2
- package/src/surfaces/checkout/components/Icon/Icon.doc.ts +57 -0
- package/src/surfaces/checkout/components/Icon/Icon.ts +23 -11
- package/src/surfaces/checkout/components/Icon/examples/basic-icon.example.ts +2 -2
- package/src/surfaces/checkout/components/Image/Image.doc.ts +49 -0
- package/src/surfaces/checkout/components/Image/Image.ts +8 -3
- package/src/surfaces/checkout/components/Image/examples/basic-image.example.ts +2 -2
- package/src/surfaces/checkout/components/InlineLayout/InlineLayout.doc.ts +61 -0
- package/src/surfaces/checkout/components/InlineLayout/InlineLayout.ts +8 -1
- package/src/surfaces/checkout/components/InlineLayout/examples/basic-inlineLayout.example.ts +2 -2
- package/src/surfaces/checkout/components/InlineLayout/examples/basic-inlinelayout.example.ts +16 -0
- package/src/surfaces/checkout/components/InlineSpacer/InlineSpacer.doc.ts +41 -0
- package/src/surfaces/checkout/components/InlineSpacer/InlineSpacer.ts +2 -2
- package/src/surfaces/checkout/components/InlineSpacer/examples/basic-inlinespacer.example.ts +2 -2
- package/src/surfaces/checkout/components/InlineStack/InlineStack.doc.ts +50 -0
- package/src/surfaces/checkout/components/InlineStack/InlineStack.ts +23 -1
- package/src/surfaces/checkout/components/InlineStack/examples/basic-inlinestack.example.ts +2 -2
- package/src/surfaces/checkout/components/Link/Link.doc.ts +64 -0
- package/src/surfaces/checkout/components/Link/Link.ts +9 -4
- package/src/surfaces/checkout/components/Link/examples/basic-link.example.ts +2 -2
- package/src/surfaces/checkout/components/List/List.doc.ts +58 -0
- package/src/surfaces/checkout/components/List/List.ts +2 -2
- package/src/surfaces/checkout/components/List/examples/basic-list.example.ts +2 -2
- package/src/surfaces/checkout/components/ListItem/ListItem.doc.ts +42 -0
- package/src/surfaces/checkout/components/ListItem/ListItem.ts +3 -1
- package/src/surfaces/checkout/components/ListItem/examples/basic-listitem.example.ts +2 -2
- package/src/surfaces/checkout/components/Modal/Modal.doc.ts +50 -0
- package/src/surfaces/checkout/components/Modal/Modal.ts +42 -0
- package/src/surfaces/checkout/components/Modal/examples/basic-modal.example.ts +44 -0
- package/src/surfaces/checkout/components/PhoneField/PhoneField.doc.ts +41 -0
- package/src/surfaces/checkout/components/PhoneField/PhoneField.ts +99 -23
- package/src/surfaces/checkout/components/PhoneField/examples/basic-phonefield.example.ts +2 -2
- package/src/surfaces/checkout/components/Popover/Popover.doc.ts +50 -0
- package/src/surfaces/checkout/components/Popover/Popover.ts +45 -0
- package/src/surfaces/checkout/components/Popover/examples/basic-popover.example.ts +30 -0
- package/src/surfaces/checkout/components/Pressable/Pressable.doc.ts +41 -0
- package/src/surfaces/checkout/components/Pressable/Pressable.ts +25 -2
- package/src/surfaces/checkout/components/Pressable/examples/basic-pressable.example.ts +4 -4
- package/src/surfaces/checkout/components/ScrollView/ScrollView.doc.ts +41 -0
- package/src/surfaces/checkout/components/ScrollView/ScrollView.ts +6 -1
- package/src/surfaces/checkout/components/ScrollView/examples/basic-scrollview.example.ts +2 -2
- package/src/surfaces/checkout/components/Select/Select.doc.ts +50 -0
- package/src/surfaces/checkout/components/Select/Select.ts +2 -2
- package/src/surfaces/checkout/components/Select/examples/basic-select.example.ts +2 -2
- package/src/surfaces/checkout/components/SkeletonImage/SkeletonImage.doc.ts +52 -0
- package/src/surfaces/checkout/components/SkeletonImage/SkeletonImage.ts +2 -3
- package/src/surfaces/checkout/components/SkeletonImage/examples/basic-skeletonimage.example.ts +2 -2
- package/src/surfaces/checkout/components/SkeletonText/SkeletonText.doc.ts +52 -0
- package/src/surfaces/checkout/components/SkeletonText/SkeletonText.ts +7 -3
- package/src/surfaces/checkout/components/SkeletonText/examples/basic-skeletontext.example.ts +2 -2
- package/src/surfaces/checkout/components/SkeletonTextBlock/SkeletonTextBlock.doc.ts +41 -0
- package/src/surfaces/checkout/components/SkeletonTextBlock/SkeletonTextBlock.ts +7 -2
- package/src/surfaces/checkout/components/SkeletonTextBlock/examples/basic-skeletontextblock.example.ts +2 -2
- package/src/surfaces/checkout/components/Spinner/Spinner.doc.ts +50 -0
- package/src/surfaces/checkout/components/Spinner/Spinner.ts +2 -2
- package/src/surfaces/checkout/components/Spinner/examples/basic-spinner.example.ts +2 -2
- package/src/surfaces/checkout/components/Stepper/Stepper.doc.ts +50 -0
- package/src/surfaces/checkout/components/Stepper/Stepper.ts +113 -21
- package/src/surfaces/checkout/components/Stepper/examples/basic-stepper.example.ts +2 -2
- package/src/surfaces/checkout/components/Tag/Tag.doc.ts +41 -0
- package/src/surfaces/checkout/components/Tag/Tag.ts +4 -4
- package/src/surfaces/checkout/components/Tag/examples/basic-tag.example.ts +2 -2
- package/src/surfaces/checkout/components/Text/Text.doc.ts +76 -0
- package/src/surfaces/checkout/components/Text/Text.ts +2 -4
- package/src/surfaces/checkout/components/Text/content/guidelines.md +1 -1
- package/src/surfaces/checkout/components/Text/examples/basic-text.example.ts +2 -2
- package/src/surfaces/checkout/components/TextBlock/TextBlock.doc.ts +76 -0
- package/src/surfaces/checkout/components/TextBlock/TextBlock.ts +9 -9
- package/src/surfaces/checkout/components/TextBlock/content/guidelines.md +1 -1
- package/src/surfaces/checkout/components/TextBlock/examples/basic-textblock.example.ts +6 -2
- package/src/surfaces/checkout/components/TextField/TextField.doc.ts +49 -0
- package/src/surfaces/checkout/components/TextField/TextField.ts +2 -2
- package/src/surfaces/checkout/components/TextField/examples/basic-textfield.example.ts +2 -2
- package/src/surfaces/checkout/components/Tooltip/Tooltip.doc.ts +50 -0
- package/src/surfaces/checkout/components/Tooltip/Tooltip.ts +3 -1
- package/src/surfaces/checkout/components/Tooltip/examples/basic-tooltip.example.ts +2 -2
- package/src/surfaces/checkout/components/View/View.doc.ts +50 -0
- package/src/surfaces/checkout/components/View/View.ts +17 -18
- package/src/surfaces/checkout/components/View/examples/basic-view.example.ts +2 -2
- package/src/surfaces/checkout/components/shared.ts +73 -18
- package/src/surfaces/checkout/components.ts +41 -16
- package/src/surfaces/checkout/extension-points.ts +245 -52
- package/src/surfaces/checkout/extension.ts +62 -3
- package/src/surfaces/checkout/globals.ts +1 -1
- package/src/surfaces/checkout/helper.docs.ts +103 -0
- package/src/surfaces/checkout/shared.ts +3 -11
- package/src/surfaces/checkout/style/examples/.eslintrc.js +8 -0
- package/src/surfaces/checkout/style/examples/defaultstyle.example.tsx +9 -0
- package/src/surfaces/checkout/style/examples/simplecondition.example.tsx +9 -0
- package/src/surfaces/checkout/style/examples/style.example.ts +18 -0
- package/src/surfaces/checkout/style/examples/style.example.tsx +16 -0
- package/src/surfaces/checkout/style/index.ts +16 -0
- package/src/surfaces/checkout/style/memoize.ts +2 -0
- package/src/surfaces/checkout/style/style.doc.ts +166 -0
- package/src/surfaces/checkout/style/style.ts +5 -0
- package/src/surfaces/checkout/style/types.ts +5 -0
- package/src/utilities/registration.ts +59 -7
- package/build/ts/surfaces/checkout/api/cart-line-details/render-after.d.ts +0 -9
- package/build/ts/surfaces/checkout/api/cart-line-details/render-after.d.ts.map +0 -1
- package/src/surfaces/checkout/api/cart-line-details/README.md +0 -1
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import type { StatefulRemoteSubscribable } from '@remote-ui/async-subscription';
|
|
2
|
-
import type {
|
|
3
|
-
import type { ExtensionPoint as AnyExtensionPoint } from '../../extension-points';
|
|
4
|
-
import type { CurrencyCode, CountryCode, Timezone } from '../shared';
|
|
2
|
+
import type { CurrencyCode, CountryCode, Timezone, GraphQLError, StorefrontApiVersion, ValidationError, SellingPlan, Attribute } from '../shared';
|
|
5
3
|
/**
|
|
6
4
|
* A key-value storage object for extension points.
|
|
7
5
|
*
|
|
@@ -34,27 +32,33 @@ export interface Storage {
|
|
|
34
32
|
delete(key: string): Promise<void>;
|
|
35
33
|
}
|
|
36
34
|
/**
|
|
37
|
-
* The
|
|
35
|
+
* The capabilities an extension has access to.
|
|
38
36
|
*
|
|
39
|
-
* * `
|
|
40
|
-
* is requested by a partner
|
|
37
|
+
* * [`api_access`](https://shopify.dev/docs/api/checkout-ui-extensions/configuration#api-access): the extension can access the Storefront API.
|
|
41
38
|
*
|
|
42
|
-
* * `
|
|
43
|
-
*
|
|
39
|
+
* * [`network_access`](https://shopify.dev/docs/api/checkout-ui-extensions/configuration#network-access): the extension can make external network calls.
|
|
40
|
+
*
|
|
41
|
+
* * [`block_progress`](https://shopify.dev/docs/api/checkout-ui-extensions/configuration#block-progress): the extension can block a buyer's progress and the merchant has allowed this blocking behavior.
|
|
44
42
|
*/
|
|
45
|
-
export type Capability = 'network_access' | 'block_progress';
|
|
43
|
+
export type Capability = 'api_access' | 'network_access' | 'block_progress';
|
|
46
44
|
/**
|
|
47
45
|
* Meta information about an extension point.
|
|
48
46
|
*/
|
|
49
|
-
export interface
|
|
47
|
+
export interface Extension {
|
|
50
48
|
/**
|
|
51
49
|
* The published version of the running extension point.
|
|
52
50
|
*
|
|
53
|
-
* For unpublished extensions, the value is `
|
|
51
|
+
* For unpublished extensions, the value is `undefined`.
|
|
54
52
|
*
|
|
55
53
|
* @example 3.0.10
|
|
56
54
|
*/
|
|
57
55
|
version?: string;
|
|
56
|
+
/**
|
|
57
|
+
* The API version that was set in the extension config file.
|
|
58
|
+
*
|
|
59
|
+
* @example '2023-01', '2022-10'
|
|
60
|
+
*/
|
|
61
|
+
apiVersion: ApiVersion;
|
|
58
62
|
/**
|
|
59
63
|
* The URL to the script that started the extension point.
|
|
60
64
|
*/
|
|
@@ -73,14 +77,13 @@ export interface ExtensionInstance {
|
|
|
73
77
|
rendered: StatefulRemoteSubscribable<boolean>;
|
|
74
78
|
/**
|
|
75
79
|
* The allowed capabilities of the extension, defined
|
|
76
|
-
* in your
|
|
80
|
+
* in your [shopify.ui.extension.toml](https://shopify.dev/docs/api/checkout-ui-extensions/configuration) file.
|
|
77
81
|
*
|
|
78
|
-
* `
|
|
79
|
-
* You must [request access](https://shopify.dev/api/checkout-extensions/checkout/configuration#complete-a-request-for-network-access)
|
|
80
|
-
* to make network calls.
|
|
82
|
+
* * [`api_access`](https://shopify.dev/docs/api/checkout-ui-extensions/configuration#api-access): the extension can access the Storefront API.
|
|
81
83
|
*
|
|
82
|
-
* `
|
|
83
|
-
*
|
|
84
|
+
* * [`network_access`](https://shopify.dev/docs/api/checkout-ui-extensions/configuration#network-access): the extension can make external network calls.
|
|
85
|
+
*
|
|
86
|
+
* * [`block_progress`](https://shopify.dev/docs/api/checkout-ui-extensions/configuration#block-progress): the extension can block a buyer's progress and the merchant has allowed this blocking behavior.
|
|
84
87
|
*/
|
|
85
88
|
capabilities: StatefulRemoteSubscribable<Capability[]>;
|
|
86
89
|
/**
|
|
@@ -96,94 +99,6 @@ export interface Editor {
|
|
|
96
99
|
*/
|
|
97
100
|
type: 'checkout';
|
|
98
101
|
}
|
|
99
|
-
/**
|
|
100
|
-
* Removes a note
|
|
101
|
-
*/
|
|
102
|
-
export interface NoteRemoveChange {
|
|
103
|
-
/**
|
|
104
|
-
* The type of the `NoteRemoveChange` API.
|
|
105
|
-
*/
|
|
106
|
-
type: 'removeNote';
|
|
107
|
-
}
|
|
108
|
-
/**
|
|
109
|
-
* An Update to a note on the order.
|
|
110
|
-
* for example, the buyer could request detailed packaging instructions in an order note
|
|
111
|
-
*/
|
|
112
|
-
export interface NoteUpdateChange {
|
|
113
|
-
/**
|
|
114
|
-
* The type of the `NoteUpdateChange` API.
|
|
115
|
-
*/
|
|
116
|
-
type: 'updateNote';
|
|
117
|
-
/**
|
|
118
|
-
* The new value of the note.
|
|
119
|
-
*/
|
|
120
|
-
note: string;
|
|
121
|
-
}
|
|
122
|
-
export type NoteChange = NoteRemoveChange | NoteUpdateChange;
|
|
123
|
-
export interface NoteChangeResultSuccess {
|
|
124
|
-
/**
|
|
125
|
-
* The type of the `NoteChangeResultSuccess` API.
|
|
126
|
-
*/
|
|
127
|
-
type: 'success';
|
|
128
|
-
}
|
|
129
|
-
export interface NoteChangeResultError {
|
|
130
|
-
/**
|
|
131
|
-
* The type of the `NoteChangeResultError` API.
|
|
132
|
-
*/
|
|
133
|
-
type: 'error';
|
|
134
|
-
/**
|
|
135
|
-
* A message that explains the error. This message is useful for debugging.
|
|
136
|
-
* It is **not** localized, and therefore should not be presented directly
|
|
137
|
-
* to the buyer.
|
|
138
|
-
*/
|
|
139
|
-
message: string;
|
|
140
|
-
}
|
|
141
|
-
export type NoteChangeResult = NoteChangeResultSuccess | NoteChangeResultError;
|
|
142
|
-
/**
|
|
143
|
-
* Updates an attribute on the order. If an attribute with the
|
|
144
|
-
* provided key does not already exist, it gets created.
|
|
145
|
-
*/
|
|
146
|
-
export interface AttributeUpdateChange {
|
|
147
|
-
/**
|
|
148
|
-
* The type of the `AttributeUpdateChange` API.
|
|
149
|
-
*/
|
|
150
|
-
type: 'updateAttribute';
|
|
151
|
-
/**
|
|
152
|
-
* Key of the attribute to add or update
|
|
153
|
-
*/
|
|
154
|
-
key: string;
|
|
155
|
-
/**
|
|
156
|
-
* Value for the attribute to add or update
|
|
157
|
-
*/
|
|
158
|
-
value: string;
|
|
159
|
-
}
|
|
160
|
-
export type AttributeChange = AttributeUpdateChange;
|
|
161
|
-
/**
|
|
162
|
-
* The returned result of a successful update to an attribute.
|
|
163
|
-
*/
|
|
164
|
-
export interface AttributeChangeResultSuccess {
|
|
165
|
-
/**
|
|
166
|
-
* The type of the `AttributeChangeResultSuccess` API.
|
|
167
|
-
*/
|
|
168
|
-
type: 'success';
|
|
169
|
-
}
|
|
170
|
-
/**
|
|
171
|
-
* The returned result of an unsuccessful update to an attribute
|
|
172
|
-
* with a message detailing the type of error that occurred.
|
|
173
|
-
*/
|
|
174
|
-
export interface AttributeChangeResultError {
|
|
175
|
-
/**
|
|
176
|
-
* The type of the `AttributeChangeResultError` API.
|
|
177
|
-
*/
|
|
178
|
-
type: 'error';
|
|
179
|
-
/**
|
|
180
|
-
* A message that explains the error. This message is useful for debugging.
|
|
181
|
-
* It is **not** localized, and therefore should not be presented directly
|
|
182
|
-
* to the buyer.
|
|
183
|
-
*/
|
|
184
|
-
message: string;
|
|
185
|
-
}
|
|
186
|
-
export type AttributeChangeResult = AttributeChangeResultSuccess | AttributeChangeResultError;
|
|
187
102
|
/**
|
|
188
103
|
* Metadata associated with the checkout.
|
|
189
104
|
*/
|
|
@@ -206,61 +121,6 @@ export interface Metafield {
|
|
|
206
121
|
/** The metafield’s information type. */
|
|
207
122
|
valueType: 'integer' | 'string' | 'json_string';
|
|
208
123
|
}
|
|
209
|
-
/** Removes a metafield. */
|
|
210
|
-
export interface MetafieldRemoveChange {
|
|
211
|
-
/**
|
|
212
|
-
* The type of the `MetafieldRemoveChange` API.
|
|
213
|
-
*/
|
|
214
|
-
type: 'removeMetafield';
|
|
215
|
-
/**
|
|
216
|
-
* The name of the metafield to remove.
|
|
217
|
-
*/
|
|
218
|
-
key: string;
|
|
219
|
-
/**
|
|
220
|
-
* The namespace of the metafield to remove.
|
|
221
|
-
*/
|
|
222
|
-
namespace: string;
|
|
223
|
-
}
|
|
224
|
-
/**
|
|
225
|
-
* Updates a metafield. If a metafield with the
|
|
226
|
-
* provided key and namespace does not already exist, it gets created.
|
|
227
|
-
*/
|
|
228
|
-
export interface MetafieldUpdateChange {
|
|
229
|
-
/**
|
|
230
|
-
* The type of the `MetafieldUpdateChange` API.
|
|
231
|
-
*/
|
|
232
|
-
type: 'updateMetafield';
|
|
233
|
-
/** The name of the metafield to update. */
|
|
234
|
-
key: string;
|
|
235
|
-
/** The namespace of the metafield to add. */
|
|
236
|
-
namespace: string;
|
|
237
|
-
/** The new information to store in the metafield. */
|
|
238
|
-
value: string | number;
|
|
239
|
-
/**
|
|
240
|
-
* The metafield’s information type.
|
|
241
|
-
*/
|
|
242
|
-
valueType: 'integer' | 'string' | 'json_string';
|
|
243
|
-
}
|
|
244
|
-
export type MetafieldChange = MetafieldRemoveChange | MetafieldUpdateChange;
|
|
245
|
-
export interface MetafieldChangeResultSuccess {
|
|
246
|
-
/**
|
|
247
|
-
* The type of the `MetafieldChangeResultSuccess` API.
|
|
248
|
-
*/
|
|
249
|
-
type: 'success';
|
|
250
|
-
}
|
|
251
|
-
export interface MetafieldChangeResultError {
|
|
252
|
-
/**
|
|
253
|
-
* The type of the `MetafieldChangeResultError` API.
|
|
254
|
-
*/
|
|
255
|
-
type: 'error';
|
|
256
|
-
/**
|
|
257
|
-
* A message that explains the error. This message is useful for debugging.
|
|
258
|
-
* It is **not** localized, and therefore should not be presented directly
|
|
259
|
-
* to the buyer.
|
|
260
|
-
*/
|
|
261
|
-
message: string;
|
|
262
|
-
}
|
|
263
|
-
export type MetafieldChangeResult = MetafieldChangeResultSuccess | MetafieldChangeResultError;
|
|
264
124
|
/**
|
|
265
125
|
* Represents a custom metadata attached to a resource.
|
|
266
126
|
*/
|
|
@@ -278,7 +138,11 @@ export interface AppMetafield {
|
|
|
278
138
|
* The metafield owner.
|
|
279
139
|
*/
|
|
280
140
|
export interface AppMetafieldEntryTarget {
|
|
281
|
-
/**
|
|
141
|
+
/**
|
|
142
|
+
* The type of the metafield owner.
|
|
143
|
+
*
|
|
144
|
+
* {% include /apps/checkout/privacy-icon.md %} Requires access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data) when the type is `customer`.
|
|
145
|
+
*/
|
|
282
146
|
type: 'customer' | 'product' | 'shop' | 'variant';
|
|
283
147
|
/** The numeric owner ID that is associated with the metafield. */
|
|
284
148
|
id: string;
|
|
@@ -287,25 +151,25 @@ export interface AppMetafieldEntryTarget {
|
|
|
287
151
|
* A metafield associated with the shop or a resource on the checkout.
|
|
288
152
|
*/
|
|
289
153
|
export interface AppMetafieldEntry {
|
|
290
|
-
/**
|
|
154
|
+
/**
|
|
155
|
+
* The target that is associated to the metadata.
|
|
156
|
+
*
|
|
157
|
+
* {% include /apps/checkout/privacy-icon.md %} Requires access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data) when the type is `customer`.
|
|
158
|
+
*/
|
|
291
159
|
target: AppMetafieldEntryTarget;
|
|
292
160
|
/** The metadata information. */
|
|
293
161
|
metafield: AppMetafield;
|
|
294
162
|
}
|
|
295
|
-
export type
|
|
163
|
+
export type ApiVersion = '2022-10' | '2023-01' | '2023-04' | 'unstable';
|
|
164
|
+
export type Version = string;
|
|
296
165
|
/**
|
|
297
|
-
* This
|
|
166
|
+
* This returns a translated string matching a key in a locale file.
|
|
167
|
+
*
|
|
168
|
+
* @example translate("banner.title")
|
|
298
169
|
*/
|
|
299
|
-
export
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
*
|
|
303
|
-
* @example translate("banner.title")
|
|
304
|
-
*/
|
|
305
|
-
<ReplacementType = string>(key: string, options?: {
|
|
306
|
-
[placeholderKey: string]: ReplacementType | string | number;
|
|
307
|
-
}): ReplacementType extends string | number ? string : (string | ReplacementType)[];
|
|
308
|
-
}
|
|
170
|
+
export type I18nTranslate<ReplacementType = string> = (key: string, options?: {
|
|
171
|
+
[placeholderKey: string]: ReplacementType | string | number;
|
|
172
|
+
}) => ReplacementType extends string | number ? string : (string | ReplacementType)[];
|
|
309
173
|
export interface I18n {
|
|
310
174
|
/**
|
|
311
175
|
* Returns a localized number.
|
|
@@ -372,6 +236,23 @@ export interface Currency {
|
|
|
372
236
|
*/
|
|
373
237
|
isoCode: CurrencyCode;
|
|
374
238
|
}
|
|
239
|
+
export interface Country {
|
|
240
|
+
/**
|
|
241
|
+
* The ISO-3166-1 code for this country.
|
|
242
|
+
* @see https://www.iso.org/iso-3166-country-codes.html
|
|
243
|
+
*/
|
|
244
|
+
isoCode: CountryCode;
|
|
245
|
+
}
|
|
246
|
+
export interface Market {
|
|
247
|
+
/**
|
|
248
|
+
* A globally-unique identifier for a market.
|
|
249
|
+
*/
|
|
250
|
+
id: string;
|
|
251
|
+
/**
|
|
252
|
+
* The human-readable, shop-scoped identifier for the market.
|
|
253
|
+
*/
|
|
254
|
+
handle: string;
|
|
255
|
+
}
|
|
375
256
|
export interface Localization {
|
|
376
257
|
/**
|
|
377
258
|
* The currency that the buyer sees for money amounts in the checkout.
|
|
@@ -397,81 +278,127 @@ export interface Localization {
|
|
|
397
278
|
* extension (that is, the one matching your .default.json file).
|
|
398
279
|
*/
|
|
399
280
|
extensionLanguage: StatefulRemoteSubscribable<Language>;
|
|
281
|
+
/**
|
|
282
|
+
* The country context of the checkout. This value carries over from the
|
|
283
|
+
* context of the cart, where it was used to contextualize the storefront
|
|
284
|
+
* experience. It will update if the buyer changes the country of their
|
|
285
|
+
* shipping address. The value is undefined if unknown.
|
|
286
|
+
*/
|
|
287
|
+
country: StatefulRemoteSubscribable<Country | undefined>;
|
|
288
|
+
/**
|
|
289
|
+
* The [market](https://shopify.dev/docs/apps/markets) context of the
|
|
290
|
+
* checkout. This value carries over from the context of the cart, where it
|
|
291
|
+
* was used to contextualize the storefront experience. It will update if the
|
|
292
|
+
* buyer changes the country of their shipping address. The value is undefined
|
|
293
|
+
* if unknown.
|
|
294
|
+
*/
|
|
295
|
+
market: StatefulRemoteSubscribable<Market | undefined>;
|
|
400
296
|
}
|
|
401
297
|
/**
|
|
402
|
-
*
|
|
298
|
+
* Provides details on the buyer's progression through the checkout.
|
|
403
299
|
*/
|
|
404
|
-
export interface
|
|
300
|
+
export interface BuyerJourney {
|
|
405
301
|
/**
|
|
406
|
-
*
|
|
302
|
+
* Installs a function for intercepting and preventing progress on checkout.
|
|
407
303
|
*
|
|
408
|
-
*
|
|
304
|
+
* This returns a promise that resolves to a teardown function. Calling the
|
|
305
|
+
* teardown function will remove the interceptor.
|
|
306
|
+
*
|
|
307
|
+
* To block checkout progress, you must set the [block_progress](https://shopify.dev/docs/api/checkout-ui-extensions/configuration#block-progress)
|
|
308
|
+
* capability in your extension's configuration.
|
|
409
309
|
*/
|
|
410
|
-
|
|
310
|
+
intercept(interceptor: Interceptor): Promise<() => void>;
|
|
411
311
|
/**
|
|
412
|
-
*
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
* was blocked.
|
|
420
|
-
*
|
|
421
|
-
* To block checkout progress, you must set the [block_progress](https://shopify.dev/api/checkout-extensions/checkout/configuration#block-progress) capability in your extension's configuration.
|
|
422
|
-
*/
|
|
423
|
-
intercept(interceptor: Interceptor): Promise<() => void>;
|
|
424
|
-
};
|
|
312
|
+
* This subscribable value will be true if the buyer completed submitting their order.
|
|
313
|
+
*
|
|
314
|
+
* For example, when viewing the order status page after submitting payment, the buyer will have completed their order.
|
|
315
|
+
*/
|
|
316
|
+
completed: StatefulRemoteSubscribable<boolean>;
|
|
317
|
+
}
|
|
318
|
+
export interface StandardApi<ExtensionPoint extends import('../../extension-points').ExtensionPoint> {
|
|
425
319
|
/**
|
|
426
|
-
*
|
|
427
|
-
* @example 'Checkout::PostPurchase::Render'
|
|
320
|
+
* Methods for interacting with [Web Pixels](https://shopify.dev/docs/apps/marketing), such as emitting an event.
|
|
428
321
|
*/
|
|
429
|
-
|
|
322
|
+
analytics: Analytics;
|
|
430
323
|
/**
|
|
431
|
-
*
|
|
324
|
+
* Gift Cards that have been applied to the checkout.
|
|
432
325
|
*/
|
|
433
|
-
|
|
326
|
+
appliedGiftCards: StatefulRemoteSubscribable<AppliedGiftCard[]>;
|
|
434
327
|
/**
|
|
435
|
-
*
|
|
328
|
+
* The metafields requested in the
|
|
329
|
+
* [`shopify.ui.extension.toml`](https://shopify.dev/docs/api/checkout-ui-extensions/configuration)
|
|
330
|
+
* file. These metafields are updated when there's a change in the merchandise items
|
|
331
|
+
* being purchased by the customer.
|
|
332
|
+
*
|
|
333
|
+
* {% include /apps/checkout/privacy-icon.md %} Requires access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data).
|
|
436
334
|
*/
|
|
437
|
-
|
|
335
|
+
appMetafields: StatefulRemoteSubscribable<AppMetafieldEntry[]>;
|
|
438
336
|
/**
|
|
439
|
-
*
|
|
440
|
-
* updates when the field is committed (on change) rather than every keystroke.
|
|
441
|
-
* An address value is only present if delivery is required. Otherwise, the
|
|
442
|
-
* subscribable value is undefined.
|
|
337
|
+
* Custom attributes left by the customer to the merchant, either in their cart or during checkout.
|
|
443
338
|
*/
|
|
444
|
-
|
|
339
|
+
attributes: StatefulRemoteSubscribable<Attribute[] | undefined>;
|
|
340
|
+
/**
|
|
341
|
+
* All available payment options.
|
|
342
|
+
*/
|
|
343
|
+
availablePaymentOptions: StatefulRemoteSubscribable<PaymentOption[]>;
|
|
445
344
|
/**
|
|
446
345
|
* Information about the buyer that is interacting with the checkout.
|
|
346
|
+
*
|
|
347
|
+
* {% include /apps/checkout/privacy-icon.md %} Requires access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data).
|
|
447
348
|
*/
|
|
448
349
|
buyerIdentity?: BuyerIdentity;
|
|
449
|
-
/**
|
|
450
|
-
|
|
350
|
+
/**
|
|
351
|
+
* Provides details on the buyer's progression through the checkout.
|
|
352
|
+
*
|
|
353
|
+
* See [buyer journey](https://shopify.dev/docs/api/checkout-ui-extensions/apis/standardapi#example-buyer-journey)
|
|
354
|
+
* examples for more information.
|
|
355
|
+
*/
|
|
356
|
+
buyerJourney: BuyerJourney;
|
|
451
357
|
/**
|
|
452
358
|
* Details on the costs the buyer will pay for this checkout.
|
|
453
359
|
*/
|
|
454
360
|
cost: CartCost;
|
|
455
361
|
/**
|
|
456
|
-
* A
|
|
362
|
+
* A list of delivery groups containing information about the delivery of the items the customer intends to purchase.
|
|
457
363
|
*/
|
|
458
|
-
|
|
364
|
+
deliveryGroups: StatefulRemoteSubscribable<DeliveryGroup[]>;
|
|
459
365
|
/**
|
|
460
|
-
*
|
|
461
|
-
* successful, this mutation results in an update to the value retrieved
|
|
462
|
-
* through the `note` property.
|
|
366
|
+
* A list of discount codes currently applied to the checkout.
|
|
463
367
|
*/
|
|
464
|
-
|
|
368
|
+
discountCodes: StatefulRemoteSubscribable<CartDiscountCode[]>;
|
|
465
369
|
/**
|
|
466
|
-
*
|
|
370
|
+
* Discounts that have been applied to the entire cart.
|
|
467
371
|
*/
|
|
468
|
-
|
|
372
|
+
discountAllocations: StatefulRemoteSubscribable<CartDiscountAllocation[]>;
|
|
469
373
|
/**
|
|
470
|
-
*
|
|
471
|
-
* successful, this mutation results in an update to the value retrieved
|
|
472
|
-
* through the `attributes` property.
|
|
374
|
+
* Meta information about the extension.
|
|
473
375
|
*/
|
|
474
|
-
|
|
376
|
+
extension: Extension;
|
|
377
|
+
/**
|
|
378
|
+
* The identifier of the running extension point.
|
|
379
|
+
* @example 'Checkout::PostPurchase::Render'
|
|
380
|
+
*/
|
|
381
|
+
extensionPoint: ExtensionPoint;
|
|
382
|
+
/**
|
|
383
|
+
* Utilities for translating content and formatting values according to the current
|
|
384
|
+
* [`localization`](https://shopify.dev/docs/api/checkout-ui-extensions/apis/standardapi#properties-propertydetail-localization)
|
|
385
|
+
* of the checkout.
|
|
386
|
+
*
|
|
387
|
+
* See [localization examples](https://shopify.dev/docs/api/checkout-ui-extensions/apis/standardapi#example-localization)
|
|
388
|
+
* for more information.
|
|
389
|
+
*/
|
|
390
|
+
i18n: I18n;
|
|
391
|
+
/**
|
|
392
|
+
* A list of lines containing information about the items the customer intends to purchase.
|
|
393
|
+
*/
|
|
394
|
+
lines: StatefulRemoteSubscribable<CartLine[]>;
|
|
395
|
+
/**
|
|
396
|
+
* Details about the location, language, and currency of the buyer. For utilities to easily
|
|
397
|
+
* format and translate content based on these details, you can use the
|
|
398
|
+
* [`i18n`](https://shopify.dev/docs/api/checkout-ui-extensions/apis/standardapi#properties-propertydetail-i18n)
|
|
399
|
+
* object instead.
|
|
400
|
+
*/
|
|
401
|
+
localization: Localization;
|
|
475
402
|
/**
|
|
476
403
|
* The metafields that apply to the current checkout. The actual resource
|
|
477
404
|
* on which these metafields exist depends on the source of the checkout:
|
|
@@ -492,93 +419,124 @@ export interface StandardApi<ExtensionPoint extends AnyExtensionPoint> extends B
|
|
|
492
419
|
*/
|
|
493
420
|
metafields: StatefulRemoteSubscribable<Metafield[]>;
|
|
494
421
|
/**
|
|
495
|
-
*
|
|
496
|
-
* successful, this mutation results in an update to the value retrieved
|
|
497
|
-
* through the `metafields` property.
|
|
498
|
-
*/
|
|
499
|
-
applyMetafieldChange(change: MetafieldChange): Promise<MetafieldChangeResult>;
|
|
500
|
-
/**
|
|
501
|
-
* A list of lines containing information about the items the customer intends to purchase.
|
|
422
|
+
* A note left by the customer to the merchant, either in their cart or during checkout.
|
|
502
423
|
*/
|
|
503
|
-
|
|
424
|
+
note: StatefulRemoteSubscribable<string | undefined>;
|
|
504
425
|
/**
|
|
505
426
|
* A list of the line items displayed in the checkout. These may be the same as lines, or may be a subset.
|
|
506
427
|
*/
|
|
507
428
|
presentmentLines: StatefulRemoteSubscribable<PresentmentCartLine[]>;
|
|
508
429
|
/**
|
|
509
|
-
*
|
|
510
|
-
*
|
|
511
|
-
*
|
|
430
|
+
* Used to query the Storefront GraphQL API with a prefetched token.
|
|
431
|
+
*
|
|
432
|
+
* See [storefront api access examples](https://shopify.dev/docs/api/checkout-ui-extensions/apis/standardapi#example-storefront-api-access) for more information.
|
|
512
433
|
*/
|
|
513
|
-
|
|
434
|
+
query: <Data = unknown, Variables = {
|
|
435
|
+
[key: string]: unknown;
|
|
436
|
+
}>(query: string, options?: {
|
|
437
|
+
variables?: Variables;
|
|
438
|
+
version?: StorefrontApiVersion;
|
|
439
|
+
}) => Promise<{
|
|
440
|
+
data?: Data;
|
|
441
|
+
errors?: GraphQLError[];
|
|
442
|
+
}>;
|
|
514
443
|
/**
|
|
515
|
-
*
|
|
444
|
+
* Payment options selected by the buyer.
|
|
516
445
|
*/
|
|
517
|
-
|
|
446
|
+
selectedPaymentOptions: StatefulRemoteSubscribable<SelectedPaymentOption[]>;
|
|
518
447
|
/**
|
|
519
|
-
*
|
|
448
|
+
* Provides access to session tokens, which can be used to verify token claims on your app's server.
|
|
449
|
+
*
|
|
450
|
+
* See [session token examples](https://shopify.dev/docs/api/checkout-ui-extensions/apis/standardapi#example-session-token) for more information.
|
|
520
451
|
*/
|
|
521
|
-
|
|
452
|
+
sessionToken: SessionToken;
|
|
522
453
|
/**
|
|
523
|
-
*
|
|
524
|
-
*
|
|
525
|
-
*
|
|
454
|
+
* The settings matching the settings definition written in the
|
|
455
|
+
* [`shopify.ui.extension.toml`](https://shopify.dev/docs/api/checkout-ui-extensions/configuration) file.
|
|
456
|
+
*
|
|
457
|
+
* See [settings examples](https://shopify.dev/docs/api/checkout-ui-extensions/apis/standardapi#example-settings) for more information.
|
|
458
|
+
*
|
|
459
|
+
* > Note: When an extension is being installed in the editor, the settings will be empty until
|
|
460
|
+
* a merchant sets a value. In that case, this object will be updated in real time as a merchant fills in the settings.
|
|
526
461
|
*/
|
|
527
|
-
|
|
462
|
+
settings: StatefulRemoteSubscribable<ExtensionSettings>;
|
|
528
463
|
/**
|
|
529
|
-
* The
|
|
530
|
-
*
|
|
464
|
+
* The proposed buyer shipping address. During the information step, the address
|
|
465
|
+
* updates when the field is committed (on change) rather than every keystroke.
|
|
466
|
+
* An address value is only present if delivery is required. Otherwise, the
|
|
467
|
+
* subscribable value is undefined.
|
|
468
|
+
*
|
|
469
|
+
* {% include /apps/checkout/privacy-icon.md %} Requires access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data).
|
|
531
470
|
*/
|
|
532
|
-
|
|
471
|
+
shippingAddress?: StatefulRemoteSubscribable<MailingAddress | undefined>;
|
|
472
|
+
/** Shop where the checkout is taking place. */
|
|
473
|
+
shop: Shop;
|
|
533
474
|
/**
|
|
534
|
-
*
|
|
535
|
-
* format and translate content based on these details, you can use the `i18n` object instead.
|
|
475
|
+
* Key-value storage for the extension point.
|
|
536
476
|
*/
|
|
537
|
-
|
|
477
|
+
storage: Storage;
|
|
538
478
|
/**
|
|
539
|
-
*
|
|
540
|
-
* of the checkout.
|
|
479
|
+
* Methods to interact with the extension's UI.
|
|
541
480
|
*/
|
|
542
|
-
|
|
481
|
+
ui: Ui;
|
|
543
482
|
/**
|
|
544
|
-
* The
|
|
483
|
+
* The renderer version being used for the extension.
|
|
545
484
|
*
|
|
546
|
-
*
|
|
547
|
-
* a merchant sets a value. In that case, this object will be updated in real time as a merchant fills in the settings.
|
|
485
|
+
* @example 'unstable'
|
|
548
486
|
*/
|
|
549
|
-
|
|
487
|
+
version: Version;
|
|
488
|
+
}
|
|
489
|
+
export interface Ui {
|
|
490
|
+
overlay: {
|
|
491
|
+
close(overlayId: string): void;
|
|
492
|
+
};
|
|
493
|
+
}
|
|
494
|
+
export interface SessionToken {
|
|
550
495
|
/**
|
|
551
|
-
*
|
|
496
|
+
* Requests a session token that hasn't expired. You should call this method every
|
|
497
|
+
* time you need to make a request to your backend in order to get a valid token.
|
|
498
|
+
* This method will return cached tokens when possible, so you don’t need to worry
|
|
499
|
+
* about storing these tokens yourself.
|
|
552
500
|
*/
|
|
553
|
-
|
|
501
|
+
get(): Promise<string>;
|
|
554
502
|
}
|
|
555
503
|
export interface BuyerIdentity {
|
|
556
504
|
/**
|
|
557
|
-
* The customer account
|
|
558
|
-
*
|
|
559
|
-
* for this shop.
|
|
505
|
+
* The buyer's customer account. The value is undefined if the buyer isn’t a
|
|
506
|
+
* known customer for this shop or if they haven't logged in yet.
|
|
560
507
|
*
|
|
561
|
-
*
|
|
562
|
-
* More info - https://shopify.dev/apps/store/data-protection/protected-customer-data
|
|
508
|
+
* {% include /apps/checkout/privacy-icon.md %} Requires access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data).
|
|
563
509
|
*/
|
|
564
510
|
customer: StatefulRemoteSubscribable<Customer | undefined>;
|
|
565
511
|
/**
|
|
566
|
-
* The email address of the buyer that is interacting with the cart.
|
|
567
|
-
*
|
|
512
|
+
* The email address of the buyer that is interacting with the cart.
|
|
513
|
+
* The value is `undefined` if the app does not have access to customer data.
|
|
568
514
|
*
|
|
569
|
-
*
|
|
570
|
-
* More info - https://shopify.dev/apps/store/data-protection/protected-customer-data
|
|
515
|
+
* {% include /apps/checkout/privacy-icon.md %} Requires level 2 access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data).
|
|
571
516
|
*/
|
|
572
517
|
email: StatefulRemoteSubscribable<string | undefined>;
|
|
573
518
|
/**
|
|
574
|
-
* The phone number of the buyer that is interacting with the cart.
|
|
575
|
-
*
|
|
519
|
+
* The phone number of the buyer that is interacting with the cart.
|
|
520
|
+
* The value is `undefined` if the app does not have access to customer data.
|
|
576
521
|
*
|
|
577
|
-
*
|
|
578
|
-
* More info - https://shopify.dev/apps/store/data-protection/protected-customer-data
|
|
522
|
+
* {% include /apps/checkout/privacy-icon.md %} Requires level 2 access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data).
|
|
579
523
|
*/
|
|
580
524
|
phone: StatefulRemoteSubscribable<string | undefined>;
|
|
581
525
|
}
|
|
526
|
+
export interface AppliedGiftCard {
|
|
527
|
+
/**
|
|
528
|
+
* The last four characters of the applied gift card's code.
|
|
529
|
+
*/
|
|
530
|
+
lastCharacters: string;
|
|
531
|
+
/**
|
|
532
|
+
* The amount of the applied gift card that will be used when the checkout is completed.
|
|
533
|
+
*/
|
|
534
|
+
amountUsed: Money;
|
|
535
|
+
/**
|
|
536
|
+
* The current balance of the applied gift card prior to checkout completion.
|
|
537
|
+
*/
|
|
538
|
+
balance: Money;
|
|
539
|
+
}
|
|
582
540
|
export interface Shop {
|
|
583
541
|
/**
|
|
584
542
|
* The shop ID.
|
|
@@ -601,56 +559,89 @@ export interface Shop {
|
|
|
601
559
|
export interface MailingAddress {
|
|
602
560
|
/**
|
|
603
561
|
* The buyer's full name.
|
|
562
|
+
*
|
|
563
|
+
* {% include /apps/checkout/privacy-icon.md %} Requires level 2 access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data).
|
|
564
|
+
*
|
|
604
565
|
* @example 'John Doe'
|
|
605
566
|
*/
|
|
606
567
|
name?: string;
|
|
607
568
|
/**
|
|
608
569
|
* The buyer's first name.
|
|
570
|
+
*
|
|
571
|
+
* {% include /apps/checkout/privacy-icon.md %} Requires level 2 access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data).
|
|
572
|
+
*
|
|
609
573
|
* @example 'John'
|
|
610
574
|
*/
|
|
611
575
|
firstName?: string;
|
|
612
576
|
/**
|
|
613
577
|
* The buyer's last name.
|
|
578
|
+
*
|
|
579
|
+
* {% include /apps/checkout/privacy-icon.md %} Requires level 2 access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data).
|
|
580
|
+
*
|
|
614
581
|
* @example 'Doe'
|
|
615
582
|
*/
|
|
616
583
|
lastName?: string;
|
|
617
584
|
/**
|
|
618
585
|
* The buyer's company name.
|
|
586
|
+
*
|
|
587
|
+
* {% include /apps/checkout/privacy-icon.md %} Requires level 1 access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data).
|
|
588
|
+
*
|
|
619
589
|
* @example 'Shopify'
|
|
620
590
|
*/
|
|
621
591
|
company?: string;
|
|
622
592
|
/**
|
|
623
593
|
* The first line of the buyer's address, including street name and number.
|
|
594
|
+
*
|
|
595
|
+
* {% include /apps/checkout/privacy-icon.md %} Requires level 2 access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data).
|
|
596
|
+
*
|
|
624
597
|
* @example '151 O'Connor Street'
|
|
625
598
|
*/
|
|
626
599
|
address1?: string;
|
|
627
600
|
/**
|
|
628
601
|
* The second line of the buyer's address, like apartment number, suite, etc.
|
|
602
|
+
*
|
|
603
|
+
* {% include /apps/checkout/privacy-icon.md %} Requires level 2 access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data).
|
|
604
|
+
*
|
|
629
605
|
* @example 'Ground floor'
|
|
630
606
|
*/
|
|
631
607
|
address2?: string;
|
|
632
608
|
/**
|
|
633
609
|
* The buyer's city.
|
|
610
|
+
*
|
|
611
|
+
* {% include /apps/checkout/privacy-icon.md %} Requires level 2 access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data).
|
|
612
|
+
*
|
|
634
613
|
* @example 'Ottawa'
|
|
635
614
|
*/
|
|
636
615
|
city?: string;
|
|
637
616
|
/**
|
|
638
617
|
* The buyer's postal or ZIP code.
|
|
618
|
+
*
|
|
619
|
+
* {% include /apps/checkout/privacy-icon.md %} Requires level 2 access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data).
|
|
620
|
+
*
|
|
639
621
|
* @example 'K2P 2L8'
|
|
640
622
|
*/
|
|
641
623
|
zip?: string;
|
|
642
624
|
/**
|
|
643
625
|
* The ISO 3166 Alpha-2 format for the buyer's country. Refer to https://www.iso.org/iso-3166-country-codes.html.
|
|
626
|
+
*
|
|
627
|
+
* {% include /apps/checkout/privacy-icon.md %} Requires level 2 access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data).
|
|
628
|
+
*
|
|
644
629
|
* @example 'CA' for Canada.
|
|
645
630
|
*/
|
|
646
631
|
countryCode?: CountryCode;
|
|
647
632
|
/**
|
|
648
633
|
* The buyer's zone code, such as state, province, prefecture, or region.
|
|
634
|
+
*
|
|
635
|
+
* {% include /apps/checkout/privacy-icon.md %} Requires level 2 access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data).
|
|
636
|
+
*
|
|
649
637
|
* @example 'ON' for Ontario.
|
|
650
638
|
*/
|
|
651
639
|
provinceCode?: string;
|
|
652
640
|
/**
|
|
653
641
|
* The buyer's phone number.
|
|
642
|
+
*
|
|
643
|
+
* {% include /apps/checkout/privacy-icon.md %} Requires level 2 access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data).
|
|
644
|
+
*
|
|
654
645
|
* @example '+1 613 111 2222'.
|
|
655
646
|
*/
|
|
656
647
|
phone?: string;
|
|
@@ -692,22 +683,44 @@ export interface CartLine {
|
|
|
692
683
|
* Discounts applied to the cart line.
|
|
693
684
|
*/
|
|
694
685
|
discountAllocations: CartDiscountAllocation[];
|
|
695
|
-
/**
|
|
696
|
-
|
|
686
|
+
/**
|
|
687
|
+
* Sub lines of the merchandise line. If no sub lines are present, this will be an empty array.
|
|
688
|
+
*/
|
|
689
|
+
lineComponents: CartLineComponentType[];
|
|
697
690
|
}
|
|
698
|
-
/** @private */
|
|
699
691
|
type CartLineComponentType = CartBundleLineComponent;
|
|
700
|
-
/** @private */
|
|
701
692
|
export interface CartBundleLineComponent {
|
|
693
|
+
type: 'bundle';
|
|
694
|
+
/**
|
|
695
|
+
* A unique identifier for the bundle line component.
|
|
696
|
+
*
|
|
697
|
+
* This ID is not stable. If an operation updates the line items in any way, all IDs could change.
|
|
698
|
+
*
|
|
699
|
+
* @example 'gid://shopify/CartLineComponent/123'
|
|
700
|
+
*/
|
|
702
701
|
id: string;
|
|
702
|
+
/**
|
|
703
|
+
* The merchandise of this bundle line component.
|
|
704
|
+
*/
|
|
703
705
|
merchandise: Merchandise;
|
|
706
|
+
/**
|
|
707
|
+
* The quantity of merchandise being purchased.
|
|
708
|
+
*/
|
|
704
709
|
quantity: number;
|
|
710
|
+
/**
|
|
711
|
+
* The cost attributed to this bundle line component.
|
|
712
|
+
*/
|
|
705
713
|
cost: CartLineCost;
|
|
714
|
+
/**
|
|
715
|
+
* Additional custom attributes for the bundle line component.
|
|
716
|
+
*
|
|
717
|
+
* @example [{key: 'engraving', value: 'hello world'}]
|
|
718
|
+
*/
|
|
706
719
|
attributes: Attribute[];
|
|
707
720
|
}
|
|
708
721
|
export interface CartLineCost {
|
|
709
722
|
/**
|
|
710
|
-
* The total amount the buyer can expect to pay that is directly attributable to a single
|
|
723
|
+
* The total amount after reductions the buyer can expect to pay that is directly attributable to a single
|
|
711
724
|
* cart line.
|
|
712
725
|
*/
|
|
713
726
|
totalAmount: Money;
|
|
@@ -758,6 +771,14 @@ export interface ProductVariant extends BaseMerchandise {
|
|
|
758
771
|
* The product object that the product variant belongs to.
|
|
759
772
|
*/
|
|
760
773
|
product: Product;
|
|
774
|
+
/**
|
|
775
|
+
* Whether or not the product requires shipping.
|
|
776
|
+
*/
|
|
777
|
+
requiresShipping: boolean;
|
|
778
|
+
/**
|
|
779
|
+
* The selling plan associated with the merchandise.
|
|
780
|
+
*/
|
|
781
|
+
sellingPlan?: SellingPlan;
|
|
761
782
|
}
|
|
762
783
|
export interface Product {
|
|
763
784
|
/**
|
|
@@ -783,16 +804,6 @@ export interface ImageDetails {
|
|
|
783
804
|
*/
|
|
784
805
|
altText?: string;
|
|
785
806
|
}
|
|
786
|
-
export interface Attribute {
|
|
787
|
-
/**
|
|
788
|
-
* The key for the attribute.
|
|
789
|
-
*/
|
|
790
|
-
key: string;
|
|
791
|
-
/**
|
|
792
|
-
* The value for the attribute.
|
|
793
|
-
*/
|
|
794
|
-
value: string;
|
|
795
|
-
}
|
|
796
807
|
export interface SelectedOption {
|
|
797
808
|
/**
|
|
798
809
|
* The name of the merchandise option.
|
|
@@ -841,83 +852,46 @@ export interface PresentmentCartLineCost {
|
|
|
841
852
|
*/
|
|
842
853
|
totalAmount: Money;
|
|
843
854
|
}
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
type: 'success';
|
|
849
|
-
}
|
|
850
|
-
export interface CartLineChangeResultError {
|
|
851
|
-
/**
|
|
852
|
-
* Indicates that the line item was not changed successfully. Refer to the `message` property for details about the error.
|
|
853
|
-
*/
|
|
854
|
-
type: 'error';
|
|
855
|
-
/**
|
|
856
|
-
* A message that explains the error. This message is useful for debugging.
|
|
857
|
-
* It is **not** localized, and therefore should not be presented directly
|
|
858
|
-
* to the buyer.
|
|
859
|
-
*/
|
|
860
|
-
message: string;
|
|
861
|
-
}
|
|
862
|
-
export type CartLineChangeResult = CartLineChangeResultSuccess | CartLineChangeResultError;
|
|
863
|
-
export type CartLineChange = CartLineAddChange | CartLineRemoveChange | CartLineUpdateChange;
|
|
864
|
-
export interface CartLineAddChange {
|
|
865
|
-
/**
|
|
866
|
-
* An identifier for changes that add line items.
|
|
867
|
-
*/
|
|
868
|
-
type: 'addCartLine';
|
|
869
|
-
/**
|
|
870
|
-
* The merchandise ID being added.
|
|
871
|
-
* @example 'gid://shopify/ProductVariant/123'
|
|
872
|
-
*/
|
|
873
|
-
merchandiseId: string;
|
|
874
|
-
/**
|
|
875
|
-
* The quantity of the merchandise being added.
|
|
876
|
-
*/
|
|
877
|
-
quantity: number;
|
|
878
|
-
/**
|
|
879
|
-
* The attributes associated with the line item.
|
|
880
|
-
*/
|
|
881
|
-
attributes?: Attribute[];
|
|
882
|
-
}
|
|
883
|
-
export interface CartLineRemoveChange {
|
|
884
|
-
/**
|
|
885
|
-
* An identifier for changes that remove line items.
|
|
886
|
-
*/
|
|
887
|
-
type: 'removeCartLine';
|
|
888
|
-
/**
|
|
889
|
-
* Line Item ID.
|
|
890
|
-
* @example 'gid://shopify/CartLine/123'
|
|
891
|
-
*/
|
|
892
|
-
id: string;
|
|
855
|
+
/**
|
|
856
|
+
* A payment option presented to the buyer.
|
|
857
|
+
*/
|
|
858
|
+
export interface PaymentOption {
|
|
893
859
|
/**
|
|
894
|
-
* The
|
|
860
|
+
* The type of the payment option.
|
|
861
|
+
*
|
|
862
|
+
* Shops can be configured to support many different payment options. Some options are only available to buyers in specific regions.
|
|
863
|
+
*
|
|
864
|
+
* | Type | Description |
|
|
865
|
+
* |---|---|
|
|
866
|
+
* | `creditCard` | A vaulted or manually entered credit card. |
|
|
867
|
+
* | `deferred` | A [deferred payment](https://help.shopify.com/en/manual/orders/deferred-payments), such as invoicing the buyer and collecting payment at a later time. |
|
|
868
|
+
* | `local` | A [local payment option](https://help.shopify.com/en/manual/payments/shopify-payments/local-payment-methods) specific to the current region or market |
|
|
869
|
+
* | `manualPayment` | A manual payment option such as an in-person retail transaction. |
|
|
870
|
+
* | `offsite` | A payment processed outside of Shopify's checkout, excluding integrated wallets. |
|
|
871
|
+
* | `other` | Another type of payment not defined here. |
|
|
872
|
+
* | `paymentOnDelivery` | A payment that will be collected on delivery. |
|
|
873
|
+
* | `redeemable` | A redeemable payment option such as a gift card or store credit. |
|
|
874
|
+
* | `wallet` | An integrated wallet such as PayPal, Google Pay, Apple Pay, etc. |
|
|
875
|
+
* | `customOnsite` | A custom payment option that is processed through a checkout extension with a payments app. |
|
|
876
|
+
*/
|
|
877
|
+
type: 'creditCard' | 'deferred' | 'local' | 'manualPayment' | 'offsite' | 'other' | 'paymentOnDelivery' | 'redeemable' | 'wallet' | 'customOnsite';
|
|
878
|
+
/**
|
|
879
|
+
* The unique handle for the payment option.
|
|
880
|
+
*
|
|
881
|
+
* This is not a globally unique identifier. It may be an identifier specific to the given checkout session or the current shop.
|
|
895
882
|
*/
|
|
896
|
-
|
|
883
|
+
handle: string;
|
|
897
884
|
}
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
type: 'updateCartLine';
|
|
903
|
-
/**
|
|
904
|
-
* Line Item ID.
|
|
905
|
-
* @example 'gid://shopify/CartLine/123'
|
|
906
|
-
*/
|
|
907
|
-
id: string;
|
|
908
|
-
/**
|
|
909
|
-
* The new merchandise ID for the line item.
|
|
910
|
-
* @example 'gid://shopify/ProductVariant/123'
|
|
911
|
-
*/
|
|
912
|
-
merchandiseId?: string;
|
|
913
|
-
/**
|
|
914
|
-
* The new quantity for the line item.
|
|
915
|
-
*/
|
|
916
|
-
quantity?: number;
|
|
885
|
+
/**
|
|
886
|
+
* A payment option selected by the buyer.
|
|
887
|
+
*/
|
|
888
|
+
export interface SelectedPaymentOption {
|
|
917
889
|
/**
|
|
918
|
-
* The
|
|
890
|
+
* The unique handle referencing `PaymentOption.handle`.
|
|
891
|
+
*
|
|
892
|
+
* See [availablePaymentOptions](https://shopify.dev/docs/api/checkout-ui-extensions/unstable/apis/standardapi#properties-propertydetail-availablepaymentoptions).
|
|
919
893
|
*/
|
|
920
|
-
|
|
894
|
+
handle: string;
|
|
921
895
|
}
|
|
922
896
|
export interface CartDiscountCode {
|
|
923
897
|
/**
|
|
@@ -962,46 +936,6 @@ export interface CartCustomDiscountAllocation extends CartDiscountAllocationBase
|
|
|
962
936
|
*/
|
|
963
937
|
type: 'custom';
|
|
964
938
|
}
|
|
965
|
-
export type DiscountCodeChange = DiscountCodeAddChange | DiscountCodeRemoveChange;
|
|
966
|
-
export type DiscountCodeChangeResult = DiscountCodeChangeResultSuccess | DiscountCodeChangeResultError;
|
|
967
|
-
export interface DiscountCodeAddChange {
|
|
968
|
-
/**
|
|
969
|
-
* The type of the `DiscountCodeChange` API.
|
|
970
|
-
*/
|
|
971
|
-
type: 'addDiscountCode';
|
|
972
|
-
/**
|
|
973
|
-
* The code for the discount
|
|
974
|
-
*/
|
|
975
|
-
code: string;
|
|
976
|
-
}
|
|
977
|
-
export interface DiscountCodeRemoveChange {
|
|
978
|
-
/**
|
|
979
|
-
* The type of the `DiscountCodeChange` API.
|
|
980
|
-
*/
|
|
981
|
-
type: 'removeDiscountCode';
|
|
982
|
-
/**
|
|
983
|
-
* The code for the discount
|
|
984
|
-
*/
|
|
985
|
-
code: string;
|
|
986
|
-
}
|
|
987
|
-
export interface DiscountCodeChangeResultSuccess {
|
|
988
|
-
/**
|
|
989
|
-
* Indicates that the discount code change was applied successfully.
|
|
990
|
-
*/
|
|
991
|
-
type: 'success';
|
|
992
|
-
}
|
|
993
|
-
export interface DiscountCodeChangeResultError {
|
|
994
|
-
/**
|
|
995
|
-
* Indicates that the discount code change failed.
|
|
996
|
-
*/
|
|
997
|
-
type: 'error';
|
|
998
|
-
/**
|
|
999
|
-
* A message that explains the error. This message is useful for debugging.
|
|
1000
|
-
* It is **not** localized, and therefore should not be presented directly
|
|
1001
|
-
* to the buyer.
|
|
1002
|
-
*/
|
|
1003
|
-
message: string;
|
|
1004
|
-
}
|
|
1005
939
|
type InterceptorResult = InterceptorResultAllow | InterceptorResultBlock;
|
|
1006
940
|
interface InterceptorResultAllow {
|
|
1007
941
|
/**
|
|
@@ -1042,13 +976,17 @@ interface InterceptorRequestBlock {
|
|
|
1042
976
|
* own internal debugging and metrics.
|
|
1043
977
|
*/
|
|
1044
978
|
reason: string;
|
|
979
|
+
/**
|
|
980
|
+
* Used to pass errors to the checkout UI, outside your extension's UI boundaries.
|
|
981
|
+
*/
|
|
982
|
+
errors?: ValidationError[];
|
|
1045
983
|
/**
|
|
1046
984
|
* This callback is called when all interceptors finish. We recommend
|
|
1047
985
|
* setting errors or reasons for blocking at this stage, so that all the errors in
|
|
1048
986
|
* the UI show up at once.
|
|
1049
987
|
* @param result InterceptorResult with behavior as either 'allow' or 'block'
|
|
1050
988
|
*/
|
|
1051
|
-
perform(result: InterceptorResult): void | Promise<void>;
|
|
989
|
+
perform?(result: InterceptorResult): void | Promise<void>;
|
|
1052
990
|
}
|
|
1053
991
|
export interface InterceptorProps {
|
|
1054
992
|
/**
|
|
@@ -1057,52 +995,92 @@ export interface InterceptorProps {
|
|
|
1057
995
|
*/
|
|
1058
996
|
canBlockProgress: boolean;
|
|
1059
997
|
}
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
}
|
|
998
|
+
/**
|
|
999
|
+
* A function for intercepting and preventing navigation on checkout. You can block
|
|
1000
|
+
* navigation by returning an object with
|
|
1001
|
+
* `{behavior: 'block', reason: InvalidResultReason.InvalidExtensionState, errors?: ValidationErrors[]}`.
|
|
1002
|
+
* If you do, then you're expected to also update some part of your UI to reflect the reason why navigation
|
|
1003
|
+
* was blocked, either by targeting checkout UI fields, passing errors to the page level or rendering the errors in your extension.
|
|
1004
|
+
*/
|
|
1005
|
+
export type Interceptor = (interceptorProps: InterceptorProps) => InterceptorRequest | Promise<InterceptorRequest>;
|
|
1069
1006
|
/**
|
|
1070
1007
|
* Information about a customer who has previously purchased from this shop.
|
|
1008
|
+
*
|
|
1009
|
+
* {% include /apps/checkout/privacy-icon.md %} Requires access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data).
|
|
1071
1010
|
*/
|
|
1072
1011
|
export interface Customer {
|
|
1073
1012
|
/**
|
|
1074
1013
|
* Customer ID.
|
|
1014
|
+
*
|
|
1015
|
+
* {% include /apps/checkout/privacy-icon.md %} Requires level 1 access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data).
|
|
1016
|
+
*
|
|
1075
1017
|
* @example 'gid://shopify/Customer/123'
|
|
1076
1018
|
*/
|
|
1077
1019
|
id: string;
|
|
1078
1020
|
/**
|
|
1079
1021
|
* The email of the customer.
|
|
1022
|
+
*
|
|
1023
|
+
* {% include /apps/checkout/privacy-icon.md %} Requires level 2 access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data).
|
|
1080
1024
|
*/
|
|
1081
1025
|
email?: string;
|
|
1082
1026
|
/**
|
|
1083
1027
|
* The phone number of the customer.
|
|
1028
|
+
*
|
|
1029
|
+
* {% include /apps/checkout/privacy-icon.md %} Requires level 2 access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data).
|
|
1084
1030
|
*/
|
|
1085
1031
|
phone?: string;
|
|
1086
1032
|
/**
|
|
1087
1033
|
* The full name of the customer.
|
|
1034
|
+
*
|
|
1035
|
+
* {% include /apps/checkout/privacy-icon.md %} Requires level 2 access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data).
|
|
1088
1036
|
*/
|
|
1089
1037
|
fullName?: string;
|
|
1090
1038
|
/**
|
|
1091
1039
|
* The first name of the customer.
|
|
1040
|
+
*
|
|
1041
|
+
* {% include /apps/checkout/privacy-icon.md %} Requires level 2 access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data).
|
|
1092
1042
|
*/
|
|
1093
1043
|
firstName?: string;
|
|
1094
1044
|
/**
|
|
1095
1045
|
* The last name of the customer.
|
|
1046
|
+
*
|
|
1047
|
+
* {% include /apps/checkout/privacy-icon.md %} Requires level 2 access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data).
|
|
1096
1048
|
*/
|
|
1097
1049
|
lastName?: string;
|
|
1098
1050
|
/**
|
|
1099
1051
|
* The image associated with the customer.
|
|
1052
|
+
*
|
|
1053
|
+
* {% include /apps/checkout/privacy-icon.md %} Requires level 1 access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data).
|
|
1100
1054
|
*/
|
|
1101
1055
|
image: ImageDetails;
|
|
1102
1056
|
/**
|
|
1103
1057
|
* Defines if the customer accepts marketing activities.
|
|
1058
|
+
*
|
|
1059
|
+
* {% include /apps/checkout/privacy-icon.md %} Requires level 1 access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data).
|
|
1104
1060
|
*/
|
|
1105
1061
|
acceptsMarketing: boolean;
|
|
1062
|
+
/**
|
|
1063
|
+
* The Store Credit Accounts owned by the customer and usable during the checkout process.
|
|
1064
|
+
*
|
|
1065
|
+
* {% include /apps/checkout/privacy-icon.md %} Requires level 1 access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data).
|
|
1066
|
+
*
|
|
1067
|
+
* @private
|
|
1068
|
+
*/
|
|
1069
|
+
storeCreditAccounts: StoreCreditAccount[];
|
|
1070
|
+
}
|
|
1071
|
+
/**
|
|
1072
|
+
* Information about a Store Credit Account.
|
|
1073
|
+
*/
|
|
1074
|
+
export interface StoreCreditAccount {
|
|
1075
|
+
/**
|
|
1076
|
+
* A globally-unique identifier.
|
|
1077
|
+
* @example 'gid://shopify/StoreCreditAccount/1'
|
|
1078
|
+
*/
|
|
1079
|
+
id: string;
|
|
1080
|
+
/**
|
|
1081
|
+
* The current balance of the Store Credit Account.
|
|
1082
|
+
*/
|
|
1083
|
+
balance: Money;
|
|
1106
1084
|
}
|
|
1107
1085
|
/**
|
|
1108
1086
|
* The merchant-defined setting values for the extension.
|
|
@@ -1110,13 +1088,191 @@ export interface Customer {
|
|
|
1110
1088
|
export interface ExtensionSettings {
|
|
1111
1089
|
[key: string]: string | number | boolean | undefined;
|
|
1112
1090
|
}
|
|
1113
|
-
/**
|
|
1114
|
-
* Publish method to emit analytics events to Web Pixels.
|
|
1115
|
-
*/
|
|
1116
1091
|
export interface Analytics {
|
|
1092
|
+
/**
|
|
1093
|
+
* Publish method to emit analytics events to [Web Pixels](https://shopify.dev/docs/apps/marketing).
|
|
1094
|
+
*/
|
|
1117
1095
|
publish(name: string, data: {
|
|
1118
1096
|
[key: string]: unknown;
|
|
1119
1097
|
}): Promise<boolean>;
|
|
1120
1098
|
}
|
|
1099
|
+
/**
|
|
1100
|
+
* Represents the delivery information and options available for one or
|
|
1101
|
+
* more cart lines.
|
|
1102
|
+
*/
|
|
1103
|
+
export interface DeliveryGroup {
|
|
1104
|
+
/**
|
|
1105
|
+
* The cart line references associated to the delivery group.
|
|
1106
|
+
*/
|
|
1107
|
+
targetedCartLines: CartLineReference[];
|
|
1108
|
+
/**
|
|
1109
|
+
* The delivery options available for the delivery group.
|
|
1110
|
+
*/
|
|
1111
|
+
deliveryOptions: DeliveryOption[];
|
|
1112
|
+
/**
|
|
1113
|
+
* The selected delivery option for the delivery group.
|
|
1114
|
+
*/
|
|
1115
|
+
selectedDeliveryOption?: DeliveryOptionReference;
|
|
1116
|
+
/**
|
|
1117
|
+
* The type of the delivery group.
|
|
1118
|
+
*/
|
|
1119
|
+
groupType: DeliveryGroupType;
|
|
1120
|
+
/**
|
|
1121
|
+
* Whether delivery is required for the delivery group.
|
|
1122
|
+
*/
|
|
1123
|
+
deliveryRequired: boolean;
|
|
1124
|
+
}
|
|
1125
|
+
/**
|
|
1126
|
+
* The possible types of a delivery group.
|
|
1127
|
+
*/
|
|
1128
|
+
export type DeliveryGroupType = 'oneTimePurchase' | 'subscription';
|
|
1129
|
+
/**
|
|
1130
|
+
* Represents a reference to a cart line.
|
|
1131
|
+
*/
|
|
1132
|
+
export interface CartLineReference {
|
|
1133
|
+
/**
|
|
1134
|
+
* The unique identifier of the referenced cart line.
|
|
1135
|
+
*/
|
|
1136
|
+
id: string;
|
|
1137
|
+
}
|
|
1138
|
+
/**
|
|
1139
|
+
* Represents a reference to a delivery option.
|
|
1140
|
+
*/
|
|
1141
|
+
export interface DeliveryOptionReference {
|
|
1142
|
+
/**
|
|
1143
|
+
* The unique identifier of the referenced delivery option.
|
|
1144
|
+
*/
|
|
1145
|
+
handle: string;
|
|
1146
|
+
}
|
|
1147
|
+
/**
|
|
1148
|
+
* Represents a base interface for a single delivery option.
|
|
1149
|
+
*/
|
|
1150
|
+
export interface DeliveryOption {
|
|
1151
|
+
/**
|
|
1152
|
+
* The unique identifier of the delivery option.
|
|
1153
|
+
*/
|
|
1154
|
+
handle: string;
|
|
1155
|
+
/**
|
|
1156
|
+
* The title of the delivery option.
|
|
1157
|
+
*/
|
|
1158
|
+
title?: string;
|
|
1159
|
+
/**
|
|
1160
|
+
* The description of the delivery option.
|
|
1161
|
+
*/
|
|
1162
|
+
description?: string;
|
|
1163
|
+
}
|
|
1164
|
+
/**
|
|
1165
|
+
* Represents a delivery option that is a shipping option.
|
|
1166
|
+
*/
|
|
1167
|
+
export interface ShippingOption extends DeliveryOption {
|
|
1168
|
+
/**
|
|
1169
|
+
* The type of this delivery option.
|
|
1170
|
+
*/
|
|
1171
|
+
type: 'shipping' | 'local';
|
|
1172
|
+
/**
|
|
1173
|
+
* Information about the carrier.
|
|
1174
|
+
*/
|
|
1175
|
+
carrier: ShippingOptionCarrier;
|
|
1176
|
+
/**
|
|
1177
|
+
* The cost of the delivery.
|
|
1178
|
+
*/
|
|
1179
|
+
cost: Money;
|
|
1180
|
+
/**
|
|
1181
|
+
* The cost of the delivery including discounts.
|
|
1182
|
+
*/
|
|
1183
|
+
costAfterDiscounts: Money;
|
|
1184
|
+
/**
|
|
1185
|
+
* Information about the estimated delivery time.
|
|
1186
|
+
*/
|
|
1187
|
+
deliveryEstimate: DeliveryEstimate;
|
|
1188
|
+
}
|
|
1189
|
+
export interface DeliveryEstimate {
|
|
1190
|
+
/**
|
|
1191
|
+
* The estimated time in transit for the delivery in seconds.
|
|
1192
|
+
*/
|
|
1193
|
+
timeInTransit?: NumberRange;
|
|
1194
|
+
}
|
|
1195
|
+
export interface ShippingOptionCarrier {
|
|
1196
|
+
/**
|
|
1197
|
+
* The name of the carrier.
|
|
1198
|
+
*/
|
|
1199
|
+
name?: string;
|
|
1200
|
+
}
|
|
1201
|
+
export interface PickupPointOption extends DeliveryOption {
|
|
1202
|
+
/**
|
|
1203
|
+
* The type of this delivery option.
|
|
1204
|
+
*/
|
|
1205
|
+
type: 'pickupPoint';
|
|
1206
|
+
/**
|
|
1207
|
+
* Information about the carrier that ships to the pickup point.
|
|
1208
|
+
*/
|
|
1209
|
+
carrier: PickupPointCarrier;
|
|
1210
|
+
/**
|
|
1211
|
+
* The cost to ship to this pickup point.
|
|
1212
|
+
*/
|
|
1213
|
+
cost: Money;
|
|
1214
|
+
/**
|
|
1215
|
+
* The cost to ship to this pickup point including discounts.
|
|
1216
|
+
*/
|
|
1217
|
+
costAfterDiscounts: Money;
|
|
1218
|
+
/**
|
|
1219
|
+
* The location details of the pickup point.
|
|
1220
|
+
*/
|
|
1221
|
+
location: PickupPointLocation;
|
|
1222
|
+
}
|
|
1223
|
+
export interface PickupLocationOption extends DeliveryOption {
|
|
1224
|
+
/**
|
|
1225
|
+
* The type of this delivery option.
|
|
1226
|
+
*/
|
|
1227
|
+
type: 'pickup';
|
|
1228
|
+
/**
|
|
1229
|
+
* The location details of the pickup location.
|
|
1230
|
+
*/
|
|
1231
|
+
location: PickupLocation;
|
|
1232
|
+
}
|
|
1233
|
+
interface PickupLocation {
|
|
1234
|
+
/**
|
|
1235
|
+
* The name of the pickup location.
|
|
1236
|
+
*/
|
|
1237
|
+
name?: string;
|
|
1238
|
+
/**
|
|
1239
|
+
* The address of the pickup location.
|
|
1240
|
+
*/
|
|
1241
|
+
address: MailingAddress;
|
|
1242
|
+
}
|
|
1243
|
+
interface PickupPointLocation {
|
|
1244
|
+
/**
|
|
1245
|
+
* The name of the pickup point.
|
|
1246
|
+
*/
|
|
1247
|
+
name?: string;
|
|
1248
|
+
/**
|
|
1249
|
+
* The unique identifier of the pickup point.
|
|
1250
|
+
*/
|
|
1251
|
+
handle: string;
|
|
1252
|
+
/**
|
|
1253
|
+
* The address of the pickup point.
|
|
1254
|
+
*/
|
|
1255
|
+
address: MailingAddress;
|
|
1256
|
+
}
|
|
1257
|
+
interface PickupPointCarrier {
|
|
1258
|
+
/**
|
|
1259
|
+
* The code identifying the carrier.
|
|
1260
|
+
*/
|
|
1261
|
+
code?: string;
|
|
1262
|
+
/**
|
|
1263
|
+
* The name of the carrier.
|
|
1264
|
+
*/
|
|
1265
|
+
name?: string;
|
|
1266
|
+
}
|
|
1267
|
+
export interface NumberRange {
|
|
1268
|
+
/**
|
|
1269
|
+
* The lower bound of the number range.
|
|
1270
|
+
*/
|
|
1271
|
+
lower?: number;
|
|
1272
|
+
/**
|
|
1273
|
+
* The upper bound of the number range.
|
|
1274
|
+
*/
|
|
1275
|
+
upper?: number;
|
|
1276
|
+
}
|
|
1121
1277
|
export {};
|
|
1122
1278
|
//# sourceMappingURL=standard.d.ts.map
|