@shopify/ui-extensions 2026.7.0-rc.2 → 2026.7.0-rc.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/surfaces/checkout/preact/localized-fields.js +2 -0
- package/build/cjs/surfaces/point-of-sale/events.js +26 -0
- package/build/cjs/surfaces/point-of-sale.js +2 -0
- package/build/esm/surfaces/checkout/preact/localized-fields.mjs +2 -0
- package/build/esm/surfaces/point-of-sale/events.mjs +22 -0
- package/build/esm/surfaces/point-of-sale.mjs +1 -0
- package/build/esnext/surfaces/checkout/preact/localized-fields.esnext +2 -0
- package/build/esnext/surfaces/point-of-sale/events.esnext +22 -0
- package/build/esnext/surfaces/point-of-sale.esnext +1 -0
- package/build/ts/shared.d.ts +2 -2
- package/build/ts/shared.d.ts.map +1 -1
- package/build/ts/surfaces/admin/api/app/app.d.ts +108 -0
- package/build/ts/surfaces/admin/api/app/app.d.ts.map +1 -0
- package/build/ts/surfaces/admin/api/app-home/app-home.d.ts +24 -0
- package/build/ts/surfaces/admin/api/app-home/app-home.d.ts.map +1 -0
- package/build/ts/surfaces/admin/api/generated/generated.d.ts +1 -1
- package/build/ts/surfaces/admin/api/generated/generated.d.ts.map +1 -1
- package/build/ts/surfaces/admin/api/loading/loading.d.ts +10 -0
- package/build/ts/surfaces/admin/api/loading/loading.d.ts.map +1 -0
- package/build/ts/surfaces/admin/api/toast/toast.d.ts +45 -0
- package/build/ts/surfaces/admin/api/toast/toast.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 -1
- package/build/ts/surfaces/admin/components/AppNav.d.ts +44 -0
- package/build/ts/surfaces/admin/components/shared.d.ts +10 -0
- package/build/ts/surfaces/admin/extension-targets.d.ts +5 -1
- package/build/ts/surfaces/admin/extension-targets.d.ts.map +1 -1
- package/build/ts/surfaces/admin/targets/admin.app.home.render.d.ts +64 -0
- package/build/ts/surfaces/checkout/api/address-autocomplete/standard.d.ts +1 -1
- package/build/ts/surfaces/checkout/api/address-autocomplete/suggest.d.ts +2 -2
- package/build/ts/surfaces/checkout/api/cart-line/cart-line-item.d.ts +4 -0
- package/build/ts/surfaces/checkout/api/cart-line/cart-line-item.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/api/checkout/checkout.d.ts +30 -12
- package/build/ts/surfaces/checkout/api/checkout/checkout.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/api/order-confirmation/order-confirmation.d.ts +2 -0
- package/build/ts/surfaces/checkout/api/order-confirmation/order-confirmation.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/api/pickup/pickup-location-item.d.ts +8 -0
- package/build/ts/surfaces/checkout/api/pickup/pickup-location-item.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/api/pickup/pickup-point-list.d.ts +3 -3
- package/build/ts/surfaces/checkout/api/shared.d.ts +3 -0
- package/build/ts/surfaces/checkout/api/shared.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/api/shipping/shipping-option-item.d.ts +8 -0
- package/build/ts/surfaces/checkout/api/shipping/shipping-option-item.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/api/standard/standard.d.ts +94 -29
- package/build/ts/surfaces/checkout/api/standard/standard.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/Announcement.d.ts +3 -3
- package/build/ts/surfaces/checkout/components/Button.d.ts +10 -0
- package/build/ts/surfaces/checkout/components/Checkbox.d.ts +28 -3
- package/build/ts/surfaces/checkout/components/Clickable.d.ts +10 -0
- package/build/ts/surfaces/checkout/components/Details.d.ts +1 -1
- package/build/ts/surfaces/checkout/components/components-shared.d.ts +30 -3
- package/build/ts/surfaces/checkout/components/components.d.ts +9 -15
- package/build/ts/surfaces/checkout/preact/localized-fields.d.ts +2 -0
- package/build/ts/surfaces/checkout/preact/localized-fields.d.ts.map +1 -1
- package/build/ts/surfaces/customer-account/api/cart-line/cart-line-item.d.ts +1 -1
- package/build/ts/surfaces/customer-account/api/docs.d.ts +2 -3
- package/build/ts/surfaces/customer-account/api/docs.d.ts.map +1 -1
- package/build/ts/surfaces/customer-account/api/order-status/order-status.d.ts +27 -2
- package/build/ts/surfaces/customer-account/api/order-status/order-status.d.ts.map +1 -1
- package/build/ts/surfaces/customer-account/api/shared.d.ts +10 -8
- package/build/ts/surfaces/customer-account/api/shared.d.ts.map +1 -1
- package/build/ts/surfaces/customer-account/api/standard-api/standard-api.d.ts +2 -2
- package/build/ts/surfaces/customer-account/components/Announcement.d.ts +3 -3
- package/build/ts/surfaces/customer-account/components/Button.d.ts +10 -0
- package/build/ts/surfaces/customer-account/components/Checkbox.d.ts +28 -3
- package/build/ts/surfaces/customer-account/components/Clickable.d.ts +10 -0
- package/build/ts/surfaces/customer-account/components/Details.d.ts +1 -1
- package/build/ts/surfaces/customer-account/components/components-shared.d.ts +30 -3
- package/build/ts/surfaces/customer-account/components/components.d.ts +9 -15
- package/build/ts/surfaces/point-of-sale/api/data-target-api/data-target-api.d.ts +21 -0
- package/build/ts/surfaces/point-of-sale/api/data-target-api/data-target-api.d.ts.map +1 -0
- package/build/ts/surfaces/point-of-sale/api.d.ts +2 -0
- package/build/ts/surfaces/point-of-sale/api.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/components/components-shared.d.ts +8 -14
- package/build/ts/surfaces/point-of-sale/event/data.d.ts +3 -0
- package/build/ts/surfaces/point-of-sale/event/data.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/events/cash-tracking-session-events.d.ts +26 -0
- package/build/ts/surfaces/point-of-sale/events/cash-tracking-session-events.d.ts.map +1 -0
- package/build/ts/surfaces/point-of-sale/events/transaction-complete-event.d.ts +143 -0
- package/build/ts/surfaces/point-of-sale/events/transaction-complete-event.d.ts.map +1 -0
- package/build/ts/surfaces/point-of-sale/events.d.ts +28 -0
- package/build/ts/surfaces/point-of-sale/events.d.ts.map +1 -0
- package/build/ts/surfaces/point-of-sale/extension-targets.d.ts +18 -2
- package/build/ts/surfaces/point-of-sale/extension-targets.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/globals.d.ts +32 -1
- package/build/ts/surfaces/point-of-sale/globals.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/targets/pos.app.ready.data.d.ts +9 -0
- package/build/ts/surfaces/point-of-sale/targets/pos.cart-update.event.observe.d.ts +1 -0
- package/build/ts/surfaces/point-of-sale/targets/pos.cart.line-item-details.action.menu-item.render.d.ts +2 -0
- package/build/ts/surfaces/point-of-sale/targets/pos.cart.line-item-details.action.render.d.ts +2 -0
- package/build/ts/surfaces/point-of-sale/targets/pos.cash-tracking-session-complete.event.observe.d.ts +1 -0
- package/build/ts/surfaces/point-of-sale/targets/pos.cash-tracking-session-start.event.observe.d.ts +1 -0
- package/build/ts/surfaces/point-of-sale/targets/pos.customer-details.action.menu-item.render.d.ts +2 -0
- package/build/ts/surfaces/point-of-sale/targets/pos.customer-details.action.render.d.ts +2 -0
- package/build/ts/surfaces/point-of-sale/targets/pos.customer-details.block.render.d.ts +2 -0
- package/build/ts/surfaces/point-of-sale/targets/pos.draft-order-details.action.menu-item.render.d.ts +2 -0
- package/build/ts/surfaces/point-of-sale/targets/pos.draft-order-details.action.render.d.ts +2 -0
- package/build/ts/surfaces/point-of-sale/targets/pos.draft-order-details.block.render.d.ts +2 -0
- package/build/ts/surfaces/point-of-sale/targets/pos.exchange.post.action.menu-item.render.d.ts +2 -0
- package/build/ts/surfaces/point-of-sale/targets/pos.exchange.post.action.render.d.ts +2 -0
- package/build/ts/surfaces/point-of-sale/targets/pos.exchange.post.block.render.d.ts +2 -0
- package/build/ts/surfaces/point-of-sale/targets/pos.home.modal.render.d.ts +2 -0
- package/build/ts/surfaces/point-of-sale/targets/pos.home.tile.render.d.ts +2 -0
- package/build/ts/surfaces/point-of-sale/targets/pos.order-details.action.menu-item.render.d.ts +2 -0
- package/build/ts/surfaces/point-of-sale/targets/pos.order-details.action.render.d.ts +2 -0
- package/build/ts/surfaces/point-of-sale/targets/pos.order-details.block.render.d.ts +2 -0
- package/build/ts/surfaces/point-of-sale/targets/pos.product-details.action.menu-item.render.d.ts +2 -0
- package/build/ts/surfaces/point-of-sale/targets/pos.product-details.action.render.d.ts +2 -0
- package/build/ts/surfaces/point-of-sale/targets/pos.product-details.block.render.d.ts +2 -0
- package/build/ts/surfaces/point-of-sale/targets/pos.purchase.post.action.menu-item.render.d.ts +2 -0
- package/build/ts/surfaces/point-of-sale/targets/pos.purchase.post.action.render.d.ts +2 -0
- package/build/ts/surfaces/point-of-sale/targets/pos.purchase.post.block.render.d.ts +2 -0
- package/build/ts/surfaces/point-of-sale/targets/pos.receipt-footer.block.render.d.ts +2 -0
- package/build/ts/surfaces/point-of-sale/targets/pos.receipt-header.block.render.d.ts +2 -0
- package/build/ts/surfaces/point-of-sale/targets/pos.register-details.action.menu-item.render.d.ts +2 -0
- package/build/ts/surfaces/point-of-sale/targets/pos.register-details.action.render.d.ts +2 -0
- package/build/ts/surfaces/point-of-sale/targets/pos.register-details.block.render.d.ts +2 -0
- package/build/ts/surfaces/point-of-sale/targets/pos.return.post.action.menu-item.render.d.ts +2 -0
- package/build/ts/surfaces/point-of-sale/targets/pos.return.post.action.render.d.ts +2 -0
- package/build/ts/surfaces/point-of-sale/targets/pos.return.post.block.render.d.ts +2 -0
- package/build/ts/surfaces/point-of-sale/targets/pos.transaction-complete.event.observe.d.ts +1 -0
- package/build/ts/surfaces/point-of-sale.d.ts +1 -0
- package/build/ts/surfaces/point-of-sale.d.ts.map +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/shared.ts +6 -2
- package/src/surfaces/admin/api/app/app.ts +123 -0
- package/src/surfaces/admin/api/app-home/app-home.ts +27 -0
- package/src/surfaces/admin/api/generated/generated.ts +1 -1
- package/src/surfaces/admin/api/loading/loading.ts +9 -0
- package/src/surfaces/admin/api/toast/toast.ts +50 -0
- package/src/surfaces/admin/api.ts +14 -0
- package/src/surfaces/admin/components/AppNav.d.ts +44 -0
- package/src/surfaces/admin/components/shared.d.ts +10 -0
- package/src/surfaces/admin/extension-targets.ts +9 -0
- package/src/surfaces/checkout/api/address-autocomplete/standard.ts +1 -1
- package/src/surfaces/checkout/api/address-autocomplete/suggest.ts +2 -2
- package/src/surfaces/checkout/api/cart-line/cart-line-item.ts +4 -0
- package/src/surfaces/checkout/api/checkout/checkout.ts +30 -12
- package/src/surfaces/checkout/api/order-confirmation/order-confirmation.ts +2 -0
- package/src/surfaces/checkout/api/pickup/pickup-location-item.ts +8 -0
- package/src/surfaces/checkout/api/pickup/pickup-point-list.ts +3 -3
- package/src/surfaces/checkout/api/shared.ts +3 -0
- package/src/surfaces/checkout/api/shipping/shipping-option-item.ts +8 -0
- package/src/surfaces/checkout/api/standard/standard.ts +94 -29
- package/src/surfaces/checkout/components/Announcement.d.ts +3 -3
- package/src/surfaces/checkout/components/Button.d.ts +10 -0
- package/src/surfaces/checkout/components/Checkbox.d.ts +28 -3
- package/src/surfaces/checkout/components/Clickable.d.ts +10 -0
- package/src/surfaces/checkout/components/Details.d.ts +1 -1
- package/src/surfaces/checkout/components/components-shared.d.ts +30 -3
- package/src/surfaces/checkout/components/components.d.ts +9 -15
- package/src/surfaces/checkout/preact/localized-fields.ts +2 -0
- package/src/surfaces/customer-account/api/cart-line/cart-line-item.ts +1 -1
- package/src/surfaces/customer-account/api/docs.ts +2 -3
- package/src/surfaces/customer-account/api/order-status/order-status.ts +27 -2
- package/src/surfaces/customer-account/api/shared.ts +10 -8
- package/src/surfaces/customer-account/api/standard-api/standard-api.ts +2 -2
- package/src/surfaces/point-of-sale/api/data-target-api/data-target-api.ts +28 -0
- package/src/surfaces/point-of-sale/api.ts +7 -0
- package/src/surfaces/point-of-sale/components/components-shared.d.ts +8 -14
- package/src/surfaces/point-of-sale/event/data.ts +4 -0
- package/src/surfaces/point-of-sale/events/cash-tracking-session-events.ts +27 -0
- package/src/surfaces/point-of-sale/events/transaction-complete-event.ts +149 -0
- package/src/surfaces/point-of-sale/events.ts +37 -0
- package/src/surfaces/point-of-sale/extension-targets.ts +24 -2
- package/src/surfaces/point-of-sale/globals.ts +46 -1
- package/src/surfaces/point-of-sale.ts +1 -0
|
@@ -55,7 +55,7 @@ export interface AddressAutocompleteStandardApi<Target extends 'purchase.address
|
|
|
55
55
|
/**
|
|
56
56
|
* The details about the location, language, and currency of the customer. For utilities to easily
|
|
57
57
|
* format and translate content based on these details, you can use the
|
|
58
|
-
* [`i18n`](https://shopify.dev/docs/api/checkout-ui-extensions/apis/localization#
|
|
58
|
+
* [`i18n`](https://shopify.dev/docs/api/checkout-ui-extensions/apis/localization#properties-propertydetail-i18n)
|
|
59
59
|
* object instead.
|
|
60
60
|
*/
|
|
61
61
|
localization: Localization;
|
|
@@ -49,8 +49,8 @@ interface Target {
|
|
|
49
49
|
export interface AddressAutocompleteSuggestOutput {
|
|
50
50
|
/**
|
|
51
51
|
* An array of address autocomplete suggestions to show to the buyer.
|
|
52
|
-
*
|
|
53
|
-
*
|
|
52
|
+
* Checkout displays up to five address suggestions. Return no more
|
|
53
|
+
* than five. Additional suggestions are ignored.
|
|
54
54
|
*/
|
|
55
55
|
suggestions: AddressAutocompleteSuggestion[];
|
|
56
56
|
}
|
|
@@ -6,6 +6,10 @@ export interface CartLineItemApi {
|
|
|
6
6
|
* The cart line that this extension is attached to. Use this to read the
|
|
7
7
|
* line item's merchandise, quantity, cost, and attributes.
|
|
8
8
|
*
|
|
9
|
+
* Available only on the corresponding item target. Shipping option item
|
|
10
|
+
* targets expose shipping option properties; pickup location item targets
|
|
11
|
+
* expose pickup location properties.
|
|
12
|
+
*
|
|
9
13
|
* > Note: Until version `2023-04`, this property was a `ReadonlySignalLike<PresentmentCartLine>`.
|
|
10
14
|
*/
|
|
11
15
|
target: SubscribableSignalLike<CartLine>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cart-line-item.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/checkout/api/cart-line/cart-line-item.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,sBAAsB,EAAC,MAAM,cAAc,CAAC;AACzD,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,sBAAsB,CAAC;AAEnD,kBAAkB;AAClB,MAAM,WAAW,eAAe;IAC9B
|
|
1
|
+
{"version":3,"file":"cart-line-item.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/checkout/api/cart-line/cart-line-item.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,sBAAsB,EAAC,MAAM,cAAc,CAAC;AACzD,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,sBAAsB,CAAC;AAEnD,kBAAkB;AAClB,MAAM,WAAW,eAAe;IAC9B;;;;;;;;;OASG;IACH,MAAM,EAAE,sBAAsB,CAAC,QAAQ,CAAC,CAAC;CAC1C"}
|
|
@@ -50,6 +50,9 @@ export interface NoteChangeResultError {
|
|
|
50
50
|
/**
|
|
51
51
|
* A message that explains the error. This message is useful for debugging.
|
|
52
52
|
* It isn't localized and shouldn't be displayed to the buyer.
|
|
53
|
+
*
|
|
54
|
+
* Render your own localized error text rather than displaying this message
|
|
55
|
+
* to the buyer.
|
|
53
56
|
*/
|
|
54
57
|
message: string;
|
|
55
58
|
}
|
|
@@ -149,6 +152,9 @@ export interface CartLineChangeResultError {
|
|
|
149
152
|
/**
|
|
150
153
|
* A message that explains the error. This message is useful for debugging.
|
|
151
154
|
* It isn't localized and shouldn't be displayed to the buyer.
|
|
155
|
+
*
|
|
156
|
+
* Render your own localized error text rather than displaying this message
|
|
157
|
+
* to the buyer.
|
|
152
158
|
*/
|
|
153
159
|
message: string;
|
|
154
160
|
}
|
|
@@ -384,6 +390,9 @@ export interface GiftCardChangeResultError {
|
|
|
384
390
|
/**
|
|
385
391
|
* A message that explains the error. This message is useful for debugging.
|
|
386
392
|
* It isn't localized and shouldn't be displayed to the buyer.
|
|
393
|
+
*
|
|
394
|
+
* Render your own localized error text rather than displaying this message
|
|
395
|
+
* to the buyer.
|
|
387
396
|
*/
|
|
388
397
|
message: string;
|
|
389
398
|
}
|
|
@@ -461,6 +470,9 @@ export interface MetafieldChangeResultError {
|
|
|
461
470
|
/**
|
|
462
471
|
* A message that explains the error. This message is useful for debugging.
|
|
463
472
|
* It isn't localized and shouldn't be displayed to the buyer.
|
|
473
|
+
*
|
|
474
|
+
* Render your own localized error text rather than displaying this message
|
|
475
|
+
* to the buyer.
|
|
464
476
|
*/
|
|
465
477
|
message: string;
|
|
466
478
|
}
|
|
@@ -546,30 +558,36 @@ export type ShippingAddressChangeResult = ShippingAddressChangeResultSuccess | S
|
|
|
546
558
|
export interface CheckoutApi {
|
|
547
559
|
/**
|
|
548
560
|
* Updates or removes an attribute on the cart and checkout. On success, the
|
|
549
|
-
* [`attributes`](https://shopify.dev/docs/api/checkout-ui-extensions/{API_VERSION}/apis/attributes#
|
|
561
|
+
* [`attributes`](https://shopify.dev/docs/api/checkout-ui-extensions/{API_VERSION}/apis/attributes#properties-propertydetail-attributes) property updates to reflect the change.
|
|
550
562
|
*
|
|
551
|
-
* > Note: This method returns an error if the [cart instruction](https://shopify.dev/docs/api/checkout-ui-extensions/{API_VERSION}/apis/cart-instructions#
|
|
563
|
+
* > Note: This method returns an error if the [cart instruction](https://shopify.dev/docs/api/checkout-ui-extensions/{API_VERSION}/apis/cart-instructions#properties-propertydetail-instructions) `attributes.canUpdateAttributes` is false, or the buyer is using an accelerated checkout method, such as Apple Pay or Google Pay.
|
|
552
564
|
*
|
|
553
565
|
* @deprecated Use cart metafields instead.
|
|
554
566
|
*/
|
|
555
567
|
applyAttributeChange(change: AttributeChange): Promise<AttributeChangeResult>;
|
|
556
568
|
/**
|
|
557
|
-
* Adds, removes, or updates line items in the cart. The returned promise resolves when the change has been applied by the server, and the [`lines`](https://shopify.dev/docs/api/checkout-ui-extensions/{API_VERSION}/apis/cart-lines#
|
|
569
|
+
* Adds, removes, or updates line items in the cart. The returned promise resolves when the change has been applied by the server, and the [`lines`](https://shopify.dev/docs/api/checkout-ui-extensions/{API_VERSION}/apis/cart-lines#properties-propertydetail-lines) property updates with the new state.
|
|
570
|
+
*
|
|
571
|
+
* Accepts a single change per call. To make multiple changes, call this
|
|
572
|
+
* method separately for each one.
|
|
558
573
|
*
|
|
559
|
-
* > Note: This method returns an error if the [cart instruction](https://shopify.dev/docs/api/checkout-ui-extensions/{API_VERSION}/apis/cart-instructions#
|
|
574
|
+
* > Note: This method returns an error if the [cart instruction](https://shopify.dev/docs/api/checkout-ui-extensions/{API_VERSION}/apis/cart-instructions#properties-propertydetail-instructions) `lines.canAddCartLine` is false, or the buyer is using an accelerated checkout method, such as Apple Pay or Google Pay.
|
|
560
575
|
*/
|
|
561
576
|
applyCartLinesChange(change: CartLineChange): Promise<CartLineChangeResult>;
|
|
562
577
|
/**
|
|
563
|
-
* Adds or removes a discount code on the checkout. The returned promise resolves when the change has been applied by the server, and the [`discountCodes`](https://shopify.dev/docs/api/checkout-ui-extensions/{API_VERSION}/apis/discounts#
|
|
578
|
+
* Adds or removes a discount code on the checkout. The returned promise resolves when the change has been applied by the server, and the [`discountCodes`](https://shopify.dev/docs/api/checkout-ui-extensions/{API_VERSION}/apis/discounts#properties-propertydetail-discountcodes) property updates with the new state.
|
|
564
579
|
*
|
|
565
580
|
* > Caution:
|
|
566
581
|
* > See [security considerations](https://shopify.dev/docs/api/checkout-ui-extensions/{API_VERSION}/configuration#network-access) if your extension retrieves discount codes through a network call.
|
|
567
582
|
*
|
|
568
|
-
* > Note: This method returns an error if the [cart instruction](https://shopify.dev/docs/api/checkout-ui-extensions/{API_VERSION}/apis/cart-instructions#
|
|
583
|
+
* > Note: This method returns an error if the [cart instruction](https://shopify.dev/docs/api/checkout-ui-extensions/{API_VERSION}/apis/cart-instructions#properties-propertydetail-instructions) `discounts.canUpdateDiscountCodes` is false, or the buyer is using an accelerated checkout method, such as Apple Pay or Google Pay.
|
|
569
584
|
*/
|
|
570
585
|
applyDiscountCodeChange(change: DiscountCodeChange): Promise<DiscountCodeChangeResult>;
|
|
571
586
|
/**
|
|
572
|
-
* Adds or removes a gift card from the checkout. The returned promise resolves when the change has been applied by the server, and the [`appliedGiftCards`](https://shopify.dev/docs/api/checkout-ui-extensions/{API_VERSION}/apis/gift-cards#
|
|
587
|
+
* Adds or removes a gift card from the checkout. The returned promise resolves when the change has been applied by the server, and the [`appliedGiftCards`](https://shopify.dev/docs/api/checkout-ui-extensions/{API_VERSION}/apis/gift-cards#properties-propertydetail-appliedgiftcards) property updates with the new state.
|
|
588
|
+
*
|
|
589
|
+
* Unlike other write operations, gift card changes aren't gated by a cart
|
|
590
|
+
* instruction flag.
|
|
573
591
|
*
|
|
574
592
|
* > Caution:
|
|
575
593
|
* > See [security considerations](https://shopify.dev/docs/api/checkout-ui-extensions/{API_VERSION}/configuration#network-access) if your extension retrieves gift card codes through a network call.
|
|
@@ -579,19 +597,19 @@ export interface CheckoutApi {
|
|
|
579
597
|
applyGiftCardChange(change: GiftCardChange): Promise<GiftCardChangeResult>;
|
|
580
598
|
/**
|
|
581
599
|
* Creates, updates, or removes a cart metafield on the checkout. On success, the
|
|
582
|
-
* [`metafields`](https://shopify.dev/docs/api/checkout-ui-extensions/{API_VERSION}/apis/metafields#
|
|
600
|
+
* [`metafields`](https://shopify.dev/docs/api/checkout-ui-extensions/{API_VERSION}/apis/metafields#properties-propertydetail-metafields) property updates to reflect the change.
|
|
583
601
|
*
|
|
584
602
|
* Cart metafields are copied to order metafields at order creation time if there's a matching order metafield definition with the [`cart to order copyable`](https://shopify.dev/docs/apps/build/metafields/use-metafield-capabilities#cart-to-order-copyable) capability enabled.
|
|
585
603
|
*
|
|
586
|
-
* > Note: This method returns an error if the [cart instruction](https://shopify.dev/docs/api/checkout-ui-extensions/{API_VERSION}/apis/cart-instructions#
|
|
604
|
+
* > Note: This method returns an error if the [cart instruction](https://shopify.dev/docs/api/checkout-ui-extensions/{API_VERSION}/apis/cart-instructions#properties-propertydetail-instructions) `metafields.canSetCartMetafields` is false, or the buyer is using an accelerated checkout method, such as Apple Pay or Google Pay.
|
|
587
605
|
*/
|
|
588
606
|
applyMetafieldChange(change: MetafieldChange): Promise<MetafieldChangeResult>;
|
|
589
607
|
/**
|
|
590
608
|
* Sets or removes the buyer's note on the checkout. On success, the
|
|
591
|
-
* [`note`](https://shopify.dev/docs/api/checkout-ui-extensions/{API_VERSION}/apis/note#
|
|
609
|
+
* [`note`](https://shopify.dev/docs/api/checkout-ui-extensions/{API_VERSION}/apis/note#properties-propertydetail-note)
|
|
592
610
|
* property updates to reflect the change.
|
|
593
611
|
*
|
|
594
|
-
* > Note: This method returns an error if the [cart instruction](https://shopify.dev/docs/api/checkout-ui-extensions/{API_VERSION}/apis/cart-instructions#
|
|
612
|
+
* > Note: This method returns an error if the [cart instruction](https://shopify.dev/docs/api/checkout-ui-extensions/{API_VERSION}/apis/cart-instructions#properties-propertydetail-instructions) `notes.canUpdateNote` is false, or the buyer is using an accelerated checkout method, such as Apple Pay or Google Pay.
|
|
595
613
|
*/
|
|
596
614
|
applyNoteChange(change: NoteChange): Promise<NoteChangeResult>;
|
|
597
615
|
/**
|
|
@@ -603,7 +621,7 @@ export interface CheckoutApi {
|
|
|
603
621
|
* are merged into the existing address without prompting the buyer. On success,
|
|
604
622
|
* the `shippingAddress` property updates to reflect the change.
|
|
605
623
|
*
|
|
606
|
-
* > Note: This method returns an error if the [cart instruction](https://shopify.dev/docs/api/checkout-ui-extensions/{API_VERSION}/apis/cart-instructions#
|
|
624
|
+
* > Note: This method returns an error if the [cart instruction](https://shopify.dev/docs/api/checkout-ui-extensions/{API_VERSION}/apis/cart-instructions#properties-propertydetail-instructions) `delivery.canSelectCustomAddress` is false, or the buyer is using an accelerated checkout method, such as Apple Pay or Google Pay.
|
|
607
625
|
*
|
|
608
626
|
* {% include /apps/checkout/privacy-icon.md %} Requires access to [protected customer data](https://shopify.dev/docs/apps/store/data-protection/protected-customer-data).
|
|
609
627
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkout.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/checkout/api/checkout/checkout.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,EACT,WAAW,EACX,cAAc,EACd,eAAe,EAChB,MAAM,WAAW,CAAC;AAEnB;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,IAAI,EAAE,YAAY,CAAC;CACpB;AAED;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,IAAI,EAAE,YAAY,CAAC;IACnB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG,gBAAgB,GAAG,gBAAgB,CAAC;AAE7D;;;GAGG;AACH,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH,IAAI,EAAE,SAAS,CAAC;CACjB;AAED;;;GAGG;AACH,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,IAAI,EAAE,OAAO,CAAC;IAEd
|
|
1
|
+
{"version":3,"file":"checkout.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/checkout/api/checkout/checkout.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,EACT,WAAW,EACX,cAAc,EACd,eAAe,EAChB,MAAM,WAAW,CAAC;AAEnB;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,IAAI,EAAE,YAAY,CAAC;CACpB;AAED;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,IAAI,EAAE,YAAY,CAAC;IACnB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG,gBAAgB,GAAG,gBAAgB,CAAC;AAE7D;;;GAGG;AACH,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH,IAAI,EAAE,SAAS,CAAC;CACjB;AAED;;;GAGG;AACH,MAAM,WAAW,qBAAq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O,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,MAAM,WAAW,gCAAgC;IAC/C;;OAEG;IACH,IAAI,EAAE,OAAO,CAAC;IAEd;;OAEG;IACH,MAAM,EAAE,+BAA+B,EAAE,CAAC;CAC3C;AAED;;;GAGG;AACH,MAAM,MAAM,2BAA2B,GACnC,kCAAkC,GAClC,gCAAgC,CAAC;AAErC;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC1B;;;;;;;OAOG;IACH,oBAAoB,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAAC;IAE9E;;;;;;;OAOG;IACH,oBAAoB,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAE5E;;;;;;;OAOG;IACH,uBAAuB,CACrB,MAAM,EAAE,kBAAkB,GACzB,OAAO,CAAC,wBAAwB,CAAC,CAAC;IAErC;;;;;;;;;;OAUG;IACH,mBAAmB,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAE3E;;;;;;;OAOG;IACH,oBAAoB,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAAC;IAE9E;;;;;;OAMG;IACH,eAAe,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAE/D;;OAEG;IACH,0BAA0B,CAAC,EAAE,OAAO,CAAC;IAErC;;;;;;;;OAQG;IACH,0BAA0B,CAAC,CACzB,MAAM,EAAE,qBAAqB,GAC5B,OAAO,CAAC,2BAA2B,CAAC,CAAC;CACzC"}
|
|
@@ -15,6 +15,8 @@ export interface OrderConfirmation {
|
|
|
15
15
|
* A randomly generated alpha-numeric identifier for the order, distinct
|
|
16
16
|
* from `order.id`. The value is `undefined` for orders that were created
|
|
17
17
|
* before this field was introduced. All recent orders have a number.
|
|
18
|
+
*
|
|
19
|
+
* Optional. Might not be present for orders created before 2024.
|
|
18
20
|
*/
|
|
19
21
|
number?: string;
|
|
20
22
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"order-confirmation.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/checkout/api/order-confirmation/order-confirmation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,sBAAsB,EAAC,MAAM,cAAc,CAAC;AAEzD,kBAAkB;AAClB,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE;QACL;;;;;;WAMG;QACH,EAAE,EAAE,MAAM,CAAC;KACZ,CAAC;IACF
|
|
1
|
+
{"version":3,"file":"order-confirmation.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/checkout/api/order-confirmation/order-confirmation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,sBAAsB,EAAC,MAAM,cAAc,CAAC;AAEzD,kBAAkB;AAClB,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE;QACL;;;;;;WAMG;QACH,EAAE,EAAE,MAAM,CAAC;KACZ,CAAC;IACF;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,YAAY,EAAE,OAAO,CAAC;CACvB;AAED,kBAAkB;AAClB,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,iBAAiB,EAAE,sBAAsB,CAAC,iBAAiB,CAAC,CAAC;CAC9D"}
|
|
@@ -4,10 +4,18 @@ import type { PickupLocationOption } from '../standard/standard';
|
|
|
4
4
|
export interface PickupLocationItemApi {
|
|
5
5
|
/**
|
|
6
6
|
* The pickup location that this extension is attached to. Use this to read the location's name, address, and other details.
|
|
7
|
+
*
|
|
8
|
+
* Available only on the corresponding item target. Shipping option item
|
|
9
|
+
* targets expose shipping option properties; pickup location item targets
|
|
10
|
+
* expose pickup location properties.
|
|
7
11
|
*/
|
|
8
12
|
target: SubscribableSignalLike<PickupLocationOption>;
|
|
9
13
|
/**
|
|
10
14
|
* Whether the buyer has selected the target pickup location. When `true`, the target location is the buyer's active choice. When `false`, the buyer has chosen a different pickup location.
|
|
15
|
+
*
|
|
16
|
+
* Available only on the corresponding item target. Shipping option item
|
|
17
|
+
* targets expose shipping option properties; pickup location item targets
|
|
18
|
+
* expose pickup location properties.
|
|
11
19
|
*/
|
|
12
20
|
isTargetSelected: SubscribableSignalLike<boolean>;
|
|
13
21
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pickup-location-item.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/checkout/api/pickup/pickup-location-item.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,sBAAsB,EAAC,MAAM,cAAc,CAAC;AACzD,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,sBAAsB,CAAC;AAE/D,kBAAkB;AAClB,MAAM,WAAW,qBAAqB;IACpC
|
|
1
|
+
{"version":3,"file":"pickup-location-item.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/checkout/api/pickup/pickup-location-item.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,sBAAsB,EAAC,MAAM,cAAc,CAAC;AACzD,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,sBAAsB,CAAC;AAE/D,kBAAkB;AAClB,MAAM,WAAW,qBAAqB;IACpC;;;;;;OAMG;IACH,MAAM,EAAE,sBAAsB,CAAC,oBAAoB,CAAC,CAAC;IAErD;;;;;;OAMG;IACH,gBAAgB,EAAE,sBAAsB,CAAC,OAAO,CAAC,CAAC;CACnD"}
|
|
@@ -2,9 +2,9 @@ import type { SubscribableSignalLike } from '../../shared';
|
|
|
2
2
|
/** @publicDocs */
|
|
3
3
|
export interface PickupPointListApi {
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
5
|
+
* Reflects which view was active when the extension loaded. When the
|
|
6
|
+
* buyer moves to the next view, the extension restarts with the
|
|
7
|
+
* current value rather than updating in place.
|
|
8
8
|
*/
|
|
9
9
|
isLocationFormVisible: SubscribableSignalLike<boolean>;
|
|
10
10
|
}
|
|
@@ -54,6 +54,9 @@ export interface Attribute {
|
|
|
54
54
|
* The value associated with the attribute key. This is a freeform string
|
|
55
55
|
* that can store any information the buyer or app provides.
|
|
56
56
|
*
|
|
57
|
+
* Attribute values are always strings. To store structured data, serialize
|
|
58
|
+
* it to JSON and parse it when reading.
|
|
59
|
+
*
|
|
57
60
|
* @example 'Please use red wrapping paper'
|
|
58
61
|
*/
|
|
59
62
|
value: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../../../src/surfaces/checkout/api/shared.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,iBAAiB,CAAC;AAEjD,kBAAkB;AAClB,MAAM,WAAW,eAAe;IAC9B;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;;;;;;;;;OAUG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC1B;;;;;;OAMG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;;;OAIG;IACH,mBAAmB,EAAE,OAAO,CAAC;CAC9B;AAED,kBAAkB;AAClB,MAAM,WAAW,SAAS;IACxB;;;;;;;OAOG;IACH,GAAG,EAAE,MAAM,CAAC;IAEZ
|
|
1
|
+
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../../../src/surfaces/checkout/api/shared.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,iBAAiB,CAAC;AAEjD,kBAAkB;AAClB,MAAM,WAAW,eAAe;IAC9B;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;;;;;;;;;OAUG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC1B;;;;;;OAMG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;;;OAIG;IACH,mBAAmB,EAAE,OAAO,CAAC;CAC9B;AAED,kBAAkB;AAClB,MAAM,WAAW,SAAS;IACxB;;;;;;;OAOG;IACH,GAAG,EAAE,MAAM,CAAC;IAEZ;;;;;;;;OAQG;IACH,KAAK,EAAE,MAAM,CAAC;CACf;AAED,kBAAkB;AAClB,MAAM,WAAW,cAAc;IAC7B;;;;;;;OAOG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;;;;;;;OASG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;;;;;;;OASG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;;;;;;OAQG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;;;;;OAOG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;;;;;;OAQG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;;;;;;;OAQG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC;IAE1B;;;;;;;;OAQG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;;;;;;OAQG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,kBAAkB;AAClB,MAAM,WAAW,eAAgB,SAAQ,cAAc;IACrD;;;;;OAKG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB"}
|
|
@@ -4,10 +4,18 @@ import type { ShippingOption } from '../standard/standard';
|
|
|
4
4
|
export interface ShippingOptionItemApi {
|
|
5
5
|
/**
|
|
6
6
|
* The shipping option that this extension is attached to. Use this to read the option's cost, carrier, delivery estimate, and other details.
|
|
7
|
+
*
|
|
8
|
+
* Available only on the corresponding item target. Shipping option item
|
|
9
|
+
* targets expose shipping option properties; pickup location item targets
|
|
10
|
+
* expose pickup location properties.
|
|
7
11
|
*/
|
|
8
12
|
target: SubscribableSignalLike<ShippingOption>;
|
|
9
13
|
/**
|
|
10
14
|
* Whether the buyer has selected the target shipping option. When `true`, the target option is the buyer's active choice. When `false`, the buyer has chosen a different shipping option.
|
|
15
|
+
*
|
|
16
|
+
* Available only on the corresponding item target. Shipping option item
|
|
17
|
+
* targets expose shipping option properties; pickup location item targets
|
|
18
|
+
* expose pickup location properties.
|
|
11
19
|
*/
|
|
12
20
|
isTargetSelected: SubscribableSignalLike<boolean>;
|
|
13
21
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shipping-option-item.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/checkout/api/shipping/shipping-option-item.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,sBAAsB,EAAC,MAAM,cAAc,CAAC;AACzD,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,sBAAsB,CAAC;AAEzD,kBAAkB;AAClB,MAAM,WAAW,qBAAqB;IACpC
|
|
1
|
+
{"version":3,"file":"shipping-option-item.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/checkout/api/shipping/shipping-option-item.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,sBAAsB,EAAC,MAAM,cAAc,CAAC;AACzD,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,sBAAsB,CAAC;AAEzD,kBAAkB;AAClB,MAAM,WAAW,qBAAqB;IACpC;;;;;;OAMG;IACH,MAAM,EAAE,sBAAsB,CAAC,cAAc,CAAC,CAAC;IAE/C;;;;;;OAMG;IACH,gBAAgB,EAAE,sBAAsB,CAAC,OAAO,CAAC,CAAC;IAElD;;OAEG;IACH,UAAU,EAAE,4BAA4B,CAAC;CAC1C;AAED;;;GAGG;AACH,MAAM,WAAW,4BAA4B;IAC3C;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;CAClB"}
|
|
@@ -17,7 +17,8 @@ export interface Storage {
|
|
|
17
17
|
* The stored data is deserialized from JSON and returned as
|
|
18
18
|
* its original type.
|
|
19
19
|
*
|
|
20
|
-
* Returns `null`
|
|
20
|
+
* Returns the stored value for the given key, or `null` when no value
|
|
21
|
+
* exists. Doesn't throw on a missing key.
|
|
21
22
|
*/
|
|
22
23
|
read<T = unknown>(key: string): Promise<T | null>;
|
|
23
24
|
/**
|
|
@@ -44,20 +45,8 @@ export interface Extension<Target extends ExtensionTarget = ExtensionTarget> {
|
|
|
44
45
|
*/
|
|
45
46
|
apiVersion: ApiVersion;
|
|
46
47
|
/**
|
|
47
|
-
* The allowed capabilities of the extension, defined
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
* * [`api_access`](https://shopify.dev/docs/api/checkout-ui-extensions/{API_VERSION}/configuration#api-access): the extension can access the Storefront API.
|
|
51
|
-
*
|
|
52
|
-
* * [`network_access`](https://shopify.dev/docs/api/checkout-ui-extensions/{API_VERSION}/configuration#network-access): the extension can make external network calls.
|
|
53
|
-
*
|
|
54
|
-
* * [`block_progress`](https://shopify.dev/docs/api/checkout-ui-extensions/{API_VERSION}/configuration#block-progress): the extension can block a customer's progress and the merchant has allowed this blocking behavior.
|
|
55
|
-
*
|
|
56
|
-
* * [`collect_buyer_consent.sms_marketing`](https://shopify.dev/docs/api/checkout-ui-extensions/{API_VERSION}/configuration#collect-buyer-consent): the extension can collect customer consent for SMS marketing.
|
|
57
|
-
*
|
|
58
|
-
* * [`collect_buyer_consent.customer_privacy`](https://shopify.dev/docs/api/checkout-ui-extensions/{API_VERSION}/configuration#collect-buyer-consent): the extension can register customer consent decisions that are honored on Shopify-managed services.
|
|
59
|
-
*
|
|
60
|
-
* * [`iframe.sources`](https://shopify.dev/docs/api/checkout-ui-extensions/{API_VERSION}/configuration#iframe): the extension can embed an external URL in an iframe.
|
|
48
|
+
* The allowed capabilities of the extension, defined in your
|
|
49
|
+
* [`shopify.extension.toml`](/docs/api/checkout-ui-extensions/{API_VERSION}/configuration) file.
|
|
61
50
|
*/
|
|
62
51
|
capabilities: SubscribableSignalLike<Capability[]>;
|
|
63
52
|
/**
|
|
@@ -97,6 +86,9 @@ export interface Extension<Target extends ExtensionTarget = ExtensionTarget> {
|
|
|
97
86
|
*
|
|
98
87
|
* For unpublished extensions, the value is `undefined`.
|
|
99
88
|
*
|
|
89
|
+
* Don't use this property as a stable identifier in development environments.
|
|
90
|
+
* It becomes available only after the extension is published.
|
|
91
|
+
*
|
|
100
92
|
* @example 3.0.10
|
|
101
93
|
*/
|
|
102
94
|
version?: string;
|
|
@@ -359,14 +351,20 @@ export interface Localization {
|
|
|
359
351
|
extensionLanguage: SubscribableSignalLike<Language>;
|
|
360
352
|
/**
|
|
361
353
|
* The country context of the checkout, carried over from the cart. It updates when the buyer changes their shipping address country. Use this value to display region-specific content such as local support information or regional policies. The value is `undefined` if the buyer's country is unknown.
|
|
354
|
+
*
|
|
355
|
+
* Derived from the buyer's shipping address. Returns `undefined` until the
|
|
356
|
+
* buyer enters a shipping address.
|
|
362
357
|
*/
|
|
363
358
|
country: SubscribableSignalLike<Country | undefined>;
|
|
364
359
|
/**
|
|
365
|
-
* The [market](
|
|
366
|
-
*
|
|
367
|
-
*
|
|
360
|
+
* The [market](/docs/apps/build/markets) context of the checkout,
|
|
361
|
+
* carried over from the cart context. Markets group countries and
|
|
362
|
+
* regions with shared pricing, languages, and domains. The market
|
|
363
|
+
* context updates when the buyer changes the country of their
|
|
364
|
+
* shipping address. The value is `undefined` if the market is unknown.
|
|
368
365
|
*
|
|
369
|
-
* @deprecated
|
|
366
|
+
* @deprecated Merchants now manage which extensions load for each
|
|
367
|
+
* market, so extensions no longer need to check this value.
|
|
370
368
|
*/
|
|
371
369
|
market: SubscribableSignalLike<Market | undefined>;
|
|
372
370
|
}
|
|
@@ -491,8 +489,10 @@ export interface StandardApi<Target extends ExtensionTarget = ExtensionTarget> {
|
|
|
491
489
|
* For example, if you intend to add a discount code via the `applyDiscountCodeChange` method,
|
|
492
490
|
* check `discounts.canUpdateDiscountCodes` to ensure it's supported in this checkout.
|
|
493
491
|
*
|
|
494
|
-
* > Caution:
|
|
495
|
-
*
|
|
492
|
+
* > Caution: Check cart instructions before calling select APIs, as
|
|
493
|
+
* > some may not be available. See the
|
|
494
|
+
* > [Cart Instructions API](https://shopify.dev/docs/api/checkout-ui-extensions/{API_VERSION}/apis/cart-instructions#examples)
|
|
495
|
+
* > for more information.
|
|
496
496
|
*
|
|
497
497
|
*/
|
|
498
498
|
instructions: SubscribableSignalLike<CartInstructions>;
|
|
@@ -512,7 +512,14 @@ export interface StandardApi<Target extends ExtensionTarget = ExtensionTarget> {
|
|
|
512
512
|
*/
|
|
513
513
|
attributes: SubscribableSignalLike<Attribute[]>;
|
|
514
514
|
/**
|
|
515
|
-
* All payment options available to the buyer for this checkout, such as
|
|
515
|
+
* All payment options available to the buyer for this checkout, such as
|
|
516
|
+
* credit cards, wallets, and local payment methods. The list depends on
|
|
517
|
+
* the shop's payment configuration and the buyer's region.
|
|
518
|
+
*
|
|
519
|
+
* The set of payment options can change when the buyer updates their
|
|
520
|
+
* address or cart, so subscribe to changes rather than reading once
|
|
521
|
+
* during initialization. Each option exposes `handle` and `type` only.
|
|
522
|
+
* Provider names, logos, fees, and installment terms aren't available.
|
|
516
523
|
*/
|
|
517
524
|
availablePaymentOptions: SubscribableSignalLike<PaymentOption[]>;
|
|
518
525
|
/**
|
|
@@ -541,6 +548,8 @@ export interface StandardApi<Target extends ExtensionTarget = ExtensionTarget> {
|
|
|
541
548
|
*
|
|
542
549
|
* This matches the `data.checkout.token` field in a [checkout-related WebPixel event](https://shopify.dev/docs/api/web-pixels-api/standard-events/checkout_started#properties-propertydetail-data)
|
|
543
550
|
* and the `checkout_token` field in the [REST Admin API `Order` resource](https://shopify.dev/docs/api/admin-rest/unstable/resources/order#resource-object).
|
|
551
|
+
*
|
|
552
|
+
* Can be `undefined`. Handle the `undefined` state before using the value.
|
|
544
553
|
*/
|
|
545
554
|
checkoutToken: SubscribableSignalLike<CheckoutToken | undefined>;
|
|
546
555
|
/**
|
|
@@ -549,6 +558,9 @@ export interface StandardApi<Target extends ExtensionTarget = ExtensionTarget> {
|
|
|
549
558
|
cost: CartCost;
|
|
550
559
|
/**
|
|
551
560
|
* The delivery groups for this checkout. Each group contains one or more cart lines and the available delivery options (shipping, pickup point, or pickup location) for those items.
|
|
561
|
+
*
|
|
562
|
+
* Empty until the buyer enters enough address information for Shopify to
|
|
563
|
+
* calculate shipping rates.
|
|
552
564
|
*/
|
|
553
565
|
deliveryGroups: SubscribableSignalLike<DeliveryGroup[]>;
|
|
554
566
|
/**
|
|
@@ -574,7 +586,7 @@ export interface StandardApi<Target extends ExtensionTarget = ExtensionTarget> {
|
|
|
574
586
|
* @see https://shopify.dev/docs/api/checkout-ui-extensions/{API_VERSION}/extension-targets-overview
|
|
575
587
|
* @see https://shopify.dev/docs/apps/app-extensions/configuration#targets
|
|
576
588
|
*
|
|
577
|
-
* @deprecated
|
|
589
|
+
* @deprecated Use `extension.target` instead.
|
|
578
590
|
*/
|
|
579
591
|
extensionPoint: Target;
|
|
580
592
|
/**
|
|
@@ -591,7 +603,7 @@ export interface StandardApi<Target extends ExtensionTarget = ExtensionTarget> {
|
|
|
591
603
|
/**
|
|
592
604
|
* The buyer's language, country, currency, and timezone context. For
|
|
593
605
|
* formatting and translation helpers, use the
|
|
594
|
-
* [`i18n`](https://shopify.dev/docs/api/checkout-ui-extensions/{API_VERSION}/apis/localization#
|
|
606
|
+
* [`i18n`](https://shopify.dev/docs/api/checkout-ui-extensions/{API_VERSION}/apis/localization#properties-propertydetail-i18n)
|
|
595
607
|
* object instead.
|
|
596
608
|
*/
|
|
597
609
|
localization: Localization;
|
|
@@ -604,7 +616,6 @@ export interface StandardApi<Target extends ExtensionTarget = ExtensionTarget> {
|
|
|
604
616
|
/**
|
|
605
617
|
* The method used to query the Storefront GraphQL API with a prefetched token.
|
|
606
618
|
*
|
|
607
|
-
* Refer to [Storefront API access examples](https://shopify.dev/docs/api/checkout-ui-extensions/{API_VERSION}/apis/storefront-api) for more information.
|
|
608
619
|
*/
|
|
609
620
|
query: <Data = unknown, Variables = Record<string, unknown>>(query: string, options?: {
|
|
610
621
|
variables?: Variables;
|
|
@@ -614,7 +625,13 @@ export interface StandardApi<Target extends ExtensionTarget = ExtensionTarget> {
|
|
|
614
625
|
errors?: GraphQLError[];
|
|
615
626
|
}>;
|
|
616
627
|
/**
|
|
617
|
-
* The payment options the buyer has currently selected. This updates as
|
|
628
|
+
* The payment options the buyer has currently selected. This updates as
|
|
629
|
+
* the buyer changes their payment method. The array can contain multiple
|
|
630
|
+
* entries when the buyer splits payment across methods (for example, a
|
|
631
|
+
* gift card and a credit card).
|
|
632
|
+
*
|
|
633
|
+
* Each option exposes `handle` and `type` only. Provider names, logos,
|
|
634
|
+
* fees, and installment terms aren't available.
|
|
618
635
|
*/
|
|
619
636
|
selectedPaymentOptions: SubscribableSignalLike<SelectedPaymentOption[]>;
|
|
620
637
|
/**
|
|
@@ -662,8 +679,8 @@ export interface StandardApi<Target extends ExtensionTarget = ExtensionTarget> {
|
|
|
662
679
|
shop: Shop;
|
|
663
680
|
/**
|
|
664
681
|
* Key-value storage that persists across page loads within the current checkout
|
|
665
|
-
* session. Data is shared across all activated
|
|
666
|
-
* extension.
|
|
682
|
+
* session. Data is shared across all activated targets associated with
|
|
683
|
+
* this extension.
|
|
667
684
|
*
|
|
668
685
|
* > Caution: Data persistence isn't guaranteed and storage is cleared when the
|
|
669
686
|
* buyer starts a new checkout.
|
|
@@ -682,7 +699,7 @@ export interface StandardApi<Target extends ExtensionTarget = ExtensionTarget> {
|
|
|
682
699
|
/**
|
|
683
700
|
* Enables setting and updating customer privacy consent settings and tracking consent metafields.
|
|
684
701
|
*
|
|
685
|
-
* > Note: Requires the [`
|
|
702
|
+
* > Note: Requires the [`collect_buyer_consent` capability](/docs/apps/build/customer-accounts/capabilities#collect-buyer-consent) to be set to `true`.
|
|
686
703
|
*
|
|
687
704
|
* {% include /apps/checkout/privacy-icon.md %} Requires access to [protected customer data](https://shopify.dev/docs/apps/store/data-protection/protected-customer-data).
|
|
688
705
|
*/
|
|
@@ -697,6 +714,10 @@ export interface StandardApi<Target extends ExtensionTarget = ExtensionTarget> {
|
|
|
697
714
|
* Use session tokens to verify the identity of the buyer and the shop
|
|
698
715
|
* context when making server-side API calls. The token is a signed JWT
|
|
699
716
|
* that contains claims such as the customer ID, shop domain, and expiration.
|
|
717
|
+
*
|
|
718
|
+
* The `sub` claim in the decoded token is present only when the buyer is
|
|
719
|
+
* logged in and the app has permission to read customer accounts. Absent for
|
|
720
|
+
* anonymous buyers.
|
|
700
721
|
*/
|
|
701
722
|
export interface SessionToken {
|
|
702
723
|
/**
|
|
@@ -851,10 +872,16 @@ export interface CartCost {
|
|
|
851
872
|
subtotalAmount: SubscribableSignalLike<Money>;
|
|
852
873
|
/**
|
|
853
874
|
* The total shipping cost after shipping discounts have been applied. The value is `undefined` if shipping hasn't been calculated yet, such as when the buyer is still on the information step.
|
|
875
|
+
*
|
|
876
|
+
* `undefined` until the buyer selects a shipping method (typically after the
|
|
877
|
+
* information step).
|
|
854
878
|
*/
|
|
855
879
|
totalShippingAmount: SubscribableSignalLike<Money | undefined>;
|
|
856
880
|
/**
|
|
857
881
|
* The total tax the buyer can expect to pay, or the total tax already included in product and shipping prices (for tax-inclusive regions). The value is `undefined` if taxes haven't been calculated yet.
|
|
882
|
+
*
|
|
883
|
+
* `undefined` when taxes haven't been calculated or aren't available for the
|
|
884
|
+
* buyer's region.
|
|
858
885
|
*/
|
|
859
886
|
totalTaxAmount: SubscribableSignalLike<Money | undefined>;
|
|
860
887
|
/**
|
|
@@ -1187,6 +1214,11 @@ interface InterceptorRequestAllow {
|
|
|
1187
1214
|
* This callback is called when all interceptors finish. We recommend
|
|
1188
1215
|
* setting errors or reasons for blocking at this stage, so that all the errors in
|
|
1189
1216
|
* the UI show up at once.
|
|
1217
|
+
*
|
|
1218
|
+
* Runs after all intercept results are collected. Use it for local state
|
|
1219
|
+
* updates such as setting an error flag. By the time it runs, the navigation
|
|
1220
|
+
* decision is final, so blocking logic belongs in the intercept handler
|
|
1221
|
+
* itself, not here.
|
|
1190
1222
|
* @param result InterceptorResult with behavior as either 'allow' or 'block'
|
|
1191
1223
|
*/
|
|
1192
1224
|
perform?(result: InterceptorResult): void | Promise<void>;
|
|
@@ -1210,6 +1242,11 @@ interface InterceptorRequestBlock {
|
|
|
1210
1242
|
* This callback is called when all interceptors finish. We recommend
|
|
1211
1243
|
* setting errors or reasons for blocking at this stage, so that all the errors in
|
|
1212
1244
|
* the UI show up at once.
|
|
1245
|
+
*
|
|
1246
|
+
* Runs after all intercept results are collected. Use it for local state
|
|
1247
|
+
* updates such as setting an error flag. By the time it runs, the navigation
|
|
1248
|
+
* decision is final, so blocking logic belongs in the intercept handler
|
|
1249
|
+
* itself, not here.
|
|
1213
1250
|
* @param result InterceptorResult with behavior as either 'allow' or 'block'
|
|
1214
1251
|
*/
|
|
1215
1252
|
perform?(result: InterceptorResult): void | Promise<void>;
|
|
@@ -1403,6 +1440,10 @@ export interface Analytics {
|
|
|
1403
1440
|
/**
|
|
1404
1441
|
* Publishes a custom event to [Web Pixels](https://shopify.dev/docs/apps/marketing).
|
|
1405
1442
|
* Returns `true` when the event is successfully dispatched.
|
|
1443
|
+
*
|
|
1444
|
+
* The Promise resolves to `true` when the event was dispatched. The boolean
|
|
1445
|
+
* indicates dispatch confirmation only. It doesn't indicate whether any
|
|
1446
|
+
* specific web pixel processed the event.
|
|
1406
1447
|
*/
|
|
1407
1448
|
publish(name: string, data: Record<string, unknown>): Promise<boolean>;
|
|
1408
1449
|
/**
|
|
@@ -1688,24 +1729,45 @@ export interface AllowedProcessing {
|
|
|
1688
1729
|
* Whether analytics data can be collected based on the visitor's consent,
|
|
1689
1730
|
* the merchant's privacy configuration, and the visitor's region. Analytics
|
|
1690
1731
|
* data includes how the shop was used and what interactions occurred.
|
|
1732
|
+
*
|
|
1733
|
+
* Whether analytics data can be collected right now. Combines the buyer's
|
|
1734
|
+
* consent, the merchant's privacy configuration, and the buyer's region into
|
|
1735
|
+
* a single boolean. Check this flag, not `visitorConsent.analytics`, before
|
|
1736
|
+
* calling `shopify.analytics.publish()`.
|
|
1691
1737
|
*/
|
|
1692
1738
|
analytics: boolean;
|
|
1693
1739
|
/**
|
|
1694
1740
|
* Whether marketing data can be collected based on the visitor's consent,
|
|
1695
1741
|
* the merchant's privacy configuration, and the visitor's region. Marketing
|
|
1696
1742
|
* data includes attribution and targeted advertising preferences.
|
|
1743
|
+
*
|
|
1744
|
+
* Whether marketing data can be collected right now. Combines the buyer's
|
|
1745
|
+
* consent, the merchant's privacy configuration, and the buyer's region into
|
|
1746
|
+
* a single boolean. Check this flag, not `visitorConsent.marketing`, before
|
|
1747
|
+
* performing marketing-related data collection.
|
|
1697
1748
|
*/
|
|
1698
1749
|
marketing: boolean;
|
|
1699
1750
|
/**
|
|
1700
1751
|
* Whether preference data can be collected based on the visitor's consent,
|
|
1701
1752
|
* the merchant's privacy configuration, and the visitor's region. Preference
|
|
1702
1753
|
* data includes language, currency, and sizing choices.
|
|
1754
|
+
*
|
|
1755
|
+
* Whether preference data can be collected right now. Combines the buyer's
|
|
1756
|
+
* consent, the merchant's privacy configuration, and the buyer's region into
|
|
1757
|
+
* a single boolean. Check this flag, not `visitorConsent.preferences`,
|
|
1758
|
+
* before storing or reading buyer preference data.
|
|
1703
1759
|
*/
|
|
1704
1760
|
preferences: boolean;
|
|
1705
1761
|
/**
|
|
1706
1762
|
* Whether data can be shared with third parties based on the visitor's
|
|
1707
1763
|
* consent, the merchant's privacy configuration, and the visitor's region.
|
|
1708
1764
|
* This typically applies to behavioral advertising data.
|
|
1765
|
+
*
|
|
1766
|
+
* Whether buyer data can be shared with or sold to third parties right now.
|
|
1767
|
+
* Combines the buyer's consent, the merchant's privacy configuration, and
|
|
1768
|
+
* the buyer's region into a single boolean. Check this flag, not
|
|
1769
|
+
* `visitorConsent.saleOfData`, before sharing or selling buyer data with
|
|
1770
|
+
* third parties.
|
|
1709
1771
|
*/
|
|
1710
1772
|
saleOfData: boolean;
|
|
1711
1773
|
}
|
|
@@ -1755,6 +1817,9 @@ export interface TrackingConsentMetafieldChange {
|
|
|
1755
1817
|
key: string;
|
|
1756
1818
|
/**
|
|
1757
1819
|
* The new value to store in the metafield. Set to `null` to delete the metafield.
|
|
1820
|
+
*
|
|
1821
|
+
* Consent metafield values are strings, not booleans. Pass `null` to delete
|
|
1822
|
+
* a tracking consent metafield.
|
|
1758
1823
|
*/
|
|
1759
1824
|
value: string | null;
|
|
1760
1825
|
}
|