washday-sdk 0.0.23 → 0.0.24

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.
Files changed (39) hide show
  1. package/babel.config.js +7 -7
  2. package/dist/api/index.js +8 -2
  3. package/dist/api/products/get.js +7 -0
  4. package/dist/api/products/post.js +7 -0
  5. package/dist/api/products/put.js +36 -0
  6. package/dist/api/stores/post.js +37 -0
  7. package/dist/utils/receipt/generateReceiptHTML.js +157 -0
  8. package/dist/utils/util.js +46 -0
  9. package/package.json +29 -28
  10. package/src/api/axiosInstance.ts +46 -46
  11. package/src/api/customers/get.ts +32 -32
  12. package/src/api/index.ts +37 -29
  13. package/src/api/products/get.ts +9 -0
  14. package/src/api/products/post.ts +11 -0
  15. package/src/api/products/put.ts +21 -0
  16. package/src/api/stores/get.ts +36 -36
  17. package/src/api/stores/post.ts +23 -0
  18. package/src/api/stores/put.ts +20 -20
  19. package/src/enum/index.ts +10 -10
  20. package/src/index.ts +4 -4
  21. package/src/interfaces/Api.ts +2 -2
  22. package/src/interfaces/Customer.ts +51 -51
  23. package/src/interfaces/Order.ts +95 -95
  24. package/src/interfaces/Permission.ts +24 -24
  25. package/src/interfaces/Product.ts +58 -58
  26. package/src/interfaces/Section.ts +14 -14
  27. package/src/interfaces/Store.ts +350 -350
  28. package/src/interfaces/StoreImage.ts +9 -9
  29. package/src/interfaces/User.ts +42 -42
  30. package/src/utils/index.ts +1 -1
  31. package/src/utils/orders/calculateOrderTotal.test.js +399 -399
  32. package/src/utils/orders/calculateOrderTotal.ts +60 -60
  33. package/src/utils/orders/calculateTotalTaxesIncluded.ts +75 -75
  34. package/src/utils/orders/calculateTotalTaxesOverPrice.ts +82 -82
  35. package/src/utils/orders/helpers.ts +73 -73
  36. package/src/utils/orders/index.ts +4 -4
  37. package/src/utils/receipt/generateReceiptHTML.ts +163 -0
  38. package/src/utils/util.ts +47 -0
  39. package/tsconfig.json +9 -9
@@ -1,9 +1,9 @@
1
- import { IUser } from "./User"
2
-
3
- export interface IStoreImage {
4
- resourceUrl?: string,
5
- name: string,
6
- description?: string,
7
- createdBy: IUser | string,
8
- createdDate: Date,
9
- }
1
+ import { IUser } from "./User"
2
+
3
+ export interface IStoreImage {
4
+ resourceUrl?: string,
5
+ name: string,
6
+ description?: string,
7
+ createdBy: IUser | string,
8
+ createdDate: Date,
9
+ }
@@ -1,43 +1,43 @@
1
- import { IPermission } from "./Permission";
2
- import { ICashierBox, IStore } from "./Store";
3
-
4
- interface IPrinterConfig {
5
- name: String;
6
- paperSize: String;
7
- }
8
- export interface IUser {
9
- email: string
10
- name: string
11
- password: string
12
- roleNum: number,
13
- languagePreference?: string
14
- phoneNumber: string,
15
- roleChanged: boolean,
16
- lastLogonDate: Date,
17
- freshChatRestoreID: String,
18
- permission: IPermission,
19
- isActive: boolean,
20
- verified: boolean,
21
- cashierBox?: ICashierBox | string | null,
22
- printer?: IPrinterConfig,
23
- }
24
-
25
- export interface ISecretCode {
26
- email: string
27
- code: string
28
- dateCreated: Date,
29
- }
30
-
31
- export interface IStoreAdmin extends IUser {
32
- }
33
-
34
- export interface ISuperAdmin extends IUser {
35
- // company: ICompany | string,
36
- hasMultiStore: boolean,
37
- stripeCustomerId: string,
38
- }
39
-
40
- export interface IStaff extends IUser {
41
- store: IStore | string,
42
- cashierBox: ICashierBox | string,
1
+ import { IPermission } from "./Permission";
2
+ import { ICashierBox, IStore } from "./Store";
3
+
4
+ interface IPrinterConfig {
5
+ name: String;
6
+ paperSize: String;
7
+ }
8
+ export interface IUser {
9
+ email: string
10
+ name: string
11
+ password: string
12
+ roleNum: number,
13
+ languagePreference?: string
14
+ phoneNumber: string,
15
+ roleChanged: boolean,
16
+ lastLogonDate: Date,
17
+ freshChatRestoreID: String,
18
+ permission: IPermission,
19
+ isActive: boolean,
20
+ verified: boolean,
21
+ cashierBox?: ICashierBox | string | null,
22
+ printer?: IPrinterConfig,
23
+ }
24
+
25
+ export interface ISecretCode {
26
+ email: string
27
+ code: string
28
+ dateCreated: Date,
29
+ }
30
+
31
+ export interface IStoreAdmin extends IUser {
32
+ }
33
+
34
+ export interface ISuperAdmin extends IUser {
35
+ // company: ICompany | string,
36
+ hasMultiStore: boolean,
37
+ stripeCustomerId: string,
38
+ }
39
+
40
+ export interface IStaff extends IUser {
41
+ store: IStore | string,
42
+ cashierBox: ICashierBox | string,
43
43
  }
@@ -1 +1 @@
1
- export * from './orders';
1
+ export * from './orders';