export default class Order { order: undefined; } declare global { export interface IOrderDiscount { percent: number; amount: number; overrideItem?: boolean; } export interface IOrderRounding { type: 'up' | 'down' | 'off' | ''; digits: number; } export interface IPaymentServiceCharge { percent: number; amount: number; } export interface IOrderExtraPayment { key: string; paidAmount: number; } export interface IOrderCustomItem { name: string; price: number; quantity: number; total: number; cancelled: boolean; } export interface IOrder { apiVersion?: string; id: string; serial: string; orderSerial: string; merchantId: string; merchantName: string; table: string; customers: number; adults: number; children: number; items: IOrderBatchItem[]; remarks: string[]; tags: IMenuTag[]; customItems: IOrderCustomItem[]; discount?: IOrderDiscount; modifiers: IPriceModifier[]; surcharge: IOrderDiscount; originalTotal: number; discountTotal: number; calculatedDiscountTotal: number; surchargeTotal: number; total: number; payments: IOrderPayment[]; extraPayments: IOrderExtraPayment[]; paying: boolean; status: TOrderStatus; paidAt?: string; cancelReason?: string; cancelIdentifier?: string; takeawayStatus?: TOrderTakeawayStatus; code?: string; name?: string; phone?: string; address?: string; createdAt?: string; pickupAt?: string; dropoffAt?: string; cancelledAt?: string; version: number; takeaway: boolean; delivery: boolean; deliveryStatus?: string; pickuppOrderNumber?: string; batches: IOrderBatch[]; deliveryType?: TDeliveryType; shipping: IShipping; originalShippingFee?: number; discountShippingFee?: number; shippingFee?: number; shippingProvider: string; memberId?: string; needTableware: boolean; creditSales: boolean; mainOrderId: string; subOrderIds: []; } export interface IPriceModifier { id?: string; name?: string; type?: 'PROMOCODE' | 'RICECOIN' | 'MERCHANT' | 'SHIPPING_DISCOUNT'; applyTo?: 'PRODUCT' | 'SHIPPING' | 'ALL'; code?: string; payload?: string; percent: number; amount: number; calculatedAmount?: number; overrideItem?: boolean; } export interface IOrderPayment { id: string; paymentMethod?: TPaymentMethod; paymentCharge?: IPaymentServiceCharge; amount: number; paidAmount?: number; paymentTips?: number; change?: number; remark?: string; createdAt: Date; } export interface IOrderBatch { deviceId?: string; orderId: string; orderSerial: string; batchId: string; index: number; table: string; items: IOrderBatchItem[]; remark: string; reconfirm?: boolean; takeout: boolean; storeDelivery: boolean; shop: boolean; takeaway: boolean; status: TOrderBatchStatus; takeawayStatus?: TOrderTakeawayStatus; deliveryType?: TDeliveryType; createdAt: Date | string; updatedAt: Date | string; receivedAt?: string; delivery: boolean; deliveryStatus?: string; } export interface IOrderBatchItem { id: string; ids: string[]; categoryId: string; menuId: string; setId: string; originMenuId: string; setMenuIndex: number | null; setName?: string; setNameCode?: string; name: string; quantity: number; divisor?: number; originalTotal: number; price: number; prices: number[]; discounts: number[]; modifiers: IPriceModifier[][]; totalDiscount: number; totalDiscounts: number[]; total: number; totals: number[]; priceUndetermined: boolean; excludeOrderDiscount: boolean; excludedOrderSurcharge: boolean; options: IOrderBatchItemOption[][]; tags: IMenuTag[][]; unconfirmed: boolean; cancelled: boolean; remarks: string[]; code: string; } export interface IOrderBatchItemOption { optionId: string; assoOptionId: string; categoryId: string; name: string; price: number; quantity: number; } export interface ICalculateOrderParams { batches: IAppOrderBatch[]; deliveryType: TDeliveryType; shipping: IShipping; rounding: IOrderRounding; surcharge: IOrderDiscount; modifiers: IPriceModifier[]; promoCodeId?: string; usedRiceCoin?: number; } export interface ICalculateOrderRequestData { batches: IOrderBatchRequestItem; rounding: IOrderRounding; shipping: IShipping; surcharge: IOrderDiscount; modifiers: IPriceModifier[]; promocode?: string; withholding?: number; } export interface IOrderRequestQuery { id?: string; serial?: string; table?: string; tableGroup?: string; q?: string; type?: TDeliveryType; status?: TOrderStatus; takeawayStatus?: TOrderTakeawayStatus; shippingProvider?: string; paying?: boolean; creditSales?: boolean; from?: number; to?: number; limit?: number; page?: number; } export interface IClientOrderRequestQuery { merchantId: string; table?: string; status?: TOrderStatus; isFilteredByMe?: boolean; valid?: boolean | 'true' | 'false' | 'true,false'; limit?: number; withinCutoffTime?: boolean; } export interface IAddOrderRequestData { orderID: string; merchantID: string; mainOrderID?: string; table: string; adults: number; children: number; deliveryType: TDeliveryType; orderCutOffMins: number; create: boolean; from?: 'CUSTOMER_APP' | 'CUSTOMER_WEB' | 'MERCHANT'; } export interface IUpdateOrderRequestData { name?: string; phone?: string; address?: string; adults?: number; children?: number; remark?: string; } export interface ISubmitBatchParams { orderId: string; orderBatch: IAppOrderBatch; deliveryType: TDeliveryType; payment?: IPayment; shipping: IShipping; takeawayInfo?: (IOrderBatchRequestTakeawayInfo | {}); ignoreUnavailable: boolean; needTableware?: boolean; lastSubOrder?: boolean; promoCode?: string; riceCoin?: string; from?: 'CUSTOMER_APP' | 'CUSTOMER_WEB' | 'MERCHANT'; } export interface IOrderBatchRequestData { batchID: string; items: IOrderBatchRequestItem[]; remark: string; promoCode?: string; riceCoin?: string; ignoreUnavailable: boolean; takeout: boolean; takeawayInfo: IOrderBatchRequestTakeawayInfo | {}; deliveryType: string; shipping?: IShipping; payment?: IPayment; needTableware: boolean; lastSubOrder?: boolean; from?: 'CUSTOMER_APP' | 'CUSTOMER_WEB' | 'MERCHANT'; status?: TOrderBatchStatus; } export interface IUpdatePaymentRequestData { paidAmount?: number; paymentTips?: number; change?: number; } export interface IOrderBatchRequestTakeawayInfo { phone: string; address: string; name: string; pickupAt: string; dropoffAt: string; payment: string; source: string; lat: number; lng: number; district: string; floorRoom: string; building: string; scheduleAt: string; shipping: IOrderBatchTakeawayInfoShipping; } export interface IOrderBatchTakeawayInfoShipping { key: string | 'SYSTEM'; name: string; cost: number; minAmount: number; type: TDeliveryType; minDeliveryMinute: number; maxDeliveryMinute: number; enabled: boolean; discounts: number[]; freightCollect: boolean; areas: IOrderBatchTakeawayInfoShippingArea[]; lalamove: boolean; isSystem: boolean; totalFee: number; quotedTotalFee: number; } export interface IOrderBatchTakeawayInfoShippingArea { district: string; isDefault: boolean; price: number; providers: string[]; payByMerchant: boolean; discount: number; } export interface IOrderBatchRequestItem { itemID?: string; customerID?: string; menuID: string; setID?: string; setMenuID: string | null; setMenuIndex: number | null; setName?: string; name: string; desc: string; divisor?: number; price: number; discount: number; modifiers: IPriceModifier[]; options: IOrderBatchRequestItemOption[]; tags: IMenuTag[]; remarks: string[]; isSet: boolean; } export interface IOrderBatchRequestItemOption { optionID: string; name: string; price: number; quantity: number; } export interface IPayOrderData { payment: string; amount: number; extraPayment: string; extraAmount: number; tips: number; } export interface IRecentPayment { id: string; createdAt: string; version: number; customer: { id: string; }; custId: string; token: string; method: string; gateway: string; } export interface ICreateWechatPaymentRequestData { pay_type: number; txamt: number; out_trade_no: string; txcurrcd: string; } export interface IWechatData { pay_type: string; sysdtm: string; paydtm: string; udid: string; txcurrcd: string; txdtm: string; txamt: string; resperr: string; respmsg: string; out_trade_no: string; syssn: string; pay_params: IWechatPayParams; respcd: string; chnlsn: string; cardcd: string; } export interface IWechatPayParams { package: string; timestamp: string; sign: string; partnerid: string; appid: string; prepayid: string; noncestr: string; } export interface IOrderStatCategoryResponse { count: number; customerCount?: number; total: number; unpaidTotal?: number; shippingFee?: number; discountTotal: number; originalTotal: number; categoryTotals: { [categoryId: string]: ICategoryTotal; }; orders: { start?: string; end?: string; }; } export interface ICategoryTotal { count: number; customerCount: number; total: number; unpaidTotal: number; shippingFee: number; menuTotals: { [menuId: string]: { name: string; count: number; }; }; } export interface IOrderStatSummaryRequestParams { from: string; to: string; cancelled: boolean; deliveryType?: TDeliveryType; takeaway?: boolean; } export interface IOrderStatSummaryResponse { count: number; customerCount: number; total: number; payments?: IVolumeSummaryMap; creditSales?: IVolumeSummaryMap; extraPayments?: IVolumeSummaryMap; paymentCharges?: IVolumeSummaryMap; paymentTips?: IVolumeSummaryMap; cancelReasons?: IVolumeSummaryMap; data: IHourlySummary[]; creditSalesData: ICreditSalesOrderView[] | null; orders: { start?: string; end?: string; }; beforeCloseOrder?: ICountAndTotal; afterCloseOrder?: ICountAndTotal; unpaidOrder?: ICountAndTotal; shippingFee: number; promocodes: IPromocodeSummary[]; } export interface IVolumeSummaryMap { [paymentMethod: string]: IVolumeSummary; } export interface IVolumeSummary { count: number; customerCount: number; total: number; unpaidTotal: number; shippingFee: number; } export interface IHourlySummary { from: string; to: string; payments: IVolumeSummaryMap; creditSales: IVolumeSummaryMap; extraPayments: IVolumeSummaryMap; paymentCharges: IVolumeSummaryMap; paymentTips: IVolumeSummaryMap; cancelReasons?: IVolumeSummaryMap; } export interface ICreditSalesOrderView { serial: string; total: number; } export interface ICountAndTotal { count: number; total: number; } export interface IPromocodeSummary { code: string; count: number; total: number; } export interface IOrderStatUnpaidResponse { count: number; customerCount: number; total: number; } export interface IOrderStatCancelRequestParams { from: string; to: string; takeaway?: boolean; } export interface ICancelOrder { Serial: string; Identifier: string; Reason: string; } } //# sourceMappingURL=Order.d.ts.map