washday-sdk 0.0.158 → 0.0.159
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.
- package/dist/utils/index.js +1 -0
- package/dist/utils/util.js +18 -1
- package/package.json +1 -1
- package/src/utils/index.ts +2 -0
- package/src/utils/util.ts +19 -1
- package/dist/api/axiosInstance.d.ts +0 -2
- package/dist/api/cashierbox/delete.d.ts +0 -2
- package/dist/api/cashierbox/get.d.ts +0 -7
- package/dist/api/cashierbox/post.d.ts +0 -11
- package/dist/api/cashierbox/put.d.ts +0 -4
- package/dist/api/companies/get.d.ts +0 -2
- package/dist/api/companies/post.d.ts +0 -3
- package/dist/api/companies/put.d.ts +0 -4
- package/dist/api/countries/get.d.ts +0 -2
- package/dist/api/countries/post.d.ts +0 -0
- package/dist/api/countries/put.d.ts +0 -0
- package/dist/api/csv/get.d.ts +0 -11
- package/dist/api/csv/index.d.ts +0 -1
- package/dist/api/customers/delete.d.ts +0 -2
- package/dist/api/customers/get.d.ts +0 -28
- package/dist/api/customers/index.d.ts +0 -4
- package/dist/api/customers/post.d.ts +0 -18
- package/dist/api/customers/put.d.ts +0 -18
- package/dist/api/discounts/get.d.ts +0 -6
- package/dist/api/discounts/post.d.ts +0 -3
- package/dist/api/discounts/put.d.ts +0 -3
- package/dist/api/index.d.ts +0 -7
- package/dist/api/inventory/delete.d.ts +0 -2
- package/dist/api/inventory/get.d.ts +0 -7
- package/dist/api/inventory/index.d.ts +0 -4
- package/dist/api/inventory/post.d.ts +0 -7
- package/dist/api/inventory/put.d.ts +0 -8
- package/dist/api/products/delete.d.ts +0 -3
- package/dist/api/products/get.d.ts +0 -2
- package/dist/api/products/index.d.ts +0 -4
- package/dist/api/products/post.d.ts +0 -27
- package/dist/api/products/put.d.ts +0 -21
- package/dist/api/sections/delete.d.ts +0 -2
- package/dist/api/sections/get.d.ts +0 -7
- package/dist/api/sections/index.d.ts +0 -4
- package/dist/api/sections/post.d.ts +0 -7
- package/dist/api/sections/put.d.ts +0 -8
- package/dist/api/staff/delete.d.ts +0 -2
- package/dist/api/staff/get.d.ts +0 -3
- package/dist/api/staff/post.d.ts +0 -2
- package/dist/api/staff/put.d.ts +0 -2
- package/dist/api/stores/get.d.ts +0 -12
- package/dist/api/stores/post.d.ts +0 -4
- package/dist/api/stores/put.d.ts +0 -6
- package/dist/api/stripe/get.d.ts +0 -0
- package/dist/api/stripe/post.d.ts +0 -6
- package/dist/api/stripe/put.d.ts +0 -0
- package/dist/api/supplies/delete.d.ts +0 -2
- package/dist/api/supplies/get.d.ts +0 -7
- package/dist/api/supplies/post.d.ts +0 -11
- package/dist/api/supplies/put.d.ts +0 -6
- package/dist/api/users/put.d.ts +0 -10
- package/dist/enum/index.d.ts +0 -10
- package/dist/index.d.ts +0 -3
- package/dist/interfaces/Api.d.ts +0 -3
- package/dist/interfaces/Company.d.ts +0 -0
- package/dist/interfaces/Customer.d.ts +0 -47
- package/dist/interfaces/Order.d.ts +0 -91
- package/dist/interfaces/Permission.d.ts +0 -22
- package/dist/interfaces/Product.d.ts +0 -51
- package/dist/interfaces/Section.d.ts +0 -13
- package/dist/interfaces/Store.d.ts +0 -323
- package/dist/interfaces/StoreImage.d.ts +0 -8
- package/dist/interfaces/User.d.ts +0 -38
- package/dist/utils/apiUtils.d.ts +0 -3
- package/dist/utils/index.d.ts +0 -1
- package/dist/utils/orders/calculateOrderTotal.d.ts +0 -5
- package/dist/utils/orders/calculateTotalTaxesIncluded.d.ts +0 -9
- package/dist/utils/orders/calculateTotalTaxesOverPrice.d.ts +0 -8
- package/dist/utils/orders/helpers.d.ts +0 -15
- package/dist/utils/orders/index.d.ts +0 -2
- package/dist/utils/receipt/generateReceiptHTML.d.ts +0 -0
- package/dist/utils/util.d.ts +0 -0
package/dist/utils/index.js
CHANGED
package/dist/utils/util.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
// export function truncateOrFill(str: string, n: number, side: string = 'right') {
|
|
3
2
|
// let needSpacesQty = n - str.length;
|
|
4
3
|
// let whiteSpace = '';
|
|
@@ -44,3 +43,21 @@
|
|
|
44
43
|
// console.log(e);
|
|
45
44
|
// }
|
|
46
45
|
// };
|
|
46
|
+
// Function to get a formatted address
|
|
47
|
+
export function getFormattedAddress(address) {
|
|
48
|
+
const { street, neighborhood, postalCode, city, state, country } = address;
|
|
49
|
+
let formatted = '';
|
|
50
|
+
if (street)
|
|
51
|
+
formatted += street;
|
|
52
|
+
if (neighborhood)
|
|
53
|
+
formatted += `, ${neighborhood}`;
|
|
54
|
+
if (city)
|
|
55
|
+
formatted += `, ${city}`;
|
|
56
|
+
if (state)
|
|
57
|
+
formatted += `, ${state}`;
|
|
58
|
+
if (postalCode)
|
|
59
|
+
formatted += `, ${postalCode}`;
|
|
60
|
+
if (country)
|
|
61
|
+
formatted += `, ${country}`;
|
|
62
|
+
return formatted.trim();
|
|
63
|
+
}
|
package/package.json
CHANGED
package/src/utils/index.ts
CHANGED
package/src/utils/util.ts
CHANGED
|
@@ -14,6 +14,8 @@
|
|
|
14
14
|
// : whiteSpace + str;
|
|
15
15
|
// }
|
|
16
16
|
|
|
17
|
+
import { IAddress } from "../interfaces/Customer";
|
|
18
|
+
|
|
17
19
|
// export const formatMoneyString = (
|
|
18
20
|
// amount: string | number = 0,
|
|
19
21
|
// decimalCount: number = 2,
|
|
@@ -44,4 +46,20 @@
|
|
|
44
46
|
// } catch (e) {
|
|
45
47
|
// console.log(e);
|
|
46
48
|
// }
|
|
47
|
-
// };
|
|
49
|
+
// };
|
|
50
|
+
|
|
51
|
+
// Function to get a formatted address
|
|
52
|
+
export function getFormattedAddress(address: IAddress): string {
|
|
53
|
+
const { street, neighborhood, postalCode, city, state, country } = address;
|
|
54
|
+
|
|
55
|
+
let formatted = '';
|
|
56
|
+
|
|
57
|
+
if (street) formatted += street;
|
|
58
|
+
if (neighborhood) formatted += `, ${neighborhood}`;
|
|
59
|
+
if (city) formatted += `, ${city}`;
|
|
60
|
+
if (state) formatted += `, ${state}`;
|
|
61
|
+
if (postalCode) formatted += `, ${postalCode}`;
|
|
62
|
+
if (country) formatted += `, ${country}`;
|
|
63
|
+
|
|
64
|
+
return formatted.trim();
|
|
65
|
+
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { WashdayClientInstance } from "../../interfaces/Api";
|
|
2
|
-
export declare const getCashierboxesByStoreId: (this: WashdayClientInstance, storeId: string, queryParams?: string) => Promise<any>;
|
|
3
|
-
export declare const getCashierboxesById: (this: WashdayClientInstance, storeId: string, id: string, queryParams?: string) => Promise<any>;
|
|
4
|
-
export declare const getCashierBoxMovementsHistory: (this: WashdayClientInstance, storeId: string, id: string, params?: {
|
|
5
|
-
pageNum: number;
|
|
6
|
-
limit: number;
|
|
7
|
-
}) => Promise<any>;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { WashdayClientInstance } from "../../interfaces/Api";
|
|
2
|
-
export declare const createCashierBox: (this: WashdayClientInstance, storeId: string, data: {
|
|
3
|
-
name: string;
|
|
4
|
-
}) => Promise<any>;
|
|
5
|
-
export declare const addCashierBoxMovement: (this: WashdayClientInstance, storeId: string, id: string, data: {
|
|
6
|
-
type: string;
|
|
7
|
-
date: Date;
|
|
8
|
-
amount: number;
|
|
9
|
-
notes?: string;
|
|
10
|
-
paymentMethod: string;
|
|
11
|
-
}) => Promise<any>;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { WashdayClientInstance } from "../../interfaces/Api";
|
|
2
|
-
export declare const updateCompanyTaxInfoCertificates: (this: WashdayClientInstance, companyId: string, data: any) => Promise<any>;
|
|
3
|
-
export declare const updateCFDIOrgLogo: (this: WashdayClientInstance, companyId: string, data: any) => Promise<any>;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { WashdayClientInstance } from "../../interfaces/Api";
|
|
2
|
-
export declare const updateCompanyById: (this: WashdayClientInstance, companyId: string, data: any) => Promise<any>;
|
|
3
|
-
export declare const updateCompanyLogoById: (this: WashdayClientInstance, companyId: string, data: any) => Promise<any>;
|
|
4
|
-
export declare const updateCompanyTaxInfoById: (this: WashdayClientInstance, companyId: string, data: any) => Promise<any>;
|
|
File without changes
|
|
File without changes
|
package/dist/api/csv/get.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { WashdayClientInstance } from "../../interfaces/Api";
|
|
2
|
-
export declare const exportCustomersList: (this: WashdayClientInstance, params: {
|
|
3
|
-
searchTerm?: string;
|
|
4
|
-
name?: string;
|
|
5
|
-
phone?: string;
|
|
6
|
-
email?: string;
|
|
7
|
-
fromDate?: string;
|
|
8
|
-
toDate?: string;
|
|
9
|
-
limit: string;
|
|
10
|
-
pageNum: string;
|
|
11
|
-
}) => Promise<any>;
|
package/dist/api/csv/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * as getModule from './get';
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { WashdayClientInstance } from "../../interfaces/Api";
|
|
2
|
-
import { ICustomer } from "../../interfaces/Customer";
|
|
3
|
-
import { IOrderInfo } from "../../interfaces/Order";
|
|
4
|
-
export declare const getList: (this: WashdayClientInstance, params: {
|
|
5
|
-
searchTerm?: string;
|
|
6
|
-
name?: string;
|
|
7
|
-
phone?: string;
|
|
8
|
-
email?: string;
|
|
9
|
-
fromDate?: string;
|
|
10
|
-
toDate?: string;
|
|
11
|
-
limit: string;
|
|
12
|
-
pageNum: string;
|
|
13
|
-
}) => Promise<any>;
|
|
14
|
-
export declare const getCustomerById: (this: WashdayClientInstance, customerId: string) => Promise<{
|
|
15
|
-
customer: ICustomer;
|
|
16
|
-
orderInfo: IOrderInfo;
|
|
17
|
-
}>;
|
|
18
|
-
export declare const getCustomerHighlightsById: (this: WashdayClientInstance, customerId: string) => Promise<{
|
|
19
|
-
customer: ICustomer;
|
|
20
|
-
orderInfo: IOrderInfo;
|
|
21
|
-
}>;
|
|
22
|
-
export declare const getCustomerOrders: (this: WashdayClientInstance, customerId: string, params: {
|
|
23
|
-
limit: string;
|
|
24
|
-
pageNum: string;
|
|
25
|
-
}) => Promise<{
|
|
26
|
-
orders: any;
|
|
27
|
-
totalRowsCount: any;
|
|
28
|
-
}>;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { WashdayClientInstance } from "../../interfaces/Api";
|
|
2
|
-
export declare const create: (this: WashdayClientInstance, data: {
|
|
3
|
-
name: string;
|
|
4
|
-
phone?: string;
|
|
5
|
-
email?: string;
|
|
6
|
-
address?: string;
|
|
7
|
-
notes?: string;
|
|
8
|
-
privateNotes?: string;
|
|
9
|
-
discount: number;
|
|
10
|
-
credit: number;
|
|
11
|
-
rfc?: string;
|
|
12
|
-
invoiceInfo?: {
|
|
13
|
-
legal_name?: string;
|
|
14
|
-
tax_system?: string;
|
|
15
|
-
zipCode?: string;
|
|
16
|
-
};
|
|
17
|
-
isActive: boolean;
|
|
18
|
-
}) => Promise<any>;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { WashdayClientInstance } from "../../interfaces/Api";
|
|
2
|
-
export declare const updateById: (this: WashdayClientInstance, id: string, data: {
|
|
3
|
-
name?: string;
|
|
4
|
-
phone?: string;
|
|
5
|
-
email?: string;
|
|
6
|
-
address?: string;
|
|
7
|
-
notes?: string;
|
|
8
|
-
privateNotes?: string;
|
|
9
|
-
discount?: number;
|
|
10
|
-
credit?: number;
|
|
11
|
-
rfc?: string;
|
|
12
|
-
invoiceInfo?: {
|
|
13
|
-
legal_name?: string;
|
|
14
|
-
tax_system?: string;
|
|
15
|
-
zipCode?: string;
|
|
16
|
-
};
|
|
17
|
-
isActive?: boolean;
|
|
18
|
-
}) => Promise<any>;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { WashdayClientInstance } from "../../interfaces/Api";
|
|
2
|
-
export declare const getDiscountCodes: (this: WashdayClientInstance, storeId: string, params?: string) => Promise<any>;
|
|
3
|
-
export declare const getAutomaticDiscounts: (this: WashdayClientInstance, storeId: string, params?: string) => Promise<any>;
|
|
4
|
-
export declare const getDiscountCodeById: (this: WashdayClientInstance, storeId: string, discountId: string) => Promise<any>;
|
|
5
|
-
export declare const getAutomaticDiscountById: (this: WashdayClientInstance, storeId: string, discountId: string) => Promise<any>;
|
|
6
|
-
export declare const verifyDiscountCode: (this: WashdayClientInstance, storeId: string, code: string) => Promise<any>;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { WashdayClientInstance } from "../../interfaces/Api";
|
|
2
|
-
export declare const createAutomaticDiscount: (this: WashdayClientInstance, storeId: string, data: any) => Promise<any>;
|
|
3
|
-
export declare const createDiscountCode: (this: WashdayClientInstance, storeId: string, data: any) => Promise<any>;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { WashdayClientInstance } from "../../interfaces/Api";
|
|
2
|
-
export declare const deleteDiscountCodeById: (this: WashdayClientInstance, storeId: string, discountId: string) => Promise<any>;
|
|
3
|
-
export declare const deleteAutomaticDiscountById: (this: WashdayClientInstance, storeId: string, discountId: string) => Promise<any>;
|
package/dist/api/index.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { WashdayClientInstance } from "../../interfaces/Api";
|
|
2
|
-
export declare const getInventory: (this: WashdayClientInstance, storeId: string, queryParams?: string) => Promise<any>;
|
|
3
|
-
export declare const getInventoryById: (this: WashdayClientInstance, storeId: string, id: string) => Promise<any>;
|
|
4
|
-
export declare const getHistoryById: (this: WashdayClientInstance, storeId: string, id: string, params?: {
|
|
5
|
-
pageNum: number;
|
|
6
|
-
limit: number;
|
|
7
|
-
}) => Promise<any>;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { WashdayClientInstance } from "../../interfaces/Api";
|
|
2
|
-
export declare const updateById: (this: WashdayClientInstance, storeId: string, id: string, data: {
|
|
3
|
-
alertOnStock: number;
|
|
4
|
-
}) => Promise<any>;
|
|
5
|
-
export declare const addStock: (this: WashdayClientInstance, storeId: string, id: string, data: {
|
|
6
|
-
newStock: number;
|
|
7
|
-
date: string;
|
|
8
|
-
}) => Promise<any>;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { WashdayClientInstance } from "../../interfaces/Api";
|
|
2
|
-
export declare const deleteById: (this: WashdayClientInstance, id: string) => Promise<any>;
|
|
3
|
-
export declare const deleteProductSupplyById: (this: WashdayClientInstance, id: string, productSupplyId: string) => Promise<any>;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { WashdayClientInstance } from "../../interfaces/Api";
|
|
2
|
-
export declare const create: (this: WashdayClientInstance, data: {
|
|
3
|
-
name: string;
|
|
4
|
-
price: number;
|
|
5
|
-
expressPrice: number;
|
|
6
|
-
type: 'normal' | 'weight';
|
|
7
|
-
pieces: number;
|
|
8
|
-
sku?: string;
|
|
9
|
-
overlayText: string;
|
|
10
|
-
order: number;
|
|
11
|
-
taxExemptOne: boolean;
|
|
12
|
-
taxExemptTwo: boolean;
|
|
13
|
-
taxExemptThree: boolean;
|
|
14
|
-
showInApp: boolean;
|
|
15
|
-
image: string;
|
|
16
|
-
store: string;
|
|
17
|
-
section: string;
|
|
18
|
-
invoice_description: string;
|
|
19
|
-
invoice_product_key: string;
|
|
20
|
-
invoice_product_unit_key: string;
|
|
21
|
-
invoice_product_unit_name: string;
|
|
22
|
-
productSupplies: Array<any>;
|
|
23
|
-
}) => Promise<any>;
|
|
24
|
-
export declare const createProductSupply: (this: WashdayClientInstance, id: string, data: {
|
|
25
|
-
supplyId: string;
|
|
26
|
-
usageAmount: number;
|
|
27
|
-
}) => Promise<any>;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { WashdayClientInstance } from "../../interfaces/Api";
|
|
2
|
-
export declare const bulkUpdate: (this: WashdayClientInstance, storeId: string, data: any) => Promise<any>;
|
|
3
|
-
export declare const updateById: (this: WashdayClientInstance, id: string, data: {
|
|
4
|
-
name?: string;
|
|
5
|
-
price?: number;
|
|
6
|
-
expressPrice?: number;
|
|
7
|
-
type?: 'normal' | 'weight';
|
|
8
|
-
pieces?: number;
|
|
9
|
-
sku?: string;
|
|
10
|
-
overlayText?: string;
|
|
11
|
-
order?: number;
|
|
12
|
-
taxExemptOne?: boolean;
|
|
13
|
-
taxExemptTwo?: boolean;
|
|
14
|
-
taxExemptThree?: boolean;
|
|
15
|
-
showInApp?: boolean;
|
|
16
|
-
image?: string;
|
|
17
|
-
invoice_product_key?: string;
|
|
18
|
-
invoice_description?: string;
|
|
19
|
-
invoice_product_unit_key?: string;
|
|
20
|
-
invoice_product_unit_name?: string;
|
|
21
|
-
}) => Promise<any>;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { WashdayClientInstance } from "../../interfaces/Api";
|
|
2
|
-
export declare const getList: (this: WashdayClientInstance, params?: {
|
|
3
|
-
storeId?: string;
|
|
4
|
-
isActive?: string;
|
|
5
|
-
products?: boolean;
|
|
6
|
-
}) => Promise<any>;
|
|
7
|
-
export declare const getById: (this: WashdayClientInstance, id: string) => Promise<any>;
|
package/dist/api/staff/get.d.ts
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { WashdayClientInstance } from "../../interfaces/Api";
|
|
2
|
-
export declare const getStoreStaff: (this: WashdayClientInstance, storeId: string, queryParams?: string) => Promise<any>;
|
|
3
|
-
export declare const getStoreStaffById: (this: WashdayClientInstance, storeId: string, staffId: string) => Promise<any>;
|
package/dist/api/staff/post.d.ts
DELETED
package/dist/api/staff/put.d.ts
DELETED
package/dist/api/stores/get.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { WashdayClientInstance } from "../../interfaces/Api";
|
|
2
|
-
import { IStore } from "../../interfaces/Store";
|
|
3
|
-
export declare const getStores: (this: WashdayClientInstance, params: {
|
|
4
|
-
isActive?: string;
|
|
5
|
-
}) => Promise<{
|
|
6
|
-
stores: IStore[];
|
|
7
|
-
}>;
|
|
8
|
-
export declare const getStoreReviewLink: (this: WashdayClientInstance, storeId: string) => Promise<any>;
|
|
9
|
-
export declare const getStoreById: (this: WashdayClientInstance, storeId: string) => Promise<{
|
|
10
|
-
store: IStore;
|
|
11
|
-
}>;
|
|
12
|
-
export declare const getStoreImages: (this: WashdayClientInstance, storeId: string) => Promise<any>;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { WashdayClientInstance } from "../../interfaces/Api";
|
|
2
|
-
export declare const createStoreImage: (this: WashdayClientInstance, data: any) => Promise<any>;
|
|
3
|
-
export declare const createStore: (this: WashdayClientInstance, data: any) => Promise<any>;
|
|
4
|
-
export declare const copyStore: (this: WashdayClientInstance, copyStoreId: string) => Promise<any>;
|
package/dist/api/stores/put.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { WashdayClientInstance } from "../../interfaces/Api";
|
|
2
|
-
import { IStore } from "../../interfaces/Store";
|
|
3
|
-
export declare const updateStoreById: (this: WashdayClientInstance, storeId: string, data: IStore) => Promise<{
|
|
4
|
-
store: IStore;
|
|
5
|
-
}>;
|
|
6
|
-
export declare const deleteStoreById: (this: WashdayClientInstance, storeId: string) => Promise<any>;
|
package/dist/api/stripe/get.d.ts
DELETED
|
File without changes
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { WashdayClientInstance } from "../../interfaces/Api";
|
|
2
|
-
export declare const createCreateSuscriptionCheckoutSession: (this: WashdayClientInstance, data: {
|
|
3
|
-
priceId: string;
|
|
4
|
-
}) => Promise<any>;
|
|
5
|
-
export declare const createCustomerPortalSession: (this: WashdayClientInstance, data?: any) => Promise<any>;
|
|
6
|
-
export declare const createCFDISuscrptionCheckoutSession: (this: WashdayClientInstance, data?: any) => Promise<any>;
|
package/dist/api/stripe/put.d.ts
DELETED
|
File without changes
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { WashdayClientInstance } from "../../interfaces/Api";
|
|
2
|
-
export declare const getSupplies: (this: WashdayClientInstance, storeId: string, queryParams?: string) => Promise<any>;
|
|
3
|
-
export declare const getSupplyById: (this: WashdayClientInstance, storeId: string, id: string) => Promise<any>;
|
|
4
|
-
export declare const getSupplyHistory: (this: WashdayClientInstance, storeId: string, id: string, params?: {
|
|
5
|
-
pageNum: number;
|
|
6
|
-
limit: number;
|
|
7
|
-
}) => Promise<any>;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { WashdayClientInstance } from "../../interfaces/Api";
|
|
2
|
-
export declare const createSupply: (this: WashdayClientInstance, storeId: string, data: {
|
|
3
|
-
name: string;
|
|
4
|
-
code: string;
|
|
5
|
-
purchaseUnit: string;
|
|
6
|
-
usageUnit: string;
|
|
7
|
-
usageFactor: number;
|
|
8
|
-
stock: number;
|
|
9
|
-
alertOnStock: number;
|
|
10
|
-
supplyActivityHistory: [];
|
|
11
|
-
}) => Promise<any>;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { WashdayClientInstance } from "../../interfaces/Api";
|
|
2
|
-
import { ISupplies } from "../../interfaces/Store";
|
|
3
|
-
export declare const updateSupplyById: (this: WashdayClientInstance, storeId: string, id: string, data: ISupplies) => Promise<any>;
|
|
4
|
-
export declare const addSupplyStock: (this: WashdayClientInstance, storeId: string, id: string, data: {
|
|
5
|
-
newStock: number;
|
|
6
|
-
}) => Promise<any>;
|
package/dist/api/users/put.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { WashdayClientInstance } from "../../interfaces/Api";
|
|
2
|
-
interface userDTO {
|
|
3
|
-
printer?: {
|
|
4
|
-
name: string;
|
|
5
|
-
paperSize: string;
|
|
6
|
-
};
|
|
7
|
-
freshChatRestoreID?: string;
|
|
8
|
-
}
|
|
9
|
-
export declare const updateUserById: (this: WashdayClientInstance, userId: string, data: userDTO) => Promise<any>;
|
|
10
|
-
export {};
|
package/dist/enum/index.d.ts
DELETED
package/dist/index.d.ts
DELETED
package/dist/interfaces/Api.d.ts
DELETED
|
File without changes
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { IStore } from './Store';
|
|
2
|
-
import { IUser } from "./User";
|
|
3
|
-
interface IInvoiceInfo {
|
|
4
|
-
legal_name: string;
|
|
5
|
-
tax_system: string;
|
|
6
|
-
zipCode: string;
|
|
7
|
-
}
|
|
8
|
-
interface IAddresses {
|
|
9
|
-
addressString: string;
|
|
10
|
-
addressName: string;
|
|
11
|
-
location: {
|
|
12
|
-
latitude: string;
|
|
13
|
-
longitude: string;
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
interface IPaymentMethod {
|
|
17
|
-
stripeId: string;
|
|
18
|
-
brand: string;
|
|
19
|
-
exp_month: string;
|
|
20
|
-
exp_year: string;
|
|
21
|
-
last4: string;
|
|
22
|
-
}
|
|
23
|
-
export interface ICustomer {
|
|
24
|
-
name: string;
|
|
25
|
-
phone: string;
|
|
26
|
-
address: string;
|
|
27
|
-
rfc?: string;
|
|
28
|
-
email: string;
|
|
29
|
-
notes?: string;
|
|
30
|
-
privateNotes?: string;
|
|
31
|
-
discount: number;
|
|
32
|
-
credit: number;
|
|
33
|
-
isActive: boolean;
|
|
34
|
-
createdIn: IStore | string;
|
|
35
|
-
createdBy: IUser | string;
|
|
36
|
-
createdDate: Date;
|
|
37
|
-
password?: string;
|
|
38
|
-
google?: boolean;
|
|
39
|
-
facebook?: boolean;
|
|
40
|
-
apple?: boolean;
|
|
41
|
-
useStoreApp?: boolean;
|
|
42
|
-
addresses?: [IAddresses];
|
|
43
|
-
paymentMethods?: [IPaymentMethod];
|
|
44
|
-
stripeCustomerId?: string;
|
|
45
|
-
invoiceInfo?: IInvoiceInfo;
|
|
46
|
-
}
|
|
47
|
-
export {};
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import { ICustomer } from "./Customer";
|
|
2
|
-
import { IOrderProduct, IProduct } from "./Product";
|
|
3
|
-
import { ICashierBox, IStore, ITaxConfig } from "./Store";
|
|
4
|
-
import { IUser } from "./User";
|
|
5
|
-
interface IDeliveryInfo {
|
|
6
|
-
date: Date;
|
|
7
|
-
fromTime: string;
|
|
8
|
-
toTime: string;
|
|
9
|
-
}
|
|
10
|
-
interface IPickupInfo {
|
|
11
|
-
date: Date;
|
|
12
|
-
fromTime: string;
|
|
13
|
-
toTime: string;
|
|
14
|
-
}
|
|
15
|
-
export interface IOrderPaymentLines {
|
|
16
|
-
_id?: any;
|
|
17
|
-
amountPaid: number;
|
|
18
|
-
isOnACashUpReport: Boolean;
|
|
19
|
-
cashierBox: ICashierBox | string;
|
|
20
|
-
paymentDate: Date;
|
|
21
|
-
paymentMethod: string;
|
|
22
|
-
description: string;
|
|
23
|
-
createdBy: IUser | string;
|
|
24
|
-
facturapiPaymentInvoiceID?: string | null;
|
|
25
|
-
}
|
|
26
|
-
export interface IOrder {
|
|
27
|
-
delivery: boolean;
|
|
28
|
-
pickup: boolean;
|
|
29
|
-
express: boolean;
|
|
30
|
-
deliveryInfo: IDeliveryInfo;
|
|
31
|
-
pickupInfo?: IPickupInfo;
|
|
32
|
-
phone: string;
|
|
33
|
-
email?: string;
|
|
34
|
-
address: string;
|
|
35
|
-
notes?: string;
|
|
36
|
-
privateNotes?: string;
|
|
37
|
-
isActive: boolean;
|
|
38
|
-
taxesType: string;
|
|
39
|
-
products: Array<IOrderProduct> | Array<string>;
|
|
40
|
-
buyAndGetProducts: Array<IOrderProduct> | Array<string>;
|
|
41
|
-
taxOne?: ITaxConfig;
|
|
42
|
-
taxTwo?: ITaxConfig;
|
|
43
|
-
taxThree?: ITaxConfig;
|
|
44
|
-
creditApplied: number;
|
|
45
|
-
taxesTotal: number;
|
|
46
|
-
total: number;
|
|
47
|
-
totalQuantity: number;
|
|
48
|
-
productTotal: number;
|
|
49
|
-
productTotalWithoutDiscount: number;
|
|
50
|
-
shippingServiceTotal: number;
|
|
51
|
-
totalDiscountAmount: number;
|
|
52
|
-
amountPaid: number;
|
|
53
|
-
prepaidAmount: number | null;
|
|
54
|
-
createdIn: IStore | string;
|
|
55
|
-
createdBy: IUser | string;
|
|
56
|
-
customer: ICustomer | string;
|
|
57
|
-
customerDiscount?: number | null;
|
|
58
|
-
createdDate: Date;
|
|
59
|
-
pickingUpDateTime: Date | null;
|
|
60
|
-
cleanedDateTime: Date | null;
|
|
61
|
-
readyDateTime: Date | null;
|
|
62
|
-
deliveringDateTime: Date | null;
|
|
63
|
-
collectedDateTime: Date | null;
|
|
64
|
-
cancelledDateTime: Date | null;
|
|
65
|
-
paidDateTime: Date | null;
|
|
66
|
-
paymentMethod: string | null;
|
|
67
|
-
prepaidPaymentMethod: string | null;
|
|
68
|
-
status: string;
|
|
69
|
-
pickupRoute: string | null;
|
|
70
|
-
deliveryRoute: string | null;
|
|
71
|
-
sequence?: string | null;
|
|
72
|
-
notifyBy: string;
|
|
73
|
-
stripePaymentIntentId?: string | null;
|
|
74
|
-
markedCleanedBy: IUser | string;
|
|
75
|
-
markedCollectedBy: IUser | string;
|
|
76
|
-
markedCancelledBy: IUser | string;
|
|
77
|
-
appliedStoreDiscounts: Array<string> | null;
|
|
78
|
-
appliedDiscountCodes: Array<string> | null;
|
|
79
|
-
paymentLines: Array<IOrderPaymentLines> | Array<string> | any;
|
|
80
|
-
facturapiInvoiceID?: string | null;
|
|
81
|
-
}
|
|
82
|
-
export interface IOrderInfo {
|
|
83
|
-
topProducts: IProduct[];
|
|
84
|
-
sales: number;
|
|
85
|
-
totalOrderQuantities: number;
|
|
86
|
-
paidFromCredit: number;
|
|
87
|
-
paid: number;
|
|
88
|
-
unpaid: number;
|
|
89
|
-
lastOrderDate: Date;
|
|
90
|
-
}
|
|
91
|
-
export {};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
export interface IPermissionType {
|
|
2
|
-
canView: Boolean;
|
|
3
|
-
canMutate: Boolean;
|
|
4
|
-
}
|
|
5
|
-
export interface IPermissionViewType {
|
|
6
|
-
canView: Boolean;
|
|
7
|
-
}
|
|
8
|
-
export interface IPermission {
|
|
9
|
-
product: IPermissionType;
|
|
10
|
-
section: IPermissionType;
|
|
11
|
-
auth: IPermissionType;
|
|
12
|
-
staff: IPermissionType;
|
|
13
|
-
company: IPermissionType;
|
|
14
|
-
store: IPermissionType;
|
|
15
|
-
settings: IPermissionViewType;
|
|
16
|
-
cashierBoxes: IPermissionType;
|
|
17
|
-
reports: IPermissionViewType;
|
|
18
|
-
customers: IPermissionType;
|
|
19
|
-
discounts: IPermissionType;
|
|
20
|
-
reviews: IPermissionViewType;
|
|
21
|
-
inventory: IPermissionType;
|
|
22
|
-
}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { IStore } from "./Store";
|
|
2
|
-
import { IStoreImage } from "./StoreImage";
|
|
3
|
-
import { IUser } from "./User";
|
|
4
|
-
export interface ProductLineTotals {
|
|
5
|
-
product: IOrderProduct;
|
|
6
|
-
qty: number;
|
|
7
|
-
productLineImportTotal: number;
|
|
8
|
-
productLineTotalWithDiscount: number;
|
|
9
|
-
productLineTaxesTotal: number;
|
|
10
|
-
lineDiscountAmount: number;
|
|
11
|
-
}
|
|
12
|
-
export interface IProduct {
|
|
13
|
-
_id?: string;
|
|
14
|
-
name: string;
|
|
15
|
-
price: number;
|
|
16
|
-
expressPrice: number;
|
|
17
|
-
extraAmount?: number;
|
|
18
|
-
image?: IStoreImage | string;
|
|
19
|
-
overlayText: string;
|
|
20
|
-
sku: string;
|
|
21
|
-
pieces: String;
|
|
22
|
-
taxExemptOne: boolean;
|
|
23
|
-
taxExemptTwo: boolean;
|
|
24
|
-
taxExemptThree: boolean;
|
|
25
|
-
type: String;
|
|
26
|
-
isActive: boolean;
|
|
27
|
-
showInApp: boolean;
|
|
28
|
-
owner: IUser | string;
|
|
29
|
-
store: IStore | string;
|
|
30
|
-
order: number;
|
|
31
|
-
productSupplies?: [IProductSupplies];
|
|
32
|
-
invoice_description?: string;
|
|
33
|
-
invoice_product_key?: string;
|
|
34
|
-
invoice_product_unit_key?: string;
|
|
35
|
-
invoice_product_unit_name?: string;
|
|
36
|
-
}
|
|
37
|
-
export interface IProductSupplies {
|
|
38
|
-
supplyId: String;
|
|
39
|
-
usageAmount: number;
|
|
40
|
-
}
|
|
41
|
-
export interface IStoreProduct extends IProduct {
|
|
42
|
-
}
|
|
43
|
-
export interface IOrderProduct extends IProduct {
|
|
44
|
-
extraAmount: number;
|
|
45
|
-
properties: Array<string>;
|
|
46
|
-
quantity: number;
|
|
47
|
-
discountAmount: number;
|
|
48
|
-
isBuyAndGetProduct: boolean;
|
|
49
|
-
storeProductId: IStoreProduct | string;
|
|
50
|
-
qty?: number;
|
|
51
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { IProduct } from './Product';
|
|
2
|
-
import { IStore } from "./Store";
|
|
3
|
-
import { IUser } from "./User";
|
|
4
|
-
export interface ISection {
|
|
5
|
-
name: string;
|
|
6
|
-
order: number;
|
|
7
|
-
boxColor: string;
|
|
8
|
-
isActive: boolean;
|
|
9
|
-
products?: IProduct[] | Array<string>;
|
|
10
|
-
owner: IUser | string;
|
|
11
|
-
store: IStore | string;
|
|
12
|
-
showInApp?: boolean;
|
|
13
|
-
}
|
|
@@ -1,323 +0,0 @@
|
|
|
1
|
-
import { IProduct } from "./Product";
|
|
2
|
-
import { ISection } from "./Section";
|
|
3
|
-
import { IStoreImage } from "./StoreImage";
|
|
4
|
-
import { IUser, IStaff } from "./User";
|
|
5
|
-
import { IOrder, IOrderPaymentLines } from "./Order";
|
|
6
|
-
export interface IStore {
|
|
7
|
-
name: string;
|
|
8
|
-
streetAddress?: string;
|
|
9
|
-
zipCode?: string;
|
|
10
|
-
administrator: IUser | string;
|
|
11
|
-
owner: IUser | string;
|
|
12
|
-
createdBy: IUser | string;
|
|
13
|
-
city: string;
|
|
14
|
-
state: string;
|
|
15
|
-
country: string;
|
|
16
|
-
phone: string;
|
|
17
|
-
taxesType: string;
|
|
18
|
-
taxOne?: ITax;
|
|
19
|
-
isActive: boolean;
|
|
20
|
-
allowPrePaid: boolean;
|
|
21
|
-
taxTwo?: ITax;
|
|
22
|
-
taxThree?: ITax;
|
|
23
|
-
paymentConfig: IPaymentConfig;
|
|
24
|
-
orderPageConfig: IOrderPageConfig;
|
|
25
|
-
printingConfig: IPrintingConfig;
|
|
26
|
-
notificationConfig: INotificationConfig;
|
|
27
|
-
schedule?: ISchedule;
|
|
28
|
-
pickupDeliverySchedule?: IPickupDeliverySchedule;
|
|
29
|
-
sections?: Array<ISection | string>;
|
|
30
|
-
storeImages: Array<IStoreImage | string>;
|
|
31
|
-
staffs?: Array<IStaff | string>;
|
|
32
|
-
currencySymbol: string;
|
|
33
|
-
inventory?: IInventory;
|
|
34
|
-
supplies?: ISupplies;
|
|
35
|
-
cashUpReports?: ICashUpReport;
|
|
36
|
-
cashierBoxes?: ICashierBox;
|
|
37
|
-
ticketStructure?: ITicketStructure | null;
|
|
38
|
-
ticketForLaundryStructure?: ITicketForLaundryStructure | null;
|
|
39
|
-
storeDiscounts: IStoreDiscount | null;
|
|
40
|
-
discountCodes: IDiscountCode | null;
|
|
41
|
-
marketingConfig: IMarketingConfig;
|
|
42
|
-
emailReportSuscribed: boolean;
|
|
43
|
-
emailReportFrequency: string;
|
|
44
|
-
emailReportDateRange: string;
|
|
45
|
-
}
|
|
46
|
-
export interface ITaxConfig {
|
|
47
|
-
name: string;
|
|
48
|
-
value: number;
|
|
49
|
-
}
|
|
50
|
-
export interface IProductStockActivity {
|
|
51
|
-
type: string;
|
|
52
|
-
date: Date;
|
|
53
|
-
amount: number;
|
|
54
|
-
order?: IOrder | string;
|
|
55
|
-
addedBy?: IUser | string;
|
|
56
|
-
notes?: string;
|
|
57
|
-
}
|
|
58
|
-
export interface ISupplyStockActivity {
|
|
59
|
-
type: string;
|
|
60
|
-
date: Date;
|
|
61
|
-
amount: number;
|
|
62
|
-
order?: IOrder | string;
|
|
63
|
-
product?: IProduct | string;
|
|
64
|
-
addedBy?: IUser | string;
|
|
65
|
-
notes?: string;
|
|
66
|
-
}
|
|
67
|
-
export interface IInventory {
|
|
68
|
-
store: IStore | string;
|
|
69
|
-
product: IProduct | string;
|
|
70
|
-
stock: number;
|
|
71
|
-
alertOnStock: number;
|
|
72
|
-
stockActivityHistory: Array<IProductStockActivity | string>;
|
|
73
|
-
isActive: boolean;
|
|
74
|
-
}
|
|
75
|
-
export interface IInventory {
|
|
76
|
-
store: IStore | string;
|
|
77
|
-
product: IProduct | string;
|
|
78
|
-
stock: number;
|
|
79
|
-
alertOnStock: number;
|
|
80
|
-
stockActivityHistory: Array<IProductStockActivity | string>;
|
|
81
|
-
isActive: boolean;
|
|
82
|
-
}
|
|
83
|
-
export interface ISupplies {
|
|
84
|
-
name: String;
|
|
85
|
-
code: String;
|
|
86
|
-
purchaseUnit: String;
|
|
87
|
-
usageUnit: String;
|
|
88
|
-
usageFactor: number;
|
|
89
|
-
stock: number;
|
|
90
|
-
alertOnStock: number;
|
|
91
|
-
supplyActivityHistory: Array<ISupplyStockActivity | string>;
|
|
92
|
-
isActive: boolean;
|
|
93
|
-
}
|
|
94
|
-
export interface ISupplies {
|
|
95
|
-
name: String;
|
|
96
|
-
code: String;
|
|
97
|
-
purchaseUnit: String;
|
|
98
|
-
usageUnit: String;
|
|
99
|
-
usageFactor: number;
|
|
100
|
-
stock: number;
|
|
101
|
-
alertOnStock: number;
|
|
102
|
-
supplyActivityHistory: Array<ISupplyStockActivity | string>;
|
|
103
|
-
isActive: boolean;
|
|
104
|
-
}
|
|
105
|
-
export interface ICashUpReportLine {
|
|
106
|
-
type: string;
|
|
107
|
-
orderPaymentLineId: string | null | IOrderPaymentLines;
|
|
108
|
-
order: string | null | IOrder;
|
|
109
|
-
movement: string | null | IInOutMovement;
|
|
110
|
-
amount: number;
|
|
111
|
-
paymentMethod: string;
|
|
112
|
-
}
|
|
113
|
-
export interface ICashUpReport {
|
|
114
|
-
createdBy: IUser | string;
|
|
115
|
-
createdDate: Date;
|
|
116
|
-
startingCashDate: Date;
|
|
117
|
-
startingCash: number;
|
|
118
|
-
cardFromOrders: number;
|
|
119
|
-
totalCashCalculated: number;
|
|
120
|
-
totalCardCalculated: number;
|
|
121
|
-
totalTransferCalculated?: number;
|
|
122
|
-
cashFromOrders: number;
|
|
123
|
-
cashPayIns: number;
|
|
124
|
-
cardPayIns: number;
|
|
125
|
-
cardPayOuts: number;
|
|
126
|
-
cashPayOuts: number;
|
|
127
|
-
transferPayIns?: number;
|
|
128
|
-
transferPayOuts?: number;
|
|
129
|
-
transferFromOrders?: number;
|
|
130
|
-
declaredCash: number;
|
|
131
|
-
declaredCard: number;
|
|
132
|
-
declaredTransfer?: number;
|
|
133
|
-
leftInDrawer: number;
|
|
134
|
-
cashToBank: number;
|
|
135
|
-
expectedCash: number;
|
|
136
|
-
variance: number;
|
|
137
|
-
notes: string;
|
|
138
|
-
cashierBox: ICashierBox | string;
|
|
139
|
-
orders: Array<IOrder> | Array<string>;
|
|
140
|
-
movements: Array<IInOutMovement> | Array<string>;
|
|
141
|
-
lines: Array<ICashUpReportLine>;
|
|
142
|
-
}
|
|
143
|
-
export interface ICashUpReport {
|
|
144
|
-
createdBy: IUser | string;
|
|
145
|
-
createdDate: Date;
|
|
146
|
-
startingCashDate: Date;
|
|
147
|
-
startingCash: number;
|
|
148
|
-
cardFromOrders: number;
|
|
149
|
-
totalCashCalculated: number;
|
|
150
|
-
totalCardCalculated: number;
|
|
151
|
-
totalTransferCalculated?: number;
|
|
152
|
-
cashFromOrders: number;
|
|
153
|
-
transferPayIns?: number;
|
|
154
|
-
transferPayOuts?: number;
|
|
155
|
-
transferFromOrders?: number;
|
|
156
|
-
cashPayIns: number;
|
|
157
|
-
cashPayOuts: number;
|
|
158
|
-
declaredCash: number;
|
|
159
|
-
declaredCard: number;
|
|
160
|
-
declaredTransfer?: number;
|
|
161
|
-
leftInDrawer: number;
|
|
162
|
-
cashToBank: number;
|
|
163
|
-
expectedCash: number;
|
|
164
|
-
variance: number;
|
|
165
|
-
notes: string;
|
|
166
|
-
cashierBox: ICashierBox | string;
|
|
167
|
-
orders: Array<IOrder> | Array<string>;
|
|
168
|
-
movements: Array<IInOutMovement> | Array<string>;
|
|
169
|
-
}
|
|
170
|
-
export interface IInOutMovement {
|
|
171
|
-
type: string;
|
|
172
|
-
date: Date;
|
|
173
|
-
amount: number;
|
|
174
|
-
notes: string;
|
|
175
|
-
paymentMethod: string | null;
|
|
176
|
-
isOnACashUpReport: Boolean;
|
|
177
|
-
createdBy: IUser | string;
|
|
178
|
-
}
|
|
179
|
-
export interface ICashierBox {
|
|
180
|
-
createdBy: IUser | string;
|
|
181
|
-
name: string;
|
|
182
|
-
inOutMovements?: IInOutMovement;
|
|
183
|
-
isActive: boolean;
|
|
184
|
-
}
|
|
185
|
-
export interface ITax {
|
|
186
|
-
name: string;
|
|
187
|
-
value: number;
|
|
188
|
-
}
|
|
189
|
-
export interface INotificationConfig {
|
|
190
|
-
notifyOrderCreated: boolean;
|
|
191
|
-
notifyPickedUp: boolean;
|
|
192
|
-
notifyCleaned: boolean;
|
|
193
|
-
notifyCollected: boolean;
|
|
194
|
-
notifyDelivered: boolean;
|
|
195
|
-
notifyOwnerOnOrderCreated: boolean;
|
|
196
|
-
notifyEmail: string;
|
|
197
|
-
}
|
|
198
|
-
export interface IPaymentConfig {
|
|
199
|
-
defaultPaymentMethod: string;
|
|
200
|
-
}
|
|
201
|
-
export interface IPrintingConfig {
|
|
202
|
-
printLogoOnTicket: Boolean;
|
|
203
|
-
printTicketForLaundry: Boolean;
|
|
204
|
-
}
|
|
205
|
-
export interface IMarketingConfig {
|
|
206
|
-
googlePlaceID: string;
|
|
207
|
-
facebookUrl: string;
|
|
208
|
-
ordersForFirstReview: number;
|
|
209
|
-
ordersForSecondReview: number;
|
|
210
|
-
sendReviewByEmail: Boolean;
|
|
211
|
-
sendReviewBySMS: Boolean;
|
|
212
|
-
}
|
|
213
|
-
export interface IOrderPageConfig {
|
|
214
|
-
showProductSearchBarWeb: Boolean;
|
|
215
|
-
defaultDeliveryDate: string;
|
|
216
|
-
defaultDeliveryTime: string;
|
|
217
|
-
defaultNotifyMethod: string;
|
|
218
|
-
printTicketAfterOrder: Boolean;
|
|
219
|
-
shippingServiceCost: number;
|
|
220
|
-
}
|
|
221
|
-
export interface ITicketStructure {
|
|
222
|
-
showTotalPieces: Boolean;
|
|
223
|
-
showEmisionDate: Boolean;
|
|
224
|
-
showEmisionTime: Boolean;
|
|
225
|
-
showLegend: Boolean;
|
|
226
|
-
showPaymentMethod: Boolean;
|
|
227
|
-
showStorePhone: Boolean;
|
|
228
|
-
showDeliveryDate: Boolean;
|
|
229
|
-
showDeliveryTime: Boolean;
|
|
230
|
-
ticketLegendText: String;
|
|
231
|
-
showStoreName: Boolean;
|
|
232
|
-
showCustomerName: Boolean;
|
|
233
|
-
showCreatedByName: Boolean;
|
|
234
|
-
showOrderNotes: Boolean;
|
|
235
|
-
showTaxes: Boolean;
|
|
236
|
-
showDiscounts: Boolean;
|
|
237
|
-
showCredit: Boolean;
|
|
238
|
-
}
|
|
239
|
-
export interface ITicketForLaundryStructure {
|
|
240
|
-
showTotalPieces: Boolean;
|
|
241
|
-
showEmisionDate: Boolean;
|
|
242
|
-
showEmisionTime: Boolean;
|
|
243
|
-
showLegend: Boolean;
|
|
244
|
-
showPaymentMethod: Boolean;
|
|
245
|
-
showStorePhone: Boolean;
|
|
246
|
-
showDeliveryDate: Boolean;
|
|
247
|
-
showDeliveryTime: Boolean;
|
|
248
|
-
ticketLegendText: String;
|
|
249
|
-
printLogoOnTicket: Boolean;
|
|
250
|
-
showStoreName: Boolean;
|
|
251
|
-
showCustomerName: Boolean;
|
|
252
|
-
showCreatedByName: Boolean;
|
|
253
|
-
showOrderNotes: Boolean;
|
|
254
|
-
showTaxes: Boolean;
|
|
255
|
-
showDiscounts: Boolean;
|
|
256
|
-
showCredit: Boolean;
|
|
257
|
-
}
|
|
258
|
-
export interface ITiming {
|
|
259
|
-
openingTime: Date;
|
|
260
|
-
closingTime: Date;
|
|
261
|
-
}
|
|
262
|
-
export interface IPickupDeliveryTiming {
|
|
263
|
-
fromTime: String;
|
|
264
|
-
toTime: String;
|
|
265
|
-
}
|
|
266
|
-
export interface IPickupDeliverySchedule {
|
|
267
|
-
1: [IPickupDeliveryTiming];
|
|
268
|
-
2: [IPickupDeliveryTiming];
|
|
269
|
-
3: [IPickupDeliveryTiming];
|
|
270
|
-
4: [IPickupDeliveryTiming];
|
|
271
|
-
5: [IPickupDeliveryTiming];
|
|
272
|
-
6: [IPickupDeliveryTiming];
|
|
273
|
-
7: [IPickupDeliveryTiming];
|
|
274
|
-
}
|
|
275
|
-
export interface ISchedule {
|
|
276
|
-
sunday: ITiming;
|
|
277
|
-
monday: ITiming;
|
|
278
|
-
tuesday: ITiming;
|
|
279
|
-
wednesday: ITiming;
|
|
280
|
-
thursday: ITiming;
|
|
281
|
-
friday: ITiming;
|
|
282
|
-
saturday: ITiming;
|
|
283
|
-
}
|
|
284
|
-
export interface IStoreDiscount {
|
|
285
|
-
name: String;
|
|
286
|
-
type: String;
|
|
287
|
-
value: number;
|
|
288
|
-
fromDate: Date;
|
|
289
|
-
toDate: Date;
|
|
290
|
-
fromTime: string;
|
|
291
|
-
toTime: string;
|
|
292
|
-
weekDays: Array<Number>;
|
|
293
|
-
products: Array<IProduct | string>;
|
|
294
|
-
createdBy: IUser | string;
|
|
295
|
-
isActive: boolean;
|
|
296
|
-
}
|
|
297
|
-
export interface IBuyAndGetCondition {
|
|
298
|
-
buyConditions: Array<any>;
|
|
299
|
-
getConditions: Array<any>;
|
|
300
|
-
getDiscountType: string;
|
|
301
|
-
discountValue: number;
|
|
302
|
-
}
|
|
303
|
-
export interface IDiscountCode {
|
|
304
|
-
name: String;
|
|
305
|
-
code: String;
|
|
306
|
-
type: String;
|
|
307
|
-
value: number;
|
|
308
|
-
fromDate: Date;
|
|
309
|
-
toDate: Date;
|
|
310
|
-
fromTime: string;
|
|
311
|
-
toTime: string;
|
|
312
|
-
weekDays: Array<Number>;
|
|
313
|
-
products: Array<IProduct | string>;
|
|
314
|
-
createdBy: IUser | string;
|
|
315
|
-
isActive: boolean;
|
|
316
|
-
applyOnceOnOrder: boolean;
|
|
317
|
-
applyToAllProducts: boolean;
|
|
318
|
-
hasUseLimit: boolean;
|
|
319
|
-
useLimitQty: number;
|
|
320
|
-
usedCounter: number;
|
|
321
|
-
onePerCustomer: boolean;
|
|
322
|
-
buyAndGetConditions: Array<IBuyAndGetCondition | string>;
|
|
323
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { IPermission } from "./Permission";
|
|
2
|
-
import { ICashierBox, IStore } from "./Store";
|
|
3
|
-
interface IPrinterConfig {
|
|
4
|
-
name: String;
|
|
5
|
-
paperSize: String;
|
|
6
|
-
}
|
|
7
|
-
export interface IUser {
|
|
8
|
-
email: string;
|
|
9
|
-
name: string;
|
|
10
|
-
password: string;
|
|
11
|
-
roleNum: number;
|
|
12
|
-
languagePreference?: string;
|
|
13
|
-
phoneNumber: string;
|
|
14
|
-
roleChanged: boolean;
|
|
15
|
-
lastLogonDate: Date;
|
|
16
|
-
freshChatRestoreID: String;
|
|
17
|
-
permission: IPermission;
|
|
18
|
-
isActive: boolean;
|
|
19
|
-
verified: boolean;
|
|
20
|
-
cashierBox?: ICashierBox | string | null;
|
|
21
|
-
printer?: IPrinterConfig;
|
|
22
|
-
}
|
|
23
|
-
export interface ISecretCode {
|
|
24
|
-
email: string;
|
|
25
|
-
code: string;
|
|
26
|
-
dateCreated: Date;
|
|
27
|
-
}
|
|
28
|
-
export interface IStoreAdmin extends IUser {
|
|
29
|
-
}
|
|
30
|
-
export interface ISuperAdmin extends IUser {
|
|
31
|
-
hasMultiStore: boolean;
|
|
32
|
-
stripeCustomerId: string;
|
|
33
|
-
}
|
|
34
|
-
export interface IStaff extends IUser {
|
|
35
|
-
store: IStore | string;
|
|
36
|
-
cashierBox: ICashierBox | string;
|
|
37
|
-
}
|
|
38
|
-
export {};
|
package/dist/utils/apiUtils.d.ts
DELETED
package/dist/utils/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './orders';
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { ICustomer } from "../../interfaces/Customer";
|
|
2
|
-
import { IStore } from "../../interfaces/Store";
|
|
3
|
-
export declare const calculateOrderTotal: (order: any, selectedCustomer: {
|
|
4
|
-
customer: ICustomer;
|
|
5
|
-
} | undefined, storeSettings: IStore, hasShippingCost: boolean, storeDiscounts: any[] | undefined, discountCodeObj: any) => any;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { IOrderProduct } from "../../interfaces/Product";
|
|
2
|
-
export declare const calculateTotalTaxesIncluded: (order: any, selectedCustomer: any, storeSettings: any, storeDiscounts: any[], appliedOrderDiscounts: any, discountCodeObj: any | null) => {
|
|
3
|
-
product: IOrderProduct;
|
|
4
|
-
qty: number;
|
|
5
|
-
productLineImportTotal: number;
|
|
6
|
-
productLineTotalWithDiscount: number;
|
|
7
|
-
productLineTaxesTotal: number;
|
|
8
|
-
lineDiscountAmount: number;
|
|
9
|
-
}[];
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export declare const calculateTotalTaxesOverPrice: (order: any, selectedCustomer: any, storeSettings: any, storeDiscounts: any[], appliedOrderDiscounts: any, discountCodeObj: any | null) => {
|
|
2
|
-
product: any;
|
|
3
|
-
qty: any;
|
|
4
|
-
productLineImportTotal: number;
|
|
5
|
-
productLineTotalWithDiscount: number;
|
|
6
|
-
productLineTaxesTotal: number;
|
|
7
|
-
lineDiscountAmount: number;
|
|
8
|
-
}[];
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { ICustomer } from "../../interfaces/Customer";
|
|
2
|
-
import { IOrderProduct, ProductLineTotals } from "../../interfaces/Product";
|
|
3
|
-
import { IStore } from "../../interfaces/Store";
|
|
4
|
-
export declare const getProductTaxesPercentage: (productObj: IOrderProduct, store: IStore) => number;
|
|
5
|
-
export declare const getProductLineTotals: (productLinesTotals: ProductLineTotals[]) => {
|
|
6
|
-
totalQuantity: number;
|
|
7
|
-
totalImportWithDiscount: number;
|
|
8
|
-
totalImportWithoutDiscount: number;
|
|
9
|
-
totalImporTaxes: number;
|
|
10
|
-
totalDiscountAmount: number;
|
|
11
|
-
};
|
|
12
|
-
export declare const getShippingCost: (discountObject: any, requireShippingService: boolean, store: IStore) => number;
|
|
13
|
-
export declare const getCreditApplied: (selectedCustomer: {
|
|
14
|
-
customer: ICustomer;
|
|
15
|
-
} | undefined, orderTotal: number) => number;
|
|
File without changes
|
package/dist/utils/util.d.ts
DELETED
|
File without changes
|