meemup-library 1.3.38 → 1.3.40

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.
@@ -19,6 +19,10 @@ declare class FieldRuleController {
19
19
  value: number;
20
20
  message: string;
21
21
  };
22
+ ipv4(message?: string | undefined): {
23
+ value: RegExp;
24
+ message: string;
25
+ };
22
26
  }
23
- declare const fieldRuleController: FieldRuleController;
24
- export default fieldRuleController;
27
+ declare const _default: FieldRuleController;
28
+ export default _default;
@@ -29,6 +29,11 @@ class FieldRuleController {
29
29
  message: message ? message : `Maximum value length must be ${max}.`,
30
30
  };
31
31
  }
32
+ ipv4(message = "Invalid IPv4 address") {
33
+ return {
34
+ value: /^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/,
35
+ message: message
36
+ };
37
+ }
32
38
  }
33
- const fieldRuleController = new FieldRuleController();
34
- export default fieldRuleController;
39
+ export default new FieldRuleController();
package/dist/index.d.ts CHANGED
@@ -44,7 +44,6 @@ export * from "./interfaces/IAnswer";
44
44
  export * from "./interfaces/IApiAllOrder";
45
45
  export * from "./interfaces/IApiEstimatedTimeBody";
46
46
  export * from "./interfaces/IApiPayOnTerminalBody";
47
- export * from "./interfaces/IApiShop";
48
47
  export * from "./interfaces/ICalculateFeeResult";
49
48
  export * from "./interfaces/ICard";
50
49
  export * from "./interfaces/ICategory";
package/dist/index.js CHANGED
@@ -44,7 +44,6 @@ export * from "./interfaces/IAnswer";
44
44
  export * from "./interfaces/IApiAllOrder";
45
45
  export * from "./interfaces/IApiEstimatedTimeBody";
46
46
  export * from "./interfaces/IApiPayOnTerminalBody";
47
- export * from "./interfaces/IApiShop";
48
47
  export * from "./interfaces/ICalculateFeeResult";
49
48
  export * from "./interfaces/ICard";
50
49
  export * from "./interfaces/ICategory";
@@ -0,0 +1,6 @@
1
+ export default interface IPointOfSaleActionCashDrawer {
2
+ mode: number;
3
+ amount: number;
4
+ reason: string;
5
+ dateTime: string;
6
+ }
@@ -0,0 +1,8 @@
1
+ import TCashDrawerMode from "../../types/TCashDrawerMode";
2
+ export default interface IPointOfSaleActionFormCashDrawer {
3
+ mode: TCashDrawerMode;
4
+ money: string;
5
+ reason: string;
6
+ openCashDrawer: boolean;
7
+ }
8
+ export declare const initPointOfSaleActionFormCashDrawer: IPointOfSaleActionFormCashDrawer;
@@ -0,0 +1,6 @@
1
+ export const initPointOfSaleActionFormCashDrawer = {
2
+ mode: 1,
3
+ money: "",
4
+ reason: "",
5
+ openCashDrawer: true
6
+ };
@@ -0,0 +1,5 @@
1
+ export default interface IPointOfSaleAddCashDrawer {
2
+ name: string;
3
+ printerId: number;
4
+ }
5
+ export declare const initPointOfSaleAddCashDrawer: IPointOfSaleAddCashDrawer;
@@ -0,0 +1,4 @@
1
+ export const initPointOfSaleAddCashDrawer = {
2
+ name: "",
3
+ printerId: -1
4
+ };
@@ -15,6 +15,7 @@ import IPointOfSaleRole from "./IPointOfSaleRole";
15
15
  import IPointOfSaleTeamMember from "./IPointOfSaleTeamMember";
16
16
  import IPointOfSaleLocalSetting from "./IPointOfSaleLocalSetting";
17
17
  import IPointOfSaleRestaurantTable from "./IPointOfSaleRestaurantTable";
