washday-sdk 0.0.9 → 0.0.11

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,96 +1,96 @@
1
- import { ICustomer } from "./Customer";
2
- import { IOrderProduct, IProduct } from "./Product";
3
- import { ICashierBox, IStore, ITaxConfig } from "./Store";
4
- import { IUser } from "./User";
5
-
6
- interface IDeliveryInfo {
7
- date: Date,
8
- fromTime: string,
9
- toTime: string
10
- }
11
-
12
- interface IPickupInfo {
13
- date: Date,
14
- fromTime: string,
15
- toTime: string
16
- }
17
-
18
- export interface IOrderPaymentLines {
19
- _id?: any,
20
- amountPaid: number,
21
- isOnACashUpReport: Boolean,
22
- cashierBox: ICashierBox | string
23
- paymentDate: Date,
24
- paymentMethod: string,
25
- description: string,
26
- createdBy: IUser | string,
27
- facturapiPaymentInvoiceID?: string | null,
28
- }
29
-
30
- export interface IOrder {
31
- delivery: boolean,
32
- pickup: boolean,
33
- express: boolean,
34
- deliveryInfo: IDeliveryInfo,
35
- pickupInfo?: IPickupInfo,
36
- phone: string,
37
- email?: string,
38
- address: string,
39
- notes?: string,
40
- privateNotes?: string,
41
- isActive: boolean,
42
- taxesType: string,
43
- products: Array<IOrderProduct> | Array<string>,
44
- buyAndGetProducts: Array<IOrderProduct> | Array<string>,
45
- taxOne?: ITaxConfig,
46
- taxTwo?: ITaxConfig,
47
- taxThree?: ITaxConfig,
48
- creditApplied: number,
49
- taxesTotal: number,
50
- total: number,
51
- totalQuantity: number,
52
- productTotal: number,
53
- productTotalWithoutDiscount: number,
54
- shippingServiceTotal: number,
55
- totalDiscountAmount: number,
56
- amountPaid: number,
57
- prepaidAmount: number | null,
58
- createdIn: IStore | string,
59
- createdBy: IUser | string,
60
- customer: ICustomer | string,
61
- customerDiscount?: number | null,
62
- createdDate: Date,
63
- pickingUpDateTime: Date | null,
64
- cleanedDateTime: Date | null,
65
- readyDateTime: Date | null,
66
- deliveringDateTime: Date | null,
67
- collectedDateTime: Date | null,
68
- cancelledDateTime: Date | null,
69
- paidDateTime: Date | null,
70
- paymentMethod: string | null
71
- prepaidPaymentMethod: string | null
72
- status: string,
73
- pickupRoute: string | null,
74
- deliveryRoute: string | null,
75
- sequence?: string | null,
76
- notifyBy: string,
77
- stripePaymentIntentId?: string | null,
78
- markedCleanedBy: IUser | string,
79
- markedCollectedBy: IUser | string,
80
- markedCancelledBy: IUser | string,
81
- appliedStoreDiscounts: Array<string> | null,
82
- appliedDiscountCodes: Array<string> | null,
83
- paymentLines: Array<IOrderPaymentLines> | Array<string> | any,
84
- facturapiInvoiceID?: string | null,
85
- }
86
-
87
-
88
- export interface IOrderInfo {
89
- topProducts: IProduct[];
90
- sales: number;
91
- totalOrderQuantities: number;
92
- paidFromCredit: number;
93
- paid: number;
94
- unpaid: number;
95
- lastOrderDate: Date;
1
+ import { ICustomer } from "./Customer";
2
+ import { IOrderProduct, IProduct } from "./Product";
3
+ import { ICashierBox, IStore, ITaxConfig } from "./Store";
4
+ import { IUser } from "./User";
5
+
6
+ interface IDeliveryInfo {
7
+ date: Date,
8
+ fromTime: string,
9
+ toTime: string
10
+ }
11
+
12
+ interface IPickupInfo {
13
+ date: Date,
14
+ fromTime: string,
15
+ toTime: string
16
+ }
17
+
18
+ export interface IOrderPaymentLines {
19
+ _id?: any,
20
+ amountPaid: number,
21
+ isOnACashUpReport: Boolean,
22
+ cashierBox: ICashierBox | string
23
+ paymentDate: Date,
24
+ paymentMethod: string,
25
+ description: string,
26
+ createdBy: IUser | string,
27
+ facturapiPaymentInvoiceID?: string | null,
28
+ }
29
+
30
+ export interface IOrder {
31
+ delivery: boolean,
32
+ pickup: boolean,
33
+ express: boolean,
34
+ deliveryInfo: IDeliveryInfo,
35
+ pickupInfo?: IPickupInfo,
36
+ phone: string,
37
+ email?: string,
38
+ address: string,
39
+ notes?: string,
40
+ privateNotes?: string,
41
+ isActive: boolean,
42
+ taxesType: string,
43
+ products: Array<IOrderProduct> | Array<string>,
44
+ buyAndGetProducts: Array<IOrderProduct> | Array<string>,
45
+ taxOne?: ITaxConfig,
46
+ taxTwo?: ITaxConfig,
47
+ taxThree?: ITaxConfig,
48
+ creditApplied: number,
49
+ taxesTotal: number,
50
+ total: number,
51
+ totalQuantity: number,
52
+ productTotal: number,
53
+ productTotalWithoutDiscount: number,
54
+ shippingServiceTotal: number,
55
+ totalDiscountAmount: number,
56
+ amountPaid: number,
57
+ prepaidAmount: number | null,
58
+ createdIn: IStore | string,
59
+ createdBy: IUser | string,
60
+ customer: ICustomer | string,
61
+ customerDiscount?: number | null,
62
+ createdDate: Date,
63
+ pickingUpDateTime: Date | null,
64
+ cleanedDateTime: Date | null,
65
+ readyDateTime: Date | null,
66
+ deliveringDateTime: Date | null,
67
+ collectedDateTime: Date | null,
68
+ cancelledDateTime: Date | null,
69
+ paidDateTime: Date | null,
70
+ paymentMethod: string | null
71
+ prepaidPaymentMethod: string | null
72
+ status: string,
73
+ pickupRoute: string | null,
74
+ deliveryRoute: string | null,
75
+ sequence?: string | null,
76
+ notifyBy: string,
77
+ stripePaymentIntentId?: string | null,
78
+ markedCleanedBy: IUser | string,
79
+ markedCollectedBy: IUser | string,
80
+ markedCancelledBy: IUser | string,
81
+ appliedStoreDiscounts: Array<string> | null,
82
+ appliedDiscountCodes: Array<string> | null,
83
+ paymentLines: Array<IOrderPaymentLines> | Array<string> | any,
84
+ facturapiInvoiceID?: string | null,
85
+ }
86
+
87
+
88
+ export interface IOrderInfo {
89
+ topProducts: IProduct[];
90
+ sales: number;
91
+ totalOrderQuantities: number;
92
+ paidFromCredit: number;
93
+ paid: number;
94
+ unpaid: number;
95
+ lastOrderDate: Date;
96
96
  }
@@ -1,24 +1,24 @@
1
-
2
- export interface IPermissionType {
3
- canView: Boolean,
4
- canMutate: Boolean
5
- }
6
- export interface IPermissionViewType {
7
- canView: Boolean,
8
- }
9
-
10
- export interface IPermission {
11
- product: IPermissionType,
12
- section: IPermissionType,
13
- auth: IPermissionType,
14
- staff: IPermissionType,
15
- company: IPermissionType,
16
- store: IPermissionType,
17
- settings: IPermissionViewType,
18
- cashierBoxes: IPermissionType,
19
- reports: IPermissionViewType,
20
- customers: IPermissionType,
21
- discounts: IPermissionType,
22
- reviews: IPermissionViewType,
23
- inventory: IPermissionType,
24
- }
1
+
2
+ export interface IPermissionType {
3
+ canView: Boolean,
4
+ canMutate: Boolean
5
+ }
6
+ export interface IPermissionViewType {
7
+ canView: Boolean,
8
+ }
9
+
10
+ export interface IPermission {
11
+ product: IPermissionType,
12
+ section: IPermissionType,
13
+ auth: IPermissionType,
14
+ staff: IPermissionType,
15
+ company: IPermissionType,
16
+ store: IPermissionType,
17
+ settings: IPermissionViewType,
18
+ cashierBoxes: IPermissionType,
19
+ reports: IPermissionViewType,
20
+ customers: IPermissionType,
21
+ discounts: IPermissionType,
22
+ reviews: IPermissionViewType,
23
+ inventory: IPermissionType,
24
+ }
@@ -1,59 +1,59 @@
1
- import { IStore } from "./Store"
2
- import { IStoreImage } from "./StoreImage"
3
- import { IUser } from "./User"
4
-
5
- export interface ProductLineTotals {
6
- product: IOrderProduct,
7
- qty: number,
8
- productLineImportTotal: number,
9
- productLineTotalWithDiscount: number,
10
- productLineTaxesTotal: number,
11
- lineDiscountAmount: number
12
- }
13
-
14
-
15
- export interface IProduct {
16
- _id?: string
17
- name: string,
18
- price: number,
19
- expressPrice: number,
20
- extraAmount?: number,
21
- image?: IStoreImage | string,
22
- overlayText: string,
23
- sku: string,
24
- pieces: String,
25
- taxExemptOne: boolean,
26
- taxExemptTwo: boolean,
27
- taxExemptThree: boolean,
28
- type: String,
29
- isActive: boolean,
30
- showInApp: boolean,
31
- owner: IUser | string,
32
- store: IStore | string,
33
- order: number,
34
- productSupplies?: [IProductSupplies],
35
- invoice_description?: string,
36
- invoice_product_key?: string,
37
- invoice_product_unit_key?: string,
38
- invoice_product_unit_name?: string
39
- }
40
-
41
- export interface IProductSupplies {
42
- supplyId: String,
43
- // supplyName: String,
44
- // supplyUsageUnit: String,
45
- usageAmount: number,
46
- }
47
-
48
- export interface IStoreProduct extends IProduct { }
49
-
50
-
51
- export interface IOrderProduct extends IProduct {
52
- extraAmount: number,
53
- properties: Array<string>,
54
- quantity: number,
55
- discountAmount: number,
56
- isBuyAndGetProduct: boolean,
57
- storeProductId: IStoreProduct | string
58
- qty?: number
1
+ import { IStore } from "./Store"
2
+ import { IStoreImage } from "./StoreImage"
3
+ import { IUser } from "./User"
4
+
5
+ export interface ProductLineTotals {
6
+ product: IOrderProduct,
7
+ qty: number,
8
+ productLineImportTotal: number,
9
+ productLineTotalWithDiscount: number,
10
+ productLineTaxesTotal: number,
11
+ lineDiscountAmount: number
12
+ }
13
+
14
+
15
+ export interface IProduct {
16
+ _id?: string
17
+ name: string,
18
+ price: number,
19
+ expressPrice: number,
20
+ extraAmount?: number,
21
+ image?: IStoreImage | string,
22
+ overlayText: string,
23
+ sku: string,
24
+ pieces: String,
25
+ taxExemptOne: boolean,
26
+ taxExemptTwo: boolean,
27
+ taxExemptThree: boolean,
28
+ type: String,
29
+ isActive: boolean,
30
+ showInApp: boolean,
31
+ owner: IUser | string,
32
+ store: IStore | string,
33
+ order: number,
34
+ productSupplies?: [IProductSupplies],
35
+ invoice_description?: string,
36
+ invoice_product_key?: string,
37
+ invoice_product_unit_key?: string,
38
+ invoice_product_unit_name?: string
39
+ }
40
+
41
+ export interface IProductSupplies {
42
+ supplyId: String,
43
+ // supplyName: String,
44
+ // supplyUsageUnit: String,
45
+ usageAmount: number,
46
+ }
47
+
48
+ export interface IStoreProduct extends IProduct { }
49
+
50
+
51
+ export interface IOrderProduct extends IProduct {
52
+ extraAmount: number,
53
+ properties: Array<string>,
54
+ quantity: number,
55
+ discountAmount: number,
56
+ isBuyAndGetProduct: boolean,
57
+ storeProductId: IStoreProduct | string
58
+ qty?: number
59
59
  }
@@ -1,14 +1,14 @@
1
- import { IProduct } from './Product'
2
- import { IStore } from "./Store"
3
- import { IUser } from "./User"
4
-
5
- export interface ISection {
6
- name: string,
7
- order: number,
8
- boxColor: string,
9
- isActive: boolean,
10
- products?: IProduct[] | Array<string>
11
- owner: IUser | string
12
- store: IStore | string,
13
- showInApp?: boolean,
14
- }
1
+ import { IProduct } from './Product'
2
+ import { IStore } from "./Store"
3
+ import { IUser } from "./User"
4
+
5
+ export interface ISection {
6
+ name: string,
7
+ order: number,
8
+ boxColor: string,
9
+ isActive: boolean,
10
+ products?: IProduct[] | Array<string>
11
+ owner: IUser | string
12
+ store: IStore | string,
13
+ showInApp?: boolean,
14
+ }