import IBaseClass from '../BaseClass'; import { IFilledDimensionUnits } from '../Declination'; import IStore from '../Store'; import ITranslation from '../Translation'; export declare enum inventoryOperationEnum { ADD = "add", REMOVE = "substract" } export interface IInventoryQuantities { readonly available: number; readonly processing: number; readonly in_transit: number; readonly completed: number; } export interface IInventoryByStore { readonly at: Date; readonly qty: IInventoryQuantities; readonly store_id: string; readonly can_sell_online: boolean; readonly user: string; readonly unavailable_in_store?: boolean; readonly max_qty?: { readonly qty: number; readonly unit: IFilledDimensionUnits; }; } export interface IInventoryItemHistory { readonly id: string; readonly sku: string; readonly at: Date; readonly by: null | string; readonly old_stores?: IInventoryByStore[]; readonly old_web_inventory?: IInventoryQuantities; readonly updated_web_inventory: IInventoryQuantities; readonly updated_stores: IInventoryByStore[]; } export default interface IInventoryItem extends IBaseClass { readonly id?: string; readonly sku: string; readonly parent_slug: string; readonly attributes: string[]; readonly parent_name: ITranslation[]; readonly name: ITranslation[]; readonly other_units?: IFilledDimensionUnits[]; readonly brand: string; readonly categories: string[]; readonly web_inventory?: IInventoryQuantities; readonly inventories: IInventoryByStore[]; readonly is_infinite_stock?: boolean; readonly is_sample?: boolean; readonly last_update_by?: string; readonly decli_sku_associated_to_sample?: string; readonly hide_inventory?: boolean; readonly inventory_minimums?: { [key: string]: number; }; } export declare const getDefaultInventoryQuantities: (addOneToAvailable?: boolean) => { available: number; processing: number; in_transit: number; completed: number; }; /** * Generate an empty inventory item data object, with specified properties * @param stores All current stores for space. Used to poppulate inventories property * @param userId The current user behind the request. Added as last personne to modify inventory * @param options.addEmptyWebInventory Optionnal. If empty web inventory obj should be returned with inventoryItem. Only done if at least one store can sell online. * @param options.addOneToAvailable Optionnal. If quantity of 1 should be added by default to available inventory. */ export declare const getDefaultInventoryItem: (stores: IStore[], userId: string, options?: { addEmptyWebInventory?: boolean; addOneToAvailable?: boolean; }) => IInventoryItem;