import { ApolloQueryResult , FetchPolicy , FetchResult } from '@apollo/client/core' ; import { ExecutionResult } from 'graphql' ; import { CustomQuery } from '@vue-storefront/core' ; import { AddConfigurableProductsToCartInput , AddConfigurableProductsToCartMutation , AddSimpleProductsToCartInput , AddSimpleProductsToCartMutation , AddDownloadableProductsToCartInput , AddDownloadableProductsToCartMutation , AddVirtualProductsToCartInput , AddVirtualProductsToCartMutation , AppliedCoupon , ApplyCouponToCartInput , ApplyCouponToCartMutation , AvailableShippingMethod , AvailableStoresQuery , BundleProduct , Cart as CartInterface , CartItemInterface , CartQuery , CategoryFilterInput , CategoryListQuery , CategoryListQueryVariables , CategorySearchQuery , CategorySearchQueryVariables , CategoryTree , CmsPage , CmsPageQuery , ConfigurableProduct , CountriesListQuery , CountryInformationQuery , CurrencyQuery , CustomerAddress as CustomerAddressInterface , CustomerAddressInput , CustomerAvailablePaymentMethodsQuery , CustomerAvailableShippingMethodsQuery , CustomerCartQuery , CustomerCreateInput , CustomerOrder as CustomerOrderInterface , CustomerOrdersQuery , CustomerQuery , CustomerUpdateInput , DeleteCustomerAddressMutation , GenerateCustomerTokenMutation , GuestAvailablePaymentMethodsQuery , GuestAvailableShippingMethodsQuery , MergeCartsMutation , Order as OrderInterface , PlaceOrderInput , PlaceOrderMutation , ProductAttributeFilterInput , ProductAttributeSortInput , ProductDetailsQuery , ProductInterface , ProductReviewQuery , ProductReviewRatingsMetadataQuery , ProductsListQuery , RelatedProductQuery , RemoveCouponFromCartInput , RemoveCouponFromCartMutation , RemoveItemFromCartInput , RemoveItemFromCartMutation , RevokeCustomerTokenMutation , SetBillingAddressOnCartInput , SetBillingAddressOnCartMutation , SetGuestEmailOnCartInput , SetGuestEmailOnCartMutation , SetPaymentMethodOnCartMutation , SetShippingAddressesOnCartInput , SetShippingAddressesOnCartMutation , SetShippingMethodsOnCartInput , SetShippingMethodsOnCartMutation , ShippingCartAddress , StoreConfigQuery , UpdateCartItemsInput , UpdateCartItemsMutation , UpdateCustomerAddressMutation , UpsellProductsQuery , UrlResolverQuery , WishlistItemInterface , WishlistQuery , WishlistQueryVariables , CreateProductReviewInput , CreateEmptyCartMutation , CreateProductReviewMutation , CustomerProductReviewQuery , SubscribeEmailToNewsletterMutationVariables , SubscribeEmailToNewsletterMutation , UpdateCustomerMutation , CreateCustomerMutation , AddProductsToWishlistMutationVariables , AddProductsToWishlistMutation , UpdateCustomerEmailMutationVariables , RemoveProductsFromWishlistMutationVariables , RemoveProductsFromWishlistMutation , GetCustomerAddressesQuery , AddProductsToCartMutation , CmsBlockQuery , GroupedProduct , AddBundleProductsToCartInput , AddBundleProductsToCartMutation , RequestPasswordResetEmailMutation , RequestPasswordResetEmailMutationVariables , ResetPasswordMutationVariables , ResetPasswordMutation , ChangeCustomerPasswordMutation , CreateCustomerAddressMutation , DownloadableProduct , VirtualProduct , CustomerOrdersFilterInput , } from './GraphQL' ; import { SetPaymentMethodOnCartInputs } from '../api/setPaymentMethodOnCart' ; import { CustomerProductReviewParams } from '../api/customerProductReview' ; import { AddProductsToCartInput } from '../api/addProductsToCart' ; export interface Product extends ProductInterface , ConfigurableProduct , Omit < BundleProduct , 'items' > , Omit < GroupedProduct , 'items' > , Omit < DownloadableProduct , 'items' > , Omit < VirtualProduct , 'items' > { } export type AddressOnCart = ShippingCartAddress ; export type AvailableStores = AvailableStoresQuery [ 'availableStores' ] ; export type Cart = CartInterface ; export type CartItem = CartItemInterface ; export type Category = CategoryTree | CategorySearchQuery [ 'categoryList' ] [ 0 ] ; export type CategoryFilter = CategoryFilterInput ; export type CategoryMenu = CategoryTree ; export type Countries = CountriesListQuery [ 'countries' ] [ 0 ] ; export type Coupon = AppliedCoupon ; export type CustomerAddress = CustomerAddressInterface ; export type CustomerOrder = CustomerOrderInterface ; export type CustomerUpdateParameters = CustomerCreateInput ; export type Order = OrderInterface ; export type Page = CmsPage | CmsPageQuery [ 'cmsPage' ] ; export type ProductAttributeFilter = ProductAttributeFilterInput ; export type ProductReview = ProductReviewQuery [ 'products' ] [ 'items' ] [ 0 ] [ 'reviews' ] [ 'items' ] [ 0 ] ; export type ProductReviews = ProductReviewQuery [ 'products' ] [ 'items' ] [ 0 ] ; export type ReviewMetadata = ProductReviewRatingsMetadataQuery [ 'productReviewRatingsMetadata' ] [ 'items' ] [ 0 ] ; export type Route = UrlResolverQuery [ 'urlResolver' ] ; export type ShippingMethod = AvailableShippingMethod ; export type StoreConfig = StoreConfigQuery [ 'storeConfig' ] ; export type WishlistProduct = WishlistItemInterface ; export const enum ProductsQueryType { List = 'LIST' , Detail = 'DETAIL' } export type GetProductSearchParams = { pageSize ? : number ; currentPage ? : number ; search ? : string ; filter ? : ProductAttributeFilterInput ; sort ? : ProductAttributeSortInput ; configurations ? : string [ ] ; } ; export type GetOrdersSearchParams = { pageSize ? : number ; currentPage ? : number ; filter ? : CustomerOrdersFilterInput ; } ; export enum MagentoCustomerGender { Male = 1 , Female = 2 } export interface MagentoApiMethods { addBundleProductsToCart ( input , customQuery ? ) : Promise < FetchResult < AddBundleProductsToCartMutation > > ; addConfigurableProductsToCart ( input , customQuery ? ) : Promise < FetchResult < AddConfigurableProductsToCartMutation > > ; addProductsToCart ( input , customQuery ? ) : Promise < FetchResult < AddProductsToCartMutation > > ; addProductToWishList ( input , customQuery ? ) : Promise < FetchResult < AddProductsToWishlistMutation > > ; addSimpleProductsToCart ( input , customQuery ? ) : Promise < FetchResult < AddSimpleProductsToCartMutation > > ; addDownloadableProductsToCart ( input , customQuery ? ) : Promise < FetchResult < AddDownloadableProductsToCartMutation > > ; addVirtualProductsToCart ( input , customQuery ? ) : Promise < FetchResult < AddVirtualProductsToCartMutation > > ; applyCouponToCart ( input , customQuery ? ) : Promise < FetchResult < ApplyCouponToCartMutation > > ; availableStores ( customQuery ? ) : Promise < ApolloQueryResult < AvailableStoresQuery > > ; cart ( cartId , customQuery ? ) : Promise < ApolloQueryResult < CartQuery > > ; categoryList ( categoryFilter ? , customQuery ? ) : Promise < ApolloQueryResult < CategoryListQuery > > ; categorySearch ( categoryFilter ? , customQuery ? ) : Promise < ApolloQueryResult < CategorySearchQuery > > ; changeCustomerPassword ( params , customQuery ? ) : Promise < FetchResult < ChangeCustomerPasswordMutation > > ; cmsBlocks ( identifiers , customQuery ? ) : Promise < ApolloQueryResult < CmsBlockQuery > > ; cmsPage ( identifier , customQuery ? ) : Promise < ApolloQueryResult < CmsPageQuery > > ; countries ( customQuery ? ) : Promise < ApolloQueryResult < CountriesListQuery > > ; country ( id , customQuery ? ) : Promise < ApolloQueryResult < CountryInformationQuery > > ; createCustomer ( input , customQuery ? ) : Promise < FetchResult < CreateCustomerMutation > > ; createCustomerAddress ( input , customQuery ? ) : Promise < FetchResult < CreateCustomerAddressMutation > > ; createEmptyCart ( customQuery ? ) : Promise < FetchResult < CreateEmptyCartMutation > > ; createProductReview ( input , customQuery ? ) : Promise < FetchResult < CreateProductReviewMutation > > ; currency ( customQuery ? ) : Promise < FetchResult < CurrencyQuery > > ; customer ( customQuery ? ) : Promise < ApolloQueryResult < CustomerQuery > > ; customerCart ( customQuery ? ) : Promise < ApolloQueryResult < CustomerCartQuery > > ; customerOrders ( searchParams , customQuery ? ) : Promise < ApolloQueryResult < CustomerOrdersQuery > > ; customQuery < QUERY = any , QUERY_VARIABLES = any > ( params ) : Promise < ApolloQueryResult < QUERY > > ; customMutation < MUTATION = any , MUTATION_VARIABLES = any > ( params ) : Promise < FetchResult < MUTATION > > ; customerProductReview ( input , customQuery ? ) : Promise < ApolloQueryResult < CustomerProductReviewQuery > > ; deleteCustomerAddress ( addressId , customQuery ? ) : Promise < ExecutionResult < DeleteCustomerAddressMutation > > ; generateCustomerToken ( params , customQuery ? ) : Promise < FetchResult < GenerateCustomerTokenMutation > > ; getAvailableCustomerPaymentMethods ( customQuery ? ) : Promise < ApolloQueryResult < CustomerAvailablePaymentMethodsQuery > > ; getAvailableCustomerShippingMethods ( customQuery ? ) : Promise < ApolloQueryResult < CustomerAvailableShippingMethodsQuery > > ; getAvailablePaymentMethods ( params , customQuery ? ) : Promise < ApolloQueryResult < GuestAvailablePaymentMethodsQuery > > ; getAvailableShippingMethods ( params , customQuery ? ) : Promise < ApolloQueryResult < GuestAvailableShippingMethodsQuery > > ; getCustomerAddresses ( customQuery ? ) : Promise < ApolloQueryResult < GetCustomerAddressesQuery > > ; mergeCarts ( params , customQuery ? ) : Promise < FetchResult < MergeCartsMutation > > ; placeOrder ( input , customQuery ? ) : Promise < FetchResult < PlaceOrderMutation > > ; productDetail ( searchParams , customQuery ? ) : Promise < ApolloQueryResult < ProductDetailsQuery > > ; productReview ( searchParams , customQuery ? ) : Promise < ApolloQueryResult < ProductReviewQuery > > ; productReviewRatingsMetadata ( customQuery ? ) : Promise < ApolloQueryResult < ProductReviewRatingsMetadataQuery > > ; products ( searchParams , customQuery ? ) : Promise < ApolloQueryResult < ProductsListQuery > > ; relatedProduct ( searchParams , customQuery ? ) : Promise < ApolloQueryResult < RelatedProductQuery > > ; removeCouponFromCart ( input , customQuery ? ) : Promise < FetchResult < RemoveCouponFromCartMutation > > ; removeItemFromCart ( input , customQuery ? ) : Promise < FetchResult < RemoveItemFromCartMutation > > ; removeProductsFromWishlist ( input , customQuery ? ) : Promise < FetchResult < RemoveProductsFromWishlistMutation > > ; revokeCustomerToken ( customQuery ? ) : Promise < FetchResult < RevokeCustomerTokenMutation > > ; requestPasswordResetEmail ( input , customQuery ? ) : Promise < FetchResult < RequestPasswordResetEmailMutation > > ; resetPassword ( input , customQuery ? ) : Promise < FetchResult < ResetPasswordMutation > > ; setBillingAddressOnCart ( input , customQuery ? ) : Promise < FetchResult < SetBillingAddressOnCartMutation > > ; setGuestEmailOnCart ( input , customQuery ? ) : Promise < FetchResult < SetGuestEmailOnCartMutation > > ; setPaymentMethodOnCart ( input , customQuery ? ) : Promise < FetchResult < SetPaymentMethodOnCartMutation > > ; setShippingAddressesOnCart ( input , customQuery ? ) : Promise < FetchResult < SetShippingAddressesOnCartMutation > > ; setShippingMethodsOnCart ( input , customQuery ? ) : Promise < FetchResult < SetShippingMethodsOnCartMutation > > ; storeConfig ( customQuery ? ) : Promise < ApolloQueryResult < StoreConfigQuery > > ; subscribeEmailToNewsletter ( input , customQuery ? ) : Promise < FetchResult < SubscribeEmailToNewsletterMutation > > ; updateCartItems ( input , customQuery ? ) : Promise < FetchResult < UpdateCartItemsMutation > > ; updateCustomer ( input , customQuery ? ) : Promise < FetchResult < UpdateCustomerMutation > > ; updateCustomerAddress ( input , customQuery ? ) : Promise < FetchResult < UpdateCustomerAddressMutation > > ; updateCustomerEmail ( input , customQuery ? ) : Promise < FetchResult < UpdateCustomerAddressMutation > > ; upsellProduct ( searchParams , customQuery ? ) : Promise < ApolloQueryResult < UpsellProductsQuery > > ; urlResolver ( url , customQuery ? ) : Promise < ApolloQueryResult < UrlResolverQuery > > ; wishlist ( searchParams , customQuery ? ) : Promise < ApolloQueryResult < WishlistQuery > > ; }