@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,113 @@
|
|
|
1
|
+
import {
|
|
2
|
+
fetchQuery,
|
|
3
|
+
ConfigType,
|
|
4
|
+
APIResponse,
|
|
5
|
+
handleAPIError,
|
|
6
|
+
} from "@ikas/fe-api-client";
|
|
7
|
+
import { CustomerLoginResponse } from "../types";
|
|
8
|
+
|
|
9
|
+
const customerLogin = async (
|
|
10
|
+
variables: QueryParams,
|
|
11
|
+
fields?: string[],
|
|
12
|
+
config?: ConfigType
|
|
13
|
+
) => {
|
|
14
|
+
try {
|
|
15
|
+
const { data, errors } = await fetchQuery({
|
|
16
|
+
operationName: "customerLogin",
|
|
17
|
+
config,
|
|
18
|
+
variables,
|
|
19
|
+
allReturnFields,
|
|
20
|
+
fields,
|
|
21
|
+
query: (returnFields: string) => `
|
|
22
|
+
mutation customerLogin (
|
|
23
|
+
$email: String!,
|
|
24
|
+
$password: String!,
|
|
25
|
+
) {
|
|
26
|
+
customerLogin (
|
|
27
|
+
email: $email,
|
|
28
|
+
password: $password,
|
|
29
|
+
) ${returnFields}
|
|
30
|
+
}
|
|
31
|
+
`,
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
return new APIResponse<CustomerLoginResponse>(data?.customerLogin, errors);
|
|
35
|
+
} catch (err) {
|
|
36
|
+
return handleAPIError(err);
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export default customerLogin;
|
|
41
|
+
|
|
42
|
+
export type QueryParams = {
|
|
43
|
+
email: string;
|
|
44
|
+
password: string;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
const allReturnFields =
|
|
48
|
+
"{customer {accountStatus accountStatusUpdatedAt addresses {addressLine1 addressLine2 attributes {customerAttributeId customerAttributeOptionId value } city {code id name } company country {code id iso2 iso3 name } createdAt deleted district {code id name } firstName id identityNumber isDefault lastName phone postalCode state {code id name } taxNumber taxOffice title updatedAt } attributes {customerAttributeId customerAttributeOptionId value } createdAt customerGroupIds customerSequence deleted email emailVerifiedDate firstName fullName id isEmailVerified isPhoneVerified lastName note orderCount passwordUpdateDate phone phoneVerifiedDate registrationSource subscriptionStatus subscriptionStatusUpdatedAt tagIds updatedAt } token tokenExpiry }";
|
|
49
|
+
|
|
50
|
+
export enum ResponseField {
|
|
51
|
+
CUSTOMER__ACCOUNT_STATUS = "customer.accountStatus",
|
|
52
|
+
CUSTOMER__ACCOUNT_STATUS_UPDATED_AT = "customer.accountStatusUpdatedAt",
|
|
53
|
+
CUSTOMER__ADDRESSES__ADDRESS_LINE1 = "customer.addresses.addressLine1",
|
|
54
|
+
CUSTOMER__ADDRESSES__ADDRESS_LINE2 = "customer.addresses.addressLine2",
|
|
55
|
+
CUSTOMER__ADDRESSES__ATTRIBUTES__CUSTOMER_ATTRIBUTE_ID = "customer.addresses.attributes.customerAttributeId",
|
|
56
|
+
CUSTOMER__ADDRESSES__ATTRIBUTES__CUSTOMER_ATTRIBUTE_OPTION_ID = "customer.addresses.attributes.customerAttributeOptionId",
|
|
57
|
+
CUSTOMER__ADDRESSES__ATTRIBUTES__VALUE = "customer.addresses.attributes.value",
|
|
58
|
+
CUSTOMER__ADDRESSES__CITY__CODE = "customer.addresses.city.code",
|
|
59
|
+
CUSTOMER__ADDRESSES__CITY__ID = "customer.addresses.city.id",
|
|
60
|
+
CUSTOMER__ADDRESSES__CITY__NAME = "customer.addresses.city.name",
|
|
61
|
+
CUSTOMER__ADDRESSES__COMPANY = "customer.addresses.company",
|
|
62
|
+
CUSTOMER__ADDRESSES__COUNTRY__CODE = "customer.addresses.country.code",
|
|
63
|
+
CUSTOMER__ADDRESSES__COUNTRY__ID = "customer.addresses.country.id",
|
|
64
|
+
CUSTOMER__ADDRESSES__COUNTRY__ISO2 = "customer.addresses.country.iso2",
|
|
65
|
+
CUSTOMER__ADDRESSES__COUNTRY__ISO3 = "customer.addresses.country.iso3",
|
|
66
|
+
CUSTOMER__ADDRESSES__COUNTRY__NAME = "customer.addresses.country.name",
|
|
67
|
+
CUSTOMER__ADDRESSES__CREATED_AT = "customer.addresses.createdAt",
|
|
68
|
+
CUSTOMER__ADDRESSES__DELETED = "customer.addresses.deleted",
|
|
69
|
+
CUSTOMER__ADDRESSES__DISTRICT__CODE = "customer.addresses.district.code",
|
|
70
|
+
CUSTOMER__ADDRESSES__DISTRICT__ID = "customer.addresses.district.id",
|
|
71
|
+
CUSTOMER__ADDRESSES__DISTRICT__NAME = "customer.addresses.district.name",
|
|
72
|
+
CUSTOMER__ADDRESSES__FIRST_NAME = "customer.addresses.firstName",
|
|
73
|
+
CUSTOMER__ADDRESSES__ID = "customer.addresses.id",
|
|
74
|
+
CUSTOMER__ADDRESSES__IDENTITY_NUMBER = "customer.addresses.identityNumber",
|
|
75
|
+
CUSTOMER__ADDRESSES__IS_DEFAULT = "customer.addresses.isDefault",
|
|
76
|
+
CUSTOMER__ADDRESSES__LAST_NAME = "customer.addresses.lastName",
|
|
77
|
+
CUSTOMER__ADDRESSES__PHONE = "customer.addresses.phone",
|
|
78
|
+
CUSTOMER__ADDRESSES__POSTAL_CODE = "customer.addresses.postalCode",
|
|
79
|
+
CUSTOMER__ADDRESSES__STATE__CODE = "customer.addresses.state.code",
|
|
80
|
+
CUSTOMER__ADDRESSES__STATE__ID = "customer.addresses.state.id",
|
|
81
|
+
CUSTOMER__ADDRESSES__STATE__NAME = "customer.addresses.state.name",
|
|
82
|
+
CUSTOMER__ADDRESSES__TAX_NUMBER = "customer.addresses.taxNumber",
|
|
83
|
+
CUSTOMER__ADDRESSES__TAX_OFFICE = "customer.addresses.taxOffice",
|
|
84
|
+
CUSTOMER__ADDRESSES__TITLE = "customer.addresses.title",
|
|
85
|
+
CUSTOMER__ADDRESSES__UPDATED_AT = "customer.addresses.updatedAt",
|
|
86
|
+
CUSTOMER__ATTRIBUTES__CUSTOMER_ATTRIBUTE_ID = "customer.attributes.customerAttributeId",
|
|
87
|
+
CUSTOMER__ATTRIBUTES__CUSTOMER_ATTRIBUTE_OPTION_ID = "customer.attributes.customerAttributeOptionId",
|
|
88
|
+
CUSTOMER__ATTRIBUTES__VALUE = "customer.attributes.value",
|
|
89
|
+
CUSTOMER__CREATED_AT = "customer.createdAt",
|
|
90
|
+
CUSTOMER__CUSTOMER_GROUP_IDS = "customer.customerGroupIds",
|
|
91
|
+
CUSTOMER__CUSTOMER_SEQUENCE = "customer.customerSequence",
|
|
92
|
+
CUSTOMER__DELETED = "customer.deleted",
|
|
93
|
+
CUSTOMER__EMAIL = "customer.email",
|
|
94
|
+
CUSTOMER__EMAIL_VERIFIED_DATE = "customer.emailVerifiedDate",
|
|
95
|
+
CUSTOMER__FIRST_NAME = "customer.firstName",
|
|
96
|
+
CUSTOMER__FULL_NAME = "customer.fullName",
|
|
97
|
+
CUSTOMER__ID = "customer.id",
|
|
98
|
+
CUSTOMER__IS_EMAIL_VERIFIED = "customer.isEmailVerified",
|
|
99
|
+
CUSTOMER__IS_PHONE_VERIFIED = "customer.isPhoneVerified",
|
|
100
|
+
CUSTOMER__LAST_NAME = "customer.lastName",
|
|
101
|
+
CUSTOMER__NOTE = "customer.note",
|
|
102
|
+
CUSTOMER__ORDER_COUNT = "customer.orderCount",
|
|
103
|
+
CUSTOMER__PASSWORD_UPDATE_DATE = "customer.passwordUpdateDate",
|
|
104
|
+
CUSTOMER__PHONE = "customer.phone",
|
|
105
|
+
CUSTOMER__PHONE_VERIFIED_DATE = "customer.phoneVerifiedDate",
|
|
106
|
+
CUSTOMER__REGISTRATION_SOURCE = "customer.registrationSource",
|
|
107
|
+
CUSTOMER__SUBSCRIPTION_STATUS = "customer.subscriptionStatus",
|
|
108
|
+
CUSTOMER__SUBSCRIPTION_STATUS_UPDATED_AT = "customer.subscriptionStatusUpdatedAt",
|
|
109
|
+
CUSTOMER__TAG_IDS = "customer.tagIds",
|
|
110
|
+
CUSTOMER__UPDATED_AT = "customer.updatedAt",
|
|
111
|
+
TOKEN = "token",
|
|
112
|
+
TOKEN_EXPIRY = "tokenExpiry",
|
|
113
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import {
|
|
2
|
+
fetchQuery,
|
|
3
|
+
ConfigType,
|
|
4
|
+
APIResponse,
|
|
5
|
+
handleAPIError,
|
|
6
|
+
} from "@ikas/fe-api-client";
|
|
7
|
+
|
|
8
|
+
const customerRecoverPassword = async (
|
|
9
|
+
variables: QueryParams,
|
|
10
|
+
config?: ConfigType
|
|
11
|
+
) => {
|
|
12
|
+
try {
|
|
13
|
+
const { data, errors } = await fetchQuery({
|
|
14
|
+
operationName: "customerRecoverPassword",
|
|
15
|
+
config,
|
|
16
|
+
variables,
|
|
17
|
+
query: `
|
|
18
|
+
mutation customerRecoverPassword (
|
|
19
|
+
$password: String!,
|
|
20
|
+
$passwordAgain: String!,
|
|
21
|
+
$token: String!,
|
|
22
|
+
) {
|
|
23
|
+
customerRecoverPassword (
|
|
24
|
+
password: $password,
|
|
25
|
+
passwordAgain: $passwordAgain,
|
|
26
|
+
token: $token,
|
|
27
|
+
)
|
|
28
|
+
}
|
|
29
|
+
`,
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
return new APIResponse<boolean>(data?.customerRecoverPassword, errors);
|
|
33
|
+
} catch (err) {
|
|
34
|
+
return handleAPIError(err);
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export default customerRecoverPassword;
|
|
39
|
+
|
|
40
|
+
export type QueryParams = {
|
|
41
|
+
password: string;
|
|
42
|
+
passwordAgain: string;
|
|
43
|
+
token: string;
|
|
44
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import {
|
|
2
|
+
fetchQuery,
|
|
3
|
+
ConfigType,
|
|
4
|
+
APIResponse,
|
|
5
|
+
handleAPIError,
|
|
6
|
+
} from "@ikas/fe-api-client";
|
|
7
|
+
import { CustomerRefreshTokenResponse } from "../types";
|
|
8
|
+
|
|
9
|
+
const customerRefreshToken = async (
|
|
10
|
+
variables: QueryParams,
|
|
11
|
+
fields?: string[],
|
|
12
|
+
config?: ConfigType
|
|
13
|
+
) => {
|
|
14
|
+
try {
|
|
15
|
+
const { data, errors } = await fetchQuery({
|
|
16
|
+
operationName: "customerRefreshToken",
|
|
17
|
+
config,
|
|
18
|
+
variables,
|
|
19
|
+
allReturnFields,
|
|
20
|
+
fields,
|
|
21
|
+
query: (returnFields: string) => `
|
|
22
|
+
mutation customerRefreshToken (
|
|
23
|
+
$token: String!,
|
|
24
|
+
) {
|
|
25
|
+
customerRefreshToken (
|
|
26
|
+
token: $token,
|
|
27
|
+
) ${returnFields}
|
|
28
|
+
}
|
|
29
|
+
`,
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
return new APIResponse<CustomerRefreshTokenResponse>(
|
|
33
|
+
data?.customerRefreshToken,
|
|
34
|
+
errors
|
|
35
|
+
);
|
|
36
|
+
} catch (err) {
|
|
37
|
+
return handleAPIError(err);
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export default customerRefreshToken;
|
|
42
|
+
|
|
43
|
+
export type QueryParams = {
|
|
44
|
+
token: string;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
const allReturnFields = "{token tokenExpiry }";
|
|
48
|
+
|
|
49
|
+
export enum ResponseField {
|
|
50
|
+
TOKEN = "token",
|
|
51
|
+
TOKEN_EXPIRY = "tokenExpiry",
|
|
52
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import {
|
|
2
|
+
fetchQuery,
|
|
3
|
+
ConfigType,
|
|
4
|
+
APIResponse,
|
|
5
|
+
handleAPIError,
|
|
6
|
+
} from "@ikas/fe-api-client";
|
|
7
|
+
|
|
8
|
+
const deleteRaffleParticipantsList = async (
|
|
9
|
+
variables: QueryParams,
|
|
10
|
+
config?: ConfigType
|
|
11
|
+
) => {
|
|
12
|
+
try {
|
|
13
|
+
const { data, errors } = await fetchQuery({
|
|
14
|
+
operationName: "deleteRaffleParticipantsList",
|
|
15
|
+
config,
|
|
16
|
+
variables,
|
|
17
|
+
query: `
|
|
18
|
+
mutation deleteRaffleParticipantsList (
|
|
19
|
+
$idList: [String!]!,
|
|
20
|
+
) {
|
|
21
|
+
deleteRaffleParticipantsList (
|
|
22
|
+
idList: $idList,
|
|
23
|
+
)
|
|
24
|
+
}
|
|
25
|
+
`,
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
return new APIResponse<boolean>(data?.deleteRaffleParticipantsList, errors);
|
|
29
|
+
} catch (err) {
|
|
30
|
+
return handleAPIError(err);
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export default deleteRaffleParticipantsList;
|
|
35
|
+
|
|
36
|
+
export type QueryParams = {
|
|
37
|
+
idList: string[];
|
|
38
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import {
|
|
2
|
+
fetchQuery,
|
|
3
|
+
ConfigType,
|
|
4
|
+
APIResponse,
|
|
5
|
+
handleAPIError,
|
|
6
|
+
} from "@ikas/fe-api-client";
|
|
7
|
+
import { GetOrderLineFile } from "../types";
|
|
8
|
+
|
|
9
|
+
const getOrderLineFile = async (
|
|
10
|
+
variables: QueryParams,
|
|
11
|
+
config?: ConfigType
|
|
12
|
+
) => {
|
|
13
|
+
try {
|
|
14
|
+
const { data, errors } = await fetchQuery({
|
|
15
|
+
operationName: "getOrderLineFile",
|
|
16
|
+
config,
|
|
17
|
+
variables,
|
|
18
|
+
query: `
|
|
19
|
+
mutation getOrderLineFile (
|
|
20
|
+
$input: GetOrderLineFile!,
|
|
21
|
+
) {
|
|
22
|
+
getOrderLineFile (
|
|
23
|
+
input: $input,
|
|
24
|
+
)
|
|
25
|
+
}
|
|
26
|
+
`,
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
return new APIResponse<string>(data?.getOrderLineFile, errors);
|
|
30
|
+
} catch (err) {
|
|
31
|
+
return handleAPIError(err);
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export default getOrderLineFile;
|
|
36
|
+
|
|
37
|
+
export type QueryParams = {
|
|
38
|
+
input: GetOrderLineFile;
|
|
39
|
+
};
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import {
|
|
2
|
+
fetchQuery,
|
|
3
|
+
ConfigType,
|
|
4
|
+
APIResponse,
|
|
5
|
+
handleAPIError,
|
|
6
|
+
} from "@ikas/fe-api-client";
|
|
7
|
+
import { CustomerAttributeValueInput, CustomerLoginResponse } from "../types";
|
|
8
|
+
|
|
9
|
+
const registerCustomer = async (
|
|
10
|
+
variables: QueryParams,
|
|
11
|
+
fields?: string[],
|
|
12
|
+
config?: ConfigType
|
|
13
|
+
) => {
|
|
14
|
+
try {
|
|
15
|
+
const { data, errors } = await fetchQuery({
|
|
16
|
+
operationName: "registerCustomer",
|
|
17
|
+
config,
|
|
18
|
+
variables,
|
|
19
|
+
allReturnFields,
|
|
20
|
+
fields,
|
|
21
|
+
query: (returnFields: string) => `
|
|
22
|
+
mutation registerCustomer (
|
|
23
|
+
$attributes: [CustomerAttributeValueInput!],
|
|
24
|
+
$email: String!,
|
|
25
|
+
$firstName: String!,
|
|
26
|
+
$isAcceptMarketing: Boolean,
|
|
27
|
+
$lastName: String!,
|
|
28
|
+
$locale: String,
|
|
29
|
+
$password: String!,
|
|
30
|
+
) {
|
|
31
|
+
registerCustomer (
|
|
32
|
+
attributes: $attributes,
|
|
33
|
+
email: $email,
|
|
34
|
+
firstName: $firstName,
|
|
35
|
+
isAcceptMarketing: $isAcceptMarketing,
|
|
36
|
+
lastName: $lastName,
|
|
37
|
+
locale: $locale,
|
|
38
|
+
password: $password,
|
|
39
|
+
) ${returnFields}
|
|
40
|
+
}
|
|
41
|
+
`,
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
return new APIResponse<CustomerLoginResponse>(
|
|
45
|
+
data?.registerCustomer,
|
|
46
|
+
errors
|
|
47
|
+
);
|
|
48
|
+
} catch (err) {
|
|
49
|
+
return handleAPIError(err);
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
export default registerCustomer;
|
|
54
|
+
|
|
55
|
+
export type QueryParams = {
|
|
56
|
+
attributes?: CustomerAttributeValueInput[] | null;
|
|
57
|
+
email: string;
|
|
58
|
+
firstName: string;
|
|
59
|
+
isAcceptMarketing?: boolean | null;
|
|
60
|
+
lastName: string;
|
|
61
|
+
locale?: string | null;
|
|
62
|
+
password: string;
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
const allReturnFields =
|
|
66
|
+
"{customer {accountStatus accountStatusUpdatedAt addresses {addressLine1 addressLine2 attributes {customerAttributeId customerAttributeOptionId value } city {code id name } company country {code id iso2 iso3 name } createdAt deleted district {code id name } firstName id identityNumber isDefault lastName phone postalCode state {code id name } taxNumber taxOffice title updatedAt } attributes {customerAttributeId customerAttributeOptionId value } createdAt customerGroupIds customerSequence deleted email emailVerifiedDate firstName fullName id isEmailVerified isPhoneVerified lastName note orderCount passwordUpdateDate phone phoneVerifiedDate registrationSource subscriptionStatus subscriptionStatusUpdatedAt tagIds updatedAt } token tokenExpiry }";
|
|
67
|
+
|
|
68
|
+
export enum ResponseField {
|
|
69
|
+
CUSTOMER__ACCOUNT_STATUS = "customer.accountStatus",
|
|
70
|
+
CUSTOMER__ACCOUNT_STATUS_UPDATED_AT = "customer.accountStatusUpdatedAt",
|
|
71
|
+
CUSTOMER__ADDRESSES__ADDRESS_LINE1 = "customer.addresses.addressLine1",
|
|
72
|
+
CUSTOMER__ADDRESSES__ADDRESS_LINE2 = "customer.addresses.addressLine2",
|
|
73
|
+
CUSTOMER__ADDRESSES__ATTRIBUTES__CUSTOMER_ATTRIBUTE_ID = "customer.addresses.attributes.customerAttributeId",
|
|
74
|
+
CUSTOMER__ADDRESSES__ATTRIBUTES__CUSTOMER_ATTRIBUTE_OPTION_ID = "customer.addresses.attributes.customerAttributeOptionId",
|
|
75
|
+
CUSTOMER__ADDRESSES__ATTRIBUTES__VALUE = "customer.addresses.attributes.value",
|
|
76
|
+
CUSTOMER__ADDRESSES__CITY__CODE = "customer.addresses.city.code",
|
|
77
|
+
CUSTOMER__ADDRESSES__CITY__ID = "customer.addresses.city.id",
|
|
78
|
+
CUSTOMER__ADDRESSES__CITY__NAME = "customer.addresses.city.name",
|
|
79
|
+
CUSTOMER__ADDRESSES__COMPANY = "customer.addresses.company",
|
|
80
|
+
CUSTOMER__ADDRESSES__COUNTRY__CODE = "customer.addresses.country.code",
|
|
81
|
+
CUSTOMER__ADDRESSES__COUNTRY__ID = "customer.addresses.country.id",
|
|
82
|
+
CUSTOMER__ADDRESSES__COUNTRY__ISO2 = "customer.addresses.country.iso2",
|
|
83
|
+
CUSTOMER__ADDRESSES__COUNTRY__ISO3 = "customer.addresses.country.iso3",
|
|
84
|
+
CUSTOMER__ADDRESSES__COUNTRY__NAME = "customer.addresses.country.name",
|
|
85
|
+
CUSTOMER__ADDRESSES__CREATED_AT = "customer.addresses.createdAt",
|
|
86
|
+
CUSTOMER__ADDRESSES__DELETED = "customer.addresses.deleted",
|
|
87
|
+
CUSTOMER__ADDRESSES__DISTRICT__CODE = "customer.addresses.district.code",
|
|
88
|
+
CUSTOMER__ADDRESSES__DISTRICT__ID = "customer.addresses.district.id",
|
|
89
|
+
CUSTOMER__ADDRESSES__DISTRICT__NAME = "customer.addresses.district.name",
|
|
90
|
+
CUSTOMER__ADDRESSES__FIRST_NAME = "customer.addresses.firstName",
|
|
91
|
+
CUSTOMER__ADDRESSES__ID = "customer.addresses.id",
|
|
92
|
+
CUSTOMER__ADDRESSES__IDENTITY_NUMBER = "customer.addresses.identityNumber",
|
|
93
|
+
CUSTOMER__ADDRESSES__IS_DEFAULT = "customer.addresses.isDefault",
|
|
94
|
+
CUSTOMER__ADDRESSES__LAST_NAME = "customer.addresses.lastName",
|
|
95
|
+
CUSTOMER__ADDRESSES__PHONE = "customer.addresses.phone",
|
|
96
|
+
CUSTOMER__ADDRESSES__POSTAL_CODE = "customer.addresses.postalCode",
|
|
97
|
+
CUSTOMER__ADDRESSES__STATE__CODE = "customer.addresses.state.code",
|
|
98
|
+
CUSTOMER__ADDRESSES__STATE__ID = "customer.addresses.state.id",
|
|
99
|
+
CUSTOMER__ADDRESSES__STATE__NAME = "customer.addresses.state.name",
|
|
100
|
+
CUSTOMER__ADDRESSES__TAX_NUMBER = "customer.addresses.taxNumber",
|
|
101
|
+
CUSTOMER__ADDRESSES__TAX_OFFICE = "customer.addresses.taxOffice",
|
|
102
|
+
CUSTOMER__ADDRESSES__TITLE = "customer.addresses.title",
|
|
103
|
+
CUSTOMER__ADDRESSES__UPDATED_AT = "customer.addresses.updatedAt",
|
|
104
|
+
CUSTOMER__ATTRIBUTES__CUSTOMER_ATTRIBUTE_ID = "customer.attributes.customerAttributeId",
|
|
105
|
+
CUSTOMER__ATTRIBUTES__CUSTOMER_ATTRIBUTE_OPTION_ID = "customer.attributes.customerAttributeOptionId",
|
|
106
|
+
CUSTOMER__ATTRIBUTES__VALUE = "customer.attributes.value",
|
|
107
|
+
CUSTOMER__CREATED_AT = "customer.createdAt",
|
|
108
|
+
CUSTOMER__CUSTOMER_GROUP_IDS = "customer.customerGroupIds",
|
|
109
|
+
CUSTOMER__CUSTOMER_SEQUENCE = "customer.customerSequence",
|
|
110
|
+
CUSTOMER__DELETED = "customer.deleted",
|
|
111
|
+
CUSTOMER__EMAIL = "customer.email",
|
|
112
|
+
CUSTOMER__EMAIL_VERIFIED_DATE = "customer.emailVerifiedDate",
|
|
113
|
+
CUSTOMER__FIRST_NAME = "customer.firstName",
|
|
114
|
+
CUSTOMER__FULL_NAME = "customer.fullName",
|
|
115
|
+
CUSTOMER__ID = "customer.id",
|
|
116
|
+
CUSTOMER__IS_EMAIL_VERIFIED = "customer.isEmailVerified",
|
|
117
|
+
CUSTOMER__IS_PHONE_VERIFIED = "customer.isPhoneVerified",
|
|
118
|
+
CUSTOMER__LAST_NAME = "customer.lastName",
|
|
119
|
+
CUSTOMER__NOTE = "customer.note",
|
|
120
|
+
CUSTOMER__ORDER_COUNT = "customer.orderCount",
|
|
121
|
+
CUSTOMER__PASSWORD_UPDATE_DATE = "customer.passwordUpdateDate",
|
|
122
|
+
CUSTOMER__PHONE = "customer.phone",
|
|
123
|
+
CUSTOMER__PHONE_VERIFIED_DATE = "customer.phoneVerifiedDate",
|
|
124
|
+
CUSTOMER__REGISTRATION_SOURCE = "customer.registrationSource",
|
|
125
|
+
CUSTOMER__SUBSCRIPTION_STATUS = "customer.subscriptionStatus",
|
|
126
|
+
CUSTOMER__SUBSCRIPTION_STATUS_UPDATED_AT = "customer.subscriptionStatusUpdatedAt",
|
|
127
|
+
CUSTOMER__TAG_IDS = "customer.tagIds",
|
|
128
|
+
CUSTOMER__UPDATED_AT = "customer.updatedAt",
|
|
129
|
+
TOKEN = "token",
|
|
130
|
+
TOKEN_EXPIRY = "tokenExpiry",
|
|
131
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import {
|
|
2
|
+
fetchQuery,
|
|
3
|
+
ConfigType,
|
|
4
|
+
APIResponse,
|
|
5
|
+
handleAPIError,
|
|
6
|
+
} from "@ikas/fe-api-client";
|
|
7
|
+
import {
|
|
8
|
+
RetrieveInstallmentInfoInput,
|
|
9
|
+
RetrieveInstallmentInfoResponse,
|
|
10
|
+
} from "../types";
|
|
11
|
+
|
|
12
|
+
const retrieveInstallmentInfo = async (
|
|
13
|
+
variables: QueryParams,
|
|
14
|
+
fields?: string[],
|
|
15
|
+
config?: ConfigType
|
|
16
|
+
) => {
|
|
17
|
+
try {
|
|
18
|
+
const { data, errors } = await fetchQuery({
|
|
19
|
+
operationName: "retrieveInstallmentInfo",
|
|
20
|
+
config,
|
|
21
|
+
variables,
|
|
22
|
+
allReturnFields,
|
|
23
|
+
fields,
|
|
24
|
+
query: (returnFields: string) => `
|
|
25
|
+
mutation retrieveInstallmentInfo (
|
|
26
|
+
$input: RetrieveInstallmentInfoInput!,
|
|
27
|
+
) {
|
|
28
|
+
retrieveInstallmentInfo (
|
|
29
|
+
input: $input,
|
|
30
|
+
) ${returnFields}
|
|
31
|
+
}
|
|
32
|
+
`,
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
return new APIResponse<RetrieveInstallmentInfoResponse>(
|
|
36
|
+
data?.retrieveInstallmentInfo,
|
|
37
|
+
errors
|
|
38
|
+
);
|
|
39
|
+
} catch (err) {
|
|
40
|
+
return handleAPIError(err);
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export default retrieveInstallmentInfo;
|
|
45
|
+
|
|
46
|
+
export type QueryParams = {
|
|
47
|
+
input: RetrieveInstallmentInfoInput;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
const allReturnFields =
|
|
51
|
+
"{bankName binNumber cardAssociation cardFamily cardType installmentPrices {installmentCount installmentPrice originalRate rate totalPrice } price }";
|
|
52
|
+
|
|
53
|
+
export enum ResponseField {
|
|
54
|
+
BANK_NAME = "bankName",
|
|
55
|
+
BIN_NUMBER = "binNumber",
|
|
56
|
+
CARD_ASSOCIATION = "cardAssociation",
|
|
57
|
+
CARD_FAMILY = "cardFamily",
|
|
58
|
+
CARD_TYPE = "cardType",
|
|
59
|
+
INSTALLMENT_PRICES__INSTALLMENT_COUNT = "installmentPrices.installmentCount",
|
|
60
|
+
INSTALLMENT_PRICES__INSTALLMENT_PRICE = "installmentPrices.installmentPrice",
|
|
61
|
+
INSTALLMENT_PRICES__ORIGINAL_RATE = "installmentPrices.originalRate",
|
|
62
|
+
INSTALLMENT_PRICES__RATE = "installmentPrices.rate",
|
|
63
|
+
INSTALLMENT_PRICES__TOTAL_PRICE = "installmentPrices.totalPrice",
|
|
64
|
+
PRICE = "price",
|
|
65
|
+
}
|