@managesome/eposmatic-toolkit 0.2.358 → 0.2.360

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.
@@ -58,6 +58,15 @@ function getInterfaceType(value) {
58
58
  }
59
59
  return constants_1.PRINTER_INTERFACE_ENUM.LAN;
60
60
  }
61
+ function getBrandType(value) {
62
+ if (value === null)
63
+ return null;
64
+ const validBrandTypes = new Set(constants_1.ALL_PRINTER_BRAND_TYPES);
65
+ if (typeof value === 'string' && validBrandTypes.has(value)) {
66
+ return value;
67
+ }
68
+ return null;
69
+ }
61
70
  function getPrintingPreference(value) {
62
71
  const validPreferences = new Set(constants_1.ALL_PRINTING_PREFERENCES);
63
72
  if (typeof value === 'string' && validPreferences.has(value)) {
@@ -215,6 +224,7 @@ function syncPrinterSettingsFields(printerSettings) {
215
224
  tenant_id: getStringValue(settings.tenant_id, ''),
216
225
  target: getStringValue(settings.target, ''),
217
226
  mac_address: getNullableStringValue(settings.mac_address, null),
227
+ brand_type: getBrandType(settings.brand_type),
218
228
  interface_type: getInterfaceType(settings.interface_type),
219
229
  name: getStringValue(settings.name, ''),
220
230
  staff_id: getStringValue(settings.staff_id, ''),
@@ -65,6 +65,7 @@ export declare const PrinterSettingsSchema: Schema<any, import("mongoose").Model
65
65
  } | null | undefined;
66
66
  } | null | undefined;
67
67
  mac_address?: string | null | undefined;
68
+ brand_type?: import("../../constants").PRINTER_BRAND_TYPE_ENUM | null | undefined;
68
69
  backup_printer_target?: string | null | undefined;
69
70
  boolSettings?: {
70
71
  isActive: boolean;
@@ -134,6 +135,7 @@ export declare const PrinterSettingsSchema: Schema<any, import("mongoose").Model
134
135
  } | null | undefined;
135
136
  } | null | undefined;
136
137
  mac_address?: string | null | undefined;
138
+ brand_type?: import("../../constants").PRINTER_BRAND_TYPE_ENUM | null | undefined;
137
139
  backup_printer_target?: string | null | undefined;
138
140
  boolSettings?: {
139
141
  isActive: boolean;
@@ -203,6 +205,7 @@ export declare const PrinterSettingsSchema: Schema<any, import("mongoose").Model
203
205
  } | null | undefined;
204
206
  } | null | undefined;
205
207
  mac_address?: string | null | undefined;
208
+ brand_type?: import("../../constants").PRINTER_BRAND_TYPE_ENUM | null | undefined;
206
209
  backup_printer_target?: string | null | undefined;
207
210
  boolSettings?: {
208
211
  isActive: boolean;
@@ -23,6 +23,11 @@ exports.PrinterSettingsSchema = new mongoose_1.Schema({
23
23
  type: String,
24
24
  required: false,
25
25
  },
26
+ brand_type: {
27
+ type: String,
28
+ enum: [...constants_1.ALL_PRINTER_BRAND_TYPES, null],
29
+ required: false,
30
+ },
26
31
  interface_type: {
27
32
  type: String,
28
33
  enum: constants_1.ALL_PRINTER_INTERFACES,
@@ -1,4 +1,4 @@
1
- import { KITCHEN_DOCKET_FONT_TYPE_ENUM, ORDER_TYPE_ENUM, PLATFORMS_ENUM, PRINTER_INTERFACE_ENUM, PRINTING_PREFERENCE_ENUM, RECEIPT_TYPE_ENUM } from '../../constants';
1
+ import { KITCHEN_DOCKET_FONT_TYPE_ENUM, ORDER_TYPE_ENUM, PLATFORMS_ENUM, PRINTER_BRAND_TYPE_ENUM, PRINTER_INTERFACE_ENUM, PRINTING_PREFERENCE_ENUM, RECEIPT_TYPE_ENUM } from '../../constants';
2
2
  export interface IIncludedItemsMap {
3
3
  [key: string]: {
4
4
  sortId: number;
@@ -53,6 +53,7 @@ export interface IPrinterSettings {
53
53
  tenant_id: string;
54
54
  target: string;
55
55
  mac_address?: string | null;
56
+ brand_type?: PRINTER_BRAND_TYPE_ENUM | null;
56
57
  interface_type: PRINTER_INTERFACE_ENUM;
57
58
  name: string;
58
59
  staff_id: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@managesome/eposmatic-toolkit",
3
- "version": "0.2.358",
3
+ "version": "0.2.360",
4
4
  "description": "A Toolkit Library for Eposmatic",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",