meemup-library 1.4.10 → 1.4.12

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.
@@ -1,9 +1,7 @@
1
- import IPointOfSaleLocalSetting from "../interfaces/pos/IPointOfSaleLocalSetting";
2
- import IPointOfSaleSetting from "../interfaces/pos/IPointOfSaleSetting";
3
1
  import ICustomerFacingDisplayPacket from "../interfaces/cfds/ICustomerFacingDisplayPacket";
4
2
  import IPointOfSaleOrder from "../interfaces/pos/IPointOfSaleOrder";
5
3
  declare const _default: {
6
- code(order: IPointOfSaleOrder, setting: IPointOfSaleSetting, localSetting: IPointOfSaleLocalSetting): ICustomerFacingDisplayPacket;
4
+ code(order: IPointOfSaleOrder, udpClientName: string, currencySymbol: string, taxTitle: string): ICustomerFacingDisplayPacket;
7
5
  decode(data: string): ICustomerFacingDisplayPacket;
8
6
  };
9
7
  export default _default;
@@ -1,7 +1,7 @@
1
1
  import { initCustomerFacingDisplayPacket } from "../interfaces/cfds/ICustomerFacingDisplayPacket";
2
2
  export default new class CustomerFacingDisplayPacketController {
3
- code(order, setting, localSetting) {
4
- let packet = Object.assign(Object.assign({}, initCustomerFacingDisplayPacket), { r: localSetting.udpClientName, c: setting.currencySymbol, d: [] });
3
+ code(order, udpClientName, currencySymbol, taxTitle) {
4
+ let packet = Object.assign(Object.assign({}, initCustomerFacingDisplayPacket), { r: udpClientName, c: currencySymbol, d: [] });
5
5
  order.products.forEach(product => {
6
6
  let extPro = [];
7
7
  product.extras.forEach(ext => {
@@ -25,7 +25,7 @@ export default new class CustomerFacingDisplayPacketController {
25
25
  packet.ot = order.orderType;
26
26
  packet.dc = order.deliveryCost;
27
27
  packet.ds = order.displaySubTotal;
28
- packet.tt = setting.taxTitle;
28
+ packet.tt = taxTitle;
29
29
  packet.dt = order.displayTax;
30
30
  packet.pt = order.paymentType;
31
31
  packet.ps = order.paymentState;
@@ -0,0 +1,8 @@
1
+ declare enum StarMicronicInterfaceType {
2
+ Unknown = "Unknown",
3
+ Lan = "Lan",
4
+ Bluetooth = "Bluetooth",
5
+ BluetoothLE = "BluetoothLE",
6
+ Usb = "Usb"
7
+ }
8
+ export default StarMicronicInterfaceType;
@@ -0,0 +1,9 @@
1
+ var StarMicronicInterfaceType;
2
+ (function (StarMicronicInterfaceType) {
3
+ StarMicronicInterfaceType["Unknown"] = "Unknown";
4
+ StarMicronicInterfaceType["Lan"] = "Lan";
5
+ StarMicronicInterfaceType["Bluetooth"] = "Bluetooth";
6
+ StarMicronicInterfaceType["BluetoothLE"] = "BluetoothLE";
7
+ StarMicronicInterfaceType["Usb"] = "Usb";
8
+ })(StarMicronicInterfaceType || (StarMicronicInterfaceType = {}));
9
+ export default StarMicronicInterfaceType;
@@ -6,6 +6,7 @@ import EnumPrintCommand from "../../enums/EnumPrintCommand";
6
6
  import EnumProductLongPress from "../../enums/EnumProductLongPress";
7
7
  import ITextValue from "../ITextValue";
8
8
  import IPointOfSaleElavonTerminalDevice from "./IPointOfSaleElavonTerminalDevice";
9
+ import IPointOfSalePrinterConnections from "./IPointOfSalePrinterConnections";
9
10
  import IPointOfSaleSettingCashDrawerTrigger from "./IPointOfSaleSettingCashDrawerTrigger";
10
11
  import IPointOfSaleSettingReceiptCopiesOnOrderPayment from "./IPointOfSaleSettingReceiptCopiesOnOrderPayment";
11
12
  import IPointOfSaleSettingReceiptCopiesOnOrderSave from "./IPointOfSaleSettingReceiptCopiesOnOrderSave";
@@ -59,6 +60,7 @@ interface IPointOfSaleLocalSetting {
59
60
  templateReceipt: IPointOfSaleSettingTemplateReceipt;
60
61
  receiptCopiesOnOrderPayment: IPointOfSaleSettingReceiptCopiesOnOrderPayment;
61
62
  receiptCopiesOnOrderSave: IPointOfSaleSettingReceiptCopiesOnOrderSave;
63
+ printerConnections: IPointOfSalePrinterConnections;
62
64
  productLongPress: EnumProductLongPress;
63
65
  activeLandingPage: boolean;
64
66
  elavonTerminals: IPointOfSaleElavonTerminalDevice[];
@@ -58,6 +58,10 @@ export const initPointOfSaleLocalSetting = {
58
58
  templateReceipt: initPointOfSaleSettingTemplateReceipt,
59
59
  receiptCopiesOnOrderPayment: initPointOfSaleSettingReceiptCopiesOnOrderPayment,
60
60
  receiptCopiesOnOrderSave: initPointOfSaleSettingReceiptCopiesOnOrderSave,
61
+ printerConnections: {
62
+ customer: null,
63
+ kitchen: null
64
+ },
61
65
  productLongPress: EnumProductLongPress.TOGGLE_SNOOZ,
62
66
  activeLandingPage: false,
63
67
  elavonTerminals: [],
@@ -0,0 +1,6 @@
1
+ import IPointOfSaleStarMicronicConnection from "./IPointOfSaleStarMicronicConnection";
2
+ interface IPointOfSalePrinterConnections {
3
+ customer: IPointOfSaleStarMicronicConnection | null;
4
+ kitchen: IPointOfSaleStarMicronicConnection | null;
5
+ }
6
+ export default IPointOfSalePrinterConnections;
@@ -0,0 +1,8 @@
1
+ import IPointOfSaleStarMicronicConnectionSetting from "./IPointOfSaleStarMicronicConnectionSetting";
2
+ interface IPointOfSaleStarMicronicConnection {
3
+ macAddress: string;
4
+ bluetoothAddress: string;
5
+ usbSerialNumber: string;
6
+ connection: IPointOfSaleStarMicronicConnectionSetting;
7
+ }
8
+ export default IPointOfSaleStarMicronicConnection;
@@ -0,0 +1,7 @@
1
+ import StarMicronicInterfaceType from "../../enums/StarMicronicInterfaceType";
2
+ interface IPointOfSaleStarMicronicConnectionSetting {
3
+ interfaceType: StarMicronicInterfaceType;
4
+ identifier: string;
5
+ autoSwitchInterface: boolean;
6
+ }
7
+ export default IPointOfSaleStarMicronicConnectionSetting;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "meemup-library",
3
- "version": "1.4.10",
3
+ "version": "1.4.12",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -11,7 +11,7 @@
11
11
  "remove:one": "rimraf dist",
12
12
  "remove:two": "rimraf ./src/dist",
13
13
  "test": "echo \"Error: no test specified\" && exit 1",
14
- "commit": "git add . && git commit -m \"version.1.4.10 \" && git push origin "
14
+ "commit": "git add . && git commit -m \"version.1.4.12 \" && git push origin "
15
15
  },
16
16
  "files": [
17
17
  "/dist"
@@ -26,4 +26,4 @@
26
26
  "dependencies": {
27
27
  "moment": "^2.30.1"
28
28
  }
29
- }
29
+ }