@ikas/storefront 2.0.0-alpha.9 → 2.0.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.
Files changed (166) hide show
  1. package/build/__generated__/global-types.d.ts +9 -2
  2. package/build/__generated__/global-types.js +1 -1
  3. package/build/_virtual/index.js_commonjs-proxy2.js +1 -1
  4. package/build/_virtual/index.js_commonjs-proxy3.js +1 -1
  5. package/build/analytics/facebookPixel.js +1 -1
  6. package/build/analytics/googleTagManager.js +1 -1
  7. package/build/analytics/head/index.js +1 -1
  8. package/build/analytics/ikas.js +1 -1
  9. package/build/api/apollo.js +1 -1
  10. package/build/api/blog/__generated__/getBlog.d.ts +14 -16
  11. package/build/api/blog/__generated__/listBlog.d.ts +14 -16
  12. package/build/api/blog/__generated__/listBlogCategory.d.ts +14 -16
  13. package/build/api/blog/__generated__/listBlogMetaData.d.ts +14 -16
  14. package/build/api/brand/__generated__/listProductBrand.d.ts +3 -3
  15. package/build/api/cart/__generated__/getCart.d.ts +2 -4
  16. package/build/api/cart/__generated__/saveItemToCart.d.ts +2 -4
  17. package/build/api/category/__generated__/listCategory.d.ts +3 -3
  18. package/build/api/checkout/__generated__/getCheckoutById.d.ts +2 -4
  19. package/build/api/checkout/__generated__/getOrder.d.ts +5 -11
  20. package/build/api/checkout/__generated__/listCheckoutSettings.d.ts +1 -1
  21. package/build/api/checkout/index.js +1 -1
  22. package/build/api/customer/__generated__/createOrderRefundRequest.d.ts +5 -11
  23. package/build/api/customer/__generated__/customerLogin.d.ts +12 -5
  24. package/build/api/customer/__generated__/customerSocialLogin.d.ts +161 -0
  25. package/build/api/customer/__generated__/getCustomerOrders.d.ts +5 -11
  26. package/build/api/customer/__generated__/getMyCustomer.d.ts +4 -5
  27. package/build/api/customer/__generated__/registerCustomer.d.ts +12 -5
  28. package/build/api/customer/__generated__/saveMyCustomer.d.ts +12 -5
  29. package/build/api/customer/index.d.ts +5 -0
  30. package/build/api/customer/index.js +1 -1
  31. package/build/api/customer-review/__generated__/listCustomerReviews.d.ts +14 -16
  32. package/build/api/product-option-set/index.js +1 -1
  33. package/build/api/raffle/__generated__/listRaffle.d.ts +14 -16
  34. package/build/api/raffle/__generated__/saveRaffleParticipant.d.ts +2 -2
  35. package/build/api/raffle/index.js +1 -1
  36. package/build/api/variant-type/__generated__/listVariantType.d.ts +3 -7
  37. package/build/components/checkout/components/address-form/index.js +1 -1
  38. package/build/components/checkout/components/address-form/model.d.ts +8 -0
  39. package/build/components/checkout/components/cart-summary/cart-item/index.js +1 -1
  40. package/build/components/checkout/components/cart-summary/index.js +1 -1
  41. package/build/components/checkout/components/cart-summary/style.module.scss.js +1 -1
  42. package/build/components/checkout/components/step-container/index.js +1 -1
  43. package/build/components/checkout/index.js +1 -1
  44. package/build/components/checkout/model.d.ts +2 -0
  45. package/build/components/checkout/model.js +1 -1
  46. package/build/components/checkout/steps/step-payment/payment-gateways/index.js +1 -1
  47. package/build/components/checkout/steps/step-payment/payment-gateways/installments/index.js +1 -1
  48. package/build/components/checkout/steps/step-shipping/index.js +1 -1
  49. package/build/components/checkout/steps/step-success/index.js +1 -1
  50. package/build/components/index.d.ts +1 -1
  51. package/build/components/page/ThemeComponent.js +1 -1
  52. package/build/components/page/head.js +1 -1
  53. package/build/components/page/index.js +1 -1
  54. package/build/components/page-editor/ThemeComponentEditor.d.ts +1 -2
  55. package/build/components/page-editor/ThemeComponentEditor.js +1 -1
  56. package/build/components/page-editor/index.d.ts +3 -1
  57. package/build/components/page-editor/index.js +1 -1
  58. package/build/components/page-editor/loader/index.d.ts +5 -1
  59. package/build/components/page-editor/loader/index.js +1 -1
  60. package/build/components/page-editor/loader/style.module.scss.js +1 -1
  61. package/build/components/page-editor/model.d.ts +8 -4
  62. package/build/components/page-editor/model.js +1 -1
  63. package/build/ext/@apollo/client/cache/inmemory/entityStore.js +1 -1
  64. package/build/ext/@apollo/client/cache/inmemory/inMemoryCache.js +1 -1
  65. package/build/ext/@apollo/client/cache/inmemory/policies.js +1 -1
  66. package/build/ext/@apollo/client/cache/inmemory/readFromStore.js +1 -1
  67. package/build/ext/@apollo/client/cache/inmemory/writeToStore.js +1 -1
  68. package/build/ext/@apollo/client/core/ApolloClient.js +1 -1
  69. package/build/ext/@apollo/client/core/LocalState.js +1 -1
  70. package/build/ext/@apollo/client/core/ObservableQuery.js +1 -1
  71. package/build/ext/@apollo/client/core/QueryManager.js +1 -1
  72. package/build/ext/@apollo/client/errors/index.js +1 -1
  73. package/build/ext/@apollo/client/ext/tslib/tslib.es6.js +15 -0
  74. package/build/ext/@apollo/client/link/context/index.js +1 -1
  75. package/build/ext/@apollo/client/link/core/ApolloLink.js +1 -1
  76. package/build/ext/@apollo/client/link/error/index.js +1 -1
  77. package/build/ext/@apollo/client/link/http/HttpLink.js +1 -1
  78. package/build/ext/@apollo/client/link/http/createHttpLink.js +1 -1
  79. package/build/ext/@apollo/client/link/http/selectHttpOptionsAndBody.js +1 -1
  80. package/build/ext/@apollo/client/link/utils/createOperation.js +1 -1
  81. package/build/ext/@apollo/client/utilities/common/mergeDeep.js +1 -1
  82. package/build/ext/@apollo/client/utilities/graphql/fragments.js +1 -1
  83. package/build/ext/@apollo/client/utilities/graphql/transform.js +1 -1
  84. package/build/ext/@apollo/client/utilities/observables/Concast.js +1 -1
  85. package/build/ext/ts-invariant/ext/tslib/tslib.es6.js +15 -0
  86. package/build/ext/ts-invariant/lib/invariant.esm.js +1 -1
  87. package/build/ext/tslib/tslib.es6.js +1 -1
  88. package/build/ikas.js +67 -2
  89. package/build/index.js +1 -1
  90. package/build/models/data/blog/index.js +1 -1
  91. package/build/models/data/brand/index.js +1 -1
  92. package/build/models/data/category/index.js +1 -1
  93. package/build/models/data/checkout/index.js +1 -1
  94. package/build/models/data/checkout-settings/index.d.ts +1 -1
  95. package/build/models/data/checkout-settings/index.js +1 -1
  96. package/build/models/data/customer/address/index.d.ts +4 -1
  97. package/build/models/data/customer/address/index.js +1 -1
  98. package/build/models/data/image/index.js +1 -1
  99. package/build/models/data/index.d.ts +1 -0
  100. package/build/models/data/language/index.d.ts +6 -0
  101. package/build/models/data/order/address/index.d.ts +2 -1
  102. package/build/models/data/order/address/index.js +1 -1
  103. package/build/models/data/order/line-item/variant/index.js +1 -1
  104. package/build/models/data/product/index.js +1 -1
  105. package/build/models/data/product-filter/index.js +1 -1
  106. package/build/models/data/product-option-set/index.d.ts +4 -0
  107. package/build/models/data/product-option-set/index.js +1 -1
  108. package/build/models/data/raffle/index.d.ts +1 -1
  109. package/build/models/data/raffle/index.js +1 -1
  110. package/build/models/data/slider/index.d.ts +5 -0
  111. package/build/models/data/slider/index.js +1 -0
  112. package/build/models/theme/component/index.d.ts +9 -0
  113. package/build/models/theme/component/index.js +1 -1
  114. package/build/models/theme/component/prop/index.d.ts +21 -0
  115. package/build/models/theme/component/prop/index.js +1 -1
  116. package/build/models/theme/custom-data/index.d.ts +20 -1
  117. package/build/models/theme/custom-data/index.js +1 -1
  118. package/build/models/theme/settings/color/index.d.ts +14 -0
  119. package/build/models/theme/settings/color/index.js +1 -0
  120. package/build/models/theme/settings/{prop/favicon → favicon}/index.d.ts +0 -0
  121. package/build/models/theme/settings/{prop/favicon → favicon}/index.js +0 -0
  122. package/build/models/theme/settings/font-family/index.d.ts +5 -0
  123. package/build/models/theme/settings/font-family/index.js +1 -0
  124. package/build/models/theme/settings/index.d.ts +4 -2
  125. package/build/models/theme/settings/index.js +1 -1
  126. package/build/models/ui/product-detail/index.js +1 -1
  127. package/build/models/ui/product-list/index.d.ts +1 -1
  128. package/build/models/ui/product-list/index.js +1 -1
  129. package/build/models/ui/validator/form/account-info.js +1 -1
  130. package/build/models/ui/validator/form/address.js +1 -1
  131. package/build/models/ui/validator/form/register.js +1 -1
  132. package/build/pages/checkout.js +1 -1
  133. package/build/pages/editor.d.ts +4 -3
  134. package/build/pages/editor.js +1 -1
  135. package/build/providers/page-data-get.d.ts +1 -1
  136. package/build/providers/page-data-get.js +1 -1
  137. package/build/providers/page-data-init.d.ts +3 -1
  138. package/build/providers/page-data-init.js +1 -1
  139. package/build/providers/page-data-next.d.ts +2 -1
  140. package/build/providers/page-data-next.js +1 -1
  141. package/build/providers/prop-value/custom.d.ts +1 -0
  142. package/build/providers/prop-value/custom.js +1 -1
  143. package/build/providers/prop-value/slider.d.ts +11 -0
  144. package/build/providers/prop-value/slider.js +1 -0
  145. package/build/scripts/generators/components/index.js +1 -1
  146. package/build/scripts/generators/config/content.d.ts +2 -3
  147. package/build/scripts/generators/config/content.js +1 -1
  148. package/build/scripts/generators/config/index.js +1 -1
  149. package/build/scripts/generators/index.d.ts +1 -0
  150. package/build/scripts/generators/pages/index.js +1 -1
  151. package/build/scripts/generators/store/index.js +1 -1
  152. package/build/scripts/generators/theme/index.js +1 -1
  153. package/build/scripts/generators/types/index.d.ts +15 -0
  154. package/build/scripts/generators/types/index.js +1 -0
  155. package/build/store/cart.d.ts +6 -7
  156. package/build/store/cart.js +1 -1
  157. package/build/store/customer.d.ts +19 -0
  158. package/build/store/customer.js +1 -1
  159. package/build/storefront/index.d.ts +5 -3
  160. package/build/storefront/index.js +1 -1
  161. package/build/utils/fs.js +1 -1
  162. package/build/utils/google-fonts.d.ts +2 -0
  163. package/build/utils/google-fonts.js +1 -0
  164. package/package.json +9 -9
  165. package/build/models/theme/settings/prop/color/index.d.ts +0 -7
  166. package/build/models/theme/settings/prop/color/index.js +0 -1
@@ -1 +1 @@
1
- import{__awaiter as n,__generator as e,__assign as t,__makeTemplateObject as r}from'../../ext/tslib/tslib.es6.js';import a from'../../ext/graphql-tag/src/index.js';import{apollo as i}from"../apollo.js";import"../../models/data/blog/index.js";import"../../models/data/brand/index.js";import"../../models/data/category/index.js";import"../../models/data/checkout/index.js";import"../../models/data/customer/address/index.js";import{IkasCustomer as s}from"../../models/data/customer/index.js";import"../../models/data/customer-review/index.js";import"../../models/data/html-meta-data/index.js";import"../../models/data/image/index.js";import"../../models/data/installment-info/index.js";import{IkasOrder as o}from"../../models/data/order/index.js";import"../../models/data/order/line-item/index.js";import{IkasOrderRefundSettings as d}from"../../models/data/order/refund/settings.js";import"../../models/data/product/index.js";import"mobx";import"../../models/data/variant-type/index.js";import"../../models/data/product/variant/index.js";import"../../models/data/product/variant/price/index.js";import"../../models/data/product-attribute/index.js";import"../../models/data/product/attribute-value/index.js";import"../../models/data/product-filter/index.js";import"../../models/data/variant-type/variant-value/index.js";import{IkasOrderTransaction as c}from"../../models/data/order-transaction/index.js";import"../../models/data/product-option-set/index.js";import"../../models/data/raffle/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"../../models/theme/settings/index.js";import"../../models/theme/custom-data/index.js";import{IkasStorefrontConfig as u}from"../../storefront/index.js";var m,l,p,g,f,y,h,v,I,N,b,k,$,x,C,L=function(){function L(){}return L.login=function(o,d){return n(this,void 0,void 0,(function(){var n,c,u,l,p;return e(this,(function(e){switch(e.label){case 0:n=a(m||(m=r(["\n mutation customerLogin($email: String!, $password: String!) {\n customerLogin(email: $email, password: $password) {\n token\n tokenExpiry\n customer {\n id\n isEmailVerified\n isPhoneVerified\n lastName\n addresses {\n addressLine1\n addressLine2\n identityNumber\n city {\n code\n id\n name\n }\n company\n country {\n code\n id\n name\n }\n district {\n id\n name\n code\n }\n id\n firstName\n isDefault\n lastName\n postalCode\n state {\n name\n id\n code\n }\n taxNumber\n taxOffice\n title\n }\n phone\n accountStatus\n email\n firstName\n subscriptionStatus\n }\n }\n }\n "],["\n mutation customerLogin($email: String!, $password: String!) {\n customerLogin(email: $email, password: $password) {\n token\n tokenExpiry\n customer {\n id\n isEmailVerified\n isPhoneVerified\n lastName\n addresses {\n addressLine1\n addressLine2\n identityNumber\n city {\n code\n id\n name\n }\n company\n country {\n code\n id\n name\n }\n district {\n id\n name\n code\n }\n id\n firstName\n isDefault\n lastName\n postalCode\n state {\n name\n id\n code\n }\n taxNumber\n taxOffice\n title\n }\n phone\n accountStatus\n email\n firstName\n subscriptionStatus\n }\n }\n }\n "]))),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,i.getClient().mutate({mutation:n,variables:{email:o,password:d}})];case 2:return c=e.sent(),u=c.data,(l=c.errors)&&l.length&&console.log(l),u&&u.customerLogin?[2,t(t({},u.customerLogin),{customer:new s(u.customerLogin.customer)})]:[3,4];case 3:return p=e.sent(),console.log(p),[3,4];case 4:return[2]}}))}))},L.register=function(o,d,c,m,p){return n(this,void 0,void 0,(function(){var n,g,f,y,h;return e(this,(function(e){switch(e.label){case 0:n=a(l||(l=r(["\n mutation registerCustomer(\n $email: String!\n $password: String!\n $firstName: String!\n $lastName: String!\n $isAcceptMarketing: Boolean\n $locale: String\n ) {\n registerCustomer(\n email: $email\n password: $password\n firstName: $firstName\n lastName: $lastName\n isAcceptMarketing: $isAcceptMarketing\n locale: $locale\n ) {\n token\n tokenExpiry\n customer {\n id\n isEmailVerified\n isPhoneVerified\n lastName\n addresses {\n addressLine1\n addressLine2\n city {\n code\n id\n name\n }\n company\n country {\n code\n id\n name\n }\n district {\n id\n name\n code\n }\n id\n firstName\n isDefault\n lastName\n postalCode\n state {\n name\n id\n code\n }\n taxNumber\n taxOffice\n title\n }\n phone\n accountStatus\n email\n firstName\n }\n }\n }\n "],["\n mutation registerCustomer(\n $email: String!\n $password: String!\n $firstName: String!\n $lastName: String!\n $isAcceptMarketing: Boolean\n $locale: String\n ) {\n registerCustomer(\n email: $email\n password: $password\n firstName: $firstName\n lastName: $lastName\n isAcceptMarketing: $isAcceptMarketing\n locale: $locale\n ) {\n token\n tokenExpiry\n customer {\n id\n isEmailVerified\n isPhoneVerified\n lastName\n addresses {\n addressLine1\n addressLine2\n city {\n code\n id\n name\n }\n company\n country {\n code\n id\n name\n }\n district {\n id\n name\n code\n }\n id\n firstName\n isDefault\n lastName\n postalCode\n state {\n name\n id\n code\n }\n taxNumber\n taxOffice\n title\n }\n phone\n accountStatus\n email\n firstName\n }\n }\n }\n "]))),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,i.getClient().mutate({mutation:n,variables:{email:o,password:d,firstName:c,lastName:m,isAcceptMarketing:p,locale:u.getCurrentLocale()}})];case 2:return g=e.sent(),f=g.data,(y=g.errors)&&y.length&&console.log(y),f&&f.registerCustomer?[2,t(t({},f.registerCustomer),{customer:new s(f.registerCustomer.customer)})]:[3,4];case 3:return h=e.sent(),console.log(h),[3,4];case 4:return[2]}}))}))},L.refreshToken=function(t){return n(this,void 0,void 0,(function(){var n,s,o,d,c;return e(this,(function(e){switch(e.label){case 0:n=a(p||(p=r(["\n mutation customerRefreshToken($token: String!) {\n customerRefreshToken(token: $token) {\n token\n tokenExpiry\n }\n }\n "],["\n mutation customerRefreshToken($token: String!) {\n customerRefreshToken(token: $token) {\n token\n tokenExpiry\n }\n }\n "]))),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,i.getClient().mutate({mutation:n,variables:{token:t}})];case 2:return s=e.sent(),o=s.data,(d=s.errors)&&d.length&&console.log(d),o?[2,o.customerRefreshToken]:[3,4];case 3:return c=e.sent(),console.log(c),[3,4];case 4:return[2]}}))}))},L.forgotPassword=function(t){return n(this,void 0,void 0,(function(){var n,s,o,d;return e(this,(function(e){switch(e.label){case 0:n=a(g||(g=r(["\n mutation customerForgotPassword($email: String!, $locale: String!) {\n customerForgotPassword(email: $email, locale: $locale)\n }\n "],["\n mutation customerForgotPassword($email: String!, $locale: String!) {\n customerForgotPassword(email: $email, locale: $locale)\n }\n "]))),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,i.getClient().mutate({mutation:n,variables:{email:t,locale:u.getCurrentLocale()}})];case 2:return s=e.sent(),(o=s.errors)&&o.length?(console.log(o),[2,!1]):[3,4];case 3:return d=e.sent(),console.log(d),[3,4];case 4:return[2,!0]}}))}))},L.recoverPassword=function(t,s,o){return n(this,void 0,void 0,(function(){var n,d,c,u;return e(this,(function(e){switch(e.label){case 0:n=a(f||(f=r(["\n mutation customerRecoverPassword(\n $password: String!\n $passwordAgain: String!\n $token: String!\n ) {\n customerRecoverPassword(\n password: $password\n passwordAgain: $passwordAgain\n token: $token\n )\n }\n "],["\n mutation customerRecoverPassword(\n $password: String!\n $passwordAgain: String!\n $token: String!\n ) {\n customerRecoverPassword(\n password: $password\n passwordAgain: $passwordAgain\n token: $token\n )\n }\n "]))),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,i.getClient().mutate({mutation:n,variables:{password:t,passwordAgain:s,token:o}})];case 2:return d=e.sent(),(c=d.errors)&&c.length?(console.log(c),[2,!1]):[3,4];case 3:return u=e.sent(),console.log(u),[2,!1];case 4:return[2,!0]}}))}))},L.checkEmail=function(t){return n(this,void 0,void 0,(function(){var n,s,o,d,c;return e(this,(function(e){switch(e.label){case 0:n=a(y||(y=r(["\n query checkCustomerEmail($email: String!) {\n checkCustomerEmail(email: $email) {\n exists\n }\n }\n "],["\n query checkCustomerEmail($email: String!) {\n checkCustomerEmail(email: $email) {\n exists\n }\n }\n "]))),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,i.getClient().query({query:n,variables:{email:t}})];case 2:return s=e.sent(),o=s.data,(d=s.errors)&&d.length&&console.log(d),o&&o.checkCustomerEmail?[2,o.checkCustomerEmail.exists]:[3,4];case 3:return c=e.sent(),console.log(c),[3,4];case 4:return[2,!1]}}))}))},L.getCustomer=function(){return n(this,void 0,void 0,(function(){var n,t,o,d,c;return e(this,(function(e){switch(e.label){case 0:n=a(h||(h=r(["\n query getMyCustomer {\n getMyCustomer {\n id\n isEmailVerified\n isPhoneVerified\n lastName\n addresses {\n addressLine1\n addressLine2\n city {\n code\n id\n name\n }\n company\n country {\n code\n id\n name\n }\n district {\n id\n name\n code\n }\n id\n firstName\n isDefault\n lastName\n postalCode\n state {\n name\n id\n code\n }\n taxNumber\n taxOffice\n title\n phone\n }\n phone\n accountStatus\n email\n firstName\n }\n }\n "],["\n query getMyCustomer {\n getMyCustomer {\n id\n isEmailVerified\n isPhoneVerified\n lastName\n addresses {\n addressLine1\n addressLine2\n city {\n code\n id\n name\n }\n company\n country {\n code\n id\n name\n }\n district {\n id\n name\n code\n }\n id\n firstName\n isDefault\n lastName\n postalCode\n state {\n name\n id\n code\n }\n taxNumber\n taxOffice\n title\n phone\n }\n phone\n accountStatus\n email\n firstName\n }\n }\n "]))),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,i.getClient().query({query:n})];case 2:return t=e.sent(),o=t.data,(d=t.errors)&&d.length&&console.log(d),o&&o.getMyCustomer?[2,new s(o.getMyCustomer)]:[3,4];case 3:return c=e.sent(),console.log(c),[3,4];case 4:return[2]}}))}))},L.saveCustomer=function(t){return n(this,void 0,void 0,(function(){var n,o,d,c,u;return e(this,(function(e){switch(e.label){case 0:n=a(v||(v=r(["\n mutation saveMyCustomer($input: SaveMyCustomerInput!) {\n saveMyCustomer(input: $input) {\n id\n isEmailVerified\n isPhoneVerified\n lastName\n addresses {\n addressLine1\n addressLine2\n city {\n code\n id\n name\n }\n company\n country {\n code\n id\n name\n }\n district {\n id\n name\n code\n }\n id\n firstName\n isDefault\n lastName\n postalCode\n state {\n name\n id\n code\n }\n identityNumber\n taxNumber\n taxOffice\n title\n phone\n }\n phone\n accountStatus\n email\n firstName\n }\n }\n "],["\n mutation saveMyCustomer($input: SaveMyCustomerInput!) {\n saveMyCustomer(input: $input) {\n id\n isEmailVerified\n isPhoneVerified\n lastName\n addresses {\n addressLine1\n addressLine2\n city {\n code\n id\n name\n }\n company\n country {\n code\n id\n name\n }\n district {\n id\n name\n code\n }\n id\n firstName\n isDefault\n lastName\n postalCode\n state {\n name\n id\n code\n }\n identityNumber\n taxNumber\n taxOffice\n title\n phone\n }\n phone\n accountStatus\n email\n firstName\n }\n }\n "]))),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,i.getClient().mutate({mutation:n,variables:{input:{firstName:t.firstName,lastName:t.lastName,addresses:t.addresses,phone:t.phone}}})];case 2:return o=e.sent(),d=o.data,(c=o.errors)&&c.length&&console.log(c),d&&d.saveMyCustomer?[2,new s(d.saveMyCustomer)]:[3,4];case 3:return u=e.sent(),console.log(u),[3,4];case 4:return[2]}}))}))},L.getOrders=function(t){return n(this,void 0,void 0,(function(){var n,s,d,c,u;return e(this,(function(e){switch(e.label){case 0:n=a(I||(I=r(["\n query getCustomerOrders($orderId: String) {\n getCustomerOrders(orderId: $orderId) {\n billingAddress {\n addressLine1\n addressLine2\n city {\n code\n id\n name\n }\n company\n country {\n name\n id\n code\n }\n district {\n name\n id\n code\n }\n firstName\n identityNumber\n isDefault\n lastName\n phone\n postalCode\n state {\n name\n id\n code\n }\n taxNumber\n taxOffice\n }\n cancelledAt\n cancelReason\n createdAt\n currencyCode\n currencyRates {\n rate\n originalRate\n code\n }\n customer {\n lastName\n firstName\n email\n id\n }\n deleted\n id\n merchantId\n note\n orderedAt\n orderAdjustments {\n type\n order\n name\n amountType\n amount\n }\n orderLineItems {\n createdAt\n currencyCode\n deleted\n discount {\n reason\n amountType\n amount\n }\n discountPrice\n finalPrice\n id\n originalOrderLineItemId\n price\n quantity\n status\n statusUpdatedAt\n stockLocationId\n taxValue\n updatedAt\n variant {\n barcodeList\n id\n mainImageId\n name\n productId\n sku\n variantValues {\n variantValueName\n variantValueId\n variantTypeName\n variantTypeId\n order\n }\n }\n options {\n name\n productOptionId\n productOptionsSetId\n type\n values {\n name\n price\n value\n }\n }\n }\n orderNumber\n orderPackages {\n updatedAt\n trackingInfo {\n trackingNumber\n trackingLink\n isSendNotification\n cargoCompany\n }\n stockLocationId\n orderPackageNumber\n orderPackageFulfillStatus\n orderLineItemIds\n id\n deleted\n createdAt\n }\n orderPackageStatus\n orderPaymentStatus\n orderTagIds\n shippingAddress {\n taxOffice\n taxNumber\n state {\n name\n id\n code\n }\n postalCode\n phone\n lastName\n isDefault\n identityNumber\n firstName\n district {\n name\n id\n code\n }\n country {\n name\n id\n code\n }\n company\n city {\n id\n code\n name\n }\n addressLine2\n addressLine1\n }\n shippingLines {\n title\n taxValue\n price\n }\n shippingMethod\n status\n taxLines {\n rate\n price\n }\n totalFinalPrice\n totalPrice\n updatedAt\n }\n }\n "],["\n query getCustomerOrders($orderId: String) {\n getCustomerOrders(orderId: $orderId) {\n billingAddress {\n addressLine1\n addressLine2\n city {\n code\n id\n name\n }\n company\n country {\n name\n id\n code\n }\n district {\n name\n id\n code\n }\n firstName\n identityNumber\n isDefault\n lastName\n phone\n postalCode\n state {\n name\n id\n code\n }\n taxNumber\n taxOffice\n }\n cancelledAt\n cancelReason\n createdAt\n currencyCode\n currencyRates {\n rate\n originalRate\n code\n }\n customer {\n lastName\n firstName\n email\n id\n }\n deleted\n id\n merchantId\n note\n orderedAt\n orderAdjustments {\n type\n order\n name\n amountType\n amount\n }\n orderLineItems {\n createdAt\n currencyCode\n deleted\n discount {\n reason\n amountType\n amount\n }\n discountPrice\n finalPrice\n id\n originalOrderLineItemId\n price\n quantity\n status\n statusUpdatedAt\n stockLocationId\n taxValue\n updatedAt\n variant {\n barcodeList\n id\n mainImageId\n name\n productId\n sku\n variantValues {\n variantValueName\n variantValueId\n variantTypeName\n variantTypeId\n order\n }\n }\n options {\n name\n productOptionId\n productOptionsSetId\n type\n values {\n name\n price\n value\n }\n }\n }\n orderNumber\n orderPackages {\n updatedAt\n trackingInfo {\n trackingNumber\n trackingLink\n isSendNotification\n cargoCompany\n }\n stockLocationId\n orderPackageNumber\n orderPackageFulfillStatus\n orderLineItemIds\n id\n deleted\n createdAt\n }\n orderPackageStatus\n orderPaymentStatus\n orderTagIds\n shippingAddress {\n taxOffice\n taxNumber\n state {\n name\n id\n code\n }\n postalCode\n phone\n lastName\n isDefault\n identityNumber\n firstName\n district {\n name\n id\n code\n }\n country {\n name\n id\n code\n }\n company\n city {\n id\n code\n name\n }\n addressLine2\n addressLine1\n }\n shippingLines {\n title\n taxValue\n price\n }\n shippingMethod\n status\n taxLines {\n rate\n price\n }\n totalFinalPrice\n totalPrice\n updatedAt\n }\n }\n "]))),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,i.getClient().query({query:n,variables:t?{orderId:t}:{}})];case 2:return s=e.sent(),d=s.data,(c=s.errors)&&c.length&&console.log(c),d&&d.getCustomerOrders?[2,d.getCustomerOrders.map((function(n){return new o(n)}))]:[3,4];case 3:return u=e.sent(),console.log(u),[3,4];case 4:return[2]}}))}))},L.getOrderTransactions=function(t){return n(this,void 0,void 0,(function(){var n,s,o,d,u;return e(this,(function(e){switch(e.label){case 0:n=a(N||(N=r(["\n query listOrderTransactions(\n $checkoutId: StringFilterInput\n $id: StringFilterInput\n $orderId: StringFilterInput\n ) {\n listOrderTransactions(\n checkoutId: $checkoutId\n id: $id\n orderId: $orderId\n ) {\n amount\n checkoutId\n createdAt\n currencyCode\n customerId\n deleted\n error {\n code\n declineCode\n message\n }\n id\n orderId\n paymentGatewayId\n paymentGatewayName\n paymentMethod\n paymentMethodDetail {\n bankName\n binNumber\n cardAssociation\n cardFamily\n cardType\n installment {\n installmentCount\n installmentPrice\n totalPrice\n }\n lastFourDigits\n threeDSecure\n }\n processedAt\n refundReason\n status\n type\n updatedAt\n }\n }\n "],["\n query listOrderTransactions(\n $checkoutId: StringFilterInput\n $id: StringFilterInput\n $orderId: StringFilterInput\n ) {\n listOrderTransactions(\n checkoutId: $checkoutId\n id: $id\n orderId: $orderId\n ) {\n amount\n checkoutId\n createdAt\n currencyCode\n customerId\n deleted\n error {\n code\n declineCode\n message\n }\n id\n orderId\n paymentGatewayId\n paymentGatewayName\n paymentMethod\n paymentMethodDetail {\n bankName\n binNumber\n cardAssociation\n cardFamily\n cardType\n installment {\n installmentCount\n installmentPrice\n totalPrice\n }\n lastFourDigits\n threeDSecure\n }\n processedAt\n refundReason\n status\n type\n updatedAt\n }\n }\n "]))),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,i.getClient().query({query:n,variables:{checkoutId:(null==t?void 0:t.checkoutId)?{eq:t.checkoutId}:void 0,id:(null==t?void 0:t.id)?{eq:t.id}:void 0,orderId:(null==t?void 0:t.orderId)?{eq:t.orderId}:void 0}})];case 2:return s=e.sent(),o=s.data,d=s.errors,Array.isArray(d)&&d.length?[2,[]]:[2,o.listOrderTransactions.map((function(n){return new c(n)}))];case 3:return u=e.sent(),console.log(u),[2,[]];case 4:return[2]}}))}))},L.saveIkasOrderRefund=function(t){return n(this,void 0,void 0,(function(){var n,s,d,c,u;return e(this,(function(e){switch(e.label){case 0:n=a(b||(b=r(["\n mutation createOrderRefundRequest($input: OrderRefundRequestInput!) {\n createOrderRefundRequest(input: $input) {\n billingAddress {\n addressLine1\n addressLine2\n city {\n code\n id\n name\n }\n company\n country {\n name\n id\n code\n }\n district {\n name\n id\n code\n }\n firstName\n identityNumber\n isDefault\n lastName\n phone\n postalCode\n state {\n name\n id\n code\n }\n taxNumber\n taxOffice\n }\n cancelledAt\n cancelReason\n createdAt\n currencyCode\n currencyRates {\n rate\n originalRate\n code\n }\n customer {\n lastName\n firstName\n email\n id\n }\n deleted\n id\n merchantId\n note\n orderedAt\n orderAdjustments {\n type\n order\n name\n amountType\n amount\n }\n orderLineItems {\n createdAt\n currencyCode\n deleted\n discount {\n reason\n amountType\n amount\n }\n discountPrice\n finalPrice\n id\n originalOrderLineItemId\n price\n quantity\n status\n statusUpdatedAt\n stockLocationId\n taxValue\n updatedAt\n variant {\n barcodeList\n id\n mainImageId\n name\n productId\n sku\n variantValues {\n variantValueName\n variantValueId\n variantTypeName\n variantTypeId\n order\n }\n }\n }\n orderNumber\n orderPackages {\n updatedAt\n trackingInfo {\n trackingNumber\n trackingLink\n isSendNotification\n cargoCompany\n }\n stockLocationId\n orderPackageNumber\n orderPackageFulfillStatus\n orderLineItemIds\n id\n deleted\n createdAt\n }\n orderPackageStatus\n orderPaymentStatus\n orderTagIds\n shippingAddress {\n taxOffice\n taxNumber\n state {\n name\n id\n code\n }\n postalCode\n phone\n lastName\n isDefault\n identityNumber\n firstName\n district {\n name\n id\n code\n }\n country {\n name\n id\n code\n }\n company\n city {\n id\n code\n name\n }\n addressLine2\n addressLine1\n }\n shippingLines {\n title\n taxValue\n price\n }\n shippingMethod\n status\n taxLines {\n rate\n price\n }\n totalFinalPrice\n totalPrice\n updatedAt\n }\n }\n "],["\n mutation createOrderRefundRequest($input: OrderRefundRequestInput!) {\n createOrderRefundRequest(input: $input) {\n billingAddress {\n addressLine1\n addressLine2\n city {\n code\n id\n name\n }\n company\n country {\n name\n id\n code\n }\n district {\n name\n id\n code\n }\n firstName\n identityNumber\n isDefault\n lastName\n phone\n postalCode\n state {\n name\n id\n code\n }\n taxNumber\n taxOffice\n }\n cancelledAt\n cancelReason\n createdAt\n currencyCode\n currencyRates {\n rate\n originalRate\n code\n }\n customer {\n lastName\n firstName\n email\n id\n }\n deleted\n id\n merchantId\n note\n orderedAt\n orderAdjustments {\n type\n order\n name\n amountType\n amount\n }\n orderLineItems {\n createdAt\n currencyCode\n deleted\n discount {\n reason\n amountType\n amount\n }\n discountPrice\n finalPrice\n id\n originalOrderLineItemId\n price\n quantity\n status\n statusUpdatedAt\n stockLocationId\n taxValue\n updatedAt\n variant {\n barcodeList\n id\n mainImageId\n name\n productId\n sku\n variantValues {\n variantValueName\n variantValueId\n variantTypeName\n variantTypeId\n order\n }\n }\n }\n orderNumber\n orderPackages {\n updatedAt\n trackingInfo {\n trackingNumber\n trackingLink\n isSendNotification\n cargoCompany\n }\n stockLocationId\n orderPackageNumber\n orderPackageFulfillStatus\n orderLineItemIds\n id\n deleted\n createdAt\n }\n orderPackageStatus\n orderPaymentStatus\n orderTagIds\n shippingAddress {\n taxOffice\n taxNumber\n state {\n name\n id\n code\n }\n postalCode\n phone\n lastName\n isDefault\n identityNumber\n firstName\n district {\n name\n id\n code\n }\n country {\n name\n id\n code\n }\n company\n city {\n id\n code\n name\n }\n addressLine2\n addressLine1\n }\n shippingLines {\n title\n taxValue\n price\n }\n shippingMethod\n status\n taxLines {\n rate\n price\n }\n totalFinalPrice\n totalPrice\n updatedAt\n }\n }\n "]))),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,i.getClient().mutate({mutation:n,variables:{input:t}})];case 2:return s=e.sent(),d=s.data,(c=s.errors)&&c.length?[2]:d&&d.createOrderRefundRequest?[2,new o(null==d?void 0:d.createOrderRefundRequest)]:[3,4];case 3:return u=e.sent(),console.log(u),[3,4];case 4:return[2]}}))}))},L.createCustomerEmailSubscription=function(t){return n(this,void 0,void 0,(function(){var n,s,o;return e(this,(function(e){switch(e.label){case 0:n=a(k||(k=r(["\n mutation createCustomerEmailSubscription(\n $input: CreateCustomerEmailSubscriptionInput!\n ) {\n createCustomerEmailSubscription(input: $input) {\n id\n }\n }\n "],["\n mutation createCustomerEmailSubscription(\n $input: CreateCustomerEmailSubscriptionInput!\n ) {\n createCustomerEmailSubscription(input: $input) {\n id\n }\n }\n "]))),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,i.getClient().mutate({mutation:n,variables:{input:{email:t}}})];case 2:return(s=e.sent().errors)&&s.length?[2,!1]:[3,4];case 3:return o=e.sent(),console.log(o),[2,!1];case 4:return[2,!0]}}))}))},L.getLastViewedProducts=function(t){var s;return n(this,void 0,void 0,(function(){var n,o,d,c,u;return e(this,(function(e){switch(e.label){case 0:n=a($||($=r(["\n query getLastViewedProducts($customerId: String) {\n getLastViewedProducts(customerId: $customerId) {\n products {\n productId\n variantId\n }\n }\n }\n "],["\n query getLastViewedProducts($customerId: String) {\n getLastViewedProducts(customerId: $customerId) {\n products {\n productId\n variantId\n }\n }\n }\n "]))),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,i.getClient().query({query:n,variables:{customerId:t}})];case 2:return o=e.sent(),d=o.data,(c=o.errors)&&c.length?[2,[]]:[2,(null===(s=d.getLastViewedProducts)||void 0===s?void 0:s.products)||[]];case 3:return u=e.sent(),console.log(u),[2,[]];case 4:return[2]}}))}))},L.saveLastViewedProducts=function(t){return n(this,void 0,void 0,(function(){var n,s,o;return e(this,(function(e){switch(e.label){case 0:n=a(x||(x=r(["\n mutation saveLastViewedProducts($input: ProductLastViewedInput!) {\n saveLastViewedProducts(input: $input) {\n id\n }\n }\n "],["\n mutation saveLastViewedProducts($input: ProductLastViewedInput!) {\n saveLastViewedProducts(input: $input) {\n id\n }\n }\n "]))),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,i.getClient().mutate({mutation:n,variables:{input:t}})];case 2:return(s=e.sent().errors)&&s.length?[2,!1]:[3,4];case 3:return o=e.sent(),console.log(o),[2,!1];case 4:return[2,!0]}}))}))},L.getOrderRefundSettings=function(){return n(this,void 0,void 0,(function(){var n,t,s,o,c;return e(this,(function(e){switch(e.label){case 0:n=a(C||(C=r(["\n query listOrderRefundSettings($storefrontId: StringFilterInput!) {\n listOrderRefundSettings(storefrontId: $storefrontId) {\n isActiveRefundSection\n orderRefundDayLimit\n refundDesc\n }\n }\n "],["\n query listOrderRefundSettings($storefrontId: StringFilterInput!) {\n listOrderRefundSettings(storefrontId: $storefrontId) {\n isActiveRefundSection\n orderRefundDayLimit\n refundDesc\n }\n }\n "]))),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,i.getClient().query({query:n,variables:{storefrontId:{eq:u.storefrontId}}})];case 2:return t=e.sent(),s=t.data,(o=t.errors)&&o.length&&console.log(o),s&&s.listOrderRefundSettings.length?[2,new d(s.listOrderRefundSettings[0])]:[3,4];case 3:return c=e.sent(),console.log(c),[3,4];case 4:return[2]}}))}))},L}();export{L as IkasCustomerAPI};
1
+ import{__awaiter as n,__generator as e,__assign as t,__makeTemplateObject as r}from'../../ext/tslib/tslib.es6.js';import a from'../../ext/graphql-tag/src/index.js';import{apollo as i}from"../apollo.js";import"../../models/data/blog/index.js";import"../../models/data/brand/index.js";import"../../models/data/category/index.js";import"../../models/data/checkout/index.js";import"../../models/data/customer/address/index.js";import{IkasCustomer as s}from"../../models/data/customer/index.js";import"../../models/data/customer-review/index.js";import"../../models/data/html-meta-data/index.js";import"../../models/data/image/index.js";import"../../models/data/installment-info/index.js";import{IkasOrder as o}from"../../models/data/order/index.js";import"../../models/data/order/line-item/index.js";import{IkasOrderRefundSettings as d}from"../../models/data/order/refund/settings.js";import"../../models/data/product/index.js";import"mobx";import"../../models/data/variant-type/index.js";import"../../models/data/product/variant/index.js";import"../../models/data/product/variant/price/index.js";import"../../models/data/product-attribute/index.js";import"../../models/data/product/attribute-value/index.js";import"../../models/data/product-filter/index.js";import"../../models/data/variant-type/variant-value/index.js";import{IkasOrderTransaction as c}from"../../models/data/order-transaction/index.js";import"../../models/data/product-option-set/index.js";import"../../models/data/raffle/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"../../models/theme/settings/index.js";import"../../models/theme/custom-data/index.js";import{IkasStorefrontConfig as u}from"../../storefront/index.js";var m,l,p,g,f,y,h,v,N,I,b,k,L,x,$,S,C=function(){function C(){}return C.login=function(o,d){return n(this,void 0,void 0,(function(){var n,c,u,l,p;return e(this,(function(e){switch(e.label){case 0:n=a(m||(m=r(["\n mutation customerLogin($email: String!, $password: String!) {\n customerLogin(email: $email, password: $password) {\n token\n tokenExpiry\n customer {\n id\n isEmailVerified\n isPhoneVerified\n lastName\n addresses {\n addressLine1\n addressLine2\n identityNumber\n city {\n code\n id\n name\n }\n company\n country {\n code\n id\n name\n iso2\n iso3\n }\n district {\n id\n name\n code\n }\n id\n firstName\n isDefault\n lastName\n postalCode\n state {\n name\n id\n code\n }\n taxNumber\n taxOffice\n title\n }\n phone\n accountStatus\n email\n firstName\n subscriptionStatus\n }\n }\n }\n "],["\n mutation customerLogin($email: String!, $password: String!) {\n customerLogin(email: $email, password: $password) {\n token\n tokenExpiry\n customer {\n id\n isEmailVerified\n isPhoneVerified\n lastName\n addresses {\n addressLine1\n addressLine2\n identityNumber\n city {\n code\n id\n name\n }\n company\n country {\n code\n id\n name\n iso2\n iso3\n }\n district {\n id\n name\n code\n }\n id\n firstName\n isDefault\n lastName\n postalCode\n state {\n name\n id\n code\n }\n taxNumber\n taxOffice\n title\n }\n phone\n accountStatus\n email\n firstName\n subscriptionStatus\n }\n }\n }\n "]))),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,i.getClient().mutate({mutation:n,variables:{email:o,password:d}})];case 2:return c=e.sent(),u=c.data,(l=c.errors)&&l.length&&console.log(l),u&&u.customerLogin?[2,t(t({},u.customerLogin),{customer:new s(u.customerLogin.customer)})]:[3,4];case 3:return p=e.sent(),console.log(p),[3,4];case 4:return[2]}}))}))},C.socialLogin=function(t){return n(this,void 0,void 0,(function(){var n,o,d,c,u;return e(this,(function(e){switch(e.label){case 0:n=a(l||(l=r(["\n query customerSocialLogin($code: String!) {\n customerSocialLogin(code: $code) {\n token\n tokenExpiry\n customer {\n id\n isEmailVerified\n isPhoneVerified\n lastName\n addresses {\n addressLine1\n addressLine2\n identityNumber\n city {\n code\n id\n name\n }\n company\n country {\n code\n id\n name\n iso2\n iso3\n }\n district {\n id\n name\n code\n }\n id\n firstName\n isDefault\n lastName\n postalCode\n state {\n name\n id\n code\n }\n taxNumber\n taxOffice\n title\n }\n phone\n accountStatus\n email\n firstName\n subscriptionStatus\n }\n }\n }\n "],["\n query customerSocialLogin($code: String!) {\n customerSocialLogin(code: $code) {\n token\n tokenExpiry\n customer {\n id\n isEmailVerified\n isPhoneVerified\n lastName\n addresses {\n addressLine1\n addressLine2\n identityNumber\n city {\n code\n id\n name\n }\n company\n country {\n code\n id\n name\n iso2\n iso3\n }\n district {\n id\n name\n code\n }\n id\n firstName\n isDefault\n lastName\n postalCode\n state {\n name\n id\n code\n }\n taxNumber\n taxOffice\n title\n }\n phone\n accountStatus\n email\n firstName\n subscriptionStatus\n }\n }\n }\n "]))),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,i.getClient().query({query:n,variables:{code:t}})];case 2:return o=e.sent(),d=o.data,(c=o.errors)&&c.length&&console.log(c),d&&d.customerSocialLogin.customer?[2,{customer:new s(d.customerSocialLogin.customer),token:d.customerSocialLogin.token,tokenExpiry:d.customerSocialLogin.tokenExpiry}]:[3,4];case 3:return u=e.sent(),console.log(u),[3,4];case 4:return[2]}}))}))},C.register=function(o,d,c,m,l){return n(this,void 0,void 0,(function(){var n,g,f,y,h;return e(this,(function(e){switch(e.label){case 0:n=a(p||(p=r(["\n mutation registerCustomer(\n $email: String!\n $password: String!\n $firstName: String!\n $lastName: String!\n $isAcceptMarketing: Boolean\n $locale: String\n ) {\n registerCustomer(\n email: $email\n password: $password\n firstName: $firstName\n lastName: $lastName\n isAcceptMarketing: $isAcceptMarketing\n locale: $locale\n ) {\n token\n tokenExpiry\n customer {\n id\n isEmailVerified\n isPhoneVerified\n lastName\n addresses {\n addressLine1\n addressLine2\n city {\n code\n id\n name\n }\n company\n country {\n code\n id\n name\n iso2\n iso3\n }\n district {\n id\n name\n code\n }\n id\n firstName\n isDefault\n lastName\n postalCode\n state {\n name\n id\n code\n }\n taxNumber\n taxOffice\n title\n }\n phone\n accountStatus\n email\n firstName\n }\n }\n }\n "],["\n mutation registerCustomer(\n $email: String!\n $password: String!\n $firstName: String!\n $lastName: String!\n $isAcceptMarketing: Boolean\n $locale: String\n ) {\n registerCustomer(\n email: $email\n password: $password\n firstName: $firstName\n lastName: $lastName\n isAcceptMarketing: $isAcceptMarketing\n locale: $locale\n ) {\n token\n tokenExpiry\n customer {\n id\n isEmailVerified\n isPhoneVerified\n lastName\n addresses {\n addressLine1\n addressLine2\n city {\n code\n id\n name\n }\n company\n country {\n code\n id\n name\n iso2\n iso3\n }\n district {\n id\n name\n code\n }\n id\n firstName\n isDefault\n lastName\n postalCode\n state {\n name\n id\n code\n }\n taxNumber\n taxOffice\n title\n }\n phone\n accountStatus\n email\n firstName\n }\n }\n }\n "]))),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,i.getClient().mutate({mutation:n,variables:{email:o,password:d,firstName:c,lastName:m,isAcceptMarketing:l,locale:u.getCurrentLocale()}})];case 2:return g=e.sent(),f=g.data,(y=g.errors)&&y.length&&console.log(y),f&&f.registerCustomer?[2,t(t({},f.registerCustomer),{customer:new s(f.registerCustomer.customer)})]:[3,4];case 3:return h=e.sent(),console.log(h),[3,4];case 4:return[2]}}))}))},C.refreshToken=function(t){return n(this,void 0,void 0,(function(){var n,s,o,d,c;return e(this,(function(e){switch(e.label){case 0:n=a(g||(g=r(["\n mutation customerRefreshToken($token: String!) {\n customerRefreshToken(token: $token) {\n token\n tokenExpiry\n }\n }\n "],["\n mutation customerRefreshToken($token: String!) {\n customerRefreshToken(token: $token) {\n token\n tokenExpiry\n }\n }\n "]))),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,i.getClient().mutate({mutation:n,variables:{token:t}})];case 2:return s=e.sent(),o=s.data,(d=s.errors)&&d.length&&console.log(d),o?[2,o.customerRefreshToken]:[3,4];case 3:return c=e.sent(),console.log(c),[3,4];case 4:return[2]}}))}))},C.forgotPassword=function(t){return n(this,void 0,void 0,(function(){var n,s,o,d;return e(this,(function(e){switch(e.label){case 0:n=a(f||(f=r(["\n mutation customerForgotPassword($email: String!, $locale: String!) {\n customerForgotPassword(email: $email, locale: $locale)\n }\n "],["\n mutation customerForgotPassword($email: String!, $locale: String!) {\n customerForgotPassword(email: $email, locale: $locale)\n }\n "]))),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,i.getClient().mutate({mutation:n,variables:{email:t,locale:u.getCurrentLocale()}})];case 2:return s=e.sent(),(o=s.errors)&&o.length?(console.log(o),[2,!1]):[3,4];case 3:return d=e.sent(),console.log(d),[3,4];case 4:return[2,!0]}}))}))},C.recoverPassword=function(t,s,o){return n(this,void 0,void 0,(function(){var n,d,c,u;return e(this,(function(e){switch(e.label){case 0:n=a(y||(y=r(["\n mutation customerRecoverPassword(\n $password: String!\n $passwordAgain: String!\n $token: String!\n ) {\n customerRecoverPassword(\n password: $password\n passwordAgain: $passwordAgain\n token: $token\n )\n }\n "],["\n mutation customerRecoverPassword(\n $password: String!\n $passwordAgain: String!\n $token: String!\n ) {\n customerRecoverPassword(\n password: $password\n passwordAgain: $passwordAgain\n token: $token\n )\n }\n "]))),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,i.getClient().mutate({mutation:n,variables:{password:t,passwordAgain:s,token:o}})];case 2:return d=e.sent(),(c=d.errors)&&c.length?(console.log(c),[2,!1]):[3,4];case 3:return u=e.sent(),console.log(u),[2,!1];case 4:return[2,!0]}}))}))},C.checkEmail=function(t){return n(this,void 0,void 0,(function(){var n,s,o,d,c;return e(this,(function(e){switch(e.label){case 0:n=a(h||(h=r(["\n query checkCustomerEmail($email: String!) {\n checkCustomerEmail(email: $email) {\n exists\n }\n }\n "],["\n query checkCustomerEmail($email: String!) {\n checkCustomerEmail(email: $email) {\n exists\n }\n }\n "]))),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,i.getClient().query({query:n,variables:{email:t}})];case 2:return s=e.sent(),o=s.data,(d=s.errors)&&d.length&&console.log(d),o&&o.checkCustomerEmail?[2,o.checkCustomerEmail.exists]:[3,4];case 3:return c=e.sent(),console.log(c),[3,4];case 4:return[2,!1]}}))}))},C.getCustomer=function(){return n(this,void 0,void 0,(function(){var n,t,o,d,c;return e(this,(function(e){switch(e.label){case 0:n=a(v||(v=r(["\n query getMyCustomer {\n getMyCustomer {\n id\n isEmailVerified\n isPhoneVerified\n lastName\n addresses {\n addressLine1\n addressLine2\n city {\n code\n id\n name\n }\n company\n country {\n code\n id\n name\n }\n district {\n id\n name\n code\n }\n id\n firstName\n isDefault\n lastName\n postalCode\n state {\n name\n id\n code\n }\n taxNumber\n taxOffice\n title\n phone\n }\n phone\n accountStatus\n email\n firstName\n }\n }\n "],["\n query getMyCustomer {\n getMyCustomer {\n id\n isEmailVerified\n isPhoneVerified\n lastName\n addresses {\n addressLine1\n addressLine2\n city {\n code\n id\n name\n }\n company\n country {\n code\n id\n name\n }\n district {\n id\n name\n code\n }\n id\n firstName\n isDefault\n lastName\n postalCode\n state {\n name\n id\n code\n }\n taxNumber\n taxOffice\n title\n phone\n }\n phone\n accountStatus\n email\n firstName\n }\n }\n "]))),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,i.getClient().query({query:n})];case 2:return t=e.sent(),o=t.data,(d=t.errors)&&d.length&&console.log(d),o&&o.getMyCustomer?[2,new s(o.getMyCustomer)]:[3,4];case 3:return c=e.sent(),console.log(c),[3,4];case 4:return[2]}}))}))},C.saveCustomer=function(t){return n(this,void 0,void 0,(function(){var n,o,d,c,u;return e(this,(function(e){switch(e.label){case 0:n=a(N||(N=r(["\n mutation saveMyCustomer($input: SaveMyCustomerInput!) {\n saveMyCustomer(input: $input) {\n id\n isEmailVerified\n isPhoneVerified\n lastName\n addresses {\n addressLine1\n addressLine2\n city {\n code\n id\n name\n }\n company\n country {\n code\n id\n name\n iso2\n iso3\n }\n district {\n id\n name\n code\n }\n id\n firstName\n isDefault\n lastName\n postalCode\n state {\n name\n id\n code\n }\n identityNumber\n taxNumber\n taxOffice\n title\n phone\n }\n phone\n accountStatus\n email\n firstName\n }\n }\n "],["\n mutation saveMyCustomer($input: SaveMyCustomerInput!) {\n saveMyCustomer(input: $input) {\n id\n isEmailVerified\n isPhoneVerified\n lastName\n addresses {\n addressLine1\n addressLine2\n city {\n code\n id\n name\n }\n company\n country {\n code\n id\n name\n iso2\n iso3\n }\n district {\n id\n name\n code\n }\n id\n firstName\n isDefault\n lastName\n postalCode\n state {\n name\n id\n code\n }\n identityNumber\n taxNumber\n taxOffice\n title\n phone\n }\n phone\n accountStatus\n email\n firstName\n }\n }\n "]))),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,i.getClient().mutate({mutation:n,variables:{input:{firstName:t.firstName,lastName:t.lastName,addresses:t.addresses,phone:t.phone}}})];case 2:return o=e.sent(),d=o.data,(c=o.errors)&&c.length&&console.log(c),d&&d.saveMyCustomer?[2,new s(d.saveMyCustomer)]:[3,4];case 3:return u=e.sent(),console.log(u),[3,4];case 4:return[2]}}))}))},C.getOrders=function(t){return n(this,void 0,void 0,(function(){var n,s,d,c,u;return e(this,(function(e){switch(e.label){case 0:n=a(I||(I=r(["\n query getCustomerOrders($orderId: String) {\n getCustomerOrders(orderId: $orderId) {\n billingAddress {\n addressLine1\n addressLine2\n city {\n code\n id\n name\n }\n company\n country {\n name\n id\n code\n }\n district {\n name\n id\n code\n }\n firstName\n identityNumber\n isDefault\n lastName\n phone\n postalCode\n state {\n name\n id\n code\n }\n taxNumber\n taxOffice\n }\n cancelledAt\n cancelReason\n createdAt\n currencyCode\n currencyRates {\n rate\n originalRate\n code\n }\n customer {\n lastName\n firstName\n email\n id\n }\n deleted\n id\n merchantId\n note\n orderedAt\n orderAdjustments {\n type\n order\n name\n amountType\n amount\n }\n orderLineItems {\n createdAt\n currencyCode\n deleted\n discount {\n reason\n amountType\n amount\n }\n discountPrice\n finalPrice\n id\n originalOrderLineItemId\n price\n quantity\n status\n statusUpdatedAt\n stockLocationId\n taxValue\n updatedAt\n variant {\n barcodeList\n id\n mainImageId\n name\n productId\n sku\n variantValues {\n variantValueName\n variantValueId\n variantTypeName\n variantTypeId\n order\n }\n }\n options {\n name\n productOptionId\n productOptionsSetId\n type\n values {\n name\n price\n value\n }\n }\n }\n orderNumber\n orderPackages {\n updatedAt\n trackingInfo {\n trackingNumber\n trackingLink\n isSendNotification\n cargoCompany\n }\n stockLocationId\n orderPackageNumber\n orderPackageFulfillStatus\n orderLineItemIds\n id\n deleted\n createdAt\n }\n orderPackageStatus\n orderPaymentStatus\n orderTagIds\n shippingAddress {\n taxOffice\n taxNumber\n state {\n name\n id\n code\n }\n postalCode\n phone\n lastName\n isDefault\n identityNumber\n firstName\n district {\n name\n id\n code\n }\n country {\n name\n id\n code\n }\n company\n city {\n id\n code\n name\n }\n addressLine2\n addressLine1\n }\n shippingLines {\n title\n taxValue\n price\n }\n shippingMethod\n status\n taxLines {\n rate\n price\n }\n totalFinalPrice\n totalPrice\n updatedAt\n }\n }\n "],["\n query getCustomerOrders($orderId: String) {\n getCustomerOrders(orderId: $orderId) {\n billingAddress {\n addressLine1\n addressLine2\n city {\n code\n id\n name\n }\n company\n country {\n name\n id\n code\n }\n district {\n name\n id\n code\n }\n firstName\n identityNumber\n isDefault\n lastName\n phone\n postalCode\n state {\n name\n id\n code\n }\n taxNumber\n taxOffice\n }\n cancelledAt\n cancelReason\n createdAt\n currencyCode\n currencyRates {\n rate\n originalRate\n code\n }\n customer {\n lastName\n firstName\n email\n id\n }\n deleted\n id\n merchantId\n note\n orderedAt\n orderAdjustments {\n type\n order\n name\n amountType\n amount\n }\n orderLineItems {\n createdAt\n currencyCode\n deleted\n discount {\n reason\n amountType\n amount\n }\n discountPrice\n finalPrice\n id\n originalOrderLineItemId\n price\n quantity\n status\n statusUpdatedAt\n stockLocationId\n taxValue\n updatedAt\n variant {\n barcodeList\n id\n mainImageId\n name\n productId\n sku\n variantValues {\n variantValueName\n variantValueId\n variantTypeName\n variantTypeId\n order\n }\n }\n options {\n name\n productOptionId\n productOptionsSetId\n type\n values {\n name\n price\n value\n }\n }\n }\n orderNumber\n orderPackages {\n updatedAt\n trackingInfo {\n trackingNumber\n trackingLink\n isSendNotification\n cargoCompany\n }\n stockLocationId\n orderPackageNumber\n orderPackageFulfillStatus\n orderLineItemIds\n id\n deleted\n createdAt\n }\n orderPackageStatus\n orderPaymentStatus\n orderTagIds\n shippingAddress {\n taxOffice\n taxNumber\n state {\n name\n id\n code\n }\n postalCode\n phone\n lastName\n isDefault\n identityNumber\n firstName\n district {\n name\n id\n code\n }\n country {\n name\n id\n code\n }\n company\n city {\n id\n code\n name\n }\n addressLine2\n addressLine1\n }\n shippingLines {\n title\n taxValue\n price\n }\n shippingMethod\n status\n taxLines {\n rate\n price\n }\n totalFinalPrice\n totalPrice\n updatedAt\n }\n }\n "]))),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,i.getClient().query({query:n,variables:t?{orderId:t}:{}})];case 2:return s=e.sent(),d=s.data,(c=s.errors)&&c.length&&console.log(c),d&&d.getCustomerOrders?[2,d.getCustomerOrders.map((function(n){return new o(n)}))]:[3,4];case 3:return u=e.sent(),console.log(u),[3,4];case 4:return[2]}}))}))},C.getOrderTransactions=function(t){return n(this,void 0,void 0,(function(){var n,s,o,d,u;return e(this,(function(e){switch(e.label){case 0:n=a(b||(b=r(["\n query listOrderTransactions(\n $checkoutId: StringFilterInput\n $id: StringFilterInput\n $orderId: StringFilterInput\n ) {\n listOrderTransactions(\n checkoutId: $checkoutId\n id: $id\n orderId: $orderId\n ) {\n amount\n checkoutId\n createdAt\n currencyCode\n customerId\n deleted\n error {\n code\n declineCode\n message\n }\n id\n orderId\n paymentGatewayId\n paymentGatewayName\n paymentMethod\n paymentMethodDetail {\n bankName\n binNumber\n cardAssociation\n cardFamily\n cardType\n installment {\n installmentCount\n installmentPrice\n totalPrice\n }\n lastFourDigits\n threeDSecure\n }\n processedAt\n refundReason\n status\n type\n updatedAt\n }\n }\n "],["\n query listOrderTransactions(\n $checkoutId: StringFilterInput\n $id: StringFilterInput\n $orderId: StringFilterInput\n ) {\n listOrderTransactions(\n checkoutId: $checkoutId\n id: $id\n orderId: $orderId\n ) {\n amount\n checkoutId\n createdAt\n currencyCode\n customerId\n deleted\n error {\n code\n declineCode\n message\n }\n id\n orderId\n paymentGatewayId\n paymentGatewayName\n paymentMethod\n paymentMethodDetail {\n bankName\n binNumber\n cardAssociation\n cardFamily\n cardType\n installment {\n installmentCount\n installmentPrice\n totalPrice\n }\n lastFourDigits\n threeDSecure\n }\n processedAt\n refundReason\n status\n type\n updatedAt\n }\n }\n "]))),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,i.getClient().query({query:n,variables:{checkoutId:(null==t?void 0:t.checkoutId)?{eq:t.checkoutId}:void 0,id:(null==t?void 0:t.id)?{eq:t.id}:void 0,orderId:(null==t?void 0:t.orderId)?{eq:t.orderId}:void 0}})];case 2:return s=e.sent(),o=s.data,d=s.errors,Array.isArray(d)&&d.length?[2,[]]:[2,o.listOrderTransactions.map((function(n){return new c(n)}))];case 3:return u=e.sent(),console.log(u),[2,[]];case 4:return[2]}}))}))},C.saveIkasOrderRefund=function(t){return n(this,void 0,void 0,(function(){var n,s,d,c,u;return e(this,(function(e){switch(e.label){case 0:n=a(k||(k=r(["\n mutation createOrderRefundRequest($input: OrderRefundRequestInput!) {\n createOrderRefundRequest(input: $input) {\n billingAddress {\n addressLine1\n addressLine2\n city {\n code\n id\n name\n }\n company\n country {\n name\n id\n code\n }\n district {\n name\n id\n code\n }\n firstName\n identityNumber\n isDefault\n lastName\n phone\n postalCode\n state {\n name\n id\n code\n }\n taxNumber\n taxOffice\n }\n cancelledAt\n cancelReason\n createdAt\n currencyCode\n currencyRates {\n rate\n originalRate\n code\n }\n customer {\n lastName\n firstName\n email\n id\n }\n deleted\n id\n merchantId\n note\n orderedAt\n orderAdjustments {\n type\n order\n name\n amountType\n amount\n }\n orderLineItems {\n createdAt\n currencyCode\n deleted\n discount {\n reason\n amountType\n amount\n }\n discountPrice\n finalPrice\n id\n originalOrderLineItemId\n price\n quantity\n status\n statusUpdatedAt\n stockLocationId\n taxValue\n updatedAt\n variant {\n barcodeList\n id\n mainImageId\n name\n productId\n sku\n variantValues {\n variantValueName\n variantValueId\n variantTypeName\n variantTypeId\n order\n }\n }\n }\n orderNumber\n orderPackages {\n updatedAt\n trackingInfo {\n trackingNumber\n trackingLink\n isSendNotification\n cargoCompany\n }\n stockLocationId\n orderPackageNumber\n orderPackageFulfillStatus\n orderLineItemIds\n id\n deleted\n createdAt\n }\n orderPackageStatus\n orderPaymentStatus\n orderTagIds\n shippingAddress {\n taxOffice\n taxNumber\n state {\n name\n id\n code\n }\n postalCode\n phone\n lastName\n isDefault\n identityNumber\n firstName\n district {\n name\n id\n code\n }\n country {\n name\n id\n code\n }\n company\n city {\n id\n code\n name\n }\n addressLine2\n addressLine1\n }\n shippingLines {\n title\n taxValue\n price\n }\n shippingMethod\n status\n taxLines {\n rate\n price\n }\n totalFinalPrice\n totalPrice\n updatedAt\n }\n }\n "],["\n mutation createOrderRefundRequest($input: OrderRefundRequestInput!) {\n createOrderRefundRequest(input: $input) {\n billingAddress {\n addressLine1\n addressLine2\n city {\n code\n id\n name\n }\n company\n country {\n name\n id\n code\n }\n district {\n name\n id\n code\n }\n firstName\n identityNumber\n isDefault\n lastName\n phone\n postalCode\n state {\n name\n id\n code\n }\n taxNumber\n taxOffice\n }\n cancelledAt\n cancelReason\n createdAt\n currencyCode\n currencyRates {\n rate\n originalRate\n code\n }\n customer {\n lastName\n firstName\n email\n id\n }\n deleted\n id\n merchantId\n note\n orderedAt\n orderAdjustments {\n type\n order\n name\n amountType\n amount\n }\n orderLineItems {\n createdAt\n currencyCode\n deleted\n discount {\n reason\n amountType\n amount\n }\n discountPrice\n finalPrice\n id\n originalOrderLineItemId\n price\n quantity\n status\n statusUpdatedAt\n stockLocationId\n taxValue\n updatedAt\n variant {\n barcodeList\n id\n mainImageId\n name\n productId\n sku\n variantValues {\n variantValueName\n variantValueId\n variantTypeName\n variantTypeId\n order\n }\n }\n }\n orderNumber\n orderPackages {\n updatedAt\n trackingInfo {\n trackingNumber\n trackingLink\n isSendNotification\n cargoCompany\n }\n stockLocationId\n orderPackageNumber\n orderPackageFulfillStatus\n orderLineItemIds\n id\n deleted\n createdAt\n }\n orderPackageStatus\n orderPaymentStatus\n orderTagIds\n shippingAddress {\n taxOffice\n taxNumber\n state {\n name\n id\n code\n }\n postalCode\n phone\n lastName\n isDefault\n identityNumber\n firstName\n district {\n name\n id\n code\n }\n country {\n name\n id\n code\n }\n company\n city {\n id\n code\n name\n }\n addressLine2\n addressLine1\n }\n shippingLines {\n title\n taxValue\n price\n }\n shippingMethod\n status\n taxLines {\n rate\n price\n }\n totalFinalPrice\n totalPrice\n updatedAt\n }\n }\n "]))),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,i.getClient().mutate({mutation:n,variables:{input:t}})];case 2:return s=e.sent(),d=s.data,(c=s.errors)&&c.length?[2]:d&&d.createOrderRefundRequest?[2,new o(null==d?void 0:d.createOrderRefundRequest)]:[3,4];case 3:return u=e.sent(),console.log(u),[3,4];case 4:return[2]}}))}))},C.createCustomerEmailSubscription=function(t){return n(this,void 0,void 0,(function(){var n,s,o;return e(this,(function(e){switch(e.label){case 0:n=a(L||(L=r(["\n mutation createCustomerEmailSubscription(\n $input: CreateCustomerEmailSubscriptionInput!\n ) {\n createCustomerEmailSubscription(input: $input) {\n id\n }\n }\n "],["\n mutation createCustomerEmailSubscription(\n $input: CreateCustomerEmailSubscriptionInput!\n ) {\n createCustomerEmailSubscription(input: $input) {\n id\n }\n }\n "]))),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,i.getClient().mutate({mutation:n,variables:{input:{email:t}}})];case 2:return(s=e.sent().errors)&&s.length?[2,!1]:[3,4];case 3:return o=e.sent(),console.log(o),[2,!1];case 4:return[2,!0]}}))}))},C.getLastViewedProducts=function(t){var s;return n(this,void 0,void 0,(function(){var n,o,d,c,u;return e(this,(function(e){switch(e.label){case 0:n=a(x||(x=r(["\n query getLastViewedProducts($customerId: String) {\n getLastViewedProducts(customerId: $customerId) {\n products {\n productId\n variantId\n }\n }\n }\n "],["\n query getLastViewedProducts($customerId: String) {\n getLastViewedProducts(customerId: $customerId) {\n products {\n productId\n variantId\n }\n }\n }\n "]))),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,i.getClient().query({query:n,variables:{customerId:t}})];case 2:return o=e.sent(),d=o.data,(c=o.errors)&&c.length?[2,[]]:[2,(null===(s=d.getLastViewedProducts)||void 0===s?void 0:s.products)||[]];case 3:return u=e.sent(),console.log(u),[2,[]];case 4:return[2]}}))}))},C.saveLastViewedProducts=function(t){return n(this,void 0,void 0,(function(){var n,s,o;return e(this,(function(e){switch(e.label){case 0:n=a($||($=r(["\n mutation saveLastViewedProducts($input: ProductLastViewedInput!) {\n saveLastViewedProducts(input: $input) {\n id\n }\n }\n "],["\n mutation saveLastViewedProducts($input: ProductLastViewedInput!) {\n saveLastViewedProducts(input: $input) {\n id\n }\n }\n "]))),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,i.getClient().mutate({mutation:n,variables:{input:t}})];case 2:return(s=e.sent().errors)&&s.length?[2,!1]:[3,4];case 3:return o=e.sent(),console.log(o),[2,!1];case 4:return[2,!0]}}))}))},C.getOrderRefundSettings=function(){return n(this,void 0,void 0,(function(){var n,t,s,o,c;return e(this,(function(e){switch(e.label){case 0:n=a(S||(S=r(["\n query listOrderRefundSettings($storefrontId: StringFilterInput!) {\n listOrderRefundSettings(storefrontId: $storefrontId) {\n isActiveRefundSection\n orderRefundDayLimit\n refundDesc\n }\n }\n "],["\n query listOrderRefundSettings($storefrontId: StringFilterInput!) {\n listOrderRefundSettings(storefrontId: $storefrontId) {\n isActiveRefundSection\n orderRefundDayLimit\n refundDesc\n }\n }\n "]))),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,i.getClient().query({query:n,variables:{storefrontId:{eq:u.storefrontId}}})];case 2:return t=e.sent(),s=t.data,(o=t.errors)&&o.length&&console.log(o),s&&s.listOrderRefundSettings.length?[2,new d(s.listOrderRefundSettings[0])]:[3,4];case 3:return c=e.sent(),console.log(c),[3,4];case 4:return[2]}}))}))},C}();export{C as IkasCustomerAPI};
@@ -10,33 +10,31 @@ export interface listCustomerReviews_listCustomerReviews_data {
10
10
  export interface listCustomerReviews_listCustomerReviews {
11
11
  __typename: "CustomerReviewSFPaginationResponse";
12
12
  /**
13
- * Returns the first three records of each page in the records returned as a
14
- * response. For example, ***let's say page = 3, limit = 30, count = 3.*** The
15
- * records that will return as a response are the records ***between 60-62.***
13
+ * Returns the first three records of each page in the records returned as a response.
14
+ * For example, **let's say page = 3, limit = 30, count = 3.**
15
+ * The records that will return as a response are the records **between 60-62.**
16
16
  */
17
17
  count: number;
18
18
  data: listCustomerReviews_listCustomerReviews_data[];
19
19
  /**
20
- * In the records returned as Response, it shows whether there are any more
21
- * records or not. For example, let's say our page field is three and our limit
22
- * field is thirty. Records between 60 and 90 will be returned. If hasNext is
23
- * ```true``` despite these records, ***it means there are more records.*** If
24
- * hasNext is ```false```, it means there are a total of ***90 records.***
20
+ * In the records returned as Response, it shows whether there are any more records or not. For example, let's say our page field is three and our limit field is thirty. Records between 60 and 90 will be returned. If hasNext is `true` despite these records, **it means there are more records.** If hasNext is `false`, it means there are a total of **90 records.**
25
21
  */
26
22
  hasNext: boolean;
27
23
  /**
28
- * The maximum number of data you want to see on a page in the records returned
29
- * as a response. For example, if the limit is ***20***, the data will be
30
- * displayed ***as 20 each.***<br />:::note<br />min 1, max 200 values can be
31
- * given. If no value is entered, default 50 is accepted.<br />:::
24
+ * The maximum number of data you want to see on a page in the records returned as a response.
25
+ * For example, if the limit is **20**, the data will be displayed ** as 20 each. **
26
+ * :::note
27
+ * min 1, max 200 values can be given. If no value is entered, default 50 is accepted.
28
+ * :::
32
29
  */
33
30
  limit: number;
34
31
  /**
35
32
  * The number of the page you want to see in the records that return as response.
36
- * For example: We entered the page field as ***3***.And let our limit field be
37
- * ***30***. The records that will return as a response are the records
38
- * ***between 60-90.***<br />:::note<br />If no value is entered, default 1 is
39
- * accepted.<br /> :::
33
+ * For example: We entered the page field as **3**.And let our limit field be **30**.
34
+ * The records that will return as a response are the records **between 60-90.**
35
+ * :::note
36
+ * If no value is entered, default 1 is accepted.
37
+ * :::
40
38
  */
41
39
  page: number;
42
40
  }
@@ -1 +1 @@
1
- import{__awaiter as n,__generator as e,__makeTemplateObject as t}from'../../ext/tslib/tslib.es6.js';import{IkasProductOptionSet as i}from"../../models/data/product-option-set/index.js";import d from'../../ext/graphql-tag/src/index.js';import{apollo as o}from"../apollo.js";var a,l=function(){function l(){}return l.list=function(l,r,u){return void 0===u&&(u=!1),n(this,void 0,void 0,(function(){var n,s,p,c,m;return e(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),n=d(a||(a=t(["\n query ListProductOptionSet(\n $id: StringFilterInput!\n $updatedAt: DateFilterInput\n $includeDeleted: Boolean!\n ) {\n listProductOptionSet(\n updatedAt: $updatedAt\n includeDeleted: $includeDeleted\n id: $id\n ) {\n createdAt\n deleted\n id\n name\n options {\n createdAt\n dateSettings {\n max\n min\n }\n deleted\n fileSettings {\n allowedExtensions\n maxQuantity\n minQuantity\n }\n id\n isOptional\n name\n optionalText\n requiredOptionId\n requiredOptionValueIds\n order\n price\n selectSettings {\n maxSelect\n minSelect\n type\n values {\n createdAt\n deleted\n id\n order\n price\n updatedAt\n value\n thumbnailImageId\n colorCode\n }\n }\n textSettings {\n max\n min\n }\n type\n updatedAt\n }\n translations {\n locale\n options {\n id\n name\n optionalText\n values {\n id\n value\n }\n }\n }\n updatedAt\n }\n }\n "],["\n query ListProductOptionSet(\n $id: StringFilterInput!\n $updatedAt: DateFilterInput\n $includeDeleted: Boolean!\n ) {\n listProductOptionSet(\n updatedAt: $updatedAt\n includeDeleted: $includeDeleted\n id: $id\n ) {\n createdAt\n deleted\n id\n name\n options {\n createdAt\n dateSettings {\n max\n min\n }\n deleted\n fileSettings {\n allowedExtensions\n maxQuantity\n minQuantity\n }\n id\n isOptional\n name\n optionalText\n requiredOptionId\n requiredOptionValueIds\n order\n price\n selectSettings {\n maxSelect\n minSelect\n type\n values {\n createdAt\n deleted\n id\n order\n price\n updatedAt\n value\n thumbnailImageId\n colorCode\n }\n }\n textSettings {\n max\n min\n }\n type\n updatedAt\n }\n translations {\n locale\n options {\n id\n name\n optionalText\n values {\n id\n value\n }\n }\n }\n updatedAt\n }\n }\n "]))),[4,o.getClient().query({query:n,variables:{includeDeleted:u,updatedAt:{gt:r},id:{in:l}}})];case 1:return s=e.sent(),p=s.data,(c=s.errors)&&c.length?(console.log(c),[2]):[2,p.listProductOptionSet.map((function(n){return new i(n)}))];case 2:return m=e.sent(),console.log(m),[3,3];case 3:return[2]}}))}))},l}();export{l as IkasProductOptionSetAPI};
1
+ import{__awaiter as n,__generator as e,__makeTemplateObject as t}from'../../ext/tslib/tslib.es6.js';import{IkasProductOptionSet as i}from"../../models/data/product-option-set/index.js";import d from'../../ext/graphql-tag/src/index.js';import{apollo as a}from"../apollo.js";var l,o=function(){function o(){}return o.list=function(o,r,u){return void 0===u&&(u=!1),n(this,void 0,void 0,(function(){var n,s,p,c,m;return e(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),n=d(l||(l=t(["\n query ListProductOptionSet(\n $id: StringFilterInput!\n $updatedAt: DateFilterInput\n $includeDeleted: Boolean!\n ) {\n listProductOptionSet(\n updatedAt: $updatedAt\n includeDeleted: $includeDeleted\n id: $id\n ) {\n createdAt\n deleted\n id\n name\n options {\n createdAt\n dateSettings {\n max\n min\n minRelativeNextDate\n maxRelativeNextDate\n }\n deleted\n fileSettings {\n allowedExtensions\n maxQuantity\n minQuantity\n }\n id\n isOptional\n name\n optionalText\n requiredOptionId\n requiredOptionValueIds\n order\n price\n selectSettings {\n maxSelect\n minSelect\n type\n values {\n createdAt\n deleted\n id\n order\n price\n updatedAt\n value\n thumbnailImageId\n colorCode\n }\n }\n textSettings {\n max\n min\n }\n type\n updatedAt\n }\n translations {\n locale\n options {\n id\n name\n optionalText\n values {\n id\n value\n }\n }\n }\n updatedAt\n }\n }\n "],["\n query ListProductOptionSet(\n $id: StringFilterInput!\n $updatedAt: DateFilterInput\n $includeDeleted: Boolean!\n ) {\n listProductOptionSet(\n updatedAt: $updatedAt\n includeDeleted: $includeDeleted\n id: $id\n ) {\n createdAt\n deleted\n id\n name\n options {\n createdAt\n dateSettings {\n max\n min\n minRelativeNextDate\n maxRelativeNextDate\n }\n deleted\n fileSettings {\n allowedExtensions\n maxQuantity\n minQuantity\n }\n id\n isOptional\n name\n optionalText\n requiredOptionId\n requiredOptionValueIds\n order\n price\n selectSettings {\n maxSelect\n minSelect\n type\n values {\n createdAt\n deleted\n id\n order\n price\n updatedAt\n value\n thumbnailImageId\n colorCode\n }\n }\n textSettings {\n max\n min\n }\n type\n updatedAt\n }\n translations {\n locale\n options {\n id\n name\n optionalText\n values {\n id\n value\n }\n }\n }\n updatedAt\n }\n }\n "]))),[4,a.getClient().query({query:n,variables:{includeDeleted:u,updatedAt:{gt:r},id:{in:o}}})];case 1:return s=e.sent(),p=s.data,(c=s.errors)&&c.length?(console.log(c),[2]):[2,p.listProductOptionSet.map((function(n){return new i(n)}))];case 2:return m=e.sent(),console.log(m),[3,3];case 3:return[2]}}))}))},o}();export{o as IkasProductOptionSetAPI};
@@ -39,32 +39,30 @@ export interface listRaffle_listRaffle_data {
39
39
  export interface listRaffle_listRaffle {
40
40
  __typename: "RafflePaginationResponse";
41
41
  /**
42
- * Returns the first three records of each page in the records returned as a
43
- * response. For example, ***let's say page = 3, limit = 30, count = 3.*** The
44
- * records that will return as a response are the records ***between 60-62.***
42
+ * Returns the first three records of each page in the records returned as a response.
43
+ * For example, **let's say page = 3, limit = 30, count = 3.**
44
+ * The records that will return as a response are the records **between 60-62.**
45
45
  */
46
46
  count: number;
47
47
  /**
48
- * In the records returned as Response, it shows whether there are any more
49
- * records or not. For example, let's say our page field is three and our limit
50
- * field is thirty. Records between 60 and 90 will be returned. If hasNext is
51
- * ```true``` despite these records, ***it means there are more records.*** If
52
- * hasNext is ```false```, it means there are a total of ***90 records.***
48
+ * In the records returned as Response, it shows whether there are any more records or not. For example, let's say our page field is three and our limit field is thirty. Records between 60 and 90 will be returned. If hasNext is `true` despite these records, **it means there are more records.** If hasNext is `false`, it means there are a total of **90 records.**
53
49
  */
54
50
  hasNext: boolean;
55
51
  /**
56
- * The maximum number of data you want to see on a page in the records returned
57
- * as a response. For example, if the limit is ***20***, the data will be
58
- * displayed ***as 20 each.***<br />:::note<br />min 1, max 200 values can be
59
- * given. If no value is entered, default 50 is accepted.<br />:::
52
+ * The maximum number of data you want to see on a page in the records returned as a response.
53
+ * For example, if the limit is **20**, the data will be displayed ** as 20 each. **
54
+ * :::note
55
+ * min 1, max 200 values can be given. If no value is entered, default 50 is accepted.
56
+ * :::
60
57
  */
61
58
  limit: number;
62
59
  /**
63
60
  * The number of the page you want to see in the records that return as response.
64
- * For example: We entered the page field as ***3***.And let our limit field be
65
- * ***30***. The records that will return as a response are the records
66
- * ***between 60-90.***<br />:::note<br />If no value is entered, default 1 is
67
- * accepted.<br /> :::
61
+ * For example: We entered the page field as **3**.And let our limit field be **30**.
62
+ * The records that will return as a response are the records **between 60-90.**
63
+ * :::note
64
+ * If no value is entered, default 1 is accepted.
65
+ * :::
68
66
  */
69
67
  page: number;
70
68
  data: listRaffle_listRaffle_data[];
@@ -1,5 +1,5 @@
1
1
  import { RaffleParticipantsInput } from "./../../../__generated__/global-types";
2
- export interface saveRaffleParticipant_saveRaffleParticipant_appliedProducts {
2
+ export interface saveRaffleParticipant_saveRaffleParticipant_appliedProduct {
3
3
  __typename: "AppliedProduct";
4
4
  productId: string | null;
5
5
  variantId: string;
@@ -12,7 +12,7 @@ export interface saveRaffleParticipant_saveRaffleParticipant {
12
12
  phone: string | null;
13
13
  raffleId: string;
14
14
  updatedAt: any | null;
15
- appliedProducts: saveRaffleParticipant_saveRaffleParticipant_appliedProducts[];
15
+ appliedProduct: saveRaffleParticipant_saveRaffleParticipant_appliedProduct;
16
16
  createdAt: any | null;
17
17
  customerId: string | null;
18
18
  deleted: boolean | null;
@@ -1 +1 @@
1
- import{__awaiter as n,__generator as t,__makeTemplateObject as e}from'../../ext/tslib/tslib.es6.js';import a from'../../ext/graphql-tag/src/index.js';import{apollo as i}from"../apollo.js";import{IkasRaffle as r,IkasRaffleAppliedProduct as d,IkasRaffleParticipant as l,IkasRaffleMetaData as s}from"../../models/data/raffle/index.js";var u,o,p,c,g=function(){function g(){}return g.listRaffles=function(l){return n(this,void 0,void 0,(function(){var n,s,o,p,c,g,f;return t(this,(function(t){switch(t.label){case 0:n=a(u||(u=e(["\n query listRaffle(\n $end: DateFilterInput\n $start: DateFilterInput\n $id: StringFilterInput\n $includeDeleted: Boolean\n $name: StringFilterInput\n $pagination: PaginationInput\n $search: String\n ) {\n listRaffle(\n start: $start\n end: $end\n id: $id\n includeDeleted: $includeDeleted\n name: $name\n pagination: $pagination\n search: $search\n ) {\n count\n hasNext\n limit\n page\n data {\n createdAt\n variants {\n productId\n variantId\n }\n verificationType\n dateRange {\n end\n start\n }\n deleted\n id\n metadata {\n createdAt\n deleted\n description\n id\n pageTitle\n slug\n targetId\n targetType\n updatedAt\n }\n name\n participantCount\n requiredCustomerAccount\n status\n updatedAt\n }\n }\n }\n "],["\n query listRaffle(\n $end: DateFilterInput\n $start: DateFilterInput\n $id: StringFilterInput\n $includeDeleted: Boolean\n $name: StringFilterInput\n $pagination: PaginationInput\n $search: String\n ) {\n listRaffle(\n start: $start\n end: $end\n id: $id\n includeDeleted: $includeDeleted\n name: $name\n pagination: $pagination\n search: $search\n ) {\n count\n hasNext\n limit\n page\n data {\n createdAt\n variants {\n productId\n variantId\n }\n verificationType\n dateRange {\n end\n start\n }\n deleted\n id\n metadata {\n createdAt\n deleted\n description\n id\n pageTitle\n slug\n targetId\n targetType\n updatedAt\n }\n name\n participantCount\n requiredCustomerAccount\n status\n updatedAt\n }\n }\n }\n "]))),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,i.getClient().query({query:n,variables:{start:l.start?{eq:l.start}:void 0,end:l.end?{eq:l.end}:void 0,id:l.id?{eq:l.id}:void 0,includeDeleted:(l.includeDeleted,l.includeDeleted),name:l.name?{eq:l.name}:void 0,pagination:l.pagination?{limit:l.pagination.limit,page:l.pagination.page}:void 0,search:l.search}})];case 2:return s=t.sent(),o=s.data,(p=s.errors)&&p.length?[2,{raffles:[],count:0}]:(c=o.listRaffle.count,g=o.listRaffle.data.map((function(n){var t,e;return new r({id:n.id,dateRange:{end:null===(t=n.dateRange)||void 0===t?void 0:t.end,start:null===(e=n.dateRange)||void 0===e?void 0:e.start},createdAt:n.createdAt,deleted:n.deleted,metadata:n.metadata||void 0,name:n.name,participantCount:n.participantCount,requiredCustomerAccount:n.requiredCustomerAccount,status:n.status,updatedAt:n.updatedAt,variants:n.variants.length>0?n.variants.map((function(n){return new d(n)})):void 0,verificationType:n.verificationType})})),[2,{count:c,raffles:g}]);case 3:return f=t.sent(),console.log(f),[2,{raffles:[],count:0}];case 4:return[2]}}))}))},g.saveRaffleParticipant=function(r){return n(this,void 0,void 0,(function(){var n,d,s,u,p;return t(this,(function(t){switch(t.label){case 0:n=a(o||(o=e(["\n mutation saveRaffleParticipant($input: RaffleParticipantsInput!) {\n saveRaffleParticipant(input: $input) {\n applicationDate\n isWinner\n lastName\n phone\n raffleId\n updatedAt\n appliedProducts {\n productId\n variantId\n }\n createdAt\n customerId\n deleted\n email\n extraData\n firstName\n fullName\n id\n }\n }\n "],["\n mutation saveRaffleParticipant($input: RaffleParticipantsInput!) {\n saveRaffleParticipant(input: $input) {\n applicationDate\n isWinner\n lastName\n phone\n raffleId\n updatedAt\n appliedProducts {\n productId\n variantId\n }\n createdAt\n customerId\n deleted\n email\n extraData\n firstName\n fullName\n id\n }\n }\n "]))),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,i.getClient().mutate({mutation:n,variables:{input:{appliedProducts:r.appliedProducts,email:r.email,firstName:r.firstName,lastName:r.lastName,raffleId:r.raffleId,extraData:r.extraData,phone:r.phone}}})];case 2:return d=t.sent(),s=d.data,(u=d.errors)&&u.length&&console.log(u),s&&s.saveRaffleParticipant?[2,new l(s.saveRaffleParticipant)]:[3,4];case 3:return p=t.sent(),console.log(p),[3,4];case 4:return[2]}}))}))},g.listRaffleMetaData=function(r,d,l,u,o){return void 0===u&&(u=1),void 0===o&&(o=200),n(this,void 0,void 0,(function(){var n,c,g,f,m;return t(this,(function(t){switch(t.label){case 0:n=a(p||(p=e(["\n query listRaffleMetaData(\n $slug: StringFilterInput\n $targetId: StringFilterInput\n $targetType: RaffleMetadataTargetTypeEnumFilter\n $pagination: PaginationInput\n ) {\n listRaffleMetadata(\n slug: $slug\n targetId: $targetId\n targetType: $targetType\n pagination: $pagination\n ) {\n createdAt\n deleted\n description\n id\n pageTitle\n slug\n targetId\n targetType\n updatedAt\n }\n }\n "],["\n query listRaffleMetaData(\n $slug: StringFilterInput\n $targetId: StringFilterInput\n $targetType: RaffleMetadataTargetTypeEnumFilter\n $pagination: PaginationInput\n ) {\n listRaffleMetadata(\n slug: $slug\n targetId: $targetId\n targetType: $targetType\n pagination: $pagination\n ) {\n createdAt\n deleted\n description\n id\n pageTitle\n slug\n targetId\n targetType\n updatedAt\n }\n }\n "]))),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,i.getClient().query({query:n,variables:{slug:r?{eq:r}:void 0,targetId:d?{in:d}:void 0,targetType:l?{in:l}:void 0,pagination:{page:u,limit:o}}})];case 2:return c=t.sent(),g=c.data,(f=c.errors)&&f.length?[2,[]]:[2,g.listRaffleMetadata.map((function(n){return new s(n)}))];case 3:return m=t.sent(),console.log(m),[2,[]];case 4:return[2]}}))}))},g.getRafflesByCustomerId=function(l){return n(this,void 0,void 0,(function(){var n,s,u,o,p,g;return t(this,(function(t){switch(t.label){case 0:n=a(c||(c=e(["\n query getRafflesByCustomerId($winnerFilter: Boolean) {\n getRafflesByCustomerId(winnerFilter: $winnerFilter) {\n createdAt\n variants {\n productId\n variantId\n }\n verificationType\n dateRange {\n end\n start\n }\n deleted\n id\n metadata {\n createdAt\n deleted\n description\n id\n pageTitle\n slug\n targetId\n targetType\n updatedAt\n }\n name\n participantCount\n requiredCustomerAccount\n status\n updatedAt\n }\n }\n "],["\n query getRafflesByCustomerId($winnerFilter: Boolean) {\n getRafflesByCustomerId(winnerFilter: $winnerFilter) {\n createdAt\n variants {\n productId\n variantId\n }\n verificationType\n dateRange {\n end\n start\n }\n deleted\n id\n metadata {\n createdAt\n deleted\n description\n id\n pageTitle\n slug\n targetId\n targetType\n updatedAt\n }\n name\n participantCount\n requiredCustomerAccount\n status\n updatedAt\n }\n }\n "]))),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,i.getClient().query({query:n,variables:{winnerFilter:l||void 0}})];case 2:return s=t.sent(),u=s.data,(o=s.errors)&&o.length?[2]:(p=u.getRafflesByCustomerId.map((function(n){var t,e;return new r({id:n.id,dateRange:{end:null===(t=n.dateRange)||void 0===t?void 0:t.end,start:null===(e=n.dateRange)||void 0===e?void 0:e.start},createdAt:n.createdAt,deleted:n.deleted,metadata:n.metadata||void 0,name:n.name,participantCount:n.participantCount,requiredCustomerAccount:n.requiredCustomerAccount,status:n.status,updatedAt:n.updatedAt,variants:n.variants.length>0?n.variants.map((function(n){return new d(n)})):void 0,verificationType:n.verificationType})})),[2,p]);case 3:return g=t.sent(),console.log(g),[3,4];case 4:return[2]}}))}))},g}();export{g as IkasRaffleAPI};
1
+ import{__awaiter as n,__generator as t,__makeTemplateObject as e}from'../../ext/tslib/tslib.es6.js';import a from'../../ext/graphql-tag/src/index.js';import{apollo as i}from"../apollo.js";import{IkasRaffle as r,IkasRaffleAppliedProduct as d,IkasRaffleParticipant as l,IkasRaffleMetaData as u}from"../../models/data/raffle/index.js";var s,o,p,c,g=function(){function g(){}return g.listRaffles=function(l){return n(this,void 0,void 0,(function(){var n,u,o,p,c,g,f;return t(this,(function(t){switch(t.label){case 0:n=a(s||(s=e(["\n query listRaffle(\n $end: DateFilterInput\n $start: DateFilterInput\n $id: StringFilterInput\n $includeDeleted: Boolean\n $name: StringFilterInput\n $pagination: PaginationInput\n $search: String\n ) {\n listRaffle(\n start: $start\n end: $end\n id: $id\n includeDeleted: $includeDeleted\n name: $name\n pagination: $pagination\n search: $search\n ) {\n count\n hasNext\n limit\n page\n data {\n createdAt\n variants {\n productId\n variantId\n }\n verificationType\n dateRange {\n end\n start\n }\n deleted\n id\n metadata {\n createdAt\n deleted\n description\n id\n pageTitle\n slug\n targetId\n targetType\n updatedAt\n }\n name\n participantCount\n requiredCustomerAccount\n status\n updatedAt\n }\n }\n }\n "],["\n query listRaffle(\n $end: DateFilterInput\n $start: DateFilterInput\n $id: StringFilterInput\n $includeDeleted: Boolean\n $name: StringFilterInput\n $pagination: PaginationInput\n $search: String\n ) {\n listRaffle(\n start: $start\n end: $end\n id: $id\n includeDeleted: $includeDeleted\n name: $name\n pagination: $pagination\n search: $search\n ) {\n count\n hasNext\n limit\n page\n data {\n createdAt\n variants {\n productId\n variantId\n }\n verificationType\n dateRange {\n end\n start\n }\n deleted\n id\n metadata {\n createdAt\n deleted\n description\n id\n pageTitle\n slug\n targetId\n targetType\n updatedAt\n }\n name\n participantCount\n requiredCustomerAccount\n status\n updatedAt\n }\n }\n }\n "]))),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,i.getClient().query({query:n,variables:{start:l.start?{eq:l.start}:void 0,end:l.end?{eq:l.end}:void 0,id:l.id?{eq:l.id}:void 0,includeDeleted:(l.includeDeleted,l.includeDeleted),name:l.name?{eq:l.name}:void 0,pagination:l.pagination?{limit:l.pagination.limit,page:l.pagination.page}:void 0,search:l.search}})];case 2:return u=t.sent(),o=u.data,(p=u.errors)&&p.length?[2,{raffles:[],count:0}]:(c=o.listRaffle.count,g=o.listRaffle.data.map((function(n){var t,e;return new r({id:n.id,dateRange:{end:null===(t=n.dateRange)||void 0===t?void 0:t.end,start:null===(e=n.dateRange)||void 0===e?void 0:e.start},createdAt:n.createdAt,deleted:n.deleted,metadata:n.metadata||void 0,name:n.name,participantCount:n.participantCount,requiredCustomerAccount:n.requiredCustomerAccount,status:n.status,updatedAt:n.updatedAt,variants:n.variants.length>0?n.variants.map((function(n){return new d(n)})):void 0,verificationType:n.verificationType})})),[2,{count:c,raffles:g}]);case 3:return f=t.sent(),console.log(f),[2,{raffles:[],count:0}];case 4:return[2]}}))}))},g.saveRaffleParticipant=function(r){return n(this,void 0,void 0,(function(){var n,d,u,s,p;return t(this,(function(t){switch(t.label){case 0:n=a(o||(o=e(["\n mutation saveRaffleParticipant($input: RaffleParticipantsInput!) {\n saveRaffleParticipant(input: $input) {\n applicationDate\n isWinner\n lastName\n phone\n raffleId\n updatedAt\n appliedProduct {\n productId\n variantId\n }\n createdAt\n customerId\n deleted\n email\n extraData\n firstName\n fullName\n id\n }\n }\n "],["\n mutation saveRaffleParticipant($input: RaffleParticipantsInput!) {\n saveRaffleParticipant(input: $input) {\n applicationDate\n isWinner\n lastName\n phone\n raffleId\n updatedAt\n appliedProduct {\n productId\n variantId\n }\n createdAt\n customerId\n deleted\n email\n extraData\n firstName\n fullName\n id\n }\n }\n "]))),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,i.getClient().mutate({mutation:n,variables:{input:{appliedProduct:r.appliedProduct,email:r.email,firstName:r.firstName,lastName:r.lastName,raffleId:r.raffleId,extraData:r.extraData,phone:r.phone}}})];case 2:return d=t.sent(),u=d.data,(s=d.errors)&&s.length&&console.log(s),u&&u.saveRaffleParticipant?[2,new l(u.saveRaffleParticipant)]:[3,4];case 3:return p=t.sent(),console.log(p),[3,4];case 4:return[2]}}))}))},g.listRaffleMetaData=function(r,d,l,s,o){return void 0===s&&(s=1),void 0===o&&(o=200),n(this,void 0,void 0,(function(){var n,c,g,f,m;return t(this,(function(t){switch(t.label){case 0:n=a(p||(p=e(["\n query listRaffleMetaData(\n $slug: StringFilterInput\n $targetId: StringFilterInput\n $targetType: RaffleMetadataTargetTypeEnumFilter\n $pagination: PaginationInput\n ) {\n listRaffleMetadata(\n slug: $slug\n targetId: $targetId\n targetType: $targetType\n pagination: $pagination\n ) {\n createdAt\n deleted\n description\n id\n pageTitle\n slug\n targetId\n targetType\n updatedAt\n }\n }\n "],["\n query listRaffleMetaData(\n $slug: StringFilterInput\n $targetId: StringFilterInput\n $targetType: RaffleMetadataTargetTypeEnumFilter\n $pagination: PaginationInput\n ) {\n listRaffleMetadata(\n slug: $slug\n targetId: $targetId\n targetType: $targetType\n pagination: $pagination\n ) {\n createdAt\n deleted\n description\n id\n pageTitle\n slug\n targetId\n targetType\n updatedAt\n }\n }\n "]))),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,i.getClient().query({query:n,variables:{slug:r?{eq:r}:void 0,targetId:d?{in:d}:void 0,targetType:l?{in:l}:void 0,pagination:{page:s,limit:o}}})];case 2:return c=t.sent(),g=c.data,(f=c.errors)&&f.length?[2,[]]:[2,g.listRaffleMetadata.map((function(n){return new u(n)}))];case 3:return m=t.sent(),console.log(m),[2,[]];case 4:return[2]}}))}))},g.getRafflesByCustomerId=function(l){return n(this,void 0,void 0,(function(){var n,u,s,o,p,g;return t(this,(function(t){switch(t.label){case 0:n=a(c||(c=e(["\n query getRafflesByCustomerId($winnerFilter: Boolean) {\n getRafflesByCustomerId(winnerFilter: $winnerFilter) {\n createdAt\n variants {\n productId\n variantId\n }\n verificationType\n dateRange {\n end\n start\n }\n deleted\n id\n metadata {\n createdAt\n deleted\n description\n id\n pageTitle\n slug\n targetId\n targetType\n updatedAt\n }\n name\n participantCount\n requiredCustomerAccount\n status\n updatedAt\n }\n }\n "],["\n query getRafflesByCustomerId($winnerFilter: Boolean) {\n getRafflesByCustomerId(winnerFilter: $winnerFilter) {\n createdAt\n variants {\n productId\n variantId\n }\n verificationType\n dateRange {\n end\n start\n }\n deleted\n id\n metadata {\n createdAt\n deleted\n description\n id\n pageTitle\n slug\n targetId\n targetType\n updatedAt\n }\n name\n participantCount\n requiredCustomerAccount\n status\n updatedAt\n }\n }\n "]))),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,i.getClient().query({query:n,variables:{winnerFilter:l||void 0}})];case 2:return u=t.sent(),s=u.data,(o=u.errors)&&o.length?[2]:(p=s.getRafflesByCustomerId.map((function(n){var t,e;return new r({id:n.id,dateRange:{end:null===(t=n.dateRange)||void 0===t?void 0:t.end,start:null===(e=n.dateRange)||void 0===e?void 0:e.start},createdAt:n.createdAt,deleted:n.deleted,metadata:n.metadata||void 0,name:n.name,participantCount:n.participantCount,requiredCustomerAccount:n.requiredCustomerAccount,status:n.status,updatedAt:n.updatedAt,variants:n.variants.length>0?n.variants.map((function(n){return new d(n)})):void 0,verificationType:n.verificationType})})),[2,p]);case 3:return g=t.sent(),console.log(g),[3,4];case 4:return[2]}}))}))},g}();export{g as IkasRaffleAPI};
@@ -6,9 +6,7 @@ export interface listVariantType_listVariantType_values {
6
6
  updatedAt: any | null;
7
7
  deleted: boolean | null;
8
8
  /**
9
- * It is the name information of the values used in the Variant type. Value
10
- * information of Variant type is unique according to name.It can be a maximum of
11
- * 100 characters.
9
+ * It is the name information of the values used in the Variant type. Value information of Variant type is unique according to name.It can be a maximum of 100 characters.
12
10
  */
13
11
  name: string;
14
12
  /**
@@ -50,7 +48,7 @@ export interface listVariantType_listVariantType {
50
48
  updatedAt: any | null;
51
49
  deleted: boolean | null;
52
50
  /**
53
- * Product variant type name information. ***For example: Size, Color, Number etc.***.It can be a maximum of 100 characters.
51
+ * Product variant type name information. **For example: Size, Color, Number etc.**.It can be a maximum of 100 characters.
54
52
  */
55
53
  name: string;
56
54
  /**
@@ -58,9 +56,7 @@ export interface listVariantType_listVariantType {
58
56
  */
59
57
  selectionType: VariantSelectionTypeEnum;
60
58
  /**
61
- * Variant values used in Variant type. *** For example, variant type: Size.
62
- * Variant values can be thought of as S, M, L, XL. ***It is unique according to
63
- * the value name.Values array size must have at least one element.
59
+ * Variant values used in Variant type. ** For example, variant type: Size. Variant values can be thought of as S, M, L, XL. **It is unique according to the value name.Values array size must have at least one element.
64
60
  */
65
61
  values: listVariantType_listVariantType_values[];
66
62
  /**
@@ -1 +1 @@
1
- import{__assign as e}from'../../../../ext/tslib/tslib.es6.js';import*as t from"react";import{observer as r}from"mobx-react-lite";import{FormItem as a}from"../form-item/index.js";import{FormItemType as o,FormItemInputType as n}from"../form-item/model.js";import i from"./model.js";import{IkasCheckoutRequirementEnum as l}from"../../../../models/data/checkout-settings/index.js";import{Checkbox as s}from"../checkbox/index.js";import c from"../../styles/common.module.scss.js";import d from"../../style.module.scss.js";import"../../../../storefront/index.js";import'../../../../ext/lodash/isArguments.js';import'../../../../ext/lodash/isBuffer.js';import'../../../../ext/lodash/isTypedArray.js';import'../../../../ext/lodash/_baseGetTag.js';import{useTranslation as m}from"../../../../utils/i18n.js";var u=r((function(r){var a,o=m().t,n=t.useMemo((function(){return new i(e({},r))}),[]);return t.useEffect((function(){Object.entries(r).forEach((function(e){n[e[0]]=e[1]}))}),Object.values(r)),t.createElement("div",null,n.allowTitleChange&&t.createElement("div",{className:d.RowPB},t.createElement(h,e({},r,{vm:n}))),t.createElement("div",{className:[c.Grid,c.Grid2].join(" ")},t.createElement(v,e({},r,{vm:n})),t.createElement(E,e({},r,{vm:n})),t.createElement("div",null)," "),!!n.address.checkoutSettings&&n.address.checkoutSettings.identityNumberRequirement!==l.INVISIBLE&&t.createElement("div",{className:d.RowPB},t.createElement(p,e({},r,{vm:n}))),(null===(a=n.address.checkoutSettings)||void 0===a?void 0:a.isShowPostalCode)?t.createElement(t.Fragment,null,t.createElement("div",{className:d.RowPB},t.createElement(g,e({},r,{vm:n}))),t.createElement("div",{className:[c.Grid,c.Grid2].join(" ")},t.createElement(f,e({},r,{vm:n})),t.createElement(C,e({},r,{vm:n})),t.createElement("div",null)," ")):t.createElement(t.Fragment,null,t.createElement("div",{className:d.RowPB},t.createElement(g,e({},r,{vm:n}))),t.createElement("div",{className:d.RowPB},t.createElement(f,e({},r,{vm:n})))),t.createElement("div",{className:[d.RowPB,c.Grid,n.hasState?c.Grid2:""].join(" ")},t.createElement(y,e({},r,{vm:n})),n.hasState&&t.createElement(T,e({},r,{vm:n}))),t.createElement("div",{className:[c.Grid,c.Grid2,d.RowPB].join(" ")},t.createElement(b,e({},r,{vm:n})),n.districtOptions.length?t.createElement(k,e({},r,{vm:n})):t.createElement(N,e({},r,{vm:n}))),!!n.address.checkoutSettings&&n.address.checkoutSettings.phoneRequirement!==l.INVISIBLE&&t.createElement("div",null,t.createElement(x,e({},r,{vm:n}))),!!n.allowCorporateInfo&&t.createElement("div",{style:{marginTop:"12px"}},t.createElement(s,{value:n.isCorporate,label:o("checkout-page:corporateInvoice"),onChange:n.onCorporateChange})),!!n.isCorporate&&t.createElement("div",{className:c.Grid,style:{marginTop:"12px"}},t.createElement(j,e({},r,{vm:n})),t.createElement(R,e({},r,{vm:n})),t.createElement(L,e({},r,{vm:n}))))})),v=r((function(e){var r,n=e.vm,i=m().t;return t.createElement(a,{type:o.TEXT,label:i("checkout-page:firstName"),autocomplete:"given-name",value:n.firstName||"",onChange:n.onFirstNameChange,hasError:n.isErrorsVisible&&!(null===(r=n.address.validationResult)||void 0===r?void 0:r.firstName),errorText:i("checkout-page:firstNameError")})})),E=r((function(e){var r,n=e.vm,i=m().t;return t.createElement(a,{type:o.TEXT,label:i("checkout-page:lastName"),autocomplete:"family-name",value:n.lastName||"",onChange:n.onLastNameChange,hasError:n.isErrorsVisible&&!(null===(r=n.address.validationResult)||void 0===r?void 0:r.lastName),errorText:i("checkout-page:lastNameError")})})),p=r((function(e){var r,n=e.vm,i=m().t;return t.createElement(a,{type:o.TEXT,label:i("checkout-page:identityNumber"),value:n.identityNumber||"",onChange:n.onIdentityNumberChange,hasError:n.isErrorsVisible&&!(null===(r=n.address.validationResult)||void 0===r?void 0:r.identityNumber),errorText:i("checkout-page:identityNumberError")})})),h=r((function(e){var r=e.vm,n=m().t;return t.createElement(a,{type:o.TEXT,label:n("checkout-page:addressTitle"),value:r.address.title||"",onChange:r.onAddressTitleChange,hasError:r.isErrorsVisible&&!r.address.title,errorText:n("checkout-page:addressTitleError")})})),g=r((function(e){var r,n=e.vm,i=m().t;return t.createElement(a,{type:o.TEXT,label:i("checkout-page:address"),autocomplete:"address-line1",value:n.address.addressLine1||"",onChange:n.onAddressLine1Change,hasError:n.isErrorsVisible&&!(null===(r=n.address.validationResult)||void 0===r?void 0:r.addressLine1),errorText:i("checkout-page:addressError")})})),f=r((function(e){var r=e.vm,n=m().t;return t.createElement(a,{type:o.TEXT,autocomplete:"address-line2",label:n("checkout-page:addressLine2"),value:r.address.addressLine2||"",onChange:r.onAddressLine2Change})})),C=r((function(e){var r=e.vm,n=m().t;return t.createElement(a,{type:o.TEXT,label:n("checkout-page:postalCode"),autocomplete:"postal-code",value:r.address.postalCode||"",onChange:r.onAddressPostalCodeChange})})),y=r((function(e){var r,n,i=e.vm,l=m().t;return t.createElement(a,{type:o.SELECT,label:l("checkout-page:country"),autocomplete:"country-name",value:(null===(r=i.country)||void 0===r?void 0:r.id)||"",onChange:i.onCountryChange,options:i.countryOptions,hasError:i.isErrorsVisible&&!(null===(n=i.address.validationResult)||void 0===n?void 0:n.country),errorText:l("checkout-page:countryError")})})),T=r((function(e){var r,n,i=e.vm,l=m().t;return t.createElement(a,{type:o.SELECT,label:l("checkout-page:state"),value:(null===(r=i.state)||void 0===r?void 0:r.id)||"",onChange:i.onStateChange,options:i.stateOptions,hasError:i.isErrorsVisible&&!(null===(n=i.address.validationResult)||void 0===n?void 0:n.state),errorText:l("checkout-page:stateError")})})),b=r((function(e){var r,n,i=e.vm,l=m().t;return t.createElement(a,{type:o.SELECT,label:l("checkout-page:city"),autocomplete:"off",value:(null===(r=i.city)||void 0===r?void 0:r.id)||"",onChange:i.onCityChange,options:i.cityOptions,hasError:i.isErrorsVisible&&!(null===(n=i.address.validationResult)||void 0===n?void 0:n.city),errorText:l("checkout-page:cityError")})})),k=r((function(e){var r,n,i=e.vm,l=m().t;return t.createElement(a,{type:o.SELECT,label:l("checkout-page:district"),autocomplete:"off",value:(null===(r=i.district)||void 0===r?void 0:r.id)||"",onChange:i.onDistrictChange,options:i.districtOptions,hasError:i.isErrorsVisible&&!(null===(n=i.address.validationResult)||void 0===n?void 0:n.district),errorText:l("checkout-page:districtError")})})),N=r((function(e){var r,n=e.vm,i=m().t;return t.createElement(a,{type:o.TEXT,autocomplete:"address-level3",label:i("checkout-page:district"),value:(null===(r=n.district)||void 0===r?void 0:r.name)||"",onChange:n.onDistrictInputChange})})),x=r((function(e){var r,i=e.vm,l=m().t;return t.createElement(a,{type:o.TEL,inputType:n.TEL,label:l("checkout-page:phone"),autocomplete:"tel",value:i.phone||"",onChange:i.onPhoneChange,hasError:i.isErrorsVisible&&!(null===(r=i.address.validationResult)||void 0===r?void 0:r.phone),currentCountryCode:i.myCountryCode,errorText:l("checkout-page:phoneError")})})),j=r((function(e){var r=e.vm,n=m().t;return t.createElement(a,{type:o.TEXT,label:n("checkout-page:companyName"),value:r.address.company||"",onChange:r.onCompanyChange})})),R=r((function(e){var r,n=e.vm,i=m().t;return t.createElement(a,{type:o.TEXT,label:i("checkout-page:taxOffice"),value:(null===(r=n.address)||void 0===r?void 0:r.taxOffice)||"",onChange:n.onTaxOfficeChange})})),L=r((function(e){var r,n=e.vm,i=m().t;return t.createElement(a,{type:o.TEXT,label:i("checkout-page:taxNumber"),value:(null===(r=n.address)||void 0===r?void 0:r.taxNumber)||"",onChange:n.onTaxNumberChange})}));export{u as AddressForm};
1
+ import{__assign as e}from'../../../../ext/tslib/tslib.es6.js';import*as t from"react";import{observer as r}from"mobx-react-lite";import{FormItem as a}from"../form-item/index.js";import{FormItemType as o,FormItemInputType as n}from"../form-item/model.js";import i from"./model.js";import{IkasCheckoutRequirementEnum as l}from"../../../../models/data/checkout-settings/index.js";import{Checkbox as s}from"../checkbox/index.js";import c from"../../styles/common.module.scss.js";import d from"../../style.module.scss.js";import"../../../../storefront/index.js";import'../../../../ext/lodash/isArguments.js';import'../../../../ext/lodash/isBuffer.js';import'../../../../ext/lodash/isTypedArray.js';import'../../../../ext/lodash/_baseGetTag.js';import{useTranslation as m}from"../../../../utils/i18n.js";var u=r((function(r){var a,o=m().t,n=t.useMemo((function(){return new i(e({},r))}),[]);return t.useEffect((function(){Object.entries(r).forEach((function(e){n[e[0]]=e[1]}))}),Object.values(r)),t.createElement("div",null,n.allowTitleChange&&t.createElement("div",{className:d.RowPB},t.createElement(h,e({},r,{vm:n}))),t.createElement("div",{className:[c.Grid,c.Grid2].join(" ")},t.createElement(v,e({},r,{vm:n})),t.createElement(E,e({},r,{vm:n})),t.createElement("div",null)," "),!!n.address.checkoutSettings&&n.address.checkoutSettings.identityNumberRequirement!==l.INVISIBLE&&t.createElement("div",{className:d.RowPB},t.createElement(p,e({},r,{vm:n}))),(null===(a=n.address.checkoutSettings)||void 0===a?void 0:a.phoneRequirement)!==l.INVISIBLE?t.createElement(t.Fragment,null,t.createElement("div",{className:d.RowPB},t.createElement(g,e({},r,{vm:n}))),t.createElement("div",{className:[c.Grid,c.Grid2].join(" ")},t.createElement(f,e({},r,{vm:n})),t.createElement(C,e({},r,{vm:n})),t.createElement("div",null)," ")):t.createElement(t.Fragment,null,t.createElement("div",{className:d.RowPB},t.createElement(g,e({},r,{vm:n}))),t.createElement("div",{className:d.RowPB},t.createElement(f,e({},r,{vm:n})))),t.createElement("div",{className:[d.RowPB,c.Grid,n.hasState?c.Grid2:""].join(" ")},t.createElement(T,e({},r,{vm:n})),n.hasState&&t.createElement(y,e({},r,{vm:n}))),t.createElement("div",{className:[c.Grid,c.Grid2,d.RowPB].join(" ")},t.createElement(b,e({},r,{vm:n})),n.districtOptions.length?t.createElement(k,e({},r,{vm:n})):t.createElement(N,e({},r,{vm:n}))),!!n.address.checkoutSettings&&n.address.checkoutSettings.phoneRequirement!==l.INVISIBLE&&t.createElement("div",null,t.createElement(x,e({},r,{vm:n}))),!!n.allowCorporateInfo&&t.createElement("div",{style:{marginTop:"12px"}},t.createElement(s,{value:n.isCorporate,label:o("checkout-page:corporateInvoice"),onChange:n.onCorporateChange})),!!n.isCorporate&&t.createElement("div",{className:c.Grid,style:{marginTop:"12px"}},t.createElement(j,e({},r,{vm:n})),t.createElement(R,e({},r,{vm:n})),t.createElement(L,e({},r,{vm:n}))))})),v=r((function(e){var r,n=e.vm,i=m().t;return t.createElement(a,{type:o.TEXT,label:i("checkout-page:firstName"),autocomplete:"given-name",value:n.firstName||"",onChange:n.onFirstNameChange,hasError:n.isErrorsVisible&&!(null===(r=n.address.validationResult)||void 0===r?void 0:r.firstName),errorText:i("checkout-page:firstNameError")})})),E=r((function(e){var r,n=e.vm,i=m().t;return t.createElement(a,{type:o.TEXT,label:i("checkout-page:lastName"),autocomplete:"family-name",value:n.lastName||"",onChange:n.onLastNameChange,hasError:n.isErrorsVisible&&!(null===(r=n.address.validationResult)||void 0===r?void 0:r.lastName),errorText:i("checkout-page:lastNameError")})})),p=r((function(e){var r,n=e.vm,i=m().t;return t.createElement(a,{type:o.TEXT,label:i("checkout-page:identityNumber"),value:n.identityNumber||"",onChange:n.onIdentityNumberChange,hasError:n.isErrorsVisible&&!(null===(r=n.address.validationResult)||void 0===r?void 0:r.identityNumber),errorText:i("checkout-page:identityNumberError")})})),h=r((function(e){var r=e.vm,n=m().t;return t.createElement(a,{type:o.TEXT,label:n("checkout-page:addressTitle"),value:r.address.title||"",onChange:r.onAddressTitleChange,hasError:r.isErrorsVisible&&!r.address.title,errorText:n("checkout-page:addressTitleError")})})),g=r((function(e){var r,n=e.vm,i=m().t;return t.createElement(a,{type:o.TEXT,label:i("checkout-page:address"),autocomplete:"address-line1",value:n.address.addressLine1||"",onChange:n.onAddressLine1Change,hasError:n.isErrorsVisible&&!(null===(r=n.address.validationResult)||void 0===r?void 0:r.addressLine1),errorText:i("checkout-page:addressError")})})),f=r((function(e){var r=e.vm,n=m().t;return t.createElement(a,{type:o.TEXT,autocomplete:"address-line2",label:n("checkout-page:addressLine2"),value:r.address.addressLine2||"",onChange:r.onAddressLine2Change})})),C=r((function(e){var r,n=e.vm,i=m().t;return t.createElement(a,{type:o.TEXT,label:i("checkout-page:postalCode"),autocomplete:"postal-code",value:n.address.postalCode||"",onChange:n.onAddressPostalCodeChange,hasError:n.isErrorsVisible&&!(null===(r=n.address.validationResult)||void 0===r?void 0:r.postalCode),errorText:i("checkout-page:postalCodeError")})})),T=r((function(e){var r,n,i=e.vm,l=m().t;return t.createElement(a,{type:o.SELECT,label:l("checkout-page:country"),autocomplete:"country-name",value:(null===(r=i.country)||void 0===r?void 0:r.id)||"",onChange:i.onCountryChange,options:i.countryOptions,hasError:i.isErrorsVisible&&!(null===(n=i.address.validationResult)||void 0===n?void 0:n.country),errorText:l("checkout-page:countryError")})})),y=r((function(e){var r,n,i=e.vm,l=m().t;return t.createElement(a,{type:o.SELECT,label:l("checkout-page:state"),value:(null===(r=i.state)||void 0===r?void 0:r.id)||"",onChange:i.onStateChange,options:i.stateOptions,hasError:i.isErrorsVisible&&!(null===(n=i.address.validationResult)||void 0===n?void 0:n.state),errorText:l("checkout-page:stateError")})})),b=r((function(e){var r,n,i=e.vm,l=m().t;return t.createElement(a,{type:o.SELECT,label:l("checkout-page:city"),autocomplete:"off",value:(null===(r=i.city)||void 0===r?void 0:r.id)||"",onChange:i.onCityChange,options:i.cityOptions,hasError:i.isErrorsVisible&&!(null===(n=i.address.validationResult)||void 0===n?void 0:n.city),errorText:l("checkout-page:cityError")})})),k=r((function(e){var r,n,i=e.vm,l=m().t;return t.createElement(a,{type:o.SELECT,label:l("checkout-page:district"),autocomplete:"off",value:(null===(r=i.district)||void 0===r?void 0:r.id)||"",onChange:i.onDistrictChange,options:i.districtOptions,hasError:i.isErrorsVisible&&!(null===(n=i.address.validationResult)||void 0===n?void 0:n.district),errorText:l("checkout-page:districtError")})})),N=r((function(e){var r,n=e.vm,i=m().t;return t.createElement(a,{type:o.TEXT,autocomplete:"address-level3",label:i("checkout-page:district"),value:(null===(r=n.district)||void 0===r?void 0:r.name)||"",onChange:n.onDistrictInputChange})})),x=r((function(e){var r,i=e.vm,l=m().t;return t.createElement(a,{type:o.TEL,inputType:n.TEL,label:l("checkout-page:phone"),autocomplete:"tel",value:i.phone||"",onChange:i.onPhoneChange,hasError:i.isErrorsVisible&&!(null===(r=i.address.validationResult)||void 0===r?void 0:r.phone),currentCountryCode:i.myCountryCode,errorText:l("checkout-page:phoneError")})})),j=r((function(e){var r=e.vm,n=m().t;return t.createElement(a,{type:o.TEXT,label:n("checkout-page:companyName"),value:r.address.company||"",onChange:r.onCompanyChange})})),R=r((function(e){var r,n=e.vm,i=m().t;return t.createElement(a,{type:o.TEXT,label:i("checkout-page:taxOffice"),value:(null===(r=n.address)||void 0===r?void 0:r.taxOffice)||"",onChange:n.onTaxOfficeChange})})),L=r((function(e){var r,n=e.vm,i=m().t;return t.createElement(a,{type:o.TEXT,label:i("checkout-page:taxNumber"),value:(null===(r=n.address)||void 0===r?void 0:r.taxNumber)||"",onChange:n.onTaxNumberChange})}));export{u as AddressForm};
@@ -42,6 +42,8 @@ export default class AddressFormViewModel {
42
42
  id?: string | undefined;
43
43
  name?: string | undefined;
44
44
  code?: string | undefined;
45
+ iso2?: string | undefined;
46
+ iso3?: string | undefined;
45
47
  } | null | undefined;
46
48
  get state(): {
47
49
  id?: string | undefined;
@@ -53,6 +55,8 @@ export default class AddressFormViewModel {
53
55
  id?: string | undefined;
54
56
  name?: string | undefined;
55
57
  code?: string | undefined;
58
+ iso2?: string | undefined;
59
+ iso3?: string | undefined;
56
60
  } | null | undefined;
57
61
  get city(): {
58
62
  id?: string | undefined;
@@ -64,6 +68,8 @@ export default class AddressFormViewModel {
64
68
  id?: string | undefined;
65
69
  name?: string | undefined;
66
70
  code?: string | undefined;
71
+ iso2?: string | undefined;
72
+ iso3?: string | undefined;
67
73
  } | null | undefined;
68
74
  get district(): {
69
75
  id?: string | undefined;
@@ -75,6 +81,8 @@ export default class AddressFormViewModel {
75
81
  id?: string | undefined;
76
82
  name?: string | undefined;
77
83
  code?: string | undefined;
84
+ iso2?: string | undefined;
85
+ iso3?: string | undefined;
78
86
  } | null | undefined;
79
87
  get countryOptions(): {
80
88
  label: string;
@@ -1 +1 @@
1
- import*as e from"react";import{observer as t}from"mobx-react-lite";import"../../../../../models/data/blog/index.js";import"../../../../../models/data/brand/index.js";import"../../../../../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"../../../../../models/data/html-meta-data/index.js";import"../../../../../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"../../../../../models/data/product/index.js";import"../../../../../models/data/variant-type/index.js";import"../../../../../models/data/product/variant/index.js";import"../../../../../models/data/product/variant/price/index.js";import"../../../../../models/data/product-attribute/index.js";import"../../../../../models/data/product/attribute-value/index.js";import"../../../../../models/data/product-filter/index.js";import"../../../../../models/data/variant-type/variant-value/index.js";import"../../../../../models/data/order-transaction/index.js";import{IkasProductOptionType as i}from"../../../../../models/data/product-option-set/index.js";import"../../../../../models/data/raffle/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"../../../../../models/theme/settings/index.js";import"../../../../../models/theme/custom-data/index.js";import"../../../../../storefront/index.js";import'../../../../../ext/lodash/isArguments.js';import'../../../../../ext/lodash/isBuffer.js';import'../../../../../ext/lodash/isTypedArray.js';import'../../../../../ext/lodash/_baseGetTag.js';import{formatMoney as o}from"../../../../../utils/currency.js";import{useTranslation as a}from"../../../../../utils/i18n.js";import{Modal as r}from"../../modal/index.js";import m from"./style.module.scss.js";var s=t((function(t){var s,d,n,l=t.vm,u=t.currencyCode,c=t.cartItem,p=a().t,v=e.useState(!1),j=v[0],f=v[1],x=null===(s=l.checkout.adjustments)||void 0===s?void 0:s.map((function(e){var t;return(null===(t=e.appliedOrderLines)||void 0===t?void 0:t.filter((function(e){return e.orderLineId===c.id})).reduce((function(e,t){return e+(t.amount||0)}),0))||0})),h=null==x?void 0:x.reduce((function(e,t){return e+t}),0),g=e.useMemo((function(){var t;return e.createElement("div",null,null===(t=c.options)||void 0===t?void 0:t.map((function(t){switch(t.type){case i.TEXT:case i.TEXT_AREA:case i.CHOICE:return e.createElement("div",{className:m.OptionRow},e.createElement("div",{className:m.OptionName},t.name),e.createElement("div",{className:m.OptionValue},t.values.map((function(e){return e.name||e.value})).join(", ")));case i.CHECKBOX:return e.createElement("div",{className:m.OptionRow},e.createElement("div",{className:m.OptionName},t.name),e.createElement("div",{className:m.OptionValue},t.values.length&&"true"===t.values[0].value?p("checkout-page:yes"):p("checkout-page:no")));case i.COLOR_PICKER:return e.createElement("div",{className:m.OptionRow},e.createElement("div",{className:m.OptionName},t.name),e.createElement("div",{className:m.OptionsHorContainer},t.values.map((function(t,i){return e.createElement("div",{key:i,className:m.OptionColorValue,style:{backgroundColor:t.value}})}))))}})))}),[]);return e.createElement("div",{className:m.CheckoutItem},e.createElement("div",{className:m.ImageContainer},e.createElement("img",{className:m.Image,src:null===(d=c.variant.mainImage)||void 0===d?void 0:d.thumbnailSrc})),e.createElement("div",{className:m.Right},e.createElement("div",{className:m.Name},c.variant.name),e.createElement("div",{className:m.LightText},p("checkout-page:quantity")+": "+c.quantity),e.createElement("div",{className:m.LightText},c.variant.variantValues.map((function(e){return e.variantValueName})).join(" / ")),!!(null===(n=c.options)||void 0===n?void 0:n.length)&&e.createElement("div",{className:m.OptionsText,onClick:function(){return f(!0)}},p("checkout-page:customizedProduct")),!!j&&e.createElement(r,{title:c.variant.name,modalContent:g,onClose:function(){return f(!1)}}),e.createElement("div",{className:m.Price},!!c.overridenPriceWithQuantity&&e.createElement("span",{className:m.GrayPrice},o(h?c.finalPriceWithQuantity:c.overridenPriceWithQuantity,u)),o(h?c.finalPriceWithQuantity-h:c.finalPriceWithQuantity,u))))}));export{s as CartItem};
1
+ import*as e from"react";import{observer as t}from"mobx-react-lite";import"../../../../../models/data/blog/index.js";import"../../../../../models/data/brand/index.js";import"../../../../../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"../../../../../models/data/html-meta-data/index.js";import"../../../../../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"../../../../../models/data/product/index.js";import"../../../../../models/data/variant-type/index.js";import"../../../../../models/data/product/variant/index.js";import"../../../../../models/data/product/variant/price/index.js";import"../../../../../models/data/product-attribute/index.js";import"../../../../../models/data/product/attribute-value/index.js";import"../../../../../models/data/product-filter/index.js";import"../../../../../models/data/variant-type/variant-value/index.js";import"../../../../../models/data/order-transaction/index.js";import{IkasProductOptionType as i}from"../../../../../models/data/product-option-set/index.js";import"../../../../../models/data/raffle/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"../../../../../models/theme/settings/index.js";import"../../../../../models/theme/custom-data/index.js";import{formatDate as a}from"../../../../../utils/helper.js";import{formatMoney as o}from"../../../../../utils/currency.js";import{useTranslation as r}from"../../../../../utils/i18n.js";import{Modal as m}from"../../modal/index.js";import s from"./style.module.scss.js";var n=t((function(t){var n,d,l,c=t.vm,u=t.currencyCode,p=t.cartItem,v=r().t,j=e.useState(!1),f=j[0],x=j[1],E=null===(n=c.checkout.adjustments)||void 0===n?void 0:n.map((function(e){var t;return(null===(t=e.appliedOrderLines)||void 0===t?void 0:t.filter((function(e){return e.orderLineId===p.id})).reduce((function(e,t){return e+(t.amount||0)}),0))||0})),N=null==E?void 0:E.reduce((function(e,t){return e+t}),0),h=e.useMemo((function(){var t;return e.createElement("div",null,null===(t=p.options)||void 0===t?void 0:t.map((function(t){switch(t.type){case i.TEXT:case i.TEXT_AREA:case i.CHOICE:return e.createElement("div",{className:s.OptionRow},e.createElement("div",{className:s.OptionName},t.name),e.createElement("div",{className:s.OptionValue},t.values.map((function(e){return e.name||e.value})).join(", ")));case i.DATE_PICKER:return e.createElement("div",{className:s.OptionRow},e.createElement("div",{className:s.OptionName},t.name),e.createElement("div",{className:s.OptionValue},t.values.map((function(e){return t=e.value,(i=a(new Date(t)).split(" ")).splice(-1),i.join(" ");var t,i})).join(", ")));case i.CHECKBOX:return e.createElement("div",{className:s.OptionRow},e.createElement("div",{className:s.OptionName},t.name),e.createElement("div",{className:s.OptionValue},t.values.length&&"true"===t.values[0].value?v("checkout-page:yes"):v("checkout-page:no")));case i.COLOR_PICKER:return e.createElement("div",{className:s.OptionRow},e.createElement("div",{className:s.OptionName},t.name),e.createElement("div",{className:s.OptionsHorContainer},t.values.map((function(t,i){return e.createElement("div",{key:i,className:s.OptionColorValue,style:{backgroundColor:t.value}})}))))}})))}),[]);return e.createElement("div",{className:s.CheckoutItem},e.createElement("div",{className:s.ImageContainer},e.createElement("img",{className:s.Image,src:null===(d=p.variant.mainImage)||void 0===d?void 0:d.thumbnailSrc})),e.createElement("div",{className:s.Right},e.createElement("div",{className:s.Name},p.variant.name),e.createElement("div",{className:s.LightText},"".concat(v("checkout-page:quantity"),": ")+p.quantity),e.createElement("div",{className:s.LightText},p.variant.variantValues.map((function(e){return e.variantValueName})).join(" / ")),!!(null===(l=p.options)||void 0===l?void 0:l.length)&&e.createElement("div",{className:s.OptionsText,onClick:function(){return x(!0)}},v("checkout-page:customizedProduct")),!!f&&e.createElement(m,{title:p.variant.name,modalContent:h,onClose:function(){return x(!1)}}),e.createElement("div",{className:s.Price},!!p.overridenPriceWithQuantity&&e.createElement("span",{className:s.GrayPrice},o(N?p.finalPriceWithQuantity:p.overridenPriceWithQuantity,u)),o(N?p.finalPriceWithQuantity-N:p.finalPriceWithQuantity,u))))}));export{n as CartItem};