@managesome/eposmatic-toolkit 0.2.786 → 0.2.787
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.
|
@@ -69,6 +69,15 @@ function getBrandType(value) {
|
|
|
69
69
|
}
|
|
70
70
|
return null;
|
|
71
71
|
}
|
|
72
|
+
function getCmdLanguage(value) {
|
|
73
|
+
if (value === null)
|
|
74
|
+
return null;
|
|
75
|
+
const validCommandLanguages = new Set(constants_1.ALL_PRINTER_COMMAND_LANGUAGES);
|
|
76
|
+
if (typeof value === 'string' && validCommandLanguages.has(value)) {
|
|
77
|
+
return value;
|
|
78
|
+
}
|
|
79
|
+
return null;
|
|
80
|
+
}
|
|
72
81
|
function getPrintingPreference(value) {
|
|
73
82
|
const validPreferences = new Set(constants_1.ALL_PRINTING_PREFERENCES);
|
|
74
83
|
if (typeof value === 'string' && validPreferences.has(value)) {
|
|
@@ -230,6 +239,7 @@ function syncPrinterSettingsFields(printerSettings) {
|
|
|
230
239
|
target: getStringValue(settings.target, ''),
|
|
231
240
|
mac_address: getNullableStringValue(settings.mac_address, null),
|
|
232
241
|
brand_type: getBrandType(settings.brand_type),
|
|
242
|
+
cmd_language: getCmdLanguage(settings.cmd_language),
|
|
233
243
|
interface_type: getInterfaceType(settings.interface_type),
|
|
234
244
|
name: getStringValue(settings.name, ''),
|
|
235
245
|
pos_id: getNullableStringValue(settings.pos_id, null),
|
|
@@ -73,8 +73,8 @@ export declare const PrinterSettingsSchema: Schema<any, import("mongoose").Model
|
|
|
73
73
|
} | null | undefined;
|
|
74
74
|
mac_address?: string | null | undefined;
|
|
75
75
|
brand_type?: import("../../constants").PRINTER_BRAND_TYPE_ENUM | null | undefined;
|
|
76
|
-
backup_printer_target?: string | null | undefined;
|
|
77
76
|
cmd_language?: import("../../constants").PRINTER_COMMAND_LANGUAGE | null | undefined;
|
|
77
|
+
backup_printer_target?: string | null | undefined;
|
|
78
78
|
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
79
79
|
createdAt: NativeDate;
|
|
80
80
|
updatedAt: NativeDate;
|
|
@@ -144,8 +144,8 @@ export declare const PrinterSettingsSchema: Schema<any, import("mongoose").Model
|
|
|
144
144
|
} | null | undefined;
|
|
145
145
|
mac_address?: string | null | undefined;
|
|
146
146
|
brand_type?: import("../../constants").PRINTER_BRAND_TYPE_ENUM | null | undefined;
|
|
147
|
-
backup_printer_target?: string | null | undefined;
|
|
148
147
|
cmd_language?: import("../../constants").PRINTER_COMMAND_LANGUAGE | null | undefined;
|
|
148
|
+
backup_printer_target?: string | null | undefined;
|
|
149
149
|
}>> & import("mongoose").FlatRecord<{
|
|
150
150
|
createdAt: NativeDate;
|
|
151
151
|
updatedAt: NativeDate;
|
|
@@ -215,8 +215,8 @@ export declare const PrinterSettingsSchema: Schema<any, import("mongoose").Model
|
|
|
215
215
|
} | null | undefined;
|
|
216
216
|
mac_address?: string | null | undefined;
|
|
217
217
|
brand_type?: import("../../constants").PRINTER_BRAND_TYPE_ENUM | null | undefined;
|
|
218
|
-
backup_printer_target?: string | null | undefined;
|
|
219
218
|
cmd_language?: import("../../constants").PRINTER_COMMAND_LANGUAGE | null | undefined;
|
|
219
|
+
backup_printer_target?: string | null | undefined;
|
|
220
220
|
}> & Required<{
|
|
221
221
|
_id: import("mongoose").Types.ObjectId;
|
|
222
222
|
}> & {
|