18
+ import IPointOfSaleCashDrawer from "./IPointOfSaleCashDrawer";
18
19
  interface IPointOfSaleApiShop {
19
20
  ok: boolean;
20
21
  products: IProduct[];
@@ -36,6 +37,7 @@ interface IPointOfSaleApiShop {
36
37
  localSetting: IPointOfSaleLocalSetting;
37
38
  restaurantTables: IPointOfSaleRestaurantTable[];
38
39
  snoozes: ITextValue[];
40
+ cashDrawers: IPointOfSaleCashDrawer[];
39
41
  }
40
42
  export default IPointOfSaleApiShop;
41
43
  export declare const initApiShop: IPointOfSaleApiShop;
@@ -22,5 +22,6 @@ export const initApiShop = {
22
22
  discounts: [],
23
23
  localSetting: initPointOfSaleLocalSetting,
24
24
  restaurantTables: [],
25
- snoozes: []
25
+ snoozes: [],
26
+ cashDrawers: []
26
27
  };
@@ -0,0 +1,7 @@
1
+ export default interface IPointOfSaleCashDrawer {
2
+ id: number;
3
+ name: string;
4
+ printerId: number;
5
+ printerName: string;
6
+ printerMacAddress: string;
7
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,6 @@
1
+ export default interface IPointOfSaleEditCashDrawer {
2
+ id: number;
3
+ name: string;
4
+ printerId: number;
5
+ }
6
+ export declare const initPointOfSaleEditCashDrawer: IPointOfSaleEditCashDrawer;
@@ -0,0 +1,5 @@
1
+ export const initPointOfSaleEditCashDrawer = {
2
+ id: -1,
3
+ name: "",
4
+ printerId: -1
5
+ };
@@ -0,0 +1,2 @@
1
+ type TCashDrawerMode = 1 | 2;
2
+ export default TCashDrawerMode;
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "meemup-library",
3
- "version": "1.3.38",
3
+ "version": "1.3.40",
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.38 \" && git push origin "
14
+ "commit": "git add . && git commit -m \"version.1.3.40 \" && git push origin "
15
15
  },
16
16
  "files": [
17
17
  "/dist"
@@ -1,35 +0,0 @@
1
- import IProduct from "./IProduct";
2
- import ICategory from "./ICategory";
3
- import IExtra from "./IExtra";
4
- import IGeneralInformation from "./IGeneralInformation";
5
- import ITextValue from "./ITextValue";
6
- import ICheckoutOption from "./ICheckoutOption";
7
- import IGeneralItems from "./IGeneralItems";
8
- import IPrintTemplate from "./IPrintTemplate";
9
- import IOrderState from "./IOrderState";
10
- import IStarMicronicPrinter from "./IStarMicronicPrinter";
11
- import IBaseCustomer from "./IBaseCustomer";
12
- import IPointOfSaleSetting from "./IPointOfSaleSetting";
13
- import IPointOfSaleLocalSetting from "./pos/IPointOfSaleLocalSetting";
14
- import IPointOfSaleRestaurantTable from "./pos/IPointOfSaleRestaurantTable";
15
- interface IApiShop {
16
- ok: boolean;
17
- products: IProduct[];
18
- categories: ICategory[];
19
- extras: IExtra[];
20
- setting: IPointOfSaleSetting;
21
- generalInformation: IGeneralInformation;
22
- customers: IBaseCustomer[];
23
- printTemplates: IPrintTemplate[];
24
- terminals: ITextValue[];
25
- checkoutOption: ICheckoutOption;
26
- generalItems: IGeneralItems;
27
- starMicronicPrinters: IStarMicronicPrinter[];
28
- driversNames: ITextValue[];
29
- orderStates: IOrderState[];
30
- localSetting: IPointOfSaleLocalSetting;
31
- restaurantTables: IPointOfSaleRestaurantTable[];
32
- snoozes: ITextValue[];
33
- }
34
- export default IApiShop;
35
- export declare const initApiShop: IApiShop;
@@ -1,24 +0,0 @@
1
- import { initGeneralInformation } from "./IGeneralInformation";
2
- import { initCheckoutOption } from "./ICheckoutOption";
3
- import { initGeneralItems } from "./IGeneralItems";
4
- import { initPointOfSaleSetting } from "./IPointOfSaleSetting";
5
- import { initPointOfSaleLocalSetting } from "./pos/IPointOfSaleLocalSetting";
6
- export const initApiShop = {
7
- ok: false,
8
- extras: [],
9
- customers: [],
10
- categories: [],
11
- generalInformation: initGeneralInformation,
12
- printTemplates: [],
13
- setting: initPointOfSaleSetting,
14
- products: [],
15
- terminals: [],
16
- checkoutOption: initCheckoutOption,
17
- generalItems: initGeneralItems,
18
- starMicronicPrinters: [],
19
- driversNames: [],
20
- orderStates: [],
21
- localSetting: initPointOfSaleLocalSetting,
22
- restaurantTables: [],
23
- snoozes: []
24
- };