import { Ref } from "@typegoose/typegoose"; import { DineroObject } from "dinero.js"; import { Agent } from "~backend/agent/agent.model"; import { TableMappingSetting } from "~backend/layout/layout.model"; import { RecursivePartial, PAYMENT_TYPE } from "~backend/order/order.interface"; import { PaymentMethod } from "~backend/payment/payment.interface"; import { RestaurantQueueSetting } from "~backend/queue/queue.interface"; import { Tag } from "~backend/tag/tag.model"; import { Profile, Address, OperatingHours } from "~core/modules/profile"; import { ReportAvailable } from "~core/reportManagerV2/definitions"; export declare enum ReportWidgetType { SLOT_SALE = "SLOT_SALE" } export interface GetReportWidgetDto { option: ReportAvailable; restaurants: string[]; } export declare enum MENU_VERSION { v2 = "v2", v3 = "v3", v4 = "v4" } export declare enum GeometryType { Polygon = "Polygon" } export declare enum RestaurantFeature { stock = "stock", discovery = "discovery", pickup = "pickup", delivery = "delivery", foodpanda = "foodpanda", deliveryIntegration = "deliveryIntegration", kds = "kds", ods = "ods" } export declare enum RestaurantChannel { alpha = "alpha", beta = "beta", latest = "latest" } export declare enum DiscoveryType { pickup = "pickup", delivery = "delivery" } export declare enum PAYOUT_ACCOUNT_STATUS { new = "NEW", pending = "PENDING", approved = "APPROVED" } export interface CompanyAddress { line1: string; line2?: string; state: string; city: string; postcode: string; country: string; } export interface CompanySSM { name: string; regNo: string; address: CompanyAddress; phoneNo: string; sstRegNo?: string; } export interface CustomerDisplayImage { url: string; restaurantIds: string[]; } export interface BillingInfo { _id?: string | null | undefined; companyName: string; name: string; email: string; contact: string; address: Address; } export type CustomAttributeType = "string" | "number" | "date" | "boolean"; export type CustomAttributeEntity = "restaurant" | "item" | "inventorySku" | "inventoryRecipe" | "warehouse"; export interface BusinessCustomAttribute { key: string; type: CustomAttributeType; entity: CustomAttributeEntity; } export interface Business { id: string; ownerId: string; name: string; restaurantQuota: number; warehouseQuota: number; menuVersion?: MENU_VERSION; internal?: boolean; url?: string; thumbnail?: string; expiredAt?: string; agentId?: Ref; customerDisplayImages?: CustomerDisplayImage[]; coverPhoto?: string; billingInfos?: BillingInfo | null | undefined; attributeSettings?: BusinessCustomAttribute[] | null | undefined; readonly pf_agent?: Agent; } export interface RemoteSupportSetting { deviceName: string; anydeskId?: string; anydeskPassword?: string; } export interface Restaurant { id: string; businessId: string; features: RestaurantFeature[]; expiredAt: string; machineOtp: string; machineOtpExpiredAt: string; machineId: string; channel?: string; posVersion?: string; posHeartbeat?: string; profile: Profile; catalogId?: string | null; additionalCatalogs?: string[]; inHouseDelivery?: InHouseDelivery; feedmeDelivery?: FeedmeDelivery; foodpandaDelivery?: FoodpandaDelivery; grabfoodDelivery?: GrabfoodDelivery; shopeefoodDelivery?: ShopeefoodDelivery; pickup?: Pickup; dineIn?: DineIn; takeaway?: Takeaway; /** Private */ couchDbPassword?: string; apiToken?: string; remoteSupports: RemoteSupportSetting[]; payoutAccount?: PayoutAccount; clearCount?: number; queueSetting?: RestaurantQueueSetting; tableMappingSetting?: TableMappingSetting; customAttributes?: Record; } export interface Warehouse { id: string; businessId: string; profile: Profile; } export declare enum BankName { maybank = "MAYBANK", cimbBank = "CIMB_BANK", rhbBank = "RHB_BANK", bankIslam = "BANK_ISLAM", bankMuamalat = "BANK_MUAMALAT", bankRakyat = "BANK_RAKYAT", bankSimpananNasional = "BANK_SIMPANAN_NASIONAL", citiBank = "CITIBANK", hongLeongBank = "HONG_LEONG_BANK", hsbcBank = "HSBC_BANK", ocbcBank = "OCBC_BANK", publicBank = "PUBLIC_BANK", affinBank = "AFFIN_BANK", amBank = "AMBANK", agroBank = "AGRO_BANK", allianceBank = "ALLIANCE_BANK", alRajhiBank = "AL_RAJHI_BANK", bankOfChina = "BANK_OF_CHINA", bankOfAmerica = "BANK_OF_AMERICA", bankOfTokyoMitsubishiUFJ = "BANK_OF_TOKYO_MITSUBISHI_UFJ", bnpParibas = "BNP_PARIBAS", deutscheBank = "DEUTSCHE_BANK", industrialCommercialBankOfChina = "INDUSTRIAL_COMMERCIAL_BANK_OF_CHINA", jpMorganChaseBank = "JP_MORGAN_CHASE_BANK", kuwaitFinanceHouse = "KUWAIT_FINANCE_HOUSE", mizuhoBank = "MIZUHO_BANK", standardCharteredBank = "STANDARD_CHARTERED_BANK", sumitomoMitsuiBankingCorporation = "SUMITOMO_MITSUI_BANKING_CORPORATION", theRoyalBankOfScotland = "THE_ROYAL_BANK_OF_SCOTLAND", unitedOverseasBank = "UNITED_OVERSEAS_BANK" } export declare enum BankType { current = "CURRENT_ACCOUNT", saving = "SAVING_ACCOUNT" } export declare enum BankRouting { maybank = 100002270, cimbBank = 100002050, rhbBank = 100002186, bankIslam = 100002458, bankMuamalat = 100002458, bankRakyat = 100016020, bankSimpananNasional = 100016017, citiBank = 100002173, hongLeongBank = 100002241, hsbcBank = 100002225, ocbcBank = 100002296, publicBank = 100002335, affinBank = 100002322, amBank = 100002089, agroBank = 100033061, allianceBank = 100002128, alRajhiBank = 100003509, bankOfChina = 100002429, bankOfAmerica = 100002076, bankOfTokyoMitsubishiUFJ = 100002102, bnpParibas = 100002636, deutscheBank = 100002199, industrialCommercialBankOfChina = 100002597, jpMorganChaseBank = 100002157, kuwaitFinanceHouse = 100003460, mizuhoBank = 100002610, standardCharteredBank = 100002144, sumitomoMitsuiBankingCorporation = 100002623, unitedOverseasBank = 100002267 } export declare enum BankSwiftCode { maybank = "MBBEMYKL", cimbBank = "CIBBMYKL", rhbBank = "RHBBMYKL", bankIslam = "BIMBMYKL", bankMuamalat = "BMMBMYKL", bankRakyat = "BKRMMYKL", bankSimpananNasional = "BSNAMYK1", citiBank = "CITIMYKL", hongLeongBank = "HLBBMYKL", hsbcBank = "HBMBMYKL", ocbcBank = "OCBCMYKL", publicBank = "PBBEMYKL", affinBank = "PHBMMYKL", amBank = "ARBKMYKL", agroBank = "AGOBMYKL", allianceBank = "MFBBMYKL", alRajhiBank = "RJHIMYKL", bankOfChina = "BKCHMYKL", bankOfAmerica = "BOFAMY2X", bankOfTokyoMitsubishiUFJ = "BOTKMYKX", bnpParibas = "BNPAMYKL", deutscheBank = "DEUTMYKL", industrialCommercialBankOfChina = "ICBKMYKL", jpMorganChaseBank = "CHASMYKX", kuwaitFinanceHouse = "KFHOMYKL", mizuhoBank = "MHCBMYKA", standardCharteredBank = "SCBLMYKX", sumitomoMitsuiBankingCorporation = "SMBCMYKL", unitedOverseasBank = "UOVBMYKL" } export interface Bank { name: BankName; type?: BankType; accountNumber?: string; holderName?: string; } export interface PayoutAccount { enable: boolean; bank?: Bank; methods: PaymentMethod[]; ssm?: string; bankStatement?: string; exteriorPhoto?: string; keyPerson?: string; keyPersonEmail?: string; keyPersonPhone?: string; status: PAYOUT_ACCOUNT_STATUS; } export interface PosRestuarant { id: string; machineId: string; apiToken: string; couchDbUrl: string; couchDbUserName: string; couchDbPassword: string; expiredAt: string; features: string[]; } export interface NearByRestaurant extends Restaurant { distance?: number; } export interface DeliveryArea { polygon: number[][]; deliveryFee: DineroObject; freeAfterTotal: DineroObject | null; minPurchase: DineroObject | null; } export interface PickupPointConfig { restaurantEnable: boolean; points: PickupPoint[]; } export interface PickupPoint { name: string; address: string; coordinates: number[]; } export interface OfflinePaymentType { name: string; instruction: string; } export interface Pickup { pickupTime?: PickupTime | null; pickupPointConfig?: PickupPointConfig; paymentTypes?: PAYMENT_TYPE[]; offlinePaymentTypes?: OfflinePaymentType[]; catalogId?: string | null; autoAccept?: boolean; ignoreStock?: boolean; } export interface DineIn { anonymousOrder: boolean; staticQr?: boolean; paymentTypes?: PAYMENT_TYPE[]; offlinePaymentTypes?: OfflinePaymentType[]; ignoreStock?: boolean; disableItemRemark?: boolean; acceptQueue?: boolean; } export interface FeedmeDelivery { enable: boolean; catalogId: string | null; term?: string; instruction?: string; autoAccept?: boolean; ignoreStock?: boolean; } export interface IFPReportCalculationConfig { commissionRate: number; discountCampaigns: IFPDiscountCampaign[]; } export interface ISFReportCalculationConfig { commissionRate: number; discountCampaigns: ISFDiscountCampaign[]; } export interface IFPDiscountCampaign { name: string; vendorBearPercentage: number; date: { start: Date; end: Date; }; } export interface ISFDiscountCampaign { name: string; vendorBearPercentage: number; date: { start: Date; end: Date; }; } export interface FoodpandaDelivery { enable: boolean; remoteId: string; catalogId?: string | null; lastSynchronize?: string | null; autoAccept?: boolean; autoCloseBill?: boolean; reportConfig?: IFPReportCalculationConfig; hasSst?: boolean; ignoreDiscount?: boolean; } export interface ShopeefoodDelivery { enable: boolean; storeID: string; catalogId?: string | null; lastSynchronize?: string | null; autoCloseBill?: boolean; reportConfig?: ISFReportCalculationConfig; } export declare enum GF_CAMPAIGN_CREATED_BY { grab = "Grab", merchant = "Merchant", partner = "Partner" } export declare enum GF_CAMPAIGN_EATER_TYPE { all = "all", new = "new" } export declare enum GF_CAMPAIGN_DISCOUNT_TYPE { net = "net", percentage = "percentage", delivery = "delivery", freeItem = "freeItem" } export declare enum GF_CAMPAIGN_SCOPE_TYPE { order = "order", items = "items" } interface GFCampaignQuota { totalCount: number; totalCountPerUser: number; } interface GFCampaignWorkingHour { sun: { periods: { startTime: string; endTime: string; }[]; }; mon: { periods: { startTime: string; endTime: string; }[]; }; tue: { periods: { startTime: string; endTime: string; }[]; }; wed: { periods: { startTime: string; endTime: string; }[]; }; thu: { periods: { startTime: string; endTime: string; }[]; }; fri: { periods: { startTime: string; endTime: string; }[]; }; sat: { periods: { startTime: string; endTime: string; }[]; }; } interface GFCampaignCondition { startTime: Date; endTime: Date; eaterType: GF_CAMPAIGN_EATER_TYPE; minBasketAmount: number; workingHour: GFCampaignWorkingHour; } interface GFCampaignScope { type: GF_CAMPAIGN_SCOPE_TYPE; objectIDs: string[]; } interface GFCampaignDiscount { type: GF_CAMPAIGN_DISCOUNT_TYPE; cap: number; value: number; scope: GFCampaignScope; } export interface GFDiscountCampaign { id: string; merchantID: string; name: string; quotas: GFCampaignQuota; conditions: GFCampaignCondition; discount: GFCampaignDiscount; } export interface GrabfoodDelivery { enable: boolean; merchantID: string; catalogId?: string | null; lastSynchronize?: string | null; autoCloseBill: boolean; commissionRate: number; partnerMerchantID: string; } export interface InHouseDeliveryTax { systemCode: string; taxCode: string; inclusive: boolean; } export interface InHouseDelivery { enable: boolean; areas: DeliveryArea[]; term: string; deliveryTime?: DeliveryTime | null; catalogId: string | null; paymentTypes?: PAYMENT_TYPE[]; offlinePaymentTypes?: OfflinePaymentType[]; autoAccept?: boolean; ignoreStock?: boolean; taxes?: Map; } export interface Takeaway { catalogId: string | null; } export interface DeliveryTime { day: { min: number; max: number; }; time: null | string[]; custom?: OperatingHours | null; } export interface PickupTime { day: { min: number; max: number; }; } export interface NearByOption { lat: number; lng: number; limit?: number; skip?: number; } export interface CustomerFindByOptionsPayload { features?: RestaurantFeature; lat?: number; lng?: number; name?: string; business?: string; limit: number; skip: number; id?: string; } export interface CustomerRestaurant extends RecursivePartial> { id: string; name: string; address: Address; phoneNo: string; email: string; description?: string; coverPhoto?: string; thumbnailPhoto?: string; photos?: string[]; operatingHours?: OperatingHours; distance?: number; posHeartbeat?: string; tags: Tag[]; catalogId?: string | null; delivery?: { enable: boolean; area: DeliveryArea; term: string; deliveryTime?: DeliveryTime | null; catalogId: string | null; paymentTypes?: PAYMENT_TYPE[]; offlinePaymentTypes?: OfflinePaymentType[]; ignoreStock?: boolean; }; feedmeDelivery?: FeedmeDelivery & { operatingHours: OperatingHours; }; pickup?: Pickup; dineIn?: DineIn; takeaway?: { catalogId: string | null; }; discovery: { discovery: boolean; pickup: boolean; delivery: boolean; }; payoutAccount?: { enable: boolean; status: PAYOUT_ACCOUNT_STATUS; }; businessId: string; posVersion?: string; shortUrl?: string; } export interface CustomerRestaurantSetting { acceptDineIn: boolean; acceptDelivery: boolean; acceptPickup: boolean; acceptQueue: boolean; paxDialog: boolean; } export interface TaxSetting { [key: string]: { activate: boolean; inclusive: boolean; }; } export interface BusinessRestaurantPagination { skip: number; limit: number; sortBy: string; descending?: boolean; search?: string; } export {};