import IBaseClass from '../BaseClass'; import { IFilledDimensionUnits } from '../Declination'; export default interface ITransferRequest extends IBaseClass { readonly id?: string; readonly ref?: number; readonly from?: string; readonly to: string; readonly products: ITransferProduct[]; readonly status: TransferRequestStatusEnum; readonly transfer_updates: ITransferUpdate[]; readonly created_by: string; readonly draft?: boolean; readonly associated_order?: string | null; readonly completed?: boolean; readonly transport_ref?: string; readonly original_transfer_id?: string | null; } export interface ITransferUpdate { readonly status: TransferRequestStatusEnum; readonly date: Date; readonly updated_by: string; readonly comment?: string; readonly products?: { [sku: string]: ITransferUpdateProduct; } | null; readonly fromStore?: { before: string; after: string; } | null; readonly context?: TransferRequestUpdateContextEnum; } export interface ITransferUpdateProduct { readonly name: string; readonly qte_before: number; readonly qte_after: number; } export interface ITransferProductWeight { unit: 'pounds' | 'kilograms'; value: number; } export interface ITransferProduct { readonly name: string; readonly sku: string; readonly image?: string; readonly parent_slug: string; readonly qte: number; readonly qte_received: number; readonly other_units?: IFilledDimensionUnits[]; readonly qte_validation?: number; readonly weight?: ITransferProductWeight; readonly associated_order?: string; readonly completed?: boolean; readonly count_in_pallet_total?: boolean; } export interface IIndexedTransferRequest { readonly id: string; readonly from: string; readonly to: string; readonly products: { readonly name: string; readonly sku: string; readonly parent_slug: string; }[]; readonly status: TransferRequestStatusEnum; readonly transfer_updates: { readonly status: TransferRequestStatusEnum; readonly date: Date; readonly updated_by: string; readonly comment?: string; }[]; readonly created_by: string; readonly associated_order?: string; readonly transport_ref?: string; readonly completed: boolean; readonly created_at: Date; readonly updated_at: Date; readonly ref: number | undefined; readonly total_weight: number | undefined; readonly total_pallet_qte: number | undefined; } export declare enum TransferRequestStatusEnum { INITIATED = "INITIATED", OPEN = "OPEN", TO_BE_PREPARED = "TO_BE_PREPARED", IN_TRANSIT = "IN_TRANSIT", RECEIVED_PARTIAL = "RECEIVED_PARTIAL", RECEIVED = "RECEIVED", CANCELLED = "CANCELLED" } export declare enum TransferRequestUpdateContextEnum { TRANSFER_UPDATED = "TRANSFER_UPDATED", TRANSFER_STATUS_CHANGE = "TRANSFER_STATUS_CHANGE", CART_MODIFIED = "CART_MODIFIED", CART_CANCELLED = "CART_CANCELLED", TRANSFER_COMPLETED_MANUALLY = "TRANSFER_COMPLETED_MANUALLY" } export declare const transferRequestStatusOrder: { [key: number]: TransferRequestStatusEnum[]; }; export declare const transferRequestAltStatusOrder: { [key: number]: TransferRequestStatusEnum[]; }; export declare const getDefaultTransferRequest: (userId: string, defaultAsOpen?: boolean, isDraft?: boolean) => ITransferRequest;