import { CartCustomerEnum, CartStatusEnum, CartTypeEnum, ICartItemPrices, ICartPromoApplied, IIndexedDeclination } from '../Cart'; import { CustomerTypeEnum, IBasicInfoCustomer, ICompanyInfoCustomer, IExpeditionInfo } from '../Customer'; import { MarketplaceTypeEnum } from '../MarketplacePublication'; import { TransferRequestStatusEnum } from '../TransferRequest'; import ITranslation from '../Translation'; export interface IIndexedAttribute { readonly objectID: 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 objectID: 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 IIndexedProductAlgolia { readonly objectID: string; readonly alpha_sort: { fr: string; en: string; }; readonly product_id: string; readonly product_name: ITranslation[]; readonly keywords: string[]; 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_classes_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: IIndexedDeclinationAlgolia[]; readonly is_available: boolean; readonly last_update: Date; readonly last_save?: Date; readonly created_at?: Date; readonly is_hidden?: boolean; readonly is_service?: boolean; readonly is_simple?: boolean; readonly is_hidden_in_client_pos?: boolean; readonly is_presale?: boolean; readonly release_date?: Date | string; readonly categories: { readonly [key: string]: any; }; readonly attributes: { readonly [key: string]: any; }; readonly brands?: { readonly [key: string]: any; }; readonly tcg_attributes?: { [key: string]: string; }; readonly extra_images?: string[]; } export interface IPriceRange { readonly currency: string; readonly min: number; readonly max: number; readonly class?: string; readonly custom_promo_applies?: boolean; readonly external_slug?: string; } export interface IIndexedDeclinationAlgolia { readonly name: ITranslation[]; readonly slug: string; readonly sku: string; readonly supplier_code?: string; readonly upc?: string; readonly attributes?: { [key: string]: string[]; }; readonly regular_price?: number; readonly extra_images?: string[]; } export interface IIndexedVariationAlgolia extends IIndexedDeclination { readonly objectID: string; readonly full_name: ITranslation[]; readonly categories?: { readonly [key: string]: string; }; readonly image?: string; } export interface IIndexedCart { readonly objectID: string; readonly status: CartStatusEnum; readonly cart_type: CartTypeEnum; readonly cart_promos_applied?: ICartPromoApplied[] | null; readonly has_promos?: boolean | null; readonly has_custom_discount?: boolean | null; readonly customer_id?: string | null; readonly customer_type?: CartCustomerEnum | null; readonly customer_rep?: string | null; readonly subtotal: number; readonly total: number; readonly is_pickup: boolean; readonly customer_name?: string | null; readonly customer_email?: string | null; readonly billing_phone?: string | null; readonly shipping_phone?: string | null; readonly ref: string; readonly invoice_ref?: string | null; readonly keywords: string[]; readonly cart_slug_list?: string[] | null; readonly created_at: number | null; readonly updated_at: number | null; readonly paid_at?: number | null; readonly processed_at?: number | null; readonly store?: { readonly id: string; readonly name: string; } | null; readonly order_type?: string | null; readonly assigned_to?: string | null; readonly from_marketplace?: MarketplaceTypeEnum | null; readonly marketplace_origin: string | null; readonly marketplace_cancel_requested: boolean | null; readonly marketplace_order_id: string | null; readonly paid_by?: string | null; readonly multiple_payments?: boolean | null; readonly project_number?: string | null; readonly customer_company_name?: string | null; readonly customer_external_class?: string | null; readonly out_of_zone?: boolean | null; readonly is_promise_to_purchase?: boolean | null; readonly items?: { readonly [key: string]: IIndexedCartItem; }; readonly has_transfers?: { [transferID: string]: { status: TransferRequestStatusEnum; completed: boolean; }; } | null; readonly to_be_verified_by_clerk?: boolean; readonly on_hold?: { date: Date; by_user: string; by_user_name: string; note?: string; } | null; readonly is_on_hold?: boolean; } export interface IIndexedCartItem { readonly qty: number; readonly refunded_qty: number; readonly refunded: boolean; readonly reserved_qty?: number; readonly bypass_inventory_check_qty?: number; } export interface IIndexedCustomer { readonly objectID: string; readonly type?: CustomerTypeEnum; readonly basic_info: IBasicInfoCustomer; readonly company_info?: ICompanyInfoCustomer; readonly expedition_info: IExpeditionInfo; readonly customer_level: number; readonly client_group_slug?: string; readonly other_info?: string; readonly represented_by?: string; }