UNPKG

@megaads/wm

Version:

To install the library, use npm:

61 lines (55 loc) 1.38 kB
export interface Variant { id: number; slug: string; values: Array<{ id: number; variant_id?: number; variant_slug?: string; is_selected?: boolean, name?: string, slug?: string, price?: number, high_price?: number, }>; type?: string; show_invalid?: boolean; show_invalid_above?: boolean; current_value_name?: string; current_value_id?: number; } export interface ProductVariant { id: number; sku: string variants: number[]; price: number; high_price: number; } export interface Galleries { [key: number]: string[]; } export interface VariantsOptions { variants: Variant[]; productVariants: ProductVariant[]; galleries: Galleries; } export interface VariantStatistic { [key: string]: { id: number; sku_key: string; count: number; price: number; high_price: number; }; } export interface ProductVariants { productById: { [key: number]: ProductVariant }; productByUniqId: { [key: string]: ProductVariant }; productByUniqIdAbove: { [key: string]: ProductVariant }; } export interface ProductSkuDetail { product: ProductVariant, variants: Variant[], galleries: string[], price: number, high_price: number, }