@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.
- package/dist/analytics/analytics-functions/addToCart.js +1 -1
- package/dist/analytics/analytics-functions/addToWishlist.js +1 -1
- package/dist/analytics/analytics-functions/completeRegistration.js +1 -1
- package/dist/analytics/analytics-functions/contactForm.js +1 -1
- package/dist/analytics/analytics-functions/createEmailSubscription.js +1 -1
- package/dist/analytics/analytics-functions/customerLogin.js +1 -1
- package/dist/analytics/analytics-functions/customerLogout.js +1 -1
- package/dist/analytics/analytics-functions/customerVisit.js +1 -1
- package/dist/analytics/analytics-functions/pageView.js +1 -1
- package/dist/analytics/analytics-functions/productView.js +1 -1
- package/dist/analytics/analytics-functions/removeFromCart.js +1 -1
- package/dist/analytics/analytics-functions/search.js +1 -1
- package/dist/analytics/analytics-functions/viewBrand.js +1 -1
- package/dist/analytics/analytics-functions/viewCart.js +1 -1
- package/dist/analytics/analytics-functions/viewCategory.js +1 -1
- package/dist/analytics/analytics-functions/viewListing.js +1 -1
- package/dist/analytics/analytics-functions/viewSearchResults.js +1 -1
- package/dist/analytics/analytics-functions/viewStorefrontPopup.js +1 -1
- package/dist/analytics/events.d.ts +8 -0
- package/dist/analytics/events.js +1 -1
- package/dist/analytics/ikas/analytics.js +1 -1
- package/dist/analytics/openai/addToCart.d.ts +2 -0
- package/dist/analytics/openai/addToCart.js +1 -0
- package/dist/analytics/openai/completeRegistration.d.ts +1 -0
- package/dist/analytics/openai/completeRegistration.js +1 -0
- package/dist/analytics/openai/contactForm.d.ts +1 -0
- package/dist/analytics/openai/contactForm.js +1 -0
- package/dist/analytics/openai/initAdvancedMatching.d.ts +12 -0
- package/dist/analytics/openai/initAdvancedMatching.js +1 -0
- package/dist/analytics/openai/pageView.d.ts +1 -0
- package/dist/analytics/openai/pageView.js +1 -0
- package/dist/analytics/openai/productView.d.ts +2 -0
- package/dist/analytics/openai/productView.js +1 -0
- package/dist/analytics/openai/utils.d.ts +26 -0
- package/dist/analytics/openai/utils.js +1 -0
- package/dist/analytics/utils.d.ts +1 -0
- package/dist/analytics/utils.js +1 -1
- package/dist/functions/api/cart/index.d.ts +2 -0
- package/dist/functions/api/cart/index.js +1 -1
- package/dist/functions/api/customer/index.d.ts +12 -2
- package/dist/functions/api/customer/index.js +1 -1
- package/dist/functions/api/loyalty/index.d.ts +2 -1
- package/dist/functions/api/loyalty/index.js +1 -1
- package/dist/functions/api/product/index.js +1 -1
- package/dist/functions/models/attribute-detail/index.d.ts +3 -0
- package/dist/functions/models/attribute-list/index.d.ts +3 -0
- package/dist/functions/models/image/index.d.ts +71 -21
- package/dist/functions/models/image/index.js +1 -1
- package/dist/functions/models/index.d.ts +1 -0
- package/dist/functions/models/order/index.d.ts +139 -4
- package/dist/functions/models/order/index.js +1 -1
- package/dist/functions/models/product/attribute-value/index.d.ts +5 -0
- package/dist/functions/models/product/index.d.ts +22 -0
- package/dist/functions/models/product/index.js +1 -1
- package/dist/functions/models/product/variant/index.d.ts +96 -6
- package/dist/functions/models/product/variant/index.js +1 -1
- package/dist/functions/models/product-list/index.d.ts +21 -0
- package/dist/functions/models/product-list/index.js +1 -1
- package/dist/functions/models/validator/address/index.d.ts +70 -2
- package/dist/functions/models/validator/deactivate-customer/index.d.ts +54 -0
- package/dist/functions/models/validator/deactivate-customer/index.js +1 -0
- package/dist/functions/stores/base/index.d.ts +75 -0
- package/dist/functions/stores/base/index.js +1 -1
- package/dist/functions/stores/cart/index.d.ts +46 -2
- package/dist/functions/stores/cart/index.js +1 -1
- package/dist/functions/stores/customer/index.d.ts +349 -29
- package/dist/functions/stores/customer/index.js +1 -1
- package/dist/i18n/ikas-texts.d.ts +425 -0
- package/dist/i18n/index.d.ts +19 -0
- package/dist/index.d.ts +5 -1
- package/dist/index.js +1 -1
- package/dist/packages/storefront-api/src/__api/mutations/removeGiftCardFromCart.js +1 -0
- package/dist/packages/storefront-api/src/__api/mutations/unlinkExternalAccount.js +1 -0
- package/dist/packages/storefront-api/src/__api/queries/getExternalAccountLink.js +1 -0
- package/dist/packages/storefront-api/src/__api/queries/getLoyaltyProgram.js +1 -0
- package/dist/packages/storefront-api/src/__api/queries/getMilesSmilesDetails.js +1 -0
- package/dist/packages/storefront-api/src/__api/queries/getRefundableLines.js +1 -0
- package/dist/packages/storefront-api/src/__api/queries/listOrderTransactionsWithPrices.js +1 -0
- package/dist/packages/storefront-api-client/src/utils/api.js +1 -1
- package/dist/packages/storefront-config/src/index.js +1 -1
- package/dist/packages/storefront-config/src/theme-globals.js +1 -0
- package/dist/router/index.d.ts +28 -0
- package/dist/router/index.js +1 -1
- package/dist/storefront-api/src/__api/mutations/removeGiftCardFromCart.d.ts +7 -0
- package/dist/storefront-api/src/__api/mutations/unlinkExternalAccount.d.ts +6 -0
- package/dist/storefront-api/src/__api/queries/getExternalAccountLink.d.ts +6 -0
- package/dist/storefront-api/src/__api/queries/getLoyaltyProgram.d.ts +3 -0
- package/dist/storefront-api/src/__api/queries/getMilesSmilesDetails.d.ts +3 -0
- package/dist/storefront-api/src/__api/queries/getRefundableLines.d.ts +6 -0
- package/dist/storefront-api/src/__api/queries/listOrderTransactionsWithPrices.d.ts +6 -0
- package/dist/storefront-api/src/__api/types/index.d.ts +101 -6
- package/dist/storefront-api-client/src/utils/api.d.ts +7 -0
- package/dist/storefront-config/src/index.d.ts +32 -0
- package/dist/storefront-config/src/theme-globals.d.ts +349 -0
- package/dist/storefront-models/src/index.d.ts +8 -0
- package/dist/storefront-models/src/models/blueprint/prop-value/attribute-list.d.ts +2 -0
- package/dist/storefront-models/src/models/blueprint/prop-value/attribute.d.ts +2 -0
- package/dist/storefront-models/src/models/blueprint/prop-value/color.d.ts +2 -0
- package/dist/storefront-models/src/models/blueprint/prop-value/index.d.ts +1 -0
- package/dist/storefront-models/src/models/blueprint/prop-value/link.d.ts +10 -0
- package/dist/storefront-models/src/models/blueprint/prop-value/variable-binding.d.ts +16 -0
- package/dist/storefront-models/src/models/image/index.d.ts +7 -0
- package/dist/storefront-models/src/models/loyalty-program/customer-info/index.d.ts +2 -0
- package/dist/storefront-models/src/models/loyalty-program/earning-method/index.d.ts +1 -0
- package/dist/storefront-models/src/models/loyalty-program/index.d.ts +1 -0
- package/dist/storefront-models/src/models/loyalty-program/point-history/index.d.ts +1 -0
- package/dist/storefront-models/src/models/order/gift-card-line/index.d.ts +15 -0
- package/dist/storefront-models/src/models/order/index.d.ts +10 -0
- package/dist/storefront-models/src/models/order/line-item/index.d.ts +6 -1
- package/dist/storefront-models/src/models/order/package/index.d.ts +1 -1
- package/dist/storefront-models/src/models/order/refund/reason/index.d.ts +6 -0
- package/dist/storefront-models/src/models/order/refund/reason/translation/index.d.ts +4 -0
- package/dist/storefront-models/src/models/order/refund/refundable-line/index.d.ts +8 -0
- package/dist/storefront-models/src/models/order/refund/refundable-lines/index.d.ts +8 -0
- package/dist/storefront-models/src/models/order/refund/settings/translation/index.d.ts +4 -0
- package/dist/storefront-models/src/models/payment-gateway/index.d.ts +3 -1
- package/dist/storefront-models/src/models/product/attribute/index.d.ts +6 -1
- package/dist/storefront-models/src/models/product/campaign/data/index.d.ts +2 -0
- package/dist/storefront-models/src/models/product/campaign/filter/index.d.ts +1 -1
- package/dist/storefront-models/src/models/product/campaign/product-tiered-discount/index.d.ts +13 -0
- package/dist/storefront-models/src/models/product/image/index.d.ts +5 -0
- package/dist/storefront-models/src/models/product/variant/index.d.ts +17 -0
- package/dist/storefront-models/src/models/storefront/index.d.ts +1 -0
- package/dist/storefront-models/src/models/validator/deactivate-customer/index.d.ts +4 -0
- package/dist/stores/customer/index.d.ts +2 -1
- package/dist/stores/customer/index.js +1 -1
- package/dist/theme/settings/index.d.ts +51 -0
- package/dist/theme/settings/index.js +1 -0
- package/dist/utils/component-renderer.js +1 -1
- package/dist/utils/currency.d.ts +36 -3
- package/dist/utils/helper.d.ts +1 -0
- package/dist/utils/helper.js +1 -1
- package/dist/utils/pay-with-ikas.d.ts +552 -0
- package/dist/utils/pay-with-ikas.js +1 -0
- package/dist/utils/svg.d.ts +15 -0
- package/dist/utils/svg.js +1 -0
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as t,__generator as
|
|
1
|
+
import{__awaiter as t,__generator as a}from'./../../ext/tslib/tslib.es6.mjs.js';import{notifySubscribers as e}from"../events.js";import{hasOpenAiPixel as r,hasTiktokPixel as s,hasGoogleAnalytics as o,hasGoogleTagManager as n,canTrack as i,hasFacebookPixel as d}from"../utils.js";function c(c,l,u,m,p){return t(this,void 0,void 0,function(){var t;return a(this,function(a){switch(a.label){case 0:return a.trys.push([0,13,,14]),i()?(e({type:"ADD_TO_CART",data:{item:c,quantity:l,cart:m}}),d()?[4,import("../facebook/addToCart.js")]:[3,2]):[2];case 1:(0,a.sent().fbp_addToCart)(c,u),a.label=2;case 2:return n()?[4,import("../google-tag-manager/addToCart.js")]:[3,4];case 3:(0,a.sent().gtm_addToCart)(c,l,p),a.label=4;case 4:return[4,import("../ikas/analytics.js")];case 5:return[4,(0,a.sent().iks_addToCart)(c,m,u)];case 6:return a.sent(),o()?[4,import("../google-analytics/addToCart.js")]:[3,8];case 7:(0,a.sent().ga_addToCart)(c,l),a.label=8;case 8:return s()?[4,import("../tiktok/addToCart.js")]:[3,10];case 9:(0,a.sent().tik_addToCart)(c,l),a.label=10;case 10:return r()?[4,import("../openai/addToCart.js")]:[3,12];case 11:(0,a.sent().oai_addToCart)(c,l,u),a.label=12;case 12:return[3,14];case 13:return t=a.sent(),console.error(t),[3,14];case 14:return[2]}})})}export{c as anl_addToCart};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as
|
|
1
|
+
import{__awaiter as t,__generator as s}from'./../../ext/tslib/tslib.es6.mjs.js';import{notifySubscribers as e}from"../events.js";import{hasTiktokPixel as r,canTrack as i,hasFacebookPixel as o}from"../utils.js";function n(n,a){return t(this,void 0,void 0,function(){var t,c;return s(this,function(s){switch(s.label){case 0:return s.trys.push([0,7,,8]),i()?(t=Date.now().toString(),e({type:a?"REMOVE_FROM_WISHLIST":"ADD_TO_WISHLIST",data:{productId:n}}),o()?[4,import("../facebook/addToWishlist.js")]:[3,2]):[2];case 1:(0,s.sent().fbp_addToWishlist)(n,t),s.label=2;case 2:return r()?[4,import("../tiktok/addToWishlist.js")]:[3,4];case 3:(0,s.sent().tik_addToWishlist)(n),s.label=4;case 4:return[4,import("../ikas/analytics.js")];case 5:return[4,(0,s.sent().iks_addToWishlist)(n,t)];case 6:return s.sent(),[3,8];case 7:return c=s.sent(),console.error(c),[3,8];case 8:return[2]}})})}export{n as anl_addToWishlist};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as
|
|
1
|
+
import{__awaiter as e,__generator as t,__assign as i}from'./../../ext/tslib/tslib.es6.mjs.js';import{notifySubscribers as s}from"../events.js";import{hasOpenAiPixel as a,hasTiktokPixel as n,hasGoogleTagManager as r,hasFacebookPixel as o,canTrack as c}from"../utils.js";function l(l,m){return e(this,void 0,void 0,function(){var e,p,u;return t(this,function(t){switch(t.label){case 0:return t.trys.push([0,15,,16]),c()?(s({type:"CUSTOMER_REGISTER",data:i({email:l.email,firstName:l.firstName,lastName:l.lastName,notificationsAccepted:l.subscriptionStatus},m?{attributes:l.attributes}:{})}),e={em:l.email,fn:l.firstName,ln:l.lastName,ph:l.phone,external_id:l.id},o()?[4,import("../facebook/initAdvancedMatching.js")]:[3,2]):[2];case 1:(0,t.sent().fbp_initAdvancedMatching)(e),t.label=2;case 2:return a()?[4,import("../openai/initAdvancedMatching.js")]:[3,4];case 3:(0,t.sent().oai_initAdvancedMatching)(e),t.label=4;case 4:return p=Date.now().toString(),m?[3,12]:o()?[4,import("../facebook/completeRegistration.js")]:[3,6];case 5:(0,t.sent().fbp_completeRegistration)(p),t.label=6;case 6:return r()?[4,import("../google-tag-manager/completeRegistration.js")]:[3,8];case 7:(0,t.sent().gtm_completeRegistration)(l),t.label=8;case 8:return n()?[4,import("../tiktok/completeRegistration.js")]:[3,10];case 9:(0,t.sent().tik_completeRegistration)(),t.label=10;case 10:return a()?[4,import("../openai/completeRegistration.js")]:[3,12];case 11:(0,t.sent().oai_completeRegistration)(p),t.label=12;case 12:return[4,import("../ikas/analytics.js")];case 13:return[4,(0,t.sent().iks_customerRegister)(p)];case 14:return t.sent(),[3,16];case 15:return u=t.sent(),console.error(u),[3,16];case 16:return[2]}})})}export{l as anl_completeRegistration};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as t,__generator as r}from'./../../ext/tslib/tslib.es6.mjs.js';import{
|
|
1
|
+
import{__awaiter as t,__generator as r}from'./../../ext/tslib/tslib.es6.mjs.js';import{notifySubscribers as e}from"../events.js";import{hasOpenAiPixel as o,hasTiktokPixel as s,canTrack as n,hasFacebookPixel as a}from"../utils.js";function c(c){return t(this,void 0,void 0,function(){var t,i;return r(this,function(r){switch(r.label){case 0:return r.trys.push([0,9,,10]),n()?(t=Date.now().toString(),e({type:"CONTACT_FORM",data:{form:c}}),a()?[4,import("../facebook/contactForm.js")]:[3,2]):[2];case 1:(0,r.sent().fbp_contactForm)(t),r.label=2;case 2:return s()?[4,import("../tiktok/contactForm.js")]:[3,4];case 3:(0,r.sent().tik_contactForm)(),r.label=4;case 4:return o()?[4,import("../openai/contactForm.js")]:[3,6];case 5:(0,r.sent().oai_contactForm)(t),r.label=6;case 6:return[4,import("../ikas/analytics.js")];case 7:return[4,(0,r.sent().iks_contactForm)(t)];case 8:return r.sent(),[3,10];case 9:return i=r.sent(),console.error(i),[3,10];case 10:return[2]}})})}export{c as anl_contactForm};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as
|
|
1
|
+
import{__awaiter as e,__generator as t}from'./../../ext/tslib/tslib.es6.mjs.js';import{notifySubscribers as n}from"../events.js";import{hasOpenAiPixel as i,canTrack as r,hasFacebookPixel as s}from"../utils.js";function a(a){return e(this,void 0,void 0,function(){var e;return t(this,function(t){switch(t.label){case 0:return t.trys.push([0,5,,6]),r()?(n({type:"EMAIL_SUBSCRIPTION",data:{email:a}}),s()?[4,import("../facebook/initAdvancedMatching.js")]:[3,2]):[2];case 1:(0,t.sent().fbp_initAdvancedMatching)({em:a}),t.label=2;case 2:return i()?[4,import("../openai/initAdvancedMatching.js")]:[3,4];case 3:(0,t.sent().oai_initAdvancedMatching)({em:a}),t.label=4;case 4:return[3,6];case 5:return e=t.sent(),console.error(e),[3,6];case 6:return[2]}})})}export{a as anl_createEmailSubscription};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as e,__generator as t}from'./../../ext/tslib/tslib.es6.mjs.js';import{
|
|
1
|
+
import{__awaiter as e,__generator as t}from'./../../ext/tslib/tslib.es6.mjs.js';import{notifySubscribers as s}from"../events.js";import{hasGoogleTagManager as n,hasOpenAiPixel as r,hasFacebookPixel as i,canTrack as a}from"../utils.js";import{getCustomerInfo as o}from"./helpers.js";function c(){return e(this,void 0,void 0,function(){var e,c,m;return t(this,function(t){switch(t.label){case 0:return t.trys.push([0,10,,11]),a()?[4,o()]:[2];case 1:return(e=t.sent())&&e.email?(s({type:"CUSTOMER_LOGIN",data:{customer:e}}),c={em:e.email,fn:e.firstName,ln:e.lastName,ph:e.phone,external_id:e.id},i()?[4,import("../facebook/initAdvancedMatching.js")]:[3,3]):[2];case 2:(0,t.sent().fbp_initAdvancedMatching)(c),t.label=3;case 3:return r()?[4,import("../openai/initAdvancedMatching.js")]:[3,5];case 4:(0,t.sent().oai_initAdvancedMatching)(c),t.label=5;case 5:return n()?[4,import("../google-tag-manager/customerLogin.js")]:[3,7];case 6:(0,t.sent().gtm_customerLogin)(e),t.label=7;case 7:return[4,import("../ikas/analytics.js")];case 8:return[4,(0,t.sent().iks_customerLogin)()];case 9:return t.sent(),[3,11];case 10:return m=t.sent(),console.error(m),[3,11];case 11:return[2]}})})}export{c as anl_customerLogin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as t,__generator as
|
|
1
|
+
import{__awaiter as t,__generator as e}from'./../../ext/tslib/tslib.es6.mjs.js';import{notifySubscribers as r}from"../events.js";import{canTrack as o,hasGoogleTagManager as s}from"../utils.js";function n(){return t(this,void 0,void 0,function(){var t;return e(this,function(e){switch(e.label){case 0:return e.trys.push([0,3,,4]),o()?(r({type:"CUSTOMER_LOGOUT",data:{}}),s()?[4,import("../google-tag-manager/customerLogout.js")]:[3,2]):[2];case 1:(0,e.sent().gtm_customerLogout)(),e.label=2;case 2:return[3,4];case 3:return t=e.sent(),console.error(t),[3,4];case 4:return[2]}})})}export{n as anl_customerLogout};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as
|
|
1
|
+
import{__awaiter as t,__generator as s}from'./../../ext/tslib/tslib.es6.mjs.js';import{notifySubscribers as e}from"../events.js";import{hasGoogleTagManager as r,canTrack as i}from"../utils.js";import{getCustomerInfo as o}from"./helpers.js";function n(){return t(this,void 0,void 0,function(){var t,n;return s(this,function(s){switch(s.label){case 0:return s.trys.push([0,6,,7]),i()?[4,o()]:[2];case 1:return(t=s.sent())&&t.email?(e({type:"CUSTOMER_VISIT",data:{customer:t}}),r()?[4,import("../google-tag-manager/customerVisit.js")]:[3,3]):[2];case 2:(0,s.sent().gtm_customerVisit)(t),s.label=3;case 3:return[4,import("../ikas/analytics.js")];case 4:return[4,(0,s.sent().iks_customerVisit)()];case 5:return s.sent(),[3,7];case 6:return n=s.sent(),console.error(n),[3,7];case 7:return[2]}})})}export{n as anl_customerVisit};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as e,__generator as t}from'./../../ext/tslib/tslib.es6.mjs.js';import{
|
|
1
|
+
import{__awaiter as e,__generator as t}from'./../../ext/tslib/tslib.es6.mjs.js';import{notifySubscribers as s}from"../events.js";import{hasOpenAiPixel as r,hasTiktokPixel as a,hasFacebookPixel as i,hasGoogleTagManager as n,canTrack as o}from"../utils.js";import{getCustomerInfo as c}from"./helpers.js";function p(p){return e(this,void 0,void 0,function(){var e,u,l,m;return t(this,function(t){switch(t.label){case 0:return t.trys.push([0,14,,15]),o()?[4,import("../ikas/analytics.js")]:[2];case 1:return[4,(0,t.sent().iks_checkJourneyId)()];case 2:return t.sent(),e=window.location.href,[4,c()];case 3:return u=t.sent(),l=Date.now().toString(),s({type:"PAGE_VIEW",data:{url:e,pageType:p,customer:u}}),n()?[4,import("../google-tag-manager/pageView.js")]:[3,5];case 4:(0,t.sent().gtm_pageView)(e),t.label=5;case 5:return i()?[4,import("../facebook/pageView.js")]:[3,7];case 6:(0,t.sent().fbp_pageView)(l),t.label=7;case 7:return[4,import("../ikas/analytics.js")];case 8:return[4,(0,t.sent().iks_pageView)(p,l)];case 9:return t.sent(),a()?[4,import("../tiktok/pageView.js")]:[3,11];case 10:(0,t.sent().tik_pageView)(e),t.label=11;case 11:return r()?[4,import("../openai/pageView.js")]:[3,13];case 12:(0,t.sent().oai_pageView)(l),t.label=13;case 13:return[3,15];case 14:return m=t.sent(),console.error(m),[3,15];case 15:return[2]}})})}export{p as anl_pageView};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as
|
|
1
|
+
import{__awaiter as e,__generator as t}from'./../../ext/tslib/tslib.es6.mjs.js';import{notifySubscribers as r}from"../events.js";import{hasOpenAiPixel as s,hasTiktokPixel as o,hasGoogleAnalytics as i,hasGoogleTagManager as a,canTrack as c,hasFacebookPixel as n}from"../utils.js";function u(u){return e(this,void 0,void 0,function(){var e,p;return t(this,function(t){switch(t.label){case 0:return t.trys.push([0,13,,14]),c()?(e=Date.now().toString(),r({type:"PRODUCT_VIEW",data:{productDetail:u}}),n()?[4,import("../facebook/productView.js")]:[3,2]):[2];case 1:(0,t.sent().fbp_productView)(u,e),t.label=2;case 2:return a()?[4,import("../google-tag-manager/productView.js")]:[3,4];case 3:(0,t.sent().gtm_productView)(u),t.label=4;case 4:return[4,import("../ikas/analytics.js")];case 5:return[4,(0,t.sent().iks_productView)(u,e)];case 6:return t.sent(),i()?[4,import("../google-analytics/productView.js")]:[3,8];case 7:(0,t.sent().ga_productView)(u),t.label=8;case 8:return o()?[4,import("../tiktok/productView.js")]:[3,10];case 9:(0,t.sent().tik_productView)(u),t.label=10;case 10:return s()?[4,import("../openai/productView.js")]:[3,12];case 11:(0,t.sent().oai_productView)(u,e),t.label=12;case 12:return[3,14];case 13:return p=t.sent(),console.error(p),[3,14];case 14:return[2]}})})}export{u as anl_productView};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as r,__generator as e}from'./../../ext/tslib/tslib.es6.mjs.js';import{
|
|
1
|
+
import{__awaiter as r,__generator as e}from'./../../ext/tslib/tslib.es6.mjs.js';import{notifySubscribers as t}from"../events.js";import{hasGoogleAnalytics as o,canTrack as s,hasGoogleTagManager as a}from"../utils.js";function n(n,m,i){return r(this,void 0,void 0,function(){var r;return e(this,function(e){switch(e.label){case 0:return e.trys.push([0,5,,6]),s()?(t({type:"REMOVE_FROM_CART",data:{item:n,quantity:m,cart:i}}),a()?[4,import("../google-tag-manager/removeFromCart.js")]:[3,2]):[2];case 1:(0,e.sent().gtm_removeFromCart)(n,m),e.label=2;case 2:return o()?[4,import("../google-analytics/removeFromCart.js")]:[3,4];case 3:(0,e.sent().ga_removeFromCart)(n,m),e.label=4;case 4:return[3,6];case 5:return r=e.sent(),console.error(r),[3,6];case 6:return[2]}})})}export{n as anl_removeFromCart};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as e,__generator as s}from'./../../ext/tslib/tslib.es6.mjs.js';import{
|
|
1
|
+
import{__awaiter as e,__generator as s}from'./../../ext/tslib/tslib.es6.mjs.js';import{notifySubscribers as r}from"../events.js";import{hasGoogleAnalytics as t,hasTiktokPixel as a,hasGoogleTagManager as n,canTrack as o,hasFacebookPixel as c}from"../utils.js";function i(i,l){return e(this,void 0,void 0,function(){var e,u;return s(this,function(s){switch(s.label){case 0:return s.trys.push([0,11,,12]),o()?(e=Date.now().toString(),r({type:"SEARCH",data:{searchKeyword:i}}),c()?[4,import("../facebook/search.js")]:[3,2]):[2];case 1:(0,s.sent().fbp_search)(i,e),s.label=2;case 2:return n()?[4,import("../google-tag-manager/search.js")]:[3,4];case 3:(0,s.sent().gtm_search)(i),s.label=4;case 4:return a()?[4,import("../tiktok/search.js")]:[3,6];case 5:(0,s.sent().tik_search)(i),s.label=6;case 6:return t()?[4,import("../google-analytics/search.js")]:[3,8];case 7:(0,s.sent().ga_search)(i),s.label=8;case 8:return[4,import("../ikas/analytics.js")];case 9:return[4,(0,s.sent().iks_search)(i,e,l)];case 10:return s.sent(),[3,12];case 11:return u=s.sent(),console.error(u),[3,12];case 12:return[2]}})})}export{i as anl_search};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as r,__generator as
|
|
1
|
+
import{__awaiter as r,__generator as t}from'./../../ext/tslib/tslib.es6.mjs.js';import{notifySubscribers as s}from"../events.js";import{canTrack as e}from"../utils.js";function n(n){return r(this,void 0,void 0,function(){var r;return t(this,function(t){switch(t.label){case 0:return t.trys.push([0,3,,4]),e()?(s({type:"VIEW_BRAND",data:{brand:n}}),[4,import("../ikas/analytics.js")]):[2];case 1:return[4,(0,t.sent().iks_viewBrand)(n)];case 2:return t.sent(),[3,4];case 3:return r=t.sent(),console.error(r),[3,4];case 4:return[2]}})})}export{n as anl_viewBrand};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as e,__generator as t}from'./../../ext/tslib/tslib.es6.mjs.js';import{
|
|
1
|
+
import{__awaiter as e,__generator as t}from'./../../ext/tslib/tslib.es6.mjs.js';import{notifySubscribers as r}from"../events.js";import{hasGoogleAnalytics as s,hasGoogleTagManager as a,canTrack as i,hasFacebookPixel as n}from"../utils.js";function o(o){return e(this,void 0,void 0,function(){var e,c;return t(this,function(t){switch(t.label){case 0:return t.trys.push([0,9,,10]),i()?o?(e=Date.now().toString(),r({type:"VIEW_CART",data:{cart:o}}),n()?[4,import("../facebook/viewCart.js")]:[3,2]):[3,8]:[2];case 1:(0,t.sent().fbp_viewCart)(o,e),t.label=2;case 2:return a()?[4,import("../google-tag-manager/viewCart.js")]:[3,4];case 3:(0,t.sent().gtm_viewCart)(o),t.label=4;case 4:return[4,import("../ikas/analytics.js")];case 5:return[4,(0,t.sent().iks_viewCart)(o,e)];case 6:return t.sent(),s()?[4,import("../google-analytics/viewCart.js")]:[3,8];case 7:(0,t.sent().ga_viewCart)(o),t.label=8;case 8:return[3,10];case 9:return c=t.sent(),console.error(c),[3,10];case 10:return[2]}})})}export{o as anl_viewCart};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as e,__generator as t}from'./../../ext/tslib/tslib.es6.mjs.js';import{
|
|
1
|
+
import{__awaiter as e,__generator as t}from'./../../ext/tslib/tslib.es6.mjs.js';import{notifySubscribers as r}from"../events.js";import{hasTiktokPixel as s,hasGoogleTagManager as o,canTrack as a,hasFacebookPixel as i}from"../utils.js";function n(n,c){return e(this,void 0,void 0,function(){var e,u;return t(this,function(t){switch(t.label){case 0:return t.trys.push([0,9,,10]),a()?(e=Date.now().toString(),r({type:"VIEW_CATEGORY",data:{categoryPath:n,category:c}}),i()?[4,import("../facebook/viewCategory.js")]:[3,2]):[2];case 1:(0,t.sent().fbp_viewCategory)(n,e),t.label=2;case 2:return o()?[4,import("../google-tag-manager/viewCategory.js")]:[3,4];case 3:(0,t.sent().gtm_viewCategory)(c,n),t.label=4;case 4:return[4,import("../ikas/analytics.js")];case 5:return[4,(0,t.sent().iks_viewCategory)(c,n,e)];case 6:return t.sent(),s()?[4,import("../tiktok/viewCategory.js")]:[3,8];case 7:(0,t.sent().tik_viewCategory)(c),t.label=8;case 8:return[3,10];case 9:return u=t.sent(),console.error(u),[3,10];case 10:return[2]}})})}export{n as anl_viewCategory};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{notifySubscribers as t}from"../events.js";import{canTrack as r}from"../utils.js";function o(o){try{if(!r())return;t({type:"VIEW_LISTING",data:{productDetails:o}})}catch(t){console.error(t)}}export{o as anl_viewListing};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{notifySubscribers as r}from"../events.js";import{canTrack as t}from"../utils.js";function o(o,e){try{if(!t())return;r({type:"VIEW_SEARCH_RESULTS",data:{searchKeyword:o,productDetails:e}})}catch(r){console.error(r)}}export{o as anl_viewSearchResults};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as
|
|
1
|
+
import{__awaiter as t,__generator as s}from'./../../ext/tslib/tslib.es6.mjs.js';import{notifySubscribers as r}from"../events.js";import{canTrack as e}from"../utils.js";function i(i){return t(this,void 0,void 0,function(){var t;return s(this,function(s){switch(s.label){case 0:return s.trys.push([0,3,,4]),e()?(r({type:"POPUP_VIEW",data:{popup:i}}),[4,import("../ikas/analytics.js")]):[2];case 1:return[4,(0,s.sent().iks_viewPopup)(i.id)];case 2:return s.sent(),[3,4];case 3:return t=s.sent(),console.error(t),[3,4];case 4:return[2]}})})}export{i as anl_viewStorefrontPopup};
|
|
@@ -13,3 +13,11 @@ export type IkasEvent = {
|
|
|
13
13
|
type: IkasEventType;
|
|
14
14
|
data: any;
|
|
15
15
|
};
|
|
16
|
+
/**
|
|
17
|
+
* The single notification path every `anl_*` function goes through.
|
|
18
|
+
*
|
|
19
|
+
* Callers invoke this BEFORE any network wait (pixel chunk `await import`s included): MPA
|
|
20
|
+
* themes navigate via `location.href` in the same tick an event's trigger resolves, which
|
|
21
|
+
* cancels in-flight requests and would otherwise leave subscribers unnotified.
|
|
22
|
+
*/
|
|
23
|
+
export declare function notifySubscribers(event: IkasEvent): void;
|
package/dist/analytics/events.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{cloneDeep as r,tryForEach as s}from"../utils/helper.js";import{Analytics as i}from"./analytics.js";function n(r){var s=function(r){if(e(r)){var s=i.subscribers.findIndex(function(s){return s.id===r.id});-1!==s?i.subscribers[s]=r:i.subscribers.push(r)}};return r.forEach(s),{subscribe:s,unsubscribe:function(r){var s=i.subscribers.findIndex(function(s){return s.id===r});-1!==s&&i.subscribers.splice(s,1)}}}function c(){if("undefined"!=typeof window){var r=[];try{var s=window.IkasEvents;s&&s.subscribers&&s.subscribers.length&&(r=s.subscribers)}catch(r){console.error(r)}window.IkasEvents=n(r)}}function e(r){return!!(r&&r.id&&"string"==typeof r.id&&r.callback&&"function"==typeof r.callback)}function u(n){if(i.subscribers.length){var c=r(n);s(i.subscribers,function(r){return r.callback(c)})}}export{n as IkasEvents,c as initIkasEvents,e as isValidIkasEventSubscriber,u as notifySubscribers};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as t,__generator as e,__assign as n}from'./../../ext/tslib/tslib.es6.mjs.js';import{IkasStorefrontConfig as r}from"../../packages/storefront-config/src/index.js";import{getSelectedProductVariant as i}from"../../functions/models/product/index.js";import{getCookieValue as s}from"../../utils/helper.js";import"../../router/index.js";import"../../stores/cart/index.js";import{getCategoryPath as o}from"../../functions/models/category/index.js";import{customerStore as c}from"../../stores/customer/index.js";import'./../../ext/uuid/dist/esm-browser/stringify.js';import'./../../ext/uuid/dist/esm-browser/v3.js';import'./../../ext/uuid/dist/esm-browser/native.js';import'./../../ext/uuid/dist/esm-browser/v5.js';import"../../i18n/index.js";import'./../../ext/mobx/dist/mobx.esm.js';import"../../functions/models/product-list/index.js";import{getProductVariantPrice as u,getProductVariantFinalPrice as d}from"../../functions/models/product/variant/index.js";import'./../../ext/lodash/_isFlattenable.js';import'./../../ext/lodash/sortBy.js';import{baseStore as a}from"../../stores/base/index.js";import{waitForCustomerStoreInit as l}from"../../functions/stores/customer/index.js";import"../analytics.js";import'./../../ext/animejs/lib/anime.esm.js';import"../../packages/storefront-api-client/src/utils/api.js";import'./../../ext/isomorphic-fetch/fetch-npm-node.js';import"../../packages/storefront-api/src/index.js";import"../../theme/styles/index.js";import'./../../ext/preact/dist/preact.mjs.js';import'./../../ext/preact/hooks/dist/hooks.mjs.js';import"../../utils/fetch.js";import"../../packages/storefront-models/src/models/merchant-settings/index.js";var E,O;!function(t){t[t.SESSION_START=1]="SESSION_START",t[t.PAGE_VIEW=2]="PAGE_VIEW",t[t.PRODUCT_VIEW=3]="PRODUCT_VIEW",t[t.ADD_TO_CART=4]="ADD_TO_CART",t[t.VIEW_CART=5]="VIEW_CART",t[t.ORDER_SUCCESS=6]="ORDER_SUCCESS",t[t.BEGIN_CHECKOUT=7]="BEGIN_CHECKOUT",t[t.CHECKOUT_STEP=8]="CHECKOUT_STEP",t[t.CUSTOMER_REGISTER=9]="CUSTOMER_REGISTER",t[t.CUSTOMER_VISIT=10]="CUSTOMER_VISIT",t[t.CUSTOMER_LOGIN=11]="CUSTOMER_LOGIN",t[t.BRAND_VIEW=12]="BRAND_VIEW",t[t.CATEGORY_VIEW=13]="CATEGORY_VIEW",t[t.POPUP_VIEW=14]="POPUP_VIEW",t[t.SEARCH=15]="SEARCH",t[t.FAVORITE_PRODUCT=16]="FAVORITE_PRODUCT",t[t.CONTACT_FORM=17]="CONTACT_FORM",t[t.CONTACT_FORM_BACKEND=205]="CONTACT_FORM_BACKEND"}(E||(E={})),function(t){t[t.INDEX=1]="INDEX",t[t.CATEGORY=2]="CATEGORY",t[t.BRAND=3]="BRAND",t[t.PRODUCT=4]="PRODUCT",t[t.CUSTOM=5]="CUSTOM",t[t.ACCOUNT=6]="ACCOUNT",t[t.ADDRESSES=7]="ADDRESSES",t[t.ORDERS=8]="ORDERS",t[t.ORDER_DETAIL=9]="ORDER_DETAIL",t[t.LOGIN=10]="LOGIN",t[t.REGISTER=11]="REGISTER",t[t.FORGOT_PASSWORD=12]="FORGOT_PASSWORD",t[t.RECOVER_PASSWORD=13]="RECOVER_PASSWORD",t[t.CART=14]="CART",t[t.FAVORITE_PRODUCTS=15]="FAVORITE_PRODUCTS",t[t.SEARCH=16]="SEARCH",t[t.NOT_FOUND=17]="NOT_FOUND",t[t.BLOG=18]="BLOG",t[t.BLOG_INDEX=19]="BLOG_INDEX",t[t.BLOG_CATEGORY=20]="BLOG_CATEGORY",t[t.CHECKOUT=21]="CHECKOUT"}(O||(O={}));var R=import.meta.env.VITE_PUBLIC_ANALYTICS_URL?"".concat(import.meta.env.VITE_PUBLIC_ANALYTICS_URL,"/sendEventV2"):"https://0.myikas.com/sendEventV2",_=function(){function t(){}return t.SESSION_ID_KEY="ikas_session_id",t.VISITOR_ID_KEY="ikas_visitor_id",t.JOURNEY_ID_KEY="ikas_journey_id",t.EXPIRY_LENGTH=18e5,t}();function f(r,i){return t(this,void 0,void 0,function(){return e(this,function(t){switch(t.label){case 0:return[4,M([{id:i,t:E.PAGE_VIEW,ts:Date.now(),d:n(n({},W()),{pt:B(r)})}])];case 1:return t.sent(),[2]}})})}function T(r,s){return t(this,void 0,void 0,function(){var t,c,a,l;return e(this,function(e){switch(e.label){case 0:return t=[],c=[],r.categories&&r.categories.length>0&&o(r.categories[0]).map(function(e){t.push(e.name),c.push(e.id)}),a=i(r),l=u(a),[4,M([{id:s,t:E.PRODUCT_VIEW,ts:Date.now(),d:n(n({},W()),{d:n({pr:n({id:r.id,vid:a.id,cp:t,cid:c,n:r.name,pr:d(a)},(null==l?void 0:l.currency)?{c:null==l?void 0:l.currency}:{})},r.brand?{br:{id:r.brand.id}}:{})})}])];case 1:return e.sent(),[2]}})})}function I(r,i,s){return t(this,void 0,void 0,function(){return e(this,function(t){switch(t.label){case 0:return[4,M([{id:s,t:E.ADD_TO_CART,ts:Date.now(),d:n(n({},W()),{d:{crt:{id:i.id,c:i.currencyCode,pr:i.totalFinalPrice,il:K(i)},crtItm:H(r)}})}])];case 1:return t.sent(),[2]}})})}function m(r,i){return t(this,void 0,void 0,function(){return e(this,function(t){switch(t.label){case 0:return[4,M([{id:i,t:E.VIEW_CART,ts:Date.now(),d:n(n({},W()),{d:{crt:{id:r.id,c:r.currencyCode,pr:r.totalFinalPrice,il:K(r)}}})}])];case 1:return t.sent(),[2]}})})}function C(r,i){return t(this,void 0,void 0,function(){return e(this,function(t){switch(t.label){case 0:return[4,M([{id:i,t:E.ORDER_SUCCESS,ts:Date.now(),d:n(n({},W()),{d:{chk:{id:r.id,s:"success",p:r.totalFinalPrice,c:r.currencyCode,il:K(r)}}})}])];case 1:return t.sent(),[4,y()];case 2:return t.sent(),[2]}})})}function v(r,i){return t(this,void 0,void 0,function(){return e(this,function(t){switch(t.label){case 0:return[4,M([{id:i,t:E.BEGIN_CHECKOUT,ts:Date.now(),d:n(n({},W()),{d:{chk:{id:r.id,p:r.totalFinalPrice,c:r.currencyCode,il:K(r)}}})}])];case 1:return t.sent(),[2]}})})}function S(r,i){return t(this,void 0,void 0,function(){return e(this,function(t){switch(t.label){case 0:return[4,M([{t:E.CHECKOUT_STEP,ts:Date.now(),d:n(n({},W()),{d:{chk:{id:r.id,s:i,p:r.totalFinalPrice,c:r.currencyCode,il:K(r)}}})}])];case 1:return t.sent(),[2]}})})}function h(r){return t(this,void 0,void 0,function(){return e(this,function(t){switch(t.label){case 0:return[4,M([{id:r,t:E.CUSTOMER_REGISTER,ts:Date.now(),d:n(n({},W()),{d:{cst:F()}})}])];case 1:return t.sent(),[2]}})})}function D(){return t(this,void 0,void 0,function(){return e(this,function(t){switch(t.label){case 0:return[4,M([{t:E.CUSTOMER_LOGIN,ts:Date.now(),d:n(n({},W()),{d:{cst:F()}})}])];case 1:return t.sent(),[2]}})})}function p(){return t(this,void 0,void 0,function(){return e(this,function(t){switch(t.label){case 0:return[4,M([{t:E.CUSTOMER_VISIT,ts:Date.now(),d:n(n({},W()),{d:{cst:F()}})}])];case 1:return t.sent(),[2]}})})}function A(r){return t(this,void 0,void 0,function(){return e(this,function(t){switch(t.label){case 0:return[4,M([{t:E.BRAND_VIEW,ts:Date.now(),d:n(n({},W()),{d:{cst:F(),br:{id:r.id}}})}])];case 1:return t.sent(),[2]}})})}function N(r,i,s){return t(this,void 0,void 0,function(){return e(this,function(t){switch(t.label){case 0:return[4,M([{id:s,t:E.CATEGORY_VIEW,ts:Date.now(),d:n(n({},W()),{d:{cst:F(),ctg:{id:r.id,cp:i}}})}])];case 1:return t.sent(),[2]}})})}function U(r){return t(this,void 0,void 0,function(){return e(this,function(t){switch(t.label){case 0:return[4,M([{t:E.POPUP_VIEW,ts:Date.now(),d:n(n({},W()),{d:{cst:F()},m:{sfpid:r}})}])];case 1:return t.sent(),[2]}})})}function P(r,i,s){return t(this,void 0,void 0,function(){return e(this,function(t){switch(t.label){case 0:return[4,M([{id:i,t:E.SEARCH,ts:Date.now(),d:n(n({},W()),{d:{src:n({s:r},s?{r:s}:{})}})}])];case 1:return t.sent(),[2]}})})}function x(r){return t(this,void 0,void 0,function(){return e(this,function(t){switch(t.label){case 0:return[4,M([{id:r,t:E.CONTACT_FORM,ts:Date.now(),d:n({},W())}])];case 1:return t.sent(),[2]}})})}function w(r,i){return t(this,void 0,void 0,function(){return e(this,function(t){switch(t.label){case 0:return[4,M([{id:i,t:E.FAVORITE_PRODUCT,ts:Date.now(),d:n(n({},W()),{d:{pr:{id:r}}})}])];case 1:return t.sent(),[2]}})})}function G(){return t(this,void 0,void 0,function(){return e(this,function(t){switch(t.label){case 0:return localStorage.removeItem(_.JOURNEY_ID_KEY),_.journeyId=void 0,[4,b()];case 1:return t.sent(),[2]}})})}function b(){return t(this,void 0,void 0,function(){var t,n;return e(this,function(e){switch(e.label){case 0:return e.trys.push([0,4,,5]),(t=localStorage.getItem(_.JOURNEY_ID_KEY))?(_.journeyId=t,[3,3]):[3,1];case 1:return[4,V()];case 2:e.sent(),e.label=3;case 3:return r.init({journeyId:_.journeyId||""}),[3,5];case 4:return n=e.sent(),console.error(n),[3,5];case 5:return[2]}})})}function j(){return t(this,void 0,void 0,function(){return e(this,function(t){return[2,"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)})]})})}function y(){return t(this,void 0,void 0,function(){var t,n,r;return e(this,function(e){switch(e.label){case 0:return e.trys.push([0,3,,4]),r={},[4,j()];case 1:return r.id=e.sent(),r.expiry=Date.now()+_.EXPIRY_LENGTH,t=r,localStorage.setItem(_.SESSION_ID_KEY,JSON.stringify(t)),_.sessionId=t.id,[4,L()];case 2:return e.sent(),[3,4];case 3:return n=e.sent(),console.error(n),[3,4];case 4:return[2]}})})}function V(){return t(this,void 0,void 0,function(){var t;return e(this,function(e){switch(e.label){case 0:return[4,j()];case 1:return t=e.sent(),localStorage.setItem(_.JOURNEY_ID_KEY,t),_.journeyId=t,[2]}})})}function g(){return t(this,void 0,void 0,function(){var t,n,i;return e(this,function(e){switch(e.label){case 0:return e.trys.push([0,7,,8]),(t=localStorage.getItem(_.SESSION_ID_KEY))?(n=JSON.parse(t)).expiry<Date.now()||n.id.length<=13?[4,y()]:[3,2]:[3,4];case 1:return e.sent(),[3,3];case 2:_.sessionId=n.id,e.label=3;case 3:return[3,6];case 4:return[4,y()];case 5:e.sent(),e.label=6;case 6:return r.init({sessionId:_.sessionId||""}),[3,8];case 7:return i=e.sent(),console.error(i),[3,8];case 8:return[2]}})})}function L(){return t(this,void 0,void 0,function(){return e(this,function(t){switch(t.label){case 0:return[4,M([{t:E.SESSION_START,ts:Date.now(),d:n({},W())}])];case 1:return t.sent(),[2]}})})}function Y(){return t(this,void 0,void 0,function(){var t,n,i;return e(this,function(e){switch(e.label){case 0:return e.trys.push([0,4,,5]),(t=localStorage.getItem(_.VISITOR_ID_KEY))&&t.length>13?(_.visitorId=t,[3,3]):[3,1];case 1:return n=_,[4,j()];case 2:n.visitorId=e.sent(),localStorage.setItem(_.VISITOR_ID_KEY,_.visitorId),e.label=3;case 3:return r.init({visitorId:_.visitorId}),[3,5];case 4:return i=e.sent(),console.error(i),[3,5];case 5:return[2]}})})}function B(t){switch(t){case"INDEX":return O.INDEX;case"CATEGORY":return O.CATEGORY;case"BRAND":return O.BRAND;case"PRODUCT":return O.PRODUCT;case"CUSTOM":return O.CUSTOM;case"ACCOUNT":return O.ACCOUNT;case"ADDRESSES":return O.ADDRESSES;case"ORDERS":return O.ORDERS;case"ORDER_DETAIL":return O.ORDER_DETAIL;case"LOGIN":return O.LOGIN;case"REGISTER":return O.REGISTER;case"FORGOT_PASSWORD":return O.FORGOT_PASSWORD;case"RECOVER_PASSWORD":return O.RECOVER_PASSWORD;case"CART":return O.CART;case"FAVORITE_PRODUCTS":return O.FAVORITE_PRODUCTS;case"SEARCH":return O.SEARCH;case"NOT_FOUND":return O.NOT_FOUND;case"BLOG":return O.BLOG;case"BLOG_INDEX":return O.BLOG_INDEX;case"BLOG_CATEGORY":return O.BLOG_CATEGORY;case"CHECKOUT":return O.CHECKOUT}}function F(){var t=c.customer;return{id:(null==t?void 0:t.id)||void 0,e:(null==t?void 0:t.email)||void 0,c:c._customerConsentGranted}}function W(){return{u:window.location.href,r:document.referrer,pt:a.currentPageType?B(a.currentPageType):void 0,m:{fbp:s("_fbp"),fbc:s("_fbc")}}}function K(t){return t.orderLineItems.map(function(t){return n(n(n(n({},t.variant.productId?{pid:t.variant.productId}:{}),t.variant.id?{vid:t.variant.id}:{}),{c:t.quantity}),t.finalPrice?{p:t.finalPrice}:{})})}function H(t){return n(n(n(n({},t.variant.productId?{pid:t.variant.productId}:{}),t.variant.id?{vid:t.variant.id}:{}),{c:t.quantity}),t.finalPrice?{p:t.finalPrice}:{})}function M(i){return t(this,void 0,void 0,function(){var t,s,o,u,d,a,E,O,f,T,I;return e(this,function(e){switch(e.label){case 0:return e.trys.push([0,6,,7]),[4,l(c)];case 1:return e.sent(),[4,g()];case 2:return e.sent(),[4,Y()];case 3:return e.sent(),[4,b()];case 4:return e.sent(),t={e:i,scid:r.salesChannelId,sfid:r.storefrontId,sid:_.sessionId,jid:_.journeyId,vid:_.visitorId,sfrid:r.storefrontRoutingId||"",ud:n(n(n(n({id:null===(o=c.customer)||void 0===o?void 0:o.id},(null===(u=c.customer)||void 0===u?void 0:u.email)?{em:null===(d=c.customer)||void 0===d?void 0:d.email}:{}),(null===(a=c.customer)||void 0===a?void 0:a.phone)?{ph:null===(E=c.customer)||void 0===E?void 0:E.phone}:{}),(null===(O=c.customer)||void 0===O?void 0:O.lastName)?{ln:null===(f=c.customer)||void 0===f?void 0:f.lastName}:{}),(null===(T=c.customer)||void 0===T?void 0:T.firstName)?{fn:null===(I=c.customer)||void 0===I?void 0:I.firstName}:{}),v:3},[4,fetch(R,{method:"POST",body:JSON.stringify(t),headers:{"Content-Type":"application/json","x-api-key":r.apiKey}})];case 5:return e.sent(),[3,7];case 6:return s=e.sent(),console.error(s),[3,7];case 7:return[2]}})})}export{_ as default,I as iks_addToCart,w as iks_addToWishlist,v as iks_beginCheckout,b as iks_checkJourneyId,S as iks_checkoutStep,x as iks_contactForm,D as iks_customerLogin,h as iks_customerRegister,p as iks_customerVisit,f as iks_pageView,T as iks_productView,C as iks_purchase,G as iks_refreshJourneyId,P as iks_search,A as iks_viewBrand,m as iks_viewCart,N as iks_viewCategory,U as iks_viewPopup};
|
|
1
|
+
import{__awaiter as t,__generator as e,__assign as n}from'./../../ext/tslib/tslib.es6.mjs.js';import{IkasStorefrontConfig as r}from"../../packages/storefront-config/src/index.js";import{getSelectedProductVariant as i}from"../../functions/models/product/index.js";import{getCookieValue as s,getOpenAiAttributionMetadata as o}from"../../utils/helper.js";import"../../router/index.js";import"../../stores/cart/index.js";import{getCategoryPath as c}from"../../functions/models/category/index.js";import{customerStore as u}from"../../stores/customer/index.js";import'./../../ext/uuid/dist/esm-browser/stringify.js';import'./../../ext/uuid/dist/esm-browser/v3.js';import'./../../ext/uuid/dist/esm-browser/native.js';import'./../../ext/uuid/dist/esm-browser/v5.js';import"../../i18n/index.js";import'./../../ext/mobx/dist/mobx.esm.js';import"../../functions/models/product-list/index.js";import{getProductVariantPrice as d,getProductVariantFinalPrice as a}from"../../functions/models/product/variant/index.js";import'./../../ext/lodash/_isFlattenable.js';import'./../../ext/lodash/sortBy.js';import{baseStore as l}from"../../stores/base/index.js";import{waitForCustomerStoreInit as E}from"../../functions/stores/customer/index.js";import"../analytics.js";import'./../../ext/animejs/lib/anime.esm.js';import"../../packages/storefront-api-client/src/utils/api.js";import'./../../ext/isomorphic-fetch/fetch-npm-node.js';import"../../packages/storefront-api/src/index.js";import"../../theme/styles/index.js";import'./../../ext/preact/dist/preact.mjs.js';import'./../../ext/preact/hooks/dist/hooks.mjs.js';import"../../utils/fetch.js";import"../../packages/storefront-models/src/models/merchant-settings/index.js";var O,R;!function(t){t[t.SESSION_START=1]="SESSION_START",t[t.PAGE_VIEW=2]="PAGE_VIEW",t[t.PRODUCT_VIEW=3]="PRODUCT_VIEW",t[t.ADD_TO_CART=4]="ADD_TO_CART",t[t.VIEW_CART=5]="VIEW_CART",t[t.ORDER_SUCCESS=6]="ORDER_SUCCESS",t[t.BEGIN_CHECKOUT=7]="BEGIN_CHECKOUT",t[t.CHECKOUT_STEP=8]="CHECKOUT_STEP",t[t.CUSTOMER_REGISTER=9]="CUSTOMER_REGISTER",t[t.CUSTOMER_VISIT=10]="CUSTOMER_VISIT",t[t.CUSTOMER_LOGIN=11]="CUSTOMER_LOGIN",t[t.BRAND_VIEW=12]="BRAND_VIEW",t[t.CATEGORY_VIEW=13]="CATEGORY_VIEW",t[t.POPUP_VIEW=14]="POPUP_VIEW",t[t.SEARCH=15]="SEARCH",t[t.FAVORITE_PRODUCT=16]="FAVORITE_PRODUCT",t[t.CONTACT_FORM=17]="CONTACT_FORM",t[t.CONTACT_FORM_BACKEND=205]="CONTACT_FORM_BACKEND"}(O||(O={})),function(t){t[t.INDEX=1]="INDEX",t[t.CATEGORY=2]="CATEGORY",t[t.BRAND=3]="BRAND",t[t.PRODUCT=4]="PRODUCT",t[t.CUSTOM=5]="CUSTOM",t[t.ACCOUNT=6]="ACCOUNT",t[t.ADDRESSES=7]="ADDRESSES",t[t.ORDERS=8]="ORDERS",t[t.ORDER_DETAIL=9]="ORDER_DETAIL",t[t.LOGIN=10]="LOGIN",t[t.REGISTER=11]="REGISTER",t[t.FORGOT_PASSWORD=12]="FORGOT_PASSWORD",t[t.RECOVER_PASSWORD=13]="RECOVER_PASSWORD",t[t.CART=14]="CART",t[t.FAVORITE_PRODUCTS=15]="FAVORITE_PRODUCTS",t[t.SEARCH=16]="SEARCH",t[t.NOT_FOUND=17]="NOT_FOUND",t[t.BLOG=18]="BLOG",t[t.BLOG_INDEX=19]="BLOG_INDEX",t[t.BLOG_CATEGORY=20]="BLOG_CATEGORY",t[t.CHECKOUT=21]="CHECKOUT"}(R||(R={}));var _=import.meta.env.VITE_PUBLIC_ANALYTICS_URL?"".concat(import.meta.env.VITE_PUBLIC_ANALYTICS_URL,"/sendEventV2"):"https://0.myikas.com/sendEventV2",f=function(){function t(){}return t.SESSION_ID_KEY="ikas_session_id",t.VISITOR_ID_KEY="ikas_visitor_id",t.JOURNEY_ID_KEY="ikas_journey_id",t.EXPIRY_LENGTH=18e5,t}();function T(r,i){return t(this,void 0,void 0,function(){return e(this,function(t){switch(t.label){case 0:return[4,k([{id:i,t:O.PAGE_VIEW,ts:Date.now(),d:n(n({},K()),{pt:F(r)})}])];case 1:return t.sent(),[2]}})})}function I(r,s){return t(this,void 0,void 0,function(){var t,o,u,l;return e(this,function(e){switch(e.label){case 0:return t=[],o=[],r.categories&&r.categories.length>0&&c(r.categories[0]).map(function(e){t.push(e.name),o.push(e.id)}),u=i(r),l=d(u),[4,k([{id:s,t:O.PRODUCT_VIEW,ts:Date.now(),d:n(n({},K()),{d:n({pr:n({id:r.id,vid:u.id,cp:t,cid:o,n:r.name,pr:a(u)},(null==l?void 0:l.currency)?{c:null==l?void 0:l.currency}:{})},r.brand?{br:{id:r.brand.id}}:{})})}])];case 1:return e.sent(),[2]}})})}function m(r,i,s){return t(this,void 0,void 0,function(){return e(this,function(t){switch(t.label){case 0:return[4,k([{id:s,t:O.ADD_TO_CART,ts:Date.now(),d:n(n({},K()),{d:{crt:{id:i.id,c:i.currencyCode,pr:i.totalFinalPrice,il:H(i)},crtItm:M(r)}})}])];case 1:return t.sent(),[2]}})})}function v(r,i){return t(this,void 0,void 0,function(){return e(this,function(t){switch(t.label){case 0:return[4,k([{id:i,t:O.VIEW_CART,ts:Date.now(),d:n(n({},K()),{d:{crt:{id:r.id,c:r.currencyCode,pr:r.totalFinalPrice,il:H(r)}}})}])];case 1:return t.sent(),[2]}})})}function C(r,i){return t(this,void 0,void 0,function(){return e(this,function(t){switch(t.label){case 0:return[4,k([{id:i,t:O.ORDER_SUCCESS,ts:Date.now(),d:n(n({},K()),{d:{chk:{id:r.id,s:"success",p:r.totalFinalPrice,c:r.currencyCode,il:H(r)}}})}])];case 1:return t.sent(),[4,V()];case 2:return t.sent(),[2]}})})}function S(r,i){return t(this,void 0,void 0,function(){return e(this,function(t){switch(t.label){case 0:return[4,k([{id:i,t:O.BEGIN_CHECKOUT,ts:Date.now(),d:n(n({},K()),{d:{chk:{id:r.id,p:r.totalFinalPrice,c:r.currencyCode,il:H(r)}}})}])];case 1:return t.sent(),[2]}})})}function h(r,i){return t(this,void 0,void 0,function(){return e(this,function(t){switch(t.label){case 0:return[4,k([{t:O.CHECKOUT_STEP,ts:Date.now(),d:n(n({},K()),{d:{chk:{id:r.id,s:i,p:r.totalFinalPrice,c:r.currencyCode,il:H(r)}}})}])];case 1:return t.sent(),[2]}})})}function D(r){return t(this,void 0,void 0,function(){return e(this,function(t){switch(t.label){case 0:return[4,k([{id:r,t:O.CUSTOMER_REGISTER,ts:Date.now(),d:n(n({},K()),{d:{cst:W()}})}])];case 1:return t.sent(),[2]}})})}function p(){return t(this,void 0,void 0,function(){return e(this,function(t){switch(t.label){case 0:return[4,k([{t:O.CUSTOMER_LOGIN,ts:Date.now(),d:n(n({},K()),{d:{cst:W()}})}])];case 1:return t.sent(),[2]}})})}function A(){return t(this,void 0,void 0,function(){return e(this,function(t){switch(t.label){case 0:return[4,k([{t:O.CUSTOMER_VISIT,ts:Date.now(),d:n(n({},K()),{d:{cst:W()}})}])];case 1:return t.sent(),[2]}})})}function N(r){return t(this,void 0,void 0,function(){return e(this,function(t){switch(t.label){case 0:return[4,k([{t:O.BRAND_VIEW,ts:Date.now(),d:n(n({},K()),{d:{cst:W(),br:{id:r.id}}})}])];case 1:return t.sent(),[2]}})})}function U(r,i,s){return t(this,void 0,void 0,function(){return e(this,function(t){switch(t.label){case 0:return[4,k([{id:s,t:O.CATEGORY_VIEW,ts:Date.now(),d:n(n({},K()),{d:{cst:W(),ctg:{id:r.id,cp:i}}})}])];case 1:return t.sent(),[2]}})})}function P(r){return t(this,void 0,void 0,function(){return e(this,function(t){switch(t.label){case 0:return[4,k([{t:O.POPUP_VIEW,ts:Date.now(),d:n(n({},K()),{d:{cst:W()},m:{sfpid:r}})}])];case 1:return t.sent(),[2]}})})}function x(r,i,s){return t(this,void 0,void 0,function(){return e(this,function(t){switch(t.label){case 0:return[4,k([{id:i,t:O.SEARCH,ts:Date.now(),d:n(n({},K()),{d:{src:n({s:r},s?{r:s}:{})}})}])];case 1:return t.sent(),[2]}})})}function w(r){return t(this,void 0,void 0,function(){return e(this,function(t){switch(t.label){case 0:return[4,k([{id:r,t:O.CONTACT_FORM,ts:Date.now(),d:n({},K())}])];case 1:return t.sent(),[2]}})})}function G(r,i){return t(this,void 0,void 0,function(){return e(this,function(t){switch(t.label){case 0:return[4,k([{id:i,t:O.FAVORITE_PRODUCT,ts:Date.now(),d:n(n({},K()),{d:{pr:{id:r}}})}])];case 1:return t.sent(),[2]}})})}function b(){return t(this,void 0,void 0,function(){return e(this,function(t){switch(t.label){case 0:return localStorage.removeItem(f.JOURNEY_ID_KEY),f.journeyId=void 0,[4,j()];case 1:return t.sent(),[2]}})})}function j(){return t(this,void 0,void 0,function(){var t,n;return e(this,function(e){switch(e.label){case 0:return e.trys.push([0,4,,5]),(t=localStorage.getItem(f.JOURNEY_ID_KEY))?(f.journeyId=t,[3,3]):[3,1];case 1:return[4,g()];case 2:e.sent(),e.label=3;case 3:return r.init({journeyId:f.journeyId||""}),[3,5];case 4:return n=e.sent(),console.error(n),[3,5];case 5:return[2]}})})}function y(){return t(this,void 0,void 0,function(){return e(this,function(t){return[2,"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)})]})})}function V(){return t(this,void 0,void 0,function(){var t,n,r;return e(this,function(e){switch(e.label){case 0:return e.trys.push([0,3,,4]),r={},[4,y()];case 1:return r.id=e.sent(),r.expiry=Date.now()+f.EXPIRY_LENGTH,t=r,localStorage.setItem(f.SESSION_ID_KEY,JSON.stringify(t)),f.sessionId=t.id,[4,Y()];case 2:return e.sent(),[3,4];case 3:return n=e.sent(),console.error(n),[3,4];case 4:return[2]}})})}function g(){return t(this,void 0,void 0,function(){var t;return e(this,function(e){switch(e.label){case 0:return[4,y()];case 1:return t=e.sent(),localStorage.setItem(f.JOURNEY_ID_KEY,t),f.journeyId=t,[2]}})})}function L(){return t(this,void 0,void 0,function(){var t,n,i;return e(this,function(e){switch(e.label){case 0:return e.trys.push([0,7,,8]),(t=localStorage.getItem(f.SESSION_ID_KEY))?(n=JSON.parse(t)).expiry<Date.now()||n.id.length<=13?[4,V()]:[3,2]:[3,4];case 1:return e.sent(),[3,3];case 2:f.sessionId=n.id,e.label=3;case 3:return[3,6];case 4:return[4,V()];case 5:e.sent(),e.label=6;case 6:return r.init({sessionId:f.sessionId||""}),[3,8];case 7:return i=e.sent(),console.error(i),[3,8];case 8:return[2]}})})}function Y(){return t(this,void 0,void 0,function(){return e(this,function(t){switch(t.label){case 0:return[4,k([{t:O.SESSION_START,ts:Date.now(),d:n({},K())}])];case 1:return t.sent(),[2]}})})}function B(){return t(this,void 0,void 0,function(){var t,n,i;return e(this,function(e){switch(e.label){case 0:return e.trys.push([0,4,,5]),(t=localStorage.getItem(f.VISITOR_ID_KEY))&&t.length>13?(f.visitorId=t,[3,3]):[3,1];case 1:return n=f,[4,y()];case 2:n.visitorId=e.sent(),localStorage.setItem(f.VISITOR_ID_KEY,f.visitorId),e.label=3;case 3:return r.init({visitorId:f.visitorId}),[3,5];case 4:return i=e.sent(),console.error(i),[3,5];case 5:return[2]}})})}function F(t){switch(t){case"INDEX":return R.INDEX;case"CATEGORY":return R.CATEGORY;case"BRAND":return R.BRAND;case"PRODUCT":return R.PRODUCT;case"CUSTOM":return R.CUSTOM;case"ACCOUNT":return R.ACCOUNT;case"ADDRESSES":return R.ADDRESSES;case"ORDERS":return R.ORDERS;case"ORDER_DETAIL":return R.ORDER_DETAIL;case"LOGIN":return R.LOGIN;case"REGISTER":return R.REGISTER;case"FORGOT_PASSWORD":return R.FORGOT_PASSWORD;case"RECOVER_PASSWORD":return R.RECOVER_PASSWORD;case"CART":return R.CART;case"FAVORITE_PRODUCTS":return R.FAVORITE_PRODUCTS;case"SEARCH":return R.SEARCH;case"NOT_FOUND":return R.NOT_FOUND;case"BLOG":return R.BLOG;case"BLOG_INDEX":return R.BLOG_INDEX;case"BLOG_CATEGORY":return R.BLOG_CATEGORY;case"CHECKOUT":return R.CHECKOUT}}function W(){var t=u.customer;return{id:(null==t?void 0:t.id)||void 0,e:(null==t?void 0:t.email)||void 0,c:u._customerConsentGranted}}function K(){return{u:window.location.href,r:document.referrer,pt:l.currentPageType?F(l.currentPageType):void 0,m:n({fbp:s("_fbp"),fbc:s("_fbc")},o())}}function H(t){return t.orderLineItems.map(function(t){return n(n(n(n({},t.variant.productId?{pid:t.variant.productId}:{}),t.variant.id?{vid:t.variant.id}:{}),{c:t.quantity}),t.finalPrice?{p:t.finalPrice}:{})})}function M(t){return n(n(n(n({},t.variant.productId?{pid:t.variant.productId}:{}),t.variant.id?{vid:t.variant.id}:{}),{c:t.quantity}),t.finalPrice?{p:t.finalPrice}:{})}function k(i){return t(this,void 0,void 0,function(){var t,s,o,c,d,a,l,O,R,T,I,m;return e(this,function(e){switch(e.label){case 0:return e.trys.push([0,6,,7]),[4,E(u)];case 1:return e.sent(),[4,L()];case 2:return e.sent(),[4,B()];case 3:return e.sent(),[4,j()];case 4:return e.sent(),t={e:i,scid:r.salesChannelId,sfid:r.storefrontId,sid:f.sessionId,jid:f.journeyId,vid:f.visitorId,sfrid:r.storefrontRoutingId||"",ud:n(n(n(n({id:null===(c=u.customer)||void 0===c?void 0:c.id},(null===(d=u.customer)||void 0===d?void 0:d.email)?{em:null===(a=u.customer)||void 0===a?void 0:a.email}:{}),(null===(l=u.customer)||void 0===l?void 0:l.phone)?{ph:null===(O=u.customer)||void 0===O?void 0:O.phone}:{}),(null===(R=u.customer)||void 0===R?void 0:R.lastName)?{ln:null===(T=u.customer)||void 0===T?void 0:T.lastName}:{}),(null===(I=u.customer)||void 0===I?void 0:I.firstName)?{fn:null===(m=u.customer)||void 0===m?void 0:m.firstName}:{}),v:3},s=JSON.stringify(t),[4,fetch(_,{method:"POST",body:s,headers:{"Content-Type":"application/json","x-api-key":r.apiKey},keepalive:s.length<3e4})];case 5:return e.sent(),[3,7];case 6:return o=e.sent(),console.error(o),[3,7];case 7:return[2]}})})}export{f as default,m as iks_addToCart,G as iks_addToWishlist,S as iks_beginCheckout,j as iks_checkJourneyId,h as iks_checkoutStep,w as iks_contactForm,p as iks_customerLogin,D as iks_customerRegister,A as iks_customerVisit,T as iks_pageView,I as iks_productView,C as iks_purchase,b as iks_refreshJourneyId,x as iks_search,N as iks_viewBrand,v as iks_viewCart,U as iks_viewCategory,P as iks_viewPopup};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__assign as t}from'./../../ext/tslib/tslib.es6.mjs.js';import{extractCartItemData as o}from"../utils.js";import{hasOpenAi as r,measure as s,toOpenAiMoney as e,cartItemToOpenAiContent as i}from"./utils.js";function c(c,m,n){if(r())try{var d=o(c,m);s("items_added",t(t({type:"contents"},e(d.price*m,d.currency||void 0)),{contents:[i(d)]}),n)}catch(t){console.error(t)}}export{c as oai_addToCart};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function oai_completeRegistration(eventId: string): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{hasOpenAi as t,measure as o}from"./utils.js";function r(r){if(t())try{o("registration_completed",{type:"customer_action"},r)}catch(t){console.error(t)}}export{r as oai_completeRegistration};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function oai_contactForm(eventId: string): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{hasOpenAi as t,measure as o}from"./utils.js";function r(r){if(t())try{o("lead_created",{type:"customer_action"},r)}catch(t){console.error(t)}}export{r as oai_contactForm};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type AdvancedMatchingUserData = {
|
|
2
|
+
em?: string | null;
|
|
3
|
+
fn?: string | null;
|
|
4
|
+
ln?: string | null;
|
|
5
|
+
ph?: string | null;
|
|
6
|
+
external_id?: string | null;
|
|
7
|
+
ct?: string | null;
|
|
8
|
+
st?: string | null;
|
|
9
|
+
zp?: string | null;
|
|
10
|
+
country?: string | null;
|
|
11
|
+
};
|
|
12
|
+
export declare function oai_initAdvancedMatching(userData: AdvancedMatchingUserData): Promise<void> | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__awaiter as t,__generator as e}from'./../../ext/tslib/tslib.es6.mjs.js';import{IkasStorefrontConfig as r}from"../../packages/storefront-config/src/index.js";import{hasOpenAi as n,chainAdvancedMatching as i,oaiq as o}from"./utils.js";function s(s){var l=r.openAiPixelId;if(n()&&l)return i(function(){return function(r,n){return t(this,void 0,void 0,function(){var t,i,s,l,d,m,h;return e(this,function(e){switch(e.label){case 0:return[4,Promise.all([p(u(n.em)),p(a(n.ph)),p(c(n.external_id)),p(f(n.fn)),p(f(n.ln))])];case 1:return t=e.sent(),i=t[0],s=t[1],l=t[2],d=t[3],m=t[4],h={},i&&(h.email_sha256=i),s&&(h.phone_number_sha256=s),l&&(h.external_id_sha256=l),d&&(h.first_name_sha256=d),m&&(h.last_name_sha256=m),n.country&&(h.country=n.country.toUpperCase().trim()),n.ct&&(h.city=n.ct.trim()),n.st&&(h.region=n.st.trim()),n.zp&&(h.postal_code=n.zp.trim()),o()&&Object.keys(h).length>0&&o()("init",{pixelId:r,user:h}),[2]}})})}(l,s)})}function u(t){return t?t.trim().toLowerCase():""}function a(t){if(!t)return"";var e=t.replace(/\D/g,"").replace(/^0+/,"");return/^\d{8,15}$/.test(e)?e:""}function c(t){return t?t.trim():""}function f(t){return t?t.toLowerCase().replace(/[\s!-/:-@[-`{-~]/g,""):""}var l=new Map;function p(r){if(!r)return Promise.resolve(void 0);var n=l.get(r);return n||(n=function(r){return t(this,void 0,void 0,function(){var t;return e(this,function(e){switch(e.label){case 0:if("undefined"==typeof crypto||!crypto.subtle||"undefined"==typeof TextEncoder)return[2];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,crypto.subtle.digest("SHA-256",(new TextEncoder).encode(r))];case 2:return t=e.sent(),[2,Array.from(new Uint8Array(t)).map(function(t){return t.toString(16).padStart(2,"0")}).join("")];case 3:return e.sent(),[2];case 4:return[2]}})})}(r),l.set(r,n)),n}export{s as oai_initAdvancedMatching};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function oai_pageView(eventId: string): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{hasOpenAi as t,measure as e}from"./utils.js";function o(o){if(t())try{e("page_viewed",{type:"contents"},o)}catch(t){console.error(t)}}export{o as oai_pageView};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__assign as t}from'./../../ext/tslib/tslib.es6.mjs.js';import{extractProductData as e}from"../utils.js";import{hasOpenAi as o,toOpenAiMoney as n,measure as r}from"./utils.js";function i(i,s){if(o())try{var c=e(i),m=n(c.price,c.currency);r("contents_viewed",t(t({type:"contents"},m),{contents:[t({id:c.variantId,name:c.name,content_type:"product",quantity:1},m)]}),s)}catch(t){console.error(t)}}export{i as oai_productView};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { CommonCartItemData } from "../utils";
|
|
2
|
+
export type OpenAiEventName = "page_viewed" | "contents_viewed" | "items_added" | "registration_completed" | "lead_created";
|
|
3
|
+
export type OpenAiMoney = {
|
|
4
|
+
amount?: number;
|
|
5
|
+
currency?: string;
|
|
6
|
+
};
|
|
7
|
+
export type OpenAiContent = OpenAiMoney & {
|
|
8
|
+
id: string;
|
|
9
|
+
name?: string;
|
|
10
|
+
content_type: "product" | "page";
|
|
11
|
+
quantity?: number;
|
|
12
|
+
};
|
|
13
|
+
export type OpenAiContentsData = OpenAiMoney & {
|
|
14
|
+
type: "contents";
|
|
15
|
+
contents?: OpenAiContent[];
|
|
16
|
+
};
|
|
17
|
+
export type OpenAiCustomerActionData = OpenAiMoney & {
|
|
18
|
+
type: "customer_action";
|
|
19
|
+
};
|
|
20
|
+
export type OpenAiEventData = OpenAiContentsData | OpenAiCustomerActionData;
|
|
21
|
+
export declare const oaiq: () => any;
|
|
22
|
+
export declare const hasOpenAi: () => any;
|
|
23
|
+
export declare function chainAdvancedMatching(task: () => Promise<void>): Promise<void>;
|
|
24
|
+
export declare function measure(eventName: OpenAiEventName, data: OpenAiEventData, eventId?: string): void;
|
|
25
|
+
export declare function cartItemToOpenAiContent(item: CommonCartItemData): OpenAiContent;
|
|
26
|
+
export declare function toOpenAiMoney(value: number | null | undefined, currency: string | undefined): OpenAiMoney;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__assign as n}from'./../../ext/tslib/tslib.es6.mjs.js';import{IkasStorefrontConfig as r}from"../../packages/storefront-config/src/index.js";import{canTrack as t}from"../utils.js";var e=function(){return window.oaiq},o=function(){return t()&&r.openAiPixelId&&e()},i=Promise.resolve();function u(n){return i=i.then(n).catch(function(n){return console.error(n)})}function c(n,r,t){i.then(function(){o()&&e()("measure",n,r,t?{event_id:t}:{})}).catch(function(n){return console.error(n)})}function a(r){return n({id:r.variantId,name:r.name,content_type:"product",quantity:r.quantity},s(r.price,r.currency||void 0))}function s(n,r){var t=function(n,r){var t;try{if("number"!=typeof n||isNaN(n)||!r)return;var e=m.get(r);return void 0===e&&(e=null!==(t=new Intl.NumberFormat("en",{style:"currency",currency:r}).resolvedOptions().maximumFractionDigits)&&void 0!==t?t:2,m.set(r,e)),Math.round(n*Math.pow(10,e))}catch(n){return}}(n,r);return void 0!==t&&r?{amount:t,currency:r}:{}}var m=new Map;export{a as cartItemToOpenAiContent,u as chainAdvancedMatching,o as hasOpenAi,c as measure,e as oaiq,s as toOpenAiMoney};
|
|
@@ -4,6 +4,7 @@ export declare const hasFacebookPixel: () => boolean;
|
|
|
4
4
|
export declare const hasGoogleAnalytics: () => boolean;
|
|
5
5
|
export declare const hasGoogleTagManager: () => boolean;
|
|
6
6
|
export declare const hasTiktokPixel: () => boolean;
|
|
7
|
+
export declare const hasOpenAiPixel: () => boolean;
|
|
7
8
|
export interface CommonProductData {
|
|
8
9
|
id: string;
|
|
9
10
|
variantId: string;
|
package/dist/analytics/utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{IkasStorefrontConfig as i}from"../packages/storefront-config/src/index.js";import{getSelectedProductVariant as e}from"../functions/models/product/index.js";import{isServer as o}from"../utils/helper.js";import"../router/index.js";import"../stores/cart/index.js";import{getCategoryPath as r}from"../functions/models/category/index.js";import"../stores/customer/index.js";import'./../ext/uuid/dist/esm-browser/stringify.js';import'./../ext/uuid/dist/esm-browser/v3.js';import'./../ext/uuid/dist/esm-browser/native.js';import'./../ext/uuid/dist/esm-browser/v5.js';import"../i18n/index.js";import'./../ext/mobx/dist/mobx.esm.js';import{getDefaultSrc as t}from"../functions/models/image/index.js";import"../functions/models/product-list/index.js";import{getProductVariantMainImage as n,getProductVariantPrice as s,getProductVariantFinalPrice as a,getProductVariantSellPrice as d,getProductVariantDiscountPrice as m}from"../functions/models/product/variant/index.js";import'./../ext/lodash/_isFlattenable.js';import'./../ext/lodash/sortBy.js';import"../stores/base/index.js";import"../packages/storefront-api-client/src/utils/api.js";import'./../ext/isomorphic-fetch/fetch-npm-node.js';import"./analytics.js";import'./../ext/animejs/lib/anime.esm.js';import"../packages/storefront-api/src/index.js";import"../theme/styles/index.js";import'./../ext/preact/dist/preact.mjs.js';import'./../ext/preact/hooks/dist/hooks.mjs.js';import"../utils/fetch.js";import"../packages/storefront-models/src/models/merchant-settings/index.js";var u=function(){return!o()&&!i.isEditor},c=function(){return u()&&!!i.fbpId&&!!window.fbq},l=function(){return u()&&!!window.gtag},p=function(){return u()&&!!window.dataLayer},v=function(){return u()&&!!i.tiktokPixelId&&!!window.ttq};function
|
|
1
|
+
import{IkasStorefrontConfig as i}from"../packages/storefront-config/src/index.js";import{getSelectedProductVariant as e}from"../functions/models/product/index.js";import{isServer as o}from"../utils/helper.js";import"../router/index.js";import"../stores/cart/index.js";import{getCategoryPath as r}from"../functions/models/category/index.js";import"../stores/customer/index.js";import'./../ext/uuid/dist/esm-browser/stringify.js';import'./../ext/uuid/dist/esm-browser/v3.js';import'./../ext/uuid/dist/esm-browser/native.js';import'./../ext/uuid/dist/esm-browser/v5.js';import"../i18n/index.js";import'./../ext/mobx/dist/mobx.esm.js';import{getDefaultSrc as t}from"../functions/models/image/index.js";import"../functions/models/product-list/index.js";import{getProductVariantMainImage as n,getProductVariantPrice as s,getProductVariantFinalPrice as a,getProductVariantSellPrice as d,getProductVariantDiscountPrice as m}from"../functions/models/product/variant/index.js";import'./../ext/lodash/_isFlattenable.js';import'./../ext/lodash/sortBy.js';import"../stores/base/index.js";import"../packages/storefront-api-client/src/utils/api.js";import'./../ext/isomorphic-fetch/fetch-npm-node.js';import"./analytics.js";import'./../ext/animejs/lib/anime.esm.js';import"../packages/storefront-api/src/index.js";import"../theme/styles/index.js";import'./../ext/preact/dist/preact.mjs.js';import'./../ext/preact/hooks/dist/hooks.mjs.js';import"../utils/fetch.js";import"../packages/storefront-models/src/models/merchant-settings/index.js";var u=function(){return!o()&&!i.isEditor},c=function(){return u()&&!!i.fbpId&&!!window.fbq},l=function(){return u()&&!!window.gtag},p=function(){return u()&&!!window.dataLayer},v=function(){return u()&&!!i.tiktokPixelId&&!!window.ttq},f=function(){return u()&&!!i.openAiPixelId&&!!window.oaiq};function j(i,o){var u,c,l,p,v=e(i),f=i.categories.length>0?r(i.categories[0]).map(function(i){return i.name}):[],j=null===(u=n(v))||void 0===u?void 0:u.image,g=s(v);return{id:i.id,variantId:v.id,name:i.name,price:null!==(c=a(v))&&void 0!==c?c:0,currency:(null==g?void 0:g.currency)||"TRY",categoryPath:f,categoryString:f.join(" > "),brand:(null===(l=i.brand)||void 0===l?void 0:l.name)||"",variant:v.variantValues.map(function(i){return i.name}).join(" / "),barcode:null===(p=v.barcodeList)||void 0===p?void 0:p[0],image:j?t(j):"",sellPrice:d(v)||void 0,discountPrice:m(v)}}function g(i,e,o){var r,t,n,s,a,d=[];if(null===(r=null==o?void 0:o.categories)||void 0===r?void 0:r.length)(m=o.categories[0]).categoryPath&&m.categoryPath.forEach(function(i){return d.push(i)}),d.push(m.name);else if(null===(t=i.variant.categories)||void 0===t?void 0:t.length){var m;(m=i.variant.categories[0]).categoryPath&&m.categoryPath.forEach(function(i){return d.push(i.name)}),d.push(m.name)}return{id:i.variant.productId||"",variantId:i.variant.id||"",name:i.variant.name,price:i.finalPrice||0,quantity:null!=e?e:i.quantity,currency:i.currencyCode||"",categoryPath:d,categoryString:d.join(" > "),brand:(null===(n=null==o?void 0:o.brand)||void 0===n?void 0:n.name)||(null===(s=i.variant.brand)||void 0===s?void 0:s.name)||"",variant:(null===(a=i.variant.variantValues)||void 0===a?void 0:a.map(function(i){return i.variantValueName}).join(" / "))||""}}function h(i){var e;return{items:i.orderLineItems.map(function(i){return g(i)}),totalPrice:"totalFinalPrice"in i?i.totalFinalPrice:i.totalPrice,currency:i.currencyCode||(null===(e=i.orderLineItems[0])||void 0===e?void 0:e.currencyCode)||"TRY",itemCount:i.orderLineItems.length}}export{u as canTrack,h as extractCartData,g as extractCartItemData,j as extractProductData,c as hasFacebookPixel,l as hasGoogleAnalytics,p as hasGoogleTagManager,f as hasOpenAiPixel,v as hasTiktokPixel};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { AddItemToCartQueryParams } from "../../../storefront-api/src/__api/mutations/addItemToCart";
|
|
2
2
|
import { CreatePayWithIkasSessionUrlQueryParams } from "../../../storefront-api/src/__api/mutations/createPayWithIkasSessionUrl";
|
|
3
|
+
import type { RemoveGiftCardFromCartQueryParams } from "../../../storefront-api/src/__api/mutations/removeGiftCardFromCart";
|
|
3
4
|
import type { SaveCartQueryParams } from "../../../storefront-api/src/__api/mutations/saveCart";
|
|
4
5
|
import type { SaveCartCouponCodeQueryParams } from "../../../storefront-api/src/__api/mutations/saveCartCouponCode";
|
|
5
6
|
import type { UpdateCartCampaignOfferQueryParams } from "../../../storefront-api/src/__api/mutations/updateCartCampaignOffer";
|
|
@@ -10,5 +11,6 @@ export declare function apiGetCartById(params: GetCartByIdQueryParams): Promise<
|
|
|
10
11
|
export declare function apiSaveCart(params: SaveCartQueryParams): Promise<APIResponse<IkasCart | null>>;
|
|
11
12
|
export declare function apiCreatePayWithIkasSessionUrl(params: CreatePayWithIkasSessionUrlQueryParams): Promise<APIResponse<import("../../../storefront-api/src").CreatePayWithIkasSessionUrlResponse>>;
|
|
12
13
|
export declare function apiSaveCartCouponCode(params: SaveCartCouponCodeQueryParams): Promise<APIResponse<IkasCart | null>>;
|
|
14
|
+
export declare function apiRemoveGiftCardFromCart(params: RemoveGiftCardFromCartQueryParams): Promise<APIResponse<IkasCart | null>>;
|
|
13
15
|
export declare function apiAddItemToCart(params: AddItemToCartQueryParams): Promise<APIResponse<IkasCart | null>>;
|
|
14
16
|
export declare function apiUpdateCartCampaignOffer(params: UpdateCartCampaignOfferQueryParams): Promise<APIResponse<IkasCart | null>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as e,__generator as r,__assign as t}from'./../../../ext/tslib/tslib.es6.mjs.js';import{APIResponse as s}from"../../../packages/storefront-api-client/src/utils/api.js";import'./../../../ext/isomorphic-fetch/fetch-npm-node.js';import{IkasStorefrontConfig as i}from"../../../packages/storefront-config/src/index.js";import"../../../analytics/analytics.js";import'./../../../ext/mobx/dist/mobx.esm.js';import'./../../../ext/animejs/lib/anime.esm.js';import"../../../packages/storefront-api/src/index.js";import{initIkasCampaignOffer as n}from"../../models/product/campaign-offer/init.js";import"../../../stores/customer/index.js";import"../../../i18n/index.js";import'./../../../ext/lodash/sortBy.js';import"../../../router/index.js";import"../../../stores/cart/index.js";import"../../../stores/base/index.js";import'./../../../ext/uuid/dist/esm-browser/stringify.js';import'./../../../ext/uuid/dist/esm-browser/v3.js';import'./../../../ext/uuid/dist/esm-browser/native.js';import'./../../../ext/uuid/dist/esm-browser/v5.js';import{initIkasOrder as d}from"../../models/order/index.js";import"../../models/product-list/index.js";import'./../../../ext/lodash/_isFlattenable.js';import"../../../theme/styles/index.js";import'./../../../ext/preact/dist/preact.mjs.js';import'./../../../ext/preact/hooks/dist/hooks.mjs.js';import"../../../utils/fetch.js";import"../../../packages/storefront-models/src/models/merchant-settings/index.js";function
|
|
1
|
+
import{__awaiter as e,__generator as r,__assign as t}from'./../../../ext/tslib/tslib.es6.mjs.js';import{APIResponse as s}from"../../../packages/storefront-api-client/src/utils/api.js";import'./../../../ext/isomorphic-fetch/fetch-npm-node.js';import{IkasStorefrontConfig as i}from"../../../packages/storefront-config/src/index.js";import"../../../analytics/analytics.js";import'./../../../ext/mobx/dist/mobx.esm.js';import'./../../../ext/animejs/lib/anime.esm.js';import"../../../packages/storefront-api/src/index.js";import{initIkasCampaignOffer as n}from"../../models/product/campaign-offer/init.js";import"../../../stores/customer/index.js";import"../../../i18n/index.js";import'./../../../ext/lodash/sortBy.js';import"../../../router/index.js";import"../../../stores/cart/index.js";import"../../../stores/base/index.js";import'./../../../ext/uuid/dist/esm-browser/stringify.js';import'./../../../ext/uuid/dist/esm-browser/v3.js';import'./../../../ext/uuid/dist/esm-browser/native.js';import'./../../../ext/uuid/dist/esm-browser/v5.js';import{initIkasOrder as d}from"../../models/order/index.js";import"../../models/product-list/index.js";import'./../../../ext/lodash/_isFlattenable.js';import"../../../theme/styles/index.js";import'./../../../ext/preact/dist/preact.mjs.js';import'./../../../ext/preact/hooks/dist/hooks.mjs.js';import"../../../utils/fetch.js";import"../../../packages/storefront-models/src/models/merchant-settings/index.js";function a(e){return t(t({},d(e)),{cancelReason:null})}function o(t){return e(this,void 0,void 0,function(){var e,d,o;return r(this,function(r){switch(r.label){case 0:return[4,import("../../../packages/storefront-api/src/__api/queries/getCartById.js")];case 1:return[4,(0,r.sent().getCartById)(t,["merchantId","orderLineItems.variant.tagIds","billingAddress.region.createdAt","billingAddress.region.deleted","billingAddress.region.updatedAt","shippingAddress.region.createdAt","shippingAddress.region.deleted","shippingAddress.region.updatedAt","currencyRates","abandonedCartFlows"])];case 2:return e=r.sent(),d=e.data?a(e.data):null,null===(o=null==d?void 0:d.campaignOffers)||void 0===o||o.forEach(function(e){e.campaignOffer&&n(e.campaignOffer,i.getCurrentLocale())}),[2,new s(d||null,e.graphQLErrors,e.errorCodes)]}})})}function p(t){return e(this,void 0,void 0,function(){var e,i;return r(this,function(r){switch(r.label){case 0:return[4,import("../../../packages/storefront-api/src/__api/mutations/saveCart.js")];case 1:return[4,(0,r.sent().saveCart)(t,["merchantId","orderLineItems.variant.tagIds","billingAddress.region.createdAt","billingAddress.region.deleted","billingAddress.region.updatedAt","shippingAddress.region.createdAt","shippingAddress.region.deleted","shippingAddress.region.updatedAt","currencyRates","abandonedCartFlows"])];case 2:return e=r.sent(),i=e.data?a(e.data):null,[2,new s(i||null,e.graphQLErrors)]}})})}function l(t){return e(this,void 0,void 0,function(){var e;return r(this,function(r){switch(r.label){case 0:return[4,import("../../../packages/storefront-api/src/__api/mutations/createPayWithIkasSessionUrl.js")];case 1:return[4,(0,r.sent().createPayWithIkasSessionUrl)(t)];case 2:return e=r.sent(),[2,new s(e.data,e.graphQLErrors)]}})})}function u(t){return e(this,void 0,void 0,function(){var e,i;return r(this,function(r){switch(r.label){case 0:return[4,import("../../../packages/storefront-api/src/__api/mutations/saveCartCouponCode.js")];case 1:return[4,(0,r.sent().saveCartCouponCode)(t,["merchantId","orderLineItems.variant.tagIds","billingAddress.region.createdAt","billingAddress.region.deleted","billingAddress.region.updatedAt","shippingAddress.region.createdAt","shippingAddress.region.deleted","shippingAddress.region.updatedAt","currencyRates","abandonedCartFlows"])];case 2:return e=r.sent(),i=e.data?a(e.data):null,[2,new s(i||null,e.graphQLErrors)]}})})}function c(t){return e(this,void 0,void 0,function(){var e,i;return r(this,function(r){switch(r.label){case 0:return[4,import("../../../packages/storefront-api/src/__api/mutations/removeGiftCardFromCart.js")];case 1:return[4,(0,r.sent().removeGiftCardFromCart)(t,["merchantId","orderLineItems.variant.tagIds","billingAddress.region.createdAt","billingAddress.region.deleted","billingAddress.region.updatedAt","shippingAddress.region.createdAt","shippingAddress.region.deleted","shippingAddress.region.updatedAt","currencyRates","abandonedCartFlows"])];case 2:return e=r.sent(),i=e.data?a(e.data):null,[2,new s(i||null,e.graphQLErrors)]}})})}function g(t){return e(this,void 0,void 0,function(){var e,i;return r(this,function(r){switch(r.label){case 0:return[4,import("../../../packages/storefront-api/src/__api/mutations/addItemToCart.js")];case 1:return[4,(0,r.sent().addItemToCart)(t,["merchantId","orderLineItems.variant.tagIds","billingAddress.region.createdAt","billingAddress.region.deleted","billingAddress.region.updatedAt","shippingAddress.region.createdAt","shippingAddress.region.deleted","shippingAddress.region.updatedAt","currencyRates","abandonedCartFlows"])];case 2:return e=r.sent(),i=e.data?a(e.data):null,[2,new s(i||null,e.graphQLErrors)]}})})}function m(t){return e(this,void 0,void 0,function(){var e,i;return r(this,function(r){switch(r.label){case 0:return[4,import("../../../packages/storefront-api/src/__api/mutations/updateCartCampaignOffer.js")];case 1:return[4,(0,r.sent().updateCartCampaignOffer)(t,["merchantId","orderLineItems.variant.tagIds","billingAddress.region.createdAt","billingAddress.region.deleted","billingAddress.region.updatedAt","shippingAddress.region.createdAt","shippingAddress.region.deleted","shippingAddress.region.updatedAt","currencyRates","abandonedCartFlows"])];case 2:return e=r.sent(),i=e.data?a(e.data):null,[2,new s(i||null,e.graphQLErrors)]}})})}export{g as apiAddItemToCart,l as apiCreatePayWithIkasSessionUrl,o as apiGetCartById,c as apiRemoveGiftCardFromCart,p as apiSaveCart,u as apiSaveCartCouponCode,m as apiUpdateCartCampaignOffer};
|
|
@@ -14,23 +14,28 @@ import type { SaveLastViewedProductsQueryParams } from "../../../storefront-api/
|
|
|
14
14
|
import type { SaveMyCustomerQueryParams } from "../../../storefront-api/src/__api/mutations/saveMyCustomer";
|
|
15
15
|
import type { SendContactFormToMerchantQueryParams } from "../../../storefront-api/src/__api/mutations/sendContactFormToMerchant";
|
|
16
16
|
import type { SubscribeToMarketingNotificationsQueryParams } from "../../../storefront-api/src/__api/mutations/subscribeToMarketingNotifications";
|
|
17
|
+
import type { UnlinkExternalAccountQueryParams } from "../../../storefront-api/src/__api/mutations/unlinkExternalAccount";
|
|
17
18
|
import type { ValidateCustomerPhoneVerificationCodeQueryParams } from "../../../storefront-api/src/__api/mutations/validateCustomerPhoneVerificationCode";
|
|
18
19
|
import { ValidateOTPCodeQueryParams } from "../../../storefront-api/src/__api/mutations/validateOTPCode";
|
|
19
20
|
import type { CheckCustomerEmailQueryParams } from "../../../storefront-api/src/__api/queries/checkCustomerEmail";
|
|
20
21
|
import type { CustomerSocialLoginQueryParams } from "../../../storefront-api/src/__api/queries/customerSocialLogin";
|
|
21
22
|
import type { GetCustomerOrdersQueryParams } from "../../../storefront-api/src/__api/queries/getCustomerOrders";
|
|
23
|
+
import type { GetExternalAccountLinkQueryParams } from "../../../storefront-api/src/__api/queries/getExternalAccountLink";
|
|
22
24
|
import type { GetLastViewedProductsQueryParams } from "../../../storefront-api/src/__api/queries/getLastViewedProducts";
|
|
23
25
|
import type { GetOrderByEmailQueryParams } from "../../../storefront-api/src/__api/queries/getOrderByEmail";
|
|
26
|
+
import type { GetRefundableLinesQueryParams } from "../../../storefront-api/src/__api/queries/getRefundableLines";
|
|
24
27
|
import type { IsFavoriteProductQueryParams } from "../../../storefront-api/src/__api/queries/isFavoriteProduct";
|
|
25
28
|
import type { ListCustomerReviewsQueryParams } from "../../../storefront-api/src/__api/queries/listCustomerReviews";
|
|
26
29
|
import type { ListCustomerReviewSummaryQueryParams } from "../../../storefront-api/src/__api/queries/listCustomerReviewSummary";
|
|
27
30
|
import type { ListCustomerSettingsQueryParams } from "../../../storefront-api/src/__api/queries/listCustomerSettings";
|
|
28
31
|
import type { ListOrderRefundSettingsQueryParams } from "../../../storefront-api/src/__api/queries/listOrderRefundSettings";
|
|
29
32
|
import type { ListOrderTransactionsQueryParams } from "../../../storefront-api/src/__api/queries/listOrderTransactions";
|
|
33
|
+
import type { ListOrderTransactionsWithPricesQueryParams } from "../../../storefront-api/src/__api/queries/listOrderTransactionsWithPrices";
|
|
30
34
|
import { APIResponse } from "../../../storefront-api-client/src";
|
|
31
|
-
import { IkasCustomer, IkasCustomerAttribute, IkasCustomerReview, IkasCustomerReviewSummary, IkasCustomerSettings, IkasFavoriteProduct, IkasLastViewedProduct, IkasOrder, IkasOrderRefundSettings, IkasOrderTransaction } from "../../../storefront-models/src";
|
|
35
|
+
import { IkasCustomer, IkasCustomerAttribute, IkasCustomerReview, IkasCustomerReviewSummary, IkasCustomerSettings, IkasFavoriteProduct, IkasLastViewedProduct, IkasOrder, IkasOrderRefundSettings, IkasOrderTransaction, IkasRefundableLines } from "../../../storefront-models/src";
|
|
32
36
|
export type IkasRegisterError = "EMAIL_IS_NOT_VERIFIED" | "CUSTOMER_EMAIL_ALREADY_EXISTS" | "UNKOWN" | "B2B_CUSTOMER_ACCOUNT_DISABLED" | "PHONE_IS_NOT_VERIFIED";
|
|
33
37
|
export type IkasLoginError = "CUSTOMER_ACCOUNT_DISABLED" | "EMAIL_IS_NOT_VERIFIED" | "CUSTOMER_NOT_FOUND" | "B2B_CUSTOMER_ACCOUNT_DISABLED" | "UNKOWN" | "PHONE_IS_NOT_VERIFIED" | "WRONG_PASSWORD";
|
|
38
|
+
export type IkasRefundRequestError = "REFUND_NOT_ALLOWED" | "REFUND_REASON_REQUIRED" | "UNKNOWN";
|
|
34
39
|
export declare function apiLogin(params: CustomerLoginQueryParams): Promise<APIResponse<{
|
|
35
40
|
customer: IkasCustomer | null;
|
|
36
41
|
flowId: string | null;
|
|
@@ -62,7 +67,9 @@ export declare function apiSaveCustomerFormData(params: SaveCustomerFormDataQuer
|
|
|
62
67
|
export declare function apiGetOrders(params: GetCustomerOrdersQueryParams): Promise<APIResponse<IkasOrder[]>>;
|
|
63
68
|
export declare function apiGetOrderByEmail(params: GetOrderByEmailQueryParams): Promise<APIResponse<IkasOrder>>;
|
|
64
69
|
export declare function apiListOrderTransactions(params: ListOrderTransactionsQueryParams): Promise<APIResponse<IkasOrderTransaction[]>>;
|
|
65
|
-
export declare function
|
|
70
|
+
export declare function apiListOrderTransactionsWithPrices(params: ListOrderTransactionsWithPricesQueryParams): Promise<APIResponse<import("../../../storefront-api/src").ListOrderTransactionWithPricesResponse>>;
|
|
71
|
+
export declare function apiGetRefundableLines(params: GetRefundableLinesQueryParams): Promise<APIResponse<IkasRefundableLines>>;
|
|
72
|
+
export declare function apiCreateOrderRefundRequest(params: CreateOrderRefundRequestQueryParams): Promise<APIResponse<IkasOrder | null>>;
|
|
66
73
|
export declare function apiSubscribeToMarketingNotifications(params: SubscribeToMarketingNotificationsQueryParams): Promise<APIResponse<undefined> | APIResponse<boolean>>;
|
|
67
74
|
export declare function apiGetLastViewedProducts(params: GetLastViewedProductsQueryParams): Promise<APIResponse<IkasLastViewedProduct[]>>;
|
|
68
75
|
export declare function apiSaveLastViewedProducts(params: SaveLastViewedProductsQueryParams): Promise<APIResponse<undefined> | APIResponse<import("../../../storefront-api/src").ProductLastViewed>>;
|
|
@@ -202,3 +209,6 @@ export declare function apiValidateOTPCode(params: ValidateOTPCodeQueryParams):
|
|
|
202
209
|
export declare function apiDeactivateCustomer(params: CustomerDeactivateQueryParams): Promise<APIResponse<undefined> | APIResponse<boolean>>;
|
|
203
210
|
export declare function apiExportCustomerPersonalData(): Promise<APIResponse<undefined> | APIResponse<string>>;
|
|
204
211
|
export declare function apiGetDigitalProductFileDownloadUrl(orderId: string, orderLineItemId: string): Promise<APIResponse<undefined> | APIResponse<string>>;
|
|
212
|
+
export declare function apiGetExternalAccountLink(params: GetExternalAccountLinkQueryParams): Promise<APIResponse<import("../../../storefront-api/src").ExternalAccountLink | null>>;
|
|
213
|
+
export declare function apiUnlinkExternalAccount(params: UnlinkExternalAccountQueryParams): Promise<APIResponse<boolean>>;
|
|
214
|
+
export declare function apiGetMilesSmilesDetails(): Promise<APIResponse<undefined> | APIResponse<import("../../../storefront-api/src").MilesSmilesDetailsResponse>>;
|