@posx/core 5.5.730 → 5.5.732

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/index.d.ts CHANGED
@@ -2179,851 +2179,790 @@ declare const PERMISSION_LABELS: {
2179
2179
  };
2180
2180
  };
2181
2181
  //#endregion
2182
- //#region src/types/product.type.d.ts
2183
- type TStockChangeItem = {
2184
- item_uid: string;
2185
- quantity: number;
2186
- };
2187
- type TStockChange = TStockChangeItem & {
2188
- modifiers: TStockChangeItem[];
2189
- };
2190
- declare class StockChange implements TStockChange {
2191
- item_uid: string;
2192
- quantity: number;
2193
- modifiers: TStockChangeItem[];
2194
- constructor(item_uid: string);
2195
- }
2196
- interface IProductBase extends IAppExtraModel, IAppModelSequence {
2197
- /**
2198
- * color of the object
2199
- */
2200
- color: string;
2201
- /**
2202
- * icon of the object
2203
- */
2204
- icon: string;
2205
- /**
2206
- * meta data
2207
- * @ignore
2208
- */
2209
- meta: Record<string, any>;
2210
- /**
2211
- * extra data
2212
- * @ignore
2213
- */
2214
- etc: Record<string, any>;
2215
- /**
2216
- * assets of the product (for image, etc)
2217
- * Predefined keys that can be used by the system
2218
- */
2219
- assets: ProductPartialAssets & Record<string, any>;
2220
- /**
2221
- * config of the product
2222
- * Predefined keys that can be used by the system
2223
- */
2224
- config: ProductPartialConfig & Record<string, any>;
2225
- /**
2226
- * if the product is internal and displayed in the POS only
2227
- */
2228
- is_internal: boolean;
2229
- }
2182
+ //#region src/libs/escpos.printer.d.ts
2230
2183
  /**
2231
- * Predefined asset keys that can be used in the product assets
2184
+ * Represents an ESC/POS printer.
2232
2185
  */
2233
- type ProductPartialAssets = {
2234
- /**
2235
- * large image url for online order
2236
- */
2237
- online_order_large_image_url?: string;
2186
+ interface IEscPosPrinter {
2238
2187
  /**
2239
- * large image thumbnail url for online order
2188
+ * Prints the content to the printer.
2189
+ * @returns A promise that resolves to true if the printing is successful, otherwise false.
2240
2190
  */
2241
- online_order_large_image_thumbnail_url?: string;
2191
+ testPrint(template: IPrintCommand): Promise<boolean>;
2242
2192
  /**
2243
- * large image file path for online order
2193
+ * Connects to the printer with the specified IP address and port number.
2194
+ * @param ip The IP address of the printer.
2195
+ * @param port The port number of the printer. Default is 9100.
2196
+ * @param timeout The connection timeout in milliseconds. Default is 5000ms.
2197
+ * @returns A promise that resolves to true if the connection is successful, otherwise false.
2244
2198
  */
2245
- online_order_large_image_file_path?: string;
2199
+ connect(ip: string, port?: number, timeout?: number): Promise<boolean>;
2246
2200
  /**
2247
- * small image url for online order
2201
+ * Writes the content to the printer.
2202
+ * @param resultByte The content to write to the printer.
2203
+ * @param timeout The write timeout in milliseconds. Default is 10000ms.
2204
+ * @returns A promise that resolves to true if the writing is successful, otherwise false.
2248
2205
  */
2249
- online_order_small_image_url?: string;
2206
+ write(resultByte: any, timeout?: number): Promise<boolean>;
2250
2207
  /**
2251
- * small image thumbnail url for online order
2208
+ * Interprets the print command and returns the encoded byte array.
2209
+ * @param template The print command to interpret.
2210
+ * @returns A promise that resolves to the encoded byte array.
2252
2211
  */
2253
- online_order_small_image_thumbnail_url?: string;
2212
+ interpret(template: IPrintCommand): Promise<Uint8Array>;
2213
+ }
2214
+ declare class EscPosPrinter implements IEscPosPrinter {
2215
+ socket: any;
2216
+ constructor();
2254
2217
  /**
2255
- * small image file path for online order
2218
+ * Prints esc pos printer
2219
+ * @returns print
2256
2220
  */
2257
- online_order_small_image_file_path?: string;
2258
- };
2259
- /**
2260
- * Predefined config keys that can be used in the product configs
2261
- */
2262
- type ProductPartialConfig = {
2221
+ testPrint(template: IPrintCommand): Promise<boolean>;
2222
+ connect(ip: string, port?: number, timeout?: number): Promise<boolean>;
2223
+ write(resultByte: any, timeout?: number): Promise<boolean>;
2224
+ interpret(template: IPrintCommand): Promise<Uint8Array>;
2225
+ private formatTable;
2226
+ private padEnd;
2227
+ private padStart;
2228
+ private wrapText;
2229
+ disconnect(): Promise<boolean>;
2230
+ private close;
2263
2231
  /**
2264
- * display large image for online order, if false, small image will be displayed
2232
+ * base64转ImageBitmap,只进行基本转换,不进行缩放和居中处理
2233
+ * @param base64Data 图片base64
2265
2234
  */
2266
- online_order_display_large_image: boolean;
2267
- /** 该商品需满多少金额(该商品行金额合计)才可下单 */
2268
- min_order_amount?: number;
2269
- /** 特价单价,只对前 promo_max_quantity 份生效,其余恢复原价 */
2270
- promo_price?: number;
2271
- /** 特价份数上限,默认 1 */
2272
- promo_max_quantity?: number;
2273
- /** 特价与会员价互斥:点了特价,该商品不享会员价 */
2274
- promo_excludes_member_price?: boolean;
2275
- /** optional custom badges for product / modifier */
2276
- custom_badges?: {
2277
- text: string;
2278
- text_translations?: Record<string, string>;
2279
- background?: string;
2280
- }[];
2281
- };
2282
- declare class ProductBase extends AppExtraModel implements IProductBase {
2283
- meta: {};
2284
- etc: {};
2285
- assets: {};
2286
- config: {
2287
- online_order_display_large_image: boolean;
2288
- };
2289
- is_internal: boolean;
2290
- color: string;
2291
- icon: string;
2292
- sequence: number;
2293
- constructor();
2235
+ private base64ToImageBitmap;
2294
2236
  }
2295
- interface IVisibility {
2296
- system: System;
2297
- visible: boolean;
2298
- sequence: number;
2237
+ declare enum Codepages {
2238
+ English = "cp437",
2239
+ Greek = "cp737",
2240
+ WesternEurope = "cp850",
2241
+ BalticRim = "cp775",
2242
+ CentralEurope = "cp852",
2243
+ Cyrillic = "cp855",
2244
+ Turkish = "cp857",
2245
+ MultilingualLatin1WithEuro = "cp858",
2246
+ Portuguese = "cp860",
2247
+ Icelandic = "cp861",
2248
+ Hebrew = "cp862",
2249
+ FrenchCanadian = "cp863",
2250
+ Arabic = "cp864",
2251
+ Nordic = "cp865",
2252
+ Russian = "cp866",
2253
+ ModernGreek = "cp869",
2254
+ SimplifiedChinese = "cp936",
2255
+ Korean = "cp949",
2256
+ TraditionalChinese = "cp950",
2257
+ WesternEuropeanLatin = "cp1252",
2258
+ ArabicISO = "iso88596",
2259
+ Japanese = "shiftjis",
2260
+ CentralEuropeanLatinWindows = "windows1250",
2261
+ CyrillicWindows = "windows1251",
2262
+ WesternEuropeanLatinWindows = "windows1252",
2263
+ GreekWindows = "windows1253",
2264
+ TurkishWindows = "windows1254",
2265
+ HebrewWindows = "windows1255",
2266
+ ArabicWindows = "windows1256",
2267
+ BalticWindows = "windows1257",
2268
+ Vietnamese = "windows1258",
2299
2269
  }
2300
- declare class Visibility implements IVisibility {
2301
- system: System;
2302
- visible: boolean;
2303
- sequence: number;
2304
- constructor();
2270
+ declare enum PrintAlign {
2271
+ Left = "left",
2272
+ Center = "center",
2273
+ Right = "right",
2305
2274
  }
2306
- declare enum System {
2307
- POS = "pos",
2308
- QrCodeOrder = "qr_code_order",
2275
+ declare enum PrintStyle {
2276
+ Normal = "normal",
2277
+ Bold = "bold",
2278
+ Italic = "italic",
2279
+ Underline = "underline",
2309
2280
  }
2310
- interface ICoreCategory extends IProductBase {
2311
- type: CategoryType;
2312
- visibility: Array<Visibility>;
2313
- /**
2314
- * maximum order quantity before you can order
2315
- */
2316
- max_order: number;
2317
- /**
2318
- * minimum order quantity before you can order
2319
- */
2320
- min_order: number;
2321
- /**
2322
- * Indicates whether the category is delisted
2323
- */
2324
- is_delisted: boolean;
2325
- /** Auto-generated category code */
2326
- code?: string;
2327
- printing_sequence?: number;
2328
- allow_custom_modifier?: boolean;
2281
+ declare enum PrintSize {
2282
+ Custom = "custom",
2283
+ Normal = "normal",
2284
+ Small = "small",
2329
2285
  }
2330
- interface ICategory extends ICoreCategory {
2331
- image_url: string;
2332
- /**
2333
- * image file path
2334
- */
2335
- image_file_path: string;
2336
- /**
2337
- *
2338
- */
2339
- image_thumbnail_url: string;
2340
- /**
2341
- * image thumbnail file path
2342
- */
2343
- image_thumbnail_file_path: string;
2344
- /** if category has subcategory */
2345
- has_subcategory: boolean;
2346
- /** Printing sequence number */
2347
- printing_sequence: number;
2348
- /**
2349
- * subcategories of the category
2350
- */
2351
- subcategories: Array<ISubcategory>;
2352
- /** If true, category and its items are excluded from search results */
2353
- non_searchable?: boolean;
2286
+ declare enum PrintType {
2287
+ Text = "text",
2288
+ Table = "table",
2289
+ Line = "line",
2290
+ Image = "image",
2291
+ QRCode = "qrcode",
2292
+ NewLine = "newline",
2293
+ Barcode = "barcode",
2294
+ Cut = "cut",
2295
+ Beeper = "beeper",
2296
+ OpenCashDrawer = "open_cash_drawer",
2354
2297
  }
2355
- declare enum CategoryType {
2356
- Product = "product",
2357
- Modifier = "modifier",
2298
+ interface IPrintBarcode {
2299
+ data: string;
2300
+ symbology: 'upca' | 'upce' | 'ean13' | 'ean8' | 'coda39' | 'itf' | 'codabar';
2301
+ height: number;
2358
2302
  }
2359
- declare class CoreCategory extends ProductBase implements ICoreCategory {
2360
- type: CategoryType;
2361
- visibility: Visibility[];
2303
+ interface IPrintQrcode {
2304
+ data: string;
2305
+ model: number;
2306
+ size: number;
2307
+ errorlevel: 'l' | 'm' | 'q' | 'h';
2308
+ }
2309
+ type IFontSize = {
2310
+ width?: number;
2311
+ height?: number;
2312
+ size: PrintSize;
2313
+ };
2314
+ type IPrintText = IFontSize & {
2315
+ text: string;
2316
+ line_width?: number;
2317
+ };
2318
+ type IPrintTableRowItem = {
2319
+ text: string;
2320
+ column_width: number;
2321
+ };
2322
+ type IPrintTable = IFontSize & {
2323
+ items: IPrintTableRowItem[];
2324
+ line_width?: number;
2325
+ };
2326
+ declare class PrintBarcode {
2327
+ data: string;
2328
+ symbology: 'upca' | 'upce' | 'ean13' | 'ean8' | 'coda39' | 'itf' | 'codabar';
2329
+ height: number;
2330
+ }
2331
+ declare class PrintQrcode {
2332
+ data: string;
2333
+ model: number;
2334
+ size: number;
2335
+ errorlevel: 'l' | 'm' | 'q' | 'h';
2336
+ }
2337
+ type IPrintImage = {
2338
+ base64_data: string;
2339
+ width: number;
2340
+ height: number;
2341
+ algorithm: 'threshold' | 'bayer' | 'floydsteinberg' | 'atkinson';
2342
+ threshold: number;
2343
+ };
2344
+ declare class PrintImage implements IPrintImage {
2345
+ base64_data: string;
2346
+ width: number;
2347
+ height: number;
2348
+ algorithm: 'threshold' | 'bayer' | 'floydsteinberg' | 'atkinson';
2349
+ threshold: number;
2350
+ }
2351
+ type IPrintCommandLine = {
2352
+ item?: IPrintText;
2353
+ table?: IPrintTable;
2354
+ image?: IPrintImage;
2355
+ qrcode?: IPrintQrcode;
2356
+ barcode?: IPrintBarcode;
2357
+ align?: PrintAlign;
2358
+ style?: PrintStyle;
2359
+ type: PrintType;
2360
+ repeat?: number;
2361
+ codepage?: Codepages;
2362
+ };
2363
+ type IPrintCommand = {
2364
+ codepage: Codepages;
2365
+ items: IPrintCommandLine[];
2366
+ };
2367
+ declare enum EscPosCompatibility {
2368
+ 'SunmiPrinter' = 0,
2369
+ }
2370
+ declare class PrintCommand implements IPrintCommand {
2371
+ codepage: Codepages;
2372
+ items: IPrintCommandLine[];
2373
+ }
2374
+ //#endregion
2375
+ //#region src/types/report.type.d.ts
2376
+ type IOrderTypeSummary = {
2377
+ type: InvoiceType;
2378
+ count: number;
2379
+ total: number;
2380
+ };
2381
+ type IReportCategory = IAppBase & {
2382
+ reports: IReport[];
2383
+ };
2384
+ type IReport = IAppBase & {
2385
+ type: ReportType;
2386
+ codename: string;
2387
+ };
2388
+ declare enum ReportType {
2389
+ 'printable' = 0,
2390
+ 'generative' = 1,
2391
+ }
2392
+ declare class ReportCategory implements IReportCategory {
2362
2393
  uid: string;
2363
- max_order: number;
2364
- min_order: number;
2365
- is_delisted: boolean;
2366
- code?: string;
2367
- printing_sequence: number;
2368
- allow_custom_modifier?: boolean;
2394
+ name: string;
2395
+ name_translations: Record<string, string>;
2396
+ reports: Report[];
2397
+ created_at: Date;
2398
+ created_at_timestamp: number;
2399
+ updated_at: Date;
2400
+ deleted_at: any;
2369
2401
  constructor();
2370
2402
  }
2371
- declare class Category extends ProductBase implements ICategory {
2372
- image_url: string;
2373
- image_file_path: string;
2374
- image_thumbnail_url: string;
2375
- image_thumbnail_file_path: string;
2376
- has_subcategory: boolean;
2377
- name_translations: Record<string, string>;
2378
- visibility: Visibility[];
2379
- printing_sequence: number;
2380
- type: CategoryType;
2381
- is_delisted: boolean;
2382
- subcategories: any[];
2403
+ declare class Report implements IReport {
2383
2404
  uid: string;
2384
- max_order: number;
2385
- min_order: number;
2386
- code?: string;
2387
- non_searchable?: boolean;
2405
+ name: string;
2406
+ name_translations: Record<string, string>;
2407
+ type: ReportType.printable;
2408
+ codename: string;
2409
+ created_at: Date;
2410
+ created_at_timestamp: number;
2411
+ updated_at: Date;
2412
+ deleted_at: any;
2388
2413
  constructor();
2389
2414
  }
2390
- interface ISubcategory extends IProductBase {
2391
- /** Category ID */
2392
- category_uid: string;
2415
+ interface IAppReport extends IAppCoreModel {
2416
+ reports: IReportCategory[];
2417
+ version: number;
2393
2418
  }
2394
- declare class Subcategory extends ProductBase implements ISubcategory {
2395
- category_uid: string;
2419
+ declare class AppReport extends AppCoreModel implements IAppReport {
2396
2420
  uid: string;
2421
+ reports: ReportCategory[];
2422
+ version: number;
2397
2423
  constructor();
2398
2424
  }
2399
- declare enum ProductType {
2400
- ByQuantity = "by_quantity",
2401
- ByWeight = "by_weight",
2402
- Service = "service",
2403
- Combo = "combo",
2404
- Modifier = "modifier",
2405
- Package = "package",
2406
- }
2407
- /**
2408
- * Interface for a core item, which extends the IProductBase interface.
2409
- */
2410
- interface ICoreItem extends IProductBase {
2411
- /**
2412
- * Rank of the item
2413
- */
2414
- image_url: string;
2415
- /**
2416
- * image file path
2417
- */
2418
- image_file_path: string;
2419
- /**
2420
- * @ignore
2421
- */
2422
- image_thumbnail_url: string;
2423
- /**
2424
- * image thumbnail file path
2425
- */
2426
- image_thumbnail_file_path: string;
2427
- /**
2428
- * The SKU (stock keeping unit) of the item.
2429
- */
2430
- sku: string;
2431
- /**
2432
- * The type of product.
2433
- */
2434
- type: ProductType;
2435
- /**
2436
- * The visibility of the item.
2437
- */
2438
- visibility: Array<Visibility>;
2439
- /**
2440
- * The barcode of the item.
2441
- */
2442
- barcode: string;
2443
- /** Auto-generated PLU hash code */
2444
- plu?: string;
2445
- /**
2446
- * The price of the item.
2447
- */
2448
- price: number;
2449
- /**
2450
- * The original price of the item.
2451
- */
2452
- original_price: number;
2453
- /**
2454
- * The price list of the item.
2455
- */
2456
- prices: Array<IPrice>;
2457
- /**
2458
- * The unique identifier of the category that the item belongs to.
2459
- */
2460
- category_uid: string;
2425
+ type IReportRequest = {
2461
2426
  /**
2462
- * The current stock level of the item.
2463
- * @ignore
2427
+ * shift uid (if shift uid is provided, start and end date time will be ignored, and the report will be generated for the shift period.)
2464
2428
  */
2465
- stock: number;
2429
+ shift_uid: string;
2466
2430
  /**
2467
- * Whether or not the item is sold out.
2431
+ * start date and time
2468
2432
  */
2469
- is_sold_out: boolean;
2470
- /** Auto reset sold out status at shift start */
2471
- auto_reset_sold_out?: boolean;
2472
- /** Exclude from shift-open sold-out auto-reset */
2473
- exclude_auto_reset_sold_out?: boolean;
2433
+ start_datetime: Date;
2474
2434
  /**
2475
- * Whether or not the item should be printed on the receipt.
2435
+ * end date and time
2476
2436
  */
2477
- print_on_receipt: boolean;
2437
+ end_datetime: Date;
2478
2438
  /**
2479
- * Whether or not the price of the item can be adjusted.
2439
+ * report code name
2480
2440
  */
2481
- price_adjustable: boolean;
2441
+ report_code_name: string;
2482
2442
  /**
2483
- * Recipe of the modifier
2443
+ * number of copies, default is 1
2484
2444
  */
2485
- recipe: string;
2486
- /** Whether remark is disabled for this item */
2487
- is_remark_disabled: boolean;
2488
- /** Auto select first modifier when editor panel opens */
2489
- auto_select_first_modifier?: boolean;
2490
- /** Auto add/remove 1:1 with product quantity on takeaway orders */
2491
- is_auto_applied?: boolean;
2492
- /** Auto add 1 per product unit on every order type; cashier cannot remove. Wins over is_auto_applied when both are set */
2493
- is_always_auto_applied?: boolean;
2494
- /** Eligible container: calculate() adds S$0.10 per unit after tax, so the deposit is not discounted, service-charged or taxed */
2495
- has_bcrs_deposit: boolean;
2496
- /** Indicates whether the item is tax exempt */
2497
- is_tax_exempt?: boolean;
2498
- /** Indicates whether the item is service charge exempt */
2499
- is_service_charge_exempt?: boolean;
2500
- }
2501
- declare class CoreItem extends ProductBase implements ICoreItem {
2502
- image_url: string;
2503
- image_file_path: string;
2504
- image_thumbnail_url: string;
2505
- image_thumbnail_file_path: string;
2506
- visibility: Visibility[];
2507
- sku: string;
2508
- type: ProductType;
2509
- barcode: string;
2510
- plu?: string;
2511
- category_uid: string;
2512
- price: number;
2513
- original_price: number;
2514
- prices: Array<IPrice>;
2515
- stock: number;
2516
- print_on_receipt: boolean;
2517
- price_adjustable: boolean;
2518
- is_sold_out: boolean;
2519
- auto_reset_sold_out?: boolean;
2520
- exclude_auto_reset_sold_out?: boolean;
2521
- recipe: string;
2522
- is_remark_disabled: boolean;
2523
- auto_select_first_modifier?: boolean;
2524
- is_auto_applied?: boolean;
2525
- is_always_auto_applied?: boolean;
2526
- has_bcrs_deposit: boolean;
2527
- uid: string;
2528
- constructor();
2529
- }
2530
- /**
2531
- * Items
2532
- */
2533
- interface IItem extends ICoreItem {
2534
- /**
2535
- * Codename of the item
2536
- */
2537
- codename: string;
2538
- /**
2539
- * Recipe of the item
2540
- */
2541
- recipe: string;
2542
- /**
2543
- * Credit value of the item
2544
- */
2545
- add_credit: number;
2546
- /** Point value added to customer after purchase */
2547
- add_point: number;
2548
- /**
2549
- * Subcategory ID of the item
2550
- */
2551
- subcategory_uid: string;
2552
- /**
2553
- * Unit of the item
2554
- * @ignore
2555
- */
2556
- unit: number;
2557
- /**
2558
- * Number of items sold
2559
- * @ignore
2560
- */
2561
- sold: number;
2562
- /**
2563
- * if editor will be opened by default when item is clicked
2564
- */
2565
- open_editor: boolean;
2566
- /**
2567
- * how many points will be used to purchase the item
2568
- */
2569
- minus_point: number;
2570
- /**
2571
- * Cost of the item
2572
- */
2573
- cost: number;
2574
- /**
2575
- * Indicates whether the item is discountable
2576
- */
2577
- discountable: boolean;
2578
- /**
2579
- * Printing sequence of the item
2580
- * @ignore
2581
- */
2582
- printing_sequence: number;
2583
- /**
2584
- * Number of likes for the item
2585
- * @ignore
2586
- */
2587
- likes: number;
2588
- /**
2589
- * Number of dislikes for the item
2590
- * @ignore
2591
- */
2592
- dislikes: number;
2593
- /**
2594
- * if the item is recommended
2595
- */
2596
- recommended: boolean;
2597
- /**
2598
- * Indicates whether the item is tax exempt
2599
- */
2600
- is_tax_exempt: boolean;
2601
- /**
2602
- * Indicates whether the item is service charge exempt
2603
- */
2604
- is_service_charge_exempt: boolean;
2605
- /**
2606
- * Indicates whether the item is point reward exempt
2607
- */
2608
- is_point_reward_exempt: boolean;
2609
- /**
2610
- * Indicates whether the item is credit reward exempt
2611
- */
2612
- is_credit_reward_exempt: boolean;
2613
- /**
2614
- * Indicates whether the item is internal and displayed in the POS only
2615
- */
2616
- is_internal: boolean;
2617
- /**
2618
- * Indicates whether the item is delisted
2619
- */
2620
- is_delisted: boolean;
2621
- /**
2622
- * Modifier IDs of the item
2623
- */
2624
- modifiers?: Array<ICoreItem>;
2625
- /**
2626
- * Modifier Group IDs of the item
2627
- */
2628
- modifier_categories?: Array<ICoreCategory>;
2629
- /**
2630
- * Kitchen printer IDs of the item
2631
- */
2632
- kitchen_printers_uids: Array<string>;
2633
- /**
2634
- * Order printer IDs of the item
2635
- */
2636
- order_printers_uids: Array<string>;
2637
- /**
2638
- * Label printer IDs of the item
2639
- */
2640
- label_printers_uids: Array<string>;
2641
- /**
2642
- * if editor will be opened by default when item is clicked
2643
- */
2644
- open_editor_panel: boolean;
2645
- /**
2646
- * if price editor will be opened by default when item is clicked
2647
- */
2648
- open_price_editor: boolean;
2649
- /**
2650
- * Combo groups (only applicable when type is ProductType.Combo)
2651
- */
2652
- combo_groups: IComboGroup[];
2653
- /** Auto-attached item UIDs that will be added when this item is added */
2654
- attached_items?: string[];
2655
- /** If true, item is excluded from search results */
2656
- non_searchable?: boolean;
2657
- /** 0/false = off; true = 1:1 (compat); >=1 = ratio (e.g. 4 = 1 product per 4 pax) */
2658
- is_pax_linked?: number | boolean;
2659
- /** If true, item with line discount is excluded from order-level discount */
2660
- is_discount_nonstackable?: boolean;
2661
- /** If true, price editor input is the total payable (incl. service charge and tax) and is reverse-calculated to the net price */
2662
- price_as_total_payable?: boolean;
2663
- }
2664
- declare class Item extends CoreItem implements IItem {
2665
- codename: string;
2666
- sku: string;
2667
- recipe: string;
2668
- barcode: string;
2669
- type: ProductType;
2670
- add_credit: number;
2671
- add_point: number;
2672
- category_uid: string;
2673
- subcategory_uid: string;
2674
- unit: number;
2675
- stock: number;
2676
- is_sold_out: boolean;
2677
- sold: number;
2678
- print_on_receipt: boolean;
2679
- price: number;
2680
- open_editor: boolean;
2681
- price_adjustable: boolean;
2682
- minus_point: number;
2683
- cost: number;
2684
- discountable: boolean;
2685
- printing_sequence: number;
2686
- recommended: boolean;
2687
- likes: number;
2688
- dislikes: number;
2689
- is_tax_exempt: boolean;
2690
- is_service_charge_exempt: boolean;
2691
- is_point_reward_exempt: boolean;
2692
- is_credit_reward_exempt: boolean;
2693
- is_internal: boolean;
2694
- is_delisted: boolean;
2695
- uid: string;
2696
- modifiers?: Array<ICoreItem>;
2697
- modifier_categories?: Array<ICoreCategory>;
2698
- kitchen_printers_uids: any[];
2699
- order_printers_uids: any[];
2700
- label_printers_uids: any[];
2701
- open_editor_panel: boolean;
2702
- open_price_editor: boolean;
2703
- combo_groups: IComboGroup[];
2704
- non_searchable?: boolean;
2705
- is_pax_linked?: number | boolean;
2706
- is_discount_nonstackable?: boolean;
2707
- price_as_total_payable?: boolean;
2708
- constructor();
2709
- }
2710
- /** pricing strategy: fixed amount or ratio of base price */
2711
- declare enum PriceType {
2712
- Flat = "flat",
2713
- Percent = "percent",
2445
+ copies: number;
2446
+ declared_amount: number;
2447
+ };
2448
+ type IReportData = {
2449
+ start_datetime: string;
2450
+ humanized_start_datetime: string;
2451
+ end_datetime: string;
2452
+ humanized_end_datetime: string;
2453
+ printed_time: string;
2454
+ sales_summary: ISalesSummary;
2455
+ drawer_summary: IDrawerSummary;
2456
+ non_cash_till_summary: INonCashTillSummary;
2457
+ payments_summary: IPaymentSummary[];
2458
+ loyalty_program_summary: ILoyaltyProgramSummary;
2459
+ item_sales_summary: TItemSalesSummary[];
2460
+ item_sales_summary_total: number;
2461
+ item_sales_summary_total_count: number;
2462
+ item_sales_summary_original_total?: number;
2463
+ item_sales_summary_discount_total?: number;
2464
+ item_sales_summary_by_category: TCategorySalesSummary[];
2465
+ modifier_sales_summary: TModifierSalesSummary[];
2466
+ modifier_sales_summary_total: number;
2467
+ modifier_sales_summary_total_count: number;
2468
+ config: IConfig;
2469
+ invoice_discount_summary: IDiscountSummaryEntry[];
2470
+ item_discount_summary: IDiscountSummaryEntry[];
2471
+ order_type_summary: IOrderTypeSummary[];
2472
+ first_ref_id: string;
2473
+ last_ref_id: string;
2474
+ };
2475
+ declare class ReportData implements IReportData {
2476
+ start_datetime: string;
2477
+ humanized_start_datetime: string;
2478
+ end_datetime: string;
2479
+ humanized_end_datetime: string;
2480
+ humanized_printed_datetime: string;
2481
+ printed_time: string;
2482
+ sales_summary: SalesSummary;
2483
+ drawer_summary: DrawerSummary;
2484
+ non_cash_till_summary: NonCashTillSummary;
2485
+ payments_summary: PaymentSummary[];
2486
+ loyalty_program_summary: LoyaltyProgramSummary;
2487
+ item_sales_summary: ItemSalesSummary[];
2488
+ item_sales_summary_total: number;
2489
+ item_sales_summary_total_count: number;
2490
+ item_sales_summary_original_total: number;
2491
+ item_sales_summary_discount_total: number;
2492
+ item_sales_summary_by_category: CategorySalesSummary[];
2493
+ modifier_sales_summary: ModifierSalesSummary[];
2494
+ modifier_sales_summary_total: number;
2495
+ modifier_sales_summary_total_count: number;
2496
+ config: IConfig;
2497
+ invoice_discount_summary: IDiscountSummaryEntry[];
2498
+ item_discount_summary: IDiscountSummaryEntry[];
2499
+ order_type_summary: IOrderTypeSummary[];
2500
+ first_ref_id: string;
2501
+ last_ref_id: string;
2714
2502
  }
2715
- interface IPrice extends IAppCoreModel {
2716
- /** keys to look up the price */
2717
- lookup_keys: Array<string | 'member_price'>;
2718
- /** product uid*/
2719
- product_uid: string;
2720
- /** fixed amount, used when type=flat */
2721
- amount: number;
2722
- /** price type, defaults to flat for backward compatibility */
2723
- type?: PriceType;
2724
- /** decimal ratio (0-1), used when type=percent, e.g. 0.9 = 10% off */
2725
- percent?: number;
2726
- /** name of the price */
2727
- name: string;
2728
- /** name translations */
2729
- name_translations: Record<string, string>;
2503
+ type ISalesSummary = {
2504
+ sales_total: number;
2505
+ foc_sales_total: number;
2506
+ foc_sales_count: number;
2507
+ foc_rounding_total: number;
2508
+ foc_tax_total: number;
2509
+ foc_service_charge_total: number;
2510
+ rounding_total: number;
2511
+ tax_total: number;
2512
+ service_charge_total: number;
2513
+ discount_total: number;
2514
+ voucher_total: number;
2515
+ voucher_count: number;
2516
+ coupon_total: number;
2517
+ coupon_count: number;
2518
+ paid_invoice_count: number;
2519
+ paid_invoice_total: number;
2520
+ void_invoice_count: number;
2521
+ void_invoice_total: number;
2522
+ total_pax: number;
2523
+ pax_sales_total: number;
2524
+ };
2525
+ declare class SalesSummary implements ISalesSummary {
2526
+ sales_total: number;
2527
+ foc_sales_total: number;
2528
+ foc_sales_count: number;
2529
+ foc_rounding_total: number;
2530
+ foc_tax_total: number;
2531
+ foc_service_charge_total: number;
2532
+ rounding_total: number;
2533
+ tax_total: number;
2534
+ service_charge_total: number;
2535
+ discount_total: number;
2536
+ voucher_total: number;
2537
+ voucher_count: number;
2538
+ coupon_total: number;
2539
+ coupon_count: number;
2540
+ paid_invoice_count: number;
2541
+ paid_invoice_total: number;
2542
+ void_invoice_count: number;
2543
+ void_invoice_total: number;
2544
+ total_pax: number;
2545
+ pax_sales_total: number;
2730
2546
  }
2731
- declare class Price extends AppCoreModel implements IPrice {
2732
- lookup_keys: any[];
2733
- product_uid: string;
2734
- uid: string;
2547
+ type IDiscountSummaryEntry = {
2548
+ name: string;
2549
+ alias: string;
2550
+ calc_type: CalcType;
2735
2551
  amount: number;
2736
- type: PriceType;
2737
2552
  percent: number;
2738
- name: string;
2739
- name_translations: Record<string, string>;
2740
- constructor();
2553
+ count: number;
2554
+ total: number;
2555
+ };
2556
+ type ITillEntry = {
2557
+ type: TillType;
2558
+ label: string;
2559
+ created_at: string;
2560
+ time: string;
2561
+ amount: number;
2562
+ note: string;
2563
+ payment_method_code?: string;
2564
+ payment_method_name?: string;
2565
+ invoice_uid: string;
2566
+ ref_id: string;
2567
+ };
2568
+ type IDrawerSummary = {
2569
+ open_amount: number;
2570
+ declared_amount: number;
2571
+ drawer_amount: number;
2572
+ difference: number;
2573
+ pay_in_total: number;
2574
+ pay_in_count: number;
2575
+ pay_out_total: number;
2576
+ pay_out_count: number;
2577
+ entries: ITillEntry[];
2578
+ };
2579
+ declare class DrawerSummary implements IDrawerSummary {
2580
+ open_amount: number;
2581
+ declared_amount: number;
2582
+ drawer_amount: number;
2583
+ difference: number;
2584
+ pay_in_total: number;
2585
+ pay_in_count: number;
2586
+ cash_invoice_total: number;
2587
+ cash_invoice_count: number;
2588
+ pay_out_total: number;
2589
+ pay_out_count: number;
2590
+ entries: ITillEntry[];
2741
2591
  }
2742
- /**
2743
- * COMBO PRODUCT IMPLEMENTATION
2744
- *
2745
- * Combo products bundle multiple existing products together and sell them as a group,
2746
- * usually at a discount. This implementation provides minimal impact on existing data structures.
2747
- *
2748
- * Usage:
2749
- * 1. Create combo product with type = ProductType.Combo
2750
- * 2. Define combo_groups array with component groups and available items
2751
- * 3. Set combo discount (either amount or percentage)
2752
- * 4. When adding to invoice, combo appears as single line with selections in combo_components
2753
- *
2754
- * Example:
2755
- * ```
2756
- * const combo: IItem = {
2757
- * type: ProductType.Combo,
2758
- * combo_groups: [
2759
- * {
2760
- * name: "Choose your main",
2761
- * min_selections: 1,
2762
- * max_selections: 1,
2763
- * required: true,
2764
- * items: [
2765
- * { item_uid: 'burger_uid', is_default: true },
2766
- * { item_uid: 'chicken_uid', price_override: 2.00 }
2767
- * ]
2768
- * },
2769
- * {
2770
- * name: "Pick a side",
2771
- * min_selections: 1,
2772
- * max_selections: 1,
2773
- * required: true,
2774
- * items: [
2775
- * { item_uid: 'fries_uid', is_default: true },
2776
- * { item_uid: 'onion_rings_uid', price_override: 1.50 }
2777
- * ]
2778
- * }
2779
- * ],
2780
- * combo_discount_percent: 15 // 15% discount
2781
- * }
2782
- * ```
2783
- */
2784
- /**
2785
- * Interface for individual items within a combo group
2786
- */
2787
- interface IComboGroupItem extends IAppModelSequence {
2788
- /** Item unique id */
2789
- item_uid: string;
2790
- /** @deprecated use item_uid */
2791
- combo_item: any;
2792
- /** Price of the item in combo */
2793
- price: number;
2794
- /** Meta data */
2795
- meta: Record<string, unknown>;
2592
+ type INonCashTillSummary = {
2593
+ pay_in_total: number;
2594
+ pay_in_count: number;
2595
+ pay_out_total: number;
2596
+ pay_out_count: number;
2597
+ pay_in_by_method: IPaymentSummary[];
2598
+ pay_out_by_method: IPaymentSummary[];
2599
+ entries: ITillEntry[];
2600
+ };
2601
+ declare class NonCashTillSummary implements INonCashTillSummary {
2602
+ pay_in_total: number;
2603
+ pay_in_count: number;
2604
+ pay_out_total: number;
2605
+ pay_out_count: number;
2606
+ pay_in_by_method: IPaymentSummary[];
2607
+ pay_out_by_method: IPaymentSummary[];
2608
+ entries: ITillEntry[];
2796
2609
  }
2797
- /**
2798
- * Interface for combo component groups (e.g., "Main Course", "Side", "Drink")
2799
- */
2800
- interface IComboGroup extends IAppModelSequence {
2801
- /** Group unique id */
2802
- uid: string;
2803
- /** Group name (e.g., "Choose your main", "Pick a side") */
2610
+ type IPaymentSummary = {
2611
+ code: string;
2804
2612
  name: string;
2805
- /** Translations of the name */
2806
- name_translations: Record<string, string>;
2807
- /** Minimum selections required from this group */
2808
- min_order: number;
2809
- /** Maximum selections allowed from this group */
2810
- max_order: number;
2811
- /** Available items in this group */
2812
- combo_items: IComboGroupItem[];
2813
- /** Meta data */
2814
- meta: Record<string, unknown>;
2613
+ total: number;
2614
+ count: number;
2615
+ topup_total?: number;
2616
+ topup_count?: number;
2617
+ direct_total?: number;
2618
+ direct_count?: number;
2619
+ };
2620
+ declare class PaymentSummary implements IPaymentSummary {
2621
+ code: string;
2622
+ name: string;
2623
+ total: number;
2624
+ count: number;
2815
2625
  }
2816
- declare class ComboGroupItem implements IComboGroupItem {
2817
- item_uid: string;
2818
- combo_item: any;
2819
- price: number;
2820
- sequence: number;
2821
- meta: Record<string, unknown>;
2626
+ type ILoyaltyProgramSummary = {
2627
+ add_credit_total: number;
2628
+ add_credit_count: number;
2629
+ topup_paid_total: number;
2630
+ topup_paid_count: number;
2631
+ rewarded_credit_total: number;
2632
+ rewarded_credit_count: number;
2633
+ minus_credit_total: number;
2634
+ minus_credit_count: number;
2635
+ rewarded_point_total: number;
2636
+ rewarded_point_count: number;
2637
+ minus_point_total: number;
2638
+ minus_point_count: number;
2639
+ };
2640
+ declare class LoyaltyProgramSummary implements ILoyaltyProgramSummary {
2641
+ add_credit_total: number;
2642
+ add_credit_count: number;
2643
+ topup_paid_total: number;
2644
+ topup_paid_count: number;
2645
+ rewarded_credit_total: number;
2646
+ rewarded_credit_count: number;
2647
+ minus_credit_total: number;
2648
+ minus_credit_count: number;
2649
+ rewarded_point_total: number;
2650
+ rewarded_point_count: number;
2651
+ minus_point_total: number;
2652
+ minus_point_count: number;
2653
+ }
2654
+ type TItemCoreSalesSummary = {
2655
+ item: IItem;
2656
+ quantity: number;
2657
+ total_amount: number;
2658
+ };
2659
+ type TItemSalesSummary = TItemCoreSalesSummary & {
2660
+ modifiers?: TItemCoreSalesSummary[];
2661
+ original_amount?: number;
2662
+ discount_amount?: number;
2663
+ };
2664
+ declare class ItemSalesSummary implements TItemSalesSummary {
2665
+ item: IItem;
2666
+ quantity: number;
2667
+ total_amount: number;
2668
+ original_amount: number;
2669
+ discount_amount: number;
2670
+ modifiers: TItemCoreSalesSummary[];
2671
+ }
2672
+ type TModifierSalesSummary = {
2673
+ item: IItem;
2674
+ quantity: number;
2675
+ total_amount: number;
2676
+ };
2677
+ declare class ModifierSalesSummary implements TModifierSalesSummary {
2678
+ item: IItem;
2679
+ quantity: number;
2680
+ total_amount: number;
2681
+ }
2682
+ type TCategorySalesSummary = {
2683
+ category: ICategory | null;
2684
+ items: TItemSalesSummary[];
2685
+ total_quantity: number;
2686
+ total_amount: number;
2687
+ original_amount?: number;
2688
+ discount_amount?: number;
2689
+ };
2690
+ declare class CategorySalesSummary implements TCategorySalesSummary {
2691
+ category: ICategory | null;
2692
+ items: TItemSalesSummary[];
2693
+ total_quantity: number;
2694
+ total_amount: number;
2695
+ original_amount: number;
2696
+ discount_amount: number;
2697
+ }
2698
+ //#endregion
2699
+ //#region src/types/printer.type.d.ts
2700
+ interface IDevice extends IAppCoreModel {
2701
+ machine_name: string;
2702
+ connection_id: string;
2703
+ type: DeviceType;
2704
+ etc: DeviceEtc;
2705
+ }
2706
+ type DeviceEtc = {
2707
+ fomopay_terminal_id: string;
2708
+ hirector_public_key: string;
2709
+ hirector_private_key: string;
2710
+ yeahpay_app_id: string;
2711
+ yeahpay_device_sn: string;
2712
+ yeahpay_server_public_key: string;
2713
+ yeahpay_client_private_key: string;
2714
+ yeahpay_signature_key: string;
2715
+ yeahpay_async_url: string;
2716
+ yeahpay_print_copies?: number;
2717
+ sync_to_specific_cds: string;
2718
+ [key: string]: unknown;
2719
+ };
2720
+ type INode = IDevice;
2721
+ declare class Device extends AppBaseModel implements IDevice {
2722
+ machine_name: string;
2723
+ connection_id: string;
2724
+ type: DeviceType;
2725
+ etc: DeviceEtc;
2822
2726
  constructor();
2823
2727
  }
2824
- declare class ComboGroup implements IComboGroup {
2825
- uid: string;
2826
- name: string;
2827
- name_translations: Record<string, string>;
2828
- min_order: number;
2829
- max_order: number;
2830
- combo_items: IComboGroupItem[];
2831
- sequence: number;
2832
- meta: Record<string, unknown>;
2728
+ declare class Node extends AppBaseModel implements INode {
2729
+ type: DeviceType;
2730
+ machine_name: string;
2731
+ connection_id: string;
2732
+ etc: DeviceEtc;
2833
2733
  constructor();
2834
2734
  }
2835
- //#endregion
2836
- //#region src/libs/escpos.printer.d.ts
2837
- /**
2838
- * Represents an ESC/POS printer.
2839
- */
2840
- interface IEscPosPrinter {
2841
- /**
2842
- * Prints the content to the printer.
2843
- * @returns A promise that resolves to true if the printing is successful, otherwise false.
2844
- */
2845
- testPrint(template: IPrintCommand): Promise<boolean>;
2846
- /**
2847
- * Connects to the printer with the specified IP address and port number.
2848
- * @param ip The IP address of the printer.
2849
- * @param port The port number of the printer. Default is 9100.
2850
- * @param timeout The connection timeout in milliseconds. Default is 5000ms.
2851
- * @returns A promise that resolves to true if the connection is successful, otherwise false.
2852
- */
2853
- connect(ip: string, port?: number, timeout?: number): Promise<boolean>;
2854
- /**
2855
- * Writes the content to the printer.
2856
- * @param resultByte The content to write to the printer.
2857
- * @param timeout The write timeout in milliseconds. Default is 10000ms.
2858
- * @returns A promise that resolves to true if the writing is successful, otherwise false.
2859
- */
2860
- write(resultByte: any, timeout?: number): Promise<boolean>;
2861
- /**
2862
- * Interprets the print command and returns the encoded byte array.
2863
- * @param template The print command to interpret.
2864
- * @returns A promise that resolves to the encoded byte array.
2865
- */
2866
- interpret(template: IPrintCommand): Promise<Uint8Array>;
2735
+ declare enum DeviceType {
2736
+ Client = "client",
2737
+ Node = "node",
2867
2738
  }
2868
- declare class EscPosPrinter implements IEscPosPrinter {
2869
- socket: any;
2870
- constructor();
2871
- /**
2872
- * Prints esc pos printer
2873
- * @returns print
2874
- */
2875
- testPrint(template: IPrintCommand): Promise<boolean>;
2876
- connect(ip: string, port?: number, timeout?: number): Promise<boolean>;
2877
- write(resultByte: any, timeout?: number): Promise<boolean>;
2878
- interpret(template: IPrintCommand): Promise<Uint8Array>;
2879
- private formatTable;
2880
- private padEnd;
2881
- private padStart;
2882
- private wrapText;
2883
- disconnect(): Promise<boolean>;
2884
- private close;
2885
- /**
2886
- * base64转ImageBitmap,只进行基本转换,不进行缩放和居中处理
2887
- * @param base64Data 图片base64
2888
- */
2889
- private base64ToImageBitmap;
2739
+ declare enum PrinterType {
2740
+ ReceiptPrinter = "receipt_printer",
2741
+ CheckPrinter = "check_printer",
2742
+ OrderPrinter = "order_printer",
2743
+ KitchenPrinter = "kitchen_printer",
2744
+ KioskPrinter = "kiosk_printer",
2745
+ LabelPrinter = "label_printer",
2746
+ QrCodePrinter = "qr_code_printer",
2747
+ KitchenDisplayPrinter = "kitchen_display_printer",
2748
+ EventPrinter = "event_printer",
2890
2749
  }
2891
- declare enum Codepages {
2892
- English = "cp437",
2893
- Greek = "cp737",
2894
- WesternEurope = "cp850",
2895
- BalticRim = "cp775",
2896
- CentralEurope = "cp852",
2897
- Cyrillic = "cp855",
2898
- Turkish = "cp857",
2899
- MultilingualLatin1WithEuro = "cp858",
2900
- Portuguese = "cp860",
2901
- Icelandic = "cp861",
2902
- Hebrew = "cp862",
2903
- FrenchCanadian = "cp863",
2904
- Arabic = "cp864",
2905
- Nordic = "cp865",
2906
- Russian = "cp866",
2907
- ModernGreek = "cp869",
2908
- SimplifiedChinese = "cp936",
2909
- Korean = "cp949",
2910
- TraditionalChinese = "cp950",
2911
- WesternEuropeanLatin = "cp1252",
2912
- ArabicISO = "iso88596",
2913
- Japanese = "shiftjis",
2914
- CentralEuropeanLatinWindows = "windows1250",
2915
- CyrillicWindows = "windows1251",
2916
- WesternEuropeanLatinWindows = "windows1252",
2917
- GreekWindows = "windows1253",
2918
- TurkishWindows = "windows1254",
2919
- HebrewWindows = "windows1255",
2920
- ArabicWindows = "windows1256",
2921
- BalticWindows = "windows1257",
2922
- Vietnamese = "windows1258",
2750
+ interface INodePrinter {
2751
+ printer_name: string;
2752
+ status: string;
2753
+ port_name: string;
2754
+ error: string;
2923
2755
  }
2924
- declare enum PrintAlign {
2925
- Left = "left",
2926
- Center = "center",
2927
- Right = "right",
2756
+ declare class NodePrinter implements INodePrinter {
2757
+ printer_name: string;
2758
+ status: string;
2759
+ port_name: string;
2760
+ error: string;
2928
2761
  }
2929
- declare enum PrintStyle {
2930
- Normal = "normal",
2931
- Bold = "bold",
2932
- Italic = "italic",
2933
- Underline = "underline",
2762
+ declare enum PrinterProtocols {
2763
+ ESCPOS = "ESC/POS",
2764
+ TSPL = "TSPL",
2934
2765
  }
2935
- declare enum PrintSize {
2936
- Custom = "custom",
2937
- Normal = "normal",
2938
- Small = "small",
2766
+ declare enum PrinterConnections {
2767
+ USB = "USB",
2768
+ WINDOWS_DRIVER = "WINDOWS_DRIVER",
2769
+ ETHERNET = "ETHERNET",
2770
+ BLUETOOTH = "BLUETOOTH",
2771
+ BUILTIN = "BUILTIN",
2772
+ IMIN_BUILT_IN = "IMIN_BUILT_IN",
2773
+ WINDOWS_DRIVER_BUILT_IN = "WINDOWS_DRIVER_BUILT_IN",
2939
2774
  }
2940
- declare enum PrintType {
2941
- Text = "text",
2942
- Table = "table",
2943
- Line = "line",
2944
- Image = "image",
2945
- QRCode = "qrcode",
2946
- NewLine = "newline",
2947
- Barcode = "barcode",
2948
- Cut = "cut",
2949
- Beeper = "beeper",
2950
- OpenCashDrawer = "open_cash_drawer",
2775
+ type IPrintTemplateCore = {
2776
+ header: string;
2777
+ body: string;
2778
+ footer: string;
2779
+ commands: string;
2780
+ };
2781
+ declare class PrintTemplateCore implements IPrintTemplateCore {
2782
+ header: string;
2783
+ body: string;
2784
+ footer: string;
2785
+ commands: string;
2786
+ type: PrinterType;
2787
+ constructor();
2788
+ }
2789
+ type IPrintTemplate = IPrintTemplateCore & IAppBaseModel & {
2790
+ printer_type: PrinterType;
2791
+ codepage?: Codepages;
2792
+ report_code_name: string;
2793
+ };
2794
+ declare class PrintTemplate extends AppBaseModel implements IPrintTemplate {
2795
+ header: string;
2796
+ body: string;
2797
+ footer: string;
2798
+ commands: string;
2799
+ printer_type: PrinterType;
2800
+ codepage?: Codepages;
2801
+ uid: string;
2802
+ report_code_name: string;
2803
+ constructor();
2804
+ }
2805
+ declare enum PrintJobStatus {
2806
+ Queued = "queued",
2807
+ Printed = "printed",
2808
+ Failed = "failed",
2809
+ Expired = "expired",
2810
+ }
2811
+ interface IPrintJob extends IAppCoreModel {
2812
+ printer_name: string;
2813
+ /** Actual printer name using printer driver*/
2814
+ driver_printer_name: string;
2815
+ printer_ip: string;
2816
+ printer_uid: string;
2817
+ printer_type: PrinterType;
2818
+ protocol: PrinterProtocols;
2819
+ connection_type: PrinterConnections;
2820
+ data: IPrintCommand;
2821
+ commands: string;
2822
+ status: PrintJobStatus;
2823
+ retries: number;
2824
+ /** If true, only save the print job to the database, do not print */
2825
+ save_only: boolean;
2826
+ print_times: number;
2827
+ printed: number;
2828
+ /** Targeting which device to print */
2829
+ device_uid_to_print: string;
2830
+ /** Designated Table Sections */
2831
+ designated_table_section_uids: string[];
2832
+ /** Job ID */
2833
+ job_id: number;
2834
+ /** Print sequence order (lower number prints first) */
2835
+ print_sequence?: number;
2836
+ meta: Record<string, unknown>;
2837
+ /** USB device ID (runtime dynamic) */
2838
+ usb_device_id?: number;
2839
+ /** USB serial number for persistent device identification */
2840
+ usb_serial_number?: string;
2841
+ /** Use deviceName instead of serialNumber for USB device identification */
2842
+ use_device_name?: boolean;
2843
+ /** USB device name path (e.g., /dev/bus/usb/001/002) */
2844
+ usb_device_name?: string;
2845
+ }
2846
+ declare class PrintJob extends AppBaseModel implements IPrintJob {
2847
+ printer_name: string;
2848
+ driver_printer_name: string;
2849
+ printer_ip: string;
2850
+ printer_uid: string;
2851
+ printer_type: PrinterType;
2852
+ protocol: PrinterProtocols;
2853
+ connection_type: PrinterConnections;
2854
+ data: PrintCommand;
2855
+ status: PrintJobStatus;
2856
+ retries: number;
2857
+ commands: string;
2858
+ uid: string;
2859
+ save_only: boolean;
2860
+ print_times: number;
2861
+ printed: number;
2862
+ device_uid_to_print: string;
2863
+ designated_table_section_uids: any[];
2864
+ job_id: number;
2865
+ print_sequence?: number;
2866
+ constructor(printer: IPrinter, printData: IPrintCommand, saveOnly?: boolean, printTimes?: number);
2867
+ meta: Record<string, unknown>;
2951
2868
  }
2952
- interface IPrintBarcode {
2953
- data: string;
2954
- symbology: 'upca' | 'upce' | 'ean13' | 'ean8' | 'coda39' | 'itf' | 'codabar';
2955
- height: number;
2869
+ declare enum PrinterStatus {
2870
+ Online = "online",
2871
+ Offline = "offline",
2956
2872
  }
2957
- interface IPrintQrcode {
2958
- data: string;
2959
- model: number;
2960
- size: number;
2961
- errorlevel: 'l' | 'm' | 'q' | 'h';
2873
+ interface IPrinter extends IAppBaseModel {
2874
+ /** Printer terminal ID */
2875
+ device_uid: string;
2876
+ /** Linked terminal device UID list */
2877
+ terminal_device_uids?: string[];
2878
+ /** Printer type */
2879
+ type: PrinterType;
2880
+ /** If true, this printer is not the default for its type */
2881
+ is_not_default?: boolean;
2882
+ /** Actual printer name using printer driver*/
2883
+ driver_printer_name: string;
2884
+ /** Backup printer ID */
2885
+ fallback_printer_uid: number;
2886
+ /** Printer protocol */
2887
+ protocol: PrinterProtocols;
2888
+ /** Printer connection type */
2889
+ connection_type: PrinterConnections;
2890
+ /** Print template UID */
2891
+ print_template_uid?: string;
2892
+ /** Printer IP address */
2893
+ ip_address?: string;
2894
+ /** Printer status */
2895
+ status: PrinterStatus;
2896
+ /** if it is consolidated print or itemized print when it is kitchen printer */
2897
+ kitchen_itemized_print: boolean;
2898
+ /** Number of times to print */
2899
+ print_times: number;
2900
+ /** Number of retries */
2901
+ retries: number;
2902
+ /** Print sequence order (lower number prints first) */
2903
+ print_sequence?: number;
2904
+ /** USB serial number for persistent device identification */
2905
+ usb_serial_number?: string;
2906
+ /** Use deviceName instead of serialNumber for USB device identification */
2907
+ use_device_name?: boolean;
2908
+ /** USB device name path (e.g., /dev/bus/usb/001/002) */
2909
+ usb_device_name?: string;
2910
+ disable_printing_sequence?: boolean;
2911
+ /** Disable cancel order print for this printer */
2912
+ disable_cancel_print?: boolean;
2962
2913
  }
2963
- type IFontSize = {
2964
- width?: number;
2965
- height?: number;
2966
- size: PrintSize;
2967
- };
2968
- type IPrintText = IFontSize & {
2969
- text: string;
2970
- line_width?: number;
2971
- };
2972
- type IPrintTableRowItem = {
2973
- text: string;
2974
- column_width: number;
2975
- };
2976
- type IPrintTable = IFontSize & {
2977
- items: IPrintTableRowItem[];
2978
- line_width?: number;
2979
- };
2980
- declare class PrintBarcode {
2981
- data: string;
2982
- symbology: 'upca' | 'upce' | 'ean13' | 'ean8' | 'coda39' | 'itf' | 'codabar';
2983
- height: number;
2914
+ declare class Printer extends AppBaseModel implements IPrinter {
2915
+ device_uid: string;
2916
+ terminal_device_uids: string[];
2917
+ type: PrinterType;
2918
+ is_not_default?: boolean;
2919
+ driver_printer_name: string;
2920
+ fallback_printer_uid: number;
2921
+ protocol: PrinterProtocols;
2922
+ connection_type: PrinterConnections;
2923
+ print_template_uid: string;
2924
+ uid: string;
2925
+ ip_address: string;
2926
+ status: PrinterStatus;
2927
+ kitchen_itemized_print: boolean;
2928
+ print_times: number;
2929
+ retries: number;
2930
+ use_device_name: boolean;
2931
+ usb_device_name: string;
2932
+ disable_cancel_print: boolean;
2933
+ constructor();
2984
2934
  }
2985
- declare class PrintQrcode {
2986
- data: string;
2987
- model: number;
2988
- size: number;
2989
- errorlevel: 'l' | 'm' | 'q' | 'h';
2935
+ interface ITemplateData {
2936
+ config: IConfig;
2937
+ invoice: IInvoice;
2938
+ printer_name: string;
2939
+ printed_at: Date;
2940
+ normalized_printed_at: string;
2941
+ report_data: IReportData;
2942
+ meta: Record<string, any>;
2943
+ is_cancel?: boolean;
2990
2944
  }
2991
- type IPrintImage = {
2992
- base64_data: string;
2993
- width: number;
2994
- height: number;
2995
- algorithm: 'threshold' | 'bayer' | 'floydsteinberg' | 'atkinson';
2996
- threshold: number;
2997
- };
2998
- declare class PrintImage implements IPrintImage {
2999
- base64_data: string;
3000
- width: number;
3001
- height: number;
3002
- algorithm: 'threshold' | 'bayer' | 'floydsteinberg' | 'atkinson';
3003
- threshold: number;
2945
+ declare class TemplateData implements ITemplateData {
2946
+ config: IConfig;
2947
+ invoice: IInvoice;
2948
+ report_data: IReportData;
2949
+ section_item: ISectionItem;
2950
+ printer_name: string;
2951
+ printed_at: Date;
2952
+ normalized_printed_at: string;
2953
+ meta: Record<string, any>;
2954
+ is_cancel: boolean;
2955
+ constructor();
3004
2956
  }
3005
- type IPrintCommandLine = {
3006
- item?: IPrintText;
3007
- table?: IPrintTable;
3008
- image?: IPrintImage;
3009
- qrcode?: IPrintQrcode;
3010
- barcode?: IPrintBarcode;
3011
- align?: PrintAlign;
3012
- style?: PrintStyle;
3013
- type: PrintType;
3014
- repeat?: number;
3015
- codepage?: Codepages;
3016
- };
3017
- type IPrintCommand = {
3018
- codepage: Codepages;
3019
- items: IPrintCommandLine[];
2957
+ type IRenderPrintTemplateOptions = {
2958
+ printer_name: string;
2959
+ kitchen_itemized_print: boolean;
2960
+ is_cancel?: boolean;
3020
2961
  };
3021
- declare enum EscPosCompatibility {
3022
- 'SunmiPrinter' = 0,
3023
- }
3024
- declare class PrintCommand implements IPrintCommand {
3025
- codepage: Codepages;
3026
- items: IPrintCommandLine[];
2962
+ declare class RenderPrintTemplateOptions implements IRenderPrintTemplateOptions {
2963
+ printer_name: string;
2964
+ kitchen_itemized_print: boolean;
2965
+ is_cancel: boolean;
3027
2966
  }
3028
2967
  //#endregion
3029
2968
  //#region src/types/condition.type.d.ts
@@ -3943,6 +3882,8 @@ interface IOnlineOrderConfig {
3943
3882
  enable_apple_pay_payment?: boolean;
3944
3883
  /** Show Google Pay (YeahPay wallet) in online order checkout; default off */
3945
3884
  enable_google_pay_payment?: boolean;
3885
+ /** Show Debit/Credit Card (YeahPay Click to Pay, SG only) in online order checkout; default off */
3886
+ enable_click_to_pay_payment?: boolean;
3946
3887
  }
3947
3888
  declare class OnlineOrderConfig implements IOnlineOrderConfig {
3948
3889
  enable_membership: boolean;
@@ -3970,6 +3911,7 @@ declare class OnlineOrderConfig implements IOnlineOrderConfig {
3970
3911
  upsell_item_uids: string[];
3971
3912
  enable_apple_pay_payment: boolean;
3972
3913
  enable_google_pay_payment: boolean;
3914
+ enable_click_to_pay_payment: boolean;
3973
3915
  constructor();
3974
3916
  }
3975
3917
  interface IGeneralConfig {
@@ -4487,707 +4429,770 @@ interface IRoundingConfig {
4487
4429
  /** Prepayment rounding flag */
4488
4430
  prepayment_rounding?: boolean;
4489
4431
  /** Round to nearest (half up) instead of always up/down */
4490
- nearest?: boolean;
4491
- }
4492
- interface IChargeConfig {
4493
- service_charge: boolean;
4494
- service_charge_rate: number;
4495
- }
4496
- declare class ChargeConfig implements IChargeConfig {
4497
- service_charge: boolean;
4498
- service_charge_rate: number;
4499
- constructor();
4500
- }
4501
- interface ICurrencyConfig {
4502
- currency_symbol: string;
4503
- is_symbol_after_amount: boolean;
4504
- }
4505
- declare class CurrencyConfig implements ICurrencyConfig {
4506
- currency_symbol: string;
4507
- is_symbol_after_amount: boolean;
4508
- constructor();
4509
- }
4510
- declare class RoundingConfig implements IRoundingConfig {
4511
- base: number;
4512
- up: boolean;
4513
- cashless: boolean;
4514
- prepayment_rounding: boolean;
4515
- constructor();
4516
- }
4517
- /** Inventory Configuration */
4518
- interface IInventoryConfig {
4519
- /** Control flag for inventory */
4520
- inventory_control: boolean;
4521
- sold_out_for_today_only: boolean;
4522
- }
4523
- declare class InventoryConfig implements IInventoryConfig {
4524
- inventory_control: boolean;
4525
- sold_out_for_today_only: boolean;
4526
- constructor();
4527
- }
4528
- /** Pax Configuration */
4529
- interface IPaxConfig {
4530
- /** Pax flag */
4531
- pax: boolean;
4532
- /** Detail flag for Pax */
4533
- detail: boolean;
4534
- }
4535
- declare class PaxConfig implements IPaxConfig {
4536
- pax: boolean;
4537
- detail: boolean;
4538
- constructor();
4539
- }
4540
- /** GTO Configuration */
4541
- interface IGtoConfig {
4542
- /** Interface type */
4543
- interface: string;
4544
- /** Genesis date */
4545
- genesis_date: string;
4546
- /** Upload time */
4547
- upload_time: string;
4548
- /** FTP server */
4549
- ftp_svr: string;
4550
- /** FTP user */
4551
- ftp_usr: string;
4552
- /** FTP port */
4553
- ftp_port: string;
4554
- /** FTP path */
4555
- ftp_path: string;
4556
- /** FTP password */
4557
- ftp_pwd: string;
4558
- /** Mall ID */
4559
- mall_id: string;
4560
- /** Machine ID */
4561
- machine_id: string;
4562
- /** FTP type */
4563
- ftp_type: string;
4564
- }
4565
- declare class GTOConfig implements IGtoConfig {
4566
- interface: string;
4567
- genesis_date: string;
4568
- upload_time: string;
4569
- ftp_svr: string;
4570
- ftp_usr: string;
4571
- ftp_port: string;
4572
- ftp_path: string;
4573
- ftp_pwd: string;
4574
- mall_id: string;
4575
- machine_id: string;
4576
- ftp_type: string;
4577
- constructor();
4432
+ nearest?: boolean;
4578
4433
  }
4579
- /** CashDrawer Configuration */
4580
- interface ICashDrawerConfig {
4581
- /** CashDrawer code */
4582
- kick_code: string;
4583
- /** Connection mode */
4584
- connection_mode: 'via_receipt_printer' | 'via_imin_pos';
4434
+ interface IChargeConfig {
4435
+ service_charge: boolean;
4436
+ service_charge_rate: number;
4585
4437
  }
4586
- declare class CashDrawerConfig implements ICashDrawerConfig {
4587
- /**
4588
- * The kick code for the cash drawer.
4589
- */
4590
- kick_code: string;
4591
- /** Connection mode */
4592
- connection_mode: 'via_receipt_printer' | 'via_imin_pos';
4593
- /**
4594
- * Creates a new instance of the CashDrawerConfig class.
4595
- */
4438
+ declare class ChargeConfig implements IChargeConfig {
4439
+ service_charge: boolean;
4440
+ service_charge_rate: number;
4596
4441
  constructor();
4597
4442
  }
4598
- //#endregion
4599
- //#region src/types/report.type.d.ts
4600
- type IOrderTypeSummary = {
4601
- type: InvoiceType;
4602
- count: number;
4603
- total: number;
4604
- };
4605
- type IReportCategory = IAppBase & {
4606
- reports: IReport[];
4607
- };
4608
- type IReport = IAppBase & {
4609
- type: ReportType;
4610
- codename: string;
4611
- };
4612
- declare enum ReportType {
4613
- 'printable' = 0,
4614
- 'generative' = 1,
4443
+ interface ICurrencyConfig {
4444
+ currency_symbol: string;
4445
+ is_symbol_after_amount: boolean;
4615
4446
  }
4616
- declare class ReportCategory implements IReportCategory {
4617
- uid: string;
4618
- name: string;
4619
- name_translations: Record<string, string>;
4620
- reports: Report[];
4621
- created_at: Date;
4622
- created_at_timestamp: number;
4623
- updated_at: Date;
4624
- deleted_at: any;
4447
+ declare class CurrencyConfig implements ICurrencyConfig {
4448
+ currency_symbol: string;
4449
+ is_symbol_after_amount: boolean;
4625
4450
  constructor();
4626
4451
  }
4627
- declare class Report implements IReport {
4628
- uid: string;
4629
- name: string;
4630
- name_translations: Record<string, string>;
4631
- type: ReportType.printable;
4632
- codename: string;
4633
- created_at: Date;
4634
- created_at_timestamp: number;
4635
- updated_at: Date;
4636
- deleted_at: any;
4452
+ declare class RoundingConfig implements IRoundingConfig {
4453
+ base: number;
4454
+ up: boolean;
4455
+ cashless: boolean;
4456
+ prepayment_rounding: boolean;
4637
4457
  constructor();
4638
4458
  }
4639
- interface IAppReport extends IAppCoreModel {
4640
- reports: IReportCategory[];
4641
- version: number;
4459
+ /** Inventory Configuration */
4460
+ interface IInventoryConfig {
4461
+ /** Control flag for inventory */
4462
+ inventory_control: boolean;
4463
+ sold_out_for_today_only: boolean;
4642
4464
  }
4643
- declare class AppReport extends AppCoreModel implements IAppReport {
4644
- uid: string;
4645
- reports: ReportCategory[];
4646
- version: number;
4465
+ declare class InventoryConfig implements IInventoryConfig {
4466
+ inventory_control: boolean;
4467
+ sold_out_for_today_only: boolean;
4647
4468
  constructor();
4648
4469
  }
4649
- type IReportRequest = {
4650
- /**
4651
- * shift uid (if shift uid is provided, start and end date time will be ignored, and the report will be generated for the shift period.)
4652
- */
4653
- shift_uid: string;
4654
- /**
4655
- * start date and time
4656
- */
4657
- start_datetime: Date;
4658
- /**
4659
- * end date and time
4660
- */
4661
- end_datetime: Date;
4662
- /**
4663
- * report code name
4664
- */
4665
- report_code_name: string;
4666
- /**
4667
- * number of copies, default is 1
4668
- */
4669
- copies: number;
4670
- declared_amount: number;
4671
- };
4672
- type IReportData = {
4673
- start_datetime: string;
4674
- humanized_start_datetime: string;
4675
- end_datetime: string;
4676
- humanized_end_datetime: string;
4677
- printed_time: string;
4678
- sales_summary: ISalesSummary;
4679
- drawer_summary: IDrawerSummary;
4680
- non_cash_till_summary: INonCashTillSummary;
4681
- payments_summary: IPaymentSummary[];
4682
- loyalty_program_summary: ILoyaltyProgramSummary;
4683
- item_sales_summary: TItemSalesSummary[];
4684
- item_sales_summary_total: number;
4685
- item_sales_summary_total_count: number;
4686
- item_sales_summary_original_total?: number;
4687
- item_sales_summary_discount_total?: number;
4688
- item_sales_summary_by_category: TCategorySalesSummary[];
4689
- modifier_sales_summary: TModifierSalesSummary[];
4690
- modifier_sales_summary_total: number;
4691
- modifier_sales_summary_total_count: number;
4692
- config: IConfig;
4693
- invoice_discount_summary: IDiscountSummaryEntry[];
4694
- item_discount_summary: IDiscountSummaryEntry[];
4695
- order_type_summary: IOrderTypeSummary[];
4696
- first_ref_id: string;
4697
- last_ref_id: string;
4698
- };
4699
- declare class ReportData implements IReportData {
4700
- start_datetime: string;
4701
- humanized_start_datetime: string;
4702
- end_datetime: string;
4703
- humanized_end_datetime: string;
4704
- humanized_printed_datetime: string;
4705
- printed_time: string;
4706
- sales_summary: SalesSummary;
4707
- drawer_summary: DrawerSummary;
4708
- non_cash_till_summary: NonCashTillSummary;
4709
- payments_summary: PaymentSummary[];
4710
- loyalty_program_summary: LoyaltyProgramSummary;
4711
- item_sales_summary: ItemSalesSummary[];
4712
- item_sales_summary_total: number;
4713
- item_sales_summary_total_count: number;
4714
- item_sales_summary_original_total: number;
4715
- item_sales_summary_discount_total: number;
4716
- item_sales_summary_by_category: CategorySalesSummary[];
4717
- modifier_sales_summary: ModifierSalesSummary[];
4718
- modifier_sales_summary_total: number;
4719
- modifier_sales_summary_total_count: number;
4720
- config: IConfig;
4721
- invoice_discount_summary: IDiscountSummaryEntry[];
4722
- item_discount_summary: IDiscountSummaryEntry[];
4723
- order_type_summary: IOrderTypeSummary[];
4724
- first_ref_id: string;
4725
- last_ref_id: string;
4726
- }
4727
- type ISalesSummary = {
4728
- sales_total: number;
4729
- foc_sales_total: number;
4730
- foc_sales_count: number;
4731
- foc_rounding_total: number;
4732
- foc_tax_total: number;
4733
- foc_service_charge_total: number;
4734
- rounding_total: number;
4735
- tax_total: number;
4736
- service_charge_total: number;
4737
- discount_total: number;
4738
- voucher_total: number;
4739
- voucher_count: number;
4740
- coupon_total: number;
4741
- coupon_count: number;
4742
- paid_invoice_count: number;
4743
- paid_invoice_total: number;
4744
- void_invoice_count: number;
4745
- void_invoice_total: number;
4746
- total_pax: number;
4747
- pax_sales_total: number;
4748
- };
4749
- declare class SalesSummary implements ISalesSummary {
4750
- sales_total: number;
4751
- foc_sales_total: number;
4752
- foc_sales_count: number;
4753
- foc_rounding_total: number;
4754
- foc_tax_total: number;
4755
- foc_service_charge_total: number;
4756
- rounding_total: number;
4757
- tax_total: number;
4758
- service_charge_total: number;
4759
- discount_total: number;
4760
- voucher_total: number;
4761
- voucher_count: number;
4762
- coupon_total: number;
4763
- coupon_count: number;
4764
- paid_invoice_count: number;
4765
- paid_invoice_total: number;
4766
- void_invoice_count: number;
4767
- void_invoice_total: number;
4768
- total_pax: number;
4769
- pax_sales_total: number;
4770
- }
4771
- type IDiscountSummaryEntry = {
4772
- name: string;
4773
- alias: string;
4774
- calc_type: CalcType;
4775
- amount: number;
4776
- percent: number;
4777
- count: number;
4778
- total: number;
4779
- };
4780
- type ITillEntry = {
4781
- type: TillType;
4782
- label: string;
4783
- created_at: string;
4784
- time: string;
4785
- amount: number;
4786
- note: string;
4787
- payment_method_code?: string;
4788
- payment_method_name?: string;
4789
- invoice_uid: string;
4790
- ref_id: string;
4791
- };
4792
- type IDrawerSummary = {
4793
- open_amount: number;
4794
- declared_amount: number;
4795
- drawer_amount: number;
4796
- difference: number;
4797
- pay_in_total: number;
4798
- pay_in_count: number;
4799
- pay_out_total: number;
4800
- pay_out_count: number;
4801
- entries: ITillEntry[];
4802
- };
4803
- declare class DrawerSummary implements IDrawerSummary {
4804
- open_amount: number;
4805
- declared_amount: number;
4806
- drawer_amount: number;
4807
- difference: number;
4808
- pay_in_total: number;
4809
- pay_in_count: number;
4810
- cash_invoice_total: number;
4811
- cash_invoice_count: number;
4812
- pay_out_total: number;
4813
- pay_out_count: number;
4814
- entries: ITillEntry[];
4470
+ /** Pax Configuration */
4471
+ interface IPaxConfig {
4472
+ /** Pax flag */
4473
+ pax: boolean;
4474
+ /** Detail flag for Pax */
4475
+ detail: boolean;
4815
4476
  }
4816
- type INonCashTillSummary = {
4817
- pay_in_total: number;
4818
- pay_in_count: number;
4819
- pay_out_total: number;
4820
- pay_out_count: number;
4821
- pay_in_by_method: IPaymentSummary[];
4822
- pay_out_by_method: IPaymentSummary[];
4823
- entries: ITillEntry[];
4824
- };
4825
- declare class NonCashTillSummary implements INonCashTillSummary {
4826
- pay_in_total: number;
4827
- pay_in_count: number;
4828
- pay_out_total: number;
4829
- pay_out_count: number;
4830
- pay_in_by_method: IPaymentSummary[];
4831
- pay_out_by_method: IPaymentSummary[];
4832
- entries: ITillEntry[];
4477
+ declare class PaxConfig implements IPaxConfig {
4478
+ pax: boolean;
4479
+ detail: boolean;
4480
+ constructor();
4833
4481
  }
4834
- type IPaymentSummary = {
4835
- code: string;
4836
- name: string;
4837
- total: number;
4838
- count: number;
4839
- topup_total?: number;
4840
- topup_count?: number;
4841
- direct_total?: number;
4842
- direct_count?: number;
4843
- };
4844
- declare class PaymentSummary implements IPaymentSummary {
4845
- code: string;
4846
- name: string;
4847
- total: number;
4848
- count: number;
4482
+ /** GTO Configuration */
4483
+ interface IGtoConfig {
4484
+ /** Interface type */
4485
+ interface: string;
4486
+ /** Genesis date */
4487
+ genesis_date: string;
4488
+ /** Upload time */
4489
+ upload_time: string;
4490
+ /** FTP server */
4491
+ ftp_svr: string;
4492
+ /** FTP user */
4493
+ ftp_usr: string;
4494
+ /** FTP port */
4495
+ ftp_port: string;
4496
+ /** FTP path */
4497
+ ftp_path: string;
4498
+ /** FTP password */
4499
+ ftp_pwd: string;
4500
+ /** Mall ID */
4501
+ mall_id: string;
4502
+ /** Machine ID */
4503
+ machine_id: string;
4504
+ /** FTP type */
4505
+ ftp_type: string;
4849
4506
  }
4850
- type ILoyaltyProgramSummary = {
4851
- add_credit_total: number;
4852
- add_credit_count: number;
4853
- topup_paid_total: number;
4854
- topup_paid_count: number;
4855
- rewarded_credit_total: number;
4856
- rewarded_credit_count: number;
4857
- minus_credit_total: number;
4858
- minus_credit_count: number;
4859
- rewarded_point_total: number;
4860
- rewarded_point_count: number;
4861
- minus_point_total: number;
4862
- minus_point_count: number;
4863
- };
4864
- declare class LoyaltyProgramSummary implements ILoyaltyProgramSummary {
4865
- add_credit_total: number;
4866
- add_credit_count: number;
4867
- topup_paid_total: number;
4868
- topup_paid_count: number;
4869
- rewarded_credit_total: number;
4870
- rewarded_credit_count: number;
4871
- minus_credit_total: number;
4872
- minus_credit_count: number;
4873
- rewarded_point_total: number;
4874
- rewarded_point_count: number;
4875
- minus_point_total: number;
4876
- minus_point_count: number;
4507
+ declare class GTOConfig implements IGtoConfig {
4508
+ interface: string;
4509
+ genesis_date: string;
4510
+ upload_time: string;
4511
+ ftp_svr: string;
4512
+ ftp_usr: string;
4513
+ ftp_port: string;
4514
+ ftp_path: string;
4515
+ ftp_pwd: string;
4516
+ mall_id: string;
4517
+ machine_id: string;
4518
+ ftp_type: string;
4519
+ constructor();
4877
4520
  }
4878
- type TItemCoreSalesSummary = {
4879
- item: IItem;
4521
+ /** CashDrawer Configuration */
4522
+ interface ICashDrawerConfig {
4523
+ /** CashDrawer code */
4524
+ kick_code: string;
4525
+ /** Connection mode */
4526
+ connection_mode: 'via_receipt_printer' | 'via_imin_pos';
4527
+ }
4528
+ declare class CashDrawerConfig implements ICashDrawerConfig {
4529
+ /**
4530
+ * The kick code for the cash drawer.
4531
+ */
4532
+ kick_code: string;
4533
+ /** Connection mode */
4534
+ connection_mode: 'via_receipt_printer' | 'via_imin_pos';
4535
+ /**
4536
+ * Creates a new instance of the CashDrawerConfig class.
4537
+ */
4538
+ constructor();
4539
+ }
4540
+ //#endregion
4541
+ //#region src/types/product.type.d.ts
4542
+ type TStockChangeItem = {
4543
+ item_uid: string;
4880
4544
  quantity: number;
4881
- total_amount: number;
4882
4545
  };
4883
- type TItemSalesSummary = TItemCoreSalesSummary & {
4884
- modifiers?: TItemCoreSalesSummary[];
4885
- original_amount?: number;
4886
- discount_amount?: number;
4546
+ type TStockChange = TStockChangeItem & {
4547
+ modifiers: TStockChangeItem[];
4887
4548
  };
4888
- declare class ItemSalesSummary implements TItemSalesSummary {
4889
- item: IItem;
4549
+ declare class StockChange implements TStockChange {
4550
+ item_uid: string;
4890
4551
  quantity: number;
4891
- total_amount: number;
4892
- original_amount: number;
4893
- discount_amount: number;
4894
- modifiers: TItemCoreSalesSummary[];
4552
+ modifiers: TStockChangeItem[];
4553
+ constructor(item_uid: string);
4895
4554
  }
4896
- type TModifierSalesSummary = {
4897
- item: IItem;
4898
- quantity: number;
4899
- total_amount: number;
4555
+ interface IProductBase extends IAppExtraModel, IAppModelSequence {
4556
+ /**
4557
+ * color of the object
4558
+ */
4559
+ color: string;
4560
+ /**
4561
+ * icon of the object
4562
+ */
4563
+ icon: string;
4564
+ /**
4565
+ * meta data
4566
+ * @ignore
4567
+ */
4568
+ meta: Record<string, any>;
4569
+ /**
4570
+ * extra data
4571
+ * @ignore
4572
+ */
4573
+ etc: Record<string, any>;
4574
+ /**
4575
+ * assets of the product (for image, etc)
4576
+ * Predefined keys that can be used by the system
4577
+ */
4578
+ assets: ProductPartialAssets & Record<string, any>;
4579
+ /**
4580
+ * config of the product
4581
+ * Predefined keys that can be used by the system
4582
+ */
4583
+ config: ProductPartialConfig & Record<string, any>;
4584
+ /**
4585
+ * if the product is internal and displayed in the POS only
4586
+ */
4587
+ is_internal: boolean;
4588
+ }
4589
+ /**
4590
+ * Predefined asset keys that can be used in the product assets
4591
+ */
4592
+ type ProductPartialAssets = {
4593
+ /**
4594
+ * large image url for online order
4595
+ */
4596
+ online_order_large_image_url?: string;
4597
+ /**
4598
+ * large image thumbnail url for online order
4599
+ */
4600
+ online_order_large_image_thumbnail_url?: string;
4601
+ /**
4602
+ * large image file path for online order
4603
+ */
4604
+ online_order_large_image_file_path?: string;
4605
+ /**
4606
+ * small image url for online order
4607
+ */
4608
+ online_order_small_image_url?: string;
4609
+ /**
4610
+ * small image thumbnail url for online order
4611
+ */
4612
+ online_order_small_image_thumbnail_url?: string;
4613
+ /**
4614
+ * small image file path for online order
4615
+ */
4616
+ online_order_small_image_file_path?: string;
4900
4617
  };
4901
- declare class ModifierSalesSummary implements TModifierSalesSummary {
4902
- item: IItem;
4903
- quantity: number;
4904
- total_amount: number;
4618
+ /**
4619
+ * Predefined config keys that can be used in the product configs
4620
+ */
4621
+ type ProductPartialConfig = {
4622
+ /**
4623
+ * display large image for online order, if false, small image will be displayed
4624
+ */
4625
+ online_order_display_large_image: boolean;
4626
+ /** 该商品需满多少金额(该商品行金额合计)才可下单 */
4627
+ min_order_amount?: number;
4628
+ /** 特价单价,只对前 promo_max_quantity 份生效,其余恢复原价 */
4629
+ promo_price?: number;
4630
+ /** 特价份数上限,默认 1 */
4631
+ promo_max_quantity?: number;
4632
+ /** 特价与会员价互斥:点了特价,该商品不享会员价 */
4633
+ promo_excludes_member_price?: boolean;
4634
+ /** optional custom badges for product / modifier */
4635
+ custom_badges?: {
4636
+ text: string;
4637
+ text_translations?: Record<string, string>;
4638
+ background?: string;
4639
+ }[];
4640
+ /** weekly listing schedule; the POS main device sets is_delisted at each window start / end; absent or empty = manual only */
4641
+ schedules?: Schedule[];
4642
+ };
4643
+ declare class ProductBase extends AppExtraModel implements IProductBase {
4644
+ meta: {};
4645
+ etc: {};
4646
+ assets: {};
4647
+ config: {
4648
+ online_order_display_large_image: boolean;
4649
+ };
4650
+ is_internal: boolean;
4651
+ color: string;
4652
+ icon: string;
4653
+ sequence: number;
4654
+ constructor();
4655
+ }
4656
+ interface IVisibility {
4657
+ system: System;
4658
+ visible: boolean;
4659
+ sequence: number;
4660
+ }
4661
+ declare class Visibility implements IVisibility {
4662
+ system: System;
4663
+ visible: boolean;
4664
+ sequence: number;
4665
+ constructor();
4905
4666
  }
4906
- type TCategorySalesSummary = {
4907
- category: ICategory | null;
4908
- items: TItemSalesSummary[];
4909
- total_quantity: number;
4910
- total_amount: number;
4911
- original_amount?: number;
4912
- discount_amount?: number;
4913
- };
4914
- declare class CategorySalesSummary implements TCategorySalesSummary {
4915
- category: ICategory | null;
4916
- items: TItemSalesSummary[];
4917
- total_quantity: number;
4918
- total_amount: number;
4919
- original_amount: number;
4920
- discount_amount: number;
4667
+ declare enum System {
4668
+ POS = "pos",
4669
+ QrCodeOrder = "qr_code_order",
4921
4670
  }
4922
- //#endregion
4923
- //#region src/types/printer.type.d.ts
4924
- interface IDevice extends IAppCoreModel {
4925
- machine_name: string;
4926
- connection_id: string;
4927
- type: DeviceType;
4928
- etc: DeviceEtc;
4671
+ interface ICoreCategory extends IProductBase {
4672
+ type: CategoryType;
4673
+ visibility: Array<Visibility>;
4674
+ /**
4675
+ * maximum order quantity before you can order
4676
+ */
4677
+ max_order: number;
4678
+ /**
4679
+ * minimum order quantity before you can order
4680
+ */
4681
+ min_order: number;
4682
+ /**
4683
+ * Indicates whether the category is delisted
4684
+ */
4685
+ is_delisted: boolean;
4686
+ /** Auto-generated category code */
4687
+ code?: string;
4688
+ printing_sequence?: number;
4689
+ allow_custom_modifier?: boolean;
4929
4690
  }
4930
- type DeviceEtc = {
4931
- fomopay_terminal_id: string;
4932
- hirector_public_key: string;
4933
- hirector_private_key: string;
4934
- yeahpay_app_id: string;
4935
- yeahpay_device_sn: string;
4936
- yeahpay_server_public_key: string;
4937
- yeahpay_client_private_key: string;
4938
- yeahpay_signature_key: string;
4939
- yeahpay_async_url: string;
4940
- yeahpay_print_copies?: number;
4941
- sync_to_specific_cds: string;
4942
- [key: string]: unknown;
4943
- };
4944
- type INode = IDevice;
4945
- declare class Device extends AppBaseModel implements IDevice {
4946
- machine_name: string;
4947
- connection_id: string;
4948
- type: DeviceType;
4949
- etc: DeviceEtc;
4691
+ interface ICategory extends ICoreCategory {
4692
+ image_url: string;
4693
+ /**
4694
+ * image file path
4695
+ */
4696
+ image_file_path: string;
4697
+ /**
4698
+ *
4699
+ */
4700
+ image_thumbnail_url: string;
4701
+ /**
4702
+ * image thumbnail file path
4703
+ */
4704
+ image_thumbnail_file_path: string;
4705
+ /** if category has subcategory */
4706
+ has_subcategory: boolean;
4707
+ /** Printing sequence number */
4708
+ printing_sequence: number;
4709
+ /**
4710
+ * subcategories of the category
4711
+ */
4712
+ subcategories: Array<ISubcategory>;
4713
+ /** If true, category and its items are excluded from search results */
4714
+ non_searchable?: boolean;
4715
+ }
4716
+ declare enum CategoryType {
4717
+ Product = "product",
4718
+ Modifier = "modifier",
4719
+ }
4720
+ declare class CoreCategory extends ProductBase implements ICoreCategory {
4721
+ type: CategoryType;
4722
+ visibility: Visibility[];
4723
+ uid: string;
4724
+ max_order: number;
4725
+ min_order: number;
4726
+ is_delisted: boolean;
4727
+ code?: string;
4728
+ printing_sequence: number;
4729
+ allow_custom_modifier?: boolean;
4950
4730
  constructor();
4951
4731
  }
4952
- declare class Node extends AppBaseModel implements INode {
4953
- type: DeviceType;
4954
- machine_name: string;
4955
- connection_id: string;
4956
- etc: DeviceEtc;
4732
+ declare class Category extends ProductBase implements ICategory {
4733
+ image_url: string;
4734
+ image_file_path: string;
4735
+ image_thumbnail_url: string;
4736
+ image_thumbnail_file_path: string;
4737
+ has_subcategory: boolean;
4738
+ name_translations: Record<string, string>;
4739
+ visibility: Visibility[];
4740
+ printing_sequence: number;
4741
+ type: CategoryType;
4742
+ is_delisted: boolean;
4743
+ subcategories: any[];
4744
+ uid: string;
4745
+ max_order: number;
4746
+ min_order: number;
4747
+ code?: string;
4748
+ non_searchable?: boolean;
4957
4749
  constructor();
4958
4750
  }
4959
- declare enum DeviceType {
4960
- Client = "client",
4961
- Node = "node",
4751
+ interface ISubcategory extends IProductBase {
4752
+ /** Category ID */
4753
+ category_uid: string;
4962
4754
  }
4963
- declare enum PrinterType {
4964
- ReceiptPrinter = "receipt_printer",
4965
- CheckPrinter = "check_printer",
4966
- OrderPrinter = "order_printer",
4967
- KitchenPrinter = "kitchen_printer",
4968
- KioskPrinter = "kiosk_printer",
4969
- LabelPrinter = "label_printer",
4970
- QrCodePrinter = "qr_code_printer",
4971
- KitchenDisplayPrinter = "kitchen_display_printer",
4972
- EventPrinter = "event_printer",
4755
+ declare class Subcategory extends ProductBase implements ISubcategory {
4756
+ category_uid: string;
4757
+ uid: string;
4758
+ constructor();
4973
4759
  }
4974
- interface INodePrinter {
4975
- printer_name: string;
4976
- status: string;
4977
- port_name: string;
4978
- error: string;
4760
+ declare enum ProductType {
4761
+ ByQuantity = "by_quantity",
4762
+ ByWeight = "by_weight",
4763
+ Service = "service",
4764
+ Combo = "combo",
4765
+ Modifier = "modifier",
4766
+ Package = "package",
4979
4767
  }
4980
- declare class NodePrinter implements INodePrinter {
4981
- printer_name: string;
4982
- status: string;
4983
- port_name: string;
4984
- error: string;
4768
+ /**
4769
+ * Interface for a core item, which extends the IProductBase interface.
4770
+ */
4771
+ interface ICoreItem extends IProductBase {
4772
+ /**
4773
+ * Rank of the item
4774
+ */
4775
+ image_url: string;
4776
+ /**
4777
+ * image file path
4778
+ */
4779
+ image_file_path: string;
4780
+ /**
4781
+ * @ignore
4782
+ */
4783
+ image_thumbnail_url: string;
4784
+ /**
4785
+ * image thumbnail file path
4786
+ */
4787
+ image_thumbnail_file_path: string;
4788
+ /**
4789
+ * The SKU (stock keeping unit) of the item.
4790
+ */
4791
+ sku: string;
4792
+ /**
4793
+ * The type of product.
4794
+ */
4795
+ type: ProductType;
4796
+ /**
4797
+ * The visibility of the item.
4798
+ */
4799
+ visibility: Array<Visibility>;
4800
+ /**
4801
+ * The barcode of the item.
4802
+ */
4803
+ barcode: string;
4804
+ /** Auto-generated PLU hash code */
4805
+ plu?: string;
4806
+ /**
4807
+ * The price of the item.
4808
+ */
4809
+ price: number;
4810
+ /**
4811
+ * The original price of the item.
4812
+ */
4813
+ original_price: number;
4814
+ /**
4815
+ * The price list of the item.
4816
+ */
4817
+ prices: Array<IPrice>;
4818
+ /**
4819
+ * The unique identifier of the category that the item belongs to.
4820
+ */
4821
+ category_uid: string;
4822
+ /**
4823
+ * The current stock level of the item.
4824
+ * @ignore
4825
+ */
4826
+ stock: number;
4827
+ /**
4828
+ * Whether or not the item is sold out.
4829
+ */
4830
+ is_sold_out: boolean;
4831
+ /** Auto reset sold out status at shift start */
4832
+ auto_reset_sold_out?: boolean;
4833
+ /** Exclude from shift-open sold-out auto-reset */
4834
+ exclude_auto_reset_sold_out?: boolean;
4835
+ /**
4836
+ * Whether or not the item should be printed on the receipt.
4837
+ */
4838
+ print_on_receipt: boolean;
4839
+ /**
4840
+ * Whether or not the price of the item can be adjusted.
4841
+ */
4842
+ price_adjustable: boolean;
4843
+ /**
4844
+ * Recipe of the modifier
4845
+ */
4846
+ recipe: string;
4847
+ /** Whether remark is disabled for this item */
4848
+ is_remark_disabled: boolean;
4849
+ /** Auto select first modifier when editor panel opens */
4850
+ auto_select_first_modifier?: boolean;
4851
+ /** Auto add/remove 1:1 with product quantity on takeaway orders */
4852
+ is_auto_applied?: boolean;
4853
+ /** Auto add 1 per product unit on every order type; cashier cannot remove. Wins over is_auto_applied when both are set */
4854
+ is_always_auto_applied?: boolean;
4855
+ /** Eligible container: calculate() adds S$0.10 per unit after tax, so the deposit is not discounted, service-charged or taxed */
4856
+ has_bcrs_deposit: boolean;
4857
+ /** Indicates whether the item is tax exempt */
4858
+ is_tax_exempt?: boolean;
4859
+ /** Indicates whether the item is service charge exempt */
4860
+ is_service_charge_exempt?: boolean;
4985
4861
  }
4986
- declare enum PrinterProtocols {
4987
- ESCPOS = "ESC/POS",
4988
- TSPL = "TSPL",
4862
+ declare class CoreItem extends ProductBase implements ICoreItem {
4863
+ image_url: string;
4864
+ image_file_path: string;
4865
+ image_thumbnail_url: string;
4866
+ image_thumbnail_file_path: string;
4867
+ visibility: Visibility[];
4868
+ sku: string;
4869
+ type: ProductType;
4870
+ barcode: string;
4871
+ plu?: string;
4872
+ category_uid: string;
4873
+ price: number;
4874
+ original_price: number;
4875
+ prices: Array<IPrice>;
4876
+ stock: number;
4877
+ print_on_receipt: boolean;
4878
+ price_adjustable: boolean;
4879
+ is_sold_out: boolean;
4880
+ auto_reset_sold_out?: boolean;
4881
+ exclude_auto_reset_sold_out?: boolean;
4882
+ recipe: string;
4883
+ is_remark_disabled: boolean;
4884
+ auto_select_first_modifier?: boolean;
4885
+ is_auto_applied?: boolean;
4886
+ is_always_auto_applied?: boolean;
4887
+ has_bcrs_deposit: boolean;
4888
+ uid: string;
4889
+ constructor();
4989
4890
  }
4990
- declare enum PrinterConnections {
4991
- USB = "USB",
4992
- WINDOWS_DRIVER = "WINDOWS_DRIVER",
4993
- ETHERNET = "ETHERNET",
4994
- BLUETOOTH = "BLUETOOTH",
4995
- BUILTIN = "BUILTIN",
4996
- IMIN_BUILT_IN = "IMIN_BUILT_IN",
4997
- WINDOWS_DRIVER_BUILT_IN = "WINDOWS_DRIVER_BUILT_IN",
4891
+ /**
4892
+ * Items
4893
+ */
4894
+ interface IItem extends ICoreItem {
4895
+ /**
4896
+ * Codename of the item
4897
+ */
4898
+ codename: string;
4899
+ /**
4900
+ * Recipe of the item
4901
+ */
4902
+ recipe: string;
4903
+ /**
4904
+ * Credit value of the item
4905
+ */
4906
+ add_credit: number;
4907
+ /** Point value added to customer after purchase */
4908
+ add_point: number;
4909
+ /**
4910
+ * Subcategory ID of the item
4911
+ */
4912
+ subcategory_uid: string;
4913
+ /**
4914
+ * Unit of the item
4915
+ * @ignore
4916
+ */
4917
+ unit: number;
4918
+ /**
4919
+ * Number of items sold
4920
+ * @ignore
4921
+ */
4922
+ sold: number;
4923
+ /**
4924
+ * if editor will be opened by default when item is clicked
4925
+ */
4926
+ open_editor: boolean;
4927
+ /**
4928
+ * how many points will be used to purchase the item
4929
+ */
4930
+ minus_point: number;
4931
+ /**
4932
+ * Cost of the item
4933
+ */
4934
+ cost: number;
4935
+ /**
4936
+ * Indicates whether the item is discountable
4937
+ */
4938
+ discountable: boolean;
4939
+ /**
4940
+ * Printing sequence of the item
4941
+ * @ignore
4942
+ */
4943
+ printing_sequence: number;
4944
+ /**
4945
+ * Number of likes for the item
4946
+ * @ignore
4947
+ */
4948
+ likes: number;
4949
+ /**
4950
+ * Number of dislikes for the item
4951
+ * @ignore
4952
+ */
4953
+ dislikes: number;
4954
+ /**
4955
+ * if the item is recommended
4956
+ */
4957
+ recommended: boolean;
4958
+ /**
4959
+ * Indicates whether the item is tax exempt
4960
+ */
4961
+ is_tax_exempt: boolean;
4962
+ /**
4963
+ * Indicates whether the item is service charge exempt
4964
+ */
4965
+ is_service_charge_exempt: boolean;
4966
+ /**
4967
+ * Indicates whether the item is point reward exempt
4968
+ */
4969
+ is_point_reward_exempt: boolean;
4970
+ /**
4971
+ * Indicates whether the item is credit reward exempt
4972
+ */
4973
+ is_credit_reward_exempt: boolean;
4974
+ /**
4975
+ * Indicates whether the item is internal and displayed in the POS only
4976
+ */
4977
+ is_internal: boolean;
4978
+ /**
4979
+ * Indicates whether the item is delisted
4980
+ */
4981
+ is_delisted: boolean;
4982
+ /**
4983
+ * Modifier IDs of the item
4984
+ */
4985
+ modifiers?: Array<ICoreItem>;
4986
+ /**
4987
+ * Modifier Group IDs of the item
4988
+ */
4989
+ modifier_categories?: Array<ICoreCategory>;
4990
+ /**
4991
+ * Kitchen printer IDs of the item
4992
+ */
4993
+ kitchen_printers_uids: Array<string>;
4994
+ /**
4995
+ * Order printer IDs of the item
4996
+ */
4997
+ order_printers_uids: Array<string>;
4998
+ /**
4999
+ * Label printer IDs of the item
5000
+ */
5001
+ label_printers_uids: Array<string>;
5002
+ /**
5003
+ * if editor will be opened by default when item is clicked
5004
+ */
5005
+ open_editor_panel: boolean;
5006
+ /**
5007
+ * if price editor will be opened by default when item is clicked
5008
+ */
5009
+ open_price_editor: boolean;
5010
+ /**
5011
+ * Combo groups (only applicable when type is ProductType.Combo)
5012
+ */
5013
+ combo_groups: IComboGroup[];
5014
+ /** Auto-attached item UIDs that will be added when this item is added */
5015
+ attached_items?: string[];
5016
+ /** If true, item is excluded from search results */
5017
+ non_searchable?: boolean;
5018
+ /** 0/false = off; true = 1:1 (compat); >=1 = ratio (e.g. 4 = 1 product per 4 pax) */
5019
+ is_pax_linked?: number | boolean;
5020
+ /** If true, item with line discount is excluded from order-level discount */
5021
+ is_discount_nonstackable?: boolean;
5022
+ /** If true, price editor input is the total payable (incl. service charge and tax) and is reverse-calculated to the net price */
5023
+ price_as_total_payable?: boolean;
4998
5024
  }
4999
- type IPrintTemplateCore = {
5000
- header: string;
5001
- body: string;
5002
- footer: string;
5003
- commands: string;
5004
- };
5005
- declare class PrintTemplateCore implements IPrintTemplateCore {
5006
- header: string;
5007
- body: string;
5008
- footer: string;
5009
- commands: string;
5010
- type: PrinterType;
5025
+ declare class Item extends CoreItem implements IItem {
5026
+ codename: string;
5027
+ sku: string;
5028
+ recipe: string;
5029
+ barcode: string;
5030
+ type: ProductType;
5031
+ add_credit: number;
5032
+ add_point: number;
5033
+ category_uid: string;
5034
+ subcategory_uid: string;
5035
+ unit: number;
5036
+ stock: number;
5037
+ is_sold_out: boolean;
5038
+ sold: number;
5039
+ print_on_receipt: boolean;
5040
+ price: number;
5041
+ open_editor: boolean;
5042
+ price_adjustable: boolean;
5043
+ minus_point: number;
5044
+ cost: number;
5045
+ discountable: boolean;
5046
+ printing_sequence: number;
5047
+ recommended: boolean;
5048
+ likes: number;
5049
+ dislikes: number;
5050
+ is_tax_exempt: boolean;
5051
+ is_service_charge_exempt: boolean;
5052
+ is_point_reward_exempt: boolean;
5053
+ is_credit_reward_exempt: boolean;
5054
+ is_internal: boolean;
5055
+ is_delisted: boolean;
5056
+ uid: string;
5057
+ modifiers?: Array<ICoreItem>;
5058
+ modifier_categories?: Array<ICoreCategory>;
5059
+ kitchen_printers_uids: any[];
5060
+ order_printers_uids: any[];
5061
+ label_printers_uids: any[];
5062
+ open_editor_panel: boolean;
5063
+ open_price_editor: boolean;
5064
+ combo_groups: IComboGroup[];
5065
+ non_searchable?: boolean;
5066
+ is_pax_linked?: number | boolean;
5067
+ is_discount_nonstackable?: boolean;
5068
+ price_as_total_payable?: boolean;
5011
5069
  constructor();
5012
5070
  }
5013
- type IPrintTemplate = IPrintTemplateCore & IAppBaseModel & {
5014
- printer_type: PrinterType;
5015
- codepage?: Codepages;
5016
- report_code_name: string;
5017
- };
5018
- declare class PrintTemplate extends AppBaseModel implements IPrintTemplate {
5019
- header: string;
5020
- body: string;
5021
- footer: string;
5022
- commands: string;
5023
- printer_type: PrinterType;
5024
- codepage?: Codepages;
5071
+ /** pricing strategy: fixed amount or ratio of base price */
5072
+ declare enum PriceType {
5073
+ Flat = "flat",
5074
+ Percent = "percent",
5075
+ }
5076
+ interface IPrice extends IAppCoreModel {
5077
+ /** keys to look up the price */
5078
+ lookup_keys: Array<string | 'member_price'>;
5079
+ /** product uid*/
5080
+ product_uid: string;
5081
+ /** fixed amount, used when type=flat */
5082
+ amount: number;
5083
+ /** price type, defaults to flat for backward compatibility */
5084
+ type?: PriceType;
5085
+ /** decimal ratio (0-1), used when type=percent, e.g. 0.9 = 10% off */
5086
+ percent?: number;
5087
+ /** name of the price */
5088
+ name: string;
5089
+ /** name translations */
5090
+ name_translations: Record<string, string>;
5091
+ }
5092
+ declare class Price extends AppCoreModel implements IPrice {
5093
+ lookup_keys: any[];
5094
+ product_uid: string;
5025
5095
  uid: string;
5026
- report_code_name: string;
5096
+ amount: number;
5097
+ type: PriceType;
5098
+ percent: number;
5099
+ name: string;
5100
+ name_translations: Record<string, string>;
5027
5101
  constructor();
5028
5102
  }
5029
- declare enum PrintJobStatus {
5030
- Queued = "queued",
5031
- Printed = "printed",
5032
- Failed = "failed",
5033
- Expired = "expired",
5034
- }
5035
- interface IPrintJob extends IAppCoreModel {
5036
- printer_name: string;
5037
- /** Actual printer name using printer driver*/
5038
- driver_printer_name: string;
5039
- printer_ip: string;
5040
- printer_uid: string;
5041
- printer_type: PrinterType;
5042
- protocol: PrinterProtocols;
5043
- connection_type: PrinterConnections;
5044
- data: IPrintCommand;
5045
- commands: string;
5046
- status: PrintJobStatus;
5047
- retries: number;
5048
- /** If true, only save the print job to the database, do not print */
5049
- save_only: boolean;
5050
- print_times: number;
5051
- printed: number;
5052
- /** Targeting which device to print */
5053
- device_uid_to_print: string;
5054
- /** Designated Table Sections */
5055
- designated_table_section_uids: string[];
5056
- /** Job ID */
5057
- job_id: number;
5058
- /** Print sequence order (lower number prints first) */
5059
- print_sequence?: number;
5103
+ /**
5104
+ * COMBO PRODUCT IMPLEMENTATION
5105
+ *
5106
+ * Combo products bundle multiple existing products together and sell them as a group,
5107
+ * usually at a discount. This implementation provides minimal impact on existing data structures.
5108
+ *
5109
+ * Usage:
5110
+ * 1. Create combo product with type = ProductType.Combo
5111
+ * 2. Define combo_groups array with component groups and available items
5112
+ * 3. Set combo discount (either amount or percentage)
5113
+ * 4. When adding to invoice, combo appears as single line with selections in combo_components
5114
+ *
5115
+ * Example:
5116
+ * ```
5117
+ * const combo: IItem = {
5118
+ * type: ProductType.Combo,
5119
+ * combo_groups: [
5120
+ * {
5121
+ * name: "Choose your main",
5122
+ * min_selections: 1,
5123
+ * max_selections: 1,
5124
+ * required: true,
5125
+ * items: [
5126
+ * { item_uid: 'burger_uid', is_default: true },
5127
+ * { item_uid: 'chicken_uid', price_override: 2.00 }
5128
+ * ]
5129
+ * },
5130
+ * {
5131
+ * name: "Pick a side",
5132
+ * min_selections: 1,
5133
+ * max_selections: 1,
5134
+ * required: true,
5135
+ * items: [
5136
+ * { item_uid: 'fries_uid', is_default: true },
5137
+ * { item_uid: 'onion_rings_uid', price_override: 1.50 }
5138
+ * ]
5139
+ * }
5140
+ * ],
5141
+ * combo_discount_percent: 15 // 15% discount
5142
+ * }
5143
+ * ```
5144
+ */
5145
+ /**
5146
+ * Interface for individual items within a combo group
5147
+ */
5148
+ interface IComboGroupItem extends IAppModelSequence {
5149
+ /** Item unique id */
5150
+ item_uid: string;
5151
+ /** @deprecated use item_uid */
5152
+ combo_item: any;
5153
+ /** Price of the item in combo */
5154
+ price: number;
5155
+ /** Meta data */
5060
5156
  meta: Record<string, unknown>;
5061
- /** USB device ID (runtime dynamic) */
5062
- usb_device_id?: number;
5063
- /** USB serial number for persistent device identification */
5064
- usb_serial_number?: string;
5065
- /** Use deviceName instead of serialNumber for USB device identification */
5066
- use_device_name?: boolean;
5067
- /** USB device name path (e.g., /dev/bus/usb/001/002) */
5068
- usb_device_name?: string;
5069
5157
  }
5070
- declare class PrintJob extends AppBaseModel implements IPrintJob {
5071
- printer_name: string;
5072
- driver_printer_name: string;
5073
- printer_ip: string;
5074
- printer_uid: string;
5075
- printer_type: PrinterType;
5076
- protocol: PrinterProtocols;
5077
- connection_type: PrinterConnections;
5078
- data: PrintCommand;
5079
- status: PrintJobStatus;
5080
- retries: number;
5081
- commands: string;
5158
+ /**
5159
+ * Interface for combo component groups (e.g., "Main Course", "Side", "Drink")
5160
+ */
5161
+ interface IComboGroup extends IAppModelSequence {
5162
+ /** Group unique id */
5082
5163
  uid: string;
5083
- save_only: boolean;
5084
- print_times: number;
5085
- printed: number;
5086
- device_uid_to_print: string;
5087
- designated_table_section_uids: any[];
5088
- job_id: number;
5089
- print_sequence?: number;
5090
- constructor(printer: IPrinter, printData: IPrintCommand, saveOnly?: boolean, printTimes?: number);
5164
+ /** Group name (e.g., "Choose your main", "Pick a side") */
5165
+ name: string;
5166
+ /** Translations of the name */
5167
+ name_translations: Record<string, string>;
5168
+ /** Minimum selections required from this group */
5169
+ min_order: number;
5170
+ /** Maximum selections allowed from this group */
5171
+ max_order: number;
5172
+ /** Available items in this group */
5173
+ combo_items: IComboGroupItem[];
5174
+ /** Meta data */
5091
5175
  meta: Record<string, unknown>;
5092
5176
  }
5093
- declare enum PrinterStatus {
5094
- Online = "online",
5095
- Offline = "offline",
5096
- }
5097
- interface IPrinter extends IAppBaseModel {
5098
- /** Printer terminal ID */
5099
- device_uid: string;
5100
- /** Linked terminal device UID list */
5101
- terminal_device_uids?: string[];
5102
- /** Printer type */
5103
- type: PrinterType;
5104
- /** If true, this printer is not the default for its type */
5105
- is_not_default?: boolean;
5106
- /** Actual printer name using printer driver*/
5107
- driver_printer_name: string;
5108
- /** Backup printer ID */
5109
- fallback_printer_uid: number;
5110
- /** Printer protocol */
5111
- protocol: PrinterProtocols;
5112
- /** Printer connection type */
5113
- connection_type: PrinterConnections;
5114
- /** Print template UID */
5115
- print_template_uid?: string;
5116
- /** Printer IP address */
5117
- ip_address?: string;
5118
- /** Printer status */
5119
- status: PrinterStatus;
5120
- /** if it is consolidated print or itemized print when it is kitchen printer */
5121
- kitchen_itemized_print: boolean;
5122
- /** Number of times to print */
5123
- print_times: number;
5124
- /** Number of retries */
5125
- retries: number;
5126
- /** Print sequence order (lower number prints first) */
5127
- print_sequence?: number;
5128
- /** USB serial number for persistent device identification */
5129
- usb_serial_number?: string;
5130
- /** Use deviceName instead of serialNumber for USB device identification */
5131
- use_device_name?: boolean;
5132
- /** USB device name path (e.g., /dev/bus/usb/001/002) */
5133
- usb_device_name?: string;
5134
- disable_printing_sequence?: boolean;
5135
- /** Disable cancel order print for this printer */
5136
- disable_cancel_print?: boolean;
5137
- }
5138
- declare class Printer extends AppBaseModel implements IPrinter {
5139
- device_uid: string;
5140
- terminal_device_uids: string[];
5141
- type: PrinterType;
5142
- is_not_default?: boolean;
5143
- driver_printer_name: string;
5144
- fallback_printer_uid: number;
5145
- protocol: PrinterProtocols;
5146
- connection_type: PrinterConnections;
5147
- print_template_uid: string;
5148
- uid: string;
5149
- ip_address: string;
5150
- status: PrinterStatus;
5151
- kitchen_itemized_print: boolean;
5152
- print_times: number;
5153
- retries: number;
5154
- use_device_name: boolean;
5155
- usb_device_name: string;
5156
- disable_cancel_print: boolean;
5177
+ declare class ComboGroupItem implements IComboGroupItem {
5178
+ item_uid: string;
5179
+ combo_item: any;
5180
+ price: number;
5181
+ sequence: number;
5182
+ meta: Record<string, unknown>;
5157
5183
  constructor();
5158
5184
  }
5159
- interface ITemplateData {
5160
- config: IConfig;
5161
- invoice: IInvoice;
5162
- printer_name: string;
5163
- printed_at: Date;
5164
- normalized_printed_at: string;
5165
- report_data: IReportData;
5166
- meta: Record<string, any>;
5167
- is_cancel?: boolean;
5168
- }
5169
- declare class TemplateData implements ITemplateData {
5170
- config: IConfig;
5171
- invoice: IInvoice;
5172
- report_data: IReportData;
5173
- section_item: ISectionItem;
5174
- printer_name: string;
5175
- printed_at: Date;
5176
- normalized_printed_at: string;
5177
- meta: Record<string, any>;
5178
- is_cancel: boolean;
5185
+ declare class ComboGroup implements IComboGroup {
5186
+ uid: string;
5187
+ name: string;
5188
+ name_translations: Record<string, string>;
5189
+ min_order: number;
5190
+ max_order: number;
5191
+ combo_items: IComboGroupItem[];
5192
+ sequence: number;
5193
+ meta: Record<string, unknown>;
5179
5194
  constructor();
5180
5195
  }
5181
- type IRenderPrintTemplateOptions = {
5182
- printer_name: string;
5183
- kitchen_itemized_print: boolean;
5184
- is_cancel?: boolean;
5185
- };
5186
- declare class RenderPrintTemplateOptions implements IRenderPrintTemplateOptions {
5187
- printer_name: string;
5188
- kitchen_itemized_print: boolean;
5189
- is_cancel: boolean;
5190
- }
5191
5196
  //#endregion
5192
5197
  //#region src/types/note.type.d.ts
5193
5198
  type INoteGroupEntity = IAppBaseModel;
@@ -5272,12 +5277,20 @@ declare class Storage<T = Record<string, unknown> | unknown[]> extends AppBaseMo
5272
5277
  }
5273
5278
  //#endregion
5274
5279
  //#region src/types/menu.type.d.ts
5280
+ /** Predefined config keys of a menu */
5281
+ type MenuConfig = {
5282
+ /** weekly listing schedule; the POS main device sets is_delisted at each window start / end; absent or empty = manual only */
5283
+ schedules?: Schedule[];
5284
+ };
5275
5285
  interface IMenu extends IAppBaseModel {
5276
5286
  icon: string;
5277
5287
  meta: Record<string, any>;
5278
5288
  category_uids: string[];
5279
5289
  online_order_expiry_in_minutes: number;
5280
5290
  online_order_session_expiry_in_minutes: number;
5291
+ config?: MenuConfig & Record<string, any>;
5292
+ /** Indicates whether the menu is delisted; the POS main device sets it at each config.schedules window start / end */
5293
+ is_delisted: boolean;
5281
5294
  }
5282
5295
  declare class Menu extends AppBaseModel implements IMenu {
5283
5296
  uid: string;
@@ -5286,6 +5299,7 @@ declare class Menu extends AppBaseModel implements IMenu {
5286
5299
  category_uids: any[];
5287
5300
  online_order_expiry_in_minutes: number;
5288
5301
  online_order_session_expiry_in_minutes: number;
5302
+ is_delisted: boolean;
5289
5303
  }
5290
5304
  //#endregion
5291
5305
  //#region src/types/stock.type.d.ts
@@ -7089,5 +7103,5 @@ declare function validateSTTemplate(jsonStr: string): ValidationResult;
7089
7103
  /** Pure deep-clone of an item with fresh uids, cleared plu, and regenerated modifier ids. Shared by ItemService and admin-portal. */
7090
7104
  declare function cloneItemData(item: IItem): IItem;
7091
7105
  //#endregion
7092
- export { Address, AlipayMethod, AppBaseModel, AppConfig, AppCoreModel, AppCoreService, AppExtraModel, AppLocalService, AppMiscService, AppRemoteService, AppReport, AppReportService, Applying, Appointment, AppointmentService, AppointmentServiceLine, AppointmentSource, AppointmentStatus, AssetItem, AssetTags, AssetType, Between, Cache, CalcFlow, CalcType, CancelInvoiceOptions, CardPaymentCode, CashDrawerConfig, Category, CategoryButtonShape, CategorySalesSummary, CategoryService, CategoryType, Charge, ChargeConfig, CheckInvoiceOptions, Codepages, ComboGroup, ComboGroupItem, Condition, Config, ConfigService, CoreCategory, CoreItem, Coupon, CouponItemized, CouponUsage, CreateInvoiceOptions, CrmConfig, CurrencyConfig, CustomResponse, Customer, CustomerDisplaySystemConfig, DatabaseStats, DayOfWeek, DeployChannel, Device, DeviceEtc, DeviceType, DiagnosticsService, DirectPayInvoiceOptions, DirectiveNames, DiscountType, DrawerSummary, ElectronSocket, Employee, EmployeeRole, EmployeeRoleService, EmployeeService, ErrorMsgs, EscPosCompatibility, EscPosPrinter, EventPrintConfig, FileUploadRequest, GTOConfig, GeneralConfig, GetManyResult, Holiday, IAddress, IAppBase, IAppBaseModel, IAppConfig, IAppCore, IAppCoreModel, IAppCoreService, IAppExtra, IAppExtraModel, IAppLocalService, IAppMiscService, IAppModelSequence, IAppRemoteService, IAppReport, IAppReportService, IApplying, IAppointment, IAppointmentService, IAppointmentServiceLine, ICache, ICashDrawerConfig, ICategory, ICategoryService, IChangePaymentMethodOption, ICharge, IChargeConfig, IComboGroup, IComboGroupItem, IConfig, IConfigService, ICoreCategory, ICoreItem, ICoupon, ICouponItemized, ICouponUsage, ICredit, ICrmConfig, ICurrencyConfig, ICustomer, ICustomerDisplaySystemConfig, IDevice, IDiscount, IDiscountSummaryEntry, IDrawerSummary, IEmployee, IEmployeeRole, IEmployeeRoleService, IEmployeeService, IEscPosPrinter, IEtc, IEventPrintConfig, IExportRow, IFileUploadRequest, IFileUploadResponse, IFontSize, IGeneralConfig, IGtoConfig, IInventoryConfig, IInvoice, IInvoiceActivity, IInvoiceBaseService, IInvoiceCharge, IInvoiceCoreLine, IInvoiceDiscount, IInvoiceLine, IInvoiceOperationService, IInvoiceService, IItem, IItemService, IKdsConfig, IKioskSystemConfig, IKitchenConfig, ILabelConfig, ILineOperationService, ILoyaltyProgram, ILoyaltyProgramSummary, IMarketing, IMenu, IMenuService, IMerchant, IMerchantAsset, INode, INodePrinter, INonCashTillSummary, INote, INoteEntity, INoteGroup, INoteGroupEntity, INoteGroupService, INoteService, IOnlineOrderConfig, IOrderConfig, IOrderDisplay, IOrderDisplayService, IOrderDisplaySystemConfig, IOrderTypeSummary, IPaxConfig, IPayment, IPaymentConfig, IPaymentMethod, IPaymentMethodHistory, IPaymentMethodService, IPaymentService, IPaymentSummary, IPoint, IPrice, IPrintBarcode, IPrintCommand, IPrintCommandLine, IPrintImage, IPrintJob, IPrintJobService, IPrintQrcode, IPrintTable, IPrintTableRowItem, IPrintTemplate, IPrintTemplateCore, IPrintTemplateService, IPrintText, IPrinter, IPrinterService, IProductBase, IProductConfig, IProductService, IPushData, IReceiptConfig, IRenderPrintTemplateOptions, IReport, IReportCategory, IReportConfig, IReportData, IReportRequest, IRoundingConfig, ISalesSummary, ISalesperson, ISection, ISectionItem, ISectionItemService, ISectionService, IServiceOptions, IShift, IShiftService, IStandardPaymentMethod, IStockLog, IStockLogService, IStorage, ISubcategory, ISubcategoryService, ISystemConfig, ITaxConfig, ITemplateData, ITill, ITillConfig, ITillEntry, ITillService, IUser, IUserConfig, IVisibility, In, Include, InventoryConfig, Invoice, InvoiceAction, InvoiceActivity, InvoiceBaseService, InvoiceCharge, InvoiceCoreLine, InvoiceDeviceType, InvoiceDiscount, InvoiceLine, InvoiceOperationService, InvoiceService, InvoiceStatus, InvoiceType, Item, ItemSalesSummary, ItemService, KdsConfig, KioskSystemConfig, KitchenConfig, LabelConfig, LineOperationService, LineOptions, LoyaltyProgram, LoyaltyProgramSummary, MarketingConfig, Menu, MenuService, Merchant, MessageType, ModelPrefix, ModelType, ModifierSalesSummary, Node, NodePrinter, NonCashTillSummary, Not, Note, NoteEntity, NoteGroup, NoteGroupEntity, OnlineOrderConfig, OpenHours, OrderConfig, OrderDisplay, OrderDisplayService, OrderDisplayStatus, OrderDisplaySystemConfig, OrderFlow, PERMISSION_LABELS, PageNames, PaxConfig, PayInvoiceOptions, Payment, PaymentConfig, PaymentMethod, PaymentMethodHistory, PaymentMethodService, PaymentService, PaymentStatus, PaymentSummary, PaynowMethod, Price, PriceType, PrintAlign, PrintBarcode, PrintCommand, PrintImage, PrintJob, PrintJobService, PrintJobStatus, PrintQrcode, PrintSize, PrintStyle, PrintTemplate, PrintTemplateCore, PrintTemplateService, PrintType, Printer, PrinterConnections, PrinterProtocols, PrinterService, PrinterStatus, PrinterType, ProductBase, ProductConfig, ProductPartialAssets, ProductPartialConfig, ProductService, ProductType, PushData, Raw, Receipt, RenderPrintTemplateOptions, Report, ReportCategory, ReportConfig, ReportData, ReportType, RoundingConfig, RouteNames, SYSTEM_ROLES, SalesSummary, Schedule, Section, SectionItem, SectionItemService, SectionItemStatus, SectionService, ServiceFactory, ServiceMode, ServiceOptions, Shift, ShiftService, ShiftStatus, SpecialDay, StandardPaymentMethod, StockChange, StockLog, StockLogEntityType, StockLogRefType, StockLogService, StockLogType, Storage, StorageService, Subcategory, SwitchInvoiceOptions, System, SystemConfig, SystemError, TCategorySalesSummary, TDynamicOrderQR, TItemCoreSalesSummary, TItemSalesSummary, TModifierSalesSummary, TStockChange, TStockChangeItem, TStorageService, TableStats, TaxConfig, TaxMethod, TemplateData, Till, TillConfig, TillService, TillType, UomType, UpdateGeneralConfigOptions, UpdateInvoiceOptions, User, UserConfig, type ValidationError, type ValidationResult, Visibility, VoidInvoiceOptions, WechatPayMethod, WeeklyHours, cloneItemData, createCSVExport, createCSVExportWithHash, dbSchemas, filterByParams, functionValues, getCategoryButtonShape, humanizedData, importFromCSV, itemEditorValues, mergeImportedItem, normalizedDate, pageValues, routeValues, transformer, validateSTTemplate };
7106
+ export { Address, AlipayMethod, AppBaseModel, AppConfig, AppCoreModel, AppCoreService, AppExtraModel, AppLocalService, AppMiscService, AppRemoteService, AppReport, AppReportService, Applying, Appointment, AppointmentService, AppointmentServiceLine, AppointmentSource, AppointmentStatus, AssetItem, AssetTags, AssetType, Between, Cache, CalcFlow, CalcType, CancelInvoiceOptions, CardPaymentCode, CashDrawerConfig, Category, CategoryButtonShape, CategorySalesSummary, CategoryService, CategoryType, Charge, ChargeConfig, CheckInvoiceOptions, Codepages, ComboGroup, ComboGroupItem, Condition, Config, ConfigService, CoreCategory, CoreItem, Coupon, CouponItemized, CouponUsage, CreateInvoiceOptions, CrmConfig, CurrencyConfig, CustomResponse, Customer, CustomerDisplaySystemConfig, DatabaseStats, DayOfWeek, DeployChannel, Device, DeviceEtc, DeviceType, DiagnosticsService, DirectPayInvoiceOptions, DirectiveNames, DiscountType, DrawerSummary, ElectronSocket, Employee, EmployeeRole, EmployeeRoleService, EmployeeService, ErrorMsgs, EscPosCompatibility, EscPosPrinter, EventPrintConfig, FileUploadRequest, GTOConfig, GeneralConfig, GetManyResult, Holiday, IAddress, IAppBase, IAppBaseModel, IAppConfig, IAppCore, IAppCoreModel, IAppCoreService, IAppExtra, IAppExtraModel, IAppLocalService, IAppMiscService, IAppModelSequence, IAppRemoteService, IAppReport, IAppReportService, IApplying, IAppointment, IAppointmentService, IAppointmentServiceLine, ICache, ICashDrawerConfig, ICategory, ICategoryService, IChangePaymentMethodOption, ICharge, IChargeConfig, IComboGroup, IComboGroupItem, IConfig, IConfigService, ICoreCategory, ICoreItem, ICoupon, ICouponItemized, ICouponUsage, ICredit, ICrmConfig, ICurrencyConfig, ICustomer, ICustomerDisplaySystemConfig, IDevice, IDiscount, IDiscountSummaryEntry, IDrawerSummary, IEmployee, IEmployeeRole, IEmployeeRoleService, IEmployeeService, IEscPosPrinter, IEtc, IEventPrintConfig, IExportRow, IFileUploadRequest, IFileUploadResponse, IFontSize, IGeneralConfig, IGtoConfig, IInventoryConfig, IInvoice, IInvoiceActivity, IInvoiceBaseService, IInvoiceCharge, IInvoiceCoreLine, IInvoiceDiscount, IInvoiceLine, IInvoiceOperationService, IInvoiceService, IItem, IItemService, IKdsConfig, IKioskSystemConfig, IKitchenConfig, ILabelConfig, ILineOperationService, ILoyaltyProgram, ILoyaltyProgramSummary, IMarketing, IMenu, IMenuService, IMerchant, IMerchantAsset, INode, INodePrinter, INonCashTillSummary, INote, INoteEntity, INoteGroup, INoteGroupEntity, INoteGroupService, INoteService, IOnlineOrderConfig, IOrderConfig, IOrderDisplay, IOrderDisplayService, IOrderDisplaySystemConfig, IOrderTypeSummary, IPaxConfig, IPayment, IPaymentConfig, IPaymentMethod, IPaymentMethodHistory, IPaymentMethodService, IPaymentService, IPaymentSummary, IPoint, IPrice, IPrintBarcode, IPrintCommand, IPrintCommandLine, IPrintImage, IPrintJob, IPrintJobService, IPrintQrcode, IPrintTable, IPrintTableRowItem, IPrintTemplate, IPrintTemplateCore, IPrintTemplateService, IPrintText, IPrinter, IPrinterService, IProductBase, IProductConfig, IProductService, IPushData, IReceiptConfig, IRenderPrintTemplateOptions, IReport, IReportCategory, IReportConfig, IReportData, IReportRequest, IRoundingConfig, ISalesSummary, ISalesperson, ISection, ISectionItem, ISectionItemService, ISectionService, IServiceOptions, IShift, IShiftService, IStandardPaymentMethod, IStockLog, IStockLogService, IStorage, ISubcategory, ISubcategoryService, ISystemConfig, ITaxConfig, ITemplateData, ITill, ITillConfig, ITillEntry, ITillService, IUser, IUserConfig, IVisibility, In, Include, InventoryConfig, Invoice, InvoiceAction, InvoiceActivity, InvoiceBaseService, InvoiceCharge, InvoiceCoreLine, InvoiceDeviceType, InvoiceDiscount, InvoiceLine, InvoiceOperationService, InvoiceService, InvoiceStatus, InvoiceType, Item, ItemSalesSummary, ItemService, KdsConfig, KioskSystemConfig, KitchenConfig, LabelConfig, LineOperationService, LineOptions, LoyaltyProgram, LoyaltyProgramSummary, MarketingConfig, Menu, MenuConfig, MenuService, Merchant, MessageType, ModelPrefix, ModelType, ModifierSalesSummary, Node, NodePrinter, NonCashTillSummary, Not, Note, NoteEntity, NoteGroup, NoteGroupEntity, OnlineOrderConfig, OpenHours, OrderConfig, OrderDisplay, OrderDisplayService, OrderDisplayStatus, OrderDisplaySystemConfig, OrderFlow, PERMISSION_LABELS, PageNames, PaxConfig, PayInvoiceOptions, Payment, PaymentConfig, PaymentMethod, PaymentMethodHistory, PaymentMethodService, PaymentService, PaymentStatus, PaymentSummary, PaynowMethod, Price, PriceType, PrintAlign, PrintBarcode, PrintCommand, PrintImage, PrintJob, PrintJobService, PrintJobStatus, PrintQrcode, PrintSize, PrintStyle, PrintTemplate, PrintTemplateCore, PrintTemplateService, PrintType, Printer, PrinterConnections, PrinterProtocols, PrinterService, PrinterStatus, PrinterType, ProductBase, ProductConfig, ProductPartialAssets, ProductPartialConfig, ProductService, ProductType, PushData, Raw, Receipt, RenderPrintTemplateOptions, Report, ReportCategory, ReportConfig, ReportData, ReportType, RoundingConfig, RouteNames, SYSTEM_ROLES, SalesSummary, Schedule, Section, SectionItem, SectionItemService, SectionItemStatus, SectionService, ServiceFactory, ServiceMode, ServiceOptions, Shift, ShiftService, ShiftStatus, SpecialDay, StandardPaymentMethod, StockChange, StockLog, StockLogEntityType, StockLogRefType, StockLogService, StockLogType, Storage, StorageService, Subcategory, SwitchInvoiceOptions, System, SystemConfig, SystemError, TCategorySalesSummary, TDynamicOrderQR, TItemCoreSalesSummary, TItemSalesSummary, TModifierSalesSummary, TStockChange, TStockChangeItem, TStorageService, TableStats, TaxConfig, TaxMethod, TemplateData, Till, TillConfig, TillService, TillType, UomType, UpdateGeneralConfigOptions, UpdateInvoiceOptions, User, UserConfig, type ValidationError, type ValidationResult, Visibility, VoidInvoiceOptions, WechatPayMethod, WeeklyHours, cloneItemData, createCSVExport, createCSVExportWithHash, dbSchemas, filterByParams, functionValues, getCategoryButtonShape, humanizedData, importFromCSV, itemEditorValues, mergeImportedItem, normalizedDate, pageValues, routeValues, transformer, validateSTTemplate };
7093
7107
  //# sourceMappingURL=index.d.ts.map