UNPKG

@hhgtech/hhg-components

Version:
44 lines (43 loc) 4.34 kB
import { AutoCompleteAddressApi, CategoryApi, HelpfulUrlApi, HotSearchKeywordApi, NavigationApi, FooterInfoApi, PriceInfoApi, BlogPostApi, BannerApi, BlogPostDataReviewedUserApi, BrandApi, HomePageApi, ProductApi, CategoryPageApi, PaginationApi, BrandPageApi, ProductDetailPageApi, ProductReviewApi, PromotionApi, AddressApi, OrderApi, ProvinceListApi, DistrictListApi, CommuneListApi, CustomAttributesApi, StatisticApi, CartItemApi, CartAddressApi, CartLoggedInCustomerApi, CartApi, CartTotalApi, EstimatedShippingApi, OrderConfirmationApi, ProductPromotionApi, CouponListApi, ShippingApi, PaymentMethodsApi, ShippingInformation } from "./lib/apiTypes"; import { Address, AutoCompleteAddress, Banner, BlogPost, BlogPostDataReviewedUser, Brand, BrandPage, Category, CategoryPage, HelpfulUrl, HomePage, Navigation, Pagination, PopularSearchType, PriceInfo, Product, ProductDetailPage, ProductReview, Promotion, Order, Province, District, Commune, Statistic, CartItem, CartAddress, EstimatedShipping, CartLoggedInCustomer, Cart, CartTotal, PaymentInformation, OrderConfirmation, ProductPromotion, Coupon, Shipping, PaymentMethodInfo } from "./lib/dataTypes"; export declare const dataFormatter: { formatAutoCompleteAddress: (address: AutoCompleteAddressApi) => AutoCompleteAddress | null; formatPrice: (price: string | number, locale?: string) => string; formatHotSearchKeyword: (data: HotSearchKeywordApi) => PopularSearchType; formatHelpfulUrl: (data: HelpfulUrlApi) => HelpfulUrl; formatCategory: (data: CategoryApi, parentId?: number, parentFullSlug?: string) => Category; formatFooterInfo: (data: FooterInfoApi | undefined) => FooterInfoApi; formatNavigation: (data: NavigationApi | null | undefined) => Navigation; formatPriceInfo: (priceInfoApi?: PriceInfoApi) => PriceInfo | null; formatProduct: (productApi?: ProductApi) => Product | null; formatBanner: (bannerApi?: BannerApi) => Banner | null; formatBlogPost: (blogPostApi?: BlogPostApi) => BlogPost | null; formatBlogPostDataReviewedUser: (blogPostDataReviewedUserApi?: BlogPostDataReviewedUserApi) => BlogPostDataReviewedUser | null; formatBrand: (brandApi?: BrandApi) => Brand | null; formatHomePage: (homePageApi?: HomePageApi) => HomePage | null; formatCategoryPage: (categoryPageApi?: CategoryPageApi) => CategoryPage | null; formatBrandPage: (brandPageApi?: BrandPageApi) => BrandPage | null; formatPagination: (paginationApi?: PaginationApi) => Pagination | null; formatProductDetailPage: (productDetailPageApi?: ProductDetailPageApi) => ProductDetailPage | null; formatProductReview: (productReview?: ProductReviewApi) => ProductReview | null; formatProductPromotion: (productPromotionApi?: ProductPromotionApi) => ProductPromotion | null; formatPromotion: (promotionApi?: PromotionApi) => Promotion | null; formatCustomAttributes: (customAttributesApi: CustomAttributesApi[], type: string) => string | ''; formatAddress: (addressApi?: AddressApi) => Address | null; formatProvince: (provinceApi?: ProvinceListApi) => Province[] | []; formatDistrict: (districtApi?: DistrictListApi) => District[] | []; formatCommune: (communeApi?: CommuneListApi) => Commune[] | []; formatOrder: (orderApi?: OrderApi) => Order | null; formatStatistic: (statistic?: StatisticApi[]) => Statistic; formatCartItem: (cartItemApi?: CartItemApi) => CartItem | null; formatCartAddress: (cartAddressApi?: CartAddressApi) => CartAddress | null; formatEstimatedShipping: (estimatedShippingApi?: EstimatedShippingApi) => EstimatedShipping | null; formatCartLoggedInCustomer: (cartLoggedInCustomerApi?: Partial<CartLoggedInCustomerApi>) => CartLoggedInCustomer | null; formatCart: (cartApi?: CartApi) => Cart | null; formatCartTotal: (cartTotalApi?: CartTotalApi) => CartTotal | null; formatPaymentMethod: (methods?: PaymentMethodsApi[]) => PaymentMethodInfo[] | null; formatPaymentInformation: (paymentInformationApi?: ShippingInformation) => PaymentInformation | null; formatOrderConfirmation: (orderConfirmationApi?: OrderConfirmationApi) => OrderConfirmation | null; formatCoupons: (couponListApi?: CouponListApi) => Coupon[] | null; formatShippings: (shippingsApi?: ShippingApi[]) => Shipping[]; };