export default class Merchant { merchant: undefined } declare global { // orderapp domain/merchant.go Merchant export interface IMerchant { id: string shortCode: string name: string desc: string contact: string address: string tables: string[] tableGroups: { [ group: string ]: string[] } openings: { [ weekdayFrom0: number ]: [ [ number, number ] ] } openingsWithSurcharge: { [ weekdayFrom0: number ]: IOpeningWithSurcharge[] } payments: IMerchantPayment[] extraPayments: IMerchantExtraPayment[] surcharge: IOrderDiscount rounding: IOrderRounding clientLocales: string[] batchLocale: string images: { [ imageType: string ]: string } takeawayDisabled: boolean disabled: boolean setting: IMerchantSetting shippings: IShipping[] } // orderapp domain/merchant.go MerchantSetting export interface IMerchantSetting { staff: boolean waiter: boolean qrcode: boolean autoPrintReceipt: boolean code: boolean litePrinting: boolean qrCustomText: string qrDisableCustomerCount: boolean recommendCustomText: string defaultClientLanguage: string orderCutOffMins: number takeawayPickupAfterMins: number takeawayMaxPickupMins: number notRequiredAtBottom: boolean skipCreditCardVerification: boolean enableDelivery: boolean takeawayCashPayment: boolean takeawayCreditCardPayment: boolean takeawayAddress: boolean remark: string autoConfirm: boolean takeawayAutoConfirm: boolean batchLocaleOptions: string[] showOrderCreateAt: boolean inventory: boolean hideTimeInReport: boolean showPickupTimeInKitchenReceipt: boolean shop: boolean storeDelivery: boolean printSerialOnReceiptTextStyle: number printSerialOnReceipt: boolean printPayQrOnReceipt: boolean disableHandUp: boolean enableCategoryTag: boolean footerCustomText: string notifyPlayCount: number takeawayNotifyPlayCount: number storeDeliveryNotifyPlayCount: number noTimeLimitForWaiterOrder: boolean minCharge: number minChargeBeforeDiscount: boolean defaultUseOrderCreateTime: boolean loginSessionTimeout: number memberDiscountOrderQuantity: number memberDiscountMinOrderValue: number memberDiscountAmount: number printWithNoOptions: boolean tableListLimit: number largerSerialInReceipt: boolean largerLineSpacingInKitchenReceipt: boolean directoryBroadcastMessage: string directoryDeliveryTimeText: string directoryTakeawayTimeText: string directoryTags: string directoryOpeningTimeText: string directoryBackgroundImage: string whatsappLink: string lineLink: string wechatLink: string instagramLink: string facebookLink: string mapLink: string managerPhone: string setMenuHideFreeItem: boolean customDirectoryTakeawayLink: string customDirectorySdeliveryLink: string customDirectoryShopLink: string kitchenReceiptOptionSeparator: string kitchenReceiptSetMenuHideLabel: boolean lalamove: boolean sdeliveryAutoPrintKitchenReceipt: boolean kitchenReceiptGroupOptionSet: boolean receiptHideFreeItem: boolean printCustomerCountOnKitchenReceipt: boolean printCustomerCountOnReceipt: boolean mutedPrinter: boolean location: [ number, number ] } // orderapp domain/shipping.go Shipping export interface IShipping { key: string name: string cost: number totalFee: number customerAmount: number minAmount: number type: TDeliveryType minDeliveryMinute: number maxDeliveryMinute: number enabled: boolean discounts: IShippingDiscount[] freightCollect: boolean areas: IShippingArea[] lalamove: IShippingLalamoveOrder } export interface IPayment { paymentMethod: string gateway: string payload: {} } // orderapp domain/shipping.go ShippingDiscount export interface IShippingDiscount { amount: number minOrderAmount: number } // orderapp domain/shipping.go ShippingArea export interface IShippingArea { district: string isDefault: boolean price: number providers: string[] payByMerchant: boolean } // orderapp domain/lalamove_order.go LalamoveOrder export interface IShippingLalamoveOrder { amount: number currency: string driverId: string driverName: string driverPlateNumber: string driverPhone: string driverPhoto: string status: string scheduleAt: string // UTC ISO string startLat: string startLng: string startAddress: string startContactName: string startContactPhone: string endLat: string endLng: string endAddress: string endBuilding: string endFloorRoom: string endContactName: string endContactPhone: string } // orderapp domain/merchant.go MerchantOpening export interface IOpeningWithSurcharge { start: number startMin: number end: number endMin: number orderBeforeMin: number takeaway: boolean storeDelivery: boolean surcharge: IOrderDiscount } // orderapp domain/merchant.go MerchantPayment export interface IMerchantPayment { key: string name: string serviceCharge: IPaymentServiceCharge tips: boolean } // orderapp domain/merchant.go PaymentServiceCharge export interface IPaymentServiceCharge { percent: number amount: number } // orderapp domain/merchant.go MerchantExtraPayment export interface IMerchantExtraPayment { key: string name: string amount: boolean } // orderapp delivery/merchant/update.go UpdateRequest export interface IMerchantUpdateInfoRequest { name: string // 餐廳名稱 desc: string // 餐廳介紹 contact: string // 電話 address: string // 地址 } // orderapp delivery/merchant/surcharge.go SurchargeRequest export interface IMerchantUpdateSurchargeRequest { percent: number amount: number } // orderapp delivery/merchant/setopening.go SetOpeningRequestHour export interface IMerchantOpeningSetting { start: number // 開始時間(0~23時) startMin: number // 開始時間(0~59分) end: number // 結束時間(0~23時) endMin: number // 結束時間(0~59分) twentyFourHours: null | boolean // 24 小時營業 orderBeforeMin: number // 截單時間(關店前多久不再收單) surcharge: null | number // 服務費 null 使用預設,number 設定為幾% takeaway: boolean // 允許外帶 storeDelivery: boolean // 允許外送 } // orderapp delivery/merchant/setpayment.go SetPaymentRequest export interface IMerchantSetPaymentRequest { key: TPaymentMethod | string // 系統支援的付款方式的 key 或自訂付款方式為亂數 key name: string // 名稱 percent: number // 手續費% amount: number // 應該是手續費固定金額(舊版沒實做) extra: false // 新版應該不會用到? tips: boolean // 小費開關 remove: boolean // true 時會刪除此付款方式 } export interface IMerchantUiVersion { client: string version: string } }