@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,38 @@
|
|
|
1
|
+
import {
|
|
2
|
+
fetchQuery,
|
|
3
|
+
ConfigType,
|
|
4
|
+
APIResponse,
|
|
5
|
+
handleAPIError,
|
|
6
|
+
} from "@ikas/fe-api-client";
|
|
7
|
+
|
|
8
|
+
const isFavoriteProduct = async (
|
|
9
|
+
variables: QueryParams,
|
|
10
|
+
config?: ConfigType
|
|
11
|
+
) => {
|
|
12
|
+
try {
|
|
13
|
+
const { data, errors } = await fetchQuery({
|
|
14
|
+
operationName: "isFavoriteProduct",
|
|
15
|
+
config,
|
|
16
|
+
variables,
|
|
17
|
+
query: `
|
|
18
|
+
query isFavoriteProduct (
|
|
19
|
+
$productId: String!,
|
|
20
|
+
) {
|
|
21
|
+
isFavoriteProduct (
|
|
22
|
+
productId: $productId,
|
|
23
|
+
)
|
|
24
|
+
}
|
|
25
|
+
`,
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
return new APIResponse<boolean>(data?.isFavoriteProduct, errors);
|
|
29
|
+
} catch (err) {
|
|
30
|
+
return handleAPIError(err);
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export default isFavoriteProduct;
|
|
35
|
+
|
|
36
|
+
export type QueryParams = {
|
|
37
|
+
productId: string;
|
|
38
|
+
};
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import {
|
|
2
|
+
fetchQuery,
|
|
3
|
+
ConfigType,
|
|
4
|
+
APIResponse,
|
|
5
|
+
handleAPIError,
|
|
6
|
+
} from "@ikas/fe-api-client";
|
|
7
|
+
import {
|
|
8
|
+
StringFilterInput,
|
|
9
|
+
PaginationInput,
|
|
10
|
+
DateFilterInput,
|
|
11
|
+
BlogPaginationResponse,
|
|
12
|
+
} from "../types";
|
|
13
|
+
|
|
14
|
+
const listBlog = async (
|
|
15
|
+
variables: QueryParams,
|
|
16
|
+
fields?: string[],
|
|
17
|
+
config?: ConfigType
|
|
18
|
+
) => {
|
|
19
|
+
try {
|
|
20
|
+
const { data, errors } = await fetchQuery({
|
|
21
|
+
operationName: "listBlog",
|
|
22
|
+
config,
|
|
23
|
+
variables,
|
|
24
|
+
allReturnFields,
|
|
25
|
+
fields,
|
|
26
|
+
query: (returnFields: string) => `
|
|
27
|
+
query listBlog (
|
|
28
|
+
$categoryId: StringFilterInput,
|
|
29
|
+
$id: StringFilterInput,
|
|
30
|
+
$includeDeleted: Boolean,
|
|
31
|
+
$pagination: PaginationInput,
|
|
32
|
+
$search: String,
|
|
33
|
+
$storefrontId: StringFilterInput,
|
|
34
|
+
$tagId: StringFilterInput,
|
|
35
|
+
$title: StringFilterInput,
|
|
36
|
+
$updatedAt: DateFilterInput,
|
|
37
|
+
) {
|
|
38
|
+
listBlog (
|
|
39
|
+
categoryId: $categoryId,
|
|
40
|
+
id: $id,
|
|
41
|
+
includeDeleted: $includeDeleted,
|
|
42
|
+
pagination: $pagination,
|
|
43
|
+
search: $search,
|
|
44
|
+
storefrontId: $storefrontId,
|
|
45
|
+
tagId: $tagId,
|
|
46
|
+
title: $title,
|
|
47
|
+
updatedAt: $updatedAt,
|
|
48
|
+
) ${returnFields}
|
|
49
|
+
}
|
|
50
|
+
`,
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
return new APIResponse<BlogPaginationResponse>(data?.listBlog, errors);
|
|
54
|
+
} catch (err) {
|
|
55
|
+
return handleAPIError(err);
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
export default listBlog;
|
|
60
|
+
|
|
61
|
+
export type QueryParams = {
|
|
62
|
+
categoryId?: StringFilterInput | null;
|
|
63
|
+
id?: StringFilterInput | null;
|
|
64
|
+
includeDeleted?: boolean | null;
|
|
65
|
+
pagination?: PaginationInput | null;
|
|
66
|
+
search?: string | null;
|
|
67
|
+
storefrontId?: StringFilterInput | null;
|
|
68
|
+
tagId?: StringFilterInput | null;
|
|
69
|
+
title?: StringFilterInput | null;
|
|
70
|
+
updatedAt?: DateFilterInput | null;
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
const allReturnFields =
|
|
74
|
+
"{count data {blogContent {content contentData contentSource createdAt deleted id updatedAt } category {createdAt deleted id imageId metadata {canonicals createdAt deleted description disableIndex id pageTitle slug targetId targetType updatedAt } name updatedAt } categoryId createdAt deleted id imageId isPublished locale metadata {canonicals createdAt deleted description disableIndex id pageTitle slug targetId targetType updatedAt } publishedAt shortDescription storefrontId tagIds tags {createdAt deleted id name updatedAt } title updatedAt writer {firstName lastName } } hasNext limit page }";
|
|
75
|
+
|
|
76
|
+
export enum ResponseField {
|
|
77
|
+
COUNT = "count",
|
|
78
|
+
DATA__BLOG_CONTENT__CONTENT = "data.blogContent.content",
|
|
79
|
+
DATA__BLOG_CONTENT__CONTENT_DATA = "data.blogContent.contentData",
|
|
80
|
+
DATA__BLOG_CONTENT__CONTENT_SOURCE = "data.blogContent.contentSource",
|
|
81
|
+
DATA__BLOG_CONTENT__CREATED_AT = "data.blogContent.createdAt",
|
|
82
|
+
DATA__BLOG_CONTENT__DELETED = "data.blogContent.deleted",
|
|
83
|
+
DATA__BLOG_CONTENT__ID = "data.blogContent.id",
|
|
84
|
+
DATA__BLOG_CONTENT__UPDATED_AT = "data.blogContent.updatedAt",
|
|
85
|
+
DATA__CATEGORY__CREATED_AT = "data.category.createdAt",
|
|
86
|
+
DATA__CATEGORY__DELETED = "data.category.deleted",
|
|
87
|
+
DATA__CATEGORY__ID = "data.category.id",
|
|
88
|
+
DATA__CATEGORY__IMAGE_ID = "data.category.imageId",
|
|
89
|
+
DATA__CATEGORY__METADATA__CANONICALS = "data.category.metadata.canonicals",
|
|
90
|
+
DATA__CATEGORY__METADATA__CREATED_AT = "data.category.metadata.createdAt",
|
|
91
|
+
DATA__CATEGORY__METADATA__DELETED = "data.category.metadata.deleted",
|
|
92
|
+
DATA__CATEGORY__METADATA__DESCRIPTION = "data.category.metadata.description",
|
|
93
|
+
DATA__CATEGORY__METADATA__DISABLE_INDEX = "data.category.metadata.disableIndex",
|
|
94
|
+
DATA__CATEGORY__METADATA__ID = "data.category.metadata.id",
|
|
95
|
+
DATA__CATEGORY__METADATA__PAGE_TITLE = "data.category.metadata.pageTitle",
|
|
96
|
+
DATA__CATEGORY__METADATA__SLUG = "data.category.metadata.slug",
|
|
97
|
+
DATA__CATEGORY__METADATA__TARGET_ID = "data.category.metadata.targetId",
|
|
98
|
+
DATA__CATEGORY__METADATA__TARGET_TYPE = "data.category.metadata.targetType",
|
|
99
|
+
DATA__CATEGORY__METADATA__UPDATED_AT = "data.category.metadata.updatedAt",
|
|
100
|
+
DATA__CATEGORY__NAME = "data.category.name",
|
|
101
|
+
DATA__CATEGORY__UPDATED_AT = "data.category.updatedAt",
|
|
102
|
+
DATA__CATEGORY_ID = "data.categoryId",
|
|
103
|
+
DATA__CREATED_AT = "data.createdAt",
|
|
104
|
+
DATA__DELETED = "data.deleted",
|
|
105
|
+
DATA__ID = "data.id",
|
|
106
|
+
DATA__IMAGE_ID = "data.imageId",
|
|
107
|
+
DATA__IS_PUBLISHED = "data.isPublished",
|
|
108
|
+
DATA__LOCALE = "data.locale",
|
|
109
|
+
DATA__METADATA__CANONICALS = "data.metadata.canonicals",
|
|
110
|
+
DATA__METADATA__CREATED_AT = "data.metadata.createdAt",
|
|
111
|
+
DATA__METADATA__DELETED = "data.metadata.deleted",
|
|
112
|
+
DATA__METADATA__DESCRIPTION = "data.metadata.description",
|
|
113
|
+
DATA__METADATA__DISABLE_INDEX = "data.metadata.disableIndex",
|
|
114
|
+
DATA__METADATA__ID = "data.metadata.id",
|
|
115
|
+
DATA__METADATA__PAGE_TITLE = "data.metadata.pageTitle",
|
|
116
|
+
DATA__METADATA__SLUG = "data.metadata.slug",
|
|
117
|
+
DATA__METADATA__TARGET_ID = "data.metadata.targetId",
|
|
118
|
+
DATA__METADATA__TARGET_TYPE = "data.metadata.targetType",
|
|
119
|
+
DATA__METADATA__UPDATED_AT = "data.metadata.updatedAt",
|
|
120
|
+
DATA__PUBLISHED_AT = "data.publishedAt",
|
|
121
|
+
DATA__SHORT_DESCRIPTION = "data.shortDescription",
|
|
122
|
+
DATA__STOREFRONT_ID = "data.storefrontId",
|
|
123
|
+
DATA__TAG_IDS = "data.tagIds",
|
|
124
|
+
DATA__TAGS__CREATED_AT = "data.tags.createdAt",
|
|
125
|
+
DATA__TAGS__DELETED = "data.tags.deleted",
|
|
126
|
+
DATA__TAGS__ID = "data.tags.id",
|
|
127
|
+
DATA__TAGS__NAME = "data.tags.name",
|
|
128
|
+
DATA__TAGS__UPDATED_AT = "data.tags.updatedAt",
|
|
129
|
+
DATA__TITLE = "data.title",
|
|
130
|
+
DATA__UPDATED_AT = "data.updatedAt",
|
|
131
|
+
DATA__WRITER__FIRST_NAME = "data.writer.firstName",
|
|
132
|
+
DATA__WRITER__LAST_NAME = "data.writer.lastName",
|
|
133
|
+
HAS_NEXT = "hasNext",
|
|
134
|
+
LIMIT = "limit",
|
|
135
|
+
PAGE = "page",
|
|
136
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import {
|
|
2
|
+
fetchQuery,
|
|
3
|
+
ConfigType,
|
|
4
|
+
APIResponse,
|
|
5
|
+
handleAPIError,
|
|
6
|
+
} from "@ikas/fe-api-client";
|
|
7
|
+
import {
|
|
8
|
+
StringFilterInput,
|
|
9
|
+
PaginationInput,
|
|
10
|
+
DateFilterInput,
|
|
11
|
+
BlogCategoryPaginationResponse,
|
|
12
|
+
} from "../types";
|
|
13
|
+
|
|
14
|
+
const listBlogCategory = async (
|
|
15
|
+
variables: QueryParams,
|
|
16
|
+
fields?: string[],
|
|
17
|
+
config?: ConfigType
|
|
18
|
+
) => {
|
|
19
|
+
try {
|
|
20
|
+
const { data, errors } = await fetchQuery({
|
|
21
|
+
operationName: "listBlogCategory",
|
|
22
|
+
config,
|
|
23
|
+
variables,
|
|
24
|
+
allReturnFields,
|
|
25
|
+
fields,
|
|
26
|
+
query: (returnFields: string) => `
|
|
27
|
+
query listBlogCategory (
|
|
28
|
+
$id: StringFilterInput,
|
|
29
|
+
$includeDeleted: Boolean,
|
|
30
|
+
$name: StringFilterInput,
|
|
31
|
+
$pagination: PaginationInput,
|
|
32
|
+
$search: String,
|
|
33
|
+
$updatedAt: DateFilterInput,
|
|
34
|
+
) {
|
|
35
|
+
listBlogCategory (
|
|
36
|
+
id: $id,
|
|
37
|
+
includeDeleted: $includeDeleted,
|
|
38
|
+
name: $name,
|
|
39
|
+
pagination: $pagination,
|
|
40
|
+
search: $search,
|
|
41
|
+
updatedAt: $updatedAt,
|
|
42
|
+
) ${returnFields}
|
|
43
|
+
}
|
|
44
|
+
`,
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
return new APIResponse<BlogCategoryPaginationResponse>(
|
|
48
|
+
data?.listBlogCategory,
|
|
49
|
+
errors
|
|
50
|
+
);
|
|
51
|
+
} catch (err) {
|
|
52
|
+
return handleAPIError(err);
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
export default listBlogCategory;
|
|
57
|
+
|
|
58
|
+
export type QueryParams = {
|
|
59
|
+
id?: StringFilterInput | null;
|
|
60
|
+
includeDeleted?: boolean | null;
|
|
61
|
+
name?: StringFilterInput | null;
|
|
62
|
+
pagination?: PaginationInput | null;
|
|
63
|
+
search?: string | null;
|
|
64
|
+
updatedAt?: DateFilterInput | null;
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
const allReturnFields =
|
|
68
|
+
"{count data {createdAt deleted id imageId metadata {canonicals createdAt deleted description disableIndex id pageTitle slug targetId targetType updatedAt } name updatedAt } hasNext limit page }";
|
|
69
|
+
|
|
70
|
+
export enum ResponseField {
|
|
71
|
+
COUNT = "count",
|
|
72
|
+
DATA__CREATED_AT = "data.createdAt",
|
|
73
|
+
DATA__DELETED = "data.deleted",
|
|
74
|
+
DATA__ID = "data.id",
|
|
75
|
+
DATA__IMAGE_ID = "data.imageId",
|
|
76
|
+
DATA__METADATA__CANONICALS = "data.metadata.canonicals",
|
|
77
|
+
DATA__METADATA__CREATED_AT = "data.metadata.createdAt",
|
|
78
|
+
DATA__METADATA__DELETED = "data.metadata.deleted",
|
|
79
|
+
DATA__METADATA__DESCRIPTION = "data.metadata.description",
|
|
80
|
+
DATA__METADATA__DISABLE_INDEX = "data.metadata.disableIndex",
|
|
81
|
+
DATA__METADATA__ID = "data.metadata.id",
|
|
82
|
+
DATA__METADATA__PAGE_TITLE = "data.metadata.pageTitle",
|
|
83
|
+
DATA__METADATA__SLUG = "data.metadata.slug",
|
|
84
|
+
DATA__METADATA__TARGET_ID = "data.metadata.targetId",
|
|
85
|
+
DATA__METADATA__TARGET_TYPE = "data.metadata.targetType",
|
|
86
|
+
DATA__METADATA__UPDATED_AT = "data.metadata.updatedAt",
|
|
87
|
+
DATA__NAME = "data.name",
|
|
88
|
+
DATA__UPDATED_AT = "data.updatedAt",
|
|
89
|
+
HAS_NEXT = "hasNext",
|
|
90
|
+
LIMIT = "limit",
|
|
91
|
+
PAGE = "page",
|
|
92
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import {
|
|
2
|
+
fetchQuery,
|
|
3
|
+
ConfigType,
|
|
4
|
+
APIResponse,
|
|
5
|
+
handleAPIError,
|
|
6
|
+
} from "@ikas/fe-api-client";
|
|
7
|
+
import {
|
|
8
|
+
StringFilterInput,
|
|
9
|
+
PaginationInput,
|
|
10
|
+
BlogMetadataTargetTypeEnumFilter,
|
|
11
|
+
DateFilterInput,
|
|
12
|
+
BlogMetadataPaginationResponse,
|
|
13
|
+
} from "../types";
|
|
14
|
+
|
|
15
|
+
const listBlogMetadata = async (
|
|
16
|
+
variables: QueryParams,
|
|
17
|
+
fields?: string[],
|
|
18
|
+
config?: ConfigType
|
|
19
|
+
) => {
|
|
20
|
+
try {
|
|
21
|
+
const { data, errors } = await fetchQuery({
|
|
22
|
+
operationName: "listBlogMetadata",
|
|
23
|
+
config,
|
|
24
|
+
variables,
|
|
25
|
+
allReturnFields,
|
|
26
|
+
fields,
|
|
27
|
+
query: (returnFields: string) => `
|
|
28
|
+
query listBlogMetadata (
|
|
29
|
+
$id: StringFilterInput,
|
|
30
|
+
$includeDeleted: Boolean,
|
|
31
|
+
$pagination: PaginationInput,
|
|
32
|
+
$slug: StringFilterInput,
|
|
33
|
+
$targetId: StringFilterInput,
|
|
34
|
+
$targetType: BlogMetadataTargetTypeEnumFilter,
|
|
35
|
+
$updatedAt: DateFilterInput,
|
|
36
|
+
) {
|
|
37
|
+
listBlogMetadata (
|
|
38
|
+
id: $id,
|
|
39
|
+
includeDeleted: $includeDeleted,
|
|
40
|
+
pagination: $pagination,
|
|
41
|
+
slug: $slug,
|
|
42
|
+
targetId: $targetId,
|
|
43
|
+
targetType: $targetType,
|
|
44
|
+
updatedAt: $updatedAt,
|
|
45
|
+
) ${returnFields}
|
|
46
|
+
}
|
|
47
|
+
`,
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
return new APIResponse<BlogMetadataPaginationResponse>(
|
|
51
|
+
data?.listBlogMetadata,
|
|
52
|
+
errors
|
|
53
|
+
);
|
|
54
|
+
} catch (err) {
|
|
55
|
+
return handleAPIError(err);
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
export default listBlogMetadata;
|
|
60
|
+
|
|
61
|
+
export type QueryParams = {
|
|
62
|
+
id?: StringFilterInput | null;
|
|
63
|
+
includeDeleted?: boolean | null;
|
|
64
|
+
pagination?: PaginationInput | null;
|
|
65
|
+
slug?: StringFilterInput | null;
|
|
66
|
+
targetId?: StringFilterInput | null;
|
|
67
|
+
targetType?: BlogMetadataTargetTypeEnumFilter | null;
|
|
68
|
+
updatedAt?: DateFilterInput | null;
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
const allReturnFields =
|
|
72
|
+
"{count data {canonicals createdAt deleted description disableIndex id pageTitle slug targetId targetType updatedAt } hasNext limit page }";
|
|
73
|
+
|
|
74
|
+
export enum ResponseField {
|
|
75
|
+
COUNT = "count",
|
|
76
|
+
DATA__CANONICALS = "data.canonicals",
|
|
77
|
+
DATA__CREATED_AT = "data.createdAt",
|
|
78
|
+
DATA__DELETED = "data.deleted",
|
|
79
|
+
DATA__DESCRIPTION = "data.description",
|
|
80
|
+
DATA__DISABLE_INDEX = "data.disableIndex",
|
|
81
|
+
DATA__ID = "data.id",
|
|
82
|
+
DATA__PAGE_TITLE = "data.pageTitle",
|
|
83
|
+
DATA__SLUG = "data.slug",
|
|
84
|
+
DATA__TARGET_ID = "data.targetId",
|
|
85
|
+
DATA__TARGET_TYPE = "data.targetType",
|
|
86
|
+
DATA__UPDATED_AT = "data.updatedAt",
|
|
87
|
+
HAS_NEXT = "hasNext",
|
|
88
|
+
LIMIT = "limit",
|
|
89
|
+
PAGE = "page",
|
|
90
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import {
|
|
2
|
+
fetchQuery,
|
|
3
|
+
ConfigType,
|
|
4
|
+
APIResponse,
|
|
5
|
+
handleAPIError,
|
|
6
|
+
} from "@ikas/fe-api-client";
|
|
7
|
+
import { StringFilterInput, CampaignOffer } from "../types";
|
|
8
|
+
|
|
9
|
+
const listCampaignOffer = async (
|
|
10
|
+
variables: QueryParams,
|
|
11
|
+
fields?: string[],
|
|
12
|
+
config?: ConfigType
|
|
13
|
+
) => {
|
|
14
|
+
try {
|
|
15
|
+
const { data, errors } = await fetchQuery({
|
|
16
|
+
operationName: "listCampaignOffer",
|
|
17
|
+
config,
|
|
18
|
+
variables,
|
|
19
|
+
allReturnFields,
|
|
20
|
+
fields,
|
|
21
|
+
query: (returnFields: string) => `
|
|
22
|
+
query listCampaignOffer (
|
|
23
|
+
$id: StringFilterInput,
|
|
24
|
+
) {
|
|
25
|
+
listCampaignOffer (
|
|
26
|
+
id: $id,
|
|
27
|
+
) ${returnFields}
|
|
28
|
+
}
|
|
29
|
+
`,
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
return new APIResponse<CampaignOffer[]>(data?.listCampaignOffer, errors);
|
|
33
|
+
} catch (err) {
|
|
34
|
+
return handleAPIError(err);
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export default listCampaignOffer;
|
|
39
|
+
|
|
40
|
+
export type QueryParams = {
|
|
41
|
+
id?: StringFilterInput | null;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
const allReturnFields =
|
|
45
|
+
"{availableSalesChannelIds createdAt deleted endDate followUpActionType id minimumRequiredCartAmount name offers {countdownMinutes description discountAmount discountType excludedVariantIdList id order productId showCriteria skipOfferIfProductExistsInCart title translations {description locale title } } startDate targetPageTypes triggerSettings {filterType valueList } type updatedAt }";
|
|
46
|
+
|
|
47
|
+
export enum ResponseField {
|
|
48
|
+
AVAILABLE_SALES_CHANNEL_IDS = "availableSalesChannelIds",
|
|
49
|
+
CREATED_AT = "createdAt",
|
|
50
|
+
DELETED = "deleted",
|
|
51
|
+
END_DATE = "endDate",
|
|
52
|
+
FOLLOW_UP_ACTION_TYPE = "followUpActionType",
|
|
53
|
+
ID = "id",
|
|
54
|
+
MINIMUM_REQUIRED_CART_AMOUNT = "minimumRequiredCartAmount",
|
|
55
|
+
NAME = "name",
|
|
56
|
+
OFFERS__COUNTDOWN_MINUTES = "offers.countdownMinutes",
|
|
57
|
+
OFFERS__DESCRIPTION = "offers.description",
|
|
58
|
+
OFFERS__DISCOUNT_AMOUNT = "offers.discountAmount",
|
|
59
|
+
OFFERS__DISCOUNT_TYPE = "offers.discountType",
|
|
60
|
+
OFFERS__EXCLUDED_VARIANT_ID_LIST = "offers.excludedVariantIdList",
|
|
61
|
+
OFFERS__ID = "offers.id",
|
|
62
|
+
OFFERS__ORDER = "offers.order",
|
|
63
|
+
OFFERS__PRODUCT_ID = "offers.productId",
|
|
64
|
+
OFFERS__SHOW_CRITERIA = "offers.showCriteria",
|
|
65
|
+
OFFERS__SKIP_OFFER_IF_PRODUCT_EXISTS_IN_CART = "offers.skipOfferIfProductExistsInCart",
|
|
66
|
+
OFFERS__TITLE = "offers.title",
|
|
67
|
+
OFFERS__TRANSLATIONS__DESCRIPTION = "offers.translations.description",
|
|
68
|
+
OFFERS__TRANSLATIONS__LOCALE = "offers.translations.locale",
|
|
69
|
+
OFFERS__TRANSLATIONS__TITLE = "offers.translations.title",
|
|
70
|
+
START_DATE = "startDate",
|
|
71
|
+
TARGET_PAGE_TYPES = "targetPageTypes",
|
|
72
|
+
TRIGGER_SETTINGS__FILTER_TYPE = "triggerSettings.filterType",
|
|
73
|
+
TRIGGER_SETTINGS__VALUE_LIST = "triggerSettings.valueList",
|
|
74
|
+
TYPE = "type",
|
|
75
|
+
UPDATED_AT = "updatedAt",
|
|
76
|
+
}
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import {
|
|
2
|
+
fetchQuery,
|
|
3
|
+
ConfigType,
|
|
4
|
+
APIResponse,
|
|
5
|
+
handleAPIError,
|
|
6
|
+
} from "@ikas/fe-api-client";
|
|
7
|
+
import {
|
|
8
|
+
CategoryPathFilterInput,
|
|
9
|
+
StringFilterInput,
|
|
10
|
+
PaginationInput,
|
|
11
|
+
DateFilterInput,
|
|
12
|
+
CategoryPaginationResponse,
|
|
13
|
+
} from "../types";
|
|
14
|
+
|
|
15
|
+
const listCategory = async (
|
|
16
|
+
variables: QueryParams,
|
|
17
|
+
fields?: string[],
|
|
18
|
+
config?: ConfigType
|
|
19
|
+
) => {
|
|
20
|
+
try {
|
|
21
|
+
const { data, errors } = await fetchQuery({
|
|
22
|
+
operationName: "listCategory",
|
|
23
|
+
config,
|
|
24
|
+
variables,
|
|
25
|
+
allReturnFields,
|
|
26
|
+
fields,
|
|
27
|
+
query: (returnFields: string) => `
|
|
28
|
+
query listCategory (
|
|
29
|
+
$categoryPath: CategoryPathFilterInput,
|
|
30
|
+
$id: StringFilterInput,
|
|
31
|
+
$includeDeleted: Boolean,
|
|
32
|
+
$name: StringFilterInput,
|
|
33
|
+
$pagination: PaginationInput,
|
|
34
|
+
$search: String,
|
|
35
|
+
$sort: String,
|
|
36
|
+
$updatedAt: DateFilterInput,
|
|
37
|
+
) {
|
|
38
|
+
listCategory (
|
|
39
|
+
categoryPath: $categoryPath,
|
|
40
|
+
id: $id,
|
|
41
|
+
includeDeleted: $includeDeleted,
|
|
42
|
+
name: $name,
|
|
43
|
+
pagination: $pagination,
|
|
44
|
+
search: $search,
|
|
45
|
+
sort: $sort,
|
|
46
|
+
updatedAt: $updatedAt,
|
|
47
|
+
) ${returnFields}
|
|
48
|
+
}
|
|
49
|
+
`,
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
return new APIResponse<CategoryPaginationResponse>(
|
|
53
|
+
data?.listCategory,
|
|
54
|
+
errors
|
|
55
|
+
);
|
|
56
|
+
} catch (err) {
|
|
57
|
+
return handleAPIError(err);
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
export default listCategory;
|
|
62
|
+
|
|
63
|
+
export type QueryParams = {
|
|
64
|
+
categoryPath?: CategoryPathFilterInput | null;
|
|
65
|
+
id?: StringFilterInput | null;
|
|
66
|
+
includeDeleted?: boolean | null;
|
|
67
|
+
name?: StringFilterInput | null;
|
|
68
|
+
pagination?: PaginationInput | null;
|
|
69
|
+
search?: string | null;
|
|
70
|
+
sort?: string | null;
|
|
71
|
+
updatedAt?: DateFilterInput | null;
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
const allReturnFields =
|
|
75
|
+
"{count data {categoryPath categoryPathItems {createdAt deleted description id imageId isAutomated metaData {canonicals createdAt deleted description disableIndex id metadataOverrides {description language pageTitle storefrontId storefrontRegionId } pageTitle redirectTo slug targetId targetType translations {description locale pageTitle } updatedAt } name translations {description locale name } updatedAt } conditions {conditionType valueList } createdAt deleted description id imageId isAutomated metaData {canonicals createdAt deleted description disableIndex id metadataOverrides {description language pageTitle storefrontId storefrontRegionId } pageTitle redirectTo slug targetId targetType translations {description locale pageTitle } updatedAt } name orderType parentId salesChannelIds shouldMatchAllConditions translations {description locale name } updatedAt } hasNext limit page }";
|
|
76
|
+
|
|
77
|
+
export enum ResponseField {
|
|
78
|
+
COUNT = "count",
|
|
79
|
+
DATA__CATEGORY_PATH = "data.categoryPath",
|
|
80
|
+
DATA__CATEGORY_PATH_ITEMS__CREATED_AT = "data.categoryPathItems.createdAt",
|
|
81
|
+
DATA__CATEGORY_PATH_ITEMS__DELETED = "data.categoryPathItems.deleted",
|
|
82
|
+
DATA__CATEGORY_PATH_ITEMS__DESCRIPTION = "data.categoryPathItems.description",
|
|
83
|
+
DATA__CATEGORY_PATH_ITEMS__ID = "data.categoryPathItems.id",
|
|
84
|
+
DATA__CATEGORY_PATH_ITEMS__IMAGE_ID = "data.categoryPathItems.imageId",
|
|
85
|
+
DATA__CATEGORY_PATH_ITEMS__IS_AUTOMATED = "data.categoryPathItems.isAutomated",
|
|
86
|
+
DATA__CATEGORY_PATH_ITEMS__META_DATA__CANONICALS = "data.categoryPathItems.metaData.canonicals",
|
|
87
|
+
DATA__CATEGORY_PATH_ITEMS__META_DATA__CREATED_AT = "data.categoryPathItems.metaData.createdAt",
|
|
88
|
+
DATA__CATEGORY_PATH_ITEMS__META_DATA__DELETED = "data.categoryPathItems.metaData.deleted",
|
|
89
|
+
DATA__CATEGORY_PATH_ITEMS__META_DATA__DESCRIPTION = "data.categoryPathItems.metaData.description",
|
|
90
|
+
DATA__CATEGORY_PATH_ITEMS__META_DATA__DISABLE_INDEX = "data.categoryPathItems.metaData.disableIndex",
|
|
91
|
+
DATA__CATEGORY_PATH_ITEMS__META_DATA__ID = "data.categoryPathItems.metaData.id",
|
|
92
|
+
DATA__CATEGORY_PATH_ITEMS__META_DATA__METADATA_OVERRIDES__DESCRIPTION = "data.categoryPathItems.metaData.metadataOverrides.description",
|
|
93
|
+
DATA__CATEGORY_PATH_ITEMS__META_DATA__METADATA_OVERRIDES__LANGUAGE = "data.categoryPathItems.metaData.metadataOverrides.language",
|
|
94
|
+
DATA__CATEGORY_PATH_ITEMS__META_DATA__METADATA_OVERRIDES__PAGE_TITLE = "data.categoryPathItems.metaData.metadataOverrides.pageTitle",
|
|
95
|
+
DATA__CATEGORY_PATH_ITEMS__META_DATA__METADATA_OVERRIDES__STOREFRONT_ID = "data.categoryPathItems.metaData.metadataOverrides.storefrontId",
|
|
96
|
+
DATA__CATEGORY_PATH_ITEMS__META_DATA__METADATA_OVERRIDES__STOREFRONT_REGION_ID = "data.categoryPathItems.metaData.metadataOverrides.storefrontRegionId",
|
|
97
|
+
DATA__CATEGORY_PATH_ITEMS__META_DATA__PAGE_TITLE = "data.categoryPathItems.metaData.pageTitle",
|
|
98
|
+
DATA__CATEGORY_PATH_ITEMS__META_DATA__REDIRECT_TO = "data.categoryPathItems.metaData.redirectTo",
|
|
99
|
+
DATA__CATEGORY_PATH_ITEMS__META_DATA__SLUG = "data.categoryPathItems.metaData.slug",
|
|
100
|
+
DATA__CATEGORY_PATH_ITEMS__META_DATA__TARGET_ID = "data.categoryPathItems.metaData.targetId",
|
|
101
|
+
DATA__CATEGORY_PATH_ITEMS__META_DATA__TARGET_TYPE = "data.categoryPathItems.metaData.targetType",
|
|
102
|
+
DATA__CATEGORY_PATH_ITEMS__META_DATA__TRANSLATIONS__DESCRIPTION = "data.categoryPathItems.metaData.translations.description",
|
|
103
|
+
DATA__CATEGORY_PATH_ITEMS__META_DATA__TRANSLATIONS__LOCALE = "data.categoryPathItems.metaData.translations.locale",
|
|
104
|
+
DATA__CATEGORY_PATH_ITEMS__META_DATA__TRANSLATIONS__PAGE_TITLE = "data.categoryPathItems.metaData.translations.pageTitle",
|
|
105
|
+
DATA__CATEGORY_PATH_ITEMS__META_DATA__UPDATED_AT = "data.categoryPathItems.metaData.updatedAt",
|
|
106
|
+
DATA__CATEGORY_PATH_ITEMS__NAME = "data.categoryPathItems.name",
|
|
107
|
+
DATA__CATEGORY_PATH_ITEMS__TRANSLATIONS__DESCRIPTION = "data.categoryPathItems.translations.description",
|
|
108
|
+
DATA__CATEGORY_PATH_ITEMS__TRANSLATIONS__LOCALE = "data.categoryPathItems.translations.locale",
|
|
109
|
+
DATA__CATEGORY_PATH_ITEMS__TRANSLATIONS__NAME = "data.categoryPathItems.translations.name",
|
|
110
|
+
DATA__CATEGORY_PATH_ITEMS__UPDATED_AT = "data.categoryPathItems.updatedAt",
|
|
111
|
+
DATA__CONDITIONS__CONDITION_TYPE = "data.conditions.conditionType",
|
|
112
|
+
DATA__CONDITIONS__VALUE_LIST = "data.conditions.valueList",
|
|
113
|
+
DATA__CREATED_AT = "data.createdAt",
|
|
114
|
+
DATA__DELETED = "data.deleted",
|
|
115
|
+
DATA__DESCRIPTION = "data.description",
|
|
116
|
+
DATA__ID = "data.id",
|
|
117
|
+
DATA__IMAGE_ID = "data.imageId",
|
|
118
|
+
DATA__IS_AUTOMATED = "data.isAutomated",
|
|
119
|
+
DATA__META_DATA__CANONICALS = "data.metaData.canonicals",
|
|
120
|
+
DATA__META_DATA__CREATED_AT = "data.metaData.createdAt",
|
|
121
|
+
DATA__META_DATA__DELETED = "data.metaData.deleted",
|
|
122
|
+
DATA__META_DATA__DESCRIPTION = "data.metaData.description",
|
|
123
|
+
DATA__META_DATA__DISABLE_INDEX = "data.metaData.disableIndex",
|
|
124
|
+
DATA__META_DATA__ID = "data.metaData.id",
|
|
125
|
+
DATA__META_DATA__METADATA_OVERRIDES__DESCRIPTION = "data.metaData.metadataOverrides.description",
|
|
126
|
+
DATA__META_DATA__METADATA_OVERRIDES__LANGUAGE = "data.metaData.metadataOverrides.language",
|
|
127
|
+
DATA__META_DATA__METADATA_OVERRIDES__PAGE_TITLE = "data.metaData.metadataOverrides.pageTitle",
|
|
128
|
+
DATA__META_DATA__METADATA_OVERRIDES__STOREFRONT_ID = "data.metaData.metadataOverrides.storefrontId",
|
|
129
|
+
DATA__META_DATA__METADATA_OVERRIDES__STOREFRONT_REGION_ID = "data.metaData.metadataOverrides.storefrontRegionId",
|
|
130
|
+
DATA__META_DATA__PAGE_TITLE = "data.metaData.pageTitle",
|
|
131
|
+
DATA__META_DATA__REDIRECT_TO = "data.metaData.redirectTo",
|
|
132
|
+
DATA__META_DATA__SLUG = "data.metaData.slug",
|
|
133
|
+
DATA__META_DATA__TARGET_ID = "data.metaData.targetId",
|
|
134
|
+
DATA__META_DATA__TARGET_TYPE = "data.metaData.targetType",
|
|
135
|
+
DATA__META_DATA__TRANSLATIONS__DESCRIPTION = "data.metaData.translations.description",
|
|
136
|
+
DATA__META_DATA__TRANSLATIONS__LOCALE = "data.metaData.translations.locale",
|
|
137
|
+
DATA__META_DATA__TRANSLATIONS__PAGE_TITLE = "data.metaData.translations.pageTitle",
|
|
138
|
+
DATA__META_DATA__UPDATED_AT = "data.metaData.updatedAt",
|
|
139
|
+
DATA__NAME = "data.name",
|
|
140
|
+
DATA__ORDER_TYPE = "data.orderType",
|
|
141
|
+
DATA__PARENT_ID = "data.parentId",
|
|
142
|
+
DATA__SALES_CHANNEL_IDS = "data.salesChannelIds",
|
|
143
|
+
DATA__SHOULD_MATCH_ALL_CONDITIONS = "data.shouldMatchAllConditions",
|
|
144
|
+
DATA__TRANSLATIONS__DESCRIPTION = "data.translations.description",
|
|
145
|
+
DATA__TRANSLATIONS__LOCALE = "data.translations.locale",
|
|
146
|
+
DATA__TRANSLATIONS__NAME = "data.translations.name",
|
|
147
|
+
DATA__UPDATED_AT = "data.updatedAt",
|
|
148
|
+
HAS_NEXT = "hasNext",
|
|
149
|
+
LIMIT = "limit",
|
|
150
|
+
PAGE = "page",
|
|
151
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import {
|
|
2
|
+
fetchQuery,
|
|
3
|
+
ConfigType,
|
|
4
|
+
APIResponse,
|
|
5
|
+
handleAPIError,
|
|
6
|
+
} from "@ikas/fe-api-client";
|
|
7
|
+
import { StringFilterInput, CheckoutSettings } from "../types";
|
|
8
|
+
|
|
9
|
+
const listCheckoutSettings = async (
|
|
10
|
+
variables: QueryParams,
|
|
11
|
+
fields?: string[],
|
|
12
|
+
config?: ConfigType
|
|
13
|
+
) => {
|
|
14
|
+
try {
|
|
15
|
+
const { data, errors } = await fetchQuery({
|
|
16
|
+
operationName: "listCheckoutSettings",
|
|
17
|
+
config,
|
|
18
|
+
variables,
|
|
19
|
+
allReturnFields,
|
|
20
|
+
fields,
|
|
21
|
+
query: (returnFields: string) => `
|
|
22
|
+
query listCheckoutSettings (
|
|
23
|
+
$id: StringFilterInput,
|
|
24
|
+
$includeDeleted: Boolean,
|
|
25
|
+
$storefrontId: StringFilterInput,
|
|
26
|
+
) {
|
|
27
|
+
listCheckoutSettings (
|
|
28
|
+
id: $id,
|
|
29
|
+
includeDeleted: $includeDeleted,
|
|
30
|
+
storefrontId: $storefrontId,
|
|
31
|
+
) ${returnFields}
|
|
32
|
+
}
|
|
33
|
+
`,
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
return new APIResponse<CheckoutSettings[]>(
|
|
37
|
+
data?.listCheckoutSettings,
|
|
38
|
+
errors
|
|
39
|
+
);
|
|
40
|
+
} catch (err) {
|
|
41
|
+
return handleAPIError(err);
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export default listCheckoutSettings;
|
|
46
|
+
|
|
47
|
+
export type QueryParams = {
|
|
48
|
+
id?: StringFilterInput | null;
|
|
49
|
+
includeDeleted?: boolean | null;
|
|
50
|
+
storefrontId?: StringFilterInput | null;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
const allReturnFields =
|
|
54
|
+
"{createdAt deleted giftPackagePriceList {currencyCode price } id identityNumberRequirement isAccountRequired isGiftPackageEnabled isShowPostalCode isTermsAndConditionsDefaultChecked options {name required } phoneRequirement postalCodeRequirement showCheckoutNote showTermsAndConditionsCheckbox storefrontId updatedAt }";
|
|
55
|
+
|
|
56
|
+
export enum ResponseField {
|
|
57
|
+
CREATED_AT = "createdAt",
|
|
58
|
+
DELETED = "deleted",
|
|
59
|
+
GIFT_PACKAGE_PRICE_LIST__CURRENCY_CODE = "giftPackagePriceList.currencyCode",
|
|
60
|
+
GIFT_PACKAGE_PRICE_LIST__PRICE = "giftPackagePriceList.price",
|
|
61
|
+
ID = "id",
|
|
62
|
+
IDENTITY_NUMBER_REQUIREMENT = "identityNumberRequirement",
|
|
63
|
+
IS_ACCOUNT_REQUIRED = "isAccountRequired",
|
|
64
|
+
IS_GIFT_PACKAGE_ENABLED = "isGiftPackageEnabled",
|
|
65
|
+
IS_SHOW_POSTAL_CODE = "isShowPostalCode",
|
|
66
|
+
IS_TERMS_AND_CONDITIONS_DEFAULT_CHECKED = "isTermsAndConditionsDefaultChecked",
|
|
67
|
+
OPTIONS__NAME = "options.name",
|
|
68
|
+
OPTIONS__REQUIRED = "options.required",
|
|
69
|
+
PHONE_REQUIREMENT = "phoneRequirement",
|
|
70
|
+
POSTAL_CODE_REQUIREMENT = "postalCodeRequirement",
|
|
71
|
+
SHOW_CHECKOUT_NOTE = "showCheckoutNote",
|
|
72
|
+
SHOW_TERMS_AND_CONDITIONS_CHECKBOX = "showTermsAndConditionsCheckbox",
|
|
73
|
+
STOREFRONT_ID = "storefrontId",
|
|
74
|
+
UPDATED_AT = "updatedAt",
|
|
75
|
+
}
|