@ikas/bp-storefront 1.4.0-beta.23 → 1.4.0-beta.230

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.
Files changed (137) hide show
  1. package/dist/analytics/analytics-functions/addToCart.js +1 -1
  2. package/dist/analytics/analytics-functions/addToWishlist.js +1 -1
  3. package/dist/analytics/analytics-functions/completeRegistration.js +1 -1
  4. package/dist/analytics/analytics-functions/contactForm.js +1 -1
  5. package/dist/analytics/analytics-functions/createEmailSubscription.js +1 -1
  6. package/dist/analytics/analytics-functions/customerLogin.js +1 -1
  7. package/dist/analytics/analytics-functions/customerLogout.js +1 -1
  8. package/dist/analytics/analytics-functions/customerVisit.js +1 -1
  9. package/dist/analytics/analytics-functions/pageView.js +1 -1
  10. package/dist/analytics/analytics-functions/productView.js +1 -1
  11. package/dist/analytics/analytics-functions/removeFromCart.js +1 -1
  12. package/dist/analytics/analytics-functions/search.js +1 -1
  13. package/dist/analytics/analytics-functions/viewBrand.js +1 -1
  14. package/dist/analytics/analytics-functions/viewCart.js +1 -1
  15. package/dist/analytics/analytics-functions/viewCategory.js +1 -1
  16. package/dist/analytics/analytics-functions/viewListing.js +1 -1
  17. package/dist/analytics/analytics-functions/viewSearchResults.js +1 -1
  18. package/dist/analytics/analytics-functions/viewStorefrontPopup.js +1 -1
  19. package/dist/analytics/events.d.ts +8 -0
  20. package/dist/analytics/events.js +1 -1
  21. package/dist/analytics/ikas/analytics.js +1 -1
  22. package/dist/analytics/openai/addToCart.d.ts +2 -0
  23. package/dist/analytics/openai/addToCart.js +1 -0
  24. package/dist/analytics/openai/completeRegistration.d.ts +1 -0
  25. package/dist/analytics/openai/completeRegistration.js +1 -0
  26. package/dist/analytics/openai/contactForm.d.ts +1 -0
  27. package/dist/analytics/openai/contactForm.js +1 -0
  28. package/dist/analytics/openai/initAdvancedMatching.d.ts +12 -0
  29. package/dist/analytics/openai/initAdvancedMatching.js +1 -0
  30. package/dist/analytics/openai/pageView.d.ts +1 -0
  31. package/dist/analytics/openai/pageView.js +1 -0
  32. package/dist/analytics/openai/productView.d.ts +2 -0
  33. package/dist/analytics/openai/productView.js +1 -0
  34. package/dist/analytics/openai/utils.d.ts +26 -0
  35. package/dist/analytics/openai/utils.js +1 -0
  36. package/dist/analytics/utils.d.ts +1 -0
  37. package/dist/analytics/utils.js +1 -1
  38. package/dist/functions/api/cart/index.d.ts +2 -0
  39. package/dist/functions/api/cart/index.js +1 -1
  40. package/dist/functions/api/customer/index.d.ts +12 -2
  41. package/dist/functions/api/customer/index.js +1 -1
  42. package/dist/functions/api/loyalty/index.d.ts +2 -1
  43. package/dist/functions/api/loyalty/index.js +1 -1
  44. package/dist/functions/api/product/index.js +1 -1
  45. package/dist/functions/models/attribute-detail/index.d.ts +3 -0
  46. package/dist/functions/models/attribute-list/index.d.ts +3 -0
  47. package/dist/functions/models/image/index.d.ts +71 -21
  48. package/dist/functions/models/image/index.js +1 -1
  49. package/dist/functions/models/index.d.ts +1 -0
  50. package/dist/functions/models/order/index.d.ts +139 -4
  51. package/dist/functions/models/order/index.js +1 -1
  52. package/dist/functions/models/product/attribute-value/index.d.ts +5 -0
  53. package/dist/functions/models/product/index.d.ts +22 -0
  54. package/dist/functions/models/product/index.js +1 -1
  55. package/dist/functions/models/product/variant/index.d.ts +96 -6
  56. package/dist/functions/models/product/variant/index.js +1 -1
  57. package/dist/functions/models/product-list/index.d.ts +21 -0
  58. package/dist/functions/models/product-list/index.js +1 -1
  59. package/dist/functions/models/validator/address/index.d.ts +70 -2
  60. package/dist/functions/models/validator/deactivate-customer/index.d.ts +54 -0
  61. package/dist/functions/models/validator/deactivate-customer/index.js +1 -0
  62. package/dist/functions/stores/base/index.d.ts +75 -0
  63. package/dist/functions/stores/base/index.js +1 -1
  64. package/dist/functions/stores/cart/index.d.ts +46 -2
  65. package/dist/functions/stores/cart/index.js +1 -1
  66. package/dist/functions/stores/customer/index.d.ts +349 -29
  67. package/dist/functions/stores/customer/index.js +1 -1
  68. package/dist/i18n/ikas-texts.d.ts +425 -0
  69. package/dist/i18n/index.d.ts +19 -0
  70. package/dist/index.d.ts +5 -1
  71. package/dist/index.js +1 -1
  72. package/dist/packages/storefront-api/src/__api/mutations/removeGiftCardFromCart.js +1 -0
  73. package/dist/packages/storefront-api/src/__api/mutations/unlinkExternalAccount.js +1 -0
  74. package/dist/packages/storefront-api/src/__api/queries/getExternalAccountLink.js +1 -0
  75. package/dist/packages/storefront-api/src/__api/queries/getLoyaltyProgram.js +1 -0
  76. package/dist/packages/storefront-api/src/__api/queries/getMilesSmilesDetails.js +1 -0
  77. package/dist/packages/storefront-api/src/__api/queries/getRefundableLines.js +1 -0
  78. package/dist/packages/storefront-api/src/__api/queries/listOrderTransactionsWithPrices.js +1 -0
  79. package/dist/packages/storefront-api-client/src/utils/api.js +1 -1
  80. package/dist/packages/storefront-config/src/index.js +1 -1
  81. package/dist/packages/storefront-config/src/theme-globals.js +1 -0
  82. package/dist/router/index.d.ts +28 -0
  83. package/dist/router/index.js +1 -1
  84. package/dist/storefront-api/src/__api/mutations/removeGiftCardFromCart.d.ts +7 -0
  85. package/dist/storefront-api/src/__api/mutations/unlinkExternalAccount.d.ts +6 -0
  86. package/dist/storefront-api/src/__api/queries/getExternalAccountLink.d.ts +6 -0
  87. package/dist/storefront-api/src/__api/queries/getLoyaltyProgram.d.ts +3 -0
  88. package/dist/storefront-api/src/__api/queries/getMilesSmilesDetails.d.ts +3 -0
  89. package/dist/storefront-api/src/__api/queries/getRefundableLines.d.ts +6 -0
  90. package/dist/storefront-api/src/__api/queries/listOrderTransactionsWithPrices.d.ts +6 -0
  91. package/dist/storefront-api/src/__api/types/index.d.ts +101 -6
  92. package/dist/storefront-api-client/src/utils/api.d.ts +7 -0
  93. package/dist/storefront-config/src/index.d.ts +32 -0
  94. package/dist/storefront-config/src/theme-globals.d.ts +349 -0
  95. package/dist/storefront-models/src/index.d.ts +8 -0
  96. package/dist/storefront-models/src/models/blueprint/prop-value/attribute-list.d.ts +2 -0
  97. package/dist/storefront-models/src/models/blueprint/prop-value/attribute.d.ts +2 -0
  98. package/dist/storefront-models/src/models/blueprint/prop-value/color.d.ts +2 -0
  99. package/dist/storefront-models/src/models/blueprint/prop-value/index.d.ts +1 -0
  100. package/dist/storefront-models/src/models/blueprint/prop-value/link.d.ts +10 -0
  101. package/dist/storefront-models/src/models/blueprint/prop-value/variable-binding.d.ts +16 -0
  102. package/dist/storefront-models/src/models/image/index.d.ts +7 -0
  103. package/dist/storefront-models/src/models/loyalty-program/customer-info/index.d.ts +2 -0
  104. package/dist/storefront-models/src/models/loyalty-program/earning-method/index.d.ts +1 -0
  105. package/dist/storefront-models/src/models/loyalty-program/index.d.ts +1 -0
  106. package/dist/storefront-models/src/models/loyalty-program/point-history/index.d.ts +1 -0
  107. package/dist/storefront-models/src/models/order/gift-card-line/index.d.ts +15 -0
  108. package/dist/storefront-models/src/models/order/index.d.ts +10 -0
  109. package/dist/storefront-models/src/models/order/line-item/index.d.ts +6 -1
  110. package/dist/storefront-models/src/models/order/package/index.d.ts +1 -1
  111. package/dist/storefront-models/src/models/order/refund/reason/index.d.ts +6 -0
  112. package/dist/storefront-models/src/models/order/refund/reason/translation/index.d.ts +4 -0
  113. package/dist/storefront-models/src/models/order/refund/refundable-line/index.d.ts +8 -0
  114. package/dist/storefront-models/src/models/order/refund/refundable-lines/index.d.ts +8 -0
  115. package/dist/storefront-models/src/models/order/refund/settings/translation/index.d.ts +4 -0
  116. package/dist/storefront-models/src/models/payment-gateway/index.d.ts +3 -1
  117. package/dist/storefront-models/src/models/product/attribute/index.d.ts +6 -1
  118. package/dist/storefront-models/src/models/product/campaign/data/index.d.ts +2 -0
  119. package/dist/storefront-models/src/models/product/campaign/filter/index.d.ts +1 -1
  120. package/dist/storefront-models/src/models/product/campaign/product-tiered-discount/index.d.ts +13 -0
  121. package/dist/storefront-models/src/models/product/image/index.d.ts +5 -0
  122. package/dist/storefront-models/src/models/product/variant/index.d.ts +17 -0
  123. package/dist/storefront-models/src/models/storefront/index.d.ts +1 -0
  124. package/dist/storefront-models/src/models/validator/deactivate-customer/index.d.ts +4 -0
  125. package/dist/stores/customer/index.d.ts +2 -1
  126. package/dist/stores/customer/index.js +1 -1
  127. package/dist/theme/settings/index.d.ts +51 -0
  128. package/dist/theme/settings/index.js +1 -0
  129. package/dist/utils/component-renderer.js +1 -1
  130. package/dist/utils/currency.d.ts +36 -3
  131. package/dist/utils/helper.d.ts +1 -0
  132. package/dist/utils/helper.js +1 -1
  133. package/dist/utils/pay-with-ikas.d.ts +552 -0
  134. package/dist/utils/pay-with-ikas.js +1 -0
  135. package/dist/utils/svg.d.ts +15 -0
  136. package/dist/utils/svg.js +1 -0
  137. package/package.json +2 -2
