meemup-library 1.3.45 → 1.3.47

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.
@@ -0,0 +1,6 @@
1
+ import EnumCoreRequest from "../enums/EnumCoreRequest";
2
+ import ISignalAction from "../interfaces/ISignalAction";
3
+ export default class PosSoftwareController {
4
+ createAction(action: EnumCoreRequest, referenceId: string, data: any): ISignalAction;
5
+ decodeAction(strAction: string): ISignalAction;
6
+ }
@@ -0,0 +1,32 @@
1
+ import EnumCoreRequest from "../enums/EnumCoreRequest";
2
+ export default class PosSoftwareController {
3
+ // constructor(private account: IAccount) {
4
+ // }
5
+ createAction(action, referenceId, data) {
6
+ return {
7
+ referenceId: referenceId,
8
+ type: action,
9
+ data: data
10
+ };
11
+ }
12
+ decodeAction(strAction) {
13
+ try {
14
+ const action = JSON.parse(strAction);
15
+ if (action && !isNaN(action.type) && action.referenceId)
16
+ return action;
17
+ }
18
+ catch (e) {
19
+ return {
20
+ type: EnumCoreRequest.NONE,
21
+ referenceId: "",
22
+ data: e
23
+ };
24
+ }
25
+ return {
26
+ type: EnumCoreRequest.NONE,
27
+ referenceId: "",
28
+ data: strAction
29
+ };
30
+ }
31
+ }
32
+ ;
@@ -0,0 +1,46 @@
1
+ declare enum EnumCoreRequest {
2
+ NONE = 0,
3
+ SENT_TO_CORE_ACCOUNT = 1,
4
+ SENT_TO_CORE_SETTING = 2,
5
+ SENT_TO_CORE_LOCAL_SETTING = 3,
6
+ SENT_TO_CORE_LOCAL_ORDERS = 4,
7
+ SENT_TO_CORE_TODAY_ORDER_COUNT = 5,
8
+ SENT_TO_CORE_EXTRAS = 6,
9
+ SENT_TO_CORE_CATEGORIES = 7,
10
+ SENT_TO_CORE_PRODUCTS = 8,
11
+ SENT_TO_CORE_ZONES = 9,
12
+ SENT_TO_CORE_GENERAL_INFORMATION = 10,
13
+ SENT_TO_CORE_PRINT_TEMPLATES = 11,
14
+ SENT_TO_CORE_TERMINALS = 12,
15
+ SENT_TO_CORE_GENERAL_ITEMS = 13,
16
+ SENT_TO_CORE_STAR_MICRONICS_PRINTERS = 14,
17
+ SENT_TO_CORE_DRIVER_NAMES = 15,
18
+ SENT_TO_CORE_ORDER_STATES = 16,
19
+ SENT_TO_CORE_CUSTOMERS = 17,
20
+ SENT_TO_CORE_COMPANY_ACCESS_LEVEL = 18,
21
+ SENT_TO_CORE_ROLE_LIST = 19,
22
+ SENT_TO_CORE_DISCOUNT_LIST = 20,
23
+ SENT_TO_CORE_RESTAURANT_LIST = 21,
24
+ SENT_TO_CORE_CASH_DRAWERS = 22,
25
+ SENT_TO_CORE_SOFTWARE_STATE_CURRENT_SCREEN = 23,
26
+ SENT_TO_CORE_SOFTWARE_STATE_MEMBER_LIST = 24,
27
+ SENT_TO_CORE_SOFTWARE_STATE_ACTIVED_MEMBER = 25,
28
+ SENT_TO_CORE_SOFTWARE_STATE_PRINT_PARTS = 26,
29
+ SENT_TO_CORE_SOFTWARE_STATE_TASK_IN_PROGRESS = 27,
30
+ SENT_TO_CORE_SOFTWARE_STATE_PRINTER_LIST = 28,
31
+ SENT_TO_CORE_SOFTWARE_STATE_PRINT_LOCK = 29,
32
+ SENT_TO_CORE_SOFTWARE_STATE_CURRENT_ORDER = 30,
33
+ SENT_TO_CORE_SOFTWARE_STATE_ALL_ELAVON_PACKET = 31,
34
+ SENT_TO_CORE_SOFTWARE_STATE_IS_CONNECTED = 32,
35
+ SENT_TO_CORE_SOFTWARE_STATE_LOCAL_ORDER_TO_SYNC = 33,
36
+ SENT_TO_CORE_SOFTWARE_STATE_REDUX_STATUS = 34,
37
+ SENT_TO_CORE_SOFTWARE_STATE_LOGS = 35,
38
+ RUN_ACTION_LOG_OUT = 36,
39
+ RUN_ACTION_RENEW_TOKEN = 37,
40
+ RUN_ACTION_SYNC_ONLINE_ORDERS = 38,
41
+ RUN_ACTION_CLEAR_LOGS = 39,
42
+ RUN_ACTION_FETCH_SHOP_ALL_DATA = 40,
43
+ RUN_ACTION_START_SYNC_LOCAL_ORDERS = 41,
44
+ RUN_ACTION_PRINT_ORDER = 42
45
+ }
46
+ export default EnumCoreRequest;
@@ -0,0 +1,47 @@
1
+ var EnumCoreRequest;
2
+ (function (EnumCoreRequest) {
3
+ EnumCoreRequest[EnumCoreRequest["NONE"] = 0] = "NONE";
4
+ EnumCoreRequest[EnumCoreRequest["SENT_TO_CORE_ACCOUNT"] = 1] = "SENT_TO_CORE_ACCOUNT";
5
+ EnumCoreRequest[EnumCoreRequest["SENT_TO_CORE_SETTING"] = 2] = "SENT_TO_CORE_SETTING";
6
+ EnumCoreRequest[EnumCoreRequest["SENT_TO_CORE_LOCAL_SETTING"] = 3] = "SENT_TO_CORE_LOCAL_SETTING";
7
+ EnumCoreRequest[EnumCoreRequest["SENT_TO_CORE_LOCAL_ORDERS"] = 4] = "SENT_TO_CORE_LOCAL_ORDERS";
8
+ EnumCoreRequest[EnumCoreRequest["SENT_TO_CORE_TODAY_ORDER_COUNT"] = 5] = "SENT_TO_CORE_TODAY_ORDER_COUNT";
9
+ EnumCoreRequest[EnumCoreRequest["SENT_TO_CORE_EXTRAS"] = 6] = "SENT_TO_CORE_EXTRAS";
10
+ EnumCoreRequest[EnumCoreRequest["SENT_TO_CORE_CATEGORIES"] = 7] = "SENT_TO_CORE_CATEGORIES";
11
+ EnumCoreRequest[EnumCoreRequest["SENT_TO_CORE_PRODUCTS"] = 8] = "SENT_TO_CORE_PRODUCTS";
12
+ EnumCoreRequest[EnumCoreRequest["SENT_TO_CORE_ZONES"] = 9] = "SENT_TO_CORE_ZONES";
13
+ EnumCoreRequest[EnumCoreRequest["SENT_TO_CORE_GENERAL_INFORMATION"] = 10] = "SENT_TO_CORE_GENERAL_INFORMATION";
14
+ EnumCoreRequest[EnumCoreRequest["SENT_TO_CORE_PRINT_TEMPLATES"] = 11] = "SENT_TO_CORE_PRINT_TEMPLATES";
15
+ EnumCoreRequest[EnumCoreRequest["SENT_TO_CORE_TERMINALS"] = 12] = "SENT_TO_CORE_TERMINALS";
16
+ EnumCoreRequest[EnumCoreRequest["SENT_TO_CORE_GENERAL_ITEMS"] = 13] = "SENT_TO_CORE_GENERAL_ITEMS";
17
+ EnumCoreRequest[EnumCoreRequest["SENT_TO_CORE_STAR_MICRONICS_PRINTERS"] = 14] = "SENT_TO_CORE_STAR_MICRONICS_PRINTERS";
18
+ EnumCoreRequest[EnumCoreRequest["SENT_TO_CORE_DRIVER_NAMES"] = 15] = "SENT_TO_CORE_DRIVER_NAMES";
19
+ EnumCoreRequest[EnumCoreRequest["SENT_TO_CORE_ORDER_STATES"] = 16] = "SENT_TO_CORE_ORDER_STATES";
20
+ EnumCoreRequest[EnumCoreRequest["SENT_TO_CORE_CUSTOMERS"] = 17] = "SENT_TO_CORE_CUSTOMERS";
21
+ EnumCoreRequest[EnumCoreRequest["SENT_TO_CORE_COMPANY_ACCESS_LEVEL"] = 18] = "SENT_TO_CORE_COMPANY_ACCESS_LEVEL";
22
+ EnumCoreRequest[EnumCoreRequest["SENT_TO_CORE_ROLE_LIST"] = 19] = "SENT_TO_CORE_ROLE_LIST";
23
+ EnumCoreRequest[EnumCoreRequest["SENT_TO_CORE_DISCOUNT_LIST"] = 20] = "SENT_TO_CORE_DISCOUNT_LIST";
24
+ EnumCoreRequest[EnumCoreRequest["SENT_TO_CORE_RESTAURANT_LIST"] = 21] = "SENT_TO_CORE_RESTAURANT_LIST";
25
+ EnumCoreRequest[EnumCoreRequest["SENT_TO_CORE_CASH_DRAWERS"] = 22] = "SENT_TO_CORE_CASH_DRAWERS";
26
+ EnumCoreRequest[EnumCoreRequest["SENT_TO_CORE_SOFTWARE_STATE_CURRENT_SCREEN"] = 23] = "SENT_TO_CORE_SOFTWARE_STATE_CURRENT_SCREEN";
27
+ EnumCoreRequest[EnumCoreRequest["SENT_TO_CORE_SOFTWARE_STATE_MEMBER_LIST"] = 24] = "SENT_TO_CORE_SOFTWARE_STATE_MEMBER_LIST";
28
+ EnumCoreRequest[EnumCoreRequest["SENT_TO_CORE_SOFTWARE_STATE_ACTIVED_MEMBER"] = 25] = "SENT_TO_CORE_SOFTWARE_STATE_ACTIVED_MEMBER";
29
+ EnumCoreRequest[EnumCoreRequest["SENT_TO_CORE_SOFTWARE_STATE_PRINT_PARTS"] = 26] = "SENT_TO_CORE_SOFTWARE_STATE_PRINT_PARTS";
30
+ EnumCoreRequest[EnumCoreRequest["SENT_TO_CORE_SOFTWARE_STATE_TASK_IN_PROGRESS"] = 27] = "SENT_TO_CORE_SOFTWARE_STATE_TASK_IN_PROGRESS";
31
+ EnumCoreRequest[EnumCoreRequest["SENT_TO_CORE_SOFTWARE_STATE_PRINTER_LIST"] = 28] = "SENT_TO_CORE_SOFTWARE_STATE_PRINTER_LIST";
32
+ EnumCoreRequest[EnumCoreRequest["SENT_TO_CORE_SOFTWARE_STATE_PRINT_LOCK"] = 29] = "SENT_TO_CORE_SOFTWARE_STATE_PRINT_LOCK";
33
+ EnumCoreRequest[EnumCoreRequest["SENT_TO_CORE_SOFTWARE_STATE_CURRENT_ORDER"] = 30] = "SENT_TO_CORE_SOFTWARE_STATE_CURRENT_ORDER";
34
+ EnumCoreRequest[EnumCoreRequest["SENT_TO_CORE_SOFTWARE_STATE_ALL_ELAVON_PACKET"] = 31] = "SENT_TO_CORE_SOFTWARE_STATE_ALL_ELAVON_PACKET";
35
+ EnumCoreRequest[EnumCoreRequest["SENT_TO_CORE_SOFTWARE_STATE_IS_CONNECTED"] = 32] = "SENT_TO_CORE_SOFTWARE_STATE_IS_CONNECTED";
36
+ EnumCoreRequest[EnumCoreRequest["SENT_TO_CORE_SOFTWARE_STATE_LOCAL_ORDER_TO_SYNC"] = 33] = "SENT_TO_CORE_SOFTWARE_STATE_LOCAL_ORDER_TO_SYNC";
37
+ EnumCoreRequest[EnumCoreRequest["SENT_TO_CORE_SOFTWARE_STATE_REDUX_STATUS"] = 34] = "SENT_TO_CORE_SOFTWARE_STATE_REDUX_STATUS";
38
+ EnumCoreRequest[EnumCoreRequest["SENT_TO_CORE_SOFTWARE_STATE_LOGS"] = 35] = "SENT_TO_CORE_SOFTWARE_STATE_LOGS";
39
+ EnumCoreRequest[EnumCoreRequest["RUN_ACTION_LOG_OUT"] = 36] = "RUN_ACTION_LOG_OUT";
40
+ EnumCoreRequest[EnumCoreRequest["RUN_ACTION_RENEW_TOKEN"] = 37] = "RUN_ACTION_RENEW_TOKEN";
41
+ EnumCoreRequest[EnumCoreRequest["RUN_ACTION_SYNC_ONLINE_ORDERS"] = 38] = "RUN_ACTION_SYNC_ONLINE_ORDERS";
42
+ EnumCoreRequest[EnumCoreRequest["RUN_ACTION_CLEAR_LOGS"] = 39] = "RUN_ACTION_CLEAR_LOGS";
43
+ EnumCoreRequest[EnumCoreRequest["RUN_ACTION_FETCH_SHOP_ALL_DATA"] = 40] = "RUN_ACTION_FETCH_SHOP_ALL_DATA";
44
+ EnumCoreRequest[EnumCoreRequest["RUN_ACTION_START_SYNC_LOCAL_ORDERS"] = 41] = "RUN_ACTION_START_SYNC_LOCAL_ORDERS";
45
+ EnumCoreRequest[EnumCoreRequest["RUN_ACTION_PRINT_ORDER"] = 42] = "RUN_ACTION_PRINT_ORDER";
46
+ })(EnumCoreRequest || (EnumCoreRequest = {}));
47
+ export default EnumCoreRequest;
@@ -0,0 +1,18 @@
1
+ declare enum EnumTransactionStatus {
2
+ Approved = "00",
3
+ PartialApproved = "01",
4
+ DeclinedByHostOrCard = "10",
5
+ CommunicationError = "11",
6
+ CancelledByUser = "12",
7
+ TimedOutOnUserInput = "13",
8
+ TransactionNotCompleted = "14",
9
+ BatchEmpty = "15",
10
+ DeclinedByMerchant = "16",
11
+ RecordNotFound = "17",
12
+ TransactionAlreadyVoided = "18",
13
+ InvalidECRParameter = "30",
14
+ BatteryLow = "31",
15
+ CashDrawerSuccess = "40",
16
+ CashDrawerFailed = "41"
17
+ }
18
+ export default EnumTransactionStatus;
@@ -0,0 +1,23 @@
1
+ var EnumTransactionStatus;
2
+ (function (EnumTransactionStatus) {
3
+ // Approved or Partial Approved
4
+ EnumTransactionStatus["Approved"] = "00";
5
+ EnumTransactionStatus["PartialApproved"] = "01";
6
+ // Declined or Not Completed
7
+ EnumTransactionStatus["DeclinedByHostOrCard"] = "10";
8
+ EnumTransactionStatus["CommunicationError"] = "11";
9
+ EnumTransactionStatus["CancelledByUser"] = "12";
10
+ EnumTransactionStatus["TimedOutOnUserInput"] = "13";
11
+ EnumTransactionStatus["TransactionNotCompleted"] = "14";
12
+ EnumTransactionStatus["BatchEmpty"] = "15";
13
+ EnumTransactionStatus["DeclinedByMerchant"] = "16";
14
+ EnumTransactionStatus["RecordNotFound"] = "17";
15
+ EnumTransactionStatus["TransactionAlreadyVoided"] = "18";
16
+ // ECR Request Rejected by Terminal
17
+ EnumTransactionStatus["InvalidECRParameter"] = "30";
18
+ EnumTransactionStatus["BatteryLow"] = "31";
19
+ // Cash Drawer Transaction Status
20
+ EnumTransactionStatus["CashDrawerSuccess"] = "40";
21
+ EnumTransactionStatus["CashDrawerFailed"] = "41";
22
+ })(EnumTransactionStatus || (EnumTransactionStatus = {}));
23
+ export default EnumTransactionStatus;
@@ -0,0 +1,6 @@
1
+ import EnumCoreRequest from "../enums/EnumCoreRequest";
2
+ export default interface ISignalAction {
3
+ referenceId: string;
4
+ type: EnumCoreRequest;
5
+ data: any;
6
+ }
@@ -0,0 +1 @@
1
+ export {};
package/dist/statics.d.ts CHANGED
@@ -21,6 +21,7 @@ export declare const POS_SIGNALR: {
21
21
  order_show: string;
22
22
  terminal_payment_status_changed: string;
23
23
  refresh_pos_data: string;
24
+ core_request: string;
24
25
  };
25
26
  export declare const AGENT_SIGNALR: {
26
27
  print_order: string;
package/dist/statics.js CHANGED
@@ -22,7 +22,8 @@ export const POS_SIGNALR = {
22
22
  order_status_changed: "OrderChanged",
23
23
  order_show: "OrderShow",
24
24
  terminal_payment_status_changed: "PaymentStatusChanged",
25
- refresh_pos_data: "DataChanges"
25
+ refresh_pos_data: "DataChanges",
26
+ core_request: "CoreRequest"
26
27
  };
27
28
  export const AGENT_SIGNALR = {
28
29
  print_order: "PrintOrder"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "meemup-library",
3
- "version": "1.3.45",
3
+ "version": "1.3.47",
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.3.45 \" && git push origin "
14
+ "commit": "git add . && git commit -m \"version.1.3.47 \" && git push origin "
15
15
  },
16
16
  "files": [
17
17
  "/dist"