@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,105 @@
|
|
|
1
|
+
import {
|
|
2
|
+
fetchQuery,
|
|
3
|
+
ConfigType,
|
|
4
|
+
APIResponse,
|
|
5
|
+
handleAPIError,
|
|
6
|
+
} from "@ikas/fe-api-client";
|
|
7
|
+
import { StringFilterInput, DateFilterInput, ProductOptionSet } from "../types";
|
|
8
|
+
|
|
9
|
+
const listProductOptionSet = async (
|
|
10
|
+
variables: QueryParams,
|
|
11
|
+
fields?: string[],
|
|
12
|
+
config?: ConfigType
|
|
13
|
+
) => {
|
|
14
|
+
try {
|
|
15
|
+
const { data, errors } = await fetchQuery({
|
|
16
|
+
operationName: "listProductOptionSet",
|
|
17
|
+
config,
|
|
18
|
+
variables,
|
|
19
|
+
allReturnFields,
|
|
20
|
+
fields,
|
|
21
|
+
query: (returnFields: string) => `
|
|
22
|
+
query listProductOptionSet (
|
|
23
|
+
$id: StringFilterInput,
|
|
24
|
+
$includeDeleted: Boolean,
|
|
25
|
+
$updatedAt: DateFilterInput,
|
|
26
|
+
) {
|
|
27
|
+
listProductOptionSet (
|
|
28
|
+
id: $id,
|
|
29
|
+
includeDeleted: $includeDeleted,
|
|
30
|
+
updatedAt: $updatedAt,
|
|
31
|
+
) ${returnFields}
|
|
32
|
+
}
|
|
33
|
+
`,
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
return new APIResponse<ProductOptionSet[]>(
|
|
37
|
+
data?.listProductOptionSet,
|
|
38
|
+
errors
|
|
39
|
+
);
|
|
40
|
+
} catch (err) {
|
|
41
|
+
return handleAPIError(err);
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export default listProductOptionSet;
|
|
46
|
+
|
|
47
|
+
export type QueryParams = {
|
|
48
|
+
id?: StringFilterInput | null;
|
|
49
|
+
includeDeleted?: boolean | null;
|
|
50
|
+
updatedAt?: DateFilterInput | null;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
const allReturnFields =
|
|
54
|
+
"{createdAt deleted id name options {createdAt dateSettings {max maxRelativeNextDate min minRelativeNextDate } deleted fileSettings {allowedExtensions maxQuantity minQuantity } id isOptional name optionalText order otherPrices {currencyCode price } price requiredOptionId requiredOptionValueIds selectSettings {maxSelect minSelect type values {colorCode createdAt deleted id order otherPrices {currencyCode price } price thumbnailImageId updatedAt value } } textSettings {max min } type updatedAt } translations {locale options {id name optionalText values {id value } } } updatedAt }";
|
|
55
|
+
|
|
56
|
+
export enum ResponseField {
|
|
57
|
+
CREATED_AT = "createdAt",
|
|
58
|
+
DELETED = "deleted",
|
|
59
|
+
ID = "id",
|
|
60
|
+
NAME = "name",
|
|
61
|
+
OPTIONS__CREATED_AT = "options.createdAt",
|
|
62
|
+
OPTIONS__DATE_SETTINGS__MAX = "options.dateSettings.max",
|
|
63
|
+
OPTIONS__DATE_SETTINGS__MAX_RELATIVE_NEXT_DATE = "options.dateSettings.maxRelativeNextDate",
|
|
64
|
+
OPTIONS__DATE_SETTINGS__MIN = "options.dateSettings.min",
|
|
65
|
+
OPTIONS__DATE_SETTINGS__MIN_RELATIVE_NEXT_DATE = "options.dateSettings.minRelativeNextDate",
|
|
66
|
+
OPTIONS__DELETED = "options.deleted",
|
|
67
|
+
OPTIONS__FILE_SETTINGS__ALLOWED_EXTENSIONS = "options.fileSettings.allowedExtensions",
|
|
68
|
+
OPTIONS__FILE_SETTINGS__MAX_QUANTITY = "options.fileSettings.maxQuantity",
|
|
69
|
+
OPTIONS__FILE_SETTINGS__MIN_QUANTITY = "options.fileSettings.minQuantity",
|
|
70
|
+
OPTIONS__ID = "options.id",
|
|
71
|
+
OPTIONS__IS_OPTIONAL = "options.isOptional",
|
|
72
|
+
OPTIONS__NAME = "options.name",
|
|
73
|
+
OPTIONS__OPTIONAL_TEXT = "options.optionalText",
|
|
74
|
+
OPTIONS__ORDER = "options.order",
|
|
75
|
+
OPTIONS__OTHER_PRICES__CURRENCY_CODE = "options.otherPrices.currencyCode",
|
|
76
|
+
OPTIONS__OTHER_PRICES__PRICE = "options.otherPrices.price",
|
|
77
|
+
OPTIONS__PRICE = "options.price",
|
|
78
|
+
OPTIONS__REQUIRED_OPTION_ID = "options.requiredOptionId",
|
|
79
|
+
OPTIONS__REQUIRED_OPTION_VALUE_IDS = "options.requiredOptionValueIds",
|
|
80
|
+
OPTIONS__SELECT_SETTINGS__MAX_SELECT = "options.selectSettings.maxSelect",
|
|
81
|
+
OPTIONS__SELECT_SETTINGS__MIN_SELECT = "options.selectSettings.minSelect",
|
|
82
|
+
OPTIONS__SELECT_SETTINGS__TYPE = "options.selectSettings.type",
|
|
83
|
+
OPTIONS__SELECT_SETTINGS__VALUES__COLOR_CODE = "options.selectSettings.values.colorCode",
|
|
84
|
+
OPTIONS__SELECT_SETTINGS__VALUES__CREATED_AT = "options.selectSettings.values.createdAt",
|
|
85
|
+
OPTIONS__SELECT_SETTINGS__VALUES__DELETED = "options.selectSettings.values.deleted",
|
|
86
|
+
OPTIONS__SELECT_SETTINGS__VALUES__ID = "options.selectSettings.values.id",
|
|
87
|
+
OPTIONS__SELECT_SETTINGS__VALUES__ORDER = "options.selectSettings.values.order",
|
|
88
|
+
OPTIONS__SELECT_SETTINGS__VALUES__OTHER_PRICES__CURRENCY_CODE = "options.selectSettings.values.otherPrices.currencyCode",
|
|
89
|
+
OPTIONS__SELECT_SETTINGS__VALUES__OTHER_PRICES__PRICE = "options.selectSettings.values.otherPrices.price",
|
|
90
|
+
OPTIONS__SELECT_SETTINGS__VALUES__PRICE = "options.selectSettings.values.price",
|
|
91
|
+
OPTIONS__SELECT_SETTINGS__VALUES__THUMBNAIL_IMAGE_ID = "options.selectSettings.values.thumbnailImageId",
|
|
92
|
+
OPTIONS__SELECT_SETTINGS__VALUES__UPDATED_AT = "options.selectSettings.values.updatedAt",
|
|
93
|
+
OPTIONS__SELECT_SETTINGS__VALUES__VALUE = "options.selectSettings.values.value",
|
|
94
|
+
OPTIONS__TEXT_SETTINGS__MAX = "options.textSettings.max",
|
|
95
|
+
OPTIONS__TEXT_SETTINGS__MIN = "options.textSettings.min",
|
|
96
|
+
OPTIONS__TYPE = "options.type",
|
|
97
|
+
OPTIONS__UPDATED_AT = "options.updatedAt",
|
|
98
|
+
TRANSLATIONS__LOCALE = "translations.locale",
|
|
99
|
+
TRANSLATIONS__OPTIONS__ID = "translations.options.id",
|
|
100
|
+
TRANSLATIONS__OPTIONS__NAME = "translations.options.name",
|
|
101
|
+
TRANSLATIONS__OPTIONS__OPTIONAL_TEXT = "translations.options.optionalText",
|
|
102
|
+
TRANSLATIONS__OPTIONS__VALUES__ID = "translations.options.values.id",
|
|
103
|
+
TRANSLATIONS__OPTIONS__VALUES__VALUE = "translations.options.values.value",
|
|
104
|
+
UPDATED_AT = "updatedAt",
|
|
105
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import {
|
|
2
|
+
fetchQuery,
|
|
3
|
+
ConfigType,
|
|
4
|
+
APIResponse,
|
|
5
|
+
handleAPIError,
|
|
6
|
+
} from "@ikas/fe-api-client";
|
|
7
|
+
import { ProductStockLocation } from "../types";
|
|
8
|
+
|
|
9
|
+
const listProductStockLocation = async (
|
|
10
|
+
variables: QueryParams,
|
|
11
|
+
fields?: string[],
|
|
12
|
+
config?: ConfigType
|
|
13
|
+
) => {
|
|
14
|
+
try {
|
|
15
|
+
const { data, errors } = await fetchQuery({
|
|
16
|
+
operationName: "listProductStockLocation",
|
|
17
|
+
config,
|
|
18
|
+
variables,
|
|
19
|
+
allReturnFields,
|
|
20
|
+
fields,
|
|
21
|
+
query: (returnFields: string) => `
|
|
22
|
+
query listProductStockLocation (
|
|
23
|
+
$stockLocationIdList: [String!]!,
|
|
24
|
+
$variantIdList: [String!]!,
|
|
25
|
+
) {
|
|
26
|
+
listProductStockLocation (
|
|
27
|
+
stockLocationIdList: $stockLocationIdList,
|
|
28
|
+
variantIdList: $variantIdList,
|
|
29
|
+
) ${returnFields}
|
|
30
|
+
}
|
|
31
|
+
`,
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
return new APIResponse<ProductStockLocation[]>(
|
|
35
|
+
data?.listProductStockLocation,
|
|
36
|
+
errors
|
|
37
|
+
);
|
|
38
|
+
} catch (err) {
|
|
39
|
+
return handleAPIError(err);
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export default listProductStockLocation;
|
|
44
|
+
|
|
45
|
+
export type QueryParams = {
|
|
46
|
+
stockLocationIdList: string[];
|
|
47
|
+
variantIdList: string[];
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
const allReturnFields =
|
|
51
|
+
"{createdAt deleted id productId stockCount stockLocationId updatedAt variantId }";
|
|
52
|
+
|
|
53
|
+
export enum ResponseField {
|
|
54
|
+
CREATED_AT = "createdAt",
|
|
55
|
+
DELETED = "deleted",
|
|
56
|
+
ID = "id",
|
|
57
|
+
PRODUCT_ID = "productId",
|
|
58
|
+
STOCK_COUNT = "stockCount",
|
|
59
|
+
STOCK_LOCATION_ID = "stockLocationId",
|
|
60
|
+
UPDATED_AT = "updatedAt",
|
|
61
|
+
VARIANT_ID = "variantId",
|
|
62
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import {
|
|
2
|
+
fetchQuery,
|
|
3
|
+
ConfigType,
|
|
4
|
+
APIResponse,
|
|
5
|
+
handleAPIError,
|
|
6
|
+
} from "@ikas/fe-api-client";
|
|
7
|
+
import {
|
|
8
|
+
DateFilterInput,
|
|
9
|
+
StringFilterInput,
|
|
10
|
+
PaginationInput,
|
|
11
|
+
BooleanFilterInput,
|
|
12
|
+
RafflePaginationResponse,
|
|
13
|
+
} from "../types";
|
|
14
|
+
|
|
15
|
+
const listRaffle = async (
|
|
16
|
+
variables: QueryParams,
|
|
17
|
+
fields?: string[],
|
|
18
|
+
config?: ConfigType
|
|
19
|
+
) => {
|
|
20
|
+
try {
|
|
21
|
+
const { data, errors } = await fetchQuery({
|
|
22
|
+
operationName: "listRaffle",
|
|
23
|
+
config,
|
|
24
|
+
variables,
|
|
25
|
+
allReturnFields,
|
|
26
|
+
fields,
|
|
27
|
+
query: (returnFields: string) => `
|
|
28
|
+
query listRaffle (
|
|
29
|
+
$end: DateFilterInput,
|
|
30
|
+
$id: StringFilterInput,
|
|
31
|
+
$includeDeleted: Boolean,
|
|
32
|
+
$name: StringFilterInput,
|
|
33
|
+
$pagination: PaginationInput,
|
|
34
|
+
$search: String,
|
|
35
|
+
$start: DateFilterInput,
|
|
36
|
+
$status: BooleanFilterInput,
|
|
37
|
+
$updatedAt: DateFilterInput,
|
|
38
|
+
) {
|
|
39
|
+
listRaffle (
|
|
40
|
+
end: $end,
|
|
41
|
+
id: $id,
|
|
42
|
+
includeDeleted: $includeDeleted,
|
|
43
|
+
name: $name,
|
|
44
|
+
pagination: $pagination,
|
|
45
|
+
search: $search,
|
|
46
|
+
start: $start,
|
|
47
|
+
status: $status,
|
|
48
|
+
updatedAt: $updatedAt,
|
|
49
|
+
) ${returnFields}
|
|
50
|
+
}
|
|
51
|
+
`,
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
return new APIResponse<RafflePaginationResponse>(data?.listRaffle, errors);
|
|
55
|
+
} catch (err) {
|
|
56
|
+
return handleAPIError(err);
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export default listRaffle;
|
|
61
|
+
|
|
62
|
+
export type QueryParams = {
|
|
63
|
+
end?: DateFilterInput | null;
|
|
64
|
+
id?: StringFilterInput | null;
|
|
65
|
+
includeDeleted?: boolean | null;
|
|
66
|
+
name?: StringFilterInput | null;
|
|
67
|
+
pagination?: PaginationInput | null;
|
|
68
|
+
search?: string | null;
|
|
69
|
+
start?: DateFilterInput | null;
|
|
70
|
+
status?: BooleanFilterInput | null;
|
|
71
|
+
updatedAt?: DateFilterInput | null;
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
const allReturnFields =
|
|
75
|
+
"{count data {createdAt dateRange {end start } deleted id metadata {canonicals createdAt deleted description disableIndex id pageTitle slug targetId targetType updatedAt } name participantCount raffleParticipantCreatedMailExtraData raffleParticipantWinnerMailExtraData requiredCustomerAccount status updatedAt variants {productId variantId } verificationType } hasNext limit page }";
|
|
76
|
+
|
|
77
|
+
export enum ResponseField {
|
|
78
|
+
COUNT = "count",
|
|
79
|
+
DATA__CREATED_AT = "data.createdAt",
|
|
80
|
+
DATA__DATE_RANGE__END = "data.dateRange.end",
|
|
81
|
+
DATA__DATE_RANGE__START = "data.dateRange.start",
|
|
82
|
+
DATA__DELETED = "data.deleted",
|
|
83
|
+
DATA__ID = "data.id",
|
|
84
|
+
DATA__METADATA__CANONICALS = "data.metadata.canonicals",
|
|
85
|
+
DATA__METADATA__CREATED_AT = "data.metadata.createdAt",
|
|
86
|
+
DATA__METADATA__DELETED = "data.metadata.deleted",
|
|
87
|
+
DATA__METADATA__DESCRIPTION = "data.metadata.description",
|
|
88
|
+
DATA__METADATA__DISABLE_INDEX = "data.metadata.disableIndex",
|
|
89
|
+
DATA__METADATA__ID = "data.metadata.id",
|
|
90
|
+
DATA__METADATA__PAGE_TITLE = "data.metadata.pageTitle",
|
|
91
|
+
DATA__METADATA__SLUG = "data.metadata.slug",
|
|
92
|
+
DATA__METADATA__TARGET_ID = "data.metadata.targetId",
|
|
93
|
+
DATA__METADATA__TARGET_TYPE = "data.metadata.targetType",
|
|
94
|
+
DATA__METADATA__UPDATED_AT = "data.metadata.updatedAt",
|
|
95
|
+
DATA__NAME = "data.name",
|
|
96
|
+
DATA__PARTICIPANT_COUNT = "data.participantCount",
|
|
97
|
+
DATA__RAFFLE_PARTICIPANT_CREATED_MAIL_EXTRA_DATA = "data.raffleParticipantCreatedMailExtraData",
|
|
98
|
+
DATA__RAFFLE_PARTICIPANT_WINNER_MAIL_EXTRA_DATA = "data.raffleParticipantWinnerMailExtraData",
|
|
99
|
+
DATA__REQUIRED_CUSTOMER_ACCOUNT = "data.requiredCustomerAccount",
|
|
100
|
+
DATA__STATUS = "data.status",
|
|
101
|
+
DATA__UPDATED_AT = "data.updatedAt",
|
|
102
|
+
DATA__VARIANTS__PRODUCT_ID = "data.variants.productId",
|
|
103
|
+
DATA__VARIANTS__VARIANT_ID = "data.variants.variantId",
|
|
104
|
+
DATA__VERIFICATION_TYPE = "data.verificationType",
|
|
105
|
+
HAS_NEXT = "hasNext",
|
|
106
|
+
LIMIT = "limit",
|
|
107
|
+
PAGE = "page",
|
|
108
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import {
|
|
2
|
+
fetchQuery,
|
|
3
|
+
ConfigType,
|
|
4
|
+
APIResponse,
|
|
5
|
+
handleAPIError,
|
|
6
|
+
} from "@ikas/fe-api-client";
|
|
7
|
+
import {
|
|
8
|
+
StringFilterInput,
|
|
9
|
+
PaginationInput,
|
|
10
|
+
RaffleMetadataTargetTypeEnumFilter,
|
|
11
|
+
DateFilterInput,
|
|
12
|
+
RaffleMetadata,
|
|
13
|
+
} from "../types";
|
|
14
|
+
|
|
15
|
+
const listRaffleMetadata = async (
|
|
16
|
+
variables: QueryParams,
|
|
17
|
+
fields?: string[],
|
|
18
|
+
config?: ConfigType
|
|
19
|
+
) => {
|
|
20
|
+
try {
|
|
21
|
+
const { data, errors } = await fetchQuery({
|
|
22
|
+
operationName: "listRaffleMetadata",
|
|
23
|
+
config,
|
|
24
|
+
variables,
|
|
25
|
+
allReturnFields,
|
|
26
|
+
fields,
|
|
27
|
+
query: (returnFields: string) => `
|
|
28
|
+
query listRaffleMetadata (
|
|
29
|
+
$id: StringFilterInput,
|
|
30
|
+
$includeDeleted: Boolean,
|
|
31
|
+
$pagination: PaginationInput,
|
|
32
|
+
$slug: StringFilterInput,
|
|
33
|
+
$targetId: StringFilterInput,
|
|
34
|
+
$targetType: RaffleMetadataTargetTypeEnumFilter,
|
|
35
|
+
$updatedAt: DateFilterInput,
|
|
36
|
+
) {
|
|
37
|
+
listRaffleMetadata (
|
|
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<RaffleMetadata[]>(data?.listRaffleMetadata, errors);
|
|
51
|
+
} catch (err) {
|
|
52
|
+
return handleAPIError(err);
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
export default listRaffleMetadata;
|
|
57
|
+
|
|
58
|
+
export type QueryParams = {
|
|
59
|
+
id?: StringFilterInput | null;
|
|
60
|
+
includeDeleted?: boolean | null;
|
|
61
|
+
pagination?: PaginationInput | null;
|
|
62
|
+
slug?: StringFilterInput | null;
|
|
63
|
+
targetId?: StringFilterInput | null;
|
|
64
|
+
targetType?: RaffleMetadataTargetTypeEnumFilter | null;
|
|
65
|
+
updatedAt?: DateFilterInput | null;
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
const allReturnFields =
|
|
69
|
+
"{canonicals createdAt deleted description disableIndex id pageTitle slug targetId targetType updatedAt }";
|
|
70
|
+
|
|
71
|
+
export enum ResponseField {
|
|
72
|
+
CANONICALS = "canonicals",
|
|
73
|
+
CREATED_AT = "createdAt",
|
|
74
|
+
DELETED = "deleted",
|
|
75
|
+
DESCRIPTION = "description",
|
|
76
|
+
DISABLE_INDEX = "disableIndex",
|
|
77
|
+
ID = "id",
|
|
78
|
+
PAGE_TITLE = "pageTitle",
|
|
79
|
+
SLUG = "slug",
|
|
80
|
+
TARGET_ID = "targetId",
|
|
81
|
+
TARGET_TYPE = "targetType",
|
|
82
|
+
UPDATED_AT = "updatedAt",
|
|
83
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import {
|
|
2
|
+
fetchQuery,
|
|
3
|
+
ConfigType,
|
|
4
|
+
APIResponse,
|
|
5
|
+
handleAPIError,
|
|
6
|
+
} from "@ikas/fe-api-client";
|
|
7
|
+
import { StringFilterInput, DateFilterInput, State } from "../types";
|
|
8
|
+
|
|
9
|
+
const listState = async (
|
|
10
|
+
variables: QueryParams,
|
|
11
|
+
fields?: string[],
|
|
12
|
+
config?: ConfigType
|
|
13
|
+
) => {
|
|
14
|
+
try {
|
|
15
|
+
const { data, errors } = await fetchQuery({
|
|
16
|
+
operationName: "listState",
|
|
17
|
+
config,
|
|
18
|
+
variables,
|
|
19
|
+
allReturnFields,
|
|
20
|
+
fields,
|
|
21
|
+
query: (returnFields: string) => `
|
|
22
|
+
query listState (
|
|
23
|
+
$countryId: StringFilterInput!,
|
|
24
|
+
$id: StringFilterInput,
|
|
25
|
+
$includeDeleted: Boolean,
|
|
26
|
+
$search: String,
|
|
27
|
+
$updatedAt: DateFilterInput,
|
|
28
|
+
) {
|
|
29
|
+
listState (
|
|
30
|
+
countryId: $countryId,
|
|
31
|
+
id: $id,
|
|
32
|
+
includeDeleted: $includeDeleted,
|
|
33
|
+
search: $search,
|
|
34
|
+
updatedAt: $updatedAt,
|
|
35
|
+
) ${returnFields}
|
|
36
|
+
}
|
|
37
|
+
`,
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
return new APIResponse<State[]>(data?.listState, errors);
|
|
41
|
+
} catch (err) {
|
|
42
|
+
return handleAPIError(err);
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
export default listState;
|
|
47
|
+
|
|
48
|
+
export type QueryParams = {
|
|
49
|
+
countryId: StringFilterInput;
|
|
50
|
+
id?: StringFilterInput | null;
|
|
51
|
+
includeDeleted?: boolean | null;
|
|
52
|
+
search?: string | null;
|
|
53
|
+
updatedAt?: DateFilterInput | null;
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
const allReturnFields =
|
|
57
|
+
"{countryId createdAt deleted id name stateCode updatedAt }";
|
|
58
|
+
|
|
59
|
+
export enum ResponseField {
|
|
60
|
+
COUNTRY_ID = "countryId",
|
|
61
|
+
CREATED_AT = "createdAt",
|
|
62
|
+
DELETED = "deleted",
|
|
63
|
+
ID = "id",
|
|
64
|
+
NAME = "name",
|
|
65
|
+
STATE_CODE = "stateCode",
|
|
66
|
+
UPDATED_AT = "updatedAt",
|
|
67
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import {
|
|
2
|
+
fetchQuery,
|
|
3
|
+
ConfigType,
|
|
4
|
+
APIResponse,
|
|
5
|
+
handleAPIError,
|
|
6
|
+
} from "@ikas/fe-api-client";
|
|
7
|
+
import { StringFilterInput, StockLocation } from "../types";
|
|
8
|
+
|
|
9
|
+
const listStockLocation = async (
|
|
10
|
+
variables: QueryParams,
|
|
11
|
+
fields?: string[],
|
|
12
|
+
config?: ConfigType
|
|
13
|
+
) => {
|
|
14
|
+
try {
|
|
15
|
+
const { data, errors } = await fetchQuery({
|
|
16
|
+
operationName: "listStockLocation",
|
|
17
|
+
config,
|
|
18
|
+
variables,
|
|
19
|
+
allReturnFields,
|
|
20
|
+
fields,
|
|
21
|
+
query: (returnFields: string) => `
|
|
22
|
+
query listStockLocation (
|
|
23
|
+
$id: StringFilterInput,
|
|
24
|
+
$includeDeleted: Boolean,
|
|
25
|
+
) {
|
|
26
|
+
listStockLocation (
|
|
27
|
+
id: $id,
|
|
28
|
+
includeDeleted: $includeDeleted,
|
|
29
|
+
) ${returnFields}
|
|
30
|
+
}
|
|
31
|
+
`,
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
return new APIResponse<StockLocation[]>(data?.listStockLocation, errors);
|
|
35
|
+
} catch (err) {
|
|
36
|
+
return handleAPIError(err);
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export default listStockLocation;
|
|
41
|
+
|
|
42
|
+
export type QueryParams = {
|
|
43
|
+
id?: StringFilterInput | null;
|
|
44
|
+
includeDeleted?: boolean | null;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
const allReturnFields =
|
|
48
|
+
"{address {address city {code id name } country {code id name } district {code id name } phone postalCode state {code id name } } createdAt deleted deliveryTime description id isRemindOutOfStockEnabled name outOfStockMailList type updatedAt }";
|
|
49
|
+
|
|
50
|
+
export enum ResponseField {
|
|
51
|
+
ADDRESS__ADDRESS = "address.address",
|
|
52
|
+
ADDRESS__CITY__CODE = "address.city.code",
|
|
53
|
+
ADDRESS__CITY__ID = "address.city.id",
|
|
54
|
+
ADDRESS__CITY__NAME = "address.city.name",
|
|
55
|
+
ADDRESS__COUNTRY__CODE = "address.country.code",
|
|
56
|
+
ADDRESS__COUNTRY__ID = "address.country.id",
|
|
57
|
+
ADDRESS__COUNTRY__NAME = "address.country.name",
|
|
58
|
+
ADDRESS__DISTRICT__CODE = "address.district.code",
|
|
59
|
+
ADDRESS__DISTRICT__ID = "address.district.id",
|
|
60
|
+
ADDRESS__DISTRICT__NAME = "address.district.name",
|
|
61
|
+
ADDRESS__PHONE = "address.phone",
|
|
62
|
+
ADDRESS__POSTAL_CODE = "address.postalCode",
|
|
63
|
+
ADDRESS__STATE__CODE = "address.state.code",
|
|
64
|
+
ADDRESS__STATE__ID = "address.state.id",
|
|
65
|
+
ADDRESS__STATE__NAME = "address.state.name",
|
|
66
|
+
CREATED_AT = "createdAt",
|
|
67
|
+
DELETED = "deleted",
|
|
68
|
+
DELIVERY_TIME = "deliveryTime",
|
|
69
|
+
DESCRIPTION = "description",
|
|
70
|
+
ID = "id",
|
|
71
|
+
IS_REMIND_OUT_OF_STOCK_ENABLED = "isRemindOutOfStockEnabled",
|
|
72
|
+
NAME = "name",
|
|
73
|
+
OUT_OF_STOCK_MAIL_LIST = "outOfStockMailList",
|
|
74
|
+
TYPE = "type",
|
|
75
|
+
UPDATED_AT = "updatedAt",
|
|
76
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import {
|
|
2
|
+
fetchQuery,
|
|
3
|
+
ConfigType,
|
|
4
|
+
APIResponse,
|
|
5
|
+
handleAPIError,
|
|
6
|
+
} from "@ikas/fe-api-client";
|
|
7
|
+
import { StringFilterInput, DateFilterInput, Town } from "../types";
|
|
8
|
+
|
|
9
|
+
const listTown = async (
|
|
10
|
+
variables: QueryParams,
|
|
11
|
+
fields?: string[],
|
|
12
|
+
config?: ConfigType
|
|
13
|
+
) => {
|
|
14
|
+
try {
|
|
15
|
+
const { data, errors } = await fetchQuery({
|
|
16
|
+
operationName: "listTown",
|
|
17
|
+
config,
|
|
18
|
+
variables,
|
|
19
|
+
allReturnFields,
|
|
20
|
+
fields,
|
|
21
|
+
query: (returnFields: string) => `
|
|
22
|
+
query listTown (
|
|
23
|
+
$districtId: StringFilterInput!,
|
|
24
|
+
$id: StringFilterInput,
|
|
25
|
+
$includeDeleted: Boolean,
|
|
26
|
+
$search: String,
|
|
27
|
+
$updatedAt: DateFilterInput,
|
|
28
|
+
) {
|
|
29
|
+
listTown (
|
|
30
|
+
districtId: $districtId,
|
|
31
|
+
id: $id,
|
|
32
|
+
includeDeleted: $includeDeleted,
|
|
33
|
+
search: $search,
|
|
34
|
+
updatedAt: $updatedAt,
|
|
35
|
+
) ${returnFields}
|
|
36
|
+
}
|
|
37
|
+
`,
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
return new APIResponse<Town[]>(data?.listTown, errors);
|
|
41
|
+
} catch (err) {
|
|
42
|
+
return handleAPIError(err);
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
export default listTown;
|
|
47
|
+
|
|
48
|
+
export type QueryParams = {
|
|
49
|
+
districtId: StringFilterInput;
|
|
50
|
+
id?: StringFilterInput | null;
|
|
51
|
+
includeDeleted?: boolean | null;
|
|
52
|
+
search?: string | null;
|
|
53
|
+
updatedAt?: DateFilterInput | null;
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
const allReturnFields =
|
|
57
|
+
"{createdAt deleted districtId id name order updatedAt }";
|
|
58
|
+
|
|
59
|
+
export enum ResponseField {
|
|
60
|
+
CREATED_AT = "createdAt",
|
|
61
|
+
DELETED = "deleted",
|
|
62
|
+
DISTRICT_ID = "districtId",
|
|
63
|
+
ID = "id",
|
|
64
|
+
NAME = "name",
|
|
65
|
+
ORDER = "order",
|
|
66
|
+
UPDATED_AT = "updatedAt",
|
|
67
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import {
|
|
2
|
+
fetchQuery,
|
|
3
|
+
ConfigType,
|
|
4
|
+
APIResponse,
|
|
5
|
+
handleAPIError,
|
|
6
|
+
} from "@ikas/fe-api-client";
|
|
7
|
+
import { StringFilterInput, DateFilterInput, VariantType } from "../types";
|
|
8
|
+
|
|
9
|
+
const listVariantType = async (
|
|
10
|
+
variables: QueryParams,
|
|
11
|
+
fields?: string[],
|
|
12
|
+
config?: ConfigType
|
|
13
|
+
) => {
|
|
14
|
+
try {
|
|
15
|
+
const { data, errors } = await fetchQuery({
|
|
16
|
+
operationName: "listVariantType",
|
|
17
|
+
config,
|
|
18
|
+
variables,
|
|
19
|
+
allReturnFields,
|
|
20
|
+
fields,
|
|
21
|
+
query: (returnFields: string) => `
|
|
22
|
+
query listVariantType (
|
|
23
|
+
$id: StringFilterInput,
|
|
24
|
+
$includeDeleted: Boolean,
|
|
25
|
+
$name: StringFilterInput,
|
|
26
|
+
$updatedAt: DateFilterInput,
|
|
27
|
+
) {
|
|
28
|
+
listVariantType (
|
|
29
|
+
id: $id,
|
|
30
|
+
includeDeleted: $includeDeleted,
|
|
31
|
+
name: $name,
|
|
32
|
+
updatedAt: $updatedAt,
|
|
33
|
+
) ${returnFields}
|
|
34
|
+
}
|
|
35
|
+
`,
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
return new APIResponse<VariantType[]>(data?.listVariantType, errors);
|
|
39
|
+
} catch (err) {
|
|
40
|
+
return handleAPIError(err);
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export default listVariantType;
|
|
45
|
+
|
|
46
|
+
export type QueryParams = {
|
|
47
|
+
id?: StringFilterInput | null;
|
|
48
|
+
includeDeleted?: boolean | null;
|
|
49
|
+
name?: StringFilterInput | null;
|
|
50
|
+
updatedAt?: DateFilterInput | null;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
const allReturnFields =
|
|
54
|
+
"{createdAt deleted id name selectionType translations {locale name values {id name } } updatedAt values {colorCode createdAt deleted id name thumbnailImageId updatedAt } }";
|
|
55
|
+
|
|
56
|
+
export enum ResponseField {
|
|
57
|
+
CREATED_AT = "createdAt",
|
|
58
|
+
DELETED = "deleted",
|
|
59
|
+
ID = "id",
|
|
60
|
+
NAME = "name",
|
|
61
|
+
SELECTION_TYPE = "selectionType",
|
|
62
|
+
TRANSLATIONS__LOCALE = "translations.locale",
|
|
63
|
+
TRANSLATIONS__NAME = "translations.name",
|
|
64
|
+
TRANSLATIONS__VALUES__ID = "translations.values.id",
|
|
65
|
+
TRANSLATIONS__VALUES__NAME = "translations.values.name",
|
|
66
|
+
UPDATED_AT = "updatedAt",
|
|
67
|
+
VALUES__COLOR_CODE = "values.colorCode",
|
|
68
|
+
VALUES__CREATED_AT = "values.createdAt",
|
|
69
|
+
VALUES__DELETED = "values.deleted",
|
|
70
|
+
VALUES__ID = "values.id",
|
|
71
|
+
VALUES__NAME = "values.name",
|
|
72
|
+
VALUES__THUMBNAIL_IMAGE_ID = "values.thumbnailImageId",
|
|
73
|
+
VALUES__UPDATED_AT = "values.updatedAt",
|
|
74
|
+
}
|