@@ -0,0 +1 @@
1
+ import{__awaiter as t,__generator as r}from'./../../../../../ext/tslib/tslib.es6.mjs.js';import{handleAPIError as e,APIResponse as n}from"../../../../storefront-api-client/src/utils/api.js";import i from"../../../../storefront-api-client/src/utils/fetch-query.js";var o=function(o,s,c){return t(void 0,void 0,void 0,function(){var t,u,a,l;return r(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,i({operationName:"getExternalAccountLink",config:c,excludeFields:s,input:o})];case 1:return t=r.sent(),u=t.data,a=t.errors,[2,new n(null==u?void 0:u.getExternalAccountLink,a)];case 2:return l=r.sent(),[2,e(l)];case 3:return[2]}})})};export{o as getExternalAccountLink};
@@ -0,0 +1 @@
1
+ import{__awaiter as r,__generator as t}from'./../../../../../ext/tslib/tslib.es6.mjs.js';import{handleAPIError as e,APIResponse as o}from"../../../../storefront-api-client/src/utils/api.js";import s from"../../../../storefront-api-client/src/utils/fetch-query.js";var i=function(i,n){return r(void 0,void 0,void 0,function(){var r,a,u,c;return t(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,s({operationName:"getLoyaltyProgram",config:n,excludeFields:i})];case 1:return r=t.sent(),a=r.data,u=r.errors,[2,new o(null==a?void 0:a.getLoyaltyProgram,u)];case 2:return c=t.sent(),[2,e(c)];case 3:return[2]}})})};export{i as getLoyaltyProgram};
@@ -0,0 +1 @@
1
+ import{__awaiter as e,__generator as t}from'./../../../../../ext/tslib/tslib.es6.mjs.js';import{handleAPIError as r,APIResponse as s}from"../../../../storefront-api-client/src/utils/api.js";import i from"../../../../storefront-api-client/src/utils/fetch-query.js";var o=function(o,n){return e(void 0,void 0,void 0,function(){var e,l,a,u;return t(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,i({operationName:"getMilesSmilesDetails",config:n,excludeFields:o})];case 1:return e=t.sent(),l=e.data,a=e.errors,[2,new s(null==l?void 0:l.getMilesSmilesDetails,a)];case 2:return u=t.sent(),[2,r(u)];case 3:return[2]}})})};export{o as getMilesSmilesDetails};
@@ -0,0 +1 @@
1
+ import{__awaiter as e,__generator as t}from'./../../../../../ext/tslib/tslib.es6.mjs.js';import{handleAPIError as r,APIResponse as n}from"../../../../storefront-api-client/src/utils/api.js";import s from"../../../../storefront-api-client/src/utils/fetch-query.js";var i=function(i,o,u){return e(void 0,void 0,void 0,function(){var e,a,c,l;return t(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,s({operationName:"getRefundableLines",config:u,excludeFields:o,input:i})];case 1:return e=t.sent(),a=e.data,c=e.errors,[2,new n(null==a?void 0:a.getRefundableLines,c)];case 2:return l=t.sent(),[2,r(l)];case 3:return[2]}})})};export{i as getRefundableLines};
@@ -0,0 +1 @@
1
+ import{__awaiter as r,__generator as t}from'./../../../../../ext/tslib/tslib.es6.mjs.js';import{handleAPIError as e,APIResponse as s}from"../../../../storefront-api-client/src/utils/api.js";import i from"../../../../storefront-api-client/src/utils/fetch-query.js";var n=function(n,o,c){return r(void 0,void 0,void 0,function(){var r,a,u,l;return t(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,i({operationName:"listOrderTransactionsWithPrices",config:c,excludeFields:o,input:n})];case 1:return r=t.sent(),a=r.data,u=r.errors,[2,new s(null==a?void 0:a.listOrderTransactionsWithPrices,u)];case 2:return l=t.sent(),[2,e(l)];case 3:return[2]}})})};export{n as listOrderTransactionsWithPrices};
@@ -1 +1 @@
1
- var r;!function(r){r.ARGUMENT_VALIDATION_ERROR="ARGUMENT_VALIDATION_ERROR",r.UNAUTHENTICATED="UNAUTHENTICATED",r.UNAUTHORIZED="UNAUTHORIZED",r.INTERNAL_SERVER_ERROR="INTERNAL_SERVER_ERROR",r.LOGIN_REQUIRED="LOGIN_REQUIRED",r.NETWORK_ERROR="NETWORK_ERROR",r.REQUEST_CANCELLED="REQUEST_CANCELLED",r.DUPLICATE_KEY_ERROR="DUPLICATE_KEY_ERROR",r.CUSTOMER_ALREADY_SUBSCRIBED="CUSTOMER_ALREADY_SUBSCRIBED",r.UNKNOWN="UNKNOWN"}(r||(r={}));var e=function(){function e(e,o,n){this.errors=[],this.errorCodes=[];var t=[],E=[];null==o||o.forEach(function(e){var o;(null===(o=e.extensions)||void 0===o?void 0:o.code)?(t.push(e.message),E.push(e.extensions.code)):(t.push("Unknown error"),E.push(r.UNKNOWN))}),null==n||n.forEach(function(r){E.push(r)}),this.graphQLErrors=o,this.errors=t,this.errorCodes=E,this.data=e}return Object.defineProperty(e.prototype,"firstErrorMessage",{get:function(){return this.errors.length?this.errors[0]:""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isUnAuthenticated",{get:function(){return this.errorCodes.some(function(e){return e===r.UNAUTHENTICATED})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isNetworkError",{get:function(){return this.errorCodes.some(function(e){return e===r.NETWORK_ERROR})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isSuccess",{get:function(){return 0===this.errorCodes.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isCancelled",{get:function(){return this.errorCodes.some(function(e){return e===r.REQUEST_CANCELLED})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isRecoverableError",{get:function(){var e=[r.UNAUTHENTICATED,r.INTERNAL_SERVER_ERROR,r.NETWORK_ERROR];return this.errorCodes.every(function(r){return e.includes(r)})},enumerable:!1,configurable:!0}),e.networkError=function(){var o=new e;return o.errors.push("Network error!"),o.errorCodes.push(r.NETWORK_ERROR),o},e.requestCancelled=function(){var o=new e;return o.errors.push("Request was cancelled"),o.errorCodes.push(r.REQUEST_CANCELLED),o},e.unknownError=function(){var o=new e;return o.errors.push("Unknown error!"),o.errorCodes.push(r.UNKNOWN),o},e.authError=function(){var o=new e;return o.errors.push("Authentication error!"),o.errorCodes.push(r.UNAUTHENTICATED),o},e.success=function(){return new e},e}();function o(r){var o,n;return console.error(r.toJSON?r.toJSON():r),"AbortError"===r.name||20===r.code||(null===(o=r.message)||void 0===o?void 0:o.includes("aborted"))?e.requestCancelled():r.networkError?e.networkError():r.graphQLErrors?new e(void 0,r.graphQLErrors):r instanceof TypeError&&(null===(n=r.message)||void 0===n?void 0:n.includes("fetch"))?e.networkError():e.unknownError()}export{r as APIErrorCode,e as APIResponse,o as handleAPIError};
1
+ var r;!function(r){r.ARGUMENT_VALIDATION_ERROR="ARGUMENT_VALIDATION_ERROR",r.UNAUTHENTICATED="UNAUTHENTICATED",r.UNAUTHORIZED="UNAUTHORIZED",r.INTERNAL_SERVER_ERROR="INTERNAL_SERVER_ERROR",r.LOGIN_REQUIRED="LOGIN_REQUIRED",r.NETWORK_ERROR="NETWORK_ERROR",r.REQUEST_CANCELLED="REQUEST_CANCELLED",r.DUPLICATE_KEY_ERROR="DUPLICATE_KEY_ERROR",r.CUSTOMER_ALREADY_SUBSCRIBED="CUSTOMER_ALREADY_SUBSCRIBED",r.MAX_QUANTITY_PER_CART_LIMIT_REACHED="MAX_QUANTITY_PER_CART_LIMIT_REACHED",r.UNKNOWN="UNKNOWN"}(r||(r={}));var e=function(){function e(e,o,n){this.errors=[],this.errorCodes=[];var t=[],E=[];null==o||o.forEach(function(e){var o;(null===(o=e.extensions)||void 0===o?void 0:o.code)?(t.push(e.message),E.push(e.extensions.code)):(t.push("Unknown error"),E.push(r.UNKNOWN))}),null==n||n.forEach(function(r){E.push(r)}),this.graphQLErrors=o,this.errors=t,this.errorCodes=E,this.data=e}return Object.defineProperty(e.prototype,"firstErrorMessage",{get:function(){return this.errors.length?this.errors[0]:""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isUnAuthenticated",{get:function(){return this.errorCodes.some(function(e){return e===r.UNAUTHENTICATED})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isNetworkError",{get:function(){return this.errorCodes.some(function(e){return e===r.NETWORK_ERROR})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isSuccess",{get:function(){return 0===this.errorCodes.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isCancelled",{get:function(){return this.errorCodes.some(function(e){return e===r.REQUEST_CANCELLED})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isRecoverableError",{get:function(){var e=[r.UNAUTHENTICATED,r.INTERNAL_SERVER_ERROR,r.NETWORK_ERROR];return this.errorCodes.every(function(r){return e.includes(r)})},enumerable:!1,configurable:!0}),e.networkError=function(){var o=new e;return o.errors.push("Network error!"),o.errorCodes.push(r.NETWORK_ERROR),o},e.requestCancelled=function(){var o=new e;return o.errors.push("Request was cancelled"),o.errorCodes.push(r.REQUEST_CANCELLED),o},e.unknownError=function(){var o=new e;return o.errors.push("Unknown error!"),o.errorCodes.push(r.UNKNOWN),o},e.authError=function(){var o=new e;return o.errors.push("Authentication error!"),o.errorCodes.push(r.UNAUTHENTICATED),o},e.success=function(){return new e},e}();function o(r){var o,n;return console.error(r.toJSON?r.toJSON():r),"AbortError"===r.name||20===r.code||(null===(o=r.message)||void 0===o?void 0:o.includes("aborted"))?e.requestCancelled():r.networkError?e.networkError():r.graphQLErrors?new e(void 0,r.graphQLErrors):r instanceof TypeError&&(null===(n=r.message)||void 0===n?void 0:n.includes("fetch"))?e.networkError():e.unknownError()}export{r as APIErrorCode,e as APIResponse,o as handleAPIError};
@@ -1 +1 @@
1
- import{__assign as t}from'./../../../ext/tslib/tslib.es6.mjs.js';var r=function(){function r(){}return r.addObserver=function(t){var n=r.observers.find(function(r){return r.id===t.id});n?n.callback=t.callback:r.observers.push(t),t.callback(r)},r.init=function(t){try{var n=["themeSecret"];Object.entries(t).forEach(function(t){var i=t[0],o=t[1];n.includes(i)||(r[i]="storefrontJSScripts"===i||"highPriorityStoreFrontJSScripts"===i?null==o?void 0:o.map(function(t){return e(t)}):o)}),t.token&&(r.apiKey=t.token),this.notify()}catch(t){console.error(t)}},r.getCurrentRouting=function(){return r.routings.find(function(t){return t.id===r.storefrontRoutingId})},r.getCurrentPath=function(){var t;return(null===(t=r.getCurrentRouting())||void 0===t?void 0:t.path)||""},r.getSupportedPaths=function(){return r.routings.map(function(t){var r;return(null===(r=t.path)||void 0===r?void 0:r.split("/")[0])||""})},r.getCurrentLocale=function(){var t=r.getCurrentRouting();return(null==t?void 0:t.locale)||"en"},r.getDefaultLocale=function(){var t=r.routings.find(function(t){return"/"===t.path||!t.path});return(null==t?void 0:t.locale)||"en"},r.getIsPreview=function(){return r.isPreview},r.notify=function(){var t=this;this.observers.forEach(function(r){return r.callback(t)})},r.isCustomerReviewEnabled=function(){var t=r.customerReviewSettings;return!!t&&!t.customerPurchaseRequired},r.isCustomerReviewLoginRequired=function(){var t=r.customerReviewSettings;return!t||t.customerLoginRequired},r.isBackInStockEnabled=function(){return!!r.productBackInStockSettings},r.isCustomerLoginRequiredForBackInStock=function(){var t=r.productBackInStockSettings;return t&&t.customerLoginRequired},r.toJSON=function(){var r=t({},this);return delete r.observers,r.storefrontJSScripts=this.storefrontJSScripts.map(function(t){return n(t)}),r.highPriorityStoreFrontJSScripts=this.highPriorityStoreFrontJSScripts.map(function(t){return n(t)}),r},r.isB2BStorefront=function(){return"B2B_STOREFRONT"===r.storefrontType},r.getDefaultCurrencyCode=function(){var t;return null===(t=r.getCurrentRouting())||void 0===t?void 0:t.currencyCode},r.getDefaultCurrencySymbol=function(){var t;return null===(t=r.getCurrentRouting())||void 0===t?void 0:t.currencySymbol},r.isCaptchaRequired=function(){var t;return(null===(t=r.customerSettings)||void 0===t?void 0:t.requireCaptchaValidation)||!1},r.getPayWithIkasUrl=function(){return r.payWithIkasUrl},r.routings=[],r.paymentGateways=[],r.translations={},r.storefrontJSScripts=[],r.highPriorityStoreFrontJSScripts=[],r.isEditor=!1,r.observers=[],r.isPreview=!1,r}();function n(t){return"string"!=typeof t?(console.error("escapeForJSON: Input is not a string",t),""):t.replace(/<\/script\b/gi,"<\\/script")}function e(t){return"string"!=typeof t?(console.error("unescapeFromJSON: Input is not a string",t),""):t.replace(/<\\\/script\b/gi,"</script")}export{r as IkasStorefrontConfig,n as escapeForJSON,e as unescapeFromJSON};
1
+ import{__assign as r}from'./../../../ext/tslib/tslib.es6.mjs.js';import{EMPTY_THEME_GLOBALS as t}from"./theme-globals.js";export{EMPTY_THEME_GLOBALS,breakpointCssToken,cssVarCamelCase,cssVarRef,isReservedVariableId,rawClassRef,resolveBreakpointMediaTokens,serializeThemeGlobals,toResolverBreakpoints}from"./theme-globals.js";var n=function(){function n(){}return n.addObserver=function(r){var t=n.observers.find(function(t){return t.id===r.id});t?t.callback=r.callback:n.observers.push(r),r.callback(n)},n.init=function(r){try{var t=["themeSecret"];Object.entries(r).forEach(function(r){var e=r[0],i=r[1];t.includes(e)||(n[e]="storefrontJSScripts"===e||"highPriorityStoreFrontJSScripts"===e?null==i?void 0:i.map(function(r){return a(r)}):i)}),r.token&&(n.apiKey=r.token),this.notify()}catch(r){console.error(r)}},n.getCurrentRouting=function(){return n.routings.find(function(r){return r.id===n.storefrontRoutingId})},n.getCurrentPath=function(){var r;return(null===(r=n.getCurrentRouting())||void 0===r?void 0:r.path)||""},n.getSupportedPaths=function(){return n.routings.map(function(r){var t;return(null===(t=r.path)||void 0===t?void 0:t.split("/")[0])||""})},n.getCurrentLocale=function(){var r=n.getCurrentRouting();return(null==r?void 0:r.locale)||"en"},n.getDefaultLocale=function(){var r=n.routings.find(function(r){return"/"===r.path||!r.path});return(null==r?void 0:r.locale)||"en"},n.getIsPreview=function(){return n.isPreview},n.notify=function(){var r=this;this.observers.forEach(function(t){return t.callback(r)})},n.isCustomerReviewEnabled=function(){var r=n.customerReviewSettings;return!!r&&!r.customerPurchaseRequired},n.isCustomerReviewLoginRequired=function(){var r=n.customerReviewSettings;return!r||r.customerLoginRequired},n.isBackInStockEnabled=function(){return!!n.productBackInStockSettings},n.isCustomerLoginRequiredForBackInStock=function(){var r=n.productBackInStockSettings;return r&&r.customerLoginRequired},n.toJSON=function(){var t=r({},this);return delete t.observers,t.storefrontJSScripts=this.storefrontJSScripts.map(function(r){return c(r)}),t.highPriorityStoreFrontJSScripts=this.highPriorityStoreFrontJSScripts.map(function(r){return c(r)}),t},n.isB2BStorefront=function(){return"B2B_STOREFRONT"===n.storefrontType},n.getDefaultCurrencyCode=function(){var r;return null===(r=n.getCurrentRouting())||void 0===r?void 0:r.currencyCode},n.getDefaultCurrencySymbol=function(){var r;return null===(r=n.getCurrentRouting())||void 0===r?void 0:r.currencySymbol},n.isCaptchaRequired=function(){var r;return(null===(r=n.customerSettings)||void 0===r?void 0:r.requireCaptchaValidation)||!1},n.getPayWithIkasUrl=function(){return n.payWithIkasUrl},n.routings=[],n.paymentGateways=[],n.translations={},n.themeGlobals=t,n.storefrontJSScripts=[],n.highPriorityStoreFrontJSScripts=[],n.isEditor=!1,n.observers=[],n.isPreview=!1,n}();function e(r){return r.find(function(r){return!r.path})}function i(r){return(null==r?void 0:r.path)?r.id:void 0}var o=function(r){return"object"==typeof r&&null!==r&&!Array.isArray(r)};function u(t,n){var e=r({},n);return Object.entries(null!=t?t:{}).forEach(function(r){var t=r[0],n=r[1];o(n)?e[t]=u(n,o(e[t])?e[t]:void 0):""!==n&&null!=n&&(e[t]=n)}),e}function s(r,t){var n=Object.fromEntries((null!=r?r:[]).filter(function(r){return r.i18n&&Object.keys(r.i18n).length>0}).map(function(r){var n,e,i,o;return[r.projectId,u(null!==(i=null===(e=null===(n=r.translations)||void 0===n?void 0:n.find(function(r){return r.locale===t}))||void 0===e?void 0:e.i18n)&&void 0!==i?i:void 0,null!==(o=r.i18n)&&void 0!==o?o:void 0)]}));return Object.keys(n).length>0?{cc:n}:{}}function c(r){return"string"!=typeof r?(console.error("escapeForJSON: Input is not a string",r),""):r.replace(/<\/script\b/gi,"<\\/script")}function a(r){return"string"!=typeof r?(console.error("unescapeFromJSON: Input is not a string",r),""):r.replace(/<\\\/script\b/gi,"</script")}export{n as IkasStorefrontConfig,s as codeComponentI18n,c as escapeForJSON,i as getSfRoutingId,e as getSourceRouting,a as unescapeFromJSON,u as withFallbackTranslations};
@@ -0,0 +1 @@
1
+ import{__assign as n,__spreadArray as e}from'./../../../ext/tslib/tslib.es6.mjs.js';var r=new RegExp(["[A-Z]?[a-z]+","[0-9]*(?:1ST|2ND|3RD|(?![123])[0-9]TH)(?=\\b|[a-z_])","[0-9]*(?:1st|2nd|3rd|(?![123])[0-9]th)(?=\\b|[A-Z_])","[A-Z]+(?![a-z])","[0-9]+","[A-Z]"].join("|"),"g");function i(n){return(String(n).match(r)||[]).map(function(n,e){var r=n.toLowerCase();return 0===e?r:r.charAt(0).toUpperCase()+r.slice(1)}).join("")}var t={settings:{},colors:[],typography:[],breakpoints:[],keyframes:[],colorSchemes:{schemes:[],values:[]}},l=function(n,e){return e?"var(--".concat(i(n),", ").concat(e,")"):"var(--".concat(i(n),")")},u=function(n){return"_".concat(n)},o=function(n){return"bp(".concat(n,")")},a=function(n){return n.map(function(n){return{id:n.id,width:Number(n.width)||0}})},d=/\d*\.?\d+(?:e[+-]?\d+)?px|\d*\.?\d+(?:e[+-]?\d+)?|[()+\-*/]|\S/gi,s=function(n,e){var r=c(n,e);return r&&v(n,e,r)},v=function(n,e,r){var i=n[e.i];if("+"!==i&&"-"!==i)return r;e.i+=1;var t=c(n,e);return t&&t.isPx===r.isPx?v(n,e,{n:"+"===i?r.n+t.n:r.n-t.n,isPx:r.isPx}):null},c=function(n,e){var r=p(n,e);return r&&f(n,e,r)},f=function(n,e,r){var i=n[e.i];if("*"!==i&&"/"!==i)return r;e.i+=1;var t=p(n,e);return t?"*"===i?r.isPx&&t.isPx?null:f(n,e,{n:r.n*t.n,isPx:r.isPx||t.isPx}):t.isPx||0===t.n?null:f(n,e,{n:r.n/t.n,isPx:r.isPx}):null},p=function(n,e){var r,i=n[e.i];return"-"===i?(e.i+=1,(r=p(n,e))&&{n:-r.n,isPx:r.isPx}):"+"===i?(e.i+=1,p(n,e)):"("===i?(e.i+=1,(r=s(n,e))&&")"===n[e.i]?(e.i+=1,r):null):"object"==typeof i&&null!==i?(e.i+=1,i):null},m=function(n){var e=function(n){var e=(n.match(d)||[]).map(function(n){return/^\d*\.?\d+(?:e[+-]?\d+)?px$/i.test(n)?{n:parseFloat(n),isPx:!0}:/^\d*\.?\d+(?:e[+-]?\d+)?$/i.test(n)?{n:parseFloat(n),isPx:!1}:"()+-*/".includes(n)?n:null});return e.every(function(n){return null!==n})?e:null}(n.replace(/calc\(/gi,"("));if(!e)return null;var r={i:0},i=s(e,r);return i&&i.isPx&&r.i===e.length&&Number.isFinite(i.n)&&Math.abs(i.n)<1e8?i.n:null},y=function(n,e,r,i){if(e>=n.length||e>i)return-1;var t=n[e],l="("===t?r+1:")"===t?r-1:r;return 0===l?e:y(n,e+1,l,i)},h=function(n,e){return e.reduce(function(n,e){return n.split(o(e.id)).join("".concat(e.width,"px"))},n)},b=/^-(?:webkit|moz|ms|o)-$/i,g=/[-A-Za-z0-9_]+$/,x=function(n,e,r){var i=n.indexOf("bp(",r);if(-1===i)return n;var t=Math.max(r,i-512-5),l=n.slice(t,i+5).indexOf("calc("),u=-1===l?-1:t+l;if(-1===u||u>i)return x(n,e,i+3);var o=g.exec(n.slice(Math.max(0,u-12),u)),a=o?o[0]:"",d=b.test(a)&&!g.test(n.slice(u-a.length-1,u-a.length));if(a&&!d)return x(n,e,u+5);var s=d?u-a.length:u,v=u+4,c=y(n,v,0,v+512);if(-1===c)return x(n,e,u+5);if(c<i)return x(n,e,c+1);var f=h(n.slice(v+1,c),e),p=m(f);if(null===p)return x(n,e,u+5);var N="".concat(parseFloat(p.toFixed(4)),"px");return x(n.slice(0,s)+N+n.slice(c+1),e,s+N.length)};function N(n,e){if(!n||!n.includes("bp("))return n;var r=x(n,e,0);return r.includes("bp(")?h(r,e):r}var S=function(n){var e;if(n)return Array.isArray(n)?null===(e=n[0])||void 0===e?void 0:e.value:n},P=function(n){var e,r=n;if(!r)return null;if(r.patternValueId)return l(r.patternValueId);if(r.colorSchemeId)return l(r.colorSchemeId);if(r.keyframeValueId)return u(r.keyframeValueId);var i=r.value;return null==i?null:"object"==typeof i?"string"==typeof i.css?i.css:null!=i.value?"".concat(i.value).concat(null!==(e=i.unit)&&void 0!==e?e:""):null:String(i)},k=["font-size","line-height","letter-spacing","font-weight"],I=/^__.+__$/,j=function(n){return I.test(null!=n?n:"")},w=function(n){return n.replace("_optional","").replace("_array","")},A=function(n,e){if(!n||!e)return null;var r=w(e),i=n.find(function(n){return(null==n?void 0:n.id)===r});if(!i||"enum"!==i.type||!i.enumOptions||"object"!=typeof i.enumOptions)return null;for(var t={},l=0,u=Object.entries(i.enumOptions);l<u.length;l++){var o=u[l],a=o[0],d=o[1];null!=d&&(t[a]=String(d))}return Object.keys(t).length?t:null},O=function(n,e,r){if("BOOLEAN"===n)return!!e;if("NUMBER"===n){if("number"!=typeof e&&"string"!=typeof e)return null;var i="string"==typeof e&&""===e.trim()?NaN:Number(e);return Number.isFinite(i)?i:null}if("ENUM"===n){if(!r)return null;if("string"!=typeof e&&"number"!=typeof e)return null;var t=String(e);return Object.values(r).includes(t)?t:null}return null!=e?e:null};function _(r){var o,a,d,s,v,c,f,p,m,y,h,b,g,x,N;if(!r)return t;for(var I=null===(o=r.theme)||void 0===o?void 0:o.pattern,_={},V=0,D=null!==(s=null===(d=null===(a=r.globalsBlueprint)||void 0===a?void 0:a.module)||void 0===d?void 0:d.variables)&&void 0!==s?s:[];V<D.length;V++){var E=D[V];if(!1!==E.isGlobal&&E.variableName&&(!j(E.id)&&!j(E.variableName))){var M=null!==(v=E.variableType)&&void 0!==v?v:"TEXT",z="ENUM"===M?A(r.types,E.typeId):null;_[E.variableName]=n({name:E.variableName,displayName:null!==(c=E.displayName)&&void 0!==c?c:E.variableName,type:M,value:O(M,E.defaultValue,z)},"ENUM"===M?n(n({},E.typeId?{enumTypeId:w(E.typeId)}:{}),{options:null!=z?z:{}}):{})}}var F=(null!==(f=null==I?void 0:I.values)&&void 0!==f?f:[]).map(function(n){var e,r;return{id:n.id,name:null!==(e=n.name)&&void 0!==e?e:n.id,resolved:P(S(null===(r=n.style)||void 0===r?void 0:r.value)),cssVar:l(n.id)}}),T=function(n){return(null!=n?n:[]).map(function(n){return{property:n.property,value:P(S(n.value))}}).filter(function(n){return null!=n.value})},U=e([],null!==(m=null===(p=r.theme)||void 0===p?void 0:p.breakpoints)&&void 0!==m?m:[],!0).sort(function(n,e){return(Number(e.width)||0)-(Number(n.width)||0)}),Z=(null!==(y=null==I?void 0:I.elements)&&void 0!==y?y:[]).map(function(r){for(var t,l={},o=0,a=T(r.styles);o<a.length;o++){var d=a[o],s=d.property,v=d.value;l[i(s)]=v}var c=function(r,t,l){var u;if(!(null===(u=r.breakpointStyles)||void 0===u?void 0:u.length))return[];var o=n({},t);return l.reduce(function(l,u){for(var a,d,s=null===(a=r.breakpointStyles)||void 0===a?void 0:a.find(function(n){return n.breakpointId===u.id}),v={},c=0,f=null!==(d=null==s?void 0:s.styles)&&void 0!==d?d:[];c<f.length;c++){var p=f[c];if(k.includes(p.property)){var m=i(p.property),y=P(S(p.value));null==y||""===y||null==t[m]||m in v||(v[m]=y)}}return Object.keys(v).length?(Object.assign(o,v),e(e([],l,!0),[{id:u.id,width:Number(u.width)||0,overrides:v,resolved:n({},o)}],!1)):l},[])}(r,l,U);return n({id:r.id,name:null!==(t=r.name)&&void 0!==t?t:r.id,resolved:l,className:u(r.id),isDefault:!!r.isDefault},c.length?{breakpoints:c}:{})}),$=U.map(function(n){var e;return{id:n.id,name:null!==(e=n.name)&&void 0!==e?e:n.id,width:Number(n.width)||0}}),B=(null!==(b=null===(h=r.theme)||void 0===h?void 0:h.keyframes)&&void 0!==b?b:[]).map(function(n){var e,r,i;return{id:n.id,name:null!==(e=n.name)&&void 0!==e?e:n.id,type:null!==(r=n.type)&&void 0!==r?r:"keyframe",ref:u(n.id),settings:T(n.styles),points:(null!==(i=n.points)&&void 0!==i?i:[]).map(function(n){return{point:n.point,styles:T(n.styles)}})}}),R=(null!==(g=null==I?void 0:I.colorSchemes)&&void 0!==g?g:[]).map(function(n){var e;return{id:n.id,name:null!==(e=n.name)&&void 0!==e?e:n.id}}),C=null!==(x=null==I?void 0:I.colorSchemes)&&void 0!==x?x:[],L=null!==(N=null==I?void 0:I.colorSchemeValues)&&void 0!==N?N:[],G=L.map(function(n){for(var e,r,i,t,o=function(n){var e,r;return null!==(r=null===(e=L.find(function(e){return e.isDefault&&(n?e.designAssetId===n:!e.designAssetId)}))||void 0===e?void 0:e.colors)&&void 0!==r?r:[]}(n.designAssetId),a={},d=function(t){var u=null===(e=n.colors)||void 0===e?void 0:e.find(function(n){return n.colorSchemeId===t.id}),d=u?void 0:o.find(function(n){return n.colorSchemeId===t.id});a[t.id]={resolved:null!==(i=P(null!==(r=null==u?void 0:u.style)&&void 0!==r?r:null==d?void 0:d.style))&&void 0!==i?i:"#ffffff",cssVar:l(t.id)}},s=0,v=C;s<v.length;s++){d(v[s])}return{id:n.id,name:null!==(t=n.name)&&void 0!==t?t:n.id,isDefault:!!n.isDefault,className:u(n.id),colorsByScheme:a}});return{settings:_,colors:F,typography:Z,breakpoints:$,keyframes:B,colorSchemes:{schemes:R,values:G}}}export{t as EMPTY_THEME_GLOBALS,o as breakpointCssToken,i as cssVarCamelCase,l as cssVarRef,j as isReservedVariableId,u as rawClassRef,N as resolveBreakpointMediaTokens,_ as serializeThemeGlobals,a as toResolverBreakpoints};
@@ -181,4 +181,32 @@ export declare class Router {
181
181
  private static ensurePathPrefix;
182
182
  }
183
183
  export declare const router: Router;
184
+ /**
185
+ * Put the visitor's storefront routing in front of a path you wrote yourself.
186
+ *
187
+ * Entity links (`getProductHref`, `getIkasOrderHref`, …) and LINK props already carry the prefix.
188
+ * A literal path in your own markup does not: `href="/cart"` sends a visitor browsing `/en` to the
189
+ * default language. Wrap it, and a store with no extra routings gets the path back unchanged.
190
+ *
191
+ * Idempotent — a path that already starts with a supported routing segment is returned as-is.
192
+ * Anything that is not a path on this storefront — an absolute URL, `mailto:`, `tel:` — is returned
193
+ * untouched, so a merchant-authored prop can be wrapped without checking it first.
194
+ *
195
+ * @ai-category Navigation
196
+ * @ai-related navigate, navigateToPage
197
+ *
198
+ * @param path - A path on this storefront, starting with `/`
199
+ * @returns The path under the current routing (e.g. `/cart` → `/en/cart`)
200
+ *
201
+ * @example
202
+ * ```tsx
203
+ * import { Router, withRoutePrefix } from "@ikas/bp-storefront";
204
+ *
205
+ * // Correct href for crawlers, middle-click and open-in-new-tab...
206
+ * <a href={withRoutePrefix("/cart")} onClick={e => {
207
+ * e.preventDefault();
208
+ * Router.navigateToPage("CART"); // ...and this prefixes on its own.
209
+ * }}>Cart</a>
210
+ * ```
211
+ */
184
212
  export declare function withRoutePrefix(path: string): string;
@@ -1 +1 @@
1
- import{IkasStorefrontConfig as e}from"../packages/storefront-config/src/index.js";import{getCheckoutUrlFromCartStore as t}from"../functions/stores/cart/index.js";import{cartStore as a}from"../stores/cart/index.js";var r=function(){function r(){}return r.initialize=function(e,t){var a=this;this.window=t||window,this.currentPath=void 0!==this.window?this.window.location.pathname:"/",void 0!==this.window&&(r.pageParams=e,this.window.addEventListener("popstate",r.handlePopState),r.interceptAnchorClicks(),this.window.addEventListener("pageshow",function(e){return a.isFromBFCache=e.persisted}))},r.navigate=function(t,a,n){if(void 0===a&&(a=!1),void 0===n&&(n=!1),void 0!==this.window){var o=r.ensurePathPrefix(t);e.getIsPreview()||(a?this.window.history.replaceState({},"",o):n?this.window.open(o,"_blank"):this.window.location.href=o),r.handleRouteChange(o)}},r.navigateToPage=function(e,n,i,c,s){void 0===c&&(c=!1),void 0===s&&(s=!1);var u=Object.entries(i||{}).map(function(e){var t=e[0],a=e[1];return"".concat(t,"=").concat(encodeURIComponent(a))}).join("&"),h="";switch(e){case"INDEX":h="/";break;case"ACCOUNT":h="/account";break;case"ACTIVATE_CUSTOMER":h="/account/activate";break;case"ADDRESSES":h="/account/addresses";break;case"FAVORITE_PRODUCTS":h="/account/favorite-products";break;case"FORGOT_PASSWORD":h="/account/forgot-password";break;case"LOGIN":h="/account/login";break;case"RAFFLE_ACCOUNT":h="/account/raffles";break;case"RECOVER_PASSWORD":h="/account/recover-password";break;case"REGISTER":h="/account/register";break;case"ORDERS":h="/account/orders";break;case"ORDER_DETAIL":h="/account/orders/".concat(n);break;case"BLOG_INDEX":h="/blog";break;case"BLOG":case"BLOG_CATEGORY":h="/blog/".concat(n);break;case"CART":h="/cart";break;case"CHECKOUT":h=t(a);break;case"CUSTOM":h="/pages/".concat(n);break;case"RAFFLE":h="/raffle";break;case"RAFFLE_DETAIL":h="/raffle/".concat(n);break;case"SEARCH":h="/search";break;case"NOT_FOUND":h="/404"}u&&(h+="?".concat(u)),r.navigate(o(h),c,s)},r.addObserver=function(e){r.observers.push(e)},r.removeObserver=function(e){r.observers=r.observers.filter(function(t){return t!==e})},r.goBack=function(){this.window.history.back()},r.getCurrentPath=function(){return r.currentPath},r.getPageParams=function(){return r.pageParams},r.router_getQueryParams=function(){if(void 0===this.window)return{};var e={};return new URLSearchParams(this.window.location.search).forEach(function(t,a){e[a]=t}),e},r.handleRouteChange=function(e){r.currentPath=e,r.notifyObservers()},r.handlePopState=function(){void 0!==this.window&&r.handleRouteChange(this.window.location.pathname)},r.interceptAnchorClicks=function(){void 0!==this.window&&this.window.addEventListener("click",function(e){var t=e.target.closest("a");if(t&&"A"===t.tagName&&t.getAttribute("href")){var a=t.getAttribute("href");if(e.metaKey||e.ctrlKey)return;if(/^(mailto|tel|sms|javascript):/i.test(a))return;e.preventDefault();var n="_blank"===t.getAttribute("target");r.navigate(a,!1,n)}})},r.notifyObservers=function(){r.observers.forEach(function(e){return e(r.currentPath)})},r.ensurePathPrefix=function(e){return e.startsWith("http")||e.startsWith("/")?e:"/".concat(e)},r.currentPath="undefined"!=typeof window?window.location.pathname:"/",r.observers=[],r.pageParams={},r.isFromBFCache=!1,r}(),n=r;function o(t){var a=e.getCurrentPath(),r=t.split("/").filter(function(e){return""!==e})[0];return r&&e.getSupportedPaths().includes(r)?t:"".concat(a?"/".concat(a):"").concat(t).replace("//","/")}export{r as Router,n as router,o as withRoutePrefix};
1
+ import{IkasStorefrontConfig as e}from"../packages/storefront-config/src/index.js";import{getCheckoutUrlFromCartStore as t}from"../functions/stores/cart/index.js";import{cartStore as a}from"../stores/cart/index.js";var r=function(){function r(){}return r.initialize=function(e,t){var a=this;this.window=t||window,this.currentPath=void 0!==this.window?this.window.location.pathname:"/",void 0!==this.window&&(r.pageParams=e,this.window.addEventListener("popstate",r.handlePopState),r.interceptAnchorClicks(),this.window.addEventListener("pageshow",function(e){return a.isFromBFCache=e.persisted}))},r.navigate=function(t,a,n){if(void 0===a&&(a=!1),void 0===n&&(n=!1),void 0!==this.window){var o=r.ensurePathPrefix(t);e.getIsPreview()||(a?this.window.history.replaceState({},"",o):n?this.window.open(o,"_blank"):this.window.location.href=o),r.handleRouteChange(o)}},r.navigateToPage=function(e,n,i,c,s){void 0===c&&(c=!1),void 0===s&&(s=!1);var u=Object.entries(i||{}).map(function(e){var t=e[0],a=e[1];return"".concat(t,"=").concat(encodeURIComponent(a))}).join("&"),h="";switch(e){case"INDEX":h="/";break;case"ACCOUNT":h="/account";break;case"ACTIVATE_CUSTOMER":h="/account/activate";break;case"ADDRESSES":h="/account/addresses";break;case"FAVORITE_PRODUCTS":h="/account/favorite-products";break;case"FORGOT_PASSWORD":h="/account/forgot-password";break;case"LOGIN":h="/account/login";break;case"RAFFLE_ACCOUNT":h="/account/raffles";break;case"RECOVER_PASSWORD":h="/account/recover-password";break;case"REGISTER":h="/account/register";break;case"ORDERS":h="/account/orders";break;case"ORDER_DETAIL":h="/account/orders/".concat(n);break;case"BLOG_INDEX":h="/blog";break;case"BLOG":case"BLOG_CATEGORY":h="/blog/".concat(n);break;case"CART":h="/cart";break;case"CHECKOUT":h=t(a);break;case"CUSTOM":h="/pages/".concat(n);break;case"RAFFLE":h="/raffle";break;case"RAFFLE_DETAIL":h="/raffle/".concat(n);break;case"SEARCH":h="/search";break;case"NOT_FOUND":h="/404"}u&&(h+="?".concat(u)),r.navigate(o(h),c,s)},r.addObserver=function(e){r.observers.push(e)},r.removeObserver=function(e){r.observers=r.observers.filter(function(t){return t!==e})},r.goBack=function(){this.window.history.back()},r.getCurrentPath=function(){return r.currentPath},r.getPageParams=function(){return r.pageParams},r.router_getQueryParams=function(){if(void 0===this.window)return{};var e={};return new URLSearchParams(this.window.location.search).forEach(function(t,a){e[a]=t}),e},r.handleRouteChange=function(e){r.currentPath=e,r.notifyObservers()},r.handlePopState=function(){void 0!==this.window&&r.handleRouteChange(this.window.location.pathname)},r.interceptAnchorClicks=function(){void 0!==this.window&&this.window.addEventListener("click",function(e){var t=e.target.closest("a");if(t&&"A"===t.tagName&&t.getAttribute("href")){var a=t.getAttribute("href");if(e.metaKey||e.ctrlKey)return;if(/^(mailto|tel|sms|javascript):/i.test(a))return;e.preventDefault();var n="_blank"===t.getAttribute("target");r.navigate(a,!1,n)}})},r.notifyObservers=function(){r.observers.forEach(function(e){return e(r.currentPath)})},r.ensurePathPrefix=function(e){return e.startsWith("http")||e.startsWith("/")?e:"/".concat(e)},r.currentPath="undefined"!=typeof window?window.location.pathname:"/",r.observers=[],r.pageParams={},r.isFromBFCache=!1,r}(),n=r;function o(t){if(/^[a-z][a-z\d+.-]*:/i.test(t)||t.startsWith("//"))return t;var a=e.getCurrentPath(),r=t.split("/").filter(function(e){return""!==e})[0];return r&&e.getSupportedPaths().includes(r)?t:"".concat(a?"/".concat(a):"").concat(t).replace("//","/")}export{r as Router,n as router,o as withRoutePrefix};
@@ -0,0 +1,7 @@
1
+ import { APIResponse, ConfigType } from "../../../../storefront-api-client/src";
2
+ import { CartV2 } from "../types";
3
+ export declare const removeGiftCardFromCart: (input: RemoveGiftCardFromCartQueryParams, excludeFields?: string[], config?: ConfigType) => Promise<APIResponse<CartV2> | APIResponse<undefined>>;
4
+ export type RemoveGiftCardFromCartQueryParams = {
5
+ cartId: string;
6
+ giftCardId?: string | null;
7
+ };
@@ -0,0 +1,6 @@
1
+ import { ConfigType, APIResponse } from "../../../../storefront-api-client/src";
2
+ import { CustomerExternalAccountLinkProviderEnum } from "../types";
3
+ export declare const unlinkExternalAccount: (input: UnlinkExternalAccountQueryParams, excludeFields?: string[], config?: ConfigType) => Promise<APIResponse<boolean> | APIResponse<undefined>>;
4
+ export type UnlinkExternalAccountQueryParams = {
5
+ provider: CustomerExternalAccountLinkProviderEnum;
6
+ };
@@ -0,0 +1,6 @@
1
+ import { ConfigType, APIResponse } from "../../../../storefront-api-client/src";
2
+ import { CustomerExternalAccountLinkProviderEnum, ExternalAccountLink } from "../types";
3
+ export declare const getExternalAccountLink: (input: GetExternalAccountLinkQueryParams, excludeFields?: string[], config?: ConfigType) => Promise<APIResponse<ExternalAccountLink> | APIResponse<undefined>>;
4
+ export type GetExternalAccountLinkQueryParams = {
5
+ provider: CustomerExternalAccountLinkProviderEnum;
6
+ };
@@ -0,0 +1,3 @@
1
+ import { APIResponse, ConfigType } from "../../../../storefront-api-client/src";
2
+ import { LoyaltyProgram } from "../types";
3
+ export declare const getLoyaltyProgram: (excludeFields?: string[], config?: ConfigType) => Promise<APIResponse<LoyaltyProgram> | APIResponse<undefined>>;
@@ -0,0 +1,3 @@
1
+ import { ConfigType, APIResponse } from "../../../../storefront-api-client/src";
2
+ import { MilesSmilesDetailsResponse } from "../types";
3
+ export declare const getMilesSmilesDetails: (excludeFields?: string[], config?: ConfigType) => Promise<APIResponse<MilesSmilesDetailsResponse> | APIResponse<undefined>>;
@@ -0,0 +1,6 @@
1
+ import { APIResponse, ConfigType } from "../../../../storefront-api-client/src";
2
+ import { GetRefundableLinesInput, GetRefundableLinesResponse } from "../types";
3
+ export declare const getRefundableLines: (input: GetRefundableLinesQueryParams, excludeFields?: string[], config?: ConfigType) => Promise<APIResponse<GetRefundableLinesResponse> | APIResponse<undefined>>;
4
+ export type GetRefundableLinesQueryParams = {
5
+ input: GetRefundableLinesInput;
6
+ };
@@ -0,0 +1,6 @@
1
+ import { APIResponse, ConfigType } from "../../../../storefront-api-client/src";
2
+ import { ListOrderTransactionWithPricesInput, ListOrderTransactionWithPricesResponse } from "../types";
3
+ export declare const listOrderTransactionsWithPrices: (input: ListOrderTransactionsWithPricesQueryParams, excludeFields?: string[], config?: ConfigType) => Promise<APIResponse<ListOrderTransactionWithPricesResponse> | APIResponse<undefined>>;
4
+ export type ListOrderTransactionsWithPricesQueryParams = {
5
+ input: ListOrderTransactionWithPricesInput;
6
+ };
@@ -30,6 +30,7 @@ export type CustomerAttributePermissionEnum = "CustomerAttributePermissionEnum"
30
30
  export type CustomerAttributeRegisterPageRequirementEnum = "CustomerAttributeRegisterPageRequirementEnum" | "INVISIBLE" | "MANDATORY" | "OPTIONAL";
31
31
  export type CustomerAttributeTypeEnum = "CustomerAttributeTypeEnum" | "BOOLEAN" | "CHOICE" | "DATE" | "DATETIME" | "MULTIPLE_CHOICE" | "NUMERIC" | "TEXT";
32
32
  export type CustomerEmailSubscriptionStatusesEnum = "CustomerEmailSubscriptionStatusesEnum" | "NOT_SUBSCRIBED" | "PENDING_CONFIRMATION" | "SUBSCRIBED";
33
+ export type CustomerExternalAccountLinkProviderEnum = "CustomerExternalAccountLinkProviderEnum" | "miles_smiles";
33
34
  export type CustomerGenderTypeEnum = "CustomerGenderTypeEnum" | "FEMALE" | "MALE" | "OTHER";
34
35
  export type CustomerPriceListRuleFilterTypeEnum = "CustomerPriceListRuleFilterTypeEnum" | "CATEGORY" | "PRODUCT" | "PRODUCT_BRAND" | "PRODUCT_TAG";
35
36
  export type CustomerPriceListRuleValueTypeEnum = "CustomerPriceListRuleValueTypeEnum" | "DISCOUNT_AMOUNT" | "DISCOUNT_RATE" | "FIXED_PRICE";
@@ -49,16 +50,17 @@ export type LoyaltyProgramFilterTypeEnum = "LoyaltyProgramFilterTypeEnum" | "CAT
49
50
  export type LoyaltyProgramMethodSpendingTypeEnum = "LoyaltyProgramMethodSpendingTypeEnum" | "FIXED_AMOUNT" | "FREE_PRODUCT" | "FREE_SHIPPING" | "RATIO";
50
51
  export type LoyaltyProgramOrderStatusToWinPointsEnum = "LoyaltyProgramOrderStatusToWinPointsEnum" | "ORDER_CREATED" | "ORDER_DELIVERED" | "PAYMENT_COMPLETED";
51
52
  export type LoyaltyProgramPointEarningTypeEnum = "LoyaltyProgramPointEarningTypeEnum" | "DYNAMIC_ORDER_AMOUNT" | "DYNAMIC_ORDER_QUANTITY" | "STATIC";
52
- export type LoyaltyProgramPointHistoryTypeEnum = "LoyaltyProgramPointHistoryTypeEnum" | "EARN" | "SPEND" | "REFUND" | "REFILL";
53
+ export type LoyaltyProgramPointHistoryTypeEnum = "LoyaltyProgramPointHistoryTypeEnum" | "EARN" | "MANUAL_DEDUCT" | "MANUAL_EARN" | "REFILL" | "REFUND" | "SPEND";
53
54
  export type MasterPassOperationTypeEnum = "MasterPassOperationTypeEnum" | "CHECK_MASTER_PASS_USER" | "DELETE_CARD" | "DIRECT_PURCHASE" | "FORGOT_PASSWORD" | "LIST_CARDS" | "PURCHASE" | "REGISTER_CARD";
54
55
  export type MerchantSettingsAddressTypeEnum = "MerchantSettingsAddressTypeEnum" | "CORPORATE" | "INDIVIDUAL";
55
56
  export type OrderAdjustmentEnum = "OrderAdjustmentEnum" | "DECREMENT" | "INCREMENT";
56
57
  export type OrderAmountTypeEnum = "OrderAmountTypeEnum" | "AMOUNT" | "RATIO";
57
58
  export type OrderCancelledReasonEnum = "OrderCancelledReasonEnum" | "CUSTOMER" | "DECLINED" | "INVENTORY" | "OTHER";
58
- export type OrderLineItemStatusEnum = "OrderLineItemStatusEnum" | "CANCELLED" | "CANCEL_REJECTED" | "CANCEL_REQUESTED" | "DELIVERED" | "FULFILLED" | "PLANNED" | "REFUNDED" | "REFUND_DELIVERED" | "REFUND_IN_TRANSIT" | "REFUND_REJECTED" | "REFUND_REQUESTED" | "REFUND_REQUEST_ACCEPTED" | "UNFULFILLED";
59
- export type OrderPackageFulfillStatusEnum = "OrderPackageFulfillStatusEnum" | "CANCELLED" | "CANCEL_REJECTED" | "CANCEL_REQUESTED" | "DELIVERED" | "ERROR" | "FULFILLED" | "PLANNED" | "READY_FOR_PICK_UP" | "READY_FOR_SHIPMENT" | "REFUNDED" | "REFUND_DELIVERED" | "REFUND_IN_TRANSIT" | "REFUND_REJECTED" | "REFUND_REQUESTED" | "REFUND_REQUEST_ACCEPTED" | "UNABLE_TO_DELIVER";
60
- export type OrderPackageStatusEnum = "OrderPackageStatusEnum" | "CANCELLED" | "CANCEL_REJECTED" | "CANCEL_REQUESTED" | "DELIVERED" | "FULFILLED" | "PARTIALLY_CANCELLED" | "PARTIALLY_DELIVERED" | "PARTIALLY_FULFILLED" | "PARTIALLY_READY_FOR_SHIPMENT" | "PARTIALLY_REFUNDED" | "PLANNED" | "READY_FOR_PICK_UP" | "READY_FOR_SHIPMENT" | "REFUNDED" | "REFUND_DELIVERED" | "REFUND_IN_TRANSIT" | "REFUND_REJECTED" | "REFUND_REQUESTED" | "REFUND_REQUEST_ACCEPTED" | "UNABLE_TO_DELIVER" | "UNFULFILLED";
59
+ export type OrderLineItemStatusEnum = "OrderLineItemStatusEnum" | "CANCELLED" | "CANCEL_REJECTED" | "CANCEL_REQUESTED" | "DELIVERED" | "FULFILLED" | "PLANNED" | "REFUNDED" | "REFUND_REJECTED" | "REFUND_REQUESTED" | "REFUND_REQUEST_ACCEPTED" | "RETURN_DELIVERED" | "RETURN_IN_TRANSIT" | "RETURN_PARCEL_WAITING" | "RETURN_REJECTED" | "UNFULFILLED" | "WAITING_FOR_PACKAGING";
60
+ export type OrderPackageFulfillStatusEnum = "OrderPackageFulfillStatusEnum" | "CANCELLED" | "CANCEL_REJECTED" | "CANCEL_REQUESTED" | "DELIVERED" | "ERROR" | "FULFILLED" | "PLANNED" | "READY_FOR_PICK_UP" | "READY_FOR_SHIPMENT" | "REFUNDED" | "REFUND_REJECTED" | "REFUND_REQUESTED" | "REFUND_REQUEST_ACCEPTED" | "RETURN_DELIVERED" | "RETURN_IN_TRANSIT" | "RETURN_PARCEL_WAITING" | "RETURN_REJECTED" | "UNABLE_TO_DELIVER" | "WAITING_FOR_PACKAGING";
61
+ export type OrderPackageStatusEnum = "OrderPackageStatusEnum" | "CANCELLED" | "CANCEL_REJECTED" | "CANCEL_REQUESTED" | "DELIVERED" | "FULFILLED" | "PARTIALLY_CANCELLED" | "PARTIALLY_DELIVERED" | "PARTIALLY_FULFILLED" | "PARTIALLY_READY_FOR_SHIPMENT" | "PARTIALLY_REFUNDED" | "PLANNED" | "READY_FOR_PICK_UP" | "READY_FOR_SHIPMENT" | "REFUNDED" | "REFUND_REJECTED" | "REFUND_REQUESTED" | "REFUND_REQUEST_ACCEPTED" | "RETURN_DELIVERED" | "RETURN_IN_TRANSIT" | "RETURN_PARCEL_WAITING" | "RETURN_REJECTED" | "UNABLE_TO_DELIVER" | "UNFULFILLED" | "WAITING_FOR_PACKAGING";
61
62
  export type OrderPaymentStatusEnum = "OrderPaymentStatusEnum" | "FAILED" | "OVER_PAID" | "PAID" | "PARTIALLY_PAID" | "REFUNDED" | "WAITING";
63
+ export type OrderRefundFlowEnum = "OrderRefundFlowEnum" | "CANCEL" | "RETURN";
62
64
  export type OrderShippingMethodEnum = "OrderShippingMethodEnum" | "CLICK_AND_COLLECT" | "DIGITAL_DELIVERY" | "NO_SHIPMENT" | "SHIPMENT";
63
65
  export type OrderStatusEnum = "OrderStatusEnum" | "CANCELLED" | "CREATED" | "DRAFT" | "PARTIALLY_CANCELLED" | "PARTIALLY_REFUNDED" | "REFUNDED" | "REFUND_REJECTED" | "REFUND_REQUESTED" | "WAITING_UPSELL_ACTION";
64
66
  export type PaymentGatewayAdditionalPriceTypeEnum = "PaymentGatewayAdditionalPriceTypeEnum" | "DECREMENT" | "INCREMENT";
@@ -982,6 +984,7 @@ export interface CustomerReviewSummaryStar {
982
984
  star: number;
983
985
  }
984
986
  export interface CustomerSettings {
987
+ allowStoreCredit: boolean | null;
985
988
  birthDateRequirement: CustomerSettingsRequirementEnum | null;
986
989
  createdAt: any | null;
987
990
  deleted: boolean;
@@ -1051,6 +1054,17 @@ export interface GetAvailableStockLocationAddressCountry {
1051
1054
  export interface GetAvailableStockLocationsResponse {
1052
1055
  stockLocations: GetAvailableStockLocation[];
1053
1056
  }
1057
+ export interface ExternalAccountLink {
1058
+ externalId: string;
1059
+ linkedAt: any;
1060
+ provider: CustomerExternalAccountLinkProviderEnum;
1061
+ }
1062
+ export interface MilesSmilesDetailsResponse {
1063
+ availableMiles: number;
1064
+ firstName: string | null;
1065
+ lastName: string | null;
1066
+ memberId: string;
1067
+ }
1054
1068
  export interface GetCustomerCouponResponse {
1055
1069
  campaign: Campaign;
1056
1070
  code: string;
@@ -1074,6 +1088,18 @@ export interface GetProductOptionFileUrl {
1074
1088
  optionUrl: string;
1075
1089
  url: string;
1076
1090
  }
1091
+ export interface GetRefundableLineItemResponse {
1092
+ autoApprove: boolean;
1093
+ flow: OrderRefundFlowEnum | null;
1094
+ isCancellable: boolean;
1095
+ isRefundable: boolean;
1096
+ orderLineItemId: string;
1097
+ }
1098
+ export interface GetRefundableLinesResponse {
1099
+ orderLineItems: GetRefundableLineItemResponse[];
1100
+ refundReasons: OrderRefundReason[];
1101
+ translations: OrderRefundSettingsTranslation[];
1102
+ }
1077
1103
  export interface GetVariantStockLocation {
1078
1104
  stockCount: number;
1079
1105
  stockLocation: GetAvailableStockLocation;
@@ -1089,6 +1115,28 @@ export interface GetY {
1089
1115
  discountType: CampaignGetYDiscountTypeEnum | null;
1090
1116
  filter: CampaignFilter;
1091
1117
  }
1118
+ export interface GiftCard {
1119
+ active: boolean;
1120
+ amount: number;
1121
+ code: string;
1122
+ createdAt: any | null;
1123
+ customerId: string | null;
1124
+ deleted: boolean;
1125
+ endDate: any | null;
1126
+ id: string;
1127
+ minimumRequiredCartAmount: number | null;
1128
+ salesChannels: GiftCardSalesChannel[] | null;
1129
+ startDate: any | null;
1130
+ type: GiftCardTypeEnum;
1131
+ updatedAt: any | null;
1132
+ usedAllAmount: boolean | null;
1133
+ usedAmount: number;
1134
+ }
1135
+ export interface GiftCardSalesChannel {
1136
+ salesChannelId: string;
1137
+ storefrontId: string | null;
1138
+ storefrontRoutingId: string | null;
1139
+ }
1092
1140
  export interface HepsipayFrameInitResponse {
1093
1141
  frameToken: string | null;
1094
1142
  frameUrl: string | null;
@@ -1170,10 +1218,13 @@ export interface LocationTranslations {
1170
1218
  tr: string;
1171
1219
  }
1172
1220
  export interface LoyaltyCustomerInfo {
1221
+ availablePoint: number;
1173
1222
  cartLoyaltyLines: CartLoyaltyLine[] | null;
1223
+ cumulativeEarnedPoints: number;
1174
1224
  customerTier: LoyaltyProgramTier | null;
1175
1225
  loyaltyProgramCustomerId: string;
1176
1226
  loyaltyProgramId: string;
1227
+ nextAvailableDate: any | null;
1177
1228
  nextTierRequiredPoint: number | null;
1178
1229
  totalPoint: number;
1179
1230
  }
@@ -1186,13 +1237,14 @@ export interface LoyaltyProgram {
1186
1237
  name: string;
1187
1238
  orderStatusToWinPoints: LoyaltyProgramOrderStatusToWinPointsEnum;
1188
1239
  previousOrderStartDate: any | null;
1189
- refillPointsOnRefund: boolean;
1240
+ refillPointsOnRefund: boolean | null;
1190
1241
  salesChannels: LoyaltyProgramSaleChannel[] | null;
1191
1242
  spendingMethods: LoyaltyProgramSpendingMethod[] | null;
1192
1243
  tiers: LoyaltyProgramTier[] | null;
1193
1244
  tokenName: string | null;
1194
1245
  updatedAt: any | null;
1195
1246
  validityPeriod: LoyaltyProgramPeriod | null;
1247
+ waitingPeriodDays: number | null;
1196
1248
  }
1197
1249
  export interface LoyaltyProgramDiscountSettings {
1198
1250
  discountAmount: number | null;
@@ -1214,6 +1266,9 @@ export interface LoyaltyProgramPeriod {
1214
1266
  }
1215
1267
  export interface LoyaltyProgramPointHistory {
1216
1268
  amount: number;
1269
+ availableDate: any | null;
1270
+ baseAmount: number | null;
1271
+ baseQuantity: number | null;
1217
1272
  createdAt: any | null;
1218
1273
  customerId: string;
1219
1274
  customerReviewId: string | null;
@@ -1226,6 +1281,8 @@ export interface LoyaltyProgramPointHistory {
1226
1281
  loyaltyProgramSpendingMethodId: string | null;
1227
1282
  orderId: string | null;
1228
1283
  productVariantId: string | null;
1284
+ refundTransactionId: string | null;
1285
+ retroactiveCalculationId: string | null;
1229
1286
  type: LoyaltyProgramPointHistoryTypeEnum;
1230
1287
  updatedAt: any | null;
1231
1288
  }
@@ -1234,6 +1291,7 @@ export interface LoyaltyProgramPointLimit {
1234
1291
  minPointLimit: number | null;
1235
1292
  }
1236
1293
  export interface LoyaltyProgramSaleChannel {
1294
+ pageFilters: StorefrontPopupPageFilter[] | null;
1237
1295
  routingIds: string[] | null;
1238
1296
  salesChannelId: string;
1239
1297
  storefrontId: string | null;
@@ -1261,6 +1319,8 @@ export interface LoyaltyProgramTier {
1261
1319
  id: string;
1262
1320
  isActive: boolean;
1263
1321
  loyaltyProgramId: string;
1322
+ maintenanceType: LoyaltyTierMaintenanceTypeEnum | null;
1323
+ maintenanceTypeEffectiveAt: any | null;
1264
1324
  name: string;
1265
1325
  period: LoyaltyProgramPeriod | null;
1266
1326
  pointsRequired: number | null;
@@ -1446,6 +1506,7 @@ export interface OrderGiftCardLine {
1446
1506
  code: string;
1447
1507
  giftCardId: string;
1448
1508
  id: string;
1509
+ type: GiftCardTypeEnum | null;
1449
1510
  }
1450
1511
  export interface OrderGiftCardLineAppliedTransaction {
1451
1512
  amount: number;
@@ -1675,6 +1736,18 @@ export interface OrderPaymentMethod {
1675
1736
  price: number;
1676
1737
  type: PaymentMethodTypeEnum;
1677
1738
  }
1739
+ export interface OrderRefundReason {
1740
+ createdAt: any | null;
1741
+ deleted: boolean;
1742
+ id: string;
1743
+ title: string;
1744
+ translations: OrderRefundReasonTranslation[] | null;
1745
+ updatedAt: any | null;
1746
+ }
1747
+ export interface OrderRefundReasonTranslation {
1748
+ locale: string;
1749
+ title: string | null;
1750
+ }
1678
1751
  export interface OrderRefundSettings {
1679
1752
  autoApprove: boolean;
1680
1753
  createdAt: any | null;
@@ -1686,6 +1759,10 @@ export interface OrderRefundSettings {
1686
1759
  storefrontId: string | null;
1687
1760
  updatedAt: any | null;
1688
1761
  }
1762
+ export interface OrderRefundSettingsTranslation {
1763
+ locale: string;
1764
+ returnMethodDescription: string | null;
1765
+ }
1689
1766
  export interface OrderSessionInfo {
1690
1767
  countryCode: string | null;
1691
1768
  durationMS: number | null;
@@ -1760,6 +1837,7 @@ export interface PaymentGateway {
1760
1837
  isPassive: boolean | null;
1761
1838
  logoUrl: string | null;
1762
1839
  masterPassClientId: string | null;
1840
+ milesSmilesEnabled: boolean | null;
1763
1841
  name: string;
1764
1842
  paymentGatewayProviderId: string | null;
1765
1843
  paymentMethodType: PaymentMethodTypeEnum;
@@ -2494,6 +2572,10 @@ export interface StockLocationTranslation {
2494
2572
  description: string | null;
2495
2573
  locale: string;
2496
2574
  }
2575
+ export interface StoreCreditBalanceResponse {
2576
+ amount: number;
2577
+ storeCredits: GiftCard[];
2578
+ }
2497
2579
  export interface Storefront {
2498
2580
  analytics4Id: string | null;
2499
2581
  b2bSettings: StorefrontB2BSettings | null;
@@ -3106,6 +3188,7 @@ export interface CreateSaleTransactionWithCartInput {
3106
3188
  cartId: string;
3107
3189
  masterPassDetail?: CreateSaleTransactionMasterPassPaymentMethodDetail | null;
3108
3190
  metadata?: any | null;
3191
+ milesSmiles?: MilesSmilesPaymentInput | null;
3109
3192
  paymentGatewayId: string;
3110
3193
  paymentMethodDetail?: PaymentMethodDetailInput | null;
3111
3194
  }
@@ -3113,6 +3196,7 @@ export interface CreateSaleTransactionWithCheckoutInput {
3113
3196
  checkoutId: string;
3114
3197
  masterPassDetail?: CreateSaleTransactionMasterPassPaymentMethodDetail | null;
3115
3198
  metadata?: any | null;
3199
+ milesSmiles?: MilesSmilesPaymentInput | null;
3116
3200
  paymentGatewayId: string;
3117
3201
  paymentMethodDetail?: PaymentMethodDetailInput | null;
3118
3202
  }
@@ -3162,6 +3246,9 @@ export interface DateFilterInput {
3162
3246
  ne?: any | null;
3163
3247
  nin?: any[] | null;
3164
3248
  }
3249
+ export interface MilesSmilesPaymentInput {
3250
+ miles: number;
3251
+ }
3165
3252
  export interface GetCustomerCouponsInput {
3166
3253
  customerId: string;
3167
3254
  }
@@ -3174,6 +3261,10 @@ export interface GetProductCampaignsInput {
3174
3261
  salesChannelId: string;
3175
3262
  variantIds: string[];
3176
3263
  }
3264
+ export interface GetRefundableLinesInput {
3265
+ email?: string | null;
3266
+ orderId: string;
3267
+ }
3177
3268
  export interface HTMLMetaDataTargetTypeEnumFilter {
3178
3269
  eq?: HTMLMetaDataTargetTypeEnum | null;
3179
3270
  in?: HTMLMetaDataTargetTypeEnum[] | null;
@@ -3506,6 +3597,7 @@ export interface UpdatePaypalOrderInput {
3506
3597
  transactionId: string;
3507
3598
  }
3508
3599
  export interface LoyaltyProgramEarningMethod {
3600
+ activatedAt: any | null;
3509
3601
  amountPerPointsEarned: number | null;
3510
3602
  createdAt: any | null;
3511
3603
  deleted: boolean;
@@ -3521,15 +3613,17 @@ export interface LoyaltyProgramEarningMethod {
3521
3613
  pointsEarned: number;
3522
3614
  productSettings: LoyaltyProgramEarningMethodProductSettings | null;
3523
3615
  quantityPerPointsEarned: number | null;
3616
+ requireImageForCustomerReview: boolean | null;
3524
3617
  segmentId: string | null;
3525
3618
  tierIds: string[] | null;
3526
3619
  translations: LoyaltyProgramMethodTranslation[] | null;
3527
3620
  updatedAt: any | null;
3528
3621
  validityPeriod: LoyaltyProgramPeriod | null;
3622
+ waitingPeriodDays: number | null;
3529
3623
  }
3530
3624
  export interface LoyaltyProgramEarningMethodOrderSettings {
3531
3625
  maxOrderAmount: number | null;
3532
- minOrderAmount: number;
3626
+ minOrderAmount: number | null;
3533
3627
  productFilters: LoyaltyProgramFilter[] | null;
3534
3628
  }
3535
3629
  export interface LoyaltyProgramEarningMethodProductSettings {
@@ -3537,3 +3631,4 @@ export interface LoyaltyProgramEarningMethodProductSettings {
3537
3631
  minProductQuantity: number | null;
3538
3632
  productFilters: LoyaltyProgramFilter[] | null;
3539
3633
  }
3634
+ export type LoyaltyTierMaintenanceTypeEnum = "LoyaltyTierMaintenanceTypeEnum" | "AUTO_MAINTENANCE" | "NO_MAINTENANCE";
@@ -5,6 +5,12 @@ export default interface API<T> {
5
5
  saveBulk?: (models: T[]) => Promise<APIResponse<any>>;
6
6
  delete?: (idList: string[]) => Promise<APIResponse<any>>;
7
7
  }
8
+ /**
9
+ * Error codes the SDK itself distinguishes. NOT exhaustive: the APIResponse
10
+ * constructor copies `extensions.code` from GraphQL errors verbatim, so
11
+ * `errorCodes` can carry backend codes that are not listed here (e.g.
12
+ * VARIANT_NOT_FOUND). Never build an exhaustive switch over this enum.
13
+ */
8
14
  export declare enum APIErrorCode {
9
15
  ARGUMENT_VALIDATION_ERROR = "ARGUMENT_VALIDATION_ERROR",
10
16
  UNAUTHENTICATED = "UNAUTHENTICATED",
@@ -15,6 +21,7 @@ export declare enum APIErrorCode {
15
21
  REQUEST_CANCELLED = "REQUEST_CANCELLED",
16
22
  DUPLICATE_KEY_ERROR = "DUPLICATE_KEY_ERROR",
17
23
  CUSTOMER_ALREADY_SUBSCRIBED = "CUSTOMER_ALREADY_SUBSCRIBED",
24
+ MAX_QUANTITY_PER_CART_LIMIT_REACHED = "MAX_QUANTITY_PER_CART_LIMIT_REACHED",
18
25
  UNKNOWN = "UNKNOWN"
19
26
  }
20
27
  export declare class APIResponse<T> {
@@ -1,4 +1,6 @@
1
1
  import { IkasCustomerReviewSettings, IkasCustomerSettings, IkasIndexPageSeoSetting, IkasLoyaltyProgram, IkasMerchantSettings, IkasProductBackInStockSettings, IkasSalesChannelPaymentGateway, IkasStorefontMetaTemplates, IkasStorefrontB2BSettings, IkasStorefrontPopup, IkasStorefrontRouting, IkasStorefrontType, IkasThemeStockPreference } from "../../storefront-models/src";
2
+ import { ThemeGlobals } from "./theme-globals";
3
+ export * from "./theme-globals";
2
4
  export declare class IkasStorefrontConfig {
3
5
  static themeId?: string;
4
6
  static apiUrl?: string;
@@ -25,8 +27,10 @@ export declare class IkasStorefrontConfig {
25
27
  static universalAnalyticsId?: string;
26
28
  static pickUpStockLocationIds?: string[] | null;
27
29
  static tiktokPixelId?: string;
30
+ static openAiPixelId?: string;
28
31
  static stockPreference?: IkasThemeStockPreference;
29
32
  static translations: Record<string, any>;
33
+ static themeGlobals: ThemeGlobals;
30
34
  static storefrontJSScripts: string[];
31
35
  static highPriorityStoreFrontJSScripts: string[];
32
36
  static customerReviewSettings?: IkasCustomerReviewSettings | null;
@@ -98,8 +102,10 @@ export type IkasStorefrontConfigParams = {
98
102
  universalAnalyticsId?: string;
99
103
  pickUpStockLocationIds?: string[] | null;
100
104
  tiktokPixelId?: string;
105
+ openAiPixelId?: string;
101
106
  stockPreference?: IkasThemeStockPreference;
102
107
  translations: Record<string, any>;
108
+ themeGlobals: ThemeGlobals;
103
109
  storefrontJSScripts: string[];
104
110
  highPriorityStoreFrontJSScripts: string[];
105
111
  customerReviewSettings?: IkasCustomerReviewSettings | null;
@@ -119,6 +125,32 @@ export type IkasStorefrontConfigParams = {
119
125
  payWithIkasUrl?: string | null;
120
126
  isPreview: boolean;
121
127
  };
128
+ type RoutingLike = {
129
+ id: string;
130
+ path?: string | null;
131
+ };
132
+ /** The source routing: the first one without a path. Its language is the theme's base language. */
133
+ export declare function getSourceRouting<T extends RoutingLike>(routings: T[]): T | undefined;
134
+ /** The `sfRoutingId` a routing's theme values are stored under: the source routing uses the base values. */
135
+ export declare function getSfRoutingId(routing: RoutingLike | undefined): string | undefined;
136
+ /** `translations` with the keys it lacks or leaves empty taken from `fallback` (the base language's). */
137
+ export declare function withFallbackTranslations(translations: Record<string, any> | undefined, fallback: Record<string, any> | undefined): Record<string, any>;
138
+ type I18nTree = {
139
+ [key: string]: string | I18nTree;
140
+ };
141
+ type I18nOwner = {
142
+ projectId: string;
143
+ i18n?: I18nTree | null;
144
+ translations?: Array<{
145
+ locale: string;
146
+ i18n?: I18nTree | null;
147
+ }> | null;
148
+ };
149
+ /**
150
+ * The code component projects' UI texts in `locale`, for `I18n` under `cc.<projectId>`: the language's, the base
151
+ * texts (the project's `default.json`) for those it lacks. A project's generated `t()` reads them.
152
+ */
153
+ export declare function codeComponentI18n(projects: I18nOwner[] | undefined | null, locale?: string): Record<string, any>;
122
154
  /**
123
155
  * Takes any string, escapes it for JSON, and also makes sure
124
156
  * </script> is escaped as <\/script>. Designed to work with nested JSON.stringify.