@ikas/storefront 2.0.21 → 2.0.22-alpha.1

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.
@@ -1 +1 @@
1
- import e from'../ext/decode-uri-component/index.js';export{default}from"../node_modules/decode-uri-component/index.js";
1
+ import e from'../ext/strict-uri-encode/index.js';export{default}from"../node_modules/strict-uri-encode/index.js";
@@ -1 +1 @@
1
- import e from'../ext/strict-uri-encode/index.js';export{default}from"../node_modules/strict-uri-encode/index.js";
1
+ import e from'../ext/decode-uri-component/index.js';export{default}from"../node_modules/decode-uri-component/index.js";
@@ -1 +1 @@
1
- import{__awaiter as t,__generator as e,__assign as i,__makeTemplateObject as o}from'../../ext/tslib/tslib.es6.js';import n from'../../ext/graphql-tag/src/index.js';import{apollo as r}from"../apollo.js";import"../../models/data/blog/index.js";import{IkasBrand as a}from"../../models/data/brand/index.js";import{IkasCategory as d,IkasCategoryPath as s,IkasFilterCategory as l}from"../../models/data/category/index.js";import"../../models/data/checkout/index.js";import"../../models/data/customer/address/index.js";import"../../models/data/customer/index.js";import"../../models/data/customer-review/index.js";import{IkasHTMLMetaData as u}from"../../models/data/html-meta-data/index.js";import{IkasImage as m}from"../../models/data/image/index.js";import"../../models/data/installment-info/index.js";import"../../models/data/order/index.js";import"../../models/data/order/line-item/index.js";import"mobx";import"../product-option-file/index.js";import{IkasProduct as p}from"../../models/data/product/index.js";import{IkasProductVariantType as c}from"../../models/data/product/variant-type/index.js";import{IkasProductVariant as v}from"../../models/data/product/variant/index.js";import{IkasProductPrice as f}from"../../models/data/product/variant/price/index.js";import{IkasProductAttribute as g}from"../../models/data/product-attribute/index.js";import{IkasProductAttributeValue as b}from"../../models/data/product/attribute-value/index.js";import{IkasProductFilter as y,IkasApplicableProductFilterValue as j,IkasProductFilterSettings as x}from"../../models/data/product-filter/index.js";import{IkasVariantType as h}from"../../models/data/variant-type/index.js";import{IkasVariantValue as I}from"../../models/data/variant-type/variant-value/index.js";import"../../models/data/order-transaction/index.js";import"../../models/data/product-option-set/index.js";import"../../models/data/raffle/index.js";import"../../models/data/product-campaing/campaign/index.js";import"../../models/theme/theme.js";import"../../models/theme/page/index.js";import"../../models/theme/component/prop/index.js";import"../../models/theme/page/component/prop-value/link.js";import"../../models/ui/brand-list/index.js";import"../../models/ui/blog-list/index.js";import"../../models/ui/blog-category-list/index.js";import"../../models/ui/category-list/index.js";import"../../models/ui/product-detail/index.js";import"../../models/ui/product-list/index.js";import"../../models/ui/product-attribute-detail/index.js";import"../../models/ui/product-attribute-list/index.js";import"../../models/ui/customer-review-list/index.js";import"../../models/ui/validator/index.js";import"../../models/ui/validator/rules/index.js";import"../../models/ui/validator/form/login.js";import"../../models/ui/validator/form/address.js";import"../../models/ui/validator/form/register.js";import"../../models/ui/validator/form/contact-form.js";import"../../models/ui/validator/form/forgot-password.js";import"../../models/ui/validator/form/recover-password.js";import"../../models/ui/validator/form/account-info.js";import"../../models/ui/validator/form/raffle-form.js";import"../../models/ui/validator/form/customer-review.js";import"../../models/ui/raffle-list/index.js";import{IkasThemeStockPreference as w}from"../../models/theme/settings/index.js";import"../../models/theme/custom-data/index.js";import{IkasProductTag as T}from"../../models/data/product-tag/index.js";import{IkasStorefrontConfig as A}from"../../storefront/index.js";import{IkasProductAttributeTableTemplate as D}from"../../models/data/product-attribute/product-attribute-table-template/index.js";var C,k,P=function(){function P(){}return P.searchProducts=function(l,y){return void 0===y&&(y=!1),t(this,void 0,void 0,(function(){var t,j,x,k,P;return e(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),t=n(C||(C=o(["\n query searchProducts($input: SearchInput!) {\n searchProducts(input: $input) {\n count\n data\n facets {\n id\n values {\n count\n id\n }\n }\n limit\n page\n totalCount\n }\n }\n "],["\n query searchProducts($input: SearchInput!) {\n searchProducts(input: $input) {\n count\n data\n facets {\n id\n values {\n count\n id\n }\n }\n limit\n page\n totalCount\n }\n }\n "]))),[4,r.getClient().query({query:t,variables:{input:i(i({},l),{showStockOption:y?A.stockPreference:w.SHOW_ALL,locale:A.getCurrentLocale()})}})];case 1:return j=e.sent(),x=j.data,(k=j.errors)&&k.length?(console.log(k),[2]):[2,i(i({},x.searchProducts),{data:x.searchProducts.data.map((function(t){return function(t){var e,i,o,n,r,l,y="local"===process.env.NEXT_PUBLIC_ENV;return new p({id:t.id,attributes:null===(e=t.attributes)||void 0===e?void 0:e.map((function(t){var e,i,o,n,r,a;return new b({value:t.value,productAttributeId:null===(e=t.productAttribute)||void 0===e?void 0:e.id,productAttributeOptionId:null===(i=t.productAttributeOption)||void 0===i?void 0:i.id,productAttribute:new g({id:null===(o=t.productAttribute)||void 0===o?void 0:o.id,name:null===(n=t.productAttribute)||void 0===n?void 0:n.name,type:null===(r=t.productAttribute)||void 0===r?void 0:r.type,tableTemplate:(null===(a=t.productAttribute)||void 0===a?void 0:a.tableTemplate)?new D(t.productAttribute.tableTemplate):null}),productAttributeOption:t.productAttributeOption})})),brand:new a({id:null===(i=t.brand)||void 0===i?void 0:i.id,name:null===(o=t.brand)||void 0===o?void 0:o.name,metaData:new u({slug:(null===(n=t.brand)||void 0===n?void 0:n.slug)||""})}),categories:null===(r=t.categories)||void 0===r?void 0:r.map((function(t){return new d({id:t.id,name:t.name,path:t.path.map((function(t){return new s(t)})),metaData:new u({slug:t.slug||""})})})),tags:null===(l=t.tags)||void 0===l?void 0:l.map((function(t){return new T({id:t.id,name:t.name})})),description:t.description||void 0,metaData:new u(t.metaData||void 0),name:t.name,shortDescription:t.shortDescription||void 0,productOptionSetId:t.productOptionSetId,variantTypes:t.productVariantTypes.map((function(t){return new c({variantType:new h({id:t.variantType.id,name:t.variantType.name,selectionType:t.variantType.selectionType,values:t.variantType.values.map((function(e){return new I({id:e.id,colorCode:e.colorCode,name:e.name,thumbnailImageId:e.thumbnailImageId,variantTypeId:t.variantType.id})})).filter((function(e){return t.variantValueIds.includes(e.id)}))}),variantValueIds:t.variantValueIds})})),variants:t.variants.map((function(e){var i,o,n,r;return new v({id:e.id,productId:t.id,attributes:null===(i=e.attributes)||void 0===i?void 0:i.map((function(t){var e,i,o,n,r,a;return new b({value:t.value,productAttributeId:null===(e=t.productAttribute)||void 0===e?void 0:e.id,productAttributeOptionId:null===(i=t.productAttributeOption)||void 0===i?void 0:i.id,productAttribute:new g({id:null===(o=t.productAttribute)||void 0===o?void 0:o.id,name:null===(n=t.productAttribute)||void 0===n?void 0:n.name,type:null===(r=t.productAttribute)||void 0===r?void 0:r.type,tableTemplate:(null===(a=t.productAttribute)||void 0===a?void 0:a.tableTemplate)?new D(t.productAttribute.tableTemplate):null}),productAttributeOption:t.productAttributeOption})})),sku:e.sku,barcodeList:e.barcodeList||void 0,images:null===(o=e.images)||void 0===o?void 0:o.map((function(t){return new m(t.id)})),price:new f(null===(n=e.prices)||void 0===n?void 0:n.find((function(t){return A.priceListId?t.priceListId===A.priceListId:null===t.priceListId}))),stock:e.stocks.filter((function(t){var e;return y||A.isEditor||(null===(e=A.stockLocationIds)||void 0===e?void 0:e.includes(t.stockLocationId))})).reduce((function(t,e){return e.stockCount+t}),0)||0,variantValues:null===(r=e.variantValues)||void 0===r?void 0:r.map((function(e){var i=t.productVariantTypes.find((function(t){return t.variantType.id===e.variantTypeId})),o=null==i?void 0:i.variantType.values.find((function(t){return t.id===e.variantValueId}));return new I({id:e.variantValueId,name:null==o?void 0:o.name,colorCode:null==o?void 0:o.colorCode,thumbnailImageId:null==o?void 0:o.thumbnailImageId,variantTypeId:null==i?void 0:i.variantType.id})})),isActive:e.isActive})}))})}(t)}))})];case 2:return P=e.sent(),console.log(P),[3,3];case 3:return[2]}}))}))},P.getProductFilterData=function(a){return t(this,void 0,void 0,(function(){var t,d,s,u,m;return e(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),t=n(k||(k=o(["\n query getProductFilterData($categoryId: String, $locale: String) {\n getProductFilterData(categoryId: $categoryId, locale: $locale) {\n filters {\n customValues\n displayType\n id\n isMultiSelect\n isFacetFilter\n key\n name\n order\n type\n values {\n colorCode\n id\n key\n name\n thumbnailImageId\n }\n settings {\n showCollapsedOnDesktop\n showCollapsedOnMobile\n sortType\n useAndFilter\n }\n }\n categories {\n id\n name\n metaData {\n slug\n }\n }\n }\n }\n "],["\n query getProductFilterData($categoryId: String, $locale: String) {\n getProductFilterData(categoryId: $categoryId, locale: $locale) {\n filters {\n customValues\n displayType\n id\n isMultiSelect\n isFacetFilter\n key\n name\n order\n type\n values {\n colorCode\n id\n key\n name\n thumbnailImageId\n }\n settings {\n showCollapsedOnDesktop\n showCollapsedOnMobile\n sortType\n useAndFilter\n }\n }\n categories {\n id\n name\n metaData {\n slug\n }\n }\n }\n }\n "]))),[4,r.getClient().query({query:t,variables:{categoryId:a||null,locale:A.getCurrentLocale()}})];case 1:return d=e.sent(),s=d.data,(u=d.errors)&&u.length?(console.log(u),[2]):[2,{filters:s.getProductFilterData.filters.map((function(t){var e;return new y(i(i({},t),{displayType:t.displayType,type:t.type,values:null===(e=t.values)||void 0===e?void 0:e.map((function(t){return new j(t)})),settings:t.settings?new x(i(i({},t.settings),{sortType:t.settings.sortType})):null}))})),categories:s.getProductFilterData.categories?s.getProductFilterData.categories.map((function(t){var e;return new l({id:t.id,name:t.name,slug:null===(e=t.metaData)||void 0===e?void 0:e.slug})})):null}];case 2:return m=e.sent(),console.log(m),[3,3];case 3:return[2]}}))}))},P}();export{P as IkasProductSearchAPI};
1
+ import{__awaiter as t,__generator as e,__assign as i,__makeTemplateObject as o}from'../../ext/tslib/tslib.es6.js';import n from'../../ext/graphql-tag/src/index.js';import{apollo as r}from"../apollo.js";import"../../models/data/blog/index.js";import{IkasBrand as a}from"../../models/data/brand/index.js";import{IkasCategory as d,IkasCategoryPath as s,IkasFilterCategory as l}from"../../models/data/category/index.js";import"../../models/data/checkout/index.js";import"../../models/data/customer/address/index.js";import"../../models/data/customer/index.js";import"../../models/data/customer-review/index.js";import{IkasHTMLMetaData as u}from"../../models/data/html-meta-data/index.js";import{IkasImage as m}from"../../models/data/image/index.js";import"../../models/data/installment-info/index.js";import"../../models/data/order/index.js";import"../../models/data/order/line-item/index.js";import"mobx";import"../product-option-file/index.js";import{IkasProduct as p}from"../../models/data/product/index.js";import{IkasProductVariantType as c}from"../../models/data/product/variant-type/index.js";import{IkasProductVariant as v}from"../../models/data/product/variant/index.js";import{IkasProductPrice as f}from"../../models/data/product/variant/price/index.js";import{IkasProductAttribute as g}from"../../models/data/product-attribute/index.js";import{IkasProductAttributeValue as y}from"../../models/data/product/attribute-value/index.js";import{IkasProductFilter as b,IkasApplicableProductFilterValue as j,IkasProductFilterSettings as x}from"../../models/data/product-filter/index.js";import{IkasVariantType as h}from"../../models/data/variant-type/index.js";import{IkasVariantValue as I}from"../../models/data/variant-type/variant-value/index.js";import"../../models/data/order-transaction/index.js";import"../../models/data/product-option-set/index.js";import"../../models/data/raffle/index.js";import"../../models/data/product-campaing/campaign/index.js";import"../../models/theme/theme.js";import"../../models/theme/page/index.js";import"../../models/theme/component/prop/index.js";import"../../models/theme/page/component/prop-value/link.js";import"../../models/ui/brand-list/index.js";import"../../models/ui/blog-list/index.js";import"../../models/ui/blog-category-list/index.js";import"../../models/ui/category-list/index.js";import"../../models/ui/product-detail/index.js";import"../../models/ui/product-list/index.js";import"../../models/ui/product-attribute-detail/index.js";import"../../models/ui/product-attribute-list/index.js";import"../../models/ui/customer-review-list/index.js";import"../../models/ui/validator/index.js";import"../../models/ui/validator/rules/index.js";import"../../models/ui/validator/form/login.js";import"../../models/ui/validator/form/address.js";import"../../models/ui/validator/form/register.js";import"../../models/ui/validator/form/contact-form.js";import"../../models/ui/validator/form/forgot-password.js";import"../../models/ui/validator/form/recover-password.js";import"../../models/ui/validator/form/account-info.js";import"../../models/ui/validator/form/raffle-form.js";import"../../models/ui/validator/form/customer-review.js";import"../../models/ui/raffle-list/index.js";import{IkasThemeStockPreference as w}from"../../models/theme/settings/index.js";import"../../models/theme/custom-data/index.js";import{IkasProductTag as T}from"../../models/data/product-tag/index.js";import{IkasStorefrontConfig as A}from"../../storefront/index.js";import{IkasProductAttributeTableTemplate as C}from"../../models/data/product-attribute/product-attribute-table-template/index.js";var D,k,P=function(){function P(){}return P.searchProducts=function(l,b){var j;return void 0===b&&(b=!1),t(this,void 0,void 0,(function(){var t,x,k,P,O;return e(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),t=n(D||(D=o(["\n query searchProducts($input: SearchInput!) {\n searchProducts(input: $input) {\n count\n data\n facets {\n id\n values {\n count\n id\n }\n }\n limit\n page\n totalCount\n }\n }\n "],["\n query searchProducts($input: SearchInput!) {\n searchProducts(input: $input) {\n count\n data\n facets {\n id\n values {\n count\n id\n }\n }\n limit\n page\n totalCount\n }\n }\n "]))),[4,r.getClient().query({query:t,variables:{input:i(i({},l),{showStockOption:b?A.stockPreference:w.SHOW_ALL,locale:A.getCurrentLocale(),dynamicCurrencySettings:(null===(j=A.getCurrentRouting())||void 0===j?void 0:j.dynamicCurrencySettings)||null})}})];case 1:return x=e.sent(),k=x.data,(P=x.errors)&&P.length?(console.log(P),[2]):[2,i(i({},k.searchProducts),{data:k.searchProducts.data.map((function(t){return function(t){var e,i,o,n,r,l,b="local"===process.env.NEXT_PUBLIC_ENV;return new p({id:t.id,attributes:null===(e=t.attributes)||void 0===e?void 0:e.map((function(t){var e,i,o,n,r,a;return new y({value:t.value,productAttributeId:null===(e=t.productAttribute)||void 0===e?void 0:e.id,productAttributeOptionId:null===(i=t.productAttributeOption)||void 0===i?void 0:i.id,productAttribute:new g({id:null===(o=t.productAttribute)||void 0===o?void 0:o.id,name:null===(n=t.productAttribute)||void 0===n?void 0:n.name,type:null===(r=t.productAttribute)||void 0===r?void 0:r.type,tableTemplate:(null===(a=t.productAttribute)||void 0===a?void 0:a.tableTemplate)?new C(t.productAttribute.tableTemplate):null}),productAttributeOption:t.productAttributeOption})})),brand:new a({id:null===(i=t.brand)||void 0===i?void 0:i.id,name:null===(o=t.brand)||void 0===o?void 0:o.name,metaData:new u({slug:(null===(n=t.brand)||void 0===n?void 0:n.slug)||""})}),categories:null===(r=t.categories)||void 0===r?void 0:r.map((function(t){return new d({id:t.id,name:t.name,path:t.path.map((function(t){return new s(t)})),metaData:new u({slug:t.slug||""})})})),tags:null===(l=t.tags)||void 0===l?void 0:l.map((function(t){return new T({id:t.id,name:t.name})})),description:t.description||void 0,metaData:new u(t.metaData||void 0),name:t.name,shortDescription:t.shortDescription||void 0,productOptionSetId:t.productOptionSetId,variantTypes:t.productVariantTypes.map((function(t){return new c({variantType:new h({id:t.variantType.id,name:t.variantType.name,selectionType:t.variantType.selectionType,values:t.variantType.values.map((function(e){return new I({id:e.id,colorCode:e.colorCode,name:e.name,thumbnailImageId:e.thumbnailImageId,variantTypeId:t.variantType.id})})).filter((function(e){return t.variantValueIds.includes(e.id)}))}),variantValueIds:t.variantValueIds})})),variants:t.variants.map((function(e){var i,o,n,r;return new v({id:e.id,productId:t.id,attributes:null===(i=e.attributes)||void 0===i?void 0:i.map((function(t){var e,i,o,n,r,a;return new y({value:t.value,productAttributeId:null===(e=t.productAttribute)||void 0===e?void 0:e.id,productAttributeOptionId:null===(i=t.productAttributeOption)||void 0===i?void 0:i.id,productAttribute:new g({id:null===(o=t.productAttribute)||void 0===o?void 0:o.id,name:null===(n=t.productAttribute)||void 0===n?void 0:n.name,type:null===(r=t.productAttribute)||void 0===r?void 0:r.type,tableTemplate:(null===(a=t.productAttribute)||void 0===a?void 0:a.tableTemplate)?new C(t.productAttribute.tableTemplate):null}),productAttributeOption:t.productAttributeOption})})),sku:e.sku,barcodeList:e.barcodeList||void 0,images:null===(o=e.images)||void 0===o?void 0:o.map((function(t){return new m(t.id)})),price:new f(null===(n=e.prices)||void 0===n?void 0:n.find((function(t){return A.priceListId?t.priceListId===A.priceListId:null===t.priceListId}))),stock:e.stocks.filter((function(t){var e;return b||A.isEditor||(null===(e=A.stockLocationIds)||void 0===e?void 0:e.includes(t.stockLocationId))})).reduce((function(t,e){return e.stockCount+t}),0)||0,variantValues:null===(r=e.variantValues)||void 0===r?void 0:r.map((function(e){var i=t.productVariantTypes.find((function(t){return t.variantType.id===e.variantTypeId})),o=null==i?void 0:i.variantType.values.find((function(t){return t.id===e.variantValueId}));return new I({id:e.variantValueId,name:null==o?void 0:o.name,colorCode:null==o?void 0:o.colorCode,thumbnailImageId:null==o?void 0:o.thumbnailImageId,variantTypeId:null==i?void 0:i.variantType.id})})),isActive:e.isActive})}))})}(t)}))})];case 2:return O=e.sent(),console.log(O),[3,3];case 3:return[2]}}))}))},P.getProductFilterData=function(a){return t(this,void 0,void 0,(function(){var t,d,s,u,m;return e(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),t=n(k||(k=o(["\n query getProductFilterData($categoryId: String, $locale: String) {\n getProductFilterData(categoryId: $categoryId, locale: $locale) {\n filters {\n customValues\n displayType\n id\n isMultiSelect\n isFacetFilter\n key\n name\n order\n type\n values {\n colorCode\n id\n key\n name\n thumbnailImageId\n }\n settings {\n showCollapsedOnDesktop\n showCollapsedOnMobile\n sortType\n useAndFilter\n }\n }\n categories {\n id\n name\n metaData {\n slug\n }\n }\n }\n }\n "],["\n query getProductFilterData($categoryId: String, $locale: String) {\n getProductFilterData(categoryId: $categoryId, locale: $locale) {\n filters {\n customValues\n displayType\n id\n isMultiSelect\n isFacetFilter\n key\n name\n order\n type\n values {\n colorCode\n id\n key\n name\n thumbnailImageId\n }\n settings {\n showCollapsedOnDesktop\n showCollapsedOnMobile\n sortType\n useAndFilter\n }\n }\n categories {\n id\n name\n metaData {\n slug\n }\n }\n }\n }\n "]))),[4,r.getClient().query({query:t,variables:{categoryId:a||null,locale:A.getCurrentLocale()}})];case 1:return d=e.sent(),s=d.data,(u=d.errors)&&u.length?(console.log(u),[2]):[2,{filters:s.getProductFilterData.filters.map((function(t){var e;return new b(i(i({},t),{displayType:t.displayType,type:t.type,values:null===(e=t.values)||void 0===e?void 0:e.map((function(t){return new j(t)})),settings:t.settings?new x(i(i({},t.settings),{sortType:t.settings.sortType})):null}))})),categories:s.getProductFilterData.categories?s.getProductFilterData.categories.map((function(t){var e;return new l({id:t.id,name:t.name,slug:null===(e=t.metaData)||void 0===e?void 0:e.slug})})):null}];case 2:return m=e.sent(),console.log(m),[3,3];case 3:return[2]}}))}))},P}();export{P as IkasProductSearchAPI};
@@ -1 +1 @@
1
- import{__awaiter as n,__generator as e,__makeTemplateObject as t}from'../../ext/tslib/tslib.es6.js';import{apollo as r}from"../apollo.js";import o from'../../ext/graphql-tag/src/index.js';import{IkasStorefront as a}from"../../models/data/storefront/index.js";var i,d=function(){function d(){}return d.getStorefront=function(d){return n(this,void 0,void 0,(function(){var n,s,l,m,u;return e(this,(function(e){switch(e.label){case 0:n=o(i||(i=t(["\n query getStorefront($id: String!) {\n getStorefront(id: $id) {\n createdAt\n emailSettingsId\n fbpId\n gtmId\n id\n localizations {\n createdAt\n id\n isDefault\n locale\n name\n }\n mainStorefrontThemeId\n name\n salesChannelId\n routings {\n countryCodes\n createdAt\n domain\n id\n locale\n path\n priceListId\n updatedAt\n }\n status\n themes {\n createdAt\n id\n isMainTheme\n name\n status\n themeId\n themeVersionId\n updatedAt\n }\n }\n }\n "],["\n query getStorefront($id: String!) {\n getStorefront(id: $id) {\n createdAt\n emailSettingsId\n fbpId\n gtmId\n id\n localizations {\n createdAt\n id\n isDefault\n locale\n name\n }\n mainStorefrontThemeId\n name\n salesChannelId\n routings {\n countryCodes\n createdAt\n domain\n id\n locale\n path\n priceListId\n updatedAt\n }\n status\n themes {\n createdAt\n id\n isMainTheme\n name\n status\n themeId\n themeVersionId\n updatedAt\n }\n }\n }\n "]))),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,r.getClient().query({query:n,variables:{id:d}})];case 2:return s=e.sent(),l=s.data,(m=s.errors)&&m.length&&console.log(m),l?[2,new a(l.getStorefront)]:[3,4];case 3:return u=e.sent(),console.log(u),[3,4];case 4:return[2]}}))}))},d}();export{d as IkasStorefrontAPI};
1
+ import{__awaiter as n,__generator as e,__makeTemplateObject as t}from'../../ext/tslib/tslib.es6.js';import{apollo as r}from"../apollo.js";import o from'../../ext/graphql-tag/src/index.js';import{IkasStorefront as a}from"../../models/data/storefront/index.js";var i,d=function(){function d(){}return d.getStorefront=function(d){return n(this,void 0,void 0,(function(){var n,s,l,m,u;return e(this,(function(e){switch(e.label){case 0:n=o(i||(i=t(["\n query getStorefront($id: String!) {\n getStorefront(id: $id) {\n createdAt\n emailSettingsId\n fbpId\n gtmId\n id\n localizations {\n createdAt\n id\n isDefault\n locale\n name\n }\n mainStorefrontThemeId\n name\n salesChannelId\n routings {\n countryCodes\n createdAt\n domain\n id\n locale\n path\n priceListId\n updatedAt\n dynamicCurrencySettings {\n roundingFormat\n targetCurrencyCode\n }\n }\n status\n themes {\n createdAt\n id\n isMainTheme\n name\n status\n themeId\n themeVersionId\n updatedAt\n }\n }\n }\n "],["\n query getStorefront($id: String!) {\n getStorefront(id: $id) {\n createdAt\n emailSettingsId\n fbpId\n gtmId\n id\n localizations {\n createdAt\n id\n isDefault\n locale\n name\n }\n mainStorefrontThemeId\n name\n salesChannelId\n routings {\n countryCodes\n createdAt\n domain\n id\n locale\n path\n priceListId\n updatedAt\n dynamicCurrencySettings {\n roundingFormat\n targetCurrencyCode\n }\n }\n status\n themes {\n createdAt\n id\n isMainTheme\n name\n status\n themeId\n themeVersionId\n updatedAt\n }\n }\n }\n "]))),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,r.getClient().query({query:n,variables:{id:d}})];case 2:return s=e.sent(),l=s.data,(m=s.errors)&&m.length&&console.log(m),l?[2,new a(l.getStorefront)]:[3,4];case 3:return u=e.sent(),console.log(u),[3,4];case 4:return[2]}}))}))},d}();export{d as IkasStorefrontAPI};