@emealscom/packer
Version:
* cups * grams * pounds * liters * mililiters * pint * quart * ounces * tablespoons * teaspoons * unit * each * package * slices * bunck * fz
47 lines (46 loc) • 981 B
TypeScript
import Library from "./library";
export declare enum Type {
CHAR_RPL = 1,
EREG = 2,
UOM_RPL = 3
}
export interface PackerRequest {
description: string;
unitMeasure?: string;
offerDescription: string;
unitQuantity: number;
packageUnitMeasure: string;
packageUnitQuantity: number;
packageOrder?: string;
staple: boolean;
rules?: Rule[];
}
export interface Rule {
prior: number;
condition: OptionRule;
convertion: OptionRule;
}
export interface OptionRule {
description?: any;
unitMeasure?: any;
offerDescription?: any;
unitQuantity?: any;
packageUnitMeasure?: any;
packageUnitQuantity?: any;
}
export interface ConvertFunction {
name: keyof typeof Library;
value: any;
}
export interface Conversion {
from: string;
to: Factor[];
}
export interface Factor {
to: string;
factor: number;
}
export interface PackerResponse {
estimatedQuantity: number;
status: boolean;
}