@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.
- package/package.json +42 -0
- package/src/__api/models/AbandonedCartFlow.ts +34 -0
- package/src/__api/models/AbandonedCartFlowCustomerFilter.ts +25 -0
- package/src/__api/models/AddItemToCartInput.ts +29 -0
- package/src/__api/models/AdditionalPrice.ts +24 -0
- package/src/__api/models/ApplicableProductFilterValue.ts +23 -0
- package/src/__api/models/AppliedProduct.ts +15 -0
- package/src/__api/models/AppliedProductInput.ts +15 -0
- package/src/__api/models/AvailableShippingMethod.ts +24 -0
- package/src/__api/models/Blog.ts +55 -0
- package/src/__api/models/BlogCategory.ts +23 -0
- package/src/__api/models/BlogCategoryPaginationResponse.ts +24 -0
- package/src/__api/models/BlogContent.ts +20 -0
- package/src/__api/models/BlogMetadata.ts +32 -0
- package/src/__api/models/BlogMetadataPaginationResponse.ts +24 -0
- package/src/__api/models/BlogMetadataTargetTypeEnumFilter.ts +22 -0
- package/src/__api/models/BlogPaginationResponse.ts +23 -0
- package/src/__api/models/BlogTag.ts +16 -0
- package/src/__api/models/BlogWriter.ts +15 -0
- package/src/__api/models/BooleanFilterInput.ts +13 -0
- package/src/__api/models/BuyX.ts +20 -0
- package/src/__api/models/BuyXThenGetY.ts +22 -0
- package/src/__api/models/Campaign.ts +75 -0
- package/src/__api/models/CampaignDateRangeField.ts +16 -0
- package/src/__api/models/CampaignFilter.ts +16 -0
- package/src/__api/models/CampaignMinMaxRangeField.ts +16 -0
- package/src/__api/models/CampaignOffer.ts +50 -0
- package/src/__api/models/CampaignOfferProduct.ts +49 -0
- package/src/__api/models/CampaignOfferProductTranslation.ts +19 -0
- package/src/__api/models/CampaignOfferTriggerSettings.ts +19 -0
- package/src/__api/models/Cart.ts +61 -0
- package/src/__api/models/CartCampaignOffer.ts +31 -0
- package/src/__api/models/CartLineItemInput.ts +20 -0
- package/src/__api/models/CartLineOptionInput.ts +17 -0
- package/src/__api/models/CartLineVariantInput.ts +15 -0
- package/src/__api/models/CartStorefrontRouting.ts +28 -0
- package/src/__api/models/CartStorefrontRoutingDynamicCurrencySettings.ts +19 -0
- package/src/__api/models/CartV2.ts +159 -0
- package/src/__api/models/CartV2CampaignOffer.ts +36 -0
- package/src/__api/models/Category.ts +58 -0
- package/src/__api/models/CategoryCondition.ts +17 -0
- package/src/__api/models/CategoryFilterInput.ts +15 -0
- package/src/__api/models/CategoryPaginationResponse.ts +24 -0
- package/src/__api/models/CategoryPathFilterInput.ts +14 -0
- package/src/__api/models/CategoryPathItem.ts +33 -0
- package/src/__api/models/CategoryTranslation.ts +17 -0
- package/src/__api/models/CheckStocksLineInput.ts +17 -0
- package/src/__api/models/CheckStocksLineResponse.ts +18 -0
- package/src/__api/models/CheckStocksResponse.ts +16 -0
- package/src/__api/models/Checkout.ts +102 -0
- package/src/__api/models/CheckoutCustomer.ts +39 -0
- package/src/__api/models/CheckoutCustomerInput.ts +25 -0
- package/src/__api/models/CheckoutOption.ts +15 -0
- package/src/__api/models/CheckoutSettings.ts +62 -0
- package/src/__api/models/CheckoutSettingsPrice.ts +15 -0
- package/src/__api/models/City.ts +29 -0
- package/src/__api/models/Country.ts +41 -0
- package/src/__api/models/CreateCustomerEmailSubscriptionInput.ts +22 -0
- package/src/__api/models/CreateCustomerReviewInput.ts +38 -0
- package/src/__api/models/CreateSaleTransactionMasterPassPaymentMethodDetail.ts +19 -0
- package/src/__api/models/CreateSaleTransactionWithCartInput.ts +29 -0
- package/src/__api/models/CreateSaleTransactionWithCheckoutInput.ts +29 -0
- package/src/__api/models/CreateStripePaymentIntentResponse.ts +21 -0
- package/src/__api/models/CurrencyRate.ts +23 -0
- package/src/__api/models/CurrencyRateData.ts +15 -0
- package/src/__api/models/Customer.ts +81 -0
- package/src/__api/models/CustomerAddress.ts +64 -0
- package/src/__api/models/CustomerAddressCity.ts +17 -0
- package/src/__api/models/CustomerAddressCityInput.ts +18 -0
- package/src/__api/models/CustomerAddressCountry.ts +22 -0
- package/src/__api/models/CustomerAddressCountryInput.ts +23 -0
- package/src/__api/models/CustomerAddressDistrict.ts +18 -0
- package/src/__api/models/CustomerAddressDistrictInput.ts +19 -0
- package/src/__api/models/CustomerAddressState.ts +17 -0
- package/src/__api/models/CustomerAddressStateInput.ts +19 -0
- package/src/__api/models/CustomerAttribute.ts +36 -0
- package/src/__api/models/CustomerAttributeOption.ts +17 -0
- package/src/__api/models/CustomerAttributeOptionTranslation.ts +17 -0
- package/src/__api/models/CustomerAttributeSalesChannel.ts +28 -0
- package/src/__api/models/CustomerAttributeTranslation.ts +24 -0
- package/src/__api/models/CustomerAttributeValue.ts +18 -0
- package/src/__api/models/CustomerAttributeValueInput.ts +19 -0
- package/src/__api/models/CustomerCheckResponse.ts +13 -0
- package/src/__api/models/CustomerFavoriteProduct.ts +19 -0
- package/src/__api/models/CustomerLoginResponse.ts +18 -0
- package/src/__api/models/CustomerRefreshTokenResponse.ts +17 -0
- package/src/__api/models/CustomerReview.ts +43 -0
- package/src/__api/models/CustomerReviewSFPaginationResponse.ts +26 -0
- package/src/__api/models/CustomerReviewSummary.ts +25 -0
- package/src/__api/models/CustomerReviewSummaryPaginationResponse.ts +26 -0
- package/src/__api/models/CustomerReviewSummaryStar.ts +17 -0
- package/src/__api/models/DateFilterInput.ts +27 -0
- package/src/__api/models/District.ts +29 -0
- package/src/__api/models/FixedDiscount.ts +28 -0
- package/src/__api/models/GetAvailableStockLocation.ts +25 -0
- package/src/__api/models/GetAvailableStockLocationAddress.ts +36 -0
- package/src/__api/models/GetAvailableStockLocationAddressCity.ts +19 -0
- package/src/__api/models/GetAvailableStockLocationsResponse.ts +18 -0
- package/src/__api/models/GetOrderLineFile.ts +13 -0
- package/src/__api/models/GetProductCampaignsInput.ts +18 -0
- package/src/__api/models/GetProductCampaignsResponse.ts +20 -0
- package/src/__api/models/GetProductOptionFileUrl.ts +18 -0
- package/src/__api/models/GetVariantStockLocation.ts +21 -0
- package/src/__api/models/GetVariantStockLocationListResponse.ts +18 -0
- package/src/__api/models/GetY.ts +26 -0
- package/src/__api/models/HTMLMetaData.ts +44 -0
- package/src/__api/models/HTMLMetaDataOverride.ts +21 -0
- package/src/__api/models/HTMLMetaDataTargetTypeEnumFilter.ts +22 -0
- package/src/__api/models/HTMLMetaDataTranslation.ts +18 -0
- package/src/__api/models/Invoice.ts +26 -0
- package/src/__api/models/ListCustomerReviewInput.ts +14 -0
- package/src/__api/models/LocationTranslations.ts +15 -0
- package/src/__api/models/MasterPassTokenResponse.ts +18 -0
- package/src/__api/models/MerchantAddress.ts +48 -0
- package/src/__api/models/MerchantAddressCity.ts +17 -0
- package/src/__api/models/MerchantAddressCountry.ts +18 -0
- package/src/__api/models/MerchantAddressDistrict.ts +18 -0
- package/src/__api/models/MerchantAddressState.ts +17 -0
- package/src/__api/models/MerchantSettings.ts +32 -0
- package/src/__api/models/MerchantSettingsCurrencyFormat.ts +27 -0
- package/src/__api/models/OrderAddress.ts +53 -0
- package/src/__api/models/OrderAddressCity.ts +17 -0
- package/src/__api/models/OrderAddressCityInput.ts +17 -0
- package/src/__api/models/OrderAddressCountry.ts +21 -0
- package/src/__api/models/OrderAddressCountryInput.ts +22 -0
- package/src/__api/models/OrderAddressDistrict.ts +17 -0
- package/src/__api/models/OrderAddressDistrictInput.ts +19 -0
- package/src/__api/models/OrderAddressInput.ts +53 -0
- package/src/__api/models/OrderAddressState.ts +17 -0
- package/src/__api/models/OrderAddressStateInput.ts +18 -0
- package/src/__api/models/OrderAdjustment.ts +35 -0
- package/src/__api/models/OrderAdjustmentAppliedOrderLine.ts +24 -0
- package/src/__api/models/OrderAdjustmentInput.ts +26 -0
- package/src/__api/models/OrderCurrencyRate.ts +17 -0
- package/src/__api/models/OrderCustomer.ts +34 -0
- package/src/__api/models/OrderGiftPackageLine.ts +18 -0
- package/src/__api/models/OrderLineDiscount.ts +28 -0
- package/src/__api/models/OrderLineItem.ts +59 -0
- package/src/__api/models/OrderLineOption.ts +25 -0
- package/src/__api/models/OrderLineOptionValue.ts +18 -0
- package/src/__api/models/OrderLineVariant.ts +56 -0
- package/src/__api/models/OrderLineVariantBrand.ts +15 -0
- package/src/__api/models/OrderLineVariantCategory.ts +21 -0
- package/src/__api/models/OrderLineVariantCategoryPath.ts +17 -0
- package/src/__api/models/OrderLineVariantPrice.ts +27 -0
- package/src/__api/models/OrderLineVariantVariantValues.ts +23 -0
- package/src/__api/models/OrderPackage.ts +33 -0
- package/src/__api/models/OrderPaymentMethod.ts +22 -0
- package/src/__api/models/OrderRefundOrderLineInput.ts +17 -0
- package/src/__api/models/OrderRefundRequestInput.ts +21 -0
- package/src/__api/models/OrderRefundSettings.ts +28 -0
- package/src/__api/models/OrderShippingLine.ts +34 -0
- package/src/__api/models/OrderStorefrontRouting.ts +29 -0
- package/src/__api/models/OrderStorefrontRoutingDynamicCurrencySettings.ts +19 -0
- package/src/__api/models/OrderTaxLine.ts +15 -0
- package/src/__api/models/PaginationInput.ts +17 -0
- package/src/__api/models/PaymentGateway.ts +61 -0
- package/src/__api/models/PaymentGatewayPaymentMethod.ts +17 -0
- package/src/__api/models/PaymentGatewaySettings.ts +21 -0
- package/src/__api/models/PaymentGatewayTranslation.ts +19 -0
- package/src/__api/models/PaymentMethodDetailInput.ts +26 -0
- package/src/__api/models/Product.ts +69 -0
- package/src/__api/models/ProductAttribute.ts +36 -0
- package/src/__api/models/ProductAttributeOption.ts +17 -0
- package/src/__api/models/ProductAttributeOptionTranslation.ts +17 -0
- package/src/__api/models/ProductAttributeTableCellData.ts +17 -0
- package/src/__api/models/ProductAttributeTableTemplate.ts +22 -0
- package/src/__api/models/ProductAttributeTranslation.ts +24 -0
- package/src/__api/models/ProductAttributeValue.ts +19 -0
- package/src/__api/models/ProductBackInStockRemind.ts +25 -0
- package/src/__api/models/ProductBackInStockRemindInput.ts +19 -0
- package/src/__api/models/ProductBrand.ts +33 -0
- package/src/__api/models/ProductBrandPaginationResponse.ts +24 -0
- package/src/__api/models/ProductBrandTranslation.ts +18 -0
- package/src/__api/models/ProductFacetCount.ts +18 -0
- package/src/__api/models/ProductFacetCountValue.ts +16 -0
- package/src/__api/models/ProductFilterData.ts +21 -0
- package/src/__api/models/ProductFilterDataFilter.ts +49 -0
- package/src/__api/models/ProductFilterSettings.ts +25 -0
- package/src/__api/models/ProductImage.ts +20 -0
- package/src/__api/models/ProductItem.ts +18 -0
- package/src/__api/models/ProductItemInput.ts +18 -0
- package/src/__api/models/ProductLastViewed.ts +21 -0
- package/src/__api/models/ProductLastViewedInput.ts +22 -0
- package/src/__api/models/ProductOption.ts +62 -0
- package/src/__api/models/ProductOptionDateSettings.ts +29 -0
- package/src/__api/models/ProductOptionFileSettings.ts +25 -0
- package/src/__api/models/ProductOptionSelectSettings.ts +31 -0
- package/src/__api/models/ProductOptionSelectValue.ts +33 -0
- package/src/__api/models/ProductOptionSelectValueOtherPrice.ts +17 -0
- package/src/__api/models/ProductOptionSelectValueTranslations.ts +17 -0
- package/src/__api/models/ProductOptionSet.ts +26 -0
- package/src/__api/models/ProductOptionSetTranslations.ts +20 -0
- package/src/__api/models/ProductOptionTextSettings.ts +17 -0
- package/src/__api/models/ProductOptionTranslations.ts +24 -0
- package/src/__api/models/ProductPaginationResponse.ts +24 -0
- package/src/__api/models/ProductPrice.ts +27 -0
- package/src/__api/models/ProductSearchResponse.ts +31 -0
- package/src/__api/models/ProductStockLocation.ts +22 -0
- package/src/__api/models/ProductTagTranslation.ts +17 -0
- package/src/__api/models/ProductTranslation.ts +17 -0
- package/src/__api/models/ProductVariantType.ts +17 -0
- package/src/__api/models/Raffle.ts +49 -0
- package/src/__api/models/RaffleDateRangeField.ts +15 -0
- package/src/__api/models/RaffleMetadata.ts +32 -0
- package/src/__api/models/RaffleMetadataTargetTypeEnumFilter.ts +22 -0
- package/src/__api/models/RafflePaginationResponse.ts +23 -0
- package/src/__api/models/RaffleParticipants.ts +52 -0
- package/src/__api/models/RaffleParticipantsInput.ts +32 -0
- package/src/__api/models/RaffleParticipantsUpdateInput.ts +24 -0
- package/src/__api/models/RaffleVariantInformation.ts +16 -0
- package/src/__api/models/RetrieveInstallmentInfoInput.ts +19 -0
- package/src/__api/models/RetrieveInstallmentInfoResponse.ts +36 -0
- package/src/__api/models/SaveCartInput.ts +50 -0
- package/src/__api/models/SaveCheckoutInput.ts +56 -0
- package/src/__api/models/SaveItemToCartInput.ts +35 -0
- package/src/__api/models/SaveMyCustomerAddressInput.ts +63 -0
- package/src/__api/models/SaveMyCustomerInput.ts +30 -0
- package/src/__api/models/SearchCategory.ts +27 -0
- package/src/__api/models/SearchCategoryPath.ts +22 -0
- package/src/__api/models/SearchDynamicCurrencySettings.ts +17 -0
- package/src/__api/models/SearchHTMLMetaData.ts +36 -0
- package/src/__api/models/SearchHTMLMetaDataOverride.ts +23 -0
- package/src/__api/models/SearchInput.ts +64 -0
- package/src/__api/models/SearchInputFacetListInput.ts +20 -0
- package/src/__api/models/SearchInputFilterListInput.ts +27 -0
- package/src/__api/models/SearchInputOrderByInput.ts +17 -0
- package/src/__api/models/SearchProduct.ts +72 -0
- package/src/__api/models/SearchProductAttribute.ts +28 -0
- package/src/__api/models/SearchProductAttributeOption.ts +17 -0
- package/src/__api/models/SearchProductAttributeTableCellData.ts +17 -0
- package/src/__api/models/SearchProductAttributeTableTemplate.ts +22 -0
- package/src/__api/models/SearchProductAttributeValue.ts +27 -0
- package/src/__api/models/SearchProductBrand.ts +22 -0
- package/src/__api/models/SearchProductImage.ts +21 -0
- package/src/__api/models/SearchProductPrice.ts +27 -0
- package/src/__api/models/SearchProductStockLocation.ts +17 -0
- package/src/__api/models/SearchProductTag.ts +20 -0
- package/src/__api/models/SearchProductVariantType.ts +21 -0
- package/src/__api/models/SearchVariant.ts +58 -0
- package/src/__api/models/SearchVariantType.ts +27 -0
- package/src/__api/models/SearchVariantValue.ts +19 -0
- package/src/__api/models/SearchVariationValueRelation.ts +17 -0
- package/src/__api/models/SocialLoginSettings.ts +18 -0
- package/src/__api/models/State.ts +20 -0
- package/src/__api/models/StockLocation.ts +36 -0
- package/src/__api/models/StockLocationAddress.ts +35 -0
- package/src/__api/models/StockLocationAddressCity.ts +18 -0
- package/src/__api/models/StockLocationAddressCountry.ts +19 -0
- package/src/__api/models/StockLocationAddressDistrict.ts +19 -0
- package/src/__api/models/StockLocationAddressState.ts +19 -0
- package/src/__api/models/Storefront.ts +66 -0
- package/src/__api/models/StorefrontDomain.ts +25 -0
- package/src/__api/models/StorefrontDynamicCurrencySettings.ts +17 -0
- package/src/__api/models/StorefrontLocalization.ts +21 -0
- package/src/__api/models/StorefrontOrder.ts +116 -0
- package/src/__api/models/StorefrontRouting.ts +29 -0
- package/src/__api/models/StorefrontTheme.ts +25 -0
- package/src/__api/models/StorefrontTransaction.ts +53 -0
- package/src/__api/models/StringFilterInput.ts +21 -0
- package/src/__api/models/Town.ts +21 -0
- package/src/__api/models/TrackingInfo.ts +24 -0
- package/src/__api/models/TransactionError.ts +17 -0
- package/src/__api/models/TransactionInstallmentPrice.ts +36 -0
- package/src/__api/models/TransactionPaymentMethodDetail.ts +39 -0
- package/src/__api/models/TransactionResponse.ts +26 -0
- package/src/__api/models/UpdateCartCampaignOfferInput.ts +25 -0
- package/src/__api/models/Variant.ts +58 -0
- package/src/__api/models/VariantStock.ts +15 -0
- package/src/__api/models/VariantType.ts +29 -0
- package/src/__api/models/VariantTypeTranslation.ts +21 -0
- package/src/__api/models/VariantValue.ts +20 -0
- package/src/__api/models/VariantValueRelation.ts +15 -0
- package/src/__api/models/VariantValueTranslation.ts +16 -0
- package/src/__api/models/_base.ts +26 -0
- package/src/__api/mutations/activateCustomer.ts +38 -0
- package/src/__api/mutations/addCouponCodeToCheckout.ts +259 -0
- package/src/__api/mutations/addItemToCart.ts +284 -0
- package/src/__api/mutations/createCustomerEmailSubscription.ts +111 -0
- package/src/__api/mutations/createCustomerReview.ts +66 -0
- package/src/__api/mutations/createOrderRefundRequest.ts +240 -0
- package/src/__api/mutations/createSaleTransactionWithCart.ts +62 -0
- package/src/__api/mutations/createSaleTransactionWithCheckout.ts +62 -0
- package/src/__api/mutations/createStripePaymentIntent.ts +57 -0
- package/src/__api/mutations/customerForgotPassword.ts +41 -0
- package/src/__api/mutations/customerLogin.ts +113 -0
- package/src/__api/mutations/customerRecoverPassword.ts +44 -0
- package/src/__api/mutations/customerRefreshToken.ts +52 -0
- package/src/__api/mutations/deleteRaffleParticipantsList.ts +38 -0
- package/src/__api/mutations/getOrderLineFile.ts +39 -0
- package/src/__api/mutations/registerCustomer.ts +131 -0
- package/src/__api/mutations/retrieveInstallmentInfo.ts +65 -0
- package/src/__api/mutations/saveCart.ts +284 -0
- package/src/__api/mutations/saveCartCouponCode.ts +287 -0
- package/src/__api/mutations/saveCheckout.ts +256 -0
- package/src/__api/mutations/saveFavoriteProduct.ts +41 -0
- package/src/__api/mutations/saveItemToCart.ts +136 -0
- package/src/__api/mutations/saveLastViewedProducts.ts +62 -0
- package/src/__api/mutations/saveMyCustomer.ts +108 -0
- package/src/__api/mutations/saveProductBackInStockRemind.ts +63 -0
- package/src/__api/mutations/saveRaffleParticipant.ts +69 -0
- package/src/__api/mutations/sendContactFormToMerchant.ts +53 -0
- package/src/__api/mutations/updateCartCampaignOffer.ts +284 -0
- package/src/__api/mutations/updateRaffleParticipant.ts +72 -0
- package/src/__api/queries/checkCustomerEmail.ts +54 -0
- package/src/__api/queries/checkStocks.ts +53 -0
- package/src/__api/queries/customerSocialLogin.ts +113 -0
- package/src/__api/queries/getAvailableShippingCountries.ts +41 -0
- package/src/__api/queries/getAvailableStockLocations.ts +75 -0
- package/src/__api/queries/getCart.ts +142 -0
- package/src/__api/queries/getCartById.ts +287 -0
- package/src/__api/queries/getCheckoutByCartId.ts +256 -0
- package/src/__api/queries/getCheckoutById.ts +256 -0
- package/src/__api/queries/getCurrencyRate.ts +56 -0
- package/src/__api/queries/getCustomerOrders.ts +237 -0
- package/src/__api/queries/getLastViewedProducts.ts +62 -0
- package/src/__api/queries/getMasterPassRequestToken.ts +62 -0
- package/src/__api/queries/getMyCountry.ts +26 -0
- package/src/__api/queries/getMyCustomer.ts +95 -0
- package/src/__api/queries/getOrder.ts +237 -0
- package/src/__api/queries/getOrderByEmail.ts +240 -0
- package/src/__api/queries/getProductCampaigns.ts +92 -0
- package/src/__api/queries/getProductFilterData.ts +211 -0
- package/src/__api/queries/getProductOptionFileUrl.ts +59 -0
- package/src/__api/queries/getRaffleParticipants.ts +59 -0
- package/src/__api/queries/getRafflesByCustomerId.ts +74 -0
- package/src/__api/queries/getRelatedProducts.ts +60 -0
- package/src/__api/queries/getStorefront.ts +103 -0
- package/src/__api/queries/getStorefrontSettings.ts +26 -0
- package/src/__api/queries/getVariantStockLocations.ts +74 -0
- package/src/__api/queries/isFavoriteProduct.ts +38 -0
- package/src/__api/queries/listBlog.ts +136 -0
- package/src/__api/queries/listBlogCategory.ts +92 -0
- package/src/__api/queries/listBlogMetadata.ts +90 -0
- package/src/__api/queries/listCampaignOffer.ts +76 -0
- package/src/__api/queries/listCategory.ts +151 -0
- package/src/__api/queries/listCheckoutSettings.ts +75 -0
- package/src/__api/queries/listCity.ts +74 -0
- package/src/__api/queries/listCountry.ts +80 -0
- package/src/__api/queries/listCustomerAttribute.ts +62 -0
- package/src/__api/queries/listCustomerReviewSummary.ts +71 -0
- package/src/__api/queries/listCustomerReviews.ts +90 -0
- package/src/__api/queries/listDistrict.ts +77 -0
- package/src/__api/queries/listFavoriteProducts.ts +44 -0
- package/src/__api/queries/listHTMLMetaData.ts +88 -0
- package/src/__api/queries/listMerchantSettings.ts +90 -0
- package/src/__api/queries/listOrderRefundSettings.ts +73 -0
- package/src/__api/queries/listOrderTransactions.ts +89 -0
- package/src/__api/queries/listPaymentGateway.ts +85 -0
- package/src/__api/queries/listProduct.ts +156 -0
- package/src/__api/queries/listProductAttribute.ts +81 -0
- package/src/__api/queries/listProductBackInStockRemind.ts +79 -0
- package/src/__api/queries/listProductBrand.ts +110 -0
- package/src/__api/queries/listProductOptionSet.ts +105 -0
- package/src/__api/queries/listProductStockLocation.ts +62 -0
- package/src/__api/queries/listRaffle.ts +108 -0
- package/src/__api/queries/listRaffleMetadata.ts +83 -0
- package/src/__api/queries/listState.ts +67 -0
- package/src/__api/queries/listStockLocation.ts +76 -0
- package/src/__api/queries/listTown.ts +67 -0
- package/src/__api/queries/listVariantType.ts +74 -0
- package/src/__api/queries/searchProducts.ts +171 -0
- package/src/__api/types/index.ts +3047 -0
- package/src/api/blog/index.ts +70 -0
- package/src/api/brand/index.ts +27 -0
- package/src/api/cart/index.ts +113 -0
- package/src/api/category/index.ts +25 -0
- package/src/api/checkout/index.ts +121 -0
- package/src/api/customer/index.ts +380 -0
- package/src/api/file-upload/index.ts +38 -0
- package/src/api/html-meta-data/index.ts +25 -0
- package/src/api/location/index.ts +64 -0
- package/src/api/masterpass/index.ts +12 -0
- package/src/api/merchant/index.ts +24 -0
- package/src/api/product/index.ts +354 -0
- package/src/api/raffle/index.ts +80 -0
- package/src/api/storefront/index.ts +30 -0
- package/src/index.ts +68 -0
|
@@ -0,0 +1,380 @@
|
|
|
1
|
+
import { APIResponse } from "@ikas/fe-api-client";
|
|
2
|
+
|
|
3
|
+
import { QueryParams as CustomerLoginQueryParams } from "../../__api/mutations/customerLogin";
|
|
4
|
+
import { QueryParams as CustomerSocialLoginQueryParams } from "../../__api/queries/customerSocialLogin";
|
|
5
|
+
import { QueryParams as RegisterCustomerQueryParams } from "../../__api/mutations/registerCustomer";
|
|
6
|
+
import { QueryParams as CustomerRefreshTokenQueryParams } from "../../__api/mutations/customerRefreshToken";
|
|
7
|
+
import { QueryParams as CustomerForgotPasswordQueryParams } from "../../__api/mutations/customerForgotPassword";
|
|
8
|
+
import { QueryParams as CustomerRecoverPasswordQueryParams } from "../../__api/mutations/customerRecoverPassword";
|
|
9
|
+
import { QueryParams as CheckCustomerEmailQueryParams } from "../../__api/queries/checkCustomerEmail";
|
|
10
|
+
import { QueryParams as SaveMyCustomerQueryParams } from "../../__api/mutations/saveMyCustomer";
|
|
11
|
+
import { QueryParams as GetCustomerOrdersQueryParams } from "../../__api/queries/getCustomerOrders";
|
|
12
|
+
import { QueryParams as GetOrderByEmailQueryParams } from "../../__api/queries/getOrderByEmail";
|
|
13
|
+
import { QueryParams as ListOrderTransactionsQueryParams } from "../../__api/queries/listOrderTransactions";
|
|
14
|
+
import { QueryParams as CreateOrderRefundRequestQueryParams } from "../../__api/mutations/createOrderRefundRequest";
|
|
15
|
+
import { QueryParams as CreateCustomerEmailSubscriptionQueryParams } from "../../__api/mutations/createCustomerEmailSubscription";
|
|
16
|
+
import { QueryParams as GetLastViewedProductsQueryParams } from "../../__api/queries/getLastViewedProducts";
|
|
17
|
+
import { QueryParams as SaveLastViewedProductsQueryParams } from "../../__api/mutations/saveLastViewedProducts";
|
|
18
|
+
import { QueryParams as ListOrderRefundSettingsQueryParams } from "../../__api/queries/listOrderRefundSettings";
|
|
19
|
+
import { QueryParams as SendContactFormToMerchantQueryParams } from "../../__api/mutations/sendContactFormToMerchant";
|
|
20
|
+
import { QueryParams as SaveFavoriteProductQueryParams } from "../../__api/mutations/saveFavoriteProduct";
|
|
21
|
+
import { QueryParams as IsFavoriteProductQueryParams } from "../../__api/queries/isFavoriteProduct";
|
|
22
|
+
import { QueryParams as CreateCustomerReviewQueryParams } from "../../__api/mutations/createCustomerReview";
|
|
23
|
+
import { QueryParams as ListCustomerReviewsQueryParams } from "../../__api/queries/listCustomerReviews";
|
|
24
|
+
import { QueryParams as ListCustomerReviewSummaryQueryParams } from "../../__api/queries/listCustomerReviewSummary";
|
|
25
|
+
|
|
26
|
+
import {
|
|
27
|
+
IkasCustomer,
|
|
28
|
+
IkasCustomerAttribute,
|
|
29
|
+
IkasCustomerReview,
|
|
30
|
+
IkasCustomerReviewSummary,
|
|
31
|
+
IkasFavoriteProduct,
|
|
32
|
+
IkasLastViewedProduct,
|
|
33
|
+
IkasOrder,
|
|
34
|
+
IkasOrderRefundSettings,
|
|
35
|
+
IkasOrderTransaction,
|
|
36
|
+
initIkasCustomerAttribute,
|
|
37
|
+
initIkasCustomerReview,
|
|
38
|
+
} from "@ikas/storefront-models";
|
|
39
|
+
import { IkasStorefrontConfig } from "@ikas/storefront-config";
|
|
40
|
+
|
|
41
|
+
export type {
|
|
42
|
+
CustomerLoginQueryParams,
|
|
43
|
+
CustomerSocialLoginQueryParams,
|
|
44
|
+
RegisterCustomerQueryParams,
|
|
45
|
+
CustomerRefreshTokenQueryParams,
|
|
46
|
+
CustomerForgotPasswordQueryParams,
|
|
47
|
+
CustomerRecoverPasswordQueryParams,
|
|
48
|
+
CheckCustomerEmailQueryParams,
|
|
49
|
+
SaveMyCustomerQueryParams,
|
|
50
|
+
GetCustomerOrdersQueryParams,
|
|
51
|
+
GetOrderByEmailQueryParams,
|
|
52
|
+
ListOrderTransactionsQueryParams,
|
|
53
|
+
CreateOrderRefundRequestQueryParams,
|
|
54
|
+
CreateCustomerEmailSubscriptionQueryParams,
|
|
55
|
+
GetLastViewedProductsQueryParams,
|
|
56
|
+
SaveLastViewedProductsQueryParams,
|
|
57
|
+
ListOrderRefundSettingsQueryParams,
|
|
58
|
+
SendContactFormToMerchantQueryParams,
|
|
59
|
+
SaveFavoriteProductQueryParams,
|
|
60
|
+
IsFavoriteProductQueryParams,
|
|
61
|
+
CreateCustomerReviewQueryParams,
|
|
62
|
+
ListCustomerReviewsQueryParams,
|
|
63
|
+
ListCustomerReviewSummaryQueryParams,
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
export async function login(params: CustomerLoginQueryParams) {
|
|
67
|
+
const _customerLogin = (await import("../../__api/mutations/customerLogin"))
|
|
68
|
+
.default;
|
|
69
|
+
const response = await _customerLogin(params);
|
|
70
|
+
const customer: IkasCustomer | null =
|
|
71
|
+
(response.data?.customer as any) || null;
|
|
72
|
+
|
|
73
|
+
return new APIResponse(
|
|
74
|
+
response.data
|
|
75
|
+
? {
|
|
76
|
+
...response.data,
|
|
77
|
+
customer,
|
|
78
|
+
}
|
|
79
|
+
: null,
|
|
80
|
+
response.graphQLErrors
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export async function socialLogin(params: CustomerSocialLoginQueryParams) {
|
|
85
|
+
const _customerSocialLogin = (
|
|
86
|
+
await import("../../__api/queries/customerSocialLogin")
|
|
87
|
+
).default;
|
|
88
|
+
const response = await _customerSocialLogin(params);
|
|
89
|
+
const customer: IkasCustomer | null =
|
|
90
|
+
(response.data?.customer as any) || null;
|
|
91
|
+
|
|
92
|
+
return new APIResponse(
|
|
93
|
+
response.data
|
|
94
|
+
? {
|
|
95
|
+
...response.data,
|
|
96
|
+
customer,
|
|
97
|
+
}
|
|
98
|
+
: null,
|
|
99
|
+
response.graphQLErrors
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export async function register(params: RegisterCustomerQueryParams) {
|
|
104
|
+
const _registerCustomer = (
|
|
105
|
+
await import("../../__api/mutations/registerCustomer")
|
|
106
|
+
).default;
|
|
107
|
+
const response = await _registerCustomer(params);
|
|
108
|
+
const customer: IkasCustomer | null =
|
|
109
|
+
(response.data?.customer as any) || null;
|
|
110
|
+
|
|
111
|
+
return new APIResponse(
|
|
112
|
+
response.data
|
|
113
|
+
? {
|
|
114
|
+
...response.data,
|
|
115
|
+
customer,
|
|
116
|
+
}
|
|
117
|
+
: null,
|
|
118
|
+
response.graphQLErrors
|
|
119
|
+
);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export async function refreshToken(params: CustomerRefreshTokenQueryParams) {
|
|
123
|
+
const _customerRefreshToken = (
|
|
124
|
+
await import("../../__api/mutations/customerRefreshToken")
|
|
125
|
+
).default;
|
|
126
|
+
return await _customerRefreshToken(params);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export async function forgotPassword(
|
|
130
|
+
params: CustomerForgotPasswordQueryParams
|
|
131
|
+
) {
|
|
132
|
+
const _customerForgotPassword = (
|
|
133
|
+
await import("../../__api/mutations/customerForgotPassword")
|
|
134
|
+
).default;
|
|
135
|
+
return await _customerForgotPassword(params);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
export async function recoverPassword(
|
|
139
|
+
params: CustomerRecoverPasswordQueryParams
|
|
140
|
+
) {
|
|
141
|
+
const _customerRecoverPassword = (
|
|
142
|
+
await import("../../__api/mutations/customerRecoverPassword")
|
|
143
|
+
).default;
|
|
144
|
+
return await _customerRecoverPassword(params);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export async function checkEmail(params: CheckCustomerEmailQueryParams) {
|
|
148
|
+
const _checkCustomerEmail = (
|
|
149
|
+
await import("../../__api/queries/checkCustomerEmail")
|
|
150
|
+
).default;
|
|
151
|
+
return await _checkCustomerEmail(params);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
export async function getCustomer() {
|
|
155
|
+
const _getMyCustomer = (await import("../../__api/queries/getMyCustomer"))
|
|
156
|
+
.default;
|
|
157
|
+
const response = await _getMyCustomer();
|
|
158
|
+
const customer: IkasCustomer | null = (response.data as any) || null;
|
|
159
|
+
|
|
160
|
+
return new APIResponse(
|
|
161
|
+
response.data
|
|
162
|
+
? {
|
|
163
|
+
...response.data,
|
|
164
|
+
customer,
|
|
165
|
+
}
|
|
166
|
+
: null,
|
|
167
|
+
response.graphQLErrors
|
|
168
|
+
);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
export async function saveCustomer(params: SaveMyCustomerQueryParams) {
|
|
172
|
+
const _saveMyCustomer = (await import("../../__api/mutations/saveMyCustomer"))
|
|
173
|
+
.default;
|
|
174
|
+
const response = await _saveMyCustomer(params);
|
|
175
|
+
const customer: IkasCustomer | null = (response.data as any) || null;
|
|
176
|
+
|
|
177
|
+
return new APIResponse(
|
|
178
|
+
response.data
|
|
179
|
+
? {
|
|
180
|
+
...response.data,
|
|
181
|
+
customer,
|
|
182
|
+
}
|
|
183
|
+
: null,
|
|
184
|
+
response.graphQLErrors
|
|
185
|
+
);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
export async function getOrders(params: GetCustomerOrdersQueryParams) {
|
|
189
|
+
const _getCustomerOrders = (
|
|
190
|
+
await import("../../__api/queries/getCustomerOrders")
|
|
191
|
+
).default;
|
|
192
|
+
const response = await _getCustomerOrders(params);
|
|
193
|
+
const data: IkasOrder[] | undefined = response.data as any;
|
|
194
|
+
|
|
195
|
+
return new APIResponse(data, response.graphQLErrors);
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
export async function getOrderByEmail(params: GetOrderByEmailQueryParams) {
|
|
199
|
+
const _getOrderByEmail = (await import("../../__api/queries/getOrderByEmail"))
|
|
200
|
+
.default;
|
|
201
|
+
const response = await _getOrderByEmail(params);
|
|
202
|
+
const data: IkasOrder | undefined = response.data as any;
|
|
203
|
+
|
|
204
|
+
return new APIResponse(data, response.graphQLErrors);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
export async function listOrderTransactions(
|
|
208
|
+
params: ListOrderTransactionsQueryParams
|
|
209
|
+
) {
|
|
210
|
+
const _listOrderTransactions = (
|
|
211
|
+
await import("../../__api/queries/listOrderTransactions")
|
|
212
|
+
).default;
|
|
213
|
+
const response = await _listOrderTransactions(params);
|
|
214
|
+
const data: IkasOrderTransaction[] | undefined = response.data as any;
|
|
215
|
+
|
|
216
|
+
return new APIResponse(data, response.graphQLErrors);
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
export async function createOrderRefundRequest(
|
|
220
|
+
params: CreateOrderRefundRequestQueryParams
|
|
221
|
+
) {
|
|
222
|
+
const _createOrderRefundRequest = (
|
|
223
|
+
await import("../../__api/mutations/createOrderRefundRequest")
|
|
224
|
+
).default;
|
|
225
|
+
const response = await _createOrderRefundRequest(params);
|
|
226
|
+
const data: IkasOrder | null = response.data as any;
|
|
227
|
+
|
|
228
|
+
return new APIResponse(data, response.graphQLErrors);
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
export async function createCustomerEmailSubscription(
|
|
232
|
+
params: CreateCustomerEmailSubscriptionQueryParams
|
|
233
|
+
) {
|
|
234
|
+
const _createCustomerEmailSubscription = (
|
|
235
|
+
await import("../../__api/mutations/createCustomerEmailSubscription")
|
|
236
|
+
).default;
|
|
237
|
+
return await _createCustomerEmailSubscription(params);
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
export async function getLastViewedProducts(
|
|
241
|
+
params: GetLastViewedProductsQueryParams
|
|
242
|
+
) {
|
|
243
|
+
const _getLastViewedProducts = (
|
|
244
|
+
await import("../../__api/queries/getLastViewedProducts")
|
|
245
|
+
).default;
|
|
246
|
+
const response = await _getLastViewedProducts(params);
|
|
247
|
+
return new APIResponse(
|
|
248
|
+
response.data?.products as IkasLastViewedProduct[] | undefined,
|
|
249
|
+
response.graphQLErrors
|
|
250
|
+
);
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
export async function saveLastViewedProducts(
|
|
254
|
+
params: SaveLastViewedProductsQueryParams
|
|
255
|
+
) {
|
|
256
|
+
const _saveLastViewedProducts = (
|
|
257
|
+
await import("../../__api/mutations/saveLastViewedProducts")
|
|
258
|
+
).default;
|
|
259
|
+
return await _saveLastViewedProducts(params);
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
export async function listOrderRefundSettings(
|
|
263
|
+
params: ListOrderRefundSettingsQueryParams
|
|
264
|
+
) {
|
|
265
|
+
const _listOrderRefundSettings = (
|
|
266
|
+
await import("../../__api/queries/listOrderRefundSettings")
|
|
267
|
+
).default;
|
|
268
|
+
const response = await _listOrderRefundSettings(params);
|
|
269
|
+
const data: IkasOrderRefundSettings[] | null =
|
|
270
|
+
response.data?.map((d) => ({
|
|
271
|
+
...d,
|
|
272
|
+
})) || null;
|
|
273
|
+
|
|
274
|
+
return new APIResponse(data, response.graphQLErrors);
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
export async function sendContactFormToMerchant(
|
|
278
|
+
params: SendContactFormToMerchantQueryParams
|
|
279
|
+
) {
|
|
280
|
+
const _sendContactFormToMerchant = (
|
|
281
|
+
await import("../../__api/mutations/sendContactFormToMerchant")
|
|
282
|
+
).default;
|
|
283
|
+
return await _sendContactFormToMerchant(params);
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
export async function listFavoriteProducts() {
|
|
287
|
+
const _listFavoriteProducts = (
|
|
288
|
+
await import("../../__api/queries/listFavoriteProducts")
|
|
289
|
+
).default;
|
|
290
|
+
const response = await _listFavoriteProducts();
|
|
291
|
+
const products: IkasFavoriteProduct[] | null = response.data || null;
|
|
292
|
+
|
|
293
|
+
return new APIResponse(products, response.graphQLErrors);
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
export async function saveFavoriteProduct(
|
|
297
|
+
params: SaveFavoriteProductQueryParams
|
|
298
|
+
) {
|
|
299
|
+
const _saveFavoriteProduct = (
|
|
300
|
+
await import("../../__api/mutations/saveFavoriteProduct")
|
|
301
|
+
).default;
|
|
302
|
+
return await _saveFavoriteProduct(params);
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
export async function isFavoriteProduct(params: IsFavoriteProductQueryParams) {
|
|
306
|
+
const _isFavoriteProduct = (
|
|
307
|
+
await import("../../__api/queries/isFavoriteProduct")
|
|
308
|
+
).default;
|
|
309
|
+
return await _isFavoriteProduct({
|
|
310
|
+
productId: params.productId,
|
|
311
|
+
});
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
export async function createCustomerReview(
|
|
315
|
+
params: CreateCustomerReviewQueryParams
|
|
316
|
+
) {
|
|
317
|
+
const _createCustomerReview = (
|
|
318
|
+
await import("../../__api/mutations/createCustomerReview")
|
|
319
|
+
).default;
|
|
320
|
+
const response = await _createCustomerReview(params);
|
|
321
|
+
const data: IkasCustomerReview | undefined = response.data as any;
|
|
322
|
+
|
|
323
|
+
data && initIkasCustomerReview(data);
|
|
324
|
+
|
|
325
|
+
return new APIResponse(data, response.graphQLErrors);
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
export async function listCustomerReviews(
|
|
329
|
+
params: ListCustomerReviewsQueryParams
|
|
330
|
+
) {
|
|
331
|
+
const _listCustomerReviews = (
|
|
332
|
+
await import("../../__api/queries/listCustomerReviews")
|
|
333
|
+
).default;
|
|
334
|
+
const response = await _listCustomerReviews(params);
|
|
335
|
+
const data: IkasCustomerReview[] = (response.data?.data as any) || [];
|
|
336
|
+
|
|
337
|
+
data.forEach(initIkasCustomerReview);
|
|
338
|
+
|
|
339
|
+
return new APIResponse(
|
|
340
|
+
response.data
|
|
341
|
+
? {
|
|
342
|
+
...response.data,
|
|
343
|
+
data,
|
|
344
|
+
}
|
|
345
|
+
: null,
|
|
346
|
+
response.graphQLErrors
|
|
347
|
+
);
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
export async function listCustomerReviewSummary(
|
|
351
|
+
params: ListCustomerReviewSummaryQueryParams
|
|
352
|
+
) {
|
|
353
|
+
const _listCustomerReviewSummary = (
|
|
354
|
+
await import("../../__api/queries/listCustomerReviewSummary")
|
|
355
|
+
).default;
|
|
356
|
+
const response = await _listCustomerReviewSummary(params);
|
|
357
|
+
const data: IkasCustomerReviewSummary[] = response.data?.data || [];
|
|
358
|
+
|
|
359
|
+
return new APIResponse(
|
|
360
|
+
{
|
|
361
|
+
...response.data,
|
|
362
|
+
data,
|
|
363
|
+
},
|
|
364
|
+
response.graphQLErrors
|
|
365
|
+
);
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
export async function listCustomerAttribute() {
|
|
369
|
+
const _listCustomerAttribute = (
|
|
370
|
+
await import("../../__api/queries/listCustomerAttribute")
|
|
371
|
+
).default;
|
|
372
|
+
const response = await _listCustomerAttribute();
|
|
373
|
+
const data: IkasCustomerAttribute[] = (response.data as any) || [];
|
|
374
|
+
|
|
375
|
+
data.forEach((a) =>
|
|
376
|
+
initIkasCustomerAttribute(a, IkasStorefrontConfig.getCurrentLocale())
|
|
377
|
+
);
|
|
378
|
+
|
|
379
|
+
return new APIResponse(data, response.graphQLErrors);
|
|
380
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { IkasProductOption } from "@ikas/storefront-models";
|
|
2
|
+
import { IkasStorefrontConfig } from "@ikas/storefront-config";
|
|
3
|
+
|
|
4
|
+
export async function uploadProductOptionFile(
|
|
5
|
+
file: File,
|
|
6
|
+
option: IkasProductOption
|
|
7
|
+
) {
|
|
8
|
+
const URL = `${IkasStorefrontConfig.getAdminApiUrl()}/upload-product-option-file`;
|
|
9
|
+
const response = await fetch(URL, {
|
|
10
|
+
method: "POST",
|
|
11
|
+
headers: {
|
|
12
|
+
"x-api-key": IkasStorefrontConfig.getApiKey() || "",
|
|
13
|
+
"x-sfid": IkasStorefrontConfig.getStorefrontId() || "",
|
|
14
|
+
"x-sfrid": IkasStorefrontConfig.getStorefrontRoutingId() || "",
|
|
15
|
+
"Content-Type": "application/json",
|
|
16
|
+
Accept: "application/json",
|
|
17
|
+
},
|
|
18
|
+
body: JSON.stringify({
|
|
19
|
+
base64: await getBase64(file),
|
|
20
|
+
fileName: file.name,
|
|
21
|
+
productOptionSetId: option.productOptionSetId,
|
|
22
|
+
productOptionId: option.id,
|
|
23
|
+
}),
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
if (!response.ok) {
|
|
27
|
+
return null;
|
|
28
|
+
}
|
|
29
|
+
return await response.text();
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export function getBase64(file: File): Promise<string | null> {
|
|
33
|
+
return new Promise((resolve) => {
|
|
34
|
+
const reader = new FileReader();
|
|
35
|
+
reader.addEventListener("load", () => resolve(reader.result as string));
|
|
36
|
+
reader.readAsDataURL(file);
|
|
37
|
+
});
|
|
38
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { APIResponse } from "@ikas/fe-api-client";
|
|
2
|
+
|
|
3
|
+
import { QueryParams as ListHTMLMetaDataQueryParams } from "../../__api/queries/listHTMLMetaData";
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
IkasHTMLMetaData,
|
|
7
|
+
initIkasHTMLMetaData,
|
|
8
|
+
} from "@ikas/storefront-models";
|
|
9
|
+
import { IkasStorefrontConfig } from "@ikas/storefront-config";
|
|
10
|
+
|
|
11
|
+
export type { ListHTMLMetaDataQueryParams };
|
|
12
|
+
|
|
13
|
+
export async function listHTMLMetaData(params: ListHTMLMetaDataQueryParams) {
|
|
14
|
+
const _listHTMLMetaData = (
|
|
15
|
+
await import("../../__api/queries/listHTMLMetaData")
|
|
16
|
+
).default;
|
|
17
|
+
const response = await _listHTMLMetaData(params);
|
|
18
|
+
const data: IkasHTMLMetaData[] = (response.data as any) || [];
|
|
19
|
+
|
|
20
|
+
data.forEach((h) =>
|
|
21
|
+
initIkasHTMLMetaData(h, IkasStorefrontConfig.getCurrentLocale())
|
|
22
|
+
);
|
|
23
|
+
|
|
24
|
+
return new APIResponse(data, response.graphQLErrors);
|
|
25
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { APIResponse } from "@ikas/fe-api-client";
|
|
2
|
+
|
|
3
|
+
import { QueryParams as ListCountryQueryParams } from "../../__api/queries/listCountry";
|
|
4
|
+
import { QueryParams as ListCityQueryParams } from "../../__api/queries/listCity";
|
|
5
|
+
import { QueryParams as ListDistrictQueryParams } from "../../__api/queries/listDistrict";
|
|
6
|
+
import { QueryParams as ListStateQueryParams } from "../../__api/queries/listState";
|
|
7
|
+
|
|
8
|
+
import {
|
|
9
|
+
IkasCity,
|
|
10
|
+
IkasCountry,
|
|
11
|
+
IkasDistrict,
|
|
12
|
+
IkasState,
|
|
13
|
+
} from "@ikas/storefront-models";
|
|
14
|
+
|
|
15
|
+
export type {
|
|
16
|
+
ListCountryQueryParams,
|
|
17
|
+
ListCityQueryParams,
|
|
18
|
+
ListDistrictQueryParams,
|
|
19
|
+
ListStateQueryParams,
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export async function getMyCountry() {
|
|
23
|
+
const _getMyCountry = (await import("../../__api/queries/getMyCountry"))
|
|
24
|
+
.default;
|
|
25
|
+
return await _getMyCountry();
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export async function listCountry(params: ListCountryQueryParams) {
|
|
29
|
+
const _listCountry = (await import("../../__api/queries/listCountry"))
|
|
30
|
+
.default;
|
|
31
|
+
const response = await _listCountry(params);
|
|
32
|
+
return new APIResponse(
|
|
33
|
+
response.data as IkasCountry[] | undefined,
|
|
34
|
+
response.graphQLErrors
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export async function listCity(params: ListCityQueryParams) {
|
|
39
|
+
const _listCity = (await import("../../__api/queries/listCity")).default;
|
|
40
|
+
const response = await _listCity(params);
|
|
41
|
+
return new APIResponse(
|
|
42
|
+
response.data as IkasCity[] | undefined,
|
|
43
|
+
response.graphQLErrors
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export async function listDistrict(params: ListDistrictQueryParams) {
|
|
48
|
+
const _listDistrict = (await import("../../__api/queries/listDistrict"))
|
|
49
|
+
.default;
|
|
50
|
+
const response = await _listDistrict(params);
|
|
51
|
+
return new APIResponse(
|
|
52
|
+
response.data as IkasDistrict[] | undefined,
|
|
53
|
+
response.graphQLErrors
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export async function listState(params: ListStateQueryParams) {
|
|
58
|
+
const _listState = (await import("../../__api/queries/listState")).default;
|
|
59
|
+
const response = await _listState(params);
|
|
60
|
+
return new APIResponse(
|
|
61
|
+
response.data as IkasState[] | undefined,
|
|
62
|
+
response.graphQLErrors
|
|
63
|
+
);
|
|
64
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { QueryParams as GetMasterpassRequestTokenQueryParams } from "../../__api/queries/getMasterpassRequestToken";
|
|
2
|
+
|
|
3
|
+
export type { GetMasterpassRequestTokenQueryParams };
|
|
4
|
+
|
|
5
|
+
export async function getMasterpassRequestToken(
|
|
6
|
+
data: GetMasterpassRequestTokenQueryParams
|
|
7
|
+
) {
|
|
8
|
+
const _getMasterpassRequestToken = (
|
|
9
|
+
await import("../../__api/queries/getMasterpassRequestToken")
|
|
10
|
+
).default;
|
|
11
|
+
return await _getMasterpassRequestToken(data);
|
|
12
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { APIResponse } from "@ikas/fe-api-client";
|
|
2
|
+
|
|
3
|
+
import { QueryParams as ListMerchantSettingsQueryParams } from "../../__api/queries/listMerchantSettings";
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
IkasMerchantSettings,
|
|
7
|
+
initIkasMerchantSettings,
|
|
8
|
+
} from "@ikas/storefront-models";
|
|
9
|
+
|
|
10
|
+
export type { ListMerchantSettingsQueryParams };
|
|
11
|
+
|
|
12
|
+
export async function listMerchantSettings(
|
|
13
|
+
params: ListMerchantSettingsQueryParams
|
|
14
|
+
) {
|
|
15
|
+
const _listMerchantSettings = (
|
|
16
|
+
await import("../../__api/queries/listMerchantSettings")
|
|
17
|
+
).default;
|
|
18
|
+
const response = await _listMerchantSettings(params);
|
|
19
|
+
const data: IkasMerchantSettings[] | null = response.data as any;
|
|
20
|
+
|
|
21
|
+
data?.forEach(initIkasMerchantSettings);
|
|
22
|
+
|
|
23
|
+
return new APIResponse(data?.length ? data[0] : null, response.graphQLErrors);
|
|
24
|
+
}
|