import type { MultiLangStringObj } from './i18n.js'; import type { Photo } from './photo.js'; import type { AlwatrDocumentObject } from './storage.js'; import type { StringifyableRecord } from './type-helper.js'; import type { User } from './user.js'; export declare const ladingTypeCS: readonly ["hand", "pallet"]; export type LadingType = (typeof ladingTypeCS)[number]; export declare const carTypeCS: readonly ["trailer_truck", "camion_dual", "camion_solo", "camion_911", "camion_800", "camion_600", "camion_mini", "nissan"]; export type CarType = (typeof carTypeCS)[number]; export declare const timePeriodCS: readonly ["auto", "3_4w", "2_3w", "1_2w"]; export type TimePeriod = (typeof timePeriodCS)[number]; export declare const discountTypeCS: readonly ["number", "percent"]; export type DiscountType = (typeof discountTypeCS)[number]; export declare const orderStatusCS: readonly ["draft", "registered", "processing", "payment_pending", "preparing", "shipping", "delayed", "on_hold", "canceled", "refunded"]; export type OrderStatus = (typeof orderStatusCS)[number]; export declare const userPermissionsCS: readonly ["user/patch", "price/patch", "product/patch", "user-list-inc-order/read"]; export type UserPermission = (typeof userPermissionsCS)[number]; export interface Product extends AlwatrDocumentObject { /** * Product global unique id. */ id: string; /** * Product title */ title: MultiLangStringObj; /** * Product image */ image: Photo; } export interface ProductPrice extends AlwatrDocumentObject { /** * Product global unique id. */ id: string; /** * Product price in this list. */ price: number; } export interface Order extends AlwatrDocumentObject { /** * Order auto incremental unique id. */ id: string; /** * Order Status */ status: OrderStatus; /** * Order cart list. */ itemList: OrderItem[]; /** * Delivery info */ shippingInfo: Partial; /** * The total price of this order exclude shippings. */ subTotalMarket: number; subTotalAgency: number; /** * The cost of lading the order. */ ladingFee: number; /** * The cost of pallet. */ palletCost: number; /** * The cost of shipping price. */ shippingFee: number; /** * Total shipping const. */ totalShippingFee: number; /** * Customer device uuid. */ clientId: string; /** * Customer device ip address. */ remoteAddress: string; } export interface OrderDraft extends Partial { id: 'new'; status: 'draft'; } export interface OrderItem extends StringifyableRecord { productId: string; /** * The selling price of single product in the market. */ marketPrice: number; /** * The selling price of a product after any discounts to this buyer. */ agencyPrice: number; /** * Quantity of this item. */ qty: number; } export interface OrderShippingInfo extends StringifyableRecord { recipientName: string; recipientNationalCode: string; address: string; description: string; ladingType: LadingType; carType: CarType; timePeriod: TimePeriod; } export interface ComUser extends User { permissions?: UserPermission[] | 'root'; shopName?: string; priceListName?: string; } export interface ComUserIncOrder extends ComUser { orderList: Record; } export declare const orderInfoSchema: { id: StringConstructor; status: StringConstructor; itemList: { productId: StringConstructor; marketPrice: NumberConstructor; agencyPrice: NumberConstructor; qty: NumberConstructor; }[]; shippingInfo: { recipientName: StringConstructor; recipientNationalCode: StringConstructor; address: StringConstructor; carType: StringConstructor; ladingType: StringConstructor; timePeriod: StringConstructor; }; subTotalMarket: NumberConstructor; subTotalAgency: NumberConstructor; ladingFee: NumberConstructor; palletCost: NumberConstructor; shippingFee: NumberConstructor; totalShippingFee: NumberConstructor; }; export declare const orderShippingInfoSchema: { recipientName: StringConstructor; recipientNationalCode: StringConstructor; address: StringConstructor; carType: StringConstructor; ladingType: StringConstructor; timePeriod: StringConstructor; }; //# sourceMappingURL=customer-order-management.d.ts.map