@shopify/ui-extensions 0.0.0-internal-20230622171951
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 +42 -0
- package/build/cjs/index.js +2 -0
- package/build/cjs/surfaces/admin/components/Badge/Badge.js +12 -0
- package/build/cjs/surfaces/admin/components/Banner/Banner.js +14 -0
- package/build/cjs/surfaces/admin/components/BlockStack/BlockStack.js +15 -0
- package/build/cjs/surfaces/admin/components/Button/Button.js +12 -0
- package/build/cjs/surfaces/admin/components/Card/Card.js +15 -0
- package/build/cjs/surfaces/admin/components/CardSection/CardSection.js +12 -0
- package/build/cjs/surfaces/admin/components/Checkbox/Checkbox.js +12 -0
- package/build/cjs/surfaces/admin/components/CustomerSegmentationTemplate/CustomerSegmentationTemplate.js +12 -0
- package/build/cjs/surfaces/admin/components/Heading/Heading.js +12 -0
- package/build/cjs/surfaces/admin/components/Icon/Icon.js +12 -0
- package/build/cjs/surfaces/admin/components/InlineStack/InlineStack.js +15 -0
- package/build/cjs/surfaces/admin/components/Link/Link.js +12 -0
- package/build/cjs/surfaces/admin/components/Modal/Modal.js +14 -0
- package/build/cjs/surfaces/admin/components/OptionList/OptionList.js +15 -0
- package/build/cjs/surfaces/admin/components/Pressable/Pressable.js +13 -0
- package/build/cjs/surfaces/admin/components/Radio/Radio.js +12 -0
- package/build/cjs/surfaces/admin/components/ResourceItem/ResourceItem.js +14 -0
- package/build/cjs/surfaces/admin/components/ResourceList/ResourceList.js +15 -0
- package/build/cjs/surfaces/admin/components/Select/Select.js +14 -0
- package/build/cjs/surfaces/admin/components/Spinner/Spinner.js +12 -0
- package/build/cjs/surfaces/admin/components/StackItem/StackItem.js +14 -0
- package/build/cjs/surfaces/admin/components/Text/Text.js +12 -0
- package/build/cjs/surfaces/admin/components/TextBlock/TextBlock.js +13 -0
- package/build/cjs/surfaces/admin/components/TextField/TextField.js +14 -0
- package/build/cjs/surfaces/admin/components/Thumbnail/Thumbnail.js +12 -0
- package/build/cjs/surfaces/admin/extension.js +11 -0
- package/build/cjs/surfaces/admin.js +60 -0
- package/build/cjs/surfaces/checkout/components/Banner/Banner.js +12 -0
- package/build/cjs/surfaces/checkout/components/BlockLayout/BlockLayout.js +14 -0
- package/build/cjs/surfaces/checkout/components/BlockSpacer/BlockSpacer.js +15 -0
- package/build/cjs/surfaces/checkout/components/BlockStack/BlockStack.js +12 -0
- package/build/cjs/surfaces/checkout/components/Button/Button.js +12 -0
- package/build/cjs/surfaces/checkout/components/Checkbox/Checkbox.js +12 -0
- package/build/cjs/surfaces/checkout/components/Choice/Choice.js +13 -0
- package/build/cjs/surfaces/checkout/components/ChoiceList/ChoiceList.js +13 -0
- package/build/cjs/surfaces/checkout/components/Divider/Divider.js +12 -0
- package/build/cjs/surfaces/checkout/components/Form/Form.js +20 -0
- package/build/cjs/surfaces/checkout/components/Grid/Grid.js +12 -0
- package/build/cjs/surfaces/checkout/components/GridItem/GridItem.js +14 -0
- package/build/cjs/surfaces/checkout/components/Heading/Heading.js +17 -0
- package/build/cjs/surfaces/checkout/components/HeadingGroup/HeadingGroup.js +16 -0
- package/build/cjs/surfaces/checkout/components/Icon/Icon.js +13 -0
- package/build/cjs/surfaces/checkout/components/Image/Image.js +12 -0
- package/build/cjs/surfaces/checkout/components/InlineLayout/InlineLayout.js +16 -0
- package/build/cjs/surfaces/checkout/components/InlineSpacer/InlineSpacer.js +15 -0
- package/build/cjs/surfaces/checkout/components/InlineStack/InlineStack.js +12 -0
- package/build/cjs/surfaces/checkout/components/Link/Link.js +12 -0
- package/build/cjs/surfaces/checkout/components/List/List.js +12 -0
- package/build/cjs/surfaces/checkout/components/ListItem/ListItem.js +14 -0
- package/build/cjs/surfaces/checkout/components/PhoneField/PhoneField.js +17 -0
- package/build/cjs/surfaces/checkout/components/Pressable/Pressable.js +14 -0
- package/build/cjs/surfaces/checkout/components/ScrollView/ScrollView.js +13 -0
- package/build/cjs/surfaces/checkout/components/Select/Select.js +13 -0
- package/build/cjs/surfaces/checkout/components/SkeletonImage/SkeletonImage.js +12 -0
- package/build/cjs/surfaces/checkout/components/SkeletonText/SkeletonText.js +12 -0
- package/build/cjs/surfaces/checkout/components/SkeletonTextBlock/SkeletonTextBlock.js +12 -0
- package/build/cjs/surfaces/checkout/components/Spinner/Spinner.js +13 -0
- package/build/cjs/surfaces/checkout/components/Stepper/Stepper.js +12 -0
- package/build/cjs/surfaces/checkout/components/Tag/Tag.js +12 -0
- package/build/cjs/surfaces/checkout/components/Text/Text.js +13 -0
- package/build/cjs/surfaces/checkout/components/TextBlock/TextBlock.js +12 -0
- package/build/cjs/surfaces/checkout/components/TextField/TextField.js +12 -0
- package/build/cjs/surfaces/checkout/components/Tooltip/Tooltip.js +17 -0
- package/build/cjs/surfaces/checkout/components/View/View.js +17 -0
- package/build/cjs/surfaces/checkout/extension.js +11 -0
- package/build/cjs/surfaces/checkout/style/isEqual.js +29 -0
- package/build/cjs/surfaces/checkout/style/memoize.js +139 -0
- package/build/cjs/surfaces/checkout/style/style.js +74 -0
- package/build/cjs/surfaces/checkout.js +88 -0
- package/build/cjs/utilities/registration.js +45 -0
- package/build/esm/index.mjs +1 -0
- package/build/esm/surfaces/admin/components/Badge/Badge.mjs +8 -0
- package/build/esm/surfaces/admin/components/Banner/Banner.mjs +10 -0
- package/build/esm/surfaces/admin/components/BlockStack/BlockStack.mjs +11 -0
- package/build/esm/surfaces/admin/components/Button/Button.mjs +8 -0
- package/build/esm/surfaces/admin/components/Card/Card.mjs +11 -0
- package/build/esm/surfaces/admin/components/CardSection/CardSection.mjs +8 -0
- package/build/esm/surfaces/admin/components/Checkbox/Checkbox.mjs +8 -0
- package/build/esm/surfaces/admin/components/CustomerSegmentationTemplate/CustomerSegmentationTemplate.mjs +8 -0
- package/build/esm/surfaces/admin/components/Heading/Heading.mjs +8 -0
- package/build/esm/surfaces/admin/components/Icon/Icon.mjs +8 -0
- package/build/esm/surfaces/admin/components/InlineStack/InlineStack.mjs +11 -0
- package/build/esm/surfaces/admin/components/Link/Link.mjs +8 -0
- package/build/esm/surfaces/admin/components/Modal/Modal.mjs +10 -0
- package/build/esm/surfaces/admin/components/OptionList/OptionList.mjs +11 -0
- package/build/esm/surfaces/admin/components/Pressable/Pressable.mjs +9 -0
- package/build/esm/surfaces/admin/components/Radio/Radio.mjs +8 -0
- package/build/esm/surfaces/admin/components/ResourceItem/ResourceItem.mjs +10 -0
- package/build/esm/surfaces/admin/components/ResourceList/ResourceList.mjs +11 -0
- package/build/esm/surfaces/admin/components/Select/Select.mjs +10 -0
- package/build/esm/surfaces/admin/components/Spinner/Spinner.mjs +8 -0
- package/build/esm/surfaces/admin/components/StackItem/StackItem.mjs +10 -0
- package/build/esm/surfaces/admin/components/Text/Text.mjs +8 -0
- package/build/esm/surfaces/admin/components/TextBlock/TextBlock.mjs +9 -0
- package/build/esm/surfaces/admin/components/TextField/TextField.mjs +10 -0
- package/build/esm/surfaces/admin/components/Thumbnail/Thumbnail.mjs +8 -0
- package/build/esm/surfaces/admin/extension.mjs +6 -0
- package/build/esm/surfaces/admin.mjs +26 -0
- package/build/esm/surfaces/checkout/components/Banner/Banner.mjs +8 -0
- package/build/esm/surfaces/checkout/components/BlockLayout/BlockLayout.mjs +10 -0
- package/build/esm/surfaces/checkout/components/BlockSpacer/BlockSpacer.mjs +11 -0
- package/build/esm/surfaces/checkout/components/BlockStack/BlockStack.mjs +8 -0
- package/build/esm/surfaces/checkout/components/Button/Button.mjs +8 -0
- package/build/esm/surfaces/checkout/components/Checkbox/Checkbox.mjs +8 -0
- package/build/esm/surfaces/checkout/components/Choice/Choice.mjs +9 -0
- package/build/esm/surfaces/checkout/components/ChoiceList/ChoiceList.mjs +9 -0
- package/build/esm/surfaces/checkout/components/Divider/Divider.mjs +8 -0
- package/build/esm/surfaces/checkout/components/Form/Form.mjs +16 -0
- package/build/esm/surfaces/checkout/components/Grid/Grid.mjs +8 -0
- package/build/esm/surfaces/checkout/components/GridItem/GridItem.mjs +10 -0
- package/build/esm/surfaces/checkout/components/Heading/Heading.mjs +13 -0
- package/build/esm/surfaces/checkout/components/HeadingGroup/HeadingGroup.mjs +12 -0
- package/build/esm/surfaces/checkout/components/Icon/Icon.mjs +9 -0
- package/build/esm/surfaces/checkout/components/Image/Image.mjs +8 -0
- package/build/esm/surfaces/checkout/components/InlineLayout/InlineLayout.mjs +12 -0
- package/build/esm/surfaces/checkout/components/InlineSpacer/InlineSpacer.mjs +11 -0
- package/build/esm/surfaces/checkout/components/InlineStack/InlineStack.mjs +8 -0
- package/build/esm/surfaces/checkout/components/Link/Link.mjs +8 -0
- package/build/esm/surfaces/checkout/components/List/List.mjs +8 -0
- package/build/esm/surfaces/checkout/components/ListItem/ListItem.mjs +10 -0
- package/build/esm/surfaces/checkout/components/PhoneField/PhoneField.mjs +13 -0
- package/build/esm/surfaces/checkout/components/Pressable/Pressable.mjs +10 -0
- package/build/esm/surfaces/checkout/components/ScrollView/ScrollView.mjs +9 -0
- package/build/esm/surfaces/checkout/components/Select/Select.mjs +9 -0
- package/build/esm/surfaces/checkout/components/SkeletonImage/SkeletonImage.mjs +8 -0
- package/build/esm/surfaces/checkout/components/SkeletonText/SkeletonText.mjs +8 -0
- package/build/esm/surfaces/checkout/components/SkeletonTextBlock/SkeletonTextBlock.mjs +8 -0
- package/build/esm/surfaces/checkout/components/Spinner/Spinner.mjs +9 -0
- package/build/esm/surfaces/checkout/components/Stepper/Stepper.mjs +8 -0
- package/build/esm/surfaces/checkout/components/Tag/Tag.mjs +8 -0
- package/build/esm/surfaces/checkout/components/Text/Text.mjs +9 -0
- package/build/esm/surfaces/checkout/components/TextBlock/TextBlock.mjs +8 -0
- package/build/esm/surfaces/checkout/components/TextField/TextField.mjs +8 -0
- package/build/esm/surfaces/checkout/components/Tooltip/Tooltip.mjs +13 -0
- package/build/esm/surfaces/checkout/components/View/View.mjs +13 -0
- package/build/esm/surfaces/checkout/extension.mjs +6 -0
- package/build/esm/surfaces/checkout/style/isEqual.mjs +25 -0
- package/build/esm/surfaces/checkout/style/memoize.mjs +133 -0
- package/build/esm/surfaces/checkout/style/style.mjs +68 -0
- package/build/esm/surfaces/checkout.mjs +39 -0
- package/build/esm/utilities/registration.mjs +41 -0
- package/build/esnext/index.esnext +1 -0
- package/build/esnext/surfaces/admin/components/Badge/Badge.esnext +8 -0
- package/build/esnext/surfaces/admin/components/Banner/Banner.esnext +10 -0
- package/build/esnext/surfaces/admin/components/BlockStack/BlockStack.esnext +11 -0
- package/build/esnext/surfaces/admin/components/Button/Button.esnext +8 -0
- package/build/esnext/surfaces/admin/components/Card/Card.esnext +11 -0
- package/build/esnext/surfaces/admin/components/CardSection/CardSection.esnext +8 -0
- package/build/esnext/surfaces/admin/components/Checkbox/Checkbox.esnext +8 -0
- package/build/esnext/surfaces/admin/components/CustomerSegmentationTemplate/CustomerSegmentationTemplate.esnext +8 -0
- package/build/esnext/surfaces/admin/components/Heading/Heading.esnext +8 -0
- package/build/esnext/surfaces/admin/components/Icon/Icon.esnext +8 -0
- package/build/esnext/surfaces/admin/components/InlineStack/InlineStack.esnext +11 -0
- package/build/esnext/surfaces/admin/components/Link/Link.esnext +8 -0
- package/build/esnext/surfaces/admin/components/Modal/Modal.esnext +10 -0
- package/build/esnext/surfaces/admin/components/OptionList/OptionList.esnext +11 -0
- package/build/esnext/surfaces/admin/components/Pressable/Pressable.esnext +9 -0
- package/build/esnext/surfaces/admin/components/Radio/Radio.esnext +8 -0
- package/build/esnext/surfaces/admin/components/ResourceItem/ResourceItem.esnext +10 -0
- package/build/esnext/surfaces/admin/components/ResourceList/ResourceList.esnext +11 -0
- package/build/esnext/surfaces/admin/components/Select/Select.esnext +10 -0
- package/build/esnext/surfaces/admin/components/Spinner/Spinner.esnext +8 -0
- package/build/esnext/surfaces/admin/components/StackItem/StackItem.esnext +10 -0
- package/build/esnext/surfaces/admin/components/Text/Text.esnext +8 -0
- package/build/esnext/surfaces/admin/components/TextBlock/TextBlock.esnext +9 -0
- package/build/esnext/surfaces/admin/components/TextField/TextField.esnext +10 -0
- package/build/esnext/surfaces/admin/components/Thumbnail/Thumbnail.esnext +8 -0
- package/build/esnext/surfaces/admin/extension.esnext +6 -0
- package/build/esnext/surfaces/admin.esnext +26 -0
- package/build/esnext/surfaces/checkout/components/Banner/Banner.esnext +8 -0
- package/build/esnext/surfaces/checkout/components/BlockLayout/BlockLayout.esnext +10 -0
- package/build/esnext/surfaces/checkout/components/BlockSpacer/BlockSpacer.esnext +11 -0
- package/build/esnext/surfaces/checkout/components/BlockStack/BlockStack.esnext +8 -0
- package/build/esnext/surfaces/checkout/components/Button/Button.esnext +8 -0
- package/build/esnext/surfaces/checkout/components/Checkbox/Checkbox.esnext +8 -0
- package/build/esnext/surfaces/checkout/components/Choice/Choice.esnext +9 -0
- package/build/esnext/surfaces/checkout/components/ChoiceList/ChoiceList.esnext +9 -0
- package/build/esnext/surfaces/checkout/components/Divider/Divider.esnext +8 -0
- package/build/esnext/surfaces/checkout/components/Form/Form.esnext +16 -0
- package/build/esnext/surfaces/checkout/components/Grid/Grid.esnext +8 -0
- package/build/esnext/surfaces/checkout/components/GridItem/GridItem.esnext +10 -0
- package/build/esnext/surfaces/checkout/components/Heading/Heading.esnext +13 -0
- package/build/esnext/surfaces/checkout/components/HeadingGroup/HeadingGroup.esnext +12 -0
- package/build/esnext/surfaces/checkout/components/Icon/Icon.esnext +9 -0
- package/build/esnext/surfaces/checkout/components/Image/Image.esnext +8 -0
- package/build/esnext/surfaces/checkout/components/InlineLayout/InlineLayout.esnext +12 -0
- package/build/esnext/surfaces/checkout/components/InlineSpacer/InlineSpacer.esnext +11 -0
- package/build/esnext/surfaces/checkout/components/InlineStack/InlineStack.esnext +8 -0
- package/build/esnext/surfaces/checkout/components/Link/Link.esnext +8 -0
- package/build/esnext/surfaces/checkout/components/List/List.esnext +8 -0
- package/build/esnext/surfaces/checkout/components/ListItem/ListItem.esnext +10 -0
- package/build/esnext/surfaces/checkout/components/PhoneField/PhoneField.esnext +13 -0
- package/build/esnext/surfaces/checkout/components/Pressable/Pressable.esnext +10 -0
- package/build/esnext/surfaces/checkout/components/ScrollView/ScrollView.esnext +9 -0
- package/build/esnext/surfaces/checkout/components/Select/Select.esnext +9 -0
- package/build/esnext/surfaces/checkout/components/SkeletonImage/SkeletonImage.esnext +8 -0
- package/build/esnext/surfaces/checkout/components/SkeletonText/SkeletonText.esnext +8 -0
- package/build/esnext/surfaces/checkout/components/SkeletonTextBlock/SkeletonTextBlock.esnext +8 -0
- package/build/esnext/surfaces/checkout/components/Spinner/Spinner.esnext +9 -0
- package/build/esnext/surfaces/checkout/components/Stepper/Stepper.esnext +8 -0
- package/build/esnext/surfaces/checkout/components/Tag/Tag.esnext +8 -0
- package/build/esnext/surfaces/checkout/components/Text/Text.esnext +9 -0
- package/build/esnext/surfaces/checkout/components/TextBlock/TextBlock.esnext +8 -0
- package/build/esnext/surfaces/checkout/components/TextField/TextField.esnext +8 -0
- package/build/esnext/surfaces/checkout/components/Tooltip/Tooltip.esnext +13 -0
- package/build/esnext/surfaces/checkout/components/View/View.esnext +13 -0
- package/build/esnext/surfaces/checkout/extension.esnext +6 -0
- package/build/esnext/surfaces/checkout/style/isEqual.esnext +25 -0
- package/build/esnext/surfaces/checkout/style/memoize.esnext +133 -0
- package/build/esnext/surfaces/checkout/style/style.esnext +68 -0
- package/build/esnext/surfaces/checkout.esnext +39 -0
- package/build/esnext/utilities/registration.esnext +41 -0
- package/build/ts/api.d.ts +66 -0
- package/build/ts/api.d.ts.map +1 -0
- package/build/ts/extension.d.ts +15 -0
- package/build/ts/extension.d.ts.map +1 -0
- package/build/ts/index.d.ts +3 -0
- package/build/ts/index.d.ts.map +1 -0
- package/build/ts/shared.d.ts +6 -0
- package/build/ts/shared.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/standard/standard.d.ts +12 -0
- package/build/ts/surfaces/admin/api/standard/standard.d.ts.map +1 -0
- package/build/ts/surfaces/admin/api.d.ts +4 -0
- package/build/ts/surfaces/admin/api.d.ts.map +1 -0
- package/build/ts/surfaces/admin/components/Badge/Badge.d.ts +20 -0
- package/build/ts/surfaces/admin/components/Badge/Badge.d.ts.map +1 -0
- package/build/ts/surfaces/admin/components/Banner/Banner.d.ts +28 -0
- package/build/ts/surfaces/admin/components/Banner/Banner.d.ts.map +1 -0
- package/build/ts/surfaces/admin/components/BlockStack/BlockStack.d.ts +25 -0
- package/build/ts/surfaces/admin/components/BlockStack/BlockStack.d.ts.map +1 -0
- package/build/ts/surfaces/admin/components/Button/Button.d.ts +66 -0
- package/build/ts/surfaces/admin/components/Button/Button.d.ts.map +1 -0
- package/build/ts/surfaces/admin/components/Card/Card.d.ts +25 -0
- package/build/ts/surfaces/admin/components/Card/Card.d.ts.map +1 -0
- package/build/ts/surfaces/admin/components/CardSection/CardSection.d.ts +12 -0
- package/build/ts/surfaces/admin/components/CardSection/CardSection.d.ts.map +1 -0
- package/build/ts/surfaces/admin/components/Checkbox/Checkbox.d.ts +22 -0
- package/build/ts/surfaces/admin/components/Checkbox/Checkbox.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/Heading/Heading.d.ts +24 -0
- package/build/ts/surfaces/admin/components/Heading/Heading.d.ts.map +1 -0
- package/build/ts/surfaces/admin/components/Icon/Icon.d.ts +17 -0
- package/build/ts/surfaces/admin/components/Icon/Icon.d.ts.map +1 -0
- package/build/ts/surfaces/admin/components/InlineStack/InlineStack.d.ts +30 -0
- package/build/ts/surfaces/admin/components/InlineStack/InlineStack.d.ts.map +1 -0
- package/build/ts/surfaces/admin/components/Link/Link.d.ts +23 -0
- package/build/ts/surfaces/admin/components/Link/Link.d.ts.map +1 -0
- package/build/ts/surfaces/admin/components/Modal/Modal.d.ts +36 -0
- package/build/ts/surfaces/admin/components/Modal/Modal.d.ts.map +1 -0
- package/build/ts/surfaces/admin/components/OptionList/OptionList.d.ts +36 -0
- package/build/ts/surfaces/admin/components/OptionList/OptionList.d.ts.map +1 -0
- package/build/ts/surfaces/admin/components/Pressable/Pressable.d.ts +14 -0
- package/build/ts/surfaces/admin/components/Pressable/Pressable.d.ts.map +1 -0
- package/build/ts/surfaces/admin/components/Radio/Radio.d.ts +26 -0
- package/build/ts/surfaces/admin/components/Radio/Radio.d.ts.map +1 -0
- package/build/ts/surfaces/admin/components/ResourceItem/ResourceItem.d.ts +17 -0
- package/build/ts/surfaces/admin/components/ResourceItem/ResourceItem.d.ts.map +1 -0
- package/build/ts/surfaces/admin/components/ResourceList/ResourceList.d.ts +26 -0
- package/build/ts/surfaces/admin/components/ResourceList/ResourceList.d.ts.map +1 -0
- package/build/ts/surfaces/admin/components/Select/Select.d.ts +34 -0
- package/build/ts/surfaces/admin/components/Select/Select.d.ts.map +1 -0
- package/build/ts/surfaces/admin/components/Spinner/Spinner.d.ts +11 -0
- package/build/ts/surfaces/admin/components/Spinner/Spinner.d.ts.map +1 -0
- package/build/ts/surfaces/admin/components/StackItem/StackItem.d.ts +15 -0
- package/build/ts/surfaces/admin/components/StackItem/StackItem.d.ts.map +1 -0
- package/build/ts/surfaces/admin/components/Text/Text.d.ts +20 -0
- package/build/ts/surfaces/admin/components/Text/Text.d.ts.map +1 -0
- package/build/ts/surfaces/admin/components/TextBlock/TextBlock.d.ts +20 -0
- package/build/ts/surfaces/admin/components/TextBlock/TextBlock.d.ts.map +1 -0
- package/build/ts/surfaces/admin/components/TextField/TextField.d.ts +41 -0
- package/build/ts/surfaces/admin/components/TextField/TextField.d.ts.map +1 -0
- package/build/ts/surfaces/admin/components/Thumbnail/Thumbnail.d.ts +19 -0
- package/build/ts/surfaces/admin/components/Thumbnail/Thumbnail.d.ts.map +1 -0
- package/build/ts/surfaces/admin/components/shared.d.ts +22 -0
- package/build/ts/surfaces/admin/components/shared.d.ts.map +1 -0
- package/build/ts/surfaces/admin/components.d.ts +52 -0
- package/build/ts/surfaces/admin/components.d.ts.map +1 -0
- package/build/ts/surfaces/admin/extension-points.d.ts +52 -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-details/render-after.d.ts +9 -0
- package/build/ts/surfaces/checkout/api/cart-line-details/render-after.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/api/shared.d.ts +5 -0
- package/build/ts/surfaces/checkout/api/shared.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/api/standard/standard.d.ts +1060 -0
- package/build/ts/surfaces/checkout/api/standard/standard.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/api.d.ts +5 -0
- package/build/ts/surfaces/checkout/api.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/Banner/Banner.d.ts +38 -0
- package/build/ts/surfaces/checkout/components/Banner/Banner.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/BlockLayout/BlockLayout.d.ts +41 -0
- package/build/ts/surfaces/checkout/components/BlockLayout/BlockLayout.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/BlockSpacer/BlockSpacer.d.ts +22 -0
- package/build/ts/surfaces/checkout/components/BlockSpacer/BlockSpacer.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/BlockStack/BlockStack.d.ts +42 -0
- package/build/ts/surfaces/checkout/components/BlockStack/BlockStack.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/Button/Button.d.ts +83 -0
- package/build/ts/surfaces/checkout/components/Button/Button.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/Checkbox/Checkbox.d.ts +59 -0
- package/build/ts/surfaces/checkout/components/Checkbox/Checkbox.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/Choice/Choice.d.ts +27 -0
- package/build/ts/surfaces/checkout/components/Choice/Choice.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/ChoiceList/ChoiceList.d.ts +32 -0
- package/build/ts/surfaces/checkout/components/ChoiceList/ChoiceList.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/Divider/Divider.d.ts +30 -0
- package/build/ts/surfaces/checkout/components/Divider/Divider.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/Form/Form.d.ts +32 -0
- package/build/ts/surfaces/checkout/components/Form/Form.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/Grid/Grid.d.ts +95 -0
- package/build/ts/surfaces/checkout/components/Grid/Grid.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/GridItem/GridItem.d.ts +36 -0
- package/build/ts/surfaces/checkout/components/GridItem/GridItem.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/Heading/Heading.d.ts +43 -0
- package/build/ts/surfaces/checkout/components/Heading/Heading.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/HeadingGroup/HeadingGroup.d.ts +15 -0
- package/build/ts/surfaces/checkout/components/HeadingGroup/HeadingGroup.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/Icon/Icon.d.ts +38 -0
- package/build/ts/surfaces/checkout/components/Icon/Icon.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/Image/Image.d.ts +73 -0
- package/build/ts/surfaces/checkout/components/Image/Image.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/InlineLayout/InlineLayout.d.ts +43 -0
- package/build/ts/surfaces/checkout/components/InlineLayout/InlineLayout.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/InlineSpacer/InlineSpacer.d.ts +22 -0
- package/build/ts/surfaces/checkout/components/InlineSpacer/InlineSpacer.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/InlineStack/InlineStack.d.ts +50 -0
- package/build/ts/surfaces/checkout/components/InlineStack/InlineStack.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/Link/Link.d.ts +50 -0
- package/build/ts/surfaces/checkout/components/Link/Link.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/List/List.d.ts +32 -0
- package/build/ts/surfaces/checkout/components/List/List.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/ListItem/ListItem.d.ts +13 -0
- package/build/ts/surfaces/checkout/components/ListItem/ListItem.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/PhoneField/PhoneField.d.ts +58 -0
- package/build/ts/surfaces/checkout/components/PhoneField/PhoneField.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/Pressable/Pressable.d.ts +96 -0
- package/build/ts/surfaces/checkout/components/Pressable/Pressable.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/ScrollView/ScrollView.d.ts +75 -0
- package/build/ts/surfaces/checkout/components/ScrollView/ScrollView.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/Select/Select.d.ts +98 -0
- package/build/ts/surfaces/checkout/components/Select/Select.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/SkeletonImage/SkeletonImage.d.ts +25 -0
- package/build/ts/surfaces/checkout/components/SkeletonImage/SkeletonImage.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/SkeletonText/SkeletonText.d.ts +21 -0
- package/build/ts/surfaces/checkout/components/SkeletonText/SkeletonText.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/SkeletonTextBlock/SkeletonTextBlock.d.ts +22 -0
- package/build/ts/surfaces/checkout/components/SkeletonTextBlock/SkeletonTextBlock.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/Spinner/Spinner.d.ts +32 -0
- package/build/ts/surfaces/checkout/components/Spinner/Spinner.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/Stepper/Stepper.d.ts +42 -0
- package/build/ts/surfaces/checkout/components/Stepper/Stepper.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/Tag/Tag.d.ts +31 -0
- package/build/ts/surfaces/checkout/components/Tag/Tag.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/Text/Text.d.ts +34 -0
- package/build/ts/surfaces/checkout/components/Text/Text.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/TextBlock/TextBlock.d.ts +32 -0
- package/build/ts/surfaces/checkout/components/TextBlock/TextBlock.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/TextField/TextField.d.ts +175 -0
- package/build/ts/surfaces/checkout/components/TextField/TextField.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/Tooltip/Tooltip.d.ts +16 -0
- package/build/ts/surfaces/checkout/components/Tooltip/Tooltip.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/View/View.d.ts +169 -0
- package/build/ts/surfaces/checkout/components/View/View.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/shared.d.ts +407 -0
- package/build/ts/surfaces/checkout/components/shared.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components.d.ts +76 -0
- package/build/ts/surfaces/checkout/components.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/extension-points.d.ts +98 -0
- package/build/ts/surfaces/checkout/extension-points.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/extension.d.ts +5 -0
- package/build/ts/surfaces/checkout/extension.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/globals.d.ts +6 -0
- package/build/ts/surfaces/checkout/globals.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/shared.d.ts +6 -0
- package/build/ts/surfaces/checkout/shared.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/style/isEqual.d.ts +8 -0
- package/build/ts/surfaces/checkout/style/isEqual.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/style/isEqual.test.d.ts +2 -0
- package/build/ts/surfaces/checkout/style/isEqual.test.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/style/memoize.d.ts +13 -0
- package/build/ts/surfaces/checkout/style/memoize.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/style/style.d.ts +70 -0
- package/build/ts/surfaces/checkout/style/style.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/style/style.test.d.ts +2 -0
- package/build/ts/surfaces/checkout/style/style.test.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/style/types.d.ts +46 -0
- package/build/ts/surfaces/checkout/style/types.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/style.d.ts +3 -0
- package/build/ts/surfaces/checkout/style.d.ts.map +1 -0
- package/build/ts/surfaces/checkout.d.ts +8 -0
- package/build/ts/surfaces/checkout.d.ts.map +1 -0
- package/build/ts/utilities/registration.d.ts +16 -0
- package/build/ts/utilities/registration.d.ts.map +1 -0
- package/build/tsconfig.tsbuildinfo +1 -0
- package/checkout.esnext +1 -0
- package/checkout.js +1 -0
- package/checkout.mjs +1 -0
- package/index.esnext +1 -0
- package/index.js +1 -0
- package/index.mjs +1 -0
- package/package.json +60 -0
- package/src/api.ts +76 -0
- package/src/extension.ts +48 -0
- package/src/index.ts +2 -0
- package/src/shared.ts +13 -0
- package/src/surfaces/admin/api/customer-segmentation-template/customer-segmentation-template.ts +19 -0
- package/src/surfaces/admin/api/standard/README.md +1 -0
- package/src/surfaces/admin/api/standard/standard.ts +13 -0
- package/src/surfaces/admin/api.ts +3 -0
- package/src/surfaces/admin/components/Badge/Badge.ts +18 -0
- package/src/surfaces/admin/components/Badge/content/guidelines.md +10 -0
- package/src/surfaces/admin/components/Badge/examples/badge.example.ts +11 -0
- package/src/surfaces/admin/components/Banner/Banner.ts +32 -0
- package/src/surfaces/admin/components/Banner/content/guidelines.md +11 -0
- package/src/surfaces/admin/components/Banner/examples/Banner.example.ts +20 -0
- package/src/surfaces/admin/components/BlockStack/BlockStack.ts +27 -0
- package/src/surfaces/admin/components/BlockStack/content/guidelines.md +10 -0
- package/src/surfaces/admin/components/BlockStack/examples/BlockStack.example.ts +22 -0
- package/src/surfaces/admin/components/Button/Button.ts +68 -0
- package/src/surfaces/admin/components/Button/content/guidelines.md +14 -0
- package/src/surfaces/admin/components/Button/examples/Button.example.ts +17 -0
- package/src/surfaces/admin/components/Card/Card.ts +28 -0
- package/src/surfaces/admin/components/Card/content/guidelines.md +9 -0
- package/src/surfaces/admin/components/Card/examples/Card.example.ts +10 -0
- package/src/surfaces/admin/components/CardSection/CardSection.ts +13 -0
- package/src/surfaces/admin/components/CardSection/content/guidelines.md +5 -0
- package/src/surfaces/admin/components/CardSection/examples/CardSection.example.ts +20 -0
- package/src/surfaces/admin/components/Checkbox/Checkbox.ts +25 -0
- package/src/surfaces/admin/components/Checkbox/content/guidelines.md +8 -0
- package/src/surfaces/admin/components/Checkbox/examples/Checkbox.example.ts +13 -0
- package/src/surfaces/admin/components/CustomerSegmentationTemplate/CustomerSegmentationTemplate.ts +66 -0
- package/src/surfaces/admin/components/CustomerSegmentationTemplate/examples/CustomerSegmentationTemplate.example.ts +37 -0
- package/src/surfaces/admin/components/Heading/Heading.ts +25 -0
- package/src/surfaces/admin/components/Heading/content/guidelines.md +11 -0
- package/src/surfaces/admin/components/Heading/examples/Heading.example.ts +14 -0
- package/src/surfaces/admin/components/Icon/Icon.ts +21 -0
- package/src/surfaces/admin/components/Icon/content/guidelines.md +8 -0
- package/src/surfaces/admin/components/Icon/examples/Icon.example.ts +12 -0
- package/src/surfaces/admin/components/InlineStack/InlineStack.ts +34 -0
- package/src/surfaces/admin/components/InlineStack/content/guidelines.md +10 -0
- package/src/surfaces/admin/components/InlineStack/examples/InlineStack.example.ts +16 -0
- package/src/surfaces/admin/components/Link/Link.ts +23 -0
- package/src/surfaces/admin/components/Link/content/guidelines.md +10 -0
- package/src/surfaces/admin/components/Link/examples/AbsoluteLink.example.ts +13 -0
- package/src/surfaces/admin/components/Link/examples/LogLink.example.ts +12 -0
- package/src/surfaces/admin/components/Link/examples/RelativeLink.example.ts +12 -0
- package/src/surfaces/admin/components/Modal/Modal.ts +33 -0
- package/src/surfaces/admin/components/Modal/content/guidelines.md +8 -0
- package/src/surfaces/admin/components/Modal/examples/Modal.example.ts +14 -0
- package/src/surfaces/admin/components/OptionList/OptionList.ts +42 -0
- package/src/surfaces/admin/components/OptionList/content/guidelines.md +7 -0
- package/src/surfaces/admin/components/OptionList/examples/OptionList.example.ts +24 -0
- package/src/surfaces/admin/components/Pressable/Pressable.ts +14 -0
- package/src/surfaces/admin/components/Pressable/content/guidelines.md +12 -0
- package/src/surfaces/admin/components/Pressable/examples/Pressable.example.ts +15 -0
- package/src/surfaces/admin/components/Radio/Radio.ts +29 -0
- package/src/surfaces/admin/components/Radio/content/guidelines.md +6 -0
- package/src/surfaces/admin/components/Radio/examples/Radio.example.ts +25 -0
- package/src/surfaces/admin/components/ResourceItem/ResourceItem.ts +19 -0
- package/src/surfaces/admin/components/ResourceItem/content/guidelines.md +8 -0
- package/src/surfaces/admin/components/ResourceItem/examples/ResourceItem.example.ts +22 -0
- package/src/surfaces/admin/components/ResourceList/ResourceList.ts +30 -0
- package/src/surfaces/admin/components/ResourceList/content/guidelines.md +9 -0
- package/src/surfaces/admin/components/ResourceList/examples/ResourceList.example.ts +29 -0
- package/src/surfaces/admin/components/Select/Select.ts +39 -0
- package/src/surfaces/admin/components/Select/content/guidelines.md +7 -0
- package/src/surfaces/admin/components/Select/examples/Select.example.ts +30 -0
- package/src/surfaces/admin/components/Spinner/Spinner.ts +10 -0
- package/src/surfaces/admin/components/Spinner/content/guidelines.md +5 -0
- package/src/surfaces/admin/components/Spinner/examples/Spinner.example.ts +12 -0
- package/src/surfaces/admin/components/StackItem/StackItem.ts +15 -0
- package/src/surfaces/admin/components/StackItem/content/guidelines.md +8 -0
- package/src/surfaces/admin/components/StackItem/examples/StackItem.example.ts +25 -0
- package/src/surfaces/admin/components/Text/Text.ts +26 -0
- package/src/surfaces/admin/components/Text/content/guidelines.md +8 -0
- package/src/surfaces/admin/components/Text/examples/Text.example.ts +20 -0
- package/src/surfaces/admin/components/TextBlock/TextBlock.ts +20 -0
- package/src/surfaces/admin/components/TextBlock/content/guidelines.md +11 -0
- package/src/surfaces/admin/components/TextBlock/examples/TextBlock.example.ts +8 -0
- package/src/surfaces/admin/components/TextField/TextField.ts +54 -0
- package/src/surfaces/admin/components/TextField/content/guidelines.md +10 -0
- package/src/surfaces/admin/components/TextField/examples/TextField.example.ts +23 -0
- package/src/surfaces/admin/components/Thumbnail/Thumbnail.ts +31 -0
- package/src/surfaces/admin/components/Thumbnail/examples/Thumbnail.example.ts +13 -0
- package/src/surfaces/admin/components/shared.ts +30 -0
- package/src/surfaces/admin/components.ts +51 -0
- package/src/surfaces/admin/extension-points.ts +85 -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/README.md +1 -0
- package/src/surfaces/checkout/api/cart-line-details/render-after.ts +11 -0
- package/src/surfaces/checkout/api/shared.ts +810 -0
- package/src/surfaces/checkout/api/standard/README.md +1 -0
- package/src/surfaces/checkout/api/standard/standard.ts +1266 -0
- package/src/surfaces/checkout/api.ts +66 -0
- package/src/surfaces/checkout/components/Banner/Banner.ts +37 -0
- package/src/surfaces/checkout/components/Banner/README.md +14 -0
- package/src/surfaces/checkout/components/Banner/content/guidelines.md +9 -0
- package/src/surfaces/checkout/components/Banner/examples/basic-banner.example.ts +11 -0
- package/src/surfaces/checkout/components/BlockLayout/BlockLayout.ts +43 -0
- package/src/surfaces/checkout/components/BlockLayout/README.md +101 -0
- package/src/surfaces/checkout/components/BlockLayout/examples/basic-blockLayout.example.ts +16 -0
- package/src/surfaces/checkout/components/BlockSpacer/BlockSpacer.ts +25 -0
- package/src/surfaces/checkout/components/BlockSpacer/README.md +14 -0
- package/src/surfaces/checkout/components/BlockSpacer/examples/basic-blockspacer.example.ts +11 -0
- package/src/surfaces/checkout/components/BlockStack/BlockStack.ts +53 -0
- package/src/surfaces/checkout/components/BlockStack/README.md +77 -0
- package/src/surfaces/checkout/components/BlockStack/examples/basic-blockstack.example.ts +11 -0
- package/src/surfaces/checkout/components/Button/Button.ts +87 -0
- package/src/surfaces/checkout/components/Button/README.md +22 -0
- package/src/surfaces/checkout/components/Button/content/guidelines.md +10 -0
- package/src/surfaces/checkout/components/Button/examples/basic-button.example.ts +11 -0
- package/src/surfaces/checkout/components/Checkbox/Checkbox.ts +63 -0
- package/src/surfaces/checkout/components/Checkbox/README.md +18 -0
- package/src/surfaces/checkout/components/Checkbox/content/guidelines.md +9 -0
- package/src/surfaces/checkout/components/Checkbox/examples/basic-checkbox.example.ts +11 -0
- package/src/surfaces/checkout/components/Choice/Choice.ts +25 -0
- package/src/surfaces/checkout/components/Choice/README.md +14 -0
- package/src/surfaces/checkout/components/Choice/content/guidelines.md +9 -0
- package/src/surfaces/checkout/components/Choice/examples/basic-choice.example.ts +50 -0
- package/src/surfaces/checkout/components/ChoiceList/ChoiceList.ts +33 -0
- package/src/surfaces/checkout/components/ChoiceList/README.md +14 -0
- package/src/surfaces/checkout/components/ChoiceList/content/guidelines.md +10 -0
- package/src/surfaces/checkout/components/ChoiceList/examples/basic-choicelist.example.ts +50 -0
- package/src/surfaces/checkout/components/Divider/Divider.ts +33 -0
- package/src/surfaces/checkout/components/Divider/README.md +13 -0
- package/src/surfaces/checkout/components/Divider/examples/basic-divider.example.ts +7 -0
- package/src/surfaces/checkout/components/Form/Form.ts +30 -0
- package/src/surfaces/checkout/components/Form/README.md +21 -0
- package/src/surfaces/checkout/components/Form/content/guidelines.md +4 -0
- package/src/surfaces/checkout/components/Form/examples/basic-form.example.ts +48 -0
- package/src/surfaces/checkout/components/Grid/Grid.ts +104 -0
- package/src/surfaces/checkout/components/Grid/README.md +105 -0
- package/src/surfaces/checkout/components/Grid/content/guidelines.md +3 -0
- package/src/surfaces/checkout/components/Grid/examples/basic-grid.example.ts +45 -0
- package/src/surfaces/checkout/components/GridItem/GridItem.ts +42 -0
- package/src/surfaces/checkout/components/GridItem/README.md +72 -0
- package/src/surfaces/checkout/components/GridItem/content/guidelines.md +3 -0
- package/src/surfaces/checkout/components/GridItem/examples/basic-griditem.example.ts +42 -0
- package/src/surfaces/checkout/components/Heading/Heading.ts +44 -0
- package/src/surfaces/checkout/components/Heading/README.md +19 -0
- package/src/surfaces/checkout/components/Heading/content/guidelines.md +10 -0
- package/src/surfaces/checkout/components/Heading/examples/basic-heading.example.ts +7 -0
- package/src/surfaces/checkout/components/HeadingGroup/HeadingGroup.ts +15 -0
- package/src/surfaces/checkout/components/HeadingGroup/README.md +7 -0
- package/src/surfaces/checkout/components/HeadingGroup/content/guidelines.md +9 -0
- package/src/surfaces/checkout/components/HeadingGroup/examples/basic-headinggroup.example.ts +20 -0
- package/src/surfaces/checkout/components/Icon/Icon.ts +91 -0
- package/src/surfaces/checkout/components/Icon/README.md +15 -0
- package/src/surfaces/checkout/components/Icon/examples/basic-icon.example.ts +7 -0
- package/src/surfaces/checkout/components/Image/Image.ts +83 -0
- package/src/surfaces/checkout/components/Image/README.md +53 -0
- package/src/surfaces/checkout/components/Image/examples/basic-image.example.ts +10 -0
- package/src/surfaces/checkout/components/InlineLayout/InlineLayout.ts +49 -0
- package/src/surfaces/checkout/components/InlineLayout/README.md +103 -0
- package/src/surfaces/checkout/components/InlineLayout/examples/basic-inlineLayout.example.ts +16 -0
- package/src/surfaces/checkout/components/InlineSpacer/InlineSpacer.ts +24 -0
- package/src/surfaces/checkout/components/InlineSpacer/README.md +14 -0
- package/src/surfaces/checkout/components/InlineSpacer/examples/basic-inlinespacer.example.ts +20 -0
- package/src/surfaces/checkout/components/InlineStack/InlineStack.ts +63 -0
- package/src/surfaces/checkout/components/InlineStack/README.md +87 -0
- package/src/surfaces/checkout/components/InlineStack/examples/basic-inlinestack.example.ts +18 -0
- package/src/surfaces/checkout/components/Link/Link.ts +49 -0
- package/src/surfaces/checkout/components/Link/README.md +18 -0
- package/src/surfaces/checkout/components/Link/content/guidelines.md +9 -0
- package/src/surfaces/checkout/components/Link/examples/basic-link.example.ts +11 -0
- package/src/surfaces/checkout/components/List/List.ts +32 -0
- package/src/surfaces/checkout/components/List/README.md +19 -0
- package/src/surfaces/checkout/components/List/content/guidelines.md +11 -0
- package/src/surfaces/checkout/components/List/examples/basic-list.example.ts +11 -0
- package/src/surfaces/checkout/components/ListItem/ListItem.ts +12 -0
- package/src/surfaces/checkout/components/ListItem/README.md +5 -0
- package/src/surfaces/checkout/components/ListItem/content/guidelines.md +3 -0
- package/src/surfaces/checkout/components/ListItem/examples/basic-listitem.example.ts +9 -0
- package/src/surfaces/checkout/components/PhoneField/PhoneField.ts +77 -0
- package/src/surfaces/checkout/components/PhoneField/README.md +49 -0
- package/src/surfaces/checkout/components/PhoneField/examples/basic-phonefield.example.ts +10 -0
- package/src/surfaces/checkout/components/Pressable/Pressable.ts +128 -0
- package/src/surfaces/checkout/components/Pressable/README.md +74 -0
- package/src/surfaces/checkout/components/Pressable/examples/basic-pressable.example.ts +27 -0
- package/src/surfaces/checkout/components/ScrollView/README.md +62 -0
- package/src/surfaces/checkout/components/ScrollView/ScrollView.ts +76 -0
- package/src/surfaces/checkout/components/ScrollView/examples/basic-scrollview.example.ts +38 -0
- package/src/surfaces/checkout/components/Select/README.md +41 -0
- package/src/surfaces/checkout/components/Select/Select.ts +97 -0
- package/src/surfaces/checkout/components/Select/content/guidelines.md +4 -0
- package/src/surfaces/checkout/components/Select/examples/basic-select.example.ts +36 -0
- package/src/surfaces/checkout/components/SkeletonImage/README.md +13 -0
- package/src/surfaces/checkout/components/SkeletonImage/SkeletonImage.ts +28 -0
- package/src/surfaces/checkout/components/SkeletonImage/examples/basic-skeletonimage.example.ts +10 -0
- package/src/surfaces/checkout/components/SkeletonText/README.md +13 -0
- package/src/surfaces/checkout/components/SkeletonText/SkeletonText.ts +23 -0
- package/src/surfaces/checkout/components/SkeletonText/examples/basic-skeletontext.example.ts +7 -0
- package/src/surfaces/checkout/components/SkeletonTextBlock/README.md +13 -0
- package/src/surfaces/checkout/components/SkeletonTextBlock/SkeletonTextBlock.ts +24 -0
- package/src/surfaces/checkout/components/SkeletonTextBlock/examples/basic-skeletontextblock.example.ts +7 -0
- package/src/surfaces/checkout/components/Spinner/README.md +14 -0
- package/src/surfaces/checkout/components/Spinner/Spinner.ts +35 -0
- package/src/surfaces/checkout/components/Spinner/examples/basic-spinner.example.ts +7 -0
- package/src/surfaces/checkout/components/Stepper/README.md +28 -0
- package/src/surfaces/checkout/components/Stepper/Stepper.ts +63 -0
- package/src/surfaces/checkout/components/Stepper/content/guidelines.md +4 -0
- package/src/surfaces/checkout/components/Stepper/examples/basic-stepper.example.ts +10 -0
- package/src/surfaces/checkout/components/Tag/README.md +14 -0
- package/src/surfaces/checkout/components/Tag/Tag.ts +26 -0
- package/src/surfaces/checkout/components/Tag/examples/basic-tag.example.ts +7 -0
- package/src/surfaces/checkout/components/Text/README.md +17 -0
- package/src/surfaces/checkout/components/Text/Text.ts +44 -0
- package/src/surfaces/checkout/components/Text/content/guidelines.md +10 -0
- package/src/surfaces/checkout/components/Text/examples/basic-text.example.ts +14 -0
- package/src/surfaces/checkout/components/TextBlock/README.md +15 -0
- package/src/surfaces/checkout/components/TextBlock/TextBlock.ts +38 -0
- package/src/surfaces/checkout/components/TextBlock/content/guidelines.md +9 -0
- package/src/surfaces/checkout/components/TextBlock/examples/basic-textblock.example.ts +18 -0
- package/src/surfaces/checkout/components/TextField/README.md +49 -0
- package/src/surfaces/checkout/components/TextField/TextField.ts +173 -0
- package/src/surfaces/checkout/components/TextField/content/guidelines.md +5 -0
- package/src/surfaces/checkout/components/TextField/examples/basic-textfield.example.ts +9 -0
- package/src/surfaces/checkout/components/Tooltip/README.md +8 -0
- package/src/surfaces/checkout/components/Tooltip/Tooltip.ts +15 -0
- package/src/surfaces/checkout/components/Tooltip/examples/basic-tooltip.example.ts +23 -0
- package/src/surfaces/checkout/components/View/README.md +97 -0
- package/src/surfaces/checkout/components/View/View.ts +196 -0
- package/src/surfaces/checkout/components/View/examples/basic-view.example.ts +11 -0
- package/src/surfaces/checkout/components/shared.ts +581 -0
- package/src/surfaces/checkout/components.ts +157 -0
- package/src/surfaces/checkout/extension-points.ts +164 -0
- package/src/surfaces/checkout/extension.ts +8 -0
- package/src/surfaces/checkout/globals.ts +9 -0
- package/src/surfaces/checkout/shared.ts +6 -0
- package/src/surfaces/checkout/style/isEqual.test.ts +67 -0
- package/src/surfaces/checkout/style/isEqual.ts +41 -0
- package/src/surfaces/checkout/style/memoize.ts +177 -0
- package/src/surfaces/checkout/style/style.test.ts +131 -0
- package/src/surfaces/checkout/style/style.ts +161 -0
- package/src/surfaces/checkout/style/types.ts +67 -0
- package/src/surfaces/checkout/style.ts +16 -0
- package/src/surfaces/checkout.ts +7 -0
- package/src/utilities/registration.ts +79 -0
|
@@ -0,0 +1,1266 @@
|
|
|
1
|
+
import type {StatefulRemoteSubscribable} from '@remote-ui/async-subscription';
|
|
2
|
+
import type {StandardApi as BaseStandardApi, I18n} from '../../../../api';
|
|
3
|
+
import type {ExtensionPoint as AnyExtensionPoint} from '../../extension-points';
|
|
4
|
+
import type {CurrencyCode, CountryCode, Timezone} from '../shared';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* A key-value storage object for extension points.
|
|
8
|
+
*
|
|
9
|
+
* Stored data is only available to this specific app
|
|
10
|
+
* at this specific extension point.
|
|
11
|
+
*
|
|
12
|
+
* The storage backend is implemented with `localStorage` and
|
|
13
|
+
* should persist across the buyer's checkout session.
|
|
14
|
+
* However, data persistence isn't guaranteed.
|
|
15
|
+
*/
|
|
16
|
+
export interface Storage {
|
|
17
|
+
/**
|
|
18
|
+
* Read and return a stored value by key.
|
|
19
|
+
*
|
|
20
|
+
* The stored data is deserialized from JSON and returned as
|
|
21
|
+
* its original primitive.
|
|
22
|
+
*
|
|
23
|
+
* Returns `null` if no stored data exists.
|
|
24
|
+
*/
|
|
25
|
+
read<T = unknown>(key: string): Promise<T | null>;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Write stored data for this key.
|
|
29
|
+
*
|
|
30
|
+
* The data must be serializable to JSON.
|
|
31
|
+
*/
|
|
32
|
+
write(key: string, data: any): Promise<void>;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Delete stored data by key.
|
|
36
|
+
*/
|
|
37
|
+
delete(key: string): Promise<void>;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* The high-level capabilities an extension is allowed to have access to.
|
|
42
|
+
*
|
|
43
|
+
* * `network_access` allows an extension to make network calls via fetch() and
|
|
44
|
+
* is requested by a partner
|
|
45
|
+
*
|
|
46
|
+
* * `block_progress` allows an extension to block a buyer's progress through
|
|
47
|
+
* checkout and may be granted by a merchant in differing checkout contexts
|
|
48
|
+
*/
|
|
49
|
+
export type Capability = 'network_access' | 'block_progress';
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Meta information about an extension point.
|
|
53
|
+
*/
|
|
54
|
+
export interface ExtensionInstance {
|
|
55
|
+
/**
|
|
56
|
+
* The published version of the running extension point.
|
|
57
|
+
*
|
|
58
|
+
* For unpublished extensions, the value is `null`.
|
|
59
|
+
*
|
|
60
|
+
* @example 3.0.10
|
|
61
|
+
*/
|
|
62
|
+
version?: string;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* The URL to the script that started the extension point.
|
|
66
|
+
*/
|
|
67
|
+
scriptUrl: string;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Whether your extension is currently rendered to the screen.
|
|
71
|
+
*
|
|
72
|
+
* Shopify might render your extension before it's visible in the UI,
|
|
73
|
+
* typically to pre-render extensions that will appear on a later step of the
|
|
74
|
+
* checkout.
|
|
75
|
+
*
|
|
76
|
+
* Your extension might also continue to run after the buyer has navigated away
|
|
77
|
+
* from where it was rendered. The extension continues running so that
|
|
78
|
+
* your extension is immediately available to render if the buyer navigates back.
|
|
79
|
+
*/
|
|
80
|
+
rendered: StatefulRemoteSubscribable<boolean>;
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* The allowed capabilities of the extension, defined
|
|
84
|
+
* in your `shopify.ui.extension.toml` file .
|
|
85
|
+
*
|
|
86
|
+
* `network_access`:
|
|
87
|
+
* You must [request access](https://shopify.dev/api/checkout-extensions/checkout/configuration#complete-a-request-for-network-access)
|
|
88
|
+
* to make network calls.
|
|
89
|
+
*
|
|
90
|
+
* `block_progress`:
|
|
91
|
+
* Merchants control whether your extension [can block checkout progress](https://shopify.dev/api/checkout-extensions/checkout/configuration#block-progress)
|
|
92
|
+
*/
|
|
93
|
+
capabilities: StatefulRemoteSubscribable<Capability[]>;
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Information about the editor where the extension is being rendered.
|
|
97
|
+
*
|
|
98
|
+
* The value is undefined if the extension is not rendering in an editor.
|
|
99
|
+
*/
|
|
100
|
+
editor?: Editor;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export interface Editor {
|
|
104
|
+
/**
|
|
105
|
+
* Indicates whether the extension is rendering in the checkout editor.
|
|
106
|
+
*/
|
|
107
|
+
type: 'checkout';
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Removes a note
|
|
112
|
+
*/
|
|
113
|
+
export interface NoteRemoveChange {
|
|
114
|
+
/**
|
|
115
|
+
* The type of the `NoteRemoveChange` API.
|
|
116
|
+
*/
|
|
117
|
+
type: 'removeNote';
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* An Update to a note on the order.
|
|
122
|
+
* for example, the buyer could request detailed packaging instructions in an order note
|
|
123
|
+
*/
|
|
124
|
+
export interface NoteUpdateChange {
|
|
125
|
+
/**
|
|
126
|
+
* The type of the `NoteUpdateChange` API.
|
|
127
|
+
*/
|
|
128
|
+
type: 'updateNote';
|
|
129
|
+
/**
|
|
130
|
+
* The new value of the note.
|
|
131
|
+
*/
|
|
132
|
+
note: string;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
export type NoteChange = NoteRemoveChange | NoteUpdateChange;
|
|
136
|
+
|
|
137
|
+
export interface NoteChangeResultSuccess {
|
|
138
|
+
/**
|
|
139
|
+
* The type of the `NoteChangeResultSuccess` API.
|
|
140
|
+
*/
|
|
141
|
+
type: 'success';
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
export interface NoteChangeResultError {
|
|
145
|
+
/**
|
|
146
|
+
* The type of the `NoteChangeResultError` API.
|
|
147
|
+
*/
|
|
148
|
+
type: 'error';
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* A message that explains the error. This message is useful for debugging.
|
|
152
|
+
* It is **not** localized, and therefore should not be presented directly
|
|
153
|
+
* to the buyer.
|
|
154
|
+
*/
|
|
155
|
+
message: string;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
export type NoteChangeResult = NoteChangeResultSuccess | NoteChangeResultError;
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* Updates an attribute on the order. If an attribute with the
|
|
162
|
+
* provided key does not already exist, it gets created.
|
|
163
|
+
*/
|
|
164
|
+
export interface AttributeUpdateChange {
|
|
165
|
+
/**
|
|
166
|
+
* The type of the `AttributeUpdateChange` API.
|
|
167
|
+
*/
|
|
168
|
+
type: 'updateAttribute';
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* Key of the attribute to add or update
|
|
172
|
+
*/
|
|
173
|
+
key: string;
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Value for the attribute to add or update
|
|
177
|
+
*/
|
|
178
|
+
value: string;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
export type AttributeChange = AttributeUpdateChange;
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* The returned result of a successful update to an attribute.
|
|
185
|
+
*/
|
|
186
|
+
export interface AttributeChangeResultSuccess {
|
|
187
|
+
/**
|
|
188
|
+
* The type of the `AttributeChangeResultSuccess` API.
|
|
189
|
+
*/
|
|
190
|
+
type: 'success';
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* The returned result of an unsuccessful update to an attribute
|
|
195
|
+
* with a message detailing the type of error that occurred.
|
|
196
|
+
*/
|
|
197
|
+
export interface AttributeChangeResultError {
|
|
198
|
+
/**
|
|
199
|
+
* The type of the `AttributeChangeResultError` API.
|
|
200
|
+
*/
|
|
201
|
+
type: 'error';
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* A message that explains the error. This message is useful for debugging.
|
|
205
|
+
* It is **not** localized, and therefore should not be presented directly
|
|
206
|
+
* to the buyer.
|
|
207
|
+
*/
|
|
208
|
+
message: string;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
export type AttributeChangeResult =
|
|
212
|
+
| AttributeChangeResultSuccess
|
|
213
|
+
| AttributeChangeResultError;
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* Metadata associated with the checkout.
|
|
217
|
+
*/
|
|
218
|
+
export interface Metafield {
|
|
219
|
+
/**
|
|
220
|
+
* The name of the metafield. It must be between 3 and 30 characters in
|
|
221
|
+
* length (inclusive).
|
|
222
|
+
*/
|
|
223
|
+
key: string;
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* A container for a set of metafields. You need to define a custom
|
|
227
|
+
* namespace for your metafields to distinguish them from the metafields
|
|
228
|
+
* used by other apps. This must be between 2 and 20 characters in length (inclusive).
|
|
229
|
+
*/
|
|
230
|
+
namespace: string;
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* The information to be stored as metadata.
|
|
234
|
+
*/
|
|
235
|
+
value: string | number;
|
|
236
|
+
|
|
237
|
+
/** The metafield’s information type. */
|
|
238
|
+
valueType: 'integer' | 'string' | 'json_string';
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
/** Removes a metafield. */
|
|
242
|
+
export interface MetafieldRemoveChange {
|
|
243
|
+
/**
|
|
244
|
+
* The type of the `MetafieldRemoveChange` API.
|
|
245
|
+
*/
|
|
246
|
+
type: 'removeMetafield';
|
|
247
|
+
|
|
248
|
+
/**
|
|
249
|
+
* The name of the metafield to remove.
|
|
250
|
+
*/
|
|
251
|
+
key: string;
|
|
252
|
+
|
|
253
|
+
/**
|
|
254
|
+
* The namespace of the metafield to remove.
|
|
255
|
+
*/
|
|
256
|
+
namespace: string;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* Updates a metafield. If a metafield with the
|
|
261
|
+
* provided key and namespace does not already exist, it gets created.
|
|
262
|
+
*/
|
|
263
|
+
export interface MetafieldUpdateChange {
|
|
264
|
+
/**
|
|
265
|
+
* The type of the `MetafieldUpdateChange` API.
|
|
266
|
+
*/
|
|
267
|
+
type: 'updateMetafield';
|
|
268
|
+
|
|
269
|
+
/** The name of the metafield to update. */
|
|
270
|
+
key: string;
|
|
271
|
+
|
|
272
|
+
/** The namespace of the metafield to add. */
|
|
273
|
+
namespace: string;
|
|
274
|
+
|
|
275
|
+
/** The new information to store in the metafield. */
|
|
276
|
+
value: string | number;
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* The metafield’s information type.
|
|
280
|
+
*/
|
|
281
|
+
valueType: 'integer' | 'string' | 'json_string';
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
export type MetafieldChange = MetafieldRemoveChange | MetafieldUpdateChange;
|
|
285
|
+
|
|
286
|
+
export interface MetafieldChangeResultSuccess {
|
|
287
|
+
/**
|
|
288
|
+
* The type of the `MetafieldChangeResultSuccess` API.
|
|
289
|
+
*/
|
|
290
|
+
type: 'success';
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
export interface MetafieldChangeResultError {
|
|
294
|
+
/**
|
|
295
|
+
* The type of the `MetafieldChangeResultError` API.
|
|
296
|
+
*/
|
|
297
|
+
type: 'error';
|
|
298
|
+
|
|
299
|
+
/**
|
|
300
|
+
* A message that explains the error. This message is useful for debugging.
|
|
301
|
+
* It is **not** localized, and therefore should not be presented directly
|
|
302
|
+
* to the buyer.
|
|
303
|
+
*/
|
|
304
|
+
message: string;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
export type MetafieldChangeResult =
|
|
308
|
+
| MetafieldChangeResultSuccess
|
|
309
|
+
| MetafieldChangeResultError;
|
|
310
|
+
|
|
311
|
+
/**
|
|
312
|
+
* Represents a custom metadata attached to a resource.
|
|
313
|
+
*/
|
|
314
|
+
export interface AppMetafield {
|
|
315
|
+
/** The key name of a metafield. */
|
|
316
|
+
key: string;
|
|
317
|
+
|
|
318
|
+
/** The namespace for a metafield. */
|
|
319
|
+
namespace: string;
|
|
320
|
+
|
|
321
|
+
/** The value of a metafield. */
|
|
322
|
+
value: string | number | boolean;
|
|
323
|
+
|
|
324
|
+
/** The metafield’s information type. */
|
|
325
|
+
valueType: 'boolean' | 'float' | 'integer' | 'json_string' | 'string';
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
/**
|
|
329
|
+
* The metafield owner.
|
|
330
|
+
*/
|
|
331
|
+
export interface AppMetafieldEntryTarget {
|
|
332
|
+
/** The type of the metafield owner. */
|
|
333
|
+
type: 'customer' | 'product' | 'shop' | 'variant';
|
|
334
|
+
|
|
335
|
+
/** The numeric owner ID that is associated with the metafield. */
|
|
336
|
+
id: string;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
/**
|
|
340
|
+
* A metafield associated with the shop or a resource on the checkout.
|
|
341
|
+
*/
|
|
342
|
+
export interface AppMetafieldEntry {
|
|
343
|
+
/** The target that is associated to the metadata. */
|
|
344
|
+
target: AppMetafieldEntryTarget;
|
|
345
|
+
|
|
346
|
+
/** The metadata information. */
|
|
347
|
+
metafield: AppMetafield;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
export type Version = 'unstable';
|
|
351
|
+
|
|
352
|
+
export interface Language {
|
|
353
|
+
/**
|
|
354
|
+
* The BCP-47 language tag. It may contain a dash followed by an ISO 3166-1 alpha-2 region code.
|
|
355
|
+
*
|
|
356
|
+
* @example 'en' for English, or 'en-US' for English local to United States.
|
|
357
|
+
* @see https://en.wikipedia.org/wiki/IETF_language_tag
|
|
358
|
+
* @see https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
|
|
359
|
+
*/
|
|
360
|
+
isoCode: string;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
export interface Currency {
|
|
364
|
+
/**
|
|
365
|
+
* The ISO-4217 code for this currency.
|
|
366
|
+
* @see https://www.iso.org/iso-4217-currency-codes.html
|
|
367
|
+
*/
|
|
368
|
+
isoCode: CurrencyCode;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
export interface Localization {
|
|
372
|
+
/**
|
|
373
|
+
* The currency that the buyer sees for money amounts in the checkout.
|
|
374
|
+
*/
|
|
375
|
+
currency: StatefulRemoteSubscribable<Currency>;
|
|
376
|
+
|
|
377
|
+
/**
|
|
378
|
+
* The buyer’s time zone.
|
|
379
|
+
*/
|
|
380
|
+
timezone: StatefulRemoteSubscribable<Timezone>;
|
|
381
|
+
|
|
382
|
+
/**
|
|
383
|
+
* The language the buyer sees in the checkout.
|
|
384
|
+
*/
|
|
385
|
+
language: StatefulRemoteSubscribable<Language>;
|
|
386
|
+
|
|
387
|
+
/**
|
|
388
|
+
* This is the buyer's language, as supported by the extension.
|
|
389
|
+
* If the buyer's actual language is not supported by the extension,
|
|
390
|
+
* this is the fallback locale used for translations.
|
|
391
|
+
*
|
|
392
|
+
* For example, if the buyer's language is 'fr-CA' but your extension
|
|
393
|
+
* only supports translations for 'fr', then the `isoCode` for this
|
|
394
|
+
* language is 'fr'. If your extension does not provide french
|
|
395
|
+
* translations at all, this value is the default locale for your
|
|
396
|
+
* extension (that is, the one matching your .default.json file).
|
|
397
|
+
*/
|
|
398
|
+
extensionLanguage: StatefulRemoteSubscribable<Language>;
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
/**
|
|
402
|
+
* The following APIs are provided to all extension points.
|
|
403
|
+
*/
|
|
404
|
+
export interface StandardApi<ExtensionPoint extends AnyExtensionPoint>
|
|
405
|
+
extends BaseStandardApi {
|
|
406
|
+
/**
|
|
407
|
+
* The renderer version being used for the extension.
|
|
408
|
+
*
|
|
409
|
+
* @example 'unstable'
|
|
410
|
+
*/
|
|
411
|
+
version: Version;
|
|
412
|
+
|
|
413
|
+
/**
|
|
414
|
+
* Provides details on buyer progression through the steps of the checkout.
|
|
415
|
+
*/
|
|
416
|
+
buyerJourney: {
|
|
417
|
+
/**
|
|
418
|
+
* A function for intercepting and preventing progress on checkout. You can block
|
|
419
|
+
* checkout progress by returning an object with `{behavior: 'block', reason: InvalidResultReason.InvalidExtensionState}`.
|
|
420
|
+
* If you do, then you're expected to also update some part of your UI to reflect the reason why progress
|
|
421
|
+
* was blocked.
|
|
422
|
+
*
|
|
423
|
+
* 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.
|
|
424
|
+
*/
|
|
425
|
+
intercept(interceptor: Interceptor): Promise<() => void>;
|
|
426
|
+
};
|
|
427
|
+
|
|
428
|
+
/**
|
|
429
|
+
* The identifier of the running extension point.
|
|
430
|
+
* @example 'Checkout::PostPurchase::Render'
|
|
431
|
+
*/
|
|
432
|
+
extensionPoint: ExtensionPoint;
|
|
433
|
+
|
|
434
|
+
/**
|
|
435
|
+
* Meta information about the extension.
|
|
436
|
+
*/
|
|
437
|
+
extension: ExtensionInstance;
|
|
438
|
+
|
|
439
|
+
/**
|
|
440
|
+
* Key-value storage for the extension point.
|
|
441
|
+
*/
|
|
442
|
+
storage: Storage;
|
|
443
|
+
|
|
444
|
+
/**
|
|
445
|
+
* The proposed buyer shipping address. During the information step, the address
|
|
446
|
+
* updates when the field is committed (on change) rather than every keystroke.
|
|
447
|
+
* An address value is only present if delivery is required. Otherwise, the
|
|
448
|
+
* subscribable value is undefined.
|
|
449
|
+
*/
|
|
450
|
+
shippingAddress?: StatefulRemoteSubscribable<MailingAddress | undefined>;
|
|
451
|
+
|
|
452
|
+
/**
|
|
453
|
+
* Information about the buyer that is interacting with the checkout.
|
|
454
|
+
*/
|
|
455
|
+
buyerIdentity?: BuyerIdentity;
|
|
456
|
+
|
|
457
|
+
/** Shop where the checkout is taking place. */
|
|
458
|
+
shop: Shop;
|
|
459
|
+
|
|
460
|
+
/**
|
|
461
|
+
* Details on the costs the buyer will pay for this checkout.
|
|
462
|
+
*/
|
|
463
|
+
cost: CartCost;
|
|
464
|
+
|
|
465
|
+
/**
|
|
466
|
+
* A note left by the customer to the merchant, either in their cart or during checkout.
|
|
467
|
+
*/
|
|
468
|
+
note: StatefulRemoteSubscribable<string | undefined>;
|
|
469
|
+
|
|
470
|
+
/**
|
|
471
|
+
* Performs an update on the note attached to the cart and checkout. If
|
|
472
|
+
* successful, this mutation results in an update to the value retrieved
|
|
473
|
+
* through the `note` property.
|
|
474
|
+
*/
|
|
475
|
+
applyNoteChange(change: NoteChange): Promise<NoteChangeResult>;
|
|
476
|
+
|
|
477
|
+
/**
|
|
478
|
+
* Custom attributes left by the customer to the merchant, either in their cart or during checkout.
|
|
479
|
+
*/
|
|
480
|
+
attributes: StatefulRemoteSubscribable<Attribute[] | undefined>;
|
|
481
|
+
|
|
482
|
+
/**
|
|
483
|
+
* Performs an update on an attribute attached to the cart and checkout. If
|
|
484
|
+
* successful, this mutation results in an update to the value retrieved
|
|
485
|
+
* through the `attributes` property.
|
|
486
|
+
*/
|
|
487
|
+
applyAttributeChange(change: AttributeChange): Promise<AttributeChangeResult>;
|
|
488
|
+
|
|
489
|
+
/**
|
|
490
|
+
* The metafields that apply to the current checkout. The actual resource
|
|
491
|
+
* on which these metafields exist depends on the source of the checkout:
|
|
492
|
+
*
|
|
493
|
+
* - If the source is an order, then the metafields are on the order.
|
|
494
|
+
* - If the source is a draft order, then the initial value of metafields are
|
|
495
|
+
* from the draft order, and any new metafields you write are applied
|
|
496
|
+
* to the order created by this checkout.
|
|
497
|
+
* - For all other sources, the metafields are only stored locally on the
|
|
498
|
+
* client creating the checkout, and are applied to the order that
|
|
499
|
+
* results from checkout.
|
|
500
|
+
*
|
|
501
|
+
* These metafields are shared by all extensions running on checkout, and
|
|
502
|
+
* persist for as long as the customer is working on this checkout.
|
|
503
|
+
*
|
|
504
|
+
* Once the order is created, you can query these metafields using the
|
|
505
|
+
* [GraphQL Admin API](https://shopify.dev/docs/admin-api/graphql/reference/orders/order#metafield-2021-01)
|
|
506
|
+
*/
|
|
507
|
+
metafields: StatefulRemoteSubscribable<Metafield[]>;
|
|
508
|
+
|
|
509
|
+
/**
|
|
510
|
+
* Performs an update on a piece of metadata attached to the checkout. If
|
|
511
|
+
* successful, this mutation results in an update to the value retrieved
|
|
512
|
+
* through the `metafields` property.
|
|
513
|
+
*/
|
|
514
|
+
applyMetafieldChange(change: MetafieldChange): Promise<MetafieldChangeResult>;
|
|
515
|
+
|
|
516
|
+
/**
|
|
517
|
+
* A list of lines containing information about the items the customer intends to purchase.
|
|
518
|
+
*/
|
|
519
|
+
lines: StatefulRemoteSubscribable<CartLine[]>;
|
|
520
|
+
|
|
521
|
+
/**
|
|
522
|
+
* A list of the line items displayed in the checkout. These may be the same as lines, or may be a subset.
|
|
523
|
+
*/
|
|
524
|
+
presentmentLines: StatefulRemoteSubscribable<PresentmentCartLine[]>;
|
|
525
|
+
|
|
526
|
+
/**
|
|
527
|
+
* Performs an update on the merchandise line items. It resolves when the new
|
|
528
|
+
* line items have been negotiated and results in an update to the value
|
|
529
|
+
* retrieved through the `lines` property.
|
|
530
|
+
*/
|
|
531
|
+
applyCartLinesChange(change: CartLineChange): Promise<CartLineChangeResult>;
|
|
532
|
+
|
|
533
|
+
/**
|
|
534
|
+
* A list of discount codes currently applied to the checkout.
|
|
535
|
+
*/
|
|
536
|
+
discountCodes: StatefulRemoteSubscribable<CartDiscountCode[]>;
|
|
537
|
+
|
|
538
|
+
/**
|
|
539
|
+
* Discounts that have been applied to the entire cart.
|
|
540
|
+
*/
|
|
541
|
+
discountAllocations: StatefulRemoteSubscribable<CartDiscountAllocation[]>;
|
|
542
|
+
|
|
543
|
+
/**
|
|
544
|
+
* Performs an update on the discount codes.
|
|
545
|
+
* It resolves when the new discount codes have been negotiated and results in an update
|
|
546
|
+
* to the value retrieved through the `discountCodes` property.
|
|
547
|
+
*/
|
|
548
|
+
applyDiscountCodeChange(
|
|
549
|
+
change: DiscountCodeChange,
|
|
550
|
+
): Promise<DiscountCodeChangeResult>;
|
|
551
|
+
|
|
552
|
+
/**
|
|
553
|
+
* The metafields requested in the `shopify.ui.extension.toml` file. These metafields are
|
|
554
|
+
* updated when there's a change in the merchandise items being purchased by the customer.
|
|
555
|
+
*/
|
|
556
|
+
appMetafields: StatefulRemoteSubscribable<AppMetafieldEntry[]>;
|
|
557
|
+
|
|
558
|
+
/**
|
|
559
|
+
* Details about the location, language, and currency of the buyer. For utilities to easily
|
|
560
|
+
* format and translate content based on these details, you can use the `i18n` object instead.
|
|
561
|
+
*/
|
|
562
|
+
localization: Localization;
|
|
563
|
+
|
|
564
|
+
/**
|
|
565
|
+
* Utilities for translating content and formatting values according to the current `localization`
|
|
566
|
+
* of the checkout.
|
|
567
|
+
*/
|
|
568
|
+
i18n: I18n;
|
|
569
|
+
|
|
570
|
+
/**
|
|
571
|
+
* The settings matching the settings definition written in the `shopify.ui.extension.toml` file.
|
|
572
|
+
*
|
|
573
|
+
* **Note:** When an extension is being installed in the editor, the settings will be empty until
|
|
574
|
+
* a merchant sets a value. In that case, this object will be updated in real time as a merchant fills in the settings.
|
|
575
|
+
*/
|
|
576
|
+
settings: StatefulRemoteSubscribable<ExtensionSettings>;
|
|
577
|
+
|
|
578
|
+
/**
|
|
579
|
+
* Exposes a `analytics.publish` method to publish analytics events.
|
|
580
|
+
*/
|
|
581
|
+
analytics: Analytics;
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
export interface BuyerIdentity {
|
|
585
|
+
/**
|
|
586
|
+
* The customer account from the buyer. This value will update when there's a
|
|
587
|
+
* change in the account. The value is undefined if the buyer isn’t a known customer
|
|
588
|
+
* for this shop.
|
|
589
|
+
*
|
|
590
|
+
* Protected resource: Requires approval to access protected customer data.
|
|
591
|
+
* More info - https://shopify.dev/apps/store/data-protection/protected-customer-data
|
|
592
|
+
*/
|
|
593
|
+
customer: StatefulRemoteSubscribable<Customer | undefined>;
|
|
594
|
+
|
|
595
|
+
/**
|
|
596
|
+
* The email address of the buyer that is interacting with the cart. This value will update when there's a
|
|
597
|
+
* change in the checkout formulary. The value is undefined if no permission given.
|
|
598
|
+
*
|
|
599
|
+
* Protected resource: Requires approval to access protected customer data (Level 2).
|
|
600
|
+
* More info - https://shopify.dev/apps/store/data-protection/protected-customer-data
|
|
601
|
+
*/
|
|
602
|
+
email: StatefulRemoteSubscribable<string | undefined>;
|
|
603
|
+
|
|
604
|
+
/**
|
|
605
|
+
* The phone number of the buyer that is interacting with the cart. This value will update when there's a
|
|
606
|
+
* change in the checkout formulary. The value is undefined if no permission given.
|
|
607
|
+
*
|
|
608
|
+
* Protected resource: Requires approval to access protected customer data (Level 2).
|
|
609
|
+
* More info - https://shopify.dev/apps/store/data-protection/protected-customer-data
|
|
610
|
+
*/
|
|
611
|
+
phone: StatefulRemoteSubscribable<string | undefined>;
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
export interface Shop {
|
|
615
|
+
/**
|
|
616
|
+
* The shop ID.
|
|
617
|
+
* @example 'gid://shopify/Shop/123'
|
|
618
|
+
*/
|
|
619
|
+
id: string;
|
|
620
|
+
/**
|
|
621
|
+
* The name of the shop.
|
|
622
|
+
*/
|
|
623
|
+
name: string;
|
|
624
|
+
/**
|
|
625
|
+
* The primary storefront URL.
|
|
626
|
+
*/
|
|
627
|
+
storefrontUrl?: string;
|
|
628
|
+
/**
|
|
629
|
+
* The shop's myshopify.com domain.
|
|
630
|
+
*/
|
|
631
|
+
myshopifyDomain: string;
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
export interface MailingAddress {
|
|
635
|
+
/**
|
|
636
|
+
* The buyer's full name.
|
|
637
|
+
* @example 'John Doe'
|
|
638
|
+
*/
|
|
639
|
+
name?: string;
|
|
640
|
+
|
|
641
|
+
/**
|
|
642
|
+
* The buyer's first name.
|
|
643
|
+
* @example 'John'
|
|
644
|
+
*/
|
|
645
|
+
firstName?: string;
|
|
646
|
+
|
|
647
|
+
/**
|
|
648
|
+
* The buyer's last name.
|
|
649
|
+
* @example 'Doe'
|
|
650
|
+
*/
|
|
651
|
+
lastName?: string;
|
|
652
|
+
|
|
653
|
+
/**
|
|
654
|
+
* The buyer's company name.
|
|
655
|
+
* @example 'Shopify'
|
|
656
|
+
*/
|
|
657
|
+
company?: string;
|
|
658
|
+
|
|
659
|
+
/**
|
|
660
|
+
* The first line of the buyer's address, including street name and number.
|
|
661
|
+
* @example '151 O'Connor Street'
|
|
662
|
+
*/
|
|
663
|
+
address1?: string;
|
|
664
|
+
|
|
665
|
+
/**
|
|
666
|
+
* The second line of the buyer's address, like apartment number, suite, etc.
|
|
667
|
+
* @example 'Ground floor'
|
|
668
|
+
*/
|
|
669
|
+
address2?: string;
|
|
670
|
+
|
|
671
|
+
/**
|
|
672
|
+
* The buyer's city.
|
|
673
|
+
* @example 'Ottawa'
|
|
674
|
+
*/
|
|
675
|
+
city?: string;
|
|
676
|
+
|
|
677
|
+
/**
|
|
678
|
+
* The buyer's postal or ZIP code.
|
|
679
|
+
* @example 'K2P 2L8'
|
|
680
|
+
*/
|
|
681
|
+
zip?: string;
|
|
682
|
+
|
|
683
|
+
/**
|
|
684
|
+
* The ISO 3166 Alpha-2 format for the buyer's country. Refer to https://www.iso.org/iso-3166-country-codes.html.
|
|
685
|
+
* @example 'CA' for Canada.
|
|
686
|
+
*/
|
|
687
|
+
countryCode?: CountryCode;
|
|
688
|
+
|
|
689
|
+
/**
|
|
690
|
+
* The buyer's zone code, such as state, province, prefecture, or region.
|
|
691
|
+
* @example 'ON' for Ontario.
|
|
692
|
+
*/
|
|
693
|
+
provinceCode?: string;
|
|
694
|
+
|
|
695
|
+
/**
|
|
696
|
+
* The buyer's phone number.
|
|
697
|
+
* @example '+1 613 111 2222'.
|
|
698
|
+
*/
|
|
699
|
+
phone?: string;
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
export interface CartCost {
|
|
703
|
+
/**
|
|
704
|
+
* A `Money` value representing the minimum a buyer can expect to pay at the current
|
|
705
|
+
* step of checkout. This value excludes amounts yet to be negotiated. For example,
|
|
706
|
+
* the information step might not have delivery costs calculated.
|
|
707
|
+
*/
|
|
708
|
+
totalAmount: StatefulRemoteSubscribable<Money>;
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
export interface CartLine {
|
|
712
|
+
/**
|
|
713
|
+
* These line item IDs are not stable at the moment, they might change after
|
|
714
|
+
* any operations on the line items. You should always look up for an updated
|
|
715
|
+
* ID before any call to `applyCartLinesChange` because you'll need the ID to
|
|
716
|
+
* create a `CartLineChange` object.
|
|
717
|
+
* @example 'gid://shopify/CartLine/123'
|
|
718
|
+
*/
|
|
719
|
+
id: string;
|
|
720
|
+
|
|
721
|
+
/**
|
|
722
|
+
* The merchandise being purchased.
|
|
723
|
+
*/
|
|
724
|
+
merchandise: Merchandise;
|
|
725
|
+
|
|
726
|
+
/**
|
|
727
|
+
* The quantity of the merchandise being purchased.
|
|
728
|
+
*/
|
|
729
|
+
quantity: number;
|
|
730
|
+
|
|
731
|
+
/**
|
|
732
|
+
* The details about the cost components attributed to the cart line.
|
|
733
|
+
*/
|
|
734
|
+
cost: CartLineCost;
|
|
735
|
+
|
|
736
|
+
/**
|
|
737
|
+
* The line item additional custom attributes.
|
|
738
|
+
*/
|
|
739
|
+
attributes: Attribute[];
|
|
740
|
+
|
|
741
|
+
/**
|
|
742
|
+
* Discounts applied to the cart line.
|
|
743
|
+
*/
|
|
744
|
+
discountAllocations: CartDiscountAllocation[];
|
|
745
|
+
|
|
746
|
+
/** @private */
|
|
747
|
+
__lineComponents: CartLineComponentType[];
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
/** @private */
|
|
751
|
+
type CartLineComponentType = CartBundleLineComponent;
|
|
752
|
+
|
|
753
|
+
/** @private */
|
|
754
|
+
export interface CartBundleLineComponent {
|
|
755
|
+
id: string;
|
|
756
|
+
merchandise: Merchandise;
|
|
757
|
+
quantity: number;
|
|
758
|
+
cost: CartLineCost;
|
|
759
|
+
attributes: Attribute[];
|
|
760
|
+
}
|
|
761
|
+
|
|
762
|
+
export interface CartLineCost {
|
|
763
|
+
/**
|
|
764
|
+
* The total amount the buyer can expect to pay that is directly attributable to a single
|
|
765
|
+
* cart line.
|
|
766
|
+
*/
|
|
767
|
+
totalAmount: Money;
|
|
768
|
+
}
|
|
769
|
+
|
|
770
|
+
export interface Money {
|
|
771
|
+
/**
|
|
772
|
+
* The price amount.
|
|
773
|
+
*/
|
|
774
|
+
amount: number;
|
|
775
|
+
/**
|
|
776
|
+
* The ISO 4217 format for the currency.
|
|
777
|
+
* @example 'CAD' for Canadian dollar
|
|
778
|
+
*/
|
|
779
|
+
currencyCode: CurrencyCode;
|
|
780
|
+
}
|
|
781
|
+
|
|
782
|
+
export type Merchandise = ProductVariant;
|
|
783
|
+
|
|
784
|
+
export interface BaseMerchandise {
|
|
785
|
+
/**
|
|
786
|
+
* The merchandise ID.
|
|
787
|
+
*/
|
|
788
|
+
id: string;
|
|
789
|
+
}
|
|
790
|
+
|
|
791
|
+
export interface ProductVariant extends BaseMerchandise {
|
|
792
|
+
type: 'variant';
|
|
793
|
+
|
|
794
|
+
/**
|
|
795
|
+
* A globally-unique identifier.
|
|
796
|
+
* @example 'gid://shopify/ProductVariant/123'
|
|
797
|
+
*/
|
|
798
|
+
id: string;
|
|
799
|
+
|
|
800
|
+
/**
|
|
801
|
+
* The product variant’s title.
|
|
802
|
+
*/
|
|
803
|
+
title: string;
|
|
804
|
+
|
|
805
|
+
/**
|
|
806
|
+
* The product variant's subtitle.
|
|
807
|
+
*/
|
|
808
|
+
subtitle?: string;
|
|
809
|
+
|
|
810
|
+
/**
|
|
811
|
+
* Image associated with the product variant. This field falls back to the product
|
|
812
|
+
* image if no image is available.
|
|
813
|
+
*/
|
|
814
|
+
image?: ImageDetails;
|
|
815
|
+
|
|
816
|
+
/**
|
|
817
|
+
* List of product options applied to the variant.
|
|
818
|
+
*/
|
|
819
|
+
selectedOptions: SelectedOption[];
|
|
820
|
+
|
|
821
|
+
/**
|
|
822
|
+
* The product object that the product variant belongs to.
|
|
823
|
+
*/
|
|
824
|
+
product: Product;
|
|
825
|
+
}
|
|
826
|
+
|
|
827
|
+
export interface Product {
|
|
828
|
+
/**
|
|
829
|
+
* A globally-unique identifier.
|
|
830
|
+
*/
|
|
831
|
+
id: string;
|
|
832
|
+
|
|
833
|
+
/**
|
|
834
|
+
* The product’s vendor name.
|
|
835
|
+
*/
|
|
836
|
+
vendor: string;
|
|
837
|
+
|
|
838
|
+
/**
|
|
839
|
+
* A categorization that a product can be tagged with, commonly used for filtering and searching.
|
|
840
|
+
*/
|
|
841
|
+
productType: string;
|
|
842
|
+
}
|
|
843
|
+
|
|
844
|
+
export interface ImageDetails {
|
|
845
|
+
/**
|
|
846
|
+
* The image URL.
|
|
847
|
+
*/
|
|
848
|
+
url: string;
|
|
849
|
+
|
|
850
|
+
/**
|
|
851
|
+
* The alternative text for the image.
|
|
852
|
+
*/
|
|
853
|
+
altText?: string;
|
|
854
|
+
}
|
|
855
|
+
|
|
856
|
+
export interface Attribute {
|
|
857
|
+
/**
|
|
858
|
+
* The key for the attribute.
|
|
859
|
+
*/
|
|
860
|
+
key: string;
|
|
861
|
+
|
|
862
|
+
/**
|
|
863
|
+
* The value for the attribute.
|
|
864
|
+
*/
|
|
865
|
+
value: string;
|
|
866
|
+
}
|
|
867
|
+
|
|
868
|
+
export interface SelectedOption {
|
|
869
|
+
/**
|
|
870
|
+
* The name of the merchandise option.
|
|
871
|
+
*/
|
|
872
|
+
name: string;
|
|
873
|
+
|
|
874
|
+
/**
|
|
875
|
+
* The value of the merchandise option.
|
|
876
|
+
*/
|
|
877
|
+
value: string;
|
|
878
|
+
}
|
|
879
|
+
|
|
880
|
+
export interface PresentmentCartLine {
|
|
881
|
+
/**
|
|
882
|
+
* The ID of the present cart line. This ID isn't stable and might change after
|
|
883
|
+
* any operations on the line items.
|
|
884
|
+
* @example 'gid://shopify/PresentmentCartLine/123'
|
|
885
|
+
*/
|
|
886
|
+
id: string;
|
|
887
|
+
|
|
888
|
+
/**
|
|
889
|
+
* The quantity of the merchandise being purchased.
|
|
890
|
+
*/
|
|
891
|
+
quantity: number;
|
|
892
|
+
|
|
893
|
+
/**
|
|
894
|
+
* The details about the cost components attributed to the presentment cart line.
|
|
895
|
+
*/
|
|
896
|
+
cost: PresentmentCartLineCost;
|
|
897
|
+
|
|
898
|
+
/**
|
|
899
|
+
* The title of the line item.
|
|
900
|
+
*/
|
|
901
|
+
title: string;
|
|
902
|
+
|
|
903
|
+
/**
|
|
904
|
+
* The subtitle of the line item.
|
|
905
|
+
*/
|
|
906
|
+
subtitle?: string;
|
|
907
|
+
|
|
908
|
+
/**
|
|
909
|
+
* The image associated with the line item.
|
|
910
|
+
*/
|
|
911
|
+
image?: ImageDetails;
|
|
912
|
+
|
|
913
|
+
/**
|
|
914
|
+
* The merchandise lines being purchased.
|
|
915
|
+
*/
|
|
916
|
+
lines: CartLine[];
|
|
917
|
+
}
|
|
918
|
+
|
|
919
|
+
export interface PresentmentCartLineCost {
|
|
920
|
+
/**
|
|
921
|
+
* The total cost of the merchandise line.
|
|
922
|
+
*/
|
|
923
|
+
totalAmount: Money;
|
|
924
|
+
}
|
|
925
|
+
|
|
926
|
+
export interface CartLineChangeResultSuccess {
|
|
927
|
+
/**
|
|
928
|
+
* Indicates that the line item was changed successfully.
|
|
929
|
+
*/
|
|
930
|
+
type: 'success';
|
|
931
|
+
}
|
|
932
|
+
|
|
933
|
+
export interface CartLineChangeResultError {
|
|
934
|
+
/**
|
|
935
|
+
* Indicates that the line item was not changed successfully. Refer to the `message` property for details about the error.
|
|
936
|
+
*/
|
|
937
|
+
type: 'error';
|
|
938
|
+
|
|
939
|
+
/**
|
|
940
|
+
* A message that explains the error. This message is useful for debugging.
|
|
941
|
+
* It is **not** localized, and therefore should not be presented directly
|
|
942
|
+
* to the buyer.
|
|
943
|
+
*/
|
|
944
|
+
message: string;
|
|
945
|
+
}
|
|
946
|
+
|
|
947
|
+
export type CartLineChangeResult =
|
|
948
|
+
| CartLineChangeResultSuccess
|
|
949
|
+
| CartLineChangeResultError;
|
|
950
|
+
|
|
951
|
+
export type CartLineChange =
|
|
952
|
+
| CartLineAddChange
|
|
953
|
+
| CartLineRemoveChange
|
|
954
|
+
| CartLineUpdateChange;
|
|
955
|
+
|
|
956
|
+
export interface CartLineAddChange {
|
|
957
|
+
/**
|
|
958
|
+
* An identifier for changes that add line items.
|
|
959
|
+
*/
|
|
960
|
+
type: 'addCartLine';
|
|
961
|
+
|
|
962
|
+
/**
|
|
963
|
+
* The merchandise ID being added.
|
|
964
|
+
* @example 'gid://shopify/ProductVariant/123'
|
|
965
|
+
*/
|
|
966
|
+
merchandiseId: string;
|
|
967
|
+
|
|
968
|
+
/**
|
|
969
|
+
* The quantity of the merchandise being added.
|
|
970
|
+
*/
|
|
971
|
+
quantity: number;
|
|
972
|
+
|
|
973
|
+
/**
|
|
974
|
+
* The attributes associated with the line item.
|
|
975
|
+
*/
|
|
976
|
+
attributes?: Attribute[];
|
|
977
|
+
}
|
|
978
|
+
|
|
979
|
+
export interface CartLineRemoveChange {
|
|
980
|
+
/**
|
|
981
|
+
* An identifier for changes that remove line items.
|
|
982
|
+
*/
|
|
983
|
+
type: 'removeCartLine';
|
|
984
|
+
|
|
985
|
+
/**
|
|
986
|
+
* Line Item ID.
|
|
987
|
+
* @example 'gid://shopify/CartLine/123'
|
|
988
|
+
*/
|
|
989
|
+
id: string;
|
|
990
|
+
|
|
991
|
+
/**
|
|
992
|
+
* The quantity being removed for this line item.
|
|
993
|
+
*/
|
|
994
|
+
quantity: number;
|
|
995
|
+
}
|
|
996
|
+
|
|
997
|
+
export interface CartLineUpdateChange {
|
|
998
|
+
/**
|
|
999
|
+
* An identifier for changes that update line items.
|
|
1000
|
+
*/
|
|
1001
|
+
type: 'updateCartLine';
|
|
1002
|
+
|
|
1003
|
+
/**
|
|
1004
|
+
* Line Item ID.
|
|
1005
|
+
* @example 'gid://shopify/CartLine/123'
|
|
1006
|
+
*/
|
|
1007
|
+
id: string;
|
|
1008
|
+
|
|
1009
|
+
/**
|
|
1010
|
+
* The new merchandise ID for the line item.
|
|
1011
|
+
* @example 'gid://shopify/ProductVariant/123'
|
|
1012
|
+
*/
|
|
1013
|
+
|
|
1014
|
+
merchandiseId?: string;
|
|
1015
|
+
/**
|
|
1016
|
+
* The new quantity for the line item.
|
|
1017
|
+
*/
|
|
1018
|
+
quantity?: number;
|
|
1019
|
+
|
|
1020
|
+
/**
|
|
1021
|
+
* The new attributes for the line item.
|
|
1022
|
+
*/
|
|
1023
|
+
attributes?: Attribute[];
|
|
1024
|
+
}
|
|
1025
|
+
|
|
1026
|
+
export interface CartDiscountCode {
|
|
1027
|
+
/**
|
|
1028
|
+
* The code for the discount
|
|
1029
|
+
*/
|
|
1030
|
+
code: string;
|
|
1031
|
+
}
|
|
1032
|
+
|
|
1033
|
+
export type CartDiscountAllocation =
|
|
1034
|
+
| CartCodeDiscountAllocation
|
|
1035
|
+
| CartAutomaticDiscountAllocation
|
|
1036
|
+
| CartCustomDiscountAllocation;
|
|
1037
|
+
|
|
1038
|
+
export interface CartDiscountAllocationBase {
|
|
1039
|
+
/**
|
|
1040
|
+
* The money amount that has been discounted from the order
|
|
1041
|
+
*/
|
|
1042
|
+
discountedAmount: Money;
|
|
1043
|
+
}
|
|
1044
|
+
|
|
1045
|
+
export interface CartCodeDiscountAllocation extends CartDiscountAllocationBase {
|
|
1046
|
+
/**
|
|
1047
|
+
* The code for the discount
|
|
1048
|
+
*/
|
|
1049
|
+
code: string;
|
|
1050
|
+
|
|
1051
|
+
/**
|
|
1052
|
+
* The type of the code discount
|
|
1053
|
+
*/
|
|
1054
|
+
type: 'code';
|
|
1055
|
+
}
|
|
1056
|
+
|
|
1057
|
+
export interface CartAutomaticDiscountAllocation
|
|
1058
|
+
extends CartDiscountAllocationBase {
|
|
1059
|
+
/**
|
|
1060
|
+
* The title of the automatic discount
|
|
1061
|
+
*/
|
|
1062
|
+
title: string;
|
|
1063
|
+
|
|
1064
|
+
/**
|
|
1065
|
+
* The type of the automatic discount
|
|
1066
|
+
*/
|
|
1067
|
+
type: 'automatic';
|
|
1068
|
+
}
|
|
1069
|
+
|
|
1070
|
+
export interface CartCustomDiscountAllocation
|
|
1071
|
+
extends CartDiscountAllocationBase {
|
|
1072
|
+
/**
|
|
1073
|
+
* The title of the custom discount
|
|
1074
|
+
*/
|
|
1075
|
+
title: string;
|
|
1076
|
+
|
|
1077
|
+
/**
|
|
1078
|
+
* The type of the custom discount
|
|
1079
|
+
*/
|
|
1080
|
+
type: 'custom';
|
|
1081
|
+
}
|
|
1082
|
+
|
|
1083
|
+
export type DiscountCodeChange =
|
|
1084
|
+
| DiscountCodeAddChange
|
|
1085
|
+
| DiscountCodeRemoveChange;
|
|
1086
|
+
|
|
1087
|
+
export type DiscountCodeChangeResult =
|
|
1088
|
+
| DiscountCodeChangeResultSuccess
|
|
1089
|
+
| DiscountCodeChangeResultError;
|
|
1090
|
+
|
|
1091
|
+
export interface DiscountCodeAddChange {
|
|
1092
|
+
/**
|
|
1093
|
+
* The type of the `DiscountCodeChange` API.
|
|
1094
|
+
*/
|
|
1095
|
+
type: 'addDiscountCode';
|
|
1096
|
+
|
|
1097
|
+
/**
|
|
1098
|
+
* The code for the discount
|
|
1099
|
+
*/
|
|
1100
|
+
code: string;
|
|
1101
|
+
}
|
|
1102
|
+
|
|
1103
|
+
export interface DiscountCodeRemoveChange {
|
|
1104
|
+
/**
|
|
1105
|
+
* The type of the `DiscountCodeChange` API.
|
|
1106
|
+
*/
|
|
1107
|
+
type: 'removeDiscountCode';
|
|
1108
|
+
|
|
1109
|
+
/**
|
|
1110
|
+
* The code for the discount
|
|
1111
|
+
*/
|
|
1112
|
+
code: string;
|
|
1113
|
+
}
|
|
1114
|
+
|
|
1115
|
+
export interface DiscountCodeChangeResultSuccess {
|
|
1116
|
+
/**
|
|
1117
|
+
* Indicates that the discount code change was applied successfully.
|
|
1118
|
+
*/
|
|
1119
|
+
type: 'success';
|
|
1120
|
+
}
|
|
1121
|
+
|
|
1122
|
+
export interface DiscountCodeChangeResultError {
|
|
1123
|
+
/**
|
|
1124
|
+
* Indicates that the discount code change failed.
|
|
1125
|
+
*/
|
|
1126
|
+
type: 'error';
|
|
1127
|
+
|
|
1128
|
+
/**
|
|
1129
|
+
* A message that explains the error. This message is useful for debugging.
|
|
1130
|
+
* It is **not** localized, and therefore should not be presented directly
|
|
1131
|
+
* to the buyer.
|
|
1132
|
+
*/
|
|
1133
|
+
message: string;
|
|
1134
|
+
}
|
|
1135
|
+
|
|
1136
|
+
type InterceptorResult = InterceptorResultAllow | InterceptorResultBlock;
|
|
1137
|
+
|
|
1138
|
+
interface InterceptorResultAllow {
|
|
1139
|
+
/**
|
|
1140
|
+
* Indicates that the buyer was allowed to progress through checkout.
|
|
1141
|
+
*/
|
|
1142
|
+
behavior: 'allow';
|
|
1143
|
+
}
|
|
1144
|
+
|
|
1145
|
+
interface InterceptorResultBlock {
|
|
1146
|
+
/**
|
|
1147
|
+
* Indicates that some part of the checkout UI intercepted and prevented
|
|
1148
|
+
* the buyer’s progress. The buyer typically needs to take some action
|
|
1149
|
+
* to resolve this issue and to move on to the next step.
|
|
1150
|
+
*/
|
|
1151
|
+
behavior: 'block';
|
|
1152
|
+
}
|
|
1153
|
+
|
|
1154
|
+
export type InterceptorRequest =
|
|
1155
|
+
| InterceptorRequestAllow
|
|
1156
|
+
| InterceptorRequestBlock;
|
|
1157
|
+
|
|
1158
|
+
interface InterceptorRequestAllow {
|
|
1159
|
+
/**
|
|
1160
|
+
* Indicates that the interceptor will allow the buyer's journey to continue.
|
|
1161
|
+
*/
|
|
1162
|
+
behavior: 'allow';
|
|
1163
|
+
|
|
1164
|
+
/**
|
|
1165
|
+
* This callback is called when all interceptors finish. We recommend
|
|
1166
|
+
* setting errors or reasons for blocking at this stage, so that all the errors in
|
|
1167
|
+
* the UI show up at once.
|
|
1168
|
+
* @param result InterceptorResult with behavior as either 'allow' or 'block'
|
|
1169
|
+
*/
|
|
1170
|
+
perform?(result: InterceptorResult): void | Promise<void>;
|
|
1171
|
+
}
|
|
1172
|
+
// The reason is used for tracing and debugging purposes.
|
|
1173
|
+
interface InterceptorRequestBlock {
|
|
1174
|
+
/**
|
|
1175
|
+
* Indicates that the interceptor will block the buyer's journey from continuing.
|
|
1176
|
+
*/
|
|
1177
|
+
behavior: 'block';
|
|
1178
|
+
|
|
1179
|
+
/**
|
|
1180
|
+
* The reason for blocking the interceptor request. This value isn't presented to
|
|
1181
|
+
* the buyer, so it doesn't need to be localized. The value is used only for Shopify’s
|
|
1182
|
+
* own internal debugging and metrics.
|
|
1183
|
+
*/
|
|
1184
|
+
reason: string;
|
|
1185
|
+
|
|
1186
|
+
/**
|
|
1187
|
+
* This callback is called when all interceptors finish. We recommend
|
|
1188
|
+
* setting errors or reasons for blocking at this stage, so that all the errors in
|
|
1189
|
+
* the UI show up at once.
|
|
1190
|
+
* @param result InterceptorResult with behavior as either 'allow' or 'block'
|
|
1191
|
+
*/
|
|
1192
|
+
perform(result: InterceptorResult): void | Promise<void>;
|
|
1193
|
+
}
|
|
1194
|
+
|
|
1195
|
+
export interface InterceptorProps {
|
|
1196
|
+
/**
|
|
1197
|
+
* Whether the interceptor has the capability to block a buyer's progress through
|
|
1198
|
+
* checkout. This ability might be granted by a merchant in differing checkout contexts.
|
|
1199
|
+
*/
|
|
1200
|
+
canBlockProgress: boolean;
|
|
1201
|
+
}
|
|
1202
|
+
|
|
1203
|
+
export interface Interceptor {
|
|
1204
|
+
/**
|
|
1205
|
+
* A function for intercepting and preventing navigation on checkout. You can block
|
|
1206
|
+
* navigation by returning an object with `{behavior: 'block', reason: InvalidResultReason.InvalidExtensionState}`.
|
|
1207
|
+
* If you do, then you're expected to also update some part of your UI to reflect the reason why navigation
|
|
1208
|
+
* was blocked.
|
|
1209
|
+
*/
|
|
1210
|
+
(interceptorProps: InterceptorProps):
|
|
1211
|
+
| InterceptorRequest
|
|
1212
|
+
| Promise<InterceptorRequest>;
|
|
1213
|
+
}
|
|
1214
|
+
|
|
1215
|
+
/**
|
|
1216
|
+
* Information about a customer who has previously purchased from this shop.
|
|
1217
|
+
*/
|
|
1218
|
+
export interface Customer {
|
|
1219
|
+
/**
|
|
1220
|
+
* Customer ID.
|
|
1221
|
+
* @example 'gid://shopify/Customer/123'
|
|
1222
|
+
*/
|
|
1223
|
+
id: string;
|
|
1224
|
+
/**
|
|
1225
|
+
* The email of the customer.
|
|
1226
|
+
*/
|
|
1227
|
+
email?: string;
|
|
1228
|
+
/**
|
|
1229
|
+
* The phone number of the customer.
|
|
1230
|
+
*/
|
|
1231
|
+
phone?: string;
|
|
1232
|
+
/**
|
|
1233
|
+
* The full name of the customer.
|
|
1234
|
+
*/
|
|
1235
|
+
fullName?: string;
|
|
1236
|
+
/**
|
|
1237
|
+
* The first name of the customer.
|
|
1238
|
+
*/
|
|
1239
|
+
firstName?: string;
|
|
1240
|
+
/**
|
|
1241
|
+
* The last name of the customer.
|
|
1242
|
+
*/
|
|
1243
|
+
lastName?: string;
|
|
1244
|
+
/**
|
|
1245
|
+
* The image associated with the customer.
|
|
1246
|
+
*/
|
|
1247
|
+
image: ImageDetails;
|
|
1248
|
+
/**
|
|
1249
|
+
* Defines if the customer accepts marketing activities.
|
|
1250
|
+
*/
|
|
1251
|
+
acceptsMarketing: boolean;
|
|
1252
|
+
}
|
|
1253
|
+
|
|
1254
|
+
/**
|
|
1255
|
+
* The merchant-defined setting values for the extension.
|
|
1256
|
+
*/
|
|
1257
|
+
export interface ExtensionSettings {
|
|
1258
|
+
[key: string]: string | number | boolean | undefined;
|
|
1259
|
+
}
|
|
1260
|
+
|
|
1261
|
+
/**
|
|
1262
|
+
* Publish method to emit analytics events to Web Pixels.
|
|
1263
|
+
*/
|
|
1264
|
+
export interface Analytics {
|
|
1265
|
+
publish(name: string, data: {[key: string]: unknown}): Promise<boolean>;
|
|
1266
|
+
}
|