@shopify/ui-extensions 2023.4.2 → 2023.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/build/cjs/surfaces/admin/components/ResourceItem/ResourceItem.js +14 -0
- package/build/cjs/surfaces/admin/components/ResourceList/ResourceList.js +15 -0
- package/build/cjs/surfaces/admin/components/Thumbnail/Thumbnail.js +12 -0
- package/build/cjs/surfaces/admin.js +6 -0
- package/build/cjs/surfaces/checkout/extension.js +7 -28
- package/build/cjs/surfaces/checkout.js +0 -1
- 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/Thumbnail/Thumbnail.mjs +8 -0
- package/build/esm/surfaces/admin.mjs +3 -0
- package/build/esm/surfaces/checkout/extension.mjs +7 -27
- package/build/esm/surfaces/checkout.mjs +1 -1
- 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/Thumbnail/Thumbnail.esnext +8 -0
- package/build/esnext/surfaces/admin.esnext +3 -0
- package/build/esnext/surfaces/checkout/extension.esnext +7 -27
- package/build/esnext/surfaces/checkout.esnext +1 -1
- package/build/ts/api.d.ts +0 -15
- package/build/ts/api.d.ts.map +1 -1
- package/build/ts/extension.d.ts +0 -3
- package/build/ts/extension.d.ts.map +1 -1
- package/build/ts/surfaces/admin/api/action/action.d.ts +5 -2
- package/build/ts/surfaces/admin/api/action/action.d.ts.map +1 -1
- package/build/ts/surfaces/admin/api/block/block.d.ts +10 -0
- package/build/ts/surfaces/admin/api/block/block.d.ts.map +1 -0
- package/build/ts/surfaces/admin/api/block/block.doc.d.ts +4 -0
- package/build/ts/surfaces/admin/api/block/block.doc.d.ts.map +1 -0
- package/build/ts/surfaces/admin/api/product-configuration/product-details-configuration.d.ts +45 -0
- package/build/ts/surfaces/admin/api/product-configuration/product-details-configuration.d.ts.map +1 -0
- package/build/ts/surfaces/admin/api/product-configuration/product-variant-details-configuration.d.ts +46 -0
- package/build/ts/surfaces/admin/api/product-configuration/product-variant-details-configuration.d.ts.map +1 -0
- package/build/ts/surfaces/admin/api/shared.d.ts +9 -0
- package/build/ts/surfaces/admin/api/shared.d.ts.map +1 -0
- package/build/ts/surfaces/admin/api/standard/standard.d.ts +18 -2
- package/build/ts/surfaces/admin/api/standard/standard.d.ts.map +1 -1
- package/build/ts/surfaces/admin/api.d.ts +4 -1
- package/build/ts/surfaces/admin/api.d.ts.map +1 -1
- package/build/ts/surfaces/admin/components/Checkbox/Checkbox.doc.d.ts.map +1 -1
- package/build/ts/surfaces/admin/components/Form/Form.d.ts +0 -10
- package/build/ts/surfaces/admin/components/Form/Form.d.ts.map +1 -1
- package/build/ts/surfaces/admin/components/Form/Form.doc.d.ts.map +1 -1
- package/build/ts/surfaces/admin/components/HeadingGroup/HeadingGroup.doc.d.ts.map +1 -1
- 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.doc.d.ts.map +1 -1
- 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.d.ts +6 -0
- package/build/ts/surfaces/admin/components.d.ts.map +1 -1
- package/build/ts/surfaces/admin/extension-targets.d.ts +10 -4
- package/build/ts/surfaces/admin/extension-targets.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/api/cart-line/cart-line-item.d.ts +9 -0
- package/build/ts/surfaces/checkout/api/cart-line/cart-line-item.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/api/checkout/checkout.d.ts +67 -1
- package/build/ts/surfaces/checkout/api/checkout/checkout.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/api/{payment-method/render.d.ts → payment/payment-option-item.d.ts} +2 -2
- package/build/ts/surfaces/checkout/api/payment/payment-option-item.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/api/pickup/{pickup-points.d.ts → pickup-location-list.d.ts} +3 -3
- package/build/ts/surfaces/checkout/api/pickup/pickup-location-list.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/api/pickup/{pickup-locations.d.ts → pickup-point-list.d.ts} +3 -3
- package/build/ts/surfaces/checkout/api/pickup/pickup-point-list.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/api/redeemable/{render.d.ts → redeemable.d.ts} +2 -2
- package/build/ts/surfaces/checkout/api/redeemable/redeemable.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/api/shared.d.ts +91 -1
- package/build/ts/surfaces/checkout/api/shared.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/api/shipping/{shipping-method-details.d.ts → shipping-option-item.d.ts} +4 -4
- package/build/ts/surfaces/checkout/api/shipping/shipping-option-item.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/api/standard/standard.d.ts +171 -171
- package/build/ts/surfaces/checkout/api/standard/standard.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/api.d.ts +9 -9
- package/build/ts/surfaces/checkout/api.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/PhoneField/PhoneField.d.ts +1 -1
- package/build/ts/surfaces/checkout/components/TextField/TextField.d.ts +1 -1
- package/build/ts/surfaces/checkout/components/shared.d.ts +11 -2
- package/build/ts/surfaces/checkout/components/shared.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/extension.d.ts +7 -28
- package/build/ts/surfaces/checkout/extension.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/globals.d.ts +2 -2
- package/build/ts/surfaces/checkout/globals.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/targets.d.ts +411 -0
- package/build/ts/surfaces/checkout/targets.d.ts.map +1 -0
- package/build/ts/surfaces/checkout.d.ts +1 -1
- package/build/ts/surfaces/checkout.d.ts.map +1 -1
- package/build/ts/surfaces/customer-account/api/cart-line/cart-line-item.d.ts +9 -0
- package/build/ts/surfaces/customer-account/api/cart-line/cart-line-item.d.ts.map +1 -0
- package/build/ts/surfaces/customer-account/api/order-status/order-status.d.ts +1212 -0
- package/build/ts/surfaces/customer-account/api/order-status/order-status.d.ts.map +1 -0
- package/build/ts/surfaces/customer-account/api/shared.d.ts +126 -0
- package/build/ts/surfaces/customer-account/api/shared.d.ts.map +1 -0
- package/build/ts/surfaces/customer-account/api.d.ts +4 -0
- package/build/ts/surfaces/customer-account/api.d.ts.map +1 -0
- package/build/ts/surfaces/customer-account/extension.d.ts +16 -0
- package/build/ts/surfaces/customer-account/extension.d.ts.map +1 -0
- package/build/ts/surfaces/customer-account/globals.d.ts +11 -0
- package/build/ts/surfaces/customer-account/globals.d.ts.map +1 -0
- package/build/ts/surfaces/customer-account/targets.d.ts +78 -0
- package/build/ts/surfaces/customer-account/targets.d.ts.map +1 -0
- package/build/ts/surfaces/customer-account.d.ts +8 -0
- package/build/ts/surfaces/customer-account.d.ts.map +1 -0
- package/build/ts/utilities/registration.d.ts +5 -5
- package/build/ts/utilities/registration.d.ts.map +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/package.json +17 -8
- package/src/api.ts +0 -18
- package/src/extension.ts +0 -4
- package/src/surfaces/admin/api/action/action.ts +6 -4
- package/src/surfaces/admin/api/block/block.doc.ts +20 -0
- package/src/surfaces/admin/api/block/block.ts +11 -0
- package/src/surfaces/admin/api/product-configuration/product-details-configuration.ts +49 -0
- package/src/surfaces/admin/api/product-configuration/product-variant-details-configuration.ts +50 -0
- package/src/surfaces/admin/api/shared.ts +6 -0
- package/src/surfaces/admin/api/standard/standard.ts +20 -8
- package/src/surfaces/admin/api.ts +4 -1
- package/src/surfaces/admin/components/Checkbox/Checkbox.doc.ts +1 -7
- package/src/surfaces/admin/components/Form/Form.doc.ts +0 -5
- package/src/surfaces/admin/components/Form/Form.ts +0 -12
- package/src/surfaces/admin/components/HeadingGroup/HeadingGroup.doc.ts +0 -7
- package/src/surfaces/admin/components/ResourceItem/ResourceItem.ts +19 -0
- package/src/surfaces/admin/components/ResourceItem/examples/basic-ResourceItem.example.ts +22 -0
- package/src/surfaces/admin/components/ResourceList/ResourceList.ts +30 -0
- package/src/surfaces/admin/components/ResourceList/examples/basic-ResourceList.example.ts +29 -0
- package/src/surfaces/admin/components/Select/Select.doc.ts +1 -7
- package/src/surfaces/admin/components/Thumbnail/Thumbnail.ts +31 -0
- package/src/surfaces/admin/components/Thumbnail/examples/basic-Thumbnail.example.ts +13 -0
- package/src/surfaces/admin/components.ts +6 -0
- package/src/surfaces/admin/extension-targets.ts +38 -3
- package/src/surfaces/checkout/api/cart-line/cart-line-item.ts +10 -0
- package/src/surfaces/checkout/api/checkout/checkout.ts +83 -1
- package/src/surfaces/checkout/api/{payment-method/render.ts → payment/payment-option-item.ts} +1 -1
- package/src/surfaces/checkout/api/pickup/{pickup-points.ts → pickup-location-list.ts} +2 -2
- package/src/surfaces/checkout/api/pickup/{pickup-locations.ts → pickup-point-list.ts} +2 -2
- package/src/surfaces/checkout/api/redeemable/{render.ts → redeemable.ts} +1 -1
- package/src/surfaces/checkout/api/shared.ts +103 -0
- package/src/surfaces/checkout/api/shipping/{shipping-method-details.ts → shipping-option-item.ts} +3 -3
- package/src/surfaces/checkout/api/standard/README.md +12 -10
- package/src/surfaces/checkout/api/standard/standard.ts +180 -187
- package/src/surfaces/checkout/api.ts +18 -10
- package/src/surfaces/checkout/components/Banner/examples/basic-banner.example.ts +1 -1
- package/src/surfaces/checkout/components/BlockLayout/examples/basic-blockLayout.example.ts +1 -1
- package/src/surfaces/checkout/components/BlockLayout/examples/basic-blocklayout.example.ts +1 -1
- package/src/surfaces/checkout/components/BlockSpacer/examples/basic-blockspacer.example.ts +1 -1
- package/src/surfaces/checkout/components/BlockStack/examples/basic-blockstack.example.ts +1 -1
- package/src/surfaces/checkout/components/Button/examples/basic-button.example.ts +1 -1
- package/src/surfaces/checkout/components/Checkbox/examples/basic-checkbox.example.ts +1 -1
- package/src/surfaces/checkout/components/Choice/examples/basic-choice.example.ts +1 -1
- package/src/surfaces/checkout/components/ChoiceList/examples/basic-choicelist.example.ts +1 -1
- package/src/surfaces/checkout/components/DateField/examples/basic-datefield.example.ts +1 -1
- package/src/surfaces/checkout/components/DatePicker/examples/basic-datepicker.example.ts +1 -1
- package/src/surfaces/checkout/components/Disclosure/examples/basic-disclosure.example.ts +1 -1
- package/src/surfaces/checkout/components/Divider/examples/basic-divider.example.ts +1 -1
- package/src/surfaces/checkout/components/Form/examples/basic-form.example.ts +1 -1
- package/src/surfaces/checkout/components/Grid/examples/basic-grid.example.ts +1 -1
- package/src/surfaces/checkout/components/GridItem/examples/basic-griditem.example.ts +1 -1
- package/src/surfaces/checkout/components/Heading/examples/basic-heading.example.ts +1 -1
- package/src/surfaces/checkout/components/HeadingGroup/examples/basic-headinggroup.example.ts +1 -1
- package/src/surfaces/checkout/components/Icon/examples/basic-icon.example.ts +1 -1
- package/src/surfaces/checkout/components/Image/examples/basic-image.example.ts +1 -1
- package/src/surfaces/checkout/components/InlineLayout/examples/basic-inlineLayout.example.ts +1 -1
- package/src/surfaces/checkout/components/InlineLayout/examples/basic-inlinelayout.example.ts +1 -1
- package/src/surfaces/checkout/components/InlineSpacer/examples/basic-inlinespacer.example.ts +1 -1
- package/src/surfaces/checkout/components/InlineStack/examples/basic-inlinestack.example.ts +1 -1
- package/src/surfaces/checkout/components/Link/examples/basic-link.example.ts +1 -1
- package/src/surfaces/checkout/components/List/examples/basic-list.example.ts +1 -1
- package/src/surfaces/checkout/components/ListItem/examples/basic-listitem.example.ts +1 -1
- package/src/surfaces/checkout/components/Modal/examples/basic-modal.example.ts +1 -1
- package/src/surfaces/checkout/components/PhoneField/PhoneField.ts +1 -1
- package/src/surfaces/checkout/components/PhoneField/examples/basic-phonefield.example.ts +1 -1
- package/src/surfaces/checkout/components/Popover/examples/basic-popover.example.ts +1 -1
- package/src/surfaces/checkout/components/Pressable/examples/basic-pressable.example.ts +1 -1
- package/src/surfaces/checkout/components/ScrollView/examples/basic-scrollview.example.ts +1 -1
- package/src/surfaces/checkout/components/Select/examples/basic-select.example.ts +1 -1
- package/src/surfaces/checkout/components/SkeletonImage/examples/basic-skeletonimage.example.ts +1 -1
- package/src/surfaces/checkout/components/SkeletonText/examples/basic-skeletontext.example.ts +1 -1
- package/src/surfaces/checkout/components/SkeletonTextBlock/examples/basic-skeletontextblock.example.ts +1 -1
- package/src/surfaces/checkout/components/Spinner/examples/basic-spinner.example.ts +1 -1
- package/src/surfaces/checkout/components/Stepper/examples/basic-stepper.example.ts +1 -1
- package/src/surfaces/checkout/components/Tag/examples/basic-tag.example.ts +1 -1
- package/src/surfaces/checkout/components/Text/examples/basic-text.example.ts +1 -1
- package/src/surfaces/checkout/components/TextBlock/examples/basic-textblock.example.ts +1 -1
- package/src/surfaces/checkout/components/TextField/TextField.ts +1 -1
- package/src/surfaces/checkout/components/TextField/examples/basic-textfield.example.ts +1 -1
- package/src/surfaces/checkout/components/Tooltip/examples/basic-tooltip.example.ts +1 -1
- package/src/surfaces/checkout/components/View/examples/basic-view.example.ts +1 -1
- package/src/surfaces/checkout/components/shared.ts +22 -5
- package/src/surfaces/checkout/extension.ts +10 -56
- package/src/surfaces/checkout/globals.ts +7 -4
- package/src/surfaces/checkout/style/examples/style.example.ts +1 -1
- package/src/surfaces/checkout/style/examples/style.example.tsx +8 -2
- package/src/surfaces/checkout/targets.ts +701 -0
- package/src/surfaces/checkout.ts +1 -1
- package/src/surfaces/customer-account/api/cart-line/cart-line-item.ts +10 -0
- package/src/surfaces/customer-account/api/order-status/order-status.ts +1414 -0
- package/src/surfaces/customer-account/api/shared.ts +953 -0
- package/src/surfaces/customer-account/api.ts +66 -0
- package/src/surfaces/customer-account/extension.ts +21 -0
- package/src/surfaces/customer-account/globals.ts +18 -0
- package/src/surfaces/customer-account/targets.ts +116 -0
- package/src/surfaces/customer-account.ts +8 -0
- package/src/utilities/registration.ts +13 -12
- package/build/ts/surfaces/checkout/api/cart-line/cart-line-details.d.ts +0 -9
- package/build/ts/surfaces/checkout/api/cart-line/cart-line-details.d.ts.map +0 -1
- package/build/ts/surfaces/checkout/api/payment-method/render.d.ts.map +0 -1
- package/build/ts/surfaces/checkout/api/pickup/pickup-locations.d.ts.map +0 -1
- package/build/ts/surfaces/checkout/api/pickup/pickup-points.d.ts.map +0 -1
- package/build/ts/surfaces/checkout/api/redeemable/render.d.ts.map +0 -1
- package/build/ts/surfaces/checkout/api/shipping/shipping-method-details.d.ts.map +0 -1
- package/build/ts/surfaces/checkout/extension-points.d.ts +0 -220
- package/build/ts/surfaces/checkout/extension-points.d.ts.map +0 -1
- package/src/surfaces/checkout/api/cart-line/cart-line-details.ts +0 -10
- package/src/surfaces/checkout/components/Banner/README.md +0 -14
- package/src/surfaces/checkout/components/BlockLayout/README.md +0 -101
- package/src/surfaces/checkout/components/BlockSpacer/README.md +0 -14
- package/src/surfaces/checkout/components/BlockStack/README.md +0 -77
- package/src/surfaces/checkout/components/Button/README.md +0 -22
- package/src/surfaces/checkout/components/Checkbox/README.md +0 -18
- package/src/surfaces/checkout/components/Choice/README.md +0 -14
- package/src/surfaces/checkout/components/ChoiceList/README.md +0 -14
- package/src/surfaces/checkout/components/Divider/README.md +0 -13
- package/src/surfaces/checkout/components/Form/README.md +0 -21
- package/src/surfaces/checkout/components/Grid/README.md +0 -105
- package/src/surfaces/checkout/components/GridItem/README.md +0 -72
- package/src/surfaces/checkout/components/Heading/README.md +0 -19
- package/src/surfaces/checkout/components/HeadingGroup/README.md +0 -7
- package/src/surfaces/checkout/components/Icon/README.md +0 -15
- package/src/surfaces/checkout/components/Image/README.md +0 -53
- package/src/surfaces/checkout/components/InlineLayout/README.md +0 -103
- package/src/surfaces/checkout/components/InlineSpacer/README.md +0 -14
- package/src/surfaces/checkout/components/InlineStack/README.md +0 -87
- package/src/surfaces/checkout/components/Link/README.md +0 -18
- package/src/surfaces/checkout/components/List/README.md +0 -19
- package/src/surfaces/checkout/components/ListItem/README.md +0 -5
- package/src/surfaces/checkout/components/PhoneField/README.md +0 -49
- package/src/surfaces/checkout/components/Pressable/README.md +0 -74
- package/src/surfaces/checkout/components/ScrollView/README.md +0 -62
- package/src/surfaces/checkout/components/Select/README.md +0 -41
- package/src/surfaces/checkout/components/SkeletonImage/README.md +0 -13
- package/src/surfaces/checkout/components/SkeletonText/README.md +0 -13
- package/src/surfaces/checkout/components/SkeletonTextBlock/README.md +0 -13
- package/src/surfaces/checkout/components/Spinner/README.md +0 -14
- package/src/surfaces/checkout/components/Stepper/README.md +0 -28
- package/src/surfaces/checkout/components/Tag/README.md +0 -14
- package/src/surfaces/checkout/components/Text/README.md +0 -17
- package/src/surfaces/checkout/components/TextBlock/README.md +0 -15
- package/src/surfaces/checkout/components/TextField/README.md +0 -49
- package/src/surfaces/checkout/components/Tooltip/README.md +0 -8
- package/src/surfaces/checkout/components/View/README.md +0 -97
- package/src/surfaces/checkout/extension-points.ts +0 -369
|
@@ -9,14 +9,15 @@ import type {
|
|
|
9
9
|
ValidationError,
|
|
10
10
|
SellingPlan,
|
|
11
11
|
Attribute,
|
|
12
|
+
MailingAddress,
|
|
12
13
|
} from '../shared';
|
|
13
|
-
import type {
|
|
14
|
+
import type {ExtensionTarget} from '../../targets';
|
|
14
15
|
|
|
15
16
|
/**
|
|
16
|
-
* A key-value storage object for extension
|
|
17
|
+
* A key-value storage object for extension targets.
|
|
17
18
|
*
|
|
18
19
|
* Stored data is only available to this specific app
|
|
19
|
-
* at this specific extension
|
|
20
|
+
* at this specific extension target.
|
|
20
21
|
*
|
|
21
22
|
* The storage backend is implemented with `localStorage` and
|
|
22
23
|
* should persist across the buyer's checkout session.
|
|
@@ -58,40 +59,34 @@ export interface Storage {
|
|
|
58
59
|
export type Capability = 'api_access' | 'network_access' | 'block_progress';
|
|
59
60
|
|
|
60
61
|
/**
|
|
61
|
-
* Meta information about an extension
|
|
62
|
+
* Meta information about an extension target.
|
|
62
63
|
*/
|
|
63
|
-
export interface Extension<Target extends
|
|
64
|
+
export interface Extension<Target extends ExtensionTarget = ExtensionTarget> {
|
|
64
65
|
/**
|
|
65
|
-
* The
|
|
66
|
-
* injected. This will be one of the targets you have included in your
|
|
67
|
-
* extension’s configuration file.
|
|
66
|
+
* The API version that was set in the extension config file.
|
|
68
67
|
*
|
|
69
|
-
* @example '
|
|
70
|
-
* @see https://shopify.dev/docs/api/checkout-ui-extensions/unstable/extension-targets-overview
|
|
71
|
-
* @see https://shopify.dev/docs/apps/app-extensions/configuration#targets
|
|
68
|
+
* @example '2023-04', '2023-07'
|
|
72
69
|
*/
|
|
73
|
-
|
|
70
|
+
apiVersion: ApiVersion;
|
|
74
71
|
|
|
75
72
|
/**
|
|
76
|
-
* The
|
|
73
|
+
* The allowed capabilities of the extension, defined
|
|
74
|
+
* in your [shopify.extension.toml](https://shopify.dev/docs/api/checkout-ui-extensions/configuration) file.
|
|
77
75
|
*
|
|
78
|
-
*
|
|
76
|
+
* * [`api_access`](https://shopify.dev/docs/api/checkout-ui-extensions/configuration#api-access): the extension can access the Storefront API.
|
|
79
77
|
*
|
|
80
|
-
*
|
|
81
|
-
*/
|
|
82
|
-
version?: string;
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* The API version that was set in the extension config file.
|
|
78
|
+
* * [`network_access`](https://shopify.dev/docs/api/checkout-ui-extensions/configuration#network-access): the extension can make external network calls.
|
|
86
79
|
*
|
|
87
|
-
*
|
|
80
|
+
* * [`block_progress`](https://shopify.dev/docs/api/checkout-ui-extensions/configuration#block-progress): the extension can block a buyer's progress and the merchant has allowed this blocking behavior.
|
|
88
81
|
*/
|
|
89
|
-
|
|
82
|
+
capabilities: StatefulRemoteSubscribable<Capability[]>;
|
|
90
83
|
|
|
91
84
|
/**
|
|
92
|
-
*
|
|
85
|
+
* Information about the editor where the extension is being rendered.
|
|
86
|
+
*
|
|
87
|
+
* The value is undefined if the extension is not rendering in an editor.
|
|
93
88
|
*/
|
|
94
|
-
|
|
89
|
+
editor?: Editor;
|
|
95
90
|
|
|
96
91
|
/**
|
|
97
92
|
* Whether your extension is currently rendered to the screen.
|
|
@@ -107,23 +102,29 @@ export interface Extension<Target extends ExtensionPoint = ExtensionPoint> {
|
|
|
107
102
|
rendered: StatefulRemoteSubscribable<boolean>;
|
|
108
103
|
|
|
109
104
|
/**
|
|
110
|
-
* The
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
*
|
|
105
|
+
* The URL to the script that started the extension target.
|
|
106
|
+
*/
|
|
107
|
+
scriptUrl: string;
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* The identifier that specifies where in Shopify’s UI your code is being
|
|
111
|
+
* injected. This will be one of the targets you have included in your
|
|
112
|
+
* extension’s configuration file.
|
|
116
113
|
*
|
|
117
|
-
*
|
|
114
|
+
* @example 'purchase.checkout.block.render'
|
|
115
|
+
* @see https://shopify.dev/docs/api/checkout-ui-extensions/unstable/extension-targets-overview
|
|
116
|
+
* @see https://shopify.dev/docs/apps/app-extensions/configuration#targets
|
|
118
117
|
*/
|
|
119
|
-
|
|
118
|
+
target: Target;
|
|
120
119
|
|
|
121
120
|
/**
|
|
122
|
-
*
|
|
121
|
+
* The published version of the running extension target.
|
|
123
122
|
*
|
|
124
|
-
*
|
|
123
|
+
* For unpublished extensions, the value is `undefined`.
|
|
124
|
+
*
|
|
125
|
+
* @example 3.0.10
|
|
125
126
|
*/
|
|
126
|
-
|
|
127
|
+
version?: string;
|
|
127
128
|
}
|
|
128
129
|
|
|
129
130
|
export interface Editor {
|
|
@@ -179,6 +180,23 @@ export interface AppMetafield {
|
|
|
179
180
|
type: string;
|
|
180
181
|
}
|
|
181
182
|
|
|
183
|
+
/**
|
|
184
|
+
* Represents a custom metadata attached to a resource.
|
|
185
|
+
*/
|
|
186
|
+
export interface CartMetafield {
|
|
187
|
+
/** The key name of a metafield. */
|
|
188
|
+
key: string;
|
|
189
|
+
|
|
190
|
+
/** The namespace for a metafield. */
|
|
191
|
+
namespace: string;
|
|
192
|
+
|
|
193
|
+
/** The value of a metafield. */
|
|
194
|
+
value: string;
|
|
195
|
+
|
|
196
|
+
/** The metafield's type name. */
|
|
197
|
+
type: string;
|
|
198
|
+
}
|
|
199
|
+
|
|
182
200
|
/**
|
|
183
201
|
* The metafield owner.
|
|
184
202
|
*/
|
|
@@ -186,7 +204,7 @@ export interface AppMetafieldEntryTarget {
|
|
|
186
204
|
/**
|
|
187
205
|
* The type of the metafield owner.
|
|
188
206
|
*
|
|
189
|
-
* {% include /apps/checkout/privacy-icon.md %} Requires access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data) when the type is `customer`.
|
|
207
|
+
* {% include /apps/checkout/privacy-icon.md %} Requires access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data) when the type is `customer`, `company` or `companyLocation`.
|
|
190
208
|
*/
|
|
191
209
|
type:
|
|
192
210
|
| 'customer'
|
|
@@ -208,7 +226,7 @@ export interface AppMetafieldEntry {
|
|
|
208
226
|
/**
|
|
209
227
|
* The target that is associated to the metadata.
|
|
210
228
|
*
|
|
211
|
-
* {% include /apps/checkout/privacy-icon.md %} Requires access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data) when the type is `customer`.
|
|
229
|
+
* {% include /apps/checkout/privacy-icon.md %} Requires access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data) when the type is `customer`, `company` or `companyLocation`.
|
|
212
230
|
*/
|
|
213
231
|
target: AppMetafieldEntryTarget;
|
|
214
232
|
|
|
@@ -216,7 +234,7 @@ export interface AppMetafieldEntry {
|
|
|
216
234
|
metafield: AppMetafield;
|
|
217
235
|
}
|
|
218
236
|
|
|
219
|
-
export type ApiVersion = '2023-04' | 'unstable';
|
|
237
|
+
export type ApiVersion = '2023-04' | '2023-07' | 'unstable';
|
|
220
238
|
|
|
221
239
|
export type Version = string;
|
|
222
240
|
|
|
@@ -399,7 +417,7 @@ export interface BuyerJourney {
|
|
|
399
417
|
completed: StatefulRemoteSubscribable<boolean>;
|
|
400
418
|
}
|
|
401
419
|
|
|
402
|
-
export interface StandardApi<Target extends
|
|
420
|
+
export interface StandardApi<Target extends ExtensionTarget = ExtensionTarget> {
|
|
403
421
|
/**
|
|
404
422
|
* Methods for interacting with [Web Pixels](https://shopify.dev/docs/apps/marketing), such as emitting an event.
|
|
405
423
|
*/
|
|
@@ -412,7 +430,7 @@ export interface StandardApi<Target extends ExtensionPoint = ExtensionPoint> {
|
|
|
412
430
|
|
|
413
431
|
/**
|
|
414
432
|
* The metafields requested in the
|
|
415
|
-
* [`shopify.
|
|
433
|
+
* [`shopify.extension.toml`](https://shopify.dev/docs/api/checkout-ui-extensions/configuration)
|
|
416
434
|
* file. These metafields are updated when there's a change in the merchandise items
|
|
417
435
|
* being purchased by the customer.
|
|
418
436
|
*
|
|
@@ -445,6 +463,11 @@ export interface StandardApi<Target extends ExtensionPoint = ExtensionPoint> {
|
|
|
445
463
|
*/
|
|
446
464
|
buyerJourney: BuyerJourney;
|
|
447
465
|
|
|
466
|
+
/**
|
|
467
|
+
* Settings applied to the buyer's checkout.
|
|
468
|
+
*/
|
|
469
|
+
checkoutSettings: StatefulRemoteSubscribable<CheckoutSettings>;
|
|
470
|
+
|
|
448
471
|
/**
|
|
449
472
|
* Details on the costs the buyer will pay for this checkout.
|
|
450
473
|
*/
|
|
@@ -475,11 +498,13 @@ export interface StandardApi<Target extends ExtensionPoint = ExtensionPoint> {
|
|
|
475
498
|
* injected. This will be one of the targets you have included in your
|
|
476
499
|
* extension’s configuration file.
|
|
477
500
|
*
|
|
478
|
-
* @example '
|
|
501
|
+
* @example 'purchase.checkout.block.render'
|
|
479
502
|
* @see https://shopify.dev/docs/api/checkout-ui-extensions/unstable/extension-targets-overview
|
|
480
503
|
* @see https://shopify.dev/docs/apps/app-extensions/configuration#targets
|
|
504
|
+
*
|
|
505
|
+
* @deprecated Deprecated as of version `2023-07`, use `extension.target` instead.
|
|
481
506
|
*/
|
|
482
|
-
extensionPoint:
|
|
507
|
+
extensionPoint: Target;
|
|
483
508
|
|
|
484
509
|
/**
|
|
485
510
|
* Utilities for translating content and formatting values according to the current
|
|
@@ -529,11 +554,6 @@ export interface StandardApi<Target extends ExtensionPoint = ExtensionPoint> {
|
|
|
529
554
|
*/
|
|
530
555
|
note: StatefulRemoteSubscribable<string | undefined>;
|
|
531
556
|
|
|
532
|
-
/**
|
|
533
|
-
* A list of the line items displayed in the checkout. These may be the same as lines, or may be a subset.
|
|
534
|
-
*/
|
|
535
|
-
presentmentLines: StatefulRemoteSubscribable<PresentmentCartLine[]>;
|
|
536
|
-
|
|
537
557
|
/**
|
|
538
558
|
* Used to query the Storefront GraphQL API with a prefetched token.
|
|
539
559
|
*
|
|
@@ -558,7 +578,7 @@ export interface StandardApi<Target extends ExtensionPoint = ExtensionPoint> {
|
|
|
558
578
|
|
|
559
579
|
/**
|
|
560
580
|
* The settings matching the settings definition written in the
|
|
561
|
-
* [`shopify.
|
|
581
|
+
* [`shopify.extension.toml`](https://shopify.dev/docs/api/checkout-ui-extensions/configuration) file.
|
|
562
582
|
*
|
|
563
583
|
* See [settings examples](https://shopify.dev/docs/api/checkout-ui-extensions/apis/standardapi#example-settings) for more information.
|
|
564
584
|
*
|
|
@@ -581,7 +601,7 @@ export interface StandardApi<Target extends ExtensionPoint = ExtensionPoint> {
|
|
|
581
601
|
shop: Shop;
|
|
582
602
|
|
|
583
603
|
/**
|
|
584
|
-
* Key-value storage for the extension
|
|
604
|
+
* Key-value storage for the extension target.
|
|
585
605
|
*/
|
|
586
606
|
storage: Storage;
|
|
587
607
|
|
|
@@ -638,144 +658,112 @@ export interface BuyerIdentity {
|
|
|
638
658
|
* {% include /apps/checkout/privacy-icon.md %} Requires level 2 access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data).
|
|
639
659
|
*/
|
|
640
660
|
phone: StatefulRemoteSubscribable<string | undefined>;
|
|
641
|
-
}
|
|
642
661
|
|
|
643
|
-
export interface AppliedGiftCard {
|
|
644
662
|
/**
|
|
645
|
-
*
|
|
663
|
+
* Provides details of the company and the company location that the business customer is purchasing on behalf of.
|
|
664
|
+
* This includes information that can be used to identify the company and the company location that the business
|
|
665
|
+
* customer belongs to.
|
|
666
|
+
*
|
|
667
|
+
* {% include /apps/checkout/privacy-icon.md %} Requires access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data).
|
|
646
668
|
*/
|
|
647
|
-
|
|
669
|
+
purchasingCompany: StatefulRemoteSubscribable<PurchasingCompany | undefined>;
|
|
670
|
+
}
|
|
648
671
|
|
|
672
|
+
/**
|
|
673
|
+
* Information about a company that the business customer is purchasing on behalf of.
|
|
674
|
+
*/
|
|
675
|
+
export interface PurchasingCompany {
|
|
649
676
|
/**
|
|
650
|
-
*
|
|
677
|
+
* Includes information of the company that the business customer is purchasing on behalf of.
|
|
678
|
+
*
|
|
679
|
+
* {% include /apps/checkout/privacy-icon.md %} Requires access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data).
|
|
651
680
|
*/
|
|
652
|
-
|
|
653
|
-
|
|
681
|
+
company: Company;
|
|
654
682
|
/**
|
|
655
|
-
*
|
|
683
|
+
* Includes information of the company location that the business customer is purchasing on behalf of.
|
|
684
|
+
*
|
|
685
|
+
* {% include /apps/checkout/privacy-icon.md %} Requires access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data).
|
|
656
686
|
*/
|
|
657
|
-
|
|
687
|
+
location: CompanyLocation;
|
|
658
688
|
}
|
|
659
689
|
|
|
660
|
-
export interface
|
|
690
|
+
export interface Company {
|
|
661
691
|
/**
|
|
662
|
-
* The
|
|
663
|
-
*
|
|
692
|
+
* The company ID.
|
|
693
|
+
*
|
|
694
|
+
* {% include /apps/checkout/privacy-icon.md %} Requires level 1 access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data).
|
|
664
695
|
*/
|
|
665
696
|
id: string;
|
|
666
697
|
/**
|
|
667
|
-
* The name of the
|
|
698
|
+
* The name of the company.
|
|
699
|
+
*
|
|
700
|
+
* {% include /apps/checkout/privacy-icon.md %} Requires level 1 access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data).
|
|
668
701
|
*/
|
|
669
702
|
name: string;
|
|
670
703
|
/**
|
|
671
|
-
* The
|
|
672
|
-
*/
|
|
673
|
-
storefrontUrl?: string;
|
|
674
|
-
/**
|
|
675
|
-
* The shop's myshopify.com domain.
|
|
676
|
-
*/
|
|
677
|
-
myshopifyDomain: string;
|
|
678
|
-
}
|
|
679
|
-
|
|
680
|
-
export interface MailingAddress {
|
|
681
|
-
/**
|
|
682
|
-
* The buyer's full name.
|
|
683
|
-
*
|
|
684
|
-
* {% include /apps/checkout/privacy-icon.md %} Requires level 2 access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data).
|
|
704
|
+
* The external ID of the company that can be set by the merchant.
|
|
685
705
|
*
|
|
686
|
-
*
|
|
706
|
+
* {% include /apps/checkout/privacy-icon.md %} Requires level 1 access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data).
|
|
687
707
|
*/
|
|
688
|
-
|
|
708
|
+
externalId?: string;
|
|
709
|
+
}
|
|
689
710
|
|
|
711
|
+
export interface CompanyLocation {
|
|
690
712
|
/**
|
|
691
|
-
* The
|
|
713
|
+
* The company location ID.
|
|
692
714
|
*
|
|
693
|
-
* {% include /apps/checkout/privacy-icon.md %} Requires level
|
|
694
|
-
*
|
|
695
|
-
* @example 'John'
|
|
715
|
+
* {% include /apps/checkout/privacy-icon.md %} Requires level 1 access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data).
|
|
696
716
|
*/
|
|
697
|
-
|
|
698
|
-
|
|
717
|
+
id: string;
|
|
699
718
|
/**
|
|
700
|
-
* The
|
|
701
|
-
*
|
|
702
|
-
* {% include /apps/checkout/privacy-icon.md %} Requires level 2 access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data).
|
|
719
|
+
* The name of the company location.
|
|
703
720
|
*
|
|
704
|
-
*
|
|
721
|
+
* {% include /apps/checkout/privacy-icon.md %} Requires level 1 access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data).
|
|
705
722
|
*/
|
|
706
|
-
|
|
707
|
-
|
|
723
|
+
name: string;
|
|
708
724
|
/**
|
|
709
|
-
* The
|
|
725
|
+
* The external ID of the company location that can be set by the merchant.
|
|
710
726
|
*
|
|
711
727
|
* {% include /apps/checkout/privacy-icon.md %} Requires level 1 access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data).
|
|
712
|
-
*
|
|
713
|
-
* @example 'Shopify'
|
|
714
728
|
*/
|
|
715
|
-
|
|
729
|
+
externalId?: string;
|
|
730
|
+
}
|
|
716
731
|
|
|
732
|
+
export interface AppliedGiftCard {
|
|
717
733
|
/**
|
|
718
|
-
* The
|
|
719
|
-
*
|
|
720
|
-
* {% include /apps/checkout/privacy-icon.md %} Requires level 2 access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data).
|
|
721
|
-
*
|
|
722
|
-
* @example '151 O'Connor Street'
|
|
734
|
+
* The last four characters of the applied gift card's code.
|
|
723
735
|
*/
|
|
724
|
-
|
|
736
|
+
lastCharacters: string;
|
|
725
737
|
|
|
726
738
|
/**
|
|
727
|
-
* The
|
|
728
|
-
*
|
|
729
|
-
* {% include /apps/checkout/privacy-icon.md %} Requires level 2 access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data).
|
|
730
|
-
*
|
|
731
|
-
* @example 'Ground floor'
|
|
739
|
+
* The amount of the applied gift card that will be used when the checkout is completed.
|
|
732
740
|
*/
|
|
733
|
-
|
|
741
|
+
amountUsed: Money;
|
|
734
742
|
|
|
735
743
|
/**
|
|
736
|
-
* The
|
|
737
|
-
*
|
|
738
|
-
* {% include /apps/checkout/privacy-icon.md %} Requires level 2 access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data).
|
|
739
|
-
*
|
|
740
|
-
* @example 'Ottawa'
|
|
744
|
+
* The current balance of the applied gift card prior to checkout completion.
|
|
741
745
|
*/
|
|
742
|
-
|
|
746
|
+
balance: Money;
|
|
747
|
+
}
|
|
743
748
|
|
|
749
|
+
export interface Shop {
|
|
744
750
|
/**
|
|
745
|
-
* The
|
|
746
|
-
*
|
|
747
|
-
* {% include /apps/checkout/privacy-icon.md %} Requires level 2 access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data).
|
|
748
|
-
*
|
|
749
|
-
* @example 'K2P 2L8'
|
|
751
|
+
* The shop ID.
|
|
752
|
+
* @example 'gid://shopify/Shop/123'
|
|
750
753
|
*/
|
|
751
|
-
|
|
752
|
-
|
|
754
|
+
id: string;
|
|
753
755
|
/**
|
|
754
|
-
* The
|
|
755
|
-
*
|
|
756
|
-
* {% include /apps/checkout/privacy-icon.md %} Requires level 2 access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data).
|
|
757
|
-
*
|
|
758
|
-
* @example 'CA' for Canada.
|
|
756
|
+
* The name of the shop.
|
|
759
757
|
*/
|
|
760
|
-
|
|
761
|
-
|
|
758
|
+
name: string;
|
|
762
759
|
/**
|
|
763
|
-
* The
|
|
764
|
-
*
|
|
765
|
-
* {% include /apps/checkout/privacy-icon.md %} Requires level 2 access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data).
|
|
766
|
-
*
|
|
767
|
-
* @example 'ON' for Ontario.
|
|
760
|
+
* The primary storefront URL.
|
|
768
761
|
*/
|
|
769
|
-
|
|
770
|
-
|
|
762
|
+
storefrontUrl?: string;
|
|
771
763
|
/**
|
|
772
|
-
* The
|
|
773
|
-
*
|
|
774
|
-
* {% include /apps/checkout/privacy-icon.md %} Requires level 2 access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data).
|
|
775
|
-
*
|
|
776
|
-
* @example '+1 613 111 2222'.
|
|
764
|
+
* The shop's myshopify.com domain.
|
|
777
765
|
*/
|
|
778
|
-
|
|
766
|
+
myshopifyDomain: string;
|
|
779
767
|
}
|
|
780
768
|
|
|
781
769
|
export interface CartCost {
|
|
@@ -981,52 +969,6 @@ export interface SelectedOption {
|
|
|
981
969
|
value: string;
|
|
982
970
|
}
|
|
983
971
|
|
|
984
|
-
export interface PresentmentCartLine {
|
|
985
|
-
/**
|
|
986
|
-
* The ID of the present cart line. This ID isn't stable and might change after
|
|
987
|
-
* any operations on the line items.
|
|
988
|
-
* @example 'gid://shopify/PresentmentCartLine/123'
|
|
989
|
-
*/
|
|
990
|
-
id: string;
|
|
991
|
-
|
|
992
|
-
/**
|
|
993
|
-
* The quantity of the merchandise being purchased.
|
|
994
|
-
*/
|
|
995
|
-
quantity: number;
|
|
996
|
-
|
|
997
|
-
/**
|
|
998
|
-
* The details about the cost components attributed to the presentment cart line.
|
|
999
|
-
*/
|
|
1000
|
-
cost: PresentmentCartLineCost;
|
|
1001
|
-
|
|
1002
|
-
/**
|
|
1003
|
-
* The title of the line item.
|
|
1004
|
-
*/
|
|
1005
|
-
title: string;
|
|
1006
|
-
|
|
1007
|
-
/**
|
|
1008
|
-
* The subtitle of the line item.
|
|
1009
|
-
*/
|
|
1010
|
-
subtitle?: string;
|
|
1011
|
-
|
|
1012
|
-
/**
|
|
1013
|
-
* The image associated with the line item.
|
|
1014
|
-
*/
|
|
1015
|
-
image?: ImageDetails;
|
|
1016
|
-
|
|
1017
|
-
/**
|
|
1018
|
-
* The merchandise lines being purchased.
|
|
1019
|
-
*/
|
|
1020
|
-
lines: CartLine[];
|
|
1021
|
-
}
|
|
1022
|
-
|
|
1023
|
-
export interface PresentmentCartLineCost {
|
|
1024
|
-
/**
|
|
1025
|
-
* The total cost of the merchandise line.
|
|
1026
|
-
*/
|
|
1027
|
-
totalAmount: Money;
|
|
1028
|
-
}
|
|
1029
|
-
|
|
1030
972
|
/**
|
|
1031
973
|
* A payment option presented to the buyer.
|
|
1032
974
|
*/
|
|
@@ -1076,7 +1018,7 @@ export interface SelectedPaymentOption {
|
|
|
1076
1018
|
/**
|
|
1077
1019
|
* The unique handle referencing `PaymentOption.handle`.
|
|
1078
1020
|
*
|
|
1079
|
-
* See [availablePaymentOptions](https://shopify.dev/docs/api/checkout-ui-extensions/
|
|
1021
|
+
* See [availablePaymentOptions](https://shopify.dev/docs/api/checkout-ui-extensions/apis/standardapi#properties-propertydetail-availablepaymentoptions).
|
|
1080
1022
|
*/
|
|
1081
1023
|
handle: string;
|
|
1082
1024
|
}
|
|
@@ -1286,6 +1228,57 @@ export interface Customer {
|
|
|
1286
1228
|
storeCreditAccounts: StoreCreditAccount[];
|
|
1287
1229
|
}
|
|
1288
1230
|
|
|
1231
|
+
/**
|
|
1232
|
+
* Settings describing the behavior of the buyer's checkout.
|
|
1233
|
+
*/
|
|
1234
|
+
export interface CheckoutSettings {
|
|
1235
|
+
/**
|
|
1236
|
+
* The type of order that will be created once the buyer completes checkout.
|
|
1237
|
+
*/
|
|
1238
|
+
orderSubmission: 'DRAFT_ORDER' | 'ORDER';
|
|
1239
|
+
/**
|
|
1240
|
+
* Represents the merchant configured payment terms.
|
|
1241
|
+
*/
|
|
1242
|
+
paymentTermsTemplate?: PaymentTermsTemplate;
|
|
1243
|
+
/**
|
|
1244
|
+
* Settings describing the behavior of the shipping address.
|
|
1245
|
+
*/
|
|
1246
|
+
shippingAddress: ShippingAddressSettings;
|
|
1247
|
+
}
|
|
1248
|
+
|
|
1249
|
+
/**
|
|
1250
|
+
* Settings describing the behavior of the shipping address.
|
|
1251
|
+
*/
|
|
1252
|
+
export interface ShippingAddressSettings {
|
|
1253
|
+
/**
|
|
1254
|
+
* Describes whether the buyer can ship to any address during checkout.
|
|
1255
|
+
*/
|
|
1256
|
+
isEditable: boolean;
|
|
1257
|
+
}
|
|
1258
|
+
|
|
1259
|
+
/**
|
|
1260
|
+
* Represents the payment terms template object.
|
|
1261
|
+
*/
|
|
1262
|
+
export interface PaymentTermsTemplate {
|
|
1263
|
+
/**
|
|
1264
|
+
* A globally-unique ID.
|
|
1265
|
+
* @example 'gid://shopify/PaymentTermsTemplate/1'
|
|
1266
|
+
*/
|
|
1267
|
+
id: string;
|
|
1268
|
+
/**
|
|
1269
|
+
* The name of the payment terms translated to the buyer's current language. See [localization.language](https://shopify.dev/docs/api/checkout-ui-extensions/apis/standardapi#properties-propertydetail-localization).
|
|
1270
|
+
*/
|
|
1271
|
+
name: string;
|
|
1272
|
+
/**
|
|
1273
|
+
* The due date for net payment terms as a ISO 8601 formatted string `YYYY-MM-DDTHH:mm:ss.sssZ`.
|
|
1274
|
+
*/
|
|
1275
|
+
dueDate?: string;
|
|
1276
|
+
/**
|
|
1277
|
+
* The number of days between the issued date and due date if using net payment terms.
|
|
1278
|
+
*/
|
|
1279
|
+
dueInDays?: number;
|
|
1280
|
+
}
|
|
1281
|
+
|
|
1289
1282
|
/**
|
|
1290
1283
|
* Information about a Store Credit Account.
|
|
1291
1284
|
*/
|
|
@@ -1343,7 +1336,7 @@ export interface DeliveryGroup {
|
|
|
1343
1336
|
/**
|
|
1344
1337
|
* Whether delivery is required for the delivery group.
|
|
1345
1338
|
*/
|
|
1346
|
-
|
|
1339
|
+
isDeliveryRequired: boolean;
|
|
1347
1340
|
}
|
|
1348
1341
|
|
|
1349
1342
|
/**
|
|
@@ -5,6 +5,7 @@ export type {
|
|
|
5
5
|
Capability,
|
|
6
6
|
CartCost,
|
|
7
7
|
CartLineCost,
|
|
8
|
+
CheckoutSettings,
|
|
8
9
|
Customer,
|
|
9
10
|
Editor,
|
|
10
11
|
Extension,
|
|
@@ -15,6 +16,7 @@ export type {
|
|
|
15
16
|
ImageDetails,
|
|
16
17
|
Product,
|
|
17
18
|
ProductVariant,
|
|
19
|
+
PurchasingCompany,
|
|
18
20
|
SelectedOption,
|
|
19
21
|
SessionToken,
|
|
20
22
|
Money,
|
|
@@ -22,13 +24,11 @@ export type {
|
|
|
22
24
|
Storage,
|
|
23
25
|
Shop,
|
|
24
26
|
Version,
|
|
25
|
-
MailingAddress,
|
|
26
27
|
Metafield,
|
|
27
28
|
AppMetafield,
|
|
28
29
|
AppMetafieldEntryTarget,
|
|
29
30
|
AppMetafieldEntry,
|
|
30
31
|
CartLine,
|
|
31
|
-
PresentmentCartLine,
|
|
32
32
|
PaymentOption,
|
|
33
33
|
SelectedPaymentOption,
|
|
34
34
|
CartDiscountCode,
|
|
@@ -63,16 +63,19 @@ export type {
|
|
|
63
63
|
SellingPlan,
|
|
64
64
|
StorefrontApiVersion,
|
|
65
65
|
ValidationError,
|
|
66
|
+
MailingAddress,
|
|
66
67
|
} from './api/shared';
|
|
67
68
|
|
|
68
69
|
export type {
|
|
69
70
|
RedeemableAttribute,
|
|
70
71
|
RedeemableChange,
|
|
72
|
+
RedeemableAddChange,
|
|
71
73
|
RedeemableChangeResult,
|
|
72
74
|
RedeemableChangeResultError,
|
|
73
75
|
RedeemableChangeResultSuccess,
|
|
74
|
-
|
|
75
|
-
} from './api/redeemable/
|
|
76
|
+
RedeemableApi,
|
|
77
|
+
} from './api/redeemable/redeemable';
|
|
78
|
+
|
|
76
79
|
export type {
|
|
77
80
|
AttributeChange,
|
|
78
81
|
AttributeChangeResult,
|
|
@@ -107,14 +110,19 @@ export type {
|
|
|
107
110
|
NoteChangeResult,
|
|
108
111
|
NoteChangeResultSuccess,
|
|
109
112
|
NoteChangeResultError,
|
|
113
|
+
ShippingAddressChange,
|
|
114
|
+
ShippingAddressChangeFieldError,
|
|
115
|
+
ShippingAddressChangeResult,
|
|
116
|
+
ShippingAddressChangeResultError,
|
|
117
|
+
ShippingAddressChangeResultSuccess,
|
|
110
118
|
CheckoutApi,
|
|
111
119
|
} from './api/checkout/checkout';
|
|
112
120
|
export type {Order, OrderStatusApi} from './api/order-status/order-status';
|
|
113
121
|
|
|
114
|
-
export type {
|
|
115
|
-
export type {
|
|
116
|
-
export type {
|
|
117
|
-
export type {
|
|
122
|
+
export type {CartLineItemApi} from './api/cart-line/cart-line-item';
|
|
123
|
+
export type {PickupLocationListApi} from './api/pickup/pickup-location-list';
|
|
124
|
+
export type {PickupPointListApi} from './api/pickup/pickup-point-list';
|
|
125
|
+
export type {ShippingOptionItemApi} from './api/shipping/shipping-option-item';
|
|
118
126
|
|
|
119
127
|
export type {
|
|
120
128
|
PaymentMethodAttributesResult,
|
|
@@ -123,5 +131,5 @@ export type {
|
|
|
123
131
|
PaymentMethodAttribute,
|
|
124
132
|
PaymentMethodAttributesChange,
|
|
125
133
|
PaymentMethodAttributesUpdateChange,
|
|
126
|
-
|
|
127
|
-
} from './api/payment-
|
|
134
|
+
PaymentOptionItemApi,
|
|
135
|
+
} from './api/payment/payment-option-item';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {extension, Banner} from '@shopify/ui-extensions/checkout';
|
|
2
2
|
|
|
3
|
-
extension('
|
|
3
|
+
export default extension('purchase.checkout.block.render', (root) => {
|
|
4
4
|
const banner = root.createComponent(Banner, {
|
|
5
5
|
status: 'critical',
|
|
6
6
|
title:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {extension, BlockLayout, View} from '@shopify/ui-extensions/checkout';
|
|
2
2
|
|
|
3
|
-
extension('
|
|
3
|
+
export default extension('purchase.checkout.block.render', (root) => {
|
|
4
4
|
const blockLayout = root.createComponent(
|
|
5
5
|
BlockLayout,
|
|
6
6
|
{
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {extension, BlockLayout, View} from '@shopify/ui-extensions/checkout';
|
|
2
2
|
|
|
3
|
-
extension('
|
|
3
|
+
export default extension('purchase.checkout.block.render', (root) => {
|
|
4
4
|
const blockLayout = root.createComponent(
|
|
5
5
|
BlockLayout,
|
|
6
6
|
{
|