import { Tax } from './invoice-config'; import { Language } from './language'; import { ExternalEnum } from '../enums'; import { ItemDiscountModule } from './discount-module'; import { DayOfWeekTimePeriod } from './store'; export declare enum MenuPath { kiosk = "kiosk", poskyProOnline = "poskyProOnline", /** 吃到飽專屬菜單;與一般 poskyProOnline 完全獨立,不共用也不互相覆寫。 */ poskyProBuffet = "poskyProBuffet", foodpanda = "foodpanda", quickClick = "quickClick", nidin = "nidin", uberEats = "uberEats" } export interface Menu { id?: string; name: string; nameLang?: Language[]; serviceTime: DayOfWeekTimePeriod[]; /** @deprecated to use path */ disableOnline?: boolean; /** @deprecated to use path */ disableKiosk?: boolean; /** 有path用path的值; * 沒有path去轉換disableOnline disableKiosk成path */ path?: MenuPath; sort: number; } export interface MenuProductCategory { menuId: string; productCategoryId: string; sort: number; } export interface ProductCategory { id?: string; name: string; nameLang?: Language[]; sort: number; storeTemplateId?: string; disabled?: boolean; description?: Language[]; } export declare enum ProductType { combo = "combo", single = "single" } export interface OnlineAvailability { /** 是否在線上點餐外帶模式公開。 */ takeout: boolean; /** 是否在線上點餐內用模式公開。 */ dineIn: boolean; } export interface Product { id?: string; name: string; nameLang?: Language[]; categoryId: string; amount: number; imageUrl: string; /** * 商品最大層級停用/顯示總開關。 * * 只要此欄位為 true,商品視為不可在線上點餐/Kiosk 顯示 */ disabled: boolean; /** * 線上點餐/Kiosk 外帶/內用公開狀態補充說明。 * * 只有在 `disabled=false` 時才有判斷意義 * 用來描述商品在線上外帶、線上內用是否分別公開 */ onlineAvailability?: OnlineAvailability; /** * 此property沒有直接存入DB,而是另外存關聯 * 為了方便使用,透過Service撈出來會一起把其關聯撈出回填這個值(virtual) * @deprecated 改用 `attributeCategoryIds` */ attributeIds: string[]; /** * 此商品關聯了哪些附加屬性大類 * 此property沒有直接存入DB,而是另外存關聯 * 為了方便使用,透過Service撈出來會一起把其關聯撈出回填這個值(virtual) */ attributeCategoryIds?: string[]; tax: Tax; sort: number; /** * @readonly * 是否售完。 * 使用 lambda func `realTimeSwitch` 來更新此 property */ soldOut: number | null | boolean; /** * @readonly * 剩餘可售數量(僅 KIOSK 菜單回應帶入,不存於 Product 實體); * 店家開啟顯示且符合門檻時才有值 */ remainingQty?: number | null; externals?: External[]; discountModules?: ItemDiscountModule[]; storeTemplateId?: string; description?: Language[]; mainStoreProductId?: string; /** default: single */ type?: ProductType; /** default: false */ isComboOnly?: boolean; /** 精選推薦。default: false */ isRecommended?: boolean; } export declare enum AttributeType { combo = "combo", single = "single" } export interface ProductAttribute { id?: string; name: string; nameLang?: Language[]; categoryId: string; additionalAmount: number; sort: number; storeTemplateId?: string; /** * @readonly * 是否售完。 * 使用 lambda func `realTimeSwitch` 來更新此 property */ soldOut?: boolean | number | null; /** * @readonly * 剩餘可售數量(僅 KIOSK 菜單回應帶入,不存於 ProductAttribute 實體); * 店家開啟顯示且符合門檻時才有值 */ remainingQty?: number | null; /** * 附加屬性最大層級線上顯示總開關 * * 只要此欄位為 true,附加屬性視為不可在線上點餐/Kiosk 顯示 */ disableOnline?: boolean; disableKiosk?: boolean; /** * 附加屬性的線上點餐/Kiosk 外帶/內用公開狀態補充說明 * * 只有在 `disableOnline=false` 時才有判斷意義 * 用來描述附加屬性在線上外帶、線上內用是否分別公開 */ onlineAvailability?: OnlineAvailability; /** default: single */ type?: AttributeType; /** type為combo時,必填 */ productId?: string; } export interface ProductProductAttributeCategory { productId: string; productAttributeCategoryId: string; storeId: string; } /** * @deprecated 以 `ProductProductAttributeCategory` 取代 */ export interface ProductProductAttribute { productId: string; productAttributeId: string; } export interface ProductAttributeCategory { id?: string; name: string; nameLang?: Language[]; sort: number; /** * @deprecated 改由 `quantity` 判斷 */ multiSelect?: boolean; quantity?: Quantity; storeTemplateId?: string; /** default: single */ type?: AttributeType; } export interface Quantity { maxPermitted?: number; minPermitted?: number; defaultQuantity?: number; chargeAbove?: number; refundUnder?: number; /** * 禁止重複選擇相同附加屬性 */ disableDuplicateSelection?: boolean; } export interface ReorderConfig { id: string; sort: number; } export interface External { external: ExternalEnum; externalId: string; warehouse?: string; }