@ikas/storefront-api 4.0.0-alpha.10

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 (378) hide show
  1. package/package.json +42 -0
  2. package/src/__api/models/AbandonedCartFlow.ts +34 -0
  3. package/src/__api/models/AbandonedCartFlowCustomerFilter.ts +25 -0
  4. package/src/__api/models/AddItemToCartInput.ts +29 -0
  5. package/src/__api/models/AdditionalPrice.ts +24 -0
  6. package/src/__api/models/ApplicableProductFilterValue.ts +23 -0
  7. package/src/__api/models/AppliedProduct.ts +15 -0
  8. package/src/__api/models/AppliedProductInput.ts +15 -0
  9. package/src/__api/models/AvailableShippingMethod.ts +24 -0
  10. package/src/__api/models/Blog.ts +55 -0
  11. package/src/__api/models/BlogCategory.ts +23 -0
  12. package/src/__api/models/BlogCategoryPaginationResponse.ts +24 -0
  13. package/src/__api/models/BlogContent.ts +20 -0
  14. package/src/__api/models/BlogMetadata.ts +32 -0
  15. package/src/__api/models/BlogMetadataPaginationResponse.ts +24 -0
  16. package/src/__api/models/BlogMetadataTargetTypeEnumFilter.ts +22 -0
  17. package/src/__api/models/BlogPaginationResponse.ts +23 -0
  18. package/src/__api/models/BlogTag.ts +16 -0
  19. package/src/__api/models/BlogWriter.ts +15 -0
  20. package/src/__api/models/BooleanFilterInput.ts +13 -0
  21. package/src/__api/models/BuyX.ts +20 -0
  22. package/src/__api/models/BuyXThenGetY.ts +22 -0
  23. package/src/__api/models/Campaign.ts +75 -0
  24. package/src/__api/models/CampaignDateRangeField.ts +16 -0
  25. package/src/__api/models/CampaignFilter.ts +16 -0
  26. package/src/__api/models/CampaignMinMaxRangeField.ts +16 -0
  27. package/src/__api/models/CampaignOffer.ts +50 -0
  28. package/src/__api/models/CampaignOfferProduct.ts +49 -0
  29. package/src/__api/models/CampaignOfferProductTranslation.ts +19 -0
  30. package/src/__api/models/CampaignOfferTriggerSettings.ts +19 -0
  31. package/src/__api/models/Cart.ts +61 -0
  32. package/src/__api/models/CartCampaignOffer.ts +31 -0
  33. package/src/__api/models/CartLineItemInput.ts +20 -0
  34. package/src/__api/models/CartLineOptionInput.ts +17 -0
  35. package/src/__api/models/CartLineVariantInput.ts +15 -0
  36. package/src/__api/models/CartStorefrontRouting.ts +28 -0
  37. package/src/__api/models/CartStorefrontRoutingDynamicCurrencySettings.ts +19 -0
  38. package/src/__api/models/CartV2.ts +159 -0
  39. package/src/__api/models/CartV2CampaignOffer.ts +36 -0
  40. package/src/__api/models/Category.ts +58 -0
  41. package/src/__api/models/CategoryCondition.ts +17 -0
  42. package/src/__api/models/CategoryFilterInput.ts +15 -0
  43. package/src/__api/models/CategoryPaginationResponse.ts +24 -0
  44. package/src/__api/models/CategoryPathFilterInput.ts +14 -0
  45. package/src/__api/models/CategoryPathItem.ts +33 -0
  46. package/src/__api/models/CategoryTranslation.ts +17 -0
  47. package/src/__api/models/CheckStocksLineInput.ts +17 -0
  48. package/src/__api/models/CheckStocksLineResponse.ts +18 -0
  49. package/src/__api/models/CheckStocksResponse.ts +16 -0
  50. package/src/__api/models/Checkout.ts +102 -0
  51. package/src/__api/models/CheckoutCustomer.ts +39 -0
  52. package/src/__api/models/CheckoutCustomerInput.ts +25 -0
  53. package/src/__api/models/CheckoutOption.ts +15 -0
  54. package/src/__api/models/CheckoutSettings.ts +62 -0
  55. package/src/__api/models/CheckoutSettingsPrice.ts +15 -0
  56. package/src/__api/models/City.ts +29 -0
  57. package/src/__api/models/Country.ts +41 -0
  58. package/src/__api/models/CreateCustomerEmailSubscriptionInput.ts +22 -0
  59. package/src/__api/models/CreateCustomerReviewInput.ts +38 -0
  60. package/src/__api/models/CreateSaleTransactionMasterPassPaymentMethodDetail.ts +19 -0
  61. package/src/__api/models/CreateSaleTransactionWithCartInput.ts +29 -0
  62. package/src/__api/models/CreateSaleTransactionWithCheckoutInput.ts +29 -0
  63. package/src/__api/models/CreateStripePaymentIntentResponse.ts +21 -0
  64. package/src/__api/models/CurrencyRate.ts +23 -0
  65. package/src/__api/models/CurrencyRateData.ts +15 -0
  66. package/src/__api/models/Customer.ts +81 -0
  67. package/src/__api/models/CustomerAddress.ts +64 -0
  68. package/src/__api/models/CustomerAddressCity.ts +17 -0
  69. package/src/__api/models/CustomerAddressCityInput.ts +18 -0
  70. package/src/__api/models/CustomerAddressCountry.ts +22 -0
  71. package/src/__api/models/CustomerAddressCountryInput.ts +23 -0
  72. package/src/__api/models/CustomerAddressDistrict.ts +18 -0
  73. package/src/__api/models/CustomerAddressDistrictInput.ts +19 -0
  74. package/src/__api/models/CustomerAddressState.ts +17 -0
  75. package/src/__api/models/CustomerAddressStateInput.ts +19 -0
  76. package/src/__api/models/CustomerAttribute.ts +36 -0
  77. package/src/__api/models/CustomerAttributeOption.ts +17 -0
  78. package/src/__api/models/CustomerAttributeOptionTranslation.ts +17 -0
  79. package/src/__api/models/CustomerAttributeSalesChannel.ts +28 -0
  80. package/src/__api/models/CustomerAttributeTranslation.ts +24 -0
  81. package/src/__api/models/CustomerAttributeValue.ts +18 -0
  82. package/src/__api/models/CustomerAttributeValueInput.ts +19 -0
  83. package/src/__api/models/CustomerCheckResponse.ts +13 -0
  84. package/src/__api/models/CustomerFavoriteProduct.ts +19 -0
  85. package/src/__api/models/CustomerLoginResponse.ts +18 -0
  86. package/src/__api/models/CustomerRefreshTokenResponse.ts +17 -0
  87. package/src/__api/models/CustomerReview.ts +43 -0
  88. package/src/__api/models/CustomerReviewSFPaginationResponse.ts +26 -0
  89. package/src/__api/models/CustomerReviewSummary.ts +25 -0
  90. package/src/__api/models/CustomerReviewSummaryPaginationResponse.ts +26 -0
  91. package/src/__api/models/CustomerReviewSummaryStar.ts +17 -0
  92. package/src/__api/models/DateFilterInput.ts +27 -0
  93. package/src/__api/models/District.ts +29 -0
  94. package/src/__api/models/FixedDiscount.ts +28 -0
  95. package/src/__api/models/GetAvailableStockLocation.ts +25 -0
  96. package/src/__api/models/GetAvailableStockLocationAddress.ts +36 -0
  97. package/src/__api/models/GetAvailableStockLocationAddressCity.ts +19 -0
  98. package/src/__api/models/GetAvailableStockLocationsResponse.ts +18 -0
  99. package/src/__api/models/GetOrderLineFile.ts +13 -0
  100. package/src/__api/models/GetProductCampaignsInput.ts +18 -0
  101. package/src/__api/models/GetProductCampaignsResponse.ts +20 -0
  102. package/src/__api/models/GetProductOptionFileUrl.ts +18 -0
  103. package/src/__api/models/GetVariantStockLocation.ts +21 -0
  104. package/src/__api/models/GetVariantStockLocationListResponse.ts +18 -0
  105. package/src/__api/models/GetY.ts +26 -0
  106. package/src/__api/models/HTMLMetaData.ts +44 -0
  107. package/src/__api/models/HTMLMetaDataOverride.ts +21 -0
  108. package/src/__api/models/HTMLMetaDataTargetTypeEnumFilter.ts +22 -0
  109. package/src/__api/models/HTMLMetaDataTranslation.ts +18 -0
  110. package/src/__api/models/Invoice.ts +26 -0
  111. package/src/__api/models/ListCustomerReviewInput.ts +14 -0
  112. package/src/__api/models/LocationTranslations.ts +15 -0
  113. package/src/__api/models/MasterPassTokenResponse.ts +18 -0
  114. package/src/__api/models/MerchantAddress.ts +48 -0
  115. package/src/__api/models/MerchantAddressCity.ts +17 -0
  116. package/src/__api/models/MerchantAddressCountry.ts +18 -0
  117. package/src/__api/models/MerchantAddressDistrict.ts +18 -0
  118. package/src/__api/models/MerchantAddressState.ts +17 -0
  119. package/src/__api/models/MerchantSettings.ts +32 -0
  120. package/src/__api/models/MerchantSettingsCurrencyFormat.ts +27 -0
  121. package/src/__api/models/OrderAddress.ts +53 -0
  122. package/src/__api/models/OrderAddressCity.ts +17 -0
  123. package/src/__api/models/OrderAddressCityInput.ts +17 -0
  124. package/src/__api/models/OrderAddressCountry.ts +21 -0
  125. package/src/__api/models/OrderAddressCountryInput.ts +22 -0
  126. package/src/__api/models/OrderAddressDistrict.ts +17 -0
  127. package/src/__api/models/OrderAddressDistrictInput.ts +19 -0
  128. package/src/__api/models/OrderAddressInput.ts +53 -0
  129. package/src/__api/models/OrderAddressState.ts +17 -0
  130. package/src/__api/models/OrderAddressStateInput.ts +18 -0
  131. package/src/__api/models/OrderAdjustment.ts +35 -0
  132. package/src/__api/models/OrderAdjustmentAppliedOrderLine.ts +24 -0
  133. package/src/__api/models/OrderAdjustmentInput.ts +26 -0
  134. package/src/__api/models/OrderCurrencyRate.ts +17 -0
  135. package/src/__api/models/OrderCustomer.ts +34 -0
  136. package/src/__api/models/OrderGiftPackageLine.ts +18 -0
  137. package/src/__api/models/OrderLineDiscount.ts +28 -0
  138. package/src/__api/models/OrderLineItem.ts +59 -0
  139. package/src/__api/models/OrderLineOption.ts +25 -0
  140. package/src/__api/models/OrderLineOptionValue.ts +18 -0
  141. package/src/__api/models/OrderLineVariant.ts +56 -0
  142. package/src/__api/models/OrderLineVariantBrand.ts +15 -0
  143. package/src/__api/models/OrderLineVariantCategory.ts +21 -0
  144. package/src/__api/models/OrderLineVariantCategoryPath.ts +17 -0
  145. package/src/__api/models/OrderLineVariantPrice.ts +27 -0
  146. package/src/__api/models/OrderLineVariantVariantValues.ts +23 -0
  147. package/src/__api/models/OrderPackage.ts +33 -0
  148. package/src/__api/models/OrderPaymentMethod.ts +22 -0
  149. package/src/__api/models/OrderRefundOrderLineInput.ts +17 -0
  150. package/src/__api/models/OrderRefundRequestInput.ts +21 -0
  151. package/src/__api/models/OrderRefundSettings.ts +28 -0
  152. package/src/__api/models/OrderShippingLine.ts +34 -0
  153. package/src/__api/models/OrderStorefrontRouting.ts +29 -0
  154. package/src/__api/models/OrderStorefrontRoutingDynamicCurrencySettings.ts +19 -0
  155. package/src/__api/models/OrderTaxLine.ts +15 -0
  156. package/src/__api/models/PaginationInput.ts +17 -0
  157. package/src/__api/models/PaymentGateway.ts +61 -0
  158. package/src/__api/models/PaymentGatewayPaymentMethod.ts +17 -0
  159. package/src/__api/models/PaymentGatewaySettings.ts +21 -0
  160. package/src/__api/models/PaymentGatewayTranslation.ts +19 -0
  161. package/src/__api/models/PaymentMethodDetailInput.ts +26 -0
  162. package/src/__api/models/Product.ts +69 -0
  163. package/src/__api/models/ProductAttribute.ts +36 -0
  164. package/src/__api/models/ProductAttributeOption.ts +17 -0
  165. package/src/__api/models/ProductAttributeOptionTranslation.ts +17 -0
  166. package/src/__api/models/ProductAttributeTableCellData.ts +17 -0
  167. package/src/__api/models/ProductAttributeTableTemplate.ts +22 -0
  168. package/src/__api/models/ProductAttributeTranslation.ts +24 -0
  169. package/src/__api/models/ProductAttributeValue.ts +19 -0
  170. package/src/__api/models/ProductBackInStockRemind.ts +25 -0
  171. package/src/__api/models/ProductBackInStockRemindInput.ts +19 -0
  172. package/src/__api/models/ProductBrand.ts +33 -0
  173. package/src/__api/models/ProductBrandPaginationResponse.ts +24 -0
  174. package/src/__api/models/ProductBrandTranslation.ts +18 -0
  175. package/src/__api/models/ProductFacetCount.ts +18 -0
  176. package/src/__api/models/ProductFacetCountValue.ts +16 -0
  177. package/src/__api/models/ProductFilterData.ts +21 -0
  178. package/src/__api/models/ProductFilterDataFilter.ts +49 -0
  179. package/src/__api/models/ProductFilterSettings.ts +25 -0
  180. package/src/__api/models/ProductImage.ts +20 -0
  181. package/src/__api/models/ProductItem.ts +18 -0
  182. package/src/__api/models/ProductItemInput.ts +18 -0
  183. package/src/__api/models/ProductLastViewed.ts +21 -0
  184. package/src/__api/models/ProductLastViewedInput.ts +22 -0
  185. package/src/__api/models/ProductOption.ts +62 -0
  186. package/src/__api/models/ProductOptionDateSettings.ts +29 -0
  187. package/src/__api/models/ProductOptionFileSettings.ts +25 -0
  188. package/src/__api/models/ProductOptionSelectSettings.ts +31 -0
  189. package/src/__api/models/ProductOptionSelectValue.ts +33 -0
  190. package/src/__api/models/ProductOptionSelectValueOtherPrice.ts +17 -0
  191. package/src/__api/models/ProductOptionSelectValueTranslations.ts +17 -0
  192. package/src/__api/models/ProductOptionSet.ts +26 -0
  193. package/src/__api/models/ProductOptionSetTranslations.ts +20 -0
  194. package/src/__api/models/ProductOptionTextSettings.ts +17 -0
  195. package/src/__api/models/ProductOptionTranslations.ts +24 -0
  196. package/src/__api/models/ProductPaginationResponse.ts +24 -0
  197. package/src/__api/models/ProductPrice.ts +27 -0
  198. package/src/__api/models/ProductSearchResponse.ts +31 -0
  199. package/src/__api/models/ProductStockLocation.ts +22 -0
  200. package/src/__api/models/ProductTagTranslation.ts +17 -0
  201. package/src/__api/models/ProductTranslation.ts +17 -0
  202. package/src/__api/models/ProductVariantType.ts +17 -0
  203. package/src/__api/models/Raffle.ts +49 -0
  204. package/src/__api/models/RaffleDateRangeField.ts +15 -0
  205. package/src/__api/models/RaffleMetadata.ts +32 -0
  206. package/src/__api/models/RaffleMetadataTargetTypeEnumFilter.ts +22 -0
  207. package/src/__api/models/RafflePaginationResponse.ts +23 -0
  208. package/src/__api/models/RaffleParticipants.ts +52 -0
  209. package/src/__api/models/RaffleParticipantsInput.ts +32 -0
  210. package/src/__api/models/RaffleParticipantsUpdateInput.ts +24 -0
  211. package/src/__api/models/RaffleVariantInformation.ts +16 -0
  212. package/src/__api/models/RetrieveInstallmentInfoInput.ts +19 -0
  213. package/src/__api/models/RetrieveInstallmentInfoResponse.ts +36 -0
  214. package/src/__api/models/SaveCartInput.ts +50 -0
  215. package/src/__api/models/SaveCheckoutInput.ts +56 -0
  216. package/src/__api/models/SaveItemToCartInput.ts +35 -0
  217. package/src/__api/models/SaveMyCustomerAddressInput.ts +63 -0
  218. package/src/__api/models/SaveMyCustomerInput.ts +30 -0
  219. package/src/__api/models/SearchCategory.ts +27 -0
  220. package/src/__api/models/SearchCategoryPath.ts +22 -0
  221. package/src/__api/models/SearchDynamicCurrencySettings.ts +17 -0
  222. package/src/__api/models/SearchHTMLMetaData.ts +36 -0
  223. package/src/__api/models/SearchHTMLMetaDataOverride.ts +23 -0
  224. package/src/__api/models/SearchInput.ts +64 -0
  225. package/src/__api/models/SearchInputFacetListInput.ts +20 -0
  226. package/src/__api/models/SearchInputFilterListInput.ts +27 -0
  227. package/src/__api/models/SearchInputOrderByInput.ts +17 -0
  228. package/src/__api/models/SearchProduct.ts +72 -0
  229. package/src/__api/models/SearchProductAttribute.ts +28 -0
  230. package/src/__api/models/SearchProductAttributeOption.ts +17 -0
  231. package/src/__api/models/SearchProductAttributeTableCellData.ts +17 -0
  232. package/src/__api/models/SearchProductAttributeTableTemplate.ts +22 -0
  233. package/src/__api/models/SearchProductAttributeValue.ts +27 -0
  234. package/src/__api/models/SearchProductBrand.ts +22 -0
  235. package/src/__api/models/SearchProductImage.ts +21 -0
  236. package/src/__api/models/SearchProductPrice.ts +27 -0
  237. package/src/__api/models/SearchProductStockLocation.ts +17 -0
  238. package/src/__api/models/SearchProductTag.ts +20 -0
  239. package/src/__api/models/SearchProductVariantType.ts +21 -0
  240. package/src/__api/models/SearchVariant.ts +58 -0
  241. package/src/__api/models/SearchVariantType.ts +27 -0
  242. package/src/__api/models/SearchVariantValue.ts +19 -0
  243. package/src/__api/models/SearchVariationValueRelation.ts +17 -0
  244. package/src/__api/models/SocialLoginSettings.ts +18 -0
  245. package/src/__api/models/State.ts +20 -0
  246. package/src/__api/models/StockLocation.ts +36 -0
  247. package/src/__api/models/StockLocationAddress.ts +35 -0
  248. package/src/__api/models/StockLocationAddressCity.ts +18 -0
  249. package/src/__api/models/StockLocationAddressCountry.ts +19 -0
  250. package/src/__api/models/StockLocationAddressDistrict.ts +19 -0
  251. package/src/__api/models/StockLocationAddressState.ts +19 -0
  252. package/src/__api/models/Storefront.ts +66 -0
  253. package/src/__api/models/StorefrontDomain.ts +25 -0
  254. package/src/__api/models/StorefrontDynamicCurrencySettings.ts +17 -0
  255. package/src/__api/models/StorefrontLocalization.ts +21 -0
  256. package/src/__api/models/StorefrontOrder.ts +116 -0
  257. package/src/__api/models/StorefrontRouting.ts +29 -0
  258. package/src/__api/models/StorefrontTheme.ts +25 -0
  259. package/src/__api/models/StorefrontTransaction.ts +53 -0
  260. package/src/__api/models/StringFilterInput.ts +21 -0
  261. package/src/__api/models/Town.ts +21 -0
  262. package/src/__api/models/TrackingInfo.ts +24 -0
  263. package/src/__api/models/TransactionError.ts +17 -0
  264. package/src/__api/models/TransactionInstallmentPrice.ts +36 -0
  265. package/src/__api/models/TransactionPaymentMethodDetail.ts +39 -0
  266. package/src/__api/models/TransactionResponse.ts +26 -0
  267. package/src/__api/models/UpdateCartCampaignOfferInput.ts +25 -0
  268. package/src/__api/models/Variant.ts +58 -0
  269. package/src/__api/models/VariantStock.ts +15 -0
  270. package/src/__api/models/VariantType.ts +29 -0
  271. package/src/__api/models/VariantTypeTranslation.ts +21 -0
  272. package/src/__api/models/VariantValue.ts +20 -0
  273. package/src/__api/models/VariantValueRelation.ts +15 -0
  274. package/src/__api/models/VariantValueTranslation.ts +16 -0
  275. package/src/__api/models/_base.ts +26 -0
  276. package/src/__api/mutations/activateCustomer.ts +38 -0
  277. package/src/__api/mutations/addCouponCodeToCheckout.ts +259 -0
  278. package/src/__api/mutations/addItemToCart.ts +284 -0
  279. package/src/__api/mutations/createCustomerEmailSubscription.ts +111 -0
  280. package/src/__api/mutations/createCustomerReview.ts +66 -0
  281. package/src/__api/mutations/createOrderRefundRequest.ts +240 -0
  282. package/src/__api/mutations/createSaleTransactionWithCart.ts +62 -0
  283. package/src/__api/mutations/createSaleTransactionWithCheckout.ts +62 -0
  284. package/src/__api/mutations/createStripePaymentIntent.ts +57 -0
  285. package/src/__api/mutations/customerForgotPassword.ts +41 -0
  286. package/src/__api/mutations/customerLogin.ts +113 -0
  287. package/src/__api/mutations/customerRecoverPassword.ts +44 -0
  288. package/src/__api/mutations/customerRefreshToken.ts +52 -0
  289. package/src/__api/mutations/deleteRaffleParticipantsList.ts +38 -0
  290. package/src/__api/mutations/getOrderLineFile.ts +39 -0
  291. package/src/__api/mutations/registerCustomer.ts +131 -0
  292. package/src/__api/mutations/retrieveInstallmentInfo.ts +65 -0
  293. package/src/__api/mutations/saveCart.ts +284 -0
  294. package/src/__api/mutations/saveCartCouponCode.ts +287 -0
  295. package/src/__api/mutations/saveCheckout.ts +256 -0
  296. package/src/__api/mutations/saveFavoriteProduct.ts +41 -0
  297. package/src/__api/mutations/saveItemToCart.ts +136 -0
  298. package/src/__api/mutations/saveLastViewedProducts.ts +62 -0
  299. package/src/__api/mutations/saveMyCustomer.ts +108 -0
  300. package/src/__api/mutations/saveProductBackInStockRemind.ts +63 -0
  301. package/src/__api/mutations/saveRaffleParticipant.ts +69 -0
  302. package/src/__api/mutations/sendContactFormToMerchant.ts +53 -0
  303. package/src/__api/mutations/updateCartCampaignOffer.ts +284 -0
  304. package/src/__api/mutations/updateRaffleParticipant.ts +72 -0
  305. package/src/__api/queries/checkCustomerEmail.ts +54 -0
  306. package/src/__api/queries/checkStocks.ts +53 -0
  307. package/src/__api/queries/customerSocialLogin.ts +113 -0
  308. package/src/__api/queries/getAvailableShippingCountries.ts +41 -0
  309. package/src/__api/queries/getAvailableStockLocations.ts +75 -0
  310. package/src/__api/queries/getCart.ts +142 -0
  311. package/src/__api/queries/getCartById.ts +287 -0
  312. package/src/__api/queries/getCheckoutByCartId.ts +256 -0
  313. package/src/__api/queries/getCheckoutById.ts +256 -0
  314. package/src/__api/queries/getCurrencyRate.ts +56 -0
  315. package/src/__api/queries/getCustomerOrders.ts +237 -0
  316. package/src/__api/queries/getLastViewedProducts.ts +62 -0
  317. package/src/__api/queries/getMasterPassRequestToken.ts +62 -0
  318. package/src/__api/queries/getMyCountry.ts +26 -0
  319. package/src/__api/queries/getMyCustomer.ts +95 -0
  320. package/src/__api/queries/getOrder.ts +237 -0
  321. package/src/__api/queries/getOrderByEmail.ts +240 -0
  322. package/src/__api/queries/getProductCampaigns.ts +92 -0
  323. package/src/__api/queries/getProductFilterData.ts +211 -0
  324. package/src/__api/queries/getProductOptionFileUrl.ts +59 -0
  325. package/src/__api/queries/getRaffleParticipants.ts +59 -0
  326. package/src/__api/queries/getRafflesByCustomerId.ts +74 -0
  327. package/src/__api/queries/getRelatedProducts.ts +60 -0
  328. package/src/__api/queries/getStorefront.ts +103 -0
  329. package/src/__api/queries/getStorefrontSettings.ts +26 -0
  330. package/src/__api/queries/getVariantStockLocations.ts +74 -0
  331. package/src/__api/queries/isFavoriteProduct.ts +38 -0
  332. package/src/__api/queries/listBlog.ts +136 -0
  333. package/src/__api/queries/listBlogCategory.ts +92 -0
  334. package/src/__api/queries/listBlogMetadata.ts +90 -0
  335. package/src/__api/queries/listCampaignOffer.ts +76 -0
  336. package/src/__api/queries/listCategory.ts +151 -0
  337. package/src/__api/queries/listCheckoutSettings.ts +75 -0
  338. package/src/__api/queries/listCity.ts +74 -0
  339. package/src/__api/queries/listCountry.ts +80 -0
  340. package/src/__api/queries/listCustomerAttribute.ts +62 -0
  341. package/src/__api/queries/listCustomerReviewSummary.ts +71 -0
  342. package/src/__api/queries/listCustomerReviews.ts +90 -0
  343. package/src/__api/queries/listDistrict.ts +77 -0
  344. package/src/__api/queries/listFavoriteProducts.ts +44 -0
  345. package/src/__api/queries/listHTMLMetaData.ts +88 -0
  346. package/src/__api/queries/listMerchantSettings.ts +90 -0
  347. package/src/__api/queries/listOrderRefundSettings.ts +73 -0
  348. package/src/__api/queries/listOrderTransactions.ts +89 -0
  349. package/src/__api/queries/listPaymentGateway.ts +85 -0
  350. package/src/__api/queries/listProduct.ts +156 -0
  351. package/src/__api/queries/listProductAttribute.ts +81 -0
  352. package/src/__api/queries/listProductBackInStockRemind.ts +79 -0
  353. package/src/__api/queries/listProductBrand.ts +110 -0
  354. package/src/__api/queries/listProductOptionSet.ts +105 -0
  355. package/src/__api/queries/listProductStockLocation.ts +62 -0
  356. package/src/__api/queries/listRaffle.ts +108 -0
  357. package/src/__api/queries/listRaffleMetadata.ts +83 -0
  358. package/src/__api/queries/listState.ts +67 -0
  359. package/src/__api/queries/listStockLocation.ts +76 -0
  360. package/src/__api/queries/listTown.ts +67 -0
  361. package/src/__api/queries/listVariantType.ts +74 -0
  362. package/src/__api/queries/searchProducts.ts +171 -0
  363. package/src/__api/types/index.ts +3047 -0
  364. package/src/api/blog/index.ts +70 -0
  365. package/src/api/brand/index.ts +27 -0
  366. package/src/api/cart/index.ts +113 -0
  367. package/src/api/category/index.ts +25 -0
  368. package/src/api/checkout/index.ts +121 -0
  369. package/src/api/customer/index.ts +380 -0
  370. package/src/api/file-upload/index.ts +38 -0
  371. package/src/api/html-meta-data/index.ts +25 -0
  372. package/src/api/location/index.ts +64 -0
  373. package/src/api/masterpass/index.ts +12 -0
  374. package/src/api/merchant/index.ts +24 -0
  375. package/src/api/product/index.ts +354 -0
  376. package/src/api/raffle/index.ts +80 -0
  377. package/src/api/storefront/index.ts +30 -0
  378. package/src/index.ts +68 -0
@@ -0,0 +1,354 @@
1
+ import { APIResponse } from "@ikas/fe-api-client";
2
+ import { SearchProduct } from "../../__api/types";
3
+ import { IkasStorefrontConfig } from "@ikas/storefront-config";
4
+
5
+ import { QueryParams as ListProductBackInStockRemindQueryParams } from "../../__api/queries/listProductBackInStockRemind";
6
+ import { QueryParams as SearchProductsQueryParams } from "../../__api/queries/searchProducts";
7
+ import { QueryParams as GetProductFilterDataQueryParams } from "../../__api/queries/getProductFilterData";
8
+ import { QueryParams as GetRelatedProductsQueryParams } from "../../__api/queries/getRelatedProducts";
9
+ import { QueryParams as ListProductAttributeQueryParams } from "../../__api/queries/listProductAttribute";
10
+ import { QueryParams as GetProductCampaignsQueryParams } from "../../__api/queries/getProductCampaigns";
11
+ import { QueryParams as GetOrderLineFileQueryParams } from "../../__api/mutations/getOrderLineFile";
12
+ import { QueryParams as ListProductOptionSetQueryParams } from "../../__api/queries/listProductOptionSet";
13
+ import { QueryParams as SaveProductBackInStockRemindQueryParams } from "../../__api/mutations/saveProductBackInStockRemind";
14
+
15
+ import {
16
+ IkasBrandOrderType,
17
+ IkasCategoryProductsOrderType,
18
+ IkasFilterCategory,
19
+ IkasProduct,
20
+ IkasProductAttribute,
21
+ IkasProductAttributeType,
22
+ IkasProductCampaign,
23
+ IkasProductFilter,
24
+ IkasProductOptionSet,
25
+ IkasProductPrice,
26
+ initIkasProduct,
27
+ initIkasProductAttribute,
28
+ initIkasProductOptionSet,
29
+ } from "@ikas/storefront-models";
30
+
31
+ export type {
32
+ ListProductBackInStockRemindQueryParams,
33
+ SearchProductsQueryParams,
34
+ GetProductFilterDataQueryParams,
35
+ GetRelatedProductsQueryParams,
36
+ ListProductAttributeQueryParams,
37
+ GetProductCampaignsQueryParams,
38
+ GetOrderLineFileQueryParams,
39
+ ListProductOptionSetQueryParams,
40
+ SaveProductBackInStockRemindQueryParams,
41
+ };
42
+
43
+ export async function listProductBackInStockRemind(
44
+ params: ListProductBackInStockRemindQueryParams
45
+ ) {
46
+ const _listProductBackInStockRemind = (
47
+ await import("../../__api/queries/listProductBackInStockRemind")
48
+ ).default;
49
+ return await _listProductBackInStockRemind(params);
50
+ }
51
+
52
+ export async function saveProductBackInStockRemind(
53
+ params: SaveProductBackInStockRemindQueryParams
54
+ ) {
55
+ const _saveProductBackInStockRemind = (
56
+ await import("../../__api/mutations/saveProductBackInStockRemind")
57
+ ).default;
58
+ return await _saveProductBackInStockRemind(params);
59
+ }
60
+
61
+ export async function searchProducts(params: SearchProductsQueryParams) {
62
+ const _searchProducts = (await import("../../__api/queries/searchProducts"))
63
+ .default;
64
+ const response = await _searchProducts(
65
+ params,
66
+ await getSearchProductFields()
67
+ );
68
+ const products = response.data?.results.map(simpleToProduct);
69
+
70
+ products?.forEach((p) =>
71
+ initIkasProduct(p, IkasStorefrontConfig.getCurrentLocale())
72
+ );
73
+
74
+ return new APIResponse({
75
+ ...response.data,
76
+ data: products,
77
+ });
78
+ }
79
+
80
+ export async function getProductFilterData(
81
+ params: GetProductFilterDataQueryParams
82
+ ) {
83
+ const _getProductFilterData = (
84
+ await import("../../__api/queries/getProductFilterData")
85
+ ).default;
86
+ const response = await _getProductFilterData(params);
87
+ const filters: IkasProductFilter[] = response.data?.filters as any;
88
+
89
+ const categories: IkasFilterCategory[] | null =
90
+ (response.data?.categories as any) || null;
91
+
92
+ return new APIResponse(
93
+ response.data
94
+ ? {
95
+ filters,
96
+ categories,
97
+ }
98
+ : null,
99
+ response.graphQLErrors
100
+ );
101
+ }
102
+
103
+ export async function getRelatedProducts(
104
+ params: GetRelatedProductsQueryParams
105
+ ) {
106
+ const _getRelatedProducts = (
107
+ await import("../../__api/queries/getRelatedProducts")
108
+ ).default;
109
+ const response = await _getRelatedProducts(params);
110
+ const products = response.data.getRelatedProducts.map((d: SearchProduct) =>
111
+ simpleToProduct(d)
112
+ ) as IkasProduct[];
113
+
114
+ products.forEach((p) =>
115
+ initIkasProduct(p, IkasStorefrontConfig.getCurrentLocale())
116
+ );
117
+
118
+ return new APIResponse(
119
+ response.data
120
+ ? {
121
+ data: products,
122
+ count: response.data.getRelatedProducts.length,
123
+ facets: null,
124
+ limit: 20,
125
+ page: 1,
126
+ totalCount: response.data.getRelatedProducts.length,
127
+ }
128
+ : null,
129
+ response.graphQLErrors
130
+ );
131
+ }
132
+
133
+ export async function listProductAttribute(
134
+ params: ListProductAttributeQueryParams
135
+ ) {
136
+ const _listProductAttribute = (
137
+ await import("../../__api/queries/listProductAttribute")
138
+ ).default;
139
+ const response = await _listProductAttribute(params);
140
+ const data: IkasProductAttribute[] | undefined = response.data as any;
141
+
142
+ data?.forEach((pa) =>
143
+ initIkasProductAttribute(pa, IkasStorefrontConfig.getCurrentLocale())
144
+ );
145
+
146
+ return new APIResponse(data, response.graphQLErrors);
147
+ }
148
+
149
+ export async function getProductCampaigns(
150
+ params: GetProductCampaignsQueryParams
151
+ ) {
152
+ const _getProductCampaigns = (
153
+ await import("../../__api/queries/getProductCampaigns")
154
+ ).default;
155
+ const response = await _getProductCampaigns(params);
156
+ return new APIResponse(
157
+ response.data?.map((d) => d as unknown as IkasProductCampaign),
158
+ response.graphQLErrors
159
+ );
160
+ }
161
+
162
+ export async function getOrderLineFile(params: GetOrderLineFileQueryParams) {
163
+ const _getOrderLineFile = (
164
+ await import("../../__api/mutations/getOrderLineFile")
165
+ ).default;
166
+ return await _getOrderLineFile(params);
167
+ }
168
+
169
+ export async function listProductOptionSet(
170
+ params: ListProductOptionSetQueryParams
171
+ ) {
172
+ const _listProductOptionSet = (
173
+ await import("../../__api/queries/listProductOptionSet")
174
+ ).default;
175
+ const response = await _listProductOptionSet(params);
176
+ const data: IkasProductOptionSet[] | undefined = response.data as any;
177
+
178
+ data?.forEach((pos) =>
179
+ initIkasProductOptionSet(pos, IkasStorefrontConfig.getCurrentLocale())
180
+ );
181
+
182
+ return new APIResponse(data, response.graphQLErrors);
183
+ }
184
+
185
+ async function getSearchProductFields() {
186
+ const SearchProductsResponseField = (
187
+ await import("../../__api/queries/searchProducts")
188
+ ).ResponseField;
189
+ type SearchResponseFieldKey = keyof typeof SearchProductsResponseField;
190
+ const EXCLUDED_SEARCH_PRODUCTS_FIELDS: SearchResponseFieldKey[] = ["DATA"];
191
+
192
+ return Object.entries(SearchProductsResponseField)
193
+ .filter(
194
+ ([key]) =>
195
+ !EXCLUDED_SEARCH_PRODUCTS_FIELDS.includes(key as SearchResponseFieldKey)
196
+ )
197
+ .map((entry) => entry[1]);
198
+ }
199
+
200
+ function simpleToProduct(simple: SearchProduct): IkasProduct {
201
+ const isLocal = process.env.NEXT_PUBLIC_ENV === "local";
202
+
203
+ return {
204
+ id: simple.id,
205
+ type: simple.type as any,
206
+ attributes:
207
+ simple.attributes?.map((a) => ({
208
+ ...a,
209
+ value: a.value,
210
+ productAttributeId: a.productAttribute?.id || null,
211
+ productAttributeOptionId: a.productAttributeOption?.id || null,
212
+ productAttribute: {
213
+ id: a.productAttribute?.id || "",
214
+ name: a.productAttribute?.name || "",
215
+ description: null,
216
+ type: a.productAttribute?.type as unknown as IkasProductAttributeType,
217
+ tableTemplate: a.productAttribute?.tableTemplate
218
+ ? a.productAttribute.tableTemplate
219
+ : null,
220
+ options: null,
221
+ },
222
+ productAttributeOption: a.productAttributeOption,
223
+ })) || [],
224
+ brand: simple.brand
225
+ ? {
226
+ ...simple.brand,
227
+ id: simple.brand.id,
228
+ name: simple.brand.name,
229
+ createdAt: 0,
230
+ updatedAt: 0,
231
+ description: null,
232
+ imageId: null,
233
+ orderType: IkasBrandOrderType.BEST_SELLER,
234
+ metaData: {
235
+ id: "",
236
+ createdAt: 0,
237
+ updatedAt: 0,
238
+ slug: simple.brand.slug || "",
239
+ },
240
+ }
241
+ : null,
242
+ categories:
243
+ simple.categories?.map((c) => ({
244
+ ...c,
245
+ categoryPath: null,
246
+ description: null,
247
+ imageId: null,
248
+ parentId: null,
249
+ metaData: null,
250
+ categoryPathItems: [],
251
+ createdAt: 0,
252
+ updatedAt: 0,
253
+ orderType: IkasCategoryProductsOrderType.BEST_SELLER,
254
+ })) || [],
255
+ tags: simple.tags || [],
256
+ description: simple.description || "",
257
+ metaData:
258
+ {
259
+ ...simple.metaData,
260
+ id: "",
261
+ createdAt: 0,
262
+ updatedAt: 0,
263
+ slug: simple.metaData?.slug || "",
264
+ } || null,
265
+ name: simple.name,
266
+ shortDescription: simple.shortDescription || "",
267
+ productOptionSetId: simple.productOptionSetId,
268
+ variantTypes: simple.productVariantTypes.map((pvt) => ({
269
+ variantType: {
270
+ id: pvt.variantType.id,
271
+ name: pvt.variantType.name,
272
+ selectionType: pvt.variantType.selectionType as any,
273
+ values: pvt.variantType.values
274
+ .map((v) => ({
275
+ id: v.id,
276
+ colorCode: v.colorCode,
277
+ name: v.name,
278
+ thumbnailImageId: v.thumbnailImageId,
279
+ variantTypeId: pvt.variantType.id,
280
+ }))
281
+ .filter((v) => pvt.variantValueIds.includes(v.id)),
282
+ },
283
+ variantValueIds: pvt.variantValueIds,
284
+ })),
285
+ variants: simple.variants.map((v) => ({
286
+ ...v,
287
+ id: v.id,
288
+ productId: simple.id,
289
+ images:
290
+ v.images?.map((i) => ({
291
+ imageId: i.id,
292
+ isMain: i.isMain || false,
293
+ isVideo: i.isVideo,
294
+ order: i.order,
295
+ })) || null,
296
+ sellIfOutOfStock: v.sellIfOutOfStock || false,
297
+ attributes:
298
+ v.attributes?.map((a) => ({
299
+ ...a,
300
+ value: a.value,
301
+ productAttributeId: a.productAttribute?.id || null,
302
+ productAttributeOptionId: a.productAttributeOption?.id || null,
303
+ productAttribute: {
304
+ id: a.productAttribute?.id || "",
305
+ name: a.productAttribute?.name || "",
306
+ description: "",
307
+ type: a.productAttribute
308
+ ?.type as unknown as IkasProductAttributeType,
309
+ tableTemplate: a.productAttribute?.tableTemplate
310
+ ? a.productAttribute.tableTemplate
311
+ : null,
312
+ options: null,
313
+ },
314
+ productAttributeOption: a.productAttributeOption,
315
+ })) || [],
316
+ sku: v.sku,
317
+ barcodeList: v.barcodeList || null,
318
+ price: v.prices?.find((p) =>
319
+ IkasStorefrontConfig.getPriceListId()
320
+ ? p.priceListId === IkasStorefrontConfig.getPriceListId()
321
+ : p.priceListId === null
322
+ ) as unknown as IkasProductPrice,
323
+ stock:
324
+ v.stocks
325
+ ?.filter(
326
+ (s) =>
327
+ isLocal ||
328
+ IkasStorefrontConfig.getIsEditor() ||
329
+ IkasStorefrontConfig.getStockLocationIds()?.includes(
330
+ s.stockLocationId
331
+ )
332
+ )
333
+ .reduce((total, current) => current.stockCount + total, 0) || 0,
334
+ variantValues:
335
+ v.variantValues?.map((vv) => {
336
+ const pvt = simple.productVariantTypes.find(
337
+ (pvt) => pvt.variantType.id === vv.variantTypeId
338
+ );
339
+ const variantValue = pvt?.variantType.values.find(
340
+ (_vv) => _vv.id === vv.variantValueId
341
+ );
342
+
343
+ return {
344
+ id: vv.variantValueId,
345
+ name: variantValue?.name || "",
346
+ colorCode: variantValue?.colorCode || "",
347
+ thumbnailImageId: variantValue?.thumbnailImageId || "",
348
+ variantTypeId: pvt?.variantType.id || "",
349
+ };
350
+ }) || [],
351
+ isActive: v.isActive || false,
352
+ })),
353
+ };
354
+ }
@@ -0,0 +1,80 @@
1
+ import { APIResponse } from "@ikas/fe-api-client";
2
+ import {
3
+ IkasRaffle,
4
+ IkasRaffleMetaData,
5
+ IkasRaffleParticipant,
6
+ initIkasRaffle,
7
+ } from "@ikas/storefront-models";
8
+ import { IkasStorefrontConfig } from "@ikas/storefront-config";
9
+
10
+ import { QueryParams as ListRaffleQueryParams } from "../../__api/queries/listRaffle";
11
+ import { QueryParams as SaveRaffleParticipantQueryParams } from "../../__api/mutations/saveRaffleParticipant";
12
+ import { QueryParams as ListRaffleMetadataQueryParams } from "../../__api/queries/listRaffleMetadata";
13
+ import { QueryParams as GetRafflesByCustomerIdQueryParams } from "../../__api/queries/getRafflesByCustomerId";
14
+
15
+ export type {
16
+ ListRaffleQueryParams,
17
+ SaveRaffleParticipantQueryParams,
18
+ ListRaffleMetadataQueryParams,
19
+ GetRafflesByCustomerIdQueryParams,
20
+ };
21
+
22
+ export async function listRaffle(params: ListRaffleQueryParams) {
23
+ const _listRaffle = (await import("../../__api/queries/listRaffle")).default;
24
+ const response = await _listRaffle(params);
25
+ const data: IkasRaffle[] | undefined = response.data as any;
26
+
27
+ data?.forEach((r) =>
28
+ initIkasRaffle(r, IkasStorefrontConfig.getCurrentLocale())
29
+ );
30
+
31
+ return new APIResponse(
32
+ {
33
+ ...response.data,
34
+ data: data,
35
+ },
36
+ response.graphQLErrors
37
+ );
38
+ }
39
+
40
+ export async function saveRaffleParticipant(
41
+ params: SaveRaffleParticipantQueryParams
42
+ ) {
43
+ const _saveRaffleParticipant = (
44
+ await import("../../__api/mutations/saveRaffleParticipant")
45
+ ).default;
46
+ const response = await _saveRaffleParticipant(params);
47
+ return new APIResponse(
48
+ response.data ? (response.data as IkasRaffleParticipant) : null,
49
+ response.graphQLErrors
50
+ );
51
+ }
52
+
53
+ export async function listRaffleMetaData(
54
+ params: ListRaffleMetadataQueryParams
55
+ ) {
56
+ const _listRaffleMetadata = (
57
+ await import("../../__api/queries/listRaffleMetadata")
58
+ ).default;
59
+ const response = await _listRaffleMetadata(params);
60
+ return new APIResponse(
61
+ response.data?.map((d) => d as IkasRaffleMetaData),
62
+ response.graphQLErrors
63
+ );
64
+ }
65
+
66
+ export async function getRafflesByCustomerId(
67
+ params: GetRafflesByCustomerIdQueryParams
68
+ ) {
69
+ const _getRafflesByCustomerId = (
70
+ await import("../../__api/queries/getRafflesByCustomerId")
71
+ ).default;
72
+ const response = await _getRafflesByCustomerId(params);
73
+ const data: IkasRaffle[] | undefined = response.data as any;
74
+
75
+ data?.forEach((r) =>
76
+ initIkasRaffle(r, IkasStorefrontConfig.getCurrentLocale())
77
+ );
78
+
79
+ return new APIResponse(data, response.graphQLErrors);
80
+ }
@@ -0,0 +1,30 @@
1
+ import { APIResponse } from "@ikas/fe-api-client";
2
+ import {
3
+ IkasCustomerReviewSettings,
4
+ IkasMerchantSettings,
5
+ IkasProductBackInStockSettings,
6
+ IkasSalesChannel,
7
+ IkasStorefront,
8
+ } from "@ikas/storefront-models";
9
+
10
+ export async function getStorefrontSettings() {
11
+ const _getStorefrontSettings = (
12
+ await import("../../__api/queries/getStorefrontSettings")
13
+ ).default;
14
+ const response = await _getStorefrontSettings();
15
+ return new APIResponse(
16
+ response.data as IkasStorefrontSettings | undefined,
17
+ response.graphQLErrors
18
+ );
19
+ }
20
+
21
+ export type IkasStorefrontSettings = {
22
+ storefront: IkasStorefront;
23
+ salesChannel: IkasSalesChannel;
24
+ localizationMap: Record<string, any>;
25
+ domain: string;
26
+ customerReviewSettings: IkasCustomerReviewSettings | null;
27
+ productBackInStockSettings: IkasProductBackInStockSettings | null;
28
+ storefrontJSScripts: string[];
29
+ merchantSettings: IkasMerchantSettings;
30
+ };
package/src/index.ts ADDED
@@ -0,0 +1,68 @@
1
+ import { APIErrorCode, Config } from "@ikas/fe-api-client";
2
+ import { IkasStorefrontConfig } from "@ikas/storefront-config";
3
+
4
+ const onConfigChange = () => {
5
+ Config.URL = IkasStorefrontConfig.getApiUrl() || "";
6
+ Config.HEADERS = {
7
+ "x-api-key": IkasStorefrontConfig.getApiKey() || "",
8
+ "x-sfid": IkasStorefrontConfig.getStorefrontId() || "",
9
+ "x-sfrid": IkasStorefrontConfig.getStorefrontRoutingId() || "",
10
+ "x-sid": IkasStorefrontConfig.getSessionId() || "",
11
+ "x-vid": IkasStorefrontConfig.getVisitorId() || "",
12
+ };
13
+
14
+ if (IkasStorefrontConfig.getCustomerToken()) {
15
+ Config.TOKEN = IkasStorefrontConfig.getCustomerToken() || "";
16
+ }
17
+
18
+ if (IkasStorefrontConfig.getLoginRequiredCallback()) {
19
+ Config.ON_ERROR = {
20
+ errors: [
21
+ {
22
+ errorCode: APIErrorCode.LOGIN_REQUIRED,
23
+ callback: IkasStorefrontConfig.getLoginRequiredCallback()!,
24
+ },
25
+ ],
26
+ };
27
+ }
28
+ };
29
+
30
+ IkasStorefrontConfig.addObserver({
31
+ id: "ikas-storefront-api",
32
+ callback: onConfigChange,
33
+ });
34
+
35
+ export * from "./api/blog";
36
+ export * from "./api/brand";
37
+ export * from "./api/cart";
38
+ export * from "./api/category";
39
+ export * from "./api/checkout";
40
+ export * from "./api/customer";
41
+ export * from "./api/file-upload";
42
+ export * from "./api/html-meta-data";
43
+ export * from "./api/location";
44
+ export * from "./api/masterpass";
45
+ export * from "./api/merchant";
46
+ export * from "./api/product";
47
+ export * from "./api/raffle";
48
+ export * from "./api/storefront";
49
+
50
+ export { SaveMyCustomerInput } from "./__api/models/SaveMyCustomerInput";
51
+ export { SaveCartInput } from "./__api/models/SaveCartInput";
52
+ export { CheckStocksLineInput } from "./__api/models/CheckStocksLineInput";
53
+ export {
54
+ SortByDirectionEnum,
55
+ SortByTypeEnum,
56
+ MasterPassOperationTypeEnum,
57
+ } from "./__api/types";
58
+ export type {
59
+ SearchInputOrderByInput,
60
+ CreateStripePaymentIntentResponse,
61
+ RetrieveInstallmentInfoResponse,
62
+ TransactionResponse,
63
+ UpdateCartCampaignOfferInput,
64
+ CartLineOptionInput,
65
+ } from "./__api/types";
66
+
67
+ export { APIResponse } from "@ikas/fe-api-client";
68
+ export { Config as IkasAPIClientConfig };