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