import { CartStatusEnum, CartTypeEnum, ICartItemPrices } from '../Cart'; import ITranslation from '../Translation'; export interface IIndexedAttribute { readonly id: string; readonly slug: string; readonly attribute_name: ITranslation[]; readonly attribute_id: string; readonly attribute_values: { readonly value_slug: string; readonly value_name: ITranslation[]; }[]; } export interface IIndexedCategory { readonly id: string; readonly category_name: ITranslation[]; readonly category_id: string; readonly category_slug: string; readonly order: number; readonly image: string; readonly children?: IIndexedCategory[]; readonly parent_id?: string; } export interface IIndexedProductElastic { readonly id: string; readonly alpha_sort: { fr: string; en: string; }; readonly product_id: string; readonly product_name: ITranslation[]; readonly product_parent_slug: string; readonly stock_level: { readonly web: number; readonly stores: any[]; readonly is_infinite_stock?: boolean; }; readonly single_product_url: ITranslation[]; readonly price_range: IPriceRange; readonly price_type: 'regular' | 'promo' | 'discount'; readonly regular_price: ICartItemPrices[]; readonly shown_price: ICartItemPrices[]; readonly short_description?: ITranslation[]; readonly image: string; readonly is_multiple: boolean; readonly sku_qty: number; readonly draft: boolean; readonly declinations: IIndexedDeclinationElastic[]; readonly is_available: boolean; readonly last_update: Date; readonly last_save?: Date; readonly created_at?: Date; readonly categories: { readonly [key: string]: any; }; readonly attributes: { readonly [key: string]: any; }; readonly brands?: { readonly [key: string]: any; }; } export interface IPriceRange { readonly currency: string; readonly min: number; readonly max: number; } export interface IIndexedDeclinationElastic { readonly name: ITranslation[]; readonly slug: string; readonly sku: string; } export interface IIndexedCart { readonly id: string; readonly status: CartStatusEnum; readonly cart_type: CartTypeEnum; readonly customer_id?: string; readonly subtotal: number; readonly total: number; readonly is_pickup: boolean; readonly customer_name?: string; readonly customer_email?: string; readonly billing_phone?: string; readonly shipping_phone?: string; readonly ref: string; readonly keywords: string[]; readonly created_at: number; readonly updated_at: number; readonly paid_at?: number; }