@ikas/storefront 2.0.74-alpha.1 → 3.0.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (249) hide show
  1. package/build/__generated__/global-types.d.ts +15 -72
  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-proxy4.js +1 -1
  5. package/build/analytics/analytics.d.ts +2 -3
  6. package/build/analytics/analytics.js +1 -1
  7. package/build/analytics/events.d.ts +1 -2
  8. package/build/analytics/events.js +1 -1
  9. package/build/analytics/googleTagManager.d.ts +0 -2
  10. package/build/analytics/googleTagManager.js +1 -1
  11. package/build/analytics/head/index.js +1 -1
  12. package/build/analytics/ikas.js +1 -1
  13. package/build/api/blog/__generated__/getBlog.d.ts +5 -1
  14. package/build/api/blog/__generated__/listBlog.d.ts +5 -1
  15. package/build/api/blog/__generated__/listBlogCategory.d.ts +5 -1
  16. package/build/api/blog/__generated__/listBlogMetaData.d.ts +5 -3
  17. package/build/api/blog/index.js +1 -1
  18. package/build/api/brand/index.js +1 -1
  19. package/build/api/cart/__generated__/getCart.d.ts +4 -2
  20. package/build/api/cart/__generated__/saveItemToCart.d.ts +4 -25
  21. package/build/api/cart/index.d.ts +1 -3
  22. package/build/api/cart/index.js +1 -1
  23. package/build/api/category/__generated__/listCategoryPaths.d.ts +0 -19
  24. package/build/api/category/index.js +1 -1
  25. package/build/api/checkout/__generated__/addCouponCodeToCheckout.d.ts +1 -1
  26. package/build/api/checkout/__generated__/getCheckoutById.d.ts +4 -2
  27. package/build/api/checkout/__generated__/getOrder.d.ts +12 -6
  28. package/build/api/checkout/index.d.ts +1 -7
  29. package/build/api/checkout/index.js +1 -1
  30. package/build/api/contact-form/__generated__/sendContactFormToMerchant.d.ts +0 -1
  31. package/build/api/contact-form/index.d.ts +1 -2
  32. package/build/api/contact-form/index.js +1 -1
  33. package/build/api/customer/__generated__/createOrderRefundRequest.d.ts +13 -7
  34. package/build/api/customer/__generated__/customerLogin.d.ts +2 -8
  35. package/build/api/customer/__generated__/customerSocialLogin.d.ts +2 -8
  36. package/build/api/customer/__generated__/getCustomerOrders.d.ts +12 -6
  37. package/build/api/customer/__generated__/getMyCustomer.d.ts +3 -13
  38. package/build/api/customer/__generated__/registerCustomer.d.ts +3 -14
  39. package/build/api/customer/__generated__/saveMyCustomer.d.ts +3 -13
  40. package/build/api/customer/index.d.ts +1 -3
  41. package/build/api/customer/index.js +1 -1
  42. package/build/api/customer-review/__generated__/listCustomerReviews.d.ts +5 -1
  43. package/build/api/customer-review/index.js +1 -1
  44. package/build/api/favorite-product/index.js +1 -1
  45. package/build/api/html-meta-data/__generated__/listHTMLMetaData.d.ts +0 -8
  46. package/build/api/html-meta-data/index.js +1 -1
  47. package/build/api/index.d.ts +0 -1
  48. package/build/api/merchant/__generated__/listMerchantSettings.d.ts +0 -11
  49. package/build/api/merchant/index.js +1 -1
  50. package/build/api/product-option-set/__generated__/ListProductOptionSet.d.ts +0 -6
  51. package/build/api/product-search/__generated__/getProductFilterData.d.ts +0 -1
  52. package/build/api/product-search/index.d.ts +1 -19
  53. package/build/api/product-search/index.js +1 -1
  54. package/build/api/raffle/__generated__/listRaffle.d.ts +5 -1
  55. package/build/api/raffle/__generated__/listRaffleMetaData.d.ts +0 -2
  56. package/build/api/raffle/__generated__/saveRaffleParticipant.d.ts +6 -46
  57. package/build/api/raffle/index.d.ts +3 -7
  58. package/build/api/raffle/index.js +1 -1
  59. package/build/api/storefront/__generated__/getStorefront.d.ts +0 -3
  60. package/build/api/storefront/index.js +1 -1
  61. package/build/api/variant-type/__generated__/listVariantType.d.ts +6 -2
  62. package/build/assets/translations/checkout/en.js +1 -1
  63. package/build/assets/translations/checkout/tr.js +1 -1
  64. package/build/components/checkout/components/address-form/index.js +1 -1
  65. package/build/components/checkout/components/address-form/model.d.ts +0 -3
  66. package/build/components/checkout/components/address-form/model.js +1 -1
  67. package/build/components/checkout/components/cart-summary/cart-item/index.js +1 -1
  68. package/build/components/checkout/components/cart-summary/index.js +1 -1
  69. package/build/components/checkout/components/cart-summary/style.module.scss.js +1 -1
  70. package/build/components/checkout/components/credit-card-form/index.js +1 -1
  71. package/build/components/checkout/components/customer-addresses/model.js +1 -1
  72. package/build/components/checkout/components/error/index.js +1 -1
  73. package/build/components/checkout/components/error/no-shipping-error/index.d.ts +5 -3
  74. package/build/components/checkout/components/error/no-shipping-error/index.js +1 -1
  75. package/build/components/checkout/components/form-item/index.js +1 -1
  76. package/build/components/checkout/components/form-item/model.js +1 -1
  77. package/build/components/checkout/components/form-item/style.module.scss.js +1 -1
  78. package/build/components/checkout/index.d.ts +0 -1
  79. package/build/components/checkout/index.js +1 -1
  80. package/build/components/checkout/model.d.ts +3 -5
  81. package/build/components/checkout/model.js +1 -1
  82. package/build/components/checkout/steps/step-info/index.js +1 -1
  83. package/build/components/checkout/steps/step-payment/index.js +1 -1
  84. package/build/components/checkout/steps/step-shipping/index.js +1 -1
  85. package/build/components/checkout/steps/step-success/index.js +1 -1
  86. package/build/components/image/index.d.ts +3 -29
  87. package/build/components/page/head.d.ts +0 -3
  88. package/build/components/page/head.js +1 -1
  89. package/build/components/page/index.d.ts +0 -3
  90. package/build/components/page/index.js +1 -1
  91. package/build/components/page-editor/ThemeComponentEditor.js +1 -1
  92. package/build/components/page-editor/model.js +1 -1
  93. package/build/ikas.js +7 -7
  94. package/build/index.js +1 -1
  95. package/build/models/data/blog/index.d.ts +0 -2
  96. package/build/models/data/blog/index.js +1 -1
  97. package/build/models/data/category/index.d.ts +0 -2
  98. package/build/models/data/category/index.js +1 -1
  99. package/build/models/data/checkout/index.d.ts +1 -1
  100. package/build/models/data/checkout/index.js +1 -1
  101. package/build/models/data/customer/index.d.ts +0 -2
  102. package/build/models/data/customer/index.js +1 -1
  103. package/build/models/data/html-meta-data/index.d.ts +0 -2
  104. package/build/models/data/html-meta-data/index.js +1 -1
  105. package/build/models/data/image/index.d.ts +12 -3
  106. package/build/models/data/image/index.js +1 -1
  107. package/build/models/data/index.d.ts +1 -6
  108. package/build/models/data/merchant-settings/index.d.ts +0 -14
  109. package/build/models/data/merchant-settings/index.js +1 -1
  110. package/build/models/data/order/line-item/index.js +1 -1
  111. package/build/models/data/order/line-item/variant/index.d.ts +0 -7
  112. package/build/models/data/order/line-item/variant/index.js +1 -1
  113. package/build/models/data/product/index.d.ts +1 -1
  114. package/build/models/data/product/index.js +1 -1
  115. package/build/models/data/product/variant/index.d.ts +1 -0
  116. package/build/models/data/product/variant/index.js +1 -1
  117. package/build/models/data/product/variant-type/index.d.ts +0 -1
  118. package/build/models/data/product/variant-type/index.js +1 -1
  119. package/build/models/data/product-filter/index.d.ts +1 -3
  120. package/build/models/data/product-filter/index.js +1 -1
  121. package/build/models/data/product-option-set/index.js +1 -1
  122. package/build/models/data/raffle/index.d.ts +4 -12
  123. package/build/models/data/raffle/index.js +1 -1
  124. package/build/models/data/simple-product/index.d.ts +1 -1
  125. package/build/models/data/storefront/index.d.ts +0 -3
  126. package/build/models/data/storefront/index.js +1 -1
  127. package/build/models/data/storefront/theme-localization/index.js +1 -1
  128. package/build/models/theme/page/component/prop-value/product-list.d.ts +1 -2
  129. package/build/models/theme/page/component/prop-value/product-list.js +1 -1
  130. package/build/models/theme/page/index.d.ts +0 -2
  131. package/build/models/theme/page/index.js +1 -1
  132. package/build/models/theme/theme.js +1 -1
  133. package/build/models/ui/blog-category-list/index.js +1 -1
  134. package/build/models/ui/blog-list/index.js +1 -1
  135. package/build/models/ui/brand-list/index.js +1 -1
  136. package/build/models/ui/category-list/index.js +1 -1
  137. package/build/models/ui/customer-review-list/index.js +1 -1
  138. package/build/models/ui/index.d.ts +1 -2
  139. package/build/models/ui/product-detail/index.d.ts +3 -10
  140. package/build/models/ui/product-detail/index.js +1 -1
  141. package/build/models/ui/product-list/index.d.ts +1 -47
  142. package/build/models/ui/product-list/index.js +1 -1
  143. package/build/models/ui/raffle-list/index.js +1 -1
  144. package/build/models/ui/validator/form/account-info.d.ts +0 -2
  145. package/build/models/ui/validator/form/account-info.js +1 -1
  146. package/build/models/ui/validator/form/address.d.ts +0 -3
  147. package/build/models/ui/validator/form/address.js +1 -1
  148. package/build/models/ui/validator/form/contact-form.js +1 -1
  149. package/build/models/ui/validator/form/raffle-form.d.ts +0 -2
  150. package/build/models/ui/validator/form/raffle-form.js +1 -1
  151. package/build/models/ui/validator/form/register.d.ts +0 -4
  152. package/build/models/ui/validator/form/register.js +1 -1
  153. package/build/models/ui/validator/rules/index.d.ts +0 -5
  154. package/build/models/ui/validator/rules/index.js +1 -1
  155. package/build/pages/404.js +1 -1
  156. package/build/pages/_slug_/index.js +1 -1
  157. package/build/pages/account/addresses.js +1 -1
  158. package/build/pages/account/favorite-products.js +1 -1
  159. package/build/pages/account/forgot-password.js +1 -1
  160. package/build/pages/account/index.js +1 -1
  161. package/build/pages/account/login.js +1 -1
  162. package/build/pages/account/orders/_id_.js +1 -1
  163. package/build/pages/account/orders/index.js +1 -1
  164. package/build/pages/account/raffles.js +1 -1
  165. package/build/pages/account/recover-password.js +1 -1
  166. package/build/pages/account/register.js +1 -1
  167. package/build/pages/blog/_slug_.js +1 -1
  168. package/build/pages/blog/index.js +1 -1
  169. package/build/pages/cart.js +1 -1
  170. package/build/pages/checkout.js +1 -1
  171. package/build/pages/editor.js +1 -1
  172. package/build/pages/home.js +1 -1
  173. package/build/pages/pages/_slug_.js +1 -1
  174. package/build/pages/raffle/_slug_.js +1 -1
  175. package/build/pages/raffle/index.js +1 -1
  176. package/build/pages/search.js +1 -1
  177. package/build/providers/helpers/raffles.d.ts +1 -2
  178. package/build/providers/helpers/raffles.js +1 -1
  179. package/build/providers/page-data-get.d.ts +1 -9
  180. package/build/providers/page-data-get.js +1 -1
  181. package/build/providers/page-data-init.js +1 -1
  182. package/build/providers/page-data-next.d.ts +0 -36
  183. package/build/providers/page-data-next.js +1 -1
  184. package/build/providers/placeholders.js +1 -1
  185. package/build/providers/prop-value/attribute-list.js +1 -1
  186. package/build/providers/prop-value/attribute.js +1 -1
  187. package/build/providers/prop-value/blog-category-list.js +1 -1
  188. package/build/providers/prop-value/blog-category.js +1 -1
  189. package/build/providers/prop-value/blog-list.js +1 -1
  190. package/build/providers/prop-value/blog.js +1 -1
  191. package/build/providers/prop-value/brand-list.js +1 -1
  192. package/build/providers/prop-value/brand.js +1 -1
  193. package/build/providers/prop-value/category-list.js +1 -1
  194. package/build/providers/prop-value/category.js +1 -1
  195. package/build/providers/prop-value/custom.js +1 -1
  196. package/build/providers/prop-value/image-list.js +1 -1
  197. package/build/providers/prop-value/image.js +1 -1
  198. package/build/providers/prop-value/link.js +1 -1
  199. package/build/providers/prop-value/product-detail.js +1 -1
  200. package/build/providers/prop-value/product-list.d.ts +0 -6
  201. package/build/providers/prop-value/product-list.js +1 -1
  202. package/build/providers/prop-value/raffle-list.js +1 -1
  203. package/build/providers/prop-value/raffle.js +1 -1
  204. package/build/scripts/generators/types/index.js +1 -1
  205. package/build/store/base.d.ts +0 -2
  206. package/build/store/base.js +1 -1
  207. package/build/store/cart.d.ts +2 -24
  208. package/build/store/cart.js +1 -1
  209. package/build/store/customer.d.ts +3 -7
  210. package/build/store/customer.js +1 -1
  211. package/build/storefront/index.d.ts +2 -9
  212. package/build/storefront/index.js +1 -1
  213. package/build/utils/currency.d.ts +2 -2
  214. package/build/utils/currency.js +1 -1
  215. package/build/utils/helper.d.ts +0 -1
  216. package/build/utils/helper.js +1 -1
  217. package/build/utils/i18n.js +1 -1
  218. package/package.json +3 -1
  219. package/build/analytics/googleAnalytics.d.ts +0 -13
  220. package/build/analytics/googleAnalytics.js +0 -1
  221. package/build/analytics/googleUniversal.d.ts +0 -9
  222. package/build/analytics/googleUniversal.js +0 -1
  223. package/build/analytics/tiktokPixel.d.ts +0 -13
  224. package/build/analytics/tiktokPixel.js +0 -1
  225. package/build/api/customer/__generated__/getOrderByEmail.d.ts +0 -615
  226. package/build/api/customer-attribute/__generated__/listCustomerAttribute.d.ts +0 -44
  227. package/build/api/customer-attribute/index.d.ts +0 -4
  228. package/build/api/customer-attribute/index.js +0 -1
  229. package/build/api/customer-review-summary/__generated__/listCustomerReviewSummary.d.ts +0 -55
  230. package/build/api/customer-review-summary/index.d.ts +0 -21
  231. package/build/api/customer-review-summary/index.js +0 -1
  232. package/build/api/product-search/__generated__/getRelatedProducts.d.ts +0 -14
  233. package/build/api/raffle/__generated__/listRaffleParticipants.d.ts +0 -67
  234. package/build/api/raffle/__generated__/listStorefrontRaffle.d.ts +0 -82
  235. package/build/assets/translations/checkout/de.js +0 -1
  236. package/build/models/data/customer/attribute-value/index.d.ts +0 -9
  237. package/build/models/data/customer/attribute-value/index.js +0 -1
  238. package/build/models/data/customer-attribute/customer-attribute-option/index.d.ts +0 -5
  239. package/build/models/data/customer-attribute/customer-attribute-option/index.js +0 -1
  240. package/build/models/data/customer-attribute/customer-attribute-sales-channel/index.d.ts +0 -17
  241. package/build/models/data/customer-attribute/customer-attribute-sales-channel/index.js +0 -1
  242. package/build/models/data/customer-attribute/index.d.ts +0 -35
  243. package/build/models/data/customer-attribute/index.js +0 -1
  244. package/build/models/data/customer-review-summary/index.d.ts +0 -16
  245. package/build/models/data/customer-review-summary/index.js +0 -1
  246. package/build/models/ui/customer-review-summary-list/index.d.ts +0 -43
  247. package/build/models/ui/customer-review-summary-list/index.js +0 -1
  248. package/build/utils/constants.d.ts +0 -2
  249. package/build/utils/constants.js +0 -1
@@ -250,12 +250,14 @@ export interface createOrderRefundRequest_createOrderRefundRequest_orderLineItem
250
250
  */
251
251
  discountPrice: number | null;
252
252
  /**
253
- * It is the final price of the order line item. If the discount price is less than the sell price, the final price is equal to the discount price.
253
+ * It is the final price of the order line item. If the discount price is less
254
+ * than the sell price, the final price is equal to the discount price.
254
255
  */
255
256
  finalPrice: number | null;
256
257
  id: string;
257
258
  /**
258
- * It is the original order line item id of the line item. If the line item is derived from another line item, this field is filled.
259
+ * It is the original order line item id of the line item. If the line item is
260
+ * derived from another line item, this field is filled.
259
261
  */
260
262
  originalOrderLineItemId: string | null;
261
263
  /**
@@ -299,7 +301,8 @@ export interface createOrderRefundRequest_createOrderRefundRequest_orderPackages
299
301
  */
300
302
  trackingLink: string | null;
301
303
  /**
302
- * Indicates whether the notification is sent to the customer after the cargo is delivered. **isSendNotification** returns true if the notification is sent.
304
+ * Indicates whether the notification is sent to the customer after the cargo is
305
+ * delivered. **isSendNotification** returns true if the notification is sent.
303
306
  */
304
307
  isSendNotification: boolean | null;
305
308
  /**
@@ -481,7 +484,7 @@ export interface createOrderRefundRequest_createOrderRefundRequest_taxLines {
481
484
  price: number;
482
485
  }
483
486
  export interface createOrderRefundRequest_createOrderRefundRequest {
484
- __typename: "StorefrontOrder";
487
+ __typename: "Order";
485
488
  /**
486
489
  * It is the billing address of the order.
487
490
  */
@@ -504,7 +507,8 @@ export interface createOrderRefundRequest_createOrderRefundRequest {
504
507
  */
505
508
  currencyRates: createOrderRefundRequest_createOrderRefundRequest_currencyRates[];
506
509
  /**
507
- * Information about the customer. The order does not have to be a customer information. If the order was created by ikasPOS, the customer information may be null.
510
+ * Information about the customer. The order does not have to be a customer
511
+ * information. If the order was created by ikasPOS, the customer information may be null.
508
512
  */
509
513
  customer: createOrderRefundRequest_createOrderRefundRequest_customer | null;
510
514
  deleted: boolean | null;
@@ -567,7 +571,9 @@ export interface createOrderRefundRequest_createOrderRefundRequest {
567
571
  */
568
572
  taxLines: createOrderRefundRequest_createOrderRefundRequest_taxLines[] | null;
569
573
  /**
570
- * The total final price of the order resulting from the apply of `orderAdjustments` , `shippingLines`, and `giftPackageLines` pricing to the order total price.
574
+ * The total final price of the order resulting from the apply of
575
+ * `orderAdjustments` , `shippingLines`, and `giftPackageLines` pricing to the
576
+ * order total price.
571
577
  */
572
578
  totalFinalPrice: number;
573
579
  /**
@@ -577,7 +583,7 @@ export interface createOrderRefundRequest_createOrderRefundRequest {
577
583
  updatedAt: any | null;
578
584
  }
579
585
  export interface createOrderRefundRequest {
580
- createOrderRefundRequest: createOrderRefundRequest_createOrderRefundRequest | null;
586
+ createOrderRefundRequest: createOrderRefundRequest_createOrderRefundRequest;
581
587
  }
582
588
  export interface createOrderRefundRequestVariables {
583
589
  input: OrderRefundRequestInput;
@@ -107,12 +107,6 @@ export interface customerLogin_customerLogin_customer_addresses {
107
107
  taxOffice: string | null;
108
108
  title: string;
109
109
  }
110
- export interface customerLogin_customerLogin_customer_attributes {
111
- __typename: "CustomerAttributeValue";
112
- customerAttributeId: string | null;
113
- customerAttributeOptionId: string | null;
114
- value: string | null;
115
- }
116
110
  export interface customerLogin_customerLogin_customer {
117
111
  __typename: "Customer";
118
112
  id: string;
@@ -141,7 +135,8 @@ export interface customerLogin_customerLogin_customer {
141
135
  */
142
136
  accountStatus: CustomerAccountStatusEnum | null;
143
137
  /**
144
- * The unique email address of the customer. Attempting to assign the same email address to multiple customers returns an error.
138
+ * The unique email address of the customer. Attempting to assign the same email
139
+ * address to multiple customers returns an error.
145
140
  */
146
141
  email: string | null;
147
142
  /**
@@ -156,7 +151,6 @@ export interface customerLogin_customerLogin_customer {
156
151
  * Groups that the store owner attaches to the customer.
157
152
  */
158
153
  customerGroupIds: string[] | null;
159
- attributes: customerLogin_customerLogin_customer_attributes[] | null;
160
154
  }
161
155
  export interface customerLogin_customerLogin {
162
156
  __typename: "CustomerLoginResponse";
@@ -107,12 +107,6 @@ export interface customerSocialLogin_customerSocialLogin_customer_addresses {
107
107
  taxOffice: string | null;
108
108
  title: string;
109
109
  }
110
- export interface customerSocialLogin_customerSocialLogin_customer_attributes {
111
- __typename: "CustomerAttributeValue";
112
- customerAttributeId: string | null;
113
- customerAttributeOptionId: string | null;
114
- value: string | null;
115
- }
116
110
  export interface customerSocialLogin_customerSocialLogin_customer {
117
111
  __typename: "Customer";
118
112
  id: string;
@@ -141,7 +135,8 @@ export interface customerSocialLogin_customerSocialLogin_customer {
141
135
  */
142
136
  accountStatus: CustomerAccountStatusEnum | null;
143
137
  /**
144
- * The unique email address of the customer. Attempting to assign the same email address to multiple customers returns an error.
138
+ * The unique email address of the customer. Attempting to assign the same email
139
+ * address to multiple customers returns an error.
145
140
  */
146
141
  email: string | null;
147
142
  /**
@@ -156,7 +151,6 @@ export interface customerSocialLogin_customerSocialLogin_customer {
156
151
  * Groups that the store owner attaches to the customer.
157
152
  */
158
153
  customerGroupIds: string[] | null;
159
- attributes: customerSocialLogin_customerSocialLogin_customer_attributes[] | null;
160
154
  }
161
155
  export interface customerSocialLogin_customerSocialLogin {
162
156
  __typename: "CustomerLoginResponse";
@@ -276,12 +276,14 @@ export interface getCustomerOrders_getCustomerOrders_orderLineItems {
276
276
  */
277
277
  discountPrice: number | null;
278
278
  /**
279
- * It is the final price of the order line item. If the discount price is less than the sell price, the final price is equal to the discount price.
279
+ * It is the final price of the order line item. If the discount price is less
280
+ * than the sell price, the final price is equal to the discount price.
280
281
  */
281
282
  finalPrice: number | null;
282
283
  id: string;
283
284
  /**
284
- * It is the original order line item id of the line item. If the line item is derived from another line item, this field is filled.
285
+ * It is the original order line item id of the line item. If the line item is
286
+ * derived from another line item, this field is filled.
285
287
  */
286
288
  originalOrderLineItemId: string | null;
287
289
  /**
@@ -329,7 +331,8 @@ export interface getCustomerOrders_getCustomerOrders_orderPackages_trackingInfo
329
331
  */
330
332
  trackingLink: string | null;
331
333
  /**
332
- * Indicates whether the notification is sent to the customer after the cargo is delivered. **isSendNotification** returns true if the notification is sent.
334
+ * Indicates whether the notification is sent to the customer after the cargo is
335
+ * delivered. **isSendNotification** returns true if the notification is sent.
333
336
  */
334
337
  isSendNotification: boolean | null;
335
338
  /**
@@ -511,7 +514,7 @@ export interface getCustomerOrders_getCustomerOrders_taxLines {
511
514
  price: number;
512
515
  }
513
516
  export interface getCustomerOrders_getCustomerOrders {
514
- __typename: "StorefrontOrder";
517
+ __typename: "Order";
515
518
  /**
516
519
  * It is the billing address of the order.
517
520
  */
@@ -534,7 +537,8 @@ export interface getCustomerOrders_getCustomerOrders {
534
537
  */
535
538
  currencyRates: getCustomerOrders_getCustomerOrders_currencyRates[];
536
539
  /**
537
- * Information about the customer. The order does not have to be a customer information. If the order was created by ikasPOS, the customer information may be null.
540
+ * Information about the customer. The order does not have to be a customer
541
+ * information. If the order was created by ikasPOS, the customer information may be null.
538
542
  */
539
543
  customer: getCustomerOrders_getCustomerOrders_customer | null;
540
544
  deleted: boolean | null;
@@ -597,7 +601,9 @@ export interface getCustomerOrders_getCustomerOrders {
597
601
  */
598
602
  taxLines: getCustomerOrders_getCustomerOrders_taxLines[] | null;
599
603
  /**
600
- * The total final price of the order resulting from the apply of `orderAdjustments` , `shippingLines`, and `giftPackageLines` pricing to the order total price.
604
+ * The total final price of the order resulting from the apply of
605
+ * `orderAdjustments` , `shippingLines`, and `giftPackageLines` pricing to the
606
+ * order total price.
601
607
  */
602
608
  totalFinalPrice: number;
603
609
  /**
@@ -1,4 +1,4 @@
1
- import { CustomerAccountStatusEnum, CustomerEmailSubscriptionStatusesEnum } from "./../../../__generated__/global-types";
1
+ import { CustomerAccountStatusEnum } from "./../../../__generated__/global-types";
2
2
  export interface getMyCustomer_getMyCustomer_addresses_city {
3
3
  __typename: "CustomerAddressCity";
4
4
  /**
@@ -99,12 +99,6 @@ export interface getMyCustomer_getMyCustomer_addresses {
99
99
  */
100
100
  phone: string | null;
101
101
  }
102
- export interface getMyCustomer_getMyCustomer_attributes {
103
- __typename: "CustomerAttributeValue";
104
- customerAttributeId: string | null;
105
- customerAttributeOptionId: string | null;
106
- value: string | null;
107
- }
108
102
  export interface getMyCustomer_getMyCustomer {
109
103
  __typename: "Customer";
110
104
  id: string;
@@ -133,7 +127,8 @@ export interface getMyCustomer_getMyCustomer {
133
127
  */
134
128
  accountStatus: CustomerAccountStatusEnum | null;
135
129
  /**
136
- * The unique email address of the customer. Attempting to assign the same email address to multiple customers returns an error.
130
+ * The unique email address of the customer. Attempting to assign the same email
131
+ * address to multiple customers returns an error.
137
132
  */
138
133
  email: string | null;
139
134
  /**
@@ -144,11 +139,6 @@ export interface getMyCustomer_getMyCustomer {
144
139
  * Groups that the store owner attaches to the customer.
145
140
  */
146
141
  customerGroupIds: string[] | null;
147
- /**
148
- * CustomerEmailSubscriptionStatusesEnum
149
- */
150
- subscriptionStatus: CustomerEmailSubscriptionStatusesEnum | null;
151
- attributes: getMyCustomer_getMyCustomer_attributes[] | null;
152
142
  }
153
143
  export interface getMyCustomer {
154
144
  getMyCustomer: getMyCustomer_getMyCustomer;
@@ -1,4 +1,4 @@
1
- import { CustomerAttributeValueInput, CustomerAccountStatusEnum, CustomerEmailSubscriptionStatusesEnum } from "./../../../__generated__/global-types";
1
+ import { CustomerAccountStatusEnum } from "./../../../__generated__/global-types";
2
2
  export interface registerCustomer_registerCustomer_customer_addresses_city {
3
3
  __typename: "CustomerAddressCity";
4
4
  /**
@@ -103,12 +103,6 @@ export interface registerCustomer_registerCustomer_customer_addresses {
103
103
  taxOffice: string | null;
104
104
  title: string;
105
105
  }
106
- export interface registerCustomer_registerCustomer_customer_attributes {
107
- __typename: "CustomerAttributeValue";
108
- customerAttributeId: string | null;
109
- customerAttributeOptionId: string | null;
110
- value: string | null;
111
- }
112
106
  export interface registerCustomer_registerCustomer_customer {
113
107
  __typename: "Customer";
114
108
  id: string;
@@ -137,22 +131,18 @@ export interface registerCustomer_registerCustomer_customer {
137
131
  */
138
132
  accountStatus: CustomerAccountStatusEnum | null;
139
133
  /**
140
- * The unique email address of the customer. Attempting to assign the same email address to multiple customers returns an error.
134
+ * The unique email address of the customer. Attempting to assign the same email
135
+ * address to multiple customers returns an error.
141
136
  */
142
137
  email: string | null;
143
138
  /**
144
139
  * The customer's first name.
145
140
  */
146
141
  firstName: string;
147
- /**
148
- * CustomerEmailSubscriptionStatusesEnum
149
- */
150
- subscriptionStatus: CustomerEmailSubscriptionStatusesEnum | null;
151
142
  /**
152
143
  * Groups that the store owner attaches to the customer.
153
144
  */
154
145
  customerGroupIds: string[] | null;
155
- attributes: registerCustomer_registerCustomer_customer_attributes[] | null;
156
146
  }
157
147
  export interface registerCustomer_registerCustomer {
158
148
  __typename: "CustomerLoginResponse";
@@ -170,5 +160,4 @@ export interface registerCustomerVariables {
170
160
  lastName: string;
171
161
  isAcceptMarketing?: boolean | null;
172
162
  locale?: string | null;
173
- attributes?: CustomerAttributeValueInput[] | null;
174
163
  }
@@ -1,4 +1,4 @@
1
- import { SaveMyCustomerInput, CustomerEmailSubscriptionStatusesEnum, CustomerAccountStatusEnum } from "./../../../__generated__/global-types";
1
+ import { SaveMyCustomerInput, CustomerAccountStatusEnum } from "./../../../__generated__/global-types";
2
2
  export interface saveMyCustomer_saveMyCustomer_addresses_city {
3
3
  __typename: "CustomerAddressCity";
4
4
  /**
@@ -111,12 +111,6 @@ export interface saveMyCustomer_saveMyCustomer_addresses {
111
111
  */
112
112
  phone: string | null;
113
113
  }
114
- export interface saveMyCustomer_saveMyCustomer_attributes {
115
- __typename: "CustomerAttributeValue";
116
- customerAttributeId: string | null;
117
- customerAttributeOptionId: string | null;
118
- value: string | null;
119
- }
120
114
  export interface saveMyCustomer_saveMyCustomer {
121
115
  __typename: "Customer";
122
116
  id: string;
@@ -140,16 +134,13 @@ export interface saveMyCustomer_saveMyCustomer {
140
134
  * The customer's phone number
141
135
  */
142
136
  phone: string | null;
143
- /**
144
- * CustomerEmailSubscriptionStatusesEnum
145
- */
146
- subscriptionStatus: CustomerEmailSubscriptionStatusesEnum | null;
147
137
  /**
148
138
  * CustomerAccountStatusEnum
149
139
  */
150
140
  accountStatus: CustomerAccountStatusEnum | null;
151
141
  /**
152
- * The unique email address of the customer. Attempting to assign the same email address to multiple customers returns an error.
142
+ * The unique email address of the customer. Attempting to assign the same email
143
+ * address to multiple customers returns an error.
153
144
  */
154
145
  email: string | null;
155
146
  /**
@@ -160,7 +151,6 @@ export interface saveMyCustomer_saveMyCustomer {
160
151
  * Groups that the store owner attaches to the customer.
161
152
  */
162
153
  customerGroupIds: string[] | null;
163
- attributes: saveMyCustomer_saveMyCustomer_attributes[] | null;
164
154
  }
165
155
  export interface saveMyCustomer {
166
156
  saveMyCustomer: saveMyCustomer_saveMyCustomer;
@@ -2,7 +2,6 @@ import { IkasCustomer, IkasOrder, IkasOrderRefundSettings, IkasOrderTransaction
2
2
  import { IkasRefund } from "../../models/data/order/refund";
3
3
  import * as RefreshTokenTypes from "./__generated__/customerRefreshToken";
4
4
  import * as GetLastViewedProductsTypes from "./__generated__/getLastViewedProducts";
5
- import { IkasCustomerAttributeValue } from "src/models/data/customer/attribute-value";
6
5
  export declare class IkasCustomerAPI {
7
6
  static login(email: string, password: string): Promise<{
8
7
  customer: IkasCustomer;
@@ -15,7 +14,7 @@ export declare class IkasCustomerAPI {
15
14
  token: string;
16
15
  tokenExpiry: number;
17
16
  } | undefined>;
18
- static register(email: string, password: string, firstName: string, lastName: string, isAcceptMarketing?: boolean, attributes?: IkasCustomerAttributeValue[]): Promise<{
17
+ static register(email: string, password: string, firstName: string, lastName: string, isAcceptMarketing?: boolean): Promise<{
19
18
  customer: IkasCustomer;
20
19
  __typename: "CustomerLoginResponse";
21
20
  token: string;
@@ -28,7 +27,6 @@ export declare class IkasCustomerAPI {
28
27
  static getCustomer(): Promise<IkasCustomer | undefined>;
29
28
  static saveCustomer(customer: IkasCustomer): Promise<IkasCustomer | undefined>;
30
29
  static getOrders(id?: string): Promise<IkasOrder[] | undefined>;
31
- static getOrderByEmail(email: string, orderNumber: string): Promise<IkasOrder | undefined>;
32
30
  static getOrderTransactions(params?: {
33
31
  checkoutId?: string;
34
32
  id?: string;
@@ -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"mobx";import"../../models/data/html-meta-data/index.js";import"../../models/data/image/index.js";import"../../models/data/installment-info/index.js";import"../../models/data/merchant-settings/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"../product-option-file/index.js";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{IkasOrderTransaction as u}from"../../models/data/order-transaction/index.js";import"../../models/data/product-option-set/index.js";import"../../models/data/raffle/index.js";import"../../models/data/product-campaing/campaign/index.js";import"../../models/data/customer-attribute/index.js";import"../../models/data/customer-attribute/customer-attribute-sales-channel/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/customer-review-summary-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 c}from"../../storefront/index.js";var m,l,p,g,f,y,b,I,h,v,N,k,L,x,A,S,$,C=function(){function C(){}return C.login=function(o,d){return n(this,void 0,void 0,(function(){var n,u,c,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 customerGroupIds\n attributes {\n customerAttributeId\n customerAttributeOptionId\n value\n }\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 customerGroupIds\n attributes {\n customerAttributeId\n customerAttributeOptionId\n value\n }\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 u=e.sent(),c=u.data,(l=u.errors)&&l.length&&console.log(l),c&&c.customerLogin?[2,t(t({},c.customerLogin),{customer:new s(c.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,u,c;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 customerGroupIds\n attributes {\n customerAttributeId\n customerAttributeOptionId\n value\n }\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 customerGroupIds\n attributes {\n customerAttributeId\n customerAttributeOptionId\n value\n }\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,(u=o.errors)&&u.length&&console.log(u),d&&d.customerSocialLogin.customer?[2,{customer:new s(d.customerSocialLogin.customer),token:d.customerSocialLogin.token,tokenExpiry:d.customerSocialLogin.tokenExpiry}]:[3,4];case 3:return c=e.sent(),console.log(c),[3,4];case 4:return[2]}}))}))},C.register=function(o,d,u,m,l,g){return n(this,void 0,void 0,(function(){var n,f,y,b,I;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 $attributes: [CustomerAttributeValueInput!]\n ) {\n registerCustomer(\n email: $email\n password: $password\n firstName: $firstName\n lastName: $lastName\n isAcceptMarketing: $isAcceptMarketing\n locale: $locale\n attributes: $attributes\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 subscriptionStatus\n customerGroupIds\n attributes {\n customerAttributeId\n customerAttributeOptionId\n value\n }\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 $attributes: [CustomerAttributeValueInput!]\n ) {\n registerCustomer(\n email: $email\n password: $password\n firstName: $firstName\n lastName: $lastName\n isAcceptMarketing: $isAcceptMarketing\n locale: $locale\n attributes: $attributes\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 subscriptionStatus\n customerGroupIds\n attributes {\n customerAttributeId\n customerAttributeOptionId\n value\n }\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:u,lastName:m,isAcceptMarketing:l,locale:c.getCurrentLocale(),attributes:g}})];case 2:return f=e.sent(),y=f.data,(b=f.errors)&&b.length&&console.log(b),y&&y.registerCustomer?[2,t(t({},y.registerCustomer),{customer:new s(y.registerCustomer.customer)})]:[3,4];case 3:return I=e.sent(),console.log(I),[3,4];case 4:return[2]}}))}))},C.refreshToken=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(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 u=e.sent(),console.log(u),[3,4];case 4:return[2]}}))}))},C.forgotPassword=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(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:c.getCurrentLocale()}})];case 2:return s=e.sent(),o=s.data,(d=s.errors)&&d.length?(console.log(d),[2,!1]):[2,!!(null==o?void 0:o.customerForgotPassword)];case 3:return u=e.sent(),console.log(u),[3,4];case 4:return[2,!1]}}))}))},C.recoverPassword=function(t,s,o){return n(this,void 0,void 0,(function(){var n,d,u,c;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(),(u=d.errors)&&u.length?(console.log(u),[2,!1]):[3,4];case 3:return c=e.sent(),console.log(c),[2,!1];case 4:return[2,!0]}}))}))},C.checkEmail=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 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 u=e.sent(),console.log(u),[3,4];case 4:return[2,!1]}}))}))},C.getCustomer=function(){return n(this,void 0,void 0,(function(){var n,t,o,d,u;return e(this,(function(e){switch(e.label){case 0:n=a(I||(I=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 customerGroupIds\n subscriptionStatus\n attributes {\n customerAttributeId\n customerAttributeOptionId\n value\n }\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 customerGroupIds\n subscriptionStatus\n attributes {\n customerAttributeId\n customerAttributeOptionId\n value\n }\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 u=e.sent(),console.log(u),[3,4];case 4:return[2]}}))}))},C.saveCustomer=function(t){return n(this,void 0,void 0,(function(){var n,o,d,u,c;return e(this,(function(e){switch(e.label){case 0:n=a(h||(h=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 subscriptionStatus\n accountStatus\n email\n firstName\n customerGroupIds\n attributes {\n customerAttributeId\n customerAttributeOptionId\n value\n }\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 subscriptionStatus\n accountStatus\n email\n firstName\n customerGroupIds\n attributes {\n customerAttributeId\n customerAttributeOptionId\n value\n }\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,subscriptionStatus:t.subscriptionStatus,attributes:t.attributes.map((function(n){return{value:n.value,customerAttributeId:n.customerAttributeId,customerAttributeOptionId:n.customerAttributeOptionId}}))}}})];case 2:return o=e.sent(),d=o.data,(u=o.errors)&&u.length&&console.log(u),d&&d.saveMyCustomer?[2,new s(d.saveMyCustomer)]:[3,4];case 3:return c=e.sent(),console.log(c),[3,4];case 4:return[2]}}))}))},C.getOrders=function(t){return n(this,void 0,void 0,(function(){var n,s,d,u,c;return e(this,(function(e){switch(e.label){case 0:n=a(v||(v=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,(u=s.errors)&&u.length&&console.log(u),d&&d.getCustomerOrders?[2,d.getCustomerOrders.map((function(n){return new o(n)}))]:[3,4];case 3:return c=e.sent(),console.log(c),[3,4];case 4:return[2]}}))}))},C.getOrderByEmail=function(t,s){return n(this,void 0,void 0,(function(){var n,d,u,c,m;return e(this,(function(e){switch(e.label){case 0:n=a(N||(N=r(["\n query getOrderByEmail($email: String!, $orderNumber: String!) {\n getOrderByEmail(email: $email, orderNumber: $orderNumber) {\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 getOrderByEmail($email: String!, $orderNumber: String!) {\n getOrderByEmail(email: $email, orderNumber: $orderNumber) {\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:{email:t,orderNumber:s}})];case 2:return d=e.sent(),u=d.data,(c=d.errors)&&c.length&&console.log(c),u&&u.getOrderByEmail?[2,new o(u.getOrderByEmail)]:[3,4];case 3:return m=e.sent(),console.log(m),[3,4];case 4:return[2]}}))}))},C.getOrderTransactions=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(k||(k=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 u(n)}))];case 3:return c=e.sent(),console.log(c),[2,[]];case 4:return[2]}}))}))},C.saveIkasOrderRefund=function(t){return n(this,void 0,void 0,(function(){var n,s,d,u,c;return e(this,(function(e){switch(e.label){case 0:n=a(L||(L=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,(u=s.errors)&&u.length?[2]:d&&d.createOrderRefundRequest?[2,new o(null==d?void 0:d.createOrderRefundRequest)]:[3,4];case 3:return c=e.sent(),console.log(c),[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(x||(x=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,u,c;return e(this,(function(e){switch(e.label){case 0:n=a(A||(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,(u=o.errors)&&u.length?[2,[]]:[2,(null===(s=d.getLastViewedProducts)||void 0===s?void 0:s.products)||[]];case 3:return c=e.sent(),console.log(c),[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(S||(S=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,u;return e(this,(function(e){switch(e.label){case 0:n=a($||($=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:c.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 u=e.sent(),console.log(u),[3,4];case 4:return[2]}}))}))},C}();export{C 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"../product-option-file/index.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/data/product-campaing/campaign/index.js";import"../../models/theme/theme.js";import"../../models/theme/page/index.js";import"../../models/theme/component/prop/index.js";import"../../models/theme/page/component/prop-value/link.js";import"../../models/ui/brand-list/index.js";import"../../models/ui/blog-list/index.js";import"../../models/ui/blog-category-list/index.js";import"../../models/ui/category-list/index.js";import"../../models/ui/product-detail/index.js";import"../../models/ui/product-list/index.js";import"../../models/ui/product-attribute-detail/index.js";import"../../models/ui/product-attribute-list/index.js";import"../../models/ui/customer-review-list/index.js";import"../../models/ui/validator/index.js";import"../../models/ui/validator/rules/index.js";import"../../models/ui/validator/form/login.js";import"../../models/ui/validator/form/address.js";import"../../models/ui/validator/form/register.js";import"../../models/ui/validator/form/contact-form.js";import"../../models/ui/validator/form/forgot-password.js";import"../../models/ui/validator/form/recover-password.js";import"../../models/ui/validator/form/account-info.js";import"../../models/ui/validator/form/raffle-form.js";import"../../models/ui/validator/form/customer-review.js";import"../../models/ui/raffle-list/index.js";import"../../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,x,L,$,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 customerGroupIds\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 customerGroupIds\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 customerGroupIds\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 customerGroupIds\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 customerGroupIds\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 customerGroupIds\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 customerGroupIds\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 customerGroupIds\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 customerGroupIds\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 customerGroupIds\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(x||(x=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(L||(L=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};
@@ -18,7 +18,11 @@ export interface listCustomerReviews_listCustomerReviews {
18
18
  count: number;
19
19
  data: listCustomerReviews_listCustomerReviews_data[];
20
20
  /**
21
- * 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.**
21
+ * In the records returned as Response, it shows whether there are any more
22
+ * records or not. For example, let's say our page field is three and our limit
23
+ * field is thirty. Records between 60 and 90 will be returned. If hasNext is
24
+ * `true` despite these records, **it means there are more records.** If hasNext
25
+ * is `false`, it means there are a total of **90 records.**
22
26
  */
23
27
  hasNext: boolean;
24
28
  /**