@shopify/ui-extensions 2026.1.0 → 2026.1.2
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/metafield.js +1 -0
- package/build/cjs/surfaces/checkout/preact/metafields.js +1 -0
- package/build/esm/surfaces/checkout/preact/metafield.mjs +1 -0
- package/build/esm/surfaces/checkout/preact/metafields.mjs +1 -0
- package/build/esnext/surfaces/checkout/preact/metafield.esnext +1 -0
- package/build/esnext/surfaces/checkout/preact/metafields.esnext +1 -0
- package/build/ts/api.d.ts +23 -26
- package/build/ts/api.d.ts.map +1 -1
- package/build/ts/extension.d.ts +21 -0
- package/build/ts/extension.d.ts.map +1 -1
- package/build/ts/shared.d.ts +2 -2
- package/build/ts/surfaces/admin/api/action/action.d.ts +7 -14
- package/build/ts/surfaces/admin/api/action/action.d.ts.map +1 -1
- package/build/ts/surfaces/admin/api/action/action.doc.d.ts.map +1 -1
- package/build/ts/surfaces/admin/api/block/block.d.ts +12 -16
- package/build/ts/surfaces/admin/api/block/block.d.ts.map +1 -1
- package/build/ts/surfaces/admin/api/block/block.doc.d.ts.map +1 -1
- package/build/ts/surfaces/admin/api/checkout-rules/launch-options.d.ts +21 -10
- package/build/ts/surfaces/admin/api/checkout-rules/launch-options.d.ts.map +1 -1
- package/build/ts/surfaces/admin/api/checkout-rules/metafields.d.ts +32 -0
- package/build/ts/surfaces/admin/api/checkout-rules/metafields.d.ts.map +1 -1
- package/build/ts/surfaces/admin/api/checkout-rules/validation-settings.d.ts +7 -3
- package/build/ts/surfaces/admin/api/checkout-rules/validation-settings.d.ts.map +1 -1
- package/build/ts/surfaces/admin/api/checkout-rules/validation-settings.doc.d.ts.map +1 -1
- package/build/ts/surfaces/admin/api/customer-segment-template/customer-segment-template.d.ts +18 -6
- package/build/ts/surfaces/admin/api/customer-segment-template/customer-segment-template.d.ts.map +1 -1
- package/build/ts/surfaces/admin/api/customer-segment-template/customer-segment-template.doc.d.ts.map +1 -1
- package/build/ts/surfaces/admin/api/discount-function-settings/discount-function-settings.d.ts +6 -1
- package/build/ts/surfaces/admin/api/discount-function-settings/discount-function-settings.d.ts.map +1 -1
- package/build/ts/surfaces/admin/api/discount-function-settings/discount-function-settings.doc.d.ts.map +1 -1
- package/build/ts/surfaces/admin/api/discount-function-settings/launch-options.d.ts +30 -12
- package/build/ts/surfaces/admin/api/discount-function-settings/launch-options.d.ts.map +1 -1
- package/build/ts/surfaces/admin/api/discount-function-settings/metafields.d.ts +32 -0
- package/build/ts/surfaces/admin/api/discount-function-settings/metafields.d.ts.map +1 -1
- package/build/ts/surfaces/admin/api/intents/intents.d.ts +30 -35
- package/build/ts/surfaces/admin/api/intents/intents.d.ts.map +1 -1
- package/build/ts/surfaces/admin/api/intents/intents.doc.d.ts.map +1 -1
- package/build/ts/surfaces/admin/api/order-routing-rule/data.d.ts +20 -0
- package/build/ts/surfaces/admin/api/order-routing-rule/data.d.ts.map +1 -1
- package/build/ts/surfaces/admin/api/order-routing-rule/metafields.d.ts +23 -0
- package/build/ts/surfaces/admin/api/order-routing-rule/metafields.d.ts.map +1 -1
- package/build/ts/surfaces/admin/api/order-routing-rule/order-routing-rule.d.ts +7 -2
- package/build/ts/surfaces/admin/api/order-routing-rule/order-routing-rule.d.ts.map +1 -1
- package/build/ts/surfaces/admin/api/order-routing-rule/order-routing-rule.doc.d.ts.map +1 -1
- package/build/ts/surfaces/admin/api/picker/picker.d.ts +44 -16
- package/build/ts/surfaces/admin/api/picker/picker.d.ts.map +1 -1
- package/build/ts/surfaces/admin/api/picker/picker.doc.d.ts.map +1 -1
- package/build/ts/surfaces/admin/api/print-action/print-action.d.ts +6 -13
- package/build/ts/surfaces/admin/api/print-action/print-action.d.ts.map +1 -1
- package/build/ts/surfaces/admin/api/print-action/print-action.doc.d.ts.map +1 -1
- package/build/ts/surfaces/admin/api/product-configuration/product-details-configuration.d.ts +36 -0
- package/build/ts/surfaces/admin/api/product-configuration/product-details-configuration.d.ts.map +1 -1
- package/build/ts/surfaces/admin/api/product-configuration/product-details-configuration.doc.d.ts.map +1 -1
- package/build/ts/surfaces/admin/api/product-configuration/product-variant-details-configuration.d.ts +36 -0
- package/build/ts/surfaces/admin/api/product-configuration/product-variant-details-configuration.d.ts.map +1 -1
- package/build/ts/surfaces/admin/api/product-configuration/product-variant-details-configuration.doc.d.ts.map +1 -1
- package/build/ts/surfaces/admin/api/purchase-options-card-action.d.ts +7 -0
- package/build/ts/surfaces/admin/api/purchase-options-card-action.d.ts.map +1 -1
- package/build/ts/surfaces/admin/api/purchase-options-card-action.doc.d.ts.map +1 -1
- package/build/ts/surfaces/admin/api/resource-picker/resource-picker.d.ts +181 -21
- package/build/ts/surfaces/admin/api/resource-picker/resource-picker.d.ts.map +1 -1
- package/build/ts/surfaces/admin/api/resource-picker/resource-picker.doc.d.ts.map +1 -1
- package/build/ts/surfaces/admin/api/shared.d.ts +7 -1
- package/build/ts/surfaces/admin/api/shared.d.ts.map +1 -1
- package/build/ts/surfaces/admin/api/should-render/should-render.d.ts +8 -1
- package/build/ts/surfaces/admin/api/should-render/should-render.d.ts.map +1 -1
- package/build/ts/surfaces/admin/api/should-render/should-render.doc.d.ts.map +1 -1
- package/build/ts/surfaces/admin/api/standard/standard-rendering.d.ts +15 -0
- package/build/ts/surfaces/admin/api/standard/standard-rendering.d.ts.map +1 -0
- package/build/ts/surfaces/admin/api/standard/standard.d.ts +20 -10
- package/build/ts/surfaces/admin/api/standard/standard.d.ts.map +1 -1
- package/build/ts/surfaces/admin/api/standard/standard.doc.d.ts.map +1 -1
- package/build/ts/surfaces/admin/api/standard/storage.d.ts +21 -27
- package/build/ts/surfaces/admin/api/standard/storage.d.ts.map +1 -1
- package/build/ts/surfaces/admin/api.d.ts +1 -0
- package/build/ts/surfaces/admin/api.d.ts.map +1 -1
- package/build/ts/surfaces/admin/components/ActionExtensionComponents.d.ts +3 -0
- package/build/ts/surfaces/admin/components/ActionExtensionComponents.d.ts.map +1 -1
- package/build/ts/surfaces/admin/components/BlockExtensionComponents.d.ts +3 -0
- package/build/ts/surfaces/admin/components/BlockExtensionComponents.d.ts.map +1 -1
- package/build/ts/surfaces/admin/components/FormExtensionComponents.d.ts +3 -0
- package/build/ts/surfaces/admin/components/FormExtensionComponents.d.ts.map +1 -1
- package/build/ts/surfaces/admin/components/FunctionSettingsComponents.d.ts +3 -0
- package/build/ts/surfaces/admin/components/FunctionSettingsComponents.d.ts.map +1 -1
- package/build/ts/surfaces/admin/components/PrintActionExtensionComponents.d.ts +3 -0
- package/build/ts/surfaces/admin/components/PrintActionExtensionComponents.d.ts.map +1 -1
- package/build/ts/surfaces/admin/components/StandardComponents.d.ts +3 -0
- package/build/ts/surfaces/admin/components/StandardComponents.d.ts.map +1 -1
- package/build/ts/surfaces/admin/extension-targets.d.ts +85 -169
- package/build/ts/surfaces/admin/extension-targets.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/api/address-autocomplete/standard.d.ts +5 -0
- package/build/ts/surfaces/checkout/api/address-autocomplete/standard.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/api/checkout/checkout.d.ts +14 -1
- package/build/ts/surfaces/checkout/api/checkout/checkout.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/api/standard/standard.d.ts +5 -3
- package/build/ts/surfaces/checkout/api/standard/standard.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/preact/metafield.d.ts +1 -0
- package/build/ts/surfaces/checkout/preact/metafield.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/preact/metafields.d.ts +1 -0
- package/build/ts/surfaces/checkout/preact/metafields.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/components/Badge/Badge.doc.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/components/EmptyState.d.ts +44 -34
- package/build/ts/surfaces/point-of-sale/components/Icon/Icon.doc.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/components/Image/Image.doc.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/components/Link/Link.doc.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/components/Modal/Modal.doc.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/components/Page/Page.doc.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/components/Stack/Stack.doc.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/components/Stack.d.ts +10 -10
- package/build/ts/surfaces/point-of-sale/components/Tabs/Tabs.doc.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/components/Text/Text.doc.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/components/TextField.d.ts +1 -1
- package/build/ts/surfaces/point-of-sale/components/Tile/Tile.doc.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/components/components-shared.d.ts +3249 -2916
- package/build/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/api.ts +23 -26
- package/src/extension.ts +21 -0
- package/src/shared.ts +2 -2
- package/src/surfaces/admin/api/action/action.ts +7 -16
- package/src/surfaces/admin/api/action/examples/handle-errors.jsx +47 -0
- package/src/surfaces/admin/api/action/examples/process-selected-products.jsx +33 -0
- package/src/surfaces/admin/api/action/examples/select-additional-resources.jsx +46 -0
- package/src/surfaces/admin/api/block/block.ts +12 -18
- package/src/surfaces/admin/api/block/examples/display-product-info.jsx +46 -0
- package/src/surfaces/admin/api/block/examples/navigate-to-action.jsx +50 -0
- package/src/surfaces/admin/api/block/examples/select-related-products.jsx +46 -0
- package/src/surfaces/admin/api/checkout-rules/examples/configure-shipping-restrictions.jsx +52 -0
- package/src/surfaces/admin/api/checkout-rules/examples/load-validation-config.jsx +55 -0
- package/src/surfaces/admin/api/checkout-rules/examples/set-minimum-quantity.jsx +40 -0
- package/src/surfaces/admin/api/checkout-rules/launch-options.ts +22 -10
- package/src/surfaces/admin/api/checkout-rules/metafields.ts +35 -0
- package/src/surfaces/admin/api/checkout-rules/validation-settings.ts +7 -3
- package/src/surfaces/admin/api/customer-segment-template/customer-segment-template.ts +19 -7
- package/src/surfaces/admin/api/customer-segment-template/examples/abandoned-cart-recovery.jsx +30 -0
- package/src/surfaces/admin/api/customer-segment-template/examples/birthday-this-month.jsx +32 -0
- package/src/surfaces/admin/api/customer-segment-template/examples/high-value-customers.jsx +27 -0
- package/src/surfaces/admin/api/discount-function-settings/discount-function-settings.ts +6 -1
- package/src/surfaces/admin/api/discount-function-settings/examples/configure-discount-threshold.jsx +39 -0
- package/src/surfaces/admin/api/discount-function-settings/examples/configure-eligibility-rules.jsx +45 -0
- package/src/surfaces/admin/api/discount-function-settings/examples/load-existing-settings.jsx +45 -0
- package/src/surfaces/admin/api/discount-function-settings/launch-options.ts +30 -12
- package/src/surfaces/admin/api/discount-function-settings/metafields.ts +35 -0
- package/src/surfaces/admin/api/intents/examples/create-article.jsx +35 -0
- package/src/surfaces/admin/api/intents/examples/create-catalog.jsx +35 -0
- package/src/surfaces/admin/api/intents/examples/create-collection.jsx +35 -0
- package/src/surfaces/admin/api/intents/examples/create-customer.jsx +35 -0
- package/src/surfaces/admin/api/intents/examples/create-discount.jsx +35 -0
- package/src/surfaces/admin/api/intents/examples/create-market.jsx +35 -0
- package/src/surfaces/admin/api/intents/examples/create-menu.jsx +35 -0
- package/src/surfaces/admin/api/intents/examples/create-metafield-definition.jsx +35 -0
- package/src/surfaces/admin/api/intents/examples/create-metaobject-definition.jsx +35 -0
- package/src/surfaces/admin/api/intents/examples/create-metaobject.jsx +35 -0
- package/src/surfaces/admin/api/intents/examples/create-page.jsx +35 -0
- package/src/surfaces/admin/api/intents/examples/create-product.jsx +37 -0
- package/src/surfaces/admin/api/intents/examples/create-variant.jsx +35 -0
- package/src/surfaces/admin/api/intents/examples/edit-article.jsx +41 -0
- package/src/surfaces/admin/api/intents/examples/edit-catalog.jsx +41 -0
- package/src/surfaces/admin/api/intents/examples/edit-collection.jsx +41 -0
- package/src/surfaces/admin/api/intents/examples/edit-customer.jsx +41 -0
- package/src/surfaces/admin/api/intents/examples/edit-discount.jsx +41 -0
- package/src/surfaces/admin/api/intents/examples/edit-market.jsx +41 -0
- package/src/surfaces/admin/api/intents/examples/edit-menu.jsx +41 -0
- package/src/surfaces/admin/api/intents/examples/edit-metafield-definition.jsx +41 -0
- package/src/surfaces/admin/api/intents/examples/edit-metaobject-definition.jsx +41 -0
- package/src/surfaces/admin/api/intents/examples/edit-metaobject.jsx +41 -0
- package/src/surfaces/admin/api/intents/examples/edit-page.jsx +41 -0
- package/src/surfaces/admin/api/intents/examples/edit-product.jsx +41 -0
- package/src/surfaces/admin/api/intents/examples/edit-variant.jsx +41 -0
- package/src/surfaces/admin/api/intents/intents.ts +30 -35
- package/src/surfaces/admin/api/order-routing-rule/data.ts +20 -0
- package/src/surfaces/admin/api/order-routing-rule/examples/configure-location-priority.jsx +46 -0
- package/src/surfaces/admin/api/order-routing-rule/examples/remove-deprecated-settings.jsx +35 -0
- package/src/surfaces/admin/api/order-routing-rule/examples/set-routing-criteria.jsx +57 -0
- package/src/surfaces/admin/api/order-routing-rule/metafields.ts +24 -0
- package/src/surfaces/admin/api/order-routing-rule/order-routing-rule.ts +7 -2
- package/src/surfaces/admin/api/picker/examples/direct-api.jsx +42 -0
- package/src/surfaces/admin/api/picker/examples/disabled.jsx +23 -0
- package/src/surfaces/admin/api/picker/examples/minimal.jsx +37 -0
- package/src/surfaces/admin/api/picker/examples/multiple-limit.jsx +26 -0
- package/src/surfaces/admin/api/picker/examples/multiple-true.jsx +25 -0
- package/src/surfaces/admin/api/picker/examples/preselected.jsx +23 -0
- package/src/surfaces/admin/api/picker/examples/template-picker.jsx +58 -0
- package/src/surfaces/admin/api/picker/picker.ts +46 -16
- package/src/surfaces/admin/api/print-action/examples/custom-product-labels.jsx +44 -0
- package/src/surfaces/admin/api/print-action/examples/generate-packing-slip.jsx +28 -0
- package/src/surfaces/admin/api/print-action/examples/shipping-manifest.jsx +58 -0
- package/src/surfaces/admin/api/print-action/print-action.ts +6 -15
- package/src/surfaces/admin/api/product-configuration/examples/create-variant-component.jsx +56 -0
- package/src/surfaces/admin/api/product-configuration/examples/load-bundle-config.jsx +47 -0
- package/src/surfaces/admin/api/product-configuration/examples/load-variant-bundle-config.jsx +54 -0
- package/src/surfaces/admin/api/product-configuration/examples/navigate-to-component.jsx +27 -0
- package/src/surfaces/admin/api/product-configuration/examples/select-bundle-components.jsx +50 -0
- package/src/surfaces/admin/api/product-configuration/examples/select-variant-components.jsx +50 -0
- package/src/surfaces/admin/api/product-configuration/product-details-configuration.ts +36 -6
- package/src/surfaces/admin/api/product-configuration/product-variant-details-configuration.ts +36 -6
- package/src/surfaces/admin/api/purchase-options-card/examples/manage-subscription.jsx +45 -0
- package/src/surfaces/admin/api/purchase-options-card/examples/remove-from-plan.jsx +44 -0
- package/src/surfaces/admin/api/purchase-options-card/examples/validate-selling-plan.jsx +47 -0
- package/src/surfaces/admin/api/purchase-options-card-action.ts +11 -1
- package/src/surfaces/admin/api/resource-picker/examples/action.jsx +25 -0
- package/src/surfaces/admin/api/resource-picker/examples/collection-picker.jsx +22 -0
- package/src/surfaces/admin/api/resource-picker/examples/filter-query.jsx +22 -0
- package/src/surfaces/admin/api/resource-picker/examples/filters.jsx +27 -0
- package/src/surfaces/admin/api/resource-picker/examples/multiple-limited.jsx +25 -0
- package/src/surfaces/admin/api/resource-picker/examples/multiple-unlimited.jsx +25 -0
- package/src/surfaces/admin/api/resource-picker/examples/product-picker.jsx +22 -0
- package/src/surfaces/admin/api/resource-picker/examples/product-variant-picker.jsx +22 -0
- package/src/surfaces/admin/api/resource-picker/examples/query.jsx +25 -0
- package/src/surfaces/admin/api/resource-picker/examples/selection-ids.jsx +28 -0
- package/src/surfaces/admin/api/resource-picker/examples/selection.jsx +22 -0
- package/src/surfaces/admin/api/resource-picker/resource-picker.ts +181 -21
- package/src/surfaces/admin/api/shared.ts +7 -1
- package/src/surfaces/admin/api/should-render/examples/bulk-selection-check.jsx +8 -0
- package/src/surfaces/admin/api/should-render/examples/check-order-status.jsx +7 -0
- package/src/surfaces/admin/api/should-render/examples/check-product-tag.jsx +7 -0
- package/src/surfaces/admin/api/should-render/should-render.ts +8 -1
- package/src/surfaces/admin/api/standard/examples/authenticate-backend-request.jsx +40 -0
- package/src/surfaces/admin/api/standard/examples/persist-settings.jsx +43 -0
- package/src/surfaces/admin/api/standard/examples/query-and-mutate.jsx +75 -0
- package/src/surfaces/admin/api/standard/standard-rendering.ts +18 -0
- package/src/surfaces/admin/api/standard/standard.ts +20 -10
- package/src/surfaces/admin/api/standard/storage.ts +21 -27
- package/src/surfaces/admin/api.ts +1 -0
- package/src/surfaces/admin/components/ActionExtensionComponents.ts +3 -0
- package/src/surfaces/admin/components/BlockExtensionComponents.ts +3 -0
- package/src/surfaces/admin/components/FormExtensionComponents.ts +3 -0
- package/src/surfaces/admin/components/FunctionSettingsComponents.ts +3 -0
- package/src/surfaces/admin/components/PrintActionExtensionComponents.ts +3 -0
- package/src/surfaces/admin/components/StandardComponents.ts +3 -0
- package/src/surfaces/admin/extension-targets.ts +85 -169
- package/src/surfaces/checkout/api/address-autocomplete/standard.ts +5 -0
- package/src/surfaces/checkout/api/checkout/checkout.ts +14 -1
- package/src/surfaces/checkout/api/standard/standard.ts +5 -3
- package/src/surfaces/checkout/preact/metafield.ts +1 -0
- package/src/surfaces/checkout/preact/metafields.ts +1 -0
- package/src/surfaces/point-of-sale/components/EmptyState.d.ts +44 -34
- package/src/surfaces/point-of-sale/components/Stack.d.ts +10 -10
- package/src/surfaces/point-of-sale/components/TextField.d.ts +1 -1
- package/src/surfaces/point-of-sale/components/components-shared.d.ts +3249 -2916
- package/src/surfaces/point-of-sale/components.d.ts +6504 -5829
- package/src/surfaces/admin/api/intents/examples/create-article.js +0 -9
- package/src/surfaces/admin/api/intents/examples/create-catalog.js +0 -9
- package/src/surfaces/admin/api/intents/examples/create-collection.js +0 -9
- package/src/surfaces/admin/api/intents/examples/create-customer.js +0 -9
- package/src/surfaces/admin/api/intents/examples/create-discount.js +0 -11
- package/src/surfaces/admin/api/intents/examples/create-market.js +0 -9
- package/src/surfaces/admin/api/intents/examples/create-menu.js +0 -9
- package/src/surfaces/admin/api/intents/examples/create-metafield-definition.js +0 -11
- package/src/surfaces/admin/api/intents/examples/create-metaobject-definition.js +0 -9
- package/src/surfaces/admin/api/intents/examples/create-metaobject.js +0 -11
- package/src/surfaces/admin/api/intents/examples/create-page.js +0 -9
- package/src/surfaces/admin/api/intents/examples/create-product.js +0 -9
- package/src/surfaces/admin/api/intents/examples/create-variant.js +0 -11
- package/src/surfaces/admin/api/intents/examples/edit-article.js +0 -11
- package/src/surfaces/admin/api/intents/examples/edit-catalog.js +0 -11
- package/src/surfaces/admin/api/intents/examples/edit-collection.js +0 -11
- package/src/surfaces/admin/api/intents/examples/edit-customer.js +0 -11
- package/src/surfaces/admin/api/intents/examples/edit-discount.js +0 -11
- package/src/surfaces/admin/api/intents/examples/edit-market.js +0 -11
- package/src/surfaces/admin/api/intents/examples/edit-menu.js +0 -11
- package/src/surfaces/admin/api/intents/examples/edit-metafield-definition.js +0 -12
- package/src/surfaces/admin/api/intents/examples/edit-metaobject-definition.js +0 -11
- package/src/surfaces/admin/api/intents/examples/edit-metaobject.js +0 -12
- package/src/surfaces/admin/api/intents/examples/edit-page.js +0 -11
- package/src/surfaces/admin/api/intents/examples/edit-product.js +0 -11
- package/src/surfaces/admin/api/intents/examples/edit-variant.js +0 -12
- package/src/surfaces/admin/api/picker/examples/direct-api.js +0 -73
- package/src/surfaces/admin/api/picker/examples/disabled.js +0 -16
- package/src/surfaces/admin/api/picker/examples/minimal.js +0 -16
- package/src/surfaces/admin/api/picker/examples/multiple-limit.js +0 -21
- package/src/surfaces/admin/api/picker/examples/multiple-true.js +0 -21
- package/src/surfaces/admin/api/picker/examples/preselected.js +0 -16
- package/src/surfaces/admin/api/picker/examples/template-picker.js +0 -37
- package/src/surfaces/admin/api/resource-picker/examples/action.js +0 -4
- package/src/surfaces/admin/api/resource-picker/examples/collection-picker.js +0 -1
- package/src/surfaces/admin/api/resource-picker/examples/filter-query.js +0 -6
- package/src/surfaces/admin/api/resource-picker/examples/filters.js +0 -9
- package/src/surfaces/admin/api/resource-picker/examples/multiple-limited.js +0 -4
- package/src/surfaces/admin/api/resource-picker/examples/multiple-unlimited.js +0 -4
- package/src/surfaces/admin/api/resource-picker/examples/product-picker.js +0 -3
- package/src/surfaces/admin/api/resource-picker/examples/product-variant-picker.js +0 -1
- package/src/surfaces/admin/api/resource-picker/examples/query.js +0 -4
- package/src/surfaces/admin/api/resource-picker/examples/selection-ids.js +0 -16
- package/src/surfaces/admin/api/resource-picker/examples/selection.js +0 -7
|
@@ -8,6 +8,7 @@ var metafields = require('./metafields.js');
|
|
|
8
8
|
/**
|
|
9
9
|
* Returns a single filtered `Metafield` or `undefined`.
|
|
10
10
|
* @arg {MetafieldFilter} - filter the list of returned metafields to a single metafield
|
|
11
|
+
* @deprecated `useMetafield` is deprecated. Use `useAppMetafields` with cart metafields instead.
|
|
11
12
|
*/
|
|
12
13
|
function useMetafield(filters) {
|
|
13
14
|
const {
|
|
@@ -11,6 +11,7 @@ var subscription = require('./subscription.js');
|
|
|
11
11
|
* Returns the current array of `metafields` applied to the checkout.
|
|
12
12
|
* You can optionally filter the list.
|
|
13
13
|
* @arg {MetafieldsFilters} - filter the list of returned metafields
|
|
14
|
+
* @deprecated `useMetafields` is deprecated. Use `useAppMetafields` with cart metafields instead.
|
|
14
15
|
*/
|
|
15
16
|
function useMetafields(filters) {
|
|
16
17
|
const metaFields = subscription.useSubscription(api.useApi().metafields);
|
|
@@ -4,6 +4,7 @@ import { useMetafields } from './metafields.mjs';
|
|
|
4
4
|
/**
|
|
5
5
|
* Returns a single filtered `Metafield` or `undefined`.
|
|
6
6
|
* @arg {MetafieldFilter} - filter the list of returned metafields to a single metafield
|
|
7
|
+
* @deprecated `useMetafield` is deprecated. Use `useAppMetafields` with cart metafields instead.
|
|
7
8
|
*/
|
|
8
9
|
function useMetafield(filters) {
|
|
9
10
|
const {
|
|
@@ -7,6 +7,7 @@ import { useSubscription } from './subscription.mjs';
|
|
|
7
7
|
* Returns the current array of `metafields` applied to the checkout.
|
|
8
8
|
* You can optionally filter the list.
|
|
9
9
|
* @arg {MetafieldsFilters} - filter the list of returned metafields
|
|
10
|
+
* @deprecated `useMetafields` is deprecated. Use `useAppMetafields` with cart metafields instead.
|
|
10
11
|
*/
|
|
11
12
|
function useMetafields(filters) {
|
|
12
13
|
const metaFields = useSubscription(useApi().metafields);
|
|
@@ -4,6 +4,7 @@ import { useMetafields } from './metafields.esnext';
|
|
|
4
4
|
/**
|
|
5
5
|
* Returns a single filtered `Metafield` or `undefined`.
|
|
6
6
|
* @arg {MetafieldFilter} - filter the list of returned metafields to a single metafield
|
|
7
|
+
* @deprecated `useMetafield` is deprecated. Use `useAppMetafields` with cart metafields instead.
|
|
7
8
|
*/
|
|
8
9
|
function useMetafield(filters) {
|
|
9
10
|
const {
|
|
@@ -7,6 +7,7 @@ import { useSubscription } from './subscription.esnext';
|
|
|
7
7
|
* Returns the current array of `metafields` applied to the checkout.
|
|
8
8
|
* You can optionally filter the list.
|
|
9
9
|
* @arg {MetafieldsFilters} - filter the list of returned metafields
|
|
10
|
+
* @deprecated `useMetafields` is deprecated. Use `useAppMetafields` with cart metafields instead.
|
|
10
11
|
*/
|
|
11
12
|
function useMetafields(filters) {
|
|
12
13
|
const metaFields = useSubscription(useApi().metafields);
|
package/build/ts/api.d.ts
CHANGED
|
@@ -1,60 +1,57 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* The translation function signature for internationalization. Use this to translate string keys defined in your locale files into localized content for the current user's language.
|
|
3
3
|
*/
|
|
4
4
|
export interface I18nTranslate {
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* Returns a translated string matching a key in a locale file. Use this to display localized text in your extension based on the merchant's language preferences. Supports interpolation with replacement values and pluralization with the `count` option. Returns a string when replacements are primitives, or an array when replacements include UI components.
|
|
7
|
+
*
|
|
8
|
+
* @param key - The translation key from your locale file (for example, "banner.title")
|
|
9
|
+
* @param options - Optional replacement values for interpolation or the special `count` property for pluralization
|
|
7
10
|
*
|
|
8
11
|
* @example translate("banner.title")
|
|
12
|
+
* @example translate("items.count", { count: 5 })
|
|
9
13
|
*/
|
|
10
14
|
<ReplacementType = string>(key: string, options?: Record<string, ReplacementType | string | number>): ReplacementType extends string | number ? string : (string | ReplacementType)[];
|
|
11
15
|
}
|
|
16
|
+
/**
|
|
17
|
+
* Internationalization utilities for formatting and translating content according to the user's locale. Use these methods to display numbers, currency, dates, and translated strings that match the merchant's language and regional preferences.
|
|
18
|
+
*/
|
|
12
19
|
export interface I18n {
|
|
13
20
|
/**
|
|
14
|
-
* Returns a localized number.
|
|
15
|
-
*
|
|
16
|
-
* This function behaves like the standard `Intl.NumberFormat()`
|
|
17
|
-
* with a style of `decimal` applied. It uses the buyer's locale by default.
|
|
21
|
+
* Returns a localized number formatted according to the user's locale. Use this to display numbers like quantities, percentages, or measurements in the appropriate format for the merchant's region. This function behaves like the standard `Intl.NumberFormat()` with a style of `decimal` applied. Uses the current user's locale by default.
|
|
18
22
|
*
|
|
19
|
-
* @param
|
|
23
|
+
* @param number - The number to format
|
|
24
|
+
* @param options.inExtensionLocale - If true, use the extension's default locale instead of the user's locale
|
|
25
|
+
* @param options - Additional Intl.NumberFormatOptions for customizing the number format
|
|
20
26
|
*/
|
|
21
27
|
formatNumber: (number: number | bigint, options?: {
|
|
22
28
|
inExtensionLocale?: boolean;
|
|
23
29
|
} & Intl.NumberFormatOptions) => string;
|
|
24
30
|
/**
|
|
25
|
-
* Returns a localized currency value.
|
|
31
|
+
* Returns a localized currency value formatted according to the user's locale and currency conventions. Use this to display prices, totals, or financial amounts in the appropriate format for the merchant's region. This function behaves like the standard `Intl.NumberFormat()` with a style of `currency` applied. Uses the current user's locale by default.
|
|
26
32
|
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
* @param options.inExtensionLocale - if true, use the extension's locale
|
|
33
|
+
* @param number - The currency amount to format
|
|
34
|
+
* @param options.inExtensionLocale - If true, use the extension's default locale instead of the user's locale
|
|
35
|
+
* @param options - Additional Intl.NumberFormatOptions for customizing the currency format, such as the currency code
|
|
31
36
|
*/
|
|
32
37
|
formatCurrency: (number: number | bigint, options?: {
|
|
33
38
|
inExtensionLocale?: boolean;
|
|
34
39
|
} & Intl.NumberFormatOptions) => string;
|
|
35
40
|
/**
|
|
36
|
-
* Returns a localized date value.
|
|
41
|
+
* Returns a localized date value formatted according to the user's locale and date conventions. Use this to display dates and times in the appropriate format for the merchant's region, such as order dates, timestamps, or schedule information. This function behaves like the standard `Intl.DateTimeFormat()` and uses the current user's locale by default. Formatting options can be passed to customize the date display style.
|
|
37
42
|
*
|
|
38
|
-
*
|
|
39
|
-
* the
|
|
40
|
-
* options.
|
|
43
|
+
* @param date - The Date object to format
|
|
44
|
+
* @param options.inExtensionLocale - If true, use the extension's default locale instead of the user's locale
|
|
45
|
+
* @param options - Additional Intl.DateTimeFormatOptions for customizing the date format
|
|
41
46
|
*
|
|
42
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/
|
|
47
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat
|
|
43
48
|
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat#using_options
|
|
44
|
-
*
|
|
45
|
-
* @param options.inExtensionLocale - if true, use the extension's locale
|
|
46
49
|
*/
|
|
47
50
|
formatDate: (date: Date, options?: {
|
|
48
51
|
inExtensionLocale?: boolean;
|
|
49
52
|
} & Intl.DateTimeFormatOptions) => string;
|
|
50
53
|
/**
|
|
51
|
-
* Returns translated content in the
|
|
52
|
-
* as supported by the extension.
|
|
53
|
-
*
|
|
54
|
-
* - `options.count` is a special numeric value used in pluralization.
|
|
55
|
-
* - The other option keys and values are treated as replacements for interpolation.
|
|
56
|
-
* - If the replacements are all primitives, then `translate()` returns a single string.
|
|
57
|
-
* - If replacements contain UI components, then `translate()` returns an array of elements.
|
|
54
|
+
* Returns translated content in the user's locale, as supported by the extension. Use this to display localized strings from your extension's locale files. The special `options.count` property enables pluralization. Other option keys and values are treated as replacements for interpolation in your translation strings. Returns a single string when replacements are primitives, or an array when replacements contain UI components.
|
|
58
55
|
*/
|
|
59
56
|
translate: I18nTranslate;
|
|
60
57
|
}
|
package/build/ts/api.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/api.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/api.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B;;;;;;;;OAQG;IACH,CAAC,eAAe,GAAG,MAAM,EACvB,GAAG,EAAE,MAAM,EACX,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,GAAG,MAAM,GAAG,MAAM,CAAC,GAC1D,eAAe,SAAS,MAAM,GAAG,MAAM,GACtC,MAAM,GACN,CAAC,MAAM,GAAG,eAAe,CAAC,EAAE,CAAC;CAClC;AAED;;GAEG;AACH,MAAM,WAAW,IAAI;IACnB;;;;;;OAMG;IACH,YAAY,EAAE,CACZ,MAAM,EAAE,MAAM,GAAG,MAAM,EACvB,OAAO,CAAC,EAAE;QAAC,iBAAiB,CAAC,EAAE,OAAO,CAAA;KAAC,GAAG,IAAI,CAAC,mBAAmB,KAC/D,MAAM,CAAC;IAEZ;;;;;;OAMG;IACH,cAAc,EAAE,CACd,MAAM,EAAE,MAAM,GAAG,MAAM,EACvB,OAAO,CAAC,EAAE;QAAC,iBAAiB,CAAC,EAAE,OAAO,CAAA;KAAC,GAAG,IAAI,CAAC,mBAAmB,KAC/D,MAAM,CAAC;IAEZ;;;;;;;;;OASG;IACH,UAAU,EAAE,CACV,IAAI,EAAE,IAAI,EACV,OAAO,CAAC,EAAE;QAAC,iBAAiB,CAAC,EAAE,OAAO,CAAA;KAAC,GAAG,IAAI,CAAC,qBAAqB,KACjE,MAAM,CAAC;IAEZ;;OAEG;IACH,SAAS,EAAE,aAAa,CAAC;CAC1B"}
|
package/build/ts/extension.d.ts
CHANGED
|
@@ -1,10 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Defines the structure of a render extension, which displays UI in the Shopify admin.
|
|
3
|
+
*/
|
|
1
4
|
export interface RenderExtension<Api, ComponentsSet extends string> {
|
|
5
|
+
/**
|
|
6
|
+
* The API object providing access to extension capabilities, data, and methods. The specific API type depends on the extension target and determines what functionality is available to your extension, such as authentication, storage, data access, and GraphQL querying.
|
|
7
|
+
*/
|
|
2
8
|
api: Api;
|
|
9
|
+
/**
|
|
10
|
+
* The set of UI components available for rendering your extension. This defines which Polaris components and custom components can be used to build your extension's interface. The available components vary by extension target.
|
|
11
|
+
*/
|
|
3
12
|
components: ComponentsSet;
|
|
13
|
+
/**
|
|
14
|
+
* The render function output. Your extension's render function should return void or a Promise that resolves to void. Use this to perform any necessary setup, rendering, or async operations when your extension loads.
|
|
15
|
+
*/
|
|
4
16
|
output: void | Promise<void>;
|
|
5
17
|
}
|
|
18
|
+
/**
|
|
19
|
+
* Defines the structure of a runnable extension, which executes logic and returns data without rendering UI.
|
|
20
|
+
*/
|
|
6
21
|
export interface RunnableExtension<Api, Output> {
|
|
22
|
+
/**
|
|
23
|
+
* The API object providing access to extension capabilities and methods. The specific API type depends on the extension target and determines what functionality is available to your extension.
|
|
24
|
+
*/
|
|
7
25
|
api: Api;
|
|
26
|
+
/**
|
|
27
|
+
* The function output. Your extension function should return the expected output type or a Promise that resolves to that type. The output type is determined by your specific extension target and use case.
|
|
28
|
+
*/
|
|
8
29
|
output: Output | Promise<Output>;
|
|
9
30
|
}
|
|
10
31
|
//# sourceMappingURL=extension.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extension.d.ts","sourceRoot":"","sources":["../../src/extension.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe,CAAC,GAAG,EAAE,aAAa,SAAS,MAAM;IAChE,GAAG,EAAE,GAAG,CAAC;IACT,UAAU,EAAE,aAAa,CAAC;IAC1B,MAAM,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC9B;AAED,MAAM,WAAW,iBAAiB,CAAC,GAAG,EAAE,MAAM;IAC5C,GAAG,EAAE,GAAG,CAAC;IACT,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CAClC"}
|
|
1
|
+
{"version":3,"file":"extension.d.ts","sourceRoot":"","sources":["../../src/extension.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,eAAe,CAAC,GAAG,EAAE,aAAa,SAAS,MAAM;IAChE;;OAEG;IACH,GAAG,EAAE,GAAG,CAAC;IACT;;OAEG;IACH,UAAU,EAAE,aAAa,CAAC;IAC1B;;OAEG;IACH,MAAM,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC9B;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB,CAAC,GAAG,EAAE,MAAM;IAC5C;;OAEG;IACH,GAAG,EAAE,GAAG,CAAC;IACT;;OAEG;IACH,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CAClC"}
|
package/build/ts/shared.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* The supported GraphQL Admin API versions. Use this to specify which API version your GraphQL queries should execute against. Each version includes specific features, bug fixes, and breaking changes. The `unstable` version provides access to the latest features but may change without notice.
|
|
3
3
|
*/
|
|
4
4
|
export type ApiVersion = '2023-04' | '2023-07' | '2023-10' | '2024-01' | '2024-04' | '2024-07' | '2024-10' | '2025-01' | '2025-04' | 'unstable' | '2025-07' | '2025-10' | '2026-01';
|
|
5
5
|
/**
|
|
@@ -99,7 +99,7 @@ interface ValidationError {
|
|
|
99
99
|
}
|
|
100
100
|
/**
|
|
101
101
|
* A function that updates a signal and returns a result indicating success or failure.
|
|
102
|
-
* The function is typically used
|
|
102
|
+
* The function is typically used along with a `ReadonlySignalLike` object.
|
|
103
103
|
*/
|
|
104
104
|
export type UpdateSignalFunction<T> = (value: T) => Result<T>;
|
|
105
105
|
export {};
|
|
@@ -1,24 +1,17 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { StandardRenderingExtensionApi } from '../standard/standard-rendering';
|
|
2
2
|
import type { ExtensionTarget as AnyExtensionTarget } from '../../extension-targets';
|
|
3
3
|
import type { Data } from '../shared';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
/**
|
|
5
|
+
* The `ActionExtensionApi` object provides methods for action extensions that render in modal overlays. Access the following properties on the `ActionExtensionApi` object to interact with the current context, control the modal, and display picker dialogs.
|
|
6
|
+
*/
|
|
7
|
+
export interface ActionExtensionApi<ExtensionTarget extends AnyExtensionTarget> extends StandardRenderingExtensionApi<ExtensionTarget> {
|
|
7
8
|
/**
|
|
8
|
-
* Closes the extension.
|
|
9
|
+
* Closes the extension modal. Use this when your extension completes its task or the merchant wants to exit. Equivalent to clicking the close button in the overlay corner.
|
|
9
10
|
*/
|
|
10
11
|
close: () => void;
|
|
11
12
|
/**
|
|
12
|
-
*
|
|
13
|
+
* An array of currently viewed or selected resource identifiers. Use this to access the IDs of items in the current context, such as selected products in an index page or the product being viewed on a details page. The available IDs depend on the extension target and user interactions.
|
|
13
14
|
*/
|
|
14
15
|
data: Data;
|
|
15
|
-
/**
|
|
16
|
-
* Renders the [Resource Picker](resource-picker), allowing users to select a resource for the extension to use as part of its flow.
|
|
17
|
-
*/
|
|
18
|
-
resourcePicker: ResourcePickerApi;
|
|
19
|
-
/**
|
|
20
|
-
* Renders a custom [Picker](picker) dialog allowing users to select values from a list.
|
|
21
|
-
*/
|
|
22
|
-
picker: PickerApi;
|
|
23
16
|
}
|
|
24
17
|
//# sourceMappingURL=action.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/admin/api/action/action.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,
|
|
1
|
+
{"version":3,"file":"action.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/admin/api/action/action.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,6BAA6B,EAAC,MAAM,gCAAgC,CAAC;AAClF,OAAO,KAAK,EAAC,eAAe,IAAI,kBAAkB,EAAC,MAAM,yBAAyB,CAAC;AACnF,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,WAAW,CAAC;AAEpC;;GAEG;AACH,MAAM,WAAW,kBAAkB,CAAC,eAAe,SAAS,kBAAkB,CAC5E,SAAQ,6BAA6B,CAAC,eAAe,CAAC;IACtD;;OAEG;IACH,KAAK,EAAE,MAAM,IAAI,CAAC;IAElB;;OAEG;IACH,IAAI,EAAE,IAAI,CAAC;CACZ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action.doc.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/admin/api/action/action.doc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,6BAA6B,EAAC,MAAM,wBAAwB,CAAC;AAErE,QAAA,MAAM,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"action.doc.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/admin/api/action/action.doc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,6BAA6B,EAAC,MAAM,wBAAwB,CAAC;AAErE,QAAA,MAAM,IAAI,EAAE,6BAuFX,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -1,33 +1,29 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { StandardRenderingExtensionApi } from '../standard/standard-rendering';
|
|
2
2
|
import type { ExtensionTarget as AnyExtensionTarget } from '../../extension-targets';
|
|
3
3
|
import type { Data } from '../shared';
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
/**
|
|
5
|
+
* The `Navigation` object provides methods for navigating between extensions and admin pages.
|
|
6
|
+
*/
|
|
6
7
|
export interface Navigation {
|
|
7
8
|
/**
|
|
8
|
-
*
|
|
9
|
+
* Navigates to a specific extension or admin route. Currently supports navigating from a block extension to an action extension on the same resource page.
|
|
9
10
|
*
|
|
11
|
+
* @param url - The destination URL, typically in the format 'extension://extension-handle' for other extensions
|
|
10
12
|
* @example navigation.navigate('extension://my-admin-action-extension-handle')
|
|
11
13
|
*/
|
|
12
14
|
navigate: (url: string | URL) => void;
|
|
13
15
|
}
|
|
14
|
-
|
|
16
|
+
/**
|
|
17
|
+
* The `BlockExtensionApi` object provides methods for block extensions that render inline content on admin pages. Access the following properties on the `BlockExtensionApi` object to interact with the current context, navigate to other extensions, and display picker dialogs.
|
|
18
|
+
*/
|
|
19
|
+
export interface BlockExtensionApi<ExtensionTarget extends AnyExtensionTarget> extends StandardRenderingExtensionApi<ExtensionTarget> {
|
|
15
20
|
/**
|
|
16
|
-
*
|
|
21
|
+
* An array of currently viewed or selected resource identifiers. Use this to access the IDs of items in the current context, such as selected products in an index page or the product being viewed on a details page. The available IDs depend on the extension target and user interactions.
|
|
17
22
|
*/
|
|
18
23
|
data: Data;
|
|
19
24
|
/**
|
|
20
|
-
*
|
|
21
|
-
* For example, you can navigate from an admin block on the product details page (`admin.product-details.block.render`) to an admin action on the product details page (`admin.product-details.action.render`).
|
|
25
|
+
* Navigates to other extensions or admin pages. Currently supports navigation from a block to an action extension on the same resource page. For example, navigate from a product details block (`admin.product-details.block.render`) to a product details action (`admin.product-details.action.render`).
|
|
22
26
|
*/
|
|
23
27
|
navigation: Navigation;
|
|
24
|
-
/**
|
|
25
|
-
* Renders the [Resource Picker](resource-picker), allowing users to select a resource for the extension to use as part of its flow.
|
|
26
|
-
*/
|
|
27
|
-
resourcePicker: ResourcePickerApi;
|
|
28
|
-
/**
|
|
29
|
-
* Renders a custom [Picker](picker) dialog allowing users to select values from a list.
|
|
30
|
-
*/
|
|
31
|
-
picker: PickerApi;
|
|
32
28
|
}
|
|
33
29
|
//# sourceMappingURL=block.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"block.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/admin/api/block/block.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,
|
|
1
|
+
{"version":3,"file":"block.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/admin/api/block/block.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,6BAA6B,EAAC,MAAM,gCAAgC,CAAC;AAClF,OAAO,KAAK,EAAC,eAAe,IAAI,kBAAkB,EAAC,MAAM,yBAAyB,CAAC;AACnF,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,WAAW,CAAC;AAEpC;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB;;;;;OAKG;IACH,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,KAAK,IAAI,CAAC;CACvC;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB,CAAC,eAAe,SAAS,kBAAkB,CAC3E,SAAQ,6BAA6B,CAAC,eAAe,CAAC;IACtD;;OAEG;IACH,IAAI,EAAE,IAAI,CAAC;IAEX;;OAEG;IACH,UAAU,EAAE,UAAU,CAAC;CACxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"block.doc.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/admin/api/block/block.doc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,6BAA6B,EAAC,MAAM,wBAAwB,CAAC;AAErE,QAAA,MAAM,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"block.doc.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/admin/api/block/block.doc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,6BAA6B,EAAC,MAAM,wBAAwB,CAAC;AAErE,QAAA,MAAM,IAAI,EAAE,6BAqFX,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -1,32 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A [metafield](/docs/apps/build/metafields) that stores validation function configuration data. Use metafields to persist settings that control how your validation function behaves, such as minimum quantities, restricted shipping zones, or custom validation rules.
|
|
3
|
+
*/
|
|
1
4
|
interface Metafield {
|
|
5
|
+
/** A human-readable description explaining the metafield's purpose and how it affects validation behavior. Use this to document your settings for other developers. */
|
|
2
6
|
description?: string;
|
|
7
|
+
/** The unique global identifier (GID) for this metafield. Use this ID to reference the metafield in GraphQL queries or updates. */
|
|
3
8
|
id: string;
|
|
9
|
+
/** The namespace that organizes related metafields together. All metafields for a validation should use a consistent namespace to group related settings. */
|
|
4
10
|
namespace: string;
|
|
11
|
+
/** The unique key identifying this metafield within its namespace. This key determines how you access the metafield value (for example, `'min_quantity'` or `'blocked_countries'`). */
|
|
5
12
|
key: string;
|
|
13
|
+
/** The metafield value stored as a string. Parse this value according to the metafield type to use it in your settings UI. */
|
|
6
14
|
value: string;
|
|
15
|
+
/** The metafield [definition type](/docs/apps/build/metafields/list-of-data-types) that specifies the value format and validation rules. Use this to determine how to parse and display the value. */
|
|
7
16
|
type: string;
|
|
8
17
|
}
|
|
18
|
+
/**
|
|
19
|
+
* A validation configuration that exists and is active in the shop. Use this object to access the validation's current settings and metafields when merchants edit an existing validation.
|
|
20
|
+
*/
|
|
9
21
|
interface Validation {
|
|
10
|
-
/**
|
|
11
|
-
* the validation's gid when active in a shop
|
|
12
|
-
*/
|
|
22
|
+
/** The validation's unique global identifier (GID). Use this ID to reference the validation in GraphQL operations or when saving updated settings. */
|
|
13
23
|
id: string;
|
|
14
|
-
/**
|
|
15
|
-
* the metafields owned by the validation
|
|
16
|
-
*/
|
|
24
|
+
/** An array of [metafields](/docs/apps/build/metafields) that store the validation's configuration values. Use these metafields to populate your settings UI with the current validation configuration. */
|
|
17
25
|
metafields: Metafield[];
|
|
18
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* A [Shopify Function](/docs/apps/build/functions) that implements cart and checkout validation logic. This identifies which function the settings interface is configuring.
|
|
29
|
+
*/
|
|
19
30
|
interface ShopifyFunction {
|
|
20
|
-
/**
|
|
21
|
-
* the validation function's unique identifier
|
|
22
|
-
*/
|
|
31
|
+
/** The [Shopify Function's](/docs/apps/build/functions) unique global identifier (GID). Use this ID to associate settings changes with the correct function. */
|
|
23
32
|
id: string;
|
|
24
33
|
}
|
|
25
34
|
/**
|
|
26
|
-
* The object
|
|
35
|
+
* The `data` object exposed to validation settings extensions in the `admin.settings.validation.render` target. Use this to access the current validation configuration and populate your settings interface with existing values.
|
|
27
36
|
*/
|
|
28
37
|
export interface ValidationData {
|
|
38
|
+
/** The validation configuration containing the validation ID and metafields. Present when editing an existing validation, absent when creating a new validation. Use the presence of this value to determine if you're in create or edit mode. */
|
|
29
39
|
validation?: Validation;
|
|
40
|
+
/** The [Shopify Function](/docs/apps/build/functions) that implements the validation logic. Use this ID to associate configuration changes with the correct function. */
|
|
30
41
|
shopifyFunction: ShopifyFunction;
|
|
31
42
|
}
|
|
32
43
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"launch-options.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/admin/api/checkout-rules/launch-options.ts"],"names":[],"mappings":"AAAA,UAAU,SAAS;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd;
|
|
1
|
+
{"version":3,"file":"launch-options.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/admin/api/checkout-rules/launch-options.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,UAAU,SAAS;IACjB,uKAAuK;IACvK,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mIAAmI;IACnI,EAAE,EAAE,MAAM,CAAC;IACX,6JAA6J;IAC7J,SAAS,EAAE,MAAM,CAAC;IAClB,uLAAuL;IACvL,GAAG,EAAE,MAAM,CAAC;IACZ,8HAA8H;IAC9H,KAAK,EAAE,MAAM,CAAC;IACd,sMAAsM;IACtM,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,UAAU,UAAU;IAClB,sJAAsJ;IACtJ,EAAE,EAAE,MAAM,CAAC;IACX,2MAA2M;IAC3M,UAAU,EAAE,SAAS,EAAE,CAAC;CACzB;AAED;;GAEG;AACH,UAAU,eAAe;IACvB,gKAAgK;IAChK,EAAE,EAAE,MAAM,CAAC;CACZ;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,kPAAkP;IAClP,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,yKAAyK;IACzK,eAAe,EAAE,eAAe,CAAC;CAClC"}
|
|
@@ -1,25 +1,57 @@
|
|
|
1
1
|
import { SupportedDefinitionType } from '../shared';
|
|
2
|
+
/**
|
|
3
|
+
* A metafield update or creation operation. Use this to set or modify metafield values that store validation function configuration data.
|
|
4
|
+
*/
|
|
2
5
|
interface MetafieldUpdateChange {
|
|
6
|
+
/** Identifies this as an update operation. Always set to `'updateMetafield'` for updates. */
|
|
3
7
|
type: 'updateMetafield';
|
|
8
|
+
/** The unique key identifying the metafield within its namespace. Use descriptive keys that indicate the setting's purpose (for example, `'min_quantity'` or `'shipping_restriction'`). */
|
|
4
9
|
key: string;
|
|
10
|
+
/** The namespace that organizes related metafields. When omitted, a default namespace is assigned. Use consistent namespaces to group related settings. */
|
|
5
11
|
namespace?: string;
|
|
12
|
+
/** The metafield value to store. Can be a string or number depending on your configuration needs. */
|
|
6
13
|
value: string | number;
|
|
14
|
+
/** The [data type](/docs/apps/build/metafields/list-of-data-types) that defines how the value is formatted and validated. When omitted, preserves the existing type for updates or uses a default for new metafields. Choose a type that matches your value format. */
|
|
7
15
|
valueType?: SupportedDefinitionType;
|
|
8
16
|
}
|
|
17
|
+
/**
|
|
18
|
+
* A metafield removal operation. Use this to delete metafields that are no longer needed for your validation configuration.
|
|
19
|
+
*/
|
|
9
20
|
interface MetafieldRemoveChange {
|
|
21
|
+
/** Identifies this as a removal operation. Always set to `'removeMetafield'` for deletions. */
|
|
10
22
|
type: 'removeMetafield';
|
|
23
|
+
/** The unique key of the metafield to remove. Must match the key used when the metafield was created. */
|
|
11
24
|
key: string;
|
|
25
|
+
/** The namespace containing the metafield to remove. Required to ensure the correct metafield is targeted, as the same key can exist in different namespaces. */
|
|
12
26
|
namespace: string;
|
|
13
27
|
}
|
|
28
|
+
/**
|
|
29
|
+
* A metafield change operation that can either update or remove a metafield. Pass this to `applyMetafieldChange` to modify validation settings stored in metafields.
|
|
30
|
+
*/
|
|
14
31
|
type MetafieldChange = MetafieldUpdateChange | MetafieldRemoveChange;
|
|
32
|
+
/**
|
|
33
|
+
* A failed metafield change operation result. Use the error message to understand what went wrong and fix the issue, such as validation errors, permission problems, or invalid metafield types.
|
|
34
|
+
*/
|
|
15
35
|
interface MetafieldChangeResultError {
|
|
36
|
+
/** Indicates the operation failed. Check this value to determine if you need to handle an error. */
|
|
16
37
|
type: 'error';
|
|
38
|
+
/** A human-readable error message explaining why the operation failed. Use this to debug issues or display feedback to merchants. */
|
|
17
39
|
message: string;
|
|
18
40
|
}
|
|
41
|
+
/**
|
|
42
|
+
* A successful metafield change operation result. The metafield was updated or removed as requested and the changes are now saved.
|
|
43
|
+
*/
|
|
19
44
|
interface MetafieldChangeSuccess {
|
|
45
|
+
/** Indicates the operation succeeded. When this value is `'success'`, the metafield change was applied successfully. */
|
|
20
46
|
type: 'success';
|
|
21
47
|
}
|
|
48
|
+
/**
|
|
49
|
+
* The result returned after attempting to change a metafield. Check the `type` property to determine if the operation succeeded (`'success'`) or failed (`'error'`), then handle the result appropriately in your extension.
|
|
50
|
+
*/
|
|
22
51
|
type MetafieldChangeResult = MetafieldChangeSuccess | MetafieldChangeResultError;
|
|
52
|
+
/**
|
|
53
|
+
* A function that applies metafield changes to validation settings. Call this function with an update or removal operation, then await the Promise to receive a result indicating success or failure. Use the result to provide feedback or handle errors in your settings interface.
|
|
54
|
+
*/
|
|
23
55
|
export type ApplyMetafieldChange = (change: MetafieldChange) => Promise<MetafieldChangeResult>;
|
|
24
56
|
export {};
|
|
25
57
|
//# sourceMappingURL=metafields.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metafields.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/admin/api/checkout-rules/metafields.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,uBAAuB,EAAC,MAAM,WAAW,CAAC;AAElD,UAAU,qBAAqB;IAC7B,IAAI,EAAE,iBAAiB,CAAC;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,uBAAuB,CAAC;CACrC;AAED,UAAU,qBAAqB;IAC7B,IAAI,EAAE,iBAAiB,CAAC;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,KAAK,eAAe,GAAG,qBAAqB,GAAG,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"metafields.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/admin/api/checkout-rules/metafields.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,uBAAuB,EAAC,MAAM,WAAW,CAAC;AAElD;;GAEG;AACH,UAAU,qBAAqB;IAC7B,6FAA6F;IAC7F,IAAI,EAAE,iBAAiB,CAAC;IACxB,2LAA2L;IAC3L,GAAG,EAAE,MAAM,CAAC;IACZ,2JAA2J;IAC3J,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qGAAqG;IACrG,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,uQAAuQ;IACvQ,SAAS,CAAC,EAAE,uBAAuB,CAAC;CACrC;AAED;;GAEG;AACH,UAAU,qBAAqB;IAC7B,+FAA+F;IAC/F,IAAI,EAAE,iBAAiB,CAAC;IACxB,yGAAyG;IACzG,GAAG,EAAE,MAAM,CAAC;IACZ,iKAAiK;IACjK,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,KAAK,eAAe,GAAG,qBAAqB,GAAG,qBAAqB,CAAC;AAErE;;GAEG;AACH,UAAU,0BAA0B;IAClC,oGAAoG;IACpG,IAAI,EAAE,OAAO,CAAC;IACd,qIAAqI;IACrI,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,UAAU,sBAAsB;IAC9B,wHAAwH;IACxH,IAAI,EAAE,SAAS,CAAC;CACjB;AAED;;GAEG;AACH,KAAK,qBAAqB,GACtB,sBAAsB,GACtB,0BAA0B,CAAC;AAE/B;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,CACjC,MAAM,EAAE,eAAe,KACpB,OAAO,CAAC,qBAAqB,CAAC,CAAC"}
|
|
@@ -1,12 +1,16 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { StandardRenderingExtensionApi } from '../standard/standard-rendering';
|
|
2
2
|
import type { ExtensionTarget as AnyExtensionTarget } from '../../extension-targets';
|
|
3
3
|
import { ApplyMetafieldChange } from './metafields';
|
|
4
4
|
import { ValidationData } from './launch-options';
|
|
5
|
-
|
|
5
|
+
/**
|
|
6
|
+
* The `ValidationSettingsApi` object provides methods for configuring cart and checkout validation functions. Access the following properties on the `ValidationSettingsApi` object to manage validation settings and metafields.
|
|
7
|
+
*/
|
|
8
|
+
export interface ValidationSettingsApi<ExtensionTarget extends AnyExtensionTarget> extends StandardRenderingExtensionApi<ExtensionTarget> {
|
|
6
9
|
/**
|
|
7
|
-
*
|
|
10
|
+
* Updates or removes [metafields](/docs/apps/build/metafields) that store validation function configuration. Use this to save merchant settings for your validation function.
|
|
8
11
|
*/
|
|
9
12
|
applyMetafieldChange: ApplyMetafieldChange;
|
|
13
|
+
/** The validation being configured and its associated [metafields](/docs/apps/build/metafields) storing function settings. */
|
|
10
14
|
data: ValidationData;
|
|
11
15
|
}
|
|
12
16
|
//# sourceMappingURL=validation-settings.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation-settings.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/admin/api/checkout-rules/validation-settings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,
|
|
1
|
+
{"version":3,"file":"validation-settings.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/admin/api/checkout-rules/validation-settings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,6BAA6B,EAAC,MAAM,gCAAgC,CAAC;AAClF,OAAO,KAAK,EAAC,eAAe,IAAI,kBAAkB,EAAC,MAAM,yBAAyB,CAAC;AAEnF,OAAO,EAAC,oBAAoB,EAAC,MAAM,cAAc,CAAC;AAClD,OAAO,EAAC,cAAc,EAAC,MAAM,kBAAkB,CAAC;AAEhD;;GAEG;AACH,MAAM,WAAW,qBAAqB,CACpC,eAAe,SAAS,kBAAkB,CAC1C,SAAQ,6BAA6B,CAAC,eAAe,CAAC;IACtD;;OAEG;IACH,oBAAoB,EAAE,oBAAoB,CAAC;IAC3C,8HAA8H;IAC9H,IAAI,EAAE,cAAc,CAAC;CACtB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation-settings.doc.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/admin/api/checkout-rules/validation-settings.doc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,6BAA6B,EAAC,MAAM,wBAAwB,CAAC;AAErE,QAAA,MAAM,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"validation-settings.doc.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/admin/api/checkout-rules/validation-settings.doc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,6BAA6B,EAAC,MAAM,wBAAwB,CAAC;AAErE,QAAA,MAAM,IAAI,EAAE,6BA2FX,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
package/build/ts/surfaces/admin/api/customer-segment-template/customer-segment-template.d.ts
CHANGED
|
@@ -1,38 +1,50 @@
|
|
|
1
1
|
import type { StandardApi } from '../standard/standard';
|
|
2
2
|
import type { I18n } from '../../../../api';
|
|
3
3
|
import type { ExtensionTarget as AnyExtensionTarget } from '../../extension-targets';
|
|
4
|
+
/**
|
|
5
|
+
* The `CustomerSegmentTemplateApi` object provides methods for creating customer segment templates. Access the following properties on the `CustomerSegmentTemplateApi` object to build templates with translated content.
|
|
6
|
+
*/
|
|
4
7
|
export interface CustomerSegmentTemplateApi<ExtensionTarget extends AnyExtensionTarget> extends StandardApi<ExtensionTarget> {
|
|
8
|
+
/** Utilities for translating template content into the merchant's language. */
|
|
5
9
|
i18n: I18n;
|
|
6
10
|
/** @private */
|
|
7
11
|
__enabledFeatures: string[];
|
|
8
12
|
}
|
|
13
|
+
/**
|
|
14
|
+
* Standard customer metafields that can be referenced as template dependencies.
|
|
15
|
+
*/
|
|
9
16
|
export type CustomerStandardMetafieldDependency = 'facts.birth_date';
|
|
17
|
+
/**
|
|
18
|
+
* Defines a customer segment template that merchants can use to create targeted customer groups.
|
|
19
|
+
*/
|
|
10
20
|
export interface CustomerSegmentTemplate {
|
|
11
21
|
/**
|
|
12
|
-
* The
|
|
22
|
+
* The template title in the merchant's language.
|
|
13
23
|
*/
|
|
14
24
|
title: string;
|
|
15
25
|
/**
|
|
16
|
-
* The
|
|
26
|
+
* The template description in the merchant's language. Use an array for multiple paragraphs.
|
|
17
27
|
*/
|
|
18
28
|
description: string | string[];
|
|
19
29
|
/**
|
|
20
|
-
* The code
|
|
30
|
+
* The segment query code to display in the template with syntax highlighting. This code is shown to merchants but not validated. Test your queries in the Shopify admin segment editor before including them in templates.
|
|
21
31
|
*/
|
|
22
32
|
query: string;
|
|
23
33
|
/**
|
|
24
|
-
* The code
|
|
34
|
+
* The segment query code to insert when the merchant selects this template. If omitted, the `query` value is used instead. This code is inserted into the editor but not validated. Test your queries in the Shopify admin segment editor before including them in templates.
|
|
25
35
|
*/
|
|
26
36
|
queryToInsert: string;
|
|
27
37
|
/**
|
|
28
|
-
*
|
|
38
|
+
* Customer metafields required by this template's query. Declare dependencies so the admin can guide merchants to set up required metafields before using the template.
|
|
29
39
|
*/
|
|
30
40
|
dependencies?: {
|
|
41
|
+
/** Standard Shopify customer metafields used in the query. */
|
|
31
42
|
standardMetafields?: CustomerStandardMetafieldDependency[];
|
|
43
|
+
/** Custom [metafield](/docs/apps/build/metafields) definitions used in the query. */
|
|
32
44
|
customMetafields?: string[];
|
|
33
45
|
};
|
|
34
46
|
/**
|
|
35
|
-
*
|
|
47
|
+
* The creation date in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. Templates created within the last month display a "New" badge.
|
|
36
48
|
*/
|
|
37
49
|
createdOn: string;
|
|
38
50
|
}
|
package/build/ts/surfaces/admin/api/customer-segment-template/customer-segment-template.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customer-segment-template.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/admin/api/customer-segment-template/customer-segment-template.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,sBAAsB,CAAC;AACtD,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,iBAAiB,CAAC;AAC1C,OAAO,KAAK,EAAC,eAAe,IAAI,kBAAkB,EAAC,MAAM,yBAAyB,CAAC;AAEnF,MAAM,WAAW,0BAA0B,CACzC,eAAe,SAAS,kBAAkB,CAC1C,SAAQ,WAAW,CAAC,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"customer-segment-template.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/admin/api/customer-segment-template/customer-segment-template.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,sBAAsB,CAAC;AACtD,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,iBAAiB,CAAC;AAC1C,OAAO,KAAK,EAAC,eAAe,IAAI,kBAAkB,EAAC,MAAM,yBAAyB,CAAC;AAEnF;;GAEG;AACH,MAAM,WAAW,0BAA0B,CACzC,eAAe,SAAS,kBAAkB,CAC1C,SAAQ,WAAW,CAAC,eAAe,CAAC;IACpC,+EAA+E;IAC/E,IAAI,EAAE,IAAI,CAAC;IACX,eAAe;IACf,iBAAiB,EAAE,MAAM,EAAE,CAAC;CAC7B;AAED;;GAEG;AACH,MAAM,MAAM,mCAAmC,GAAG,kBAAkB,CAAC;AAErE;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,WAAW,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC/B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,YAAY,CAAC,EAAE;QACb,8DAA8D;QAC9D,kBAAkB,CAAC,EAAE,mCAAmC,EAAE,CAAC;QAC3D,qFAAqF;QACrF,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;KAC7B,CAAC;IACF;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB"}
|
package/build/ts/surfaces/admin/api/customer-segment-template/customer-segment-template.doc.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customer-segment-template.doc.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/admin/api/customer-segment-template/customer-segment-template.doc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,6BAA6B,EAAC,MAAM,wBAAwB,CAAC;AAErE,QAAA,MAAM,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"customer-segment-template.doc.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/admin/api/customer-segment-template/customer-segment-template.doc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,6BAA6B,EAAC,MAAM,wBAAwB,CAAC;AAErE,QAAA,MAAM,IAAI,EAAE,6BAqFX,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
package/build/ts/surfaces/admin/api/discount-function-settings/discount-function-settings.d.ts
CHANGED
|
@@ -2,12 +2,17 @@ import type { BlockExtensionApi } from '../block/block';
|
|
|
2
2
|
import type { ExtensionTarget as AnyExtensionTarget } from '../../extension-targets';
|
|
3
3
|
import { ApplyMetafieldChange } from './metafields';
|
|
4
4
|
import { DiscountFunctionSettingsData, DiscountsApi } from './launch-options';
|
|
5
|
+
/**
|
|
6
|
+
* The `DiscountFunctionSettingsApi` object provides methods for configuring discount functions. Access the following properties on the `DiscountFunctionSettingsApi` object to manage function settings and metafields.
|
|
7
|
+
*/
|
|
5
8
|
export interface DiscountFunctionSettingsApi<ExtensionTarget extends AnyExtensionTarget> extends Omit<BlockExtensionApi<ExtensionTarget>, 'data'> {
|
|
6
9
|
/**
|
|
7
|
-
*
|
|
10
|
+
* Updates or removes [metafields](/docs/apps/build/metafields) that store discount function configuration. Use this to save merchant settings for your discount function.
|
|
8
11
|
*/
|
|
9
12
|
applyMetafieldChange: ApplyMetafieldChange;
|
|
13
|
+
/** The discount being configured and its associated [metafields](/docs/apps/build/metafields) storing function settings. */
|
|
10
14
|
data: DiscountFunctionSettingsData;
|
|
15
|
+
/** The `discounts` object provides reactive access to discount configuration, including discount classes and the discount method. Use the signals to read current values and the update functions to modify discount classes in your settings UI. These values automatically update when changed by the merchant or system. */
|
|
11
16
|
discounts: DiscountsApi;
|
|
12
17
|
}
|
|
13
18
|
//# sourceMappingURL=discount-function-settings.d.ts.map
|
package/build/ts/surfaces/admin/api/discount-function-settings/discount-function-settings.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discount-function-settings.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/admin/api/discount-function-settings/discount-function-settings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,gBAAgB,CAAC;AACtD,OAAO,KAAK,EAAC,eAAe,IAAI,kBAAkB,EAAC,MAAM,yBAAyB,CAAC;AAEnF,OAAO,EAAC,oBAAoB,EAAC,MAAM,cAAc,CAAC;AAClD,OAAO,EAAC,4BAA4B,EAAE,YAAY,EAAC,MAAM,kBAAkB,CAAC;AAE5E,MAAM,WAAW,2BAA2B,CAC1C,eAAe,SAAS,kBAAkB,CAC1C,SAAQ,IAAI,CAAC,iBAAiB,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC;IACxD;;OAEG;IACH,oBAAoB,EAAE,oBAAoB,CAAC;IAC3C,IAAI,EAAE,4BAA4B,CAAC;IACnC,SAAS,EAAE,YAAY,CAAC;CACzB"}
|
|
1
|
+
{"version":3,"file":"discount-function-settings.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/admin/api/discount-function-settings/discount-function-settings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,gBAAgB,CAAC;AACtD,OAAO,KAAK,EAAC,eAAe,IAAI,kBAAkB,EAAC,MAAM,yBAAyB,CAAC;AAEnF,OAAO,EAAC,oBAAoB,EAAC,MAAM,cAAc,CAAC;AAClD,OAAO,EAAC,4BAA4B,EAAE,YAAY,EAAC,MAAM,kBAAkB,CAAC;AAE5E;;GAEG;AACH,MAAM,WAAW,2BAA2B,CAC1C,eAAe,SAAS,kBAAkB,CAC1C,SAAQ,IAAI,CAAC,iBAAiB,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC;IACxD;;OAEG;IACH,oBAAoB,EAAE,oBAAoB,CAAC;IAC3C,4HAA4H;IAC5H,IAAI,EAAE,4BAA4B,CAAC;IACnC,+TAA+T;IAC/T,SAAS,EAAE,YAAY,CAAC;CACzB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discount-function-settings.doc.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/admin/api/discount-function-settings/discount-function-settings.doc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,6BAA6B,EAAC,MAAM,wBAAwB,CAAC;AAErE,QAAA,MAAM,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"discount-function-settings.doc.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/admin/api/discount-function-settings/discount-function-settings.doc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,6BAA6B,EAAC,MAAM,wBAAwB,CAAC;AAErE,QAAA,MAAM,IAAI,EAAE,6BA0FX,CAAC;AAEF,eAAe,IAAI,CAAC"}
|