washday-sdk 0.0.182 → 0.0.184
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/api/index.js +2 -0
- package/dist/api/order/post.js +18 -0
- package/package.json +1 -1
- package/src/api/discounts/put.ts +4 -0
- package/src/api/index.ts +2 -0
- package/src/api/order/post.ts +17 -0
- package/src/api/products/post.ts +1 -0
- package/src/api/products/put.ts +2 -1
- package/src/api/users/put.ts +3 -0
- package/src/interfaces/Api.ts +6 -0
- package/tsconfig.json +5 -2
package/dist/api/index.js
CHANGED
|
@@ -118,6 +118,7 @@ const WashdayClient = function WashdayClient(apiToken) {
|
|
|
118
118
|
createOrderCustomersApp: ordersEndpoints.postModule.createOrderCustomersApp,
|
|
119
119
|
createOrderUsersApp: ordersEndpoints.postModule.createOrderUsersApp,
|
|
120
120
|
bulkCreatePaymentLines: ordersEndpoints.postModule.bulkCreatePaymentLines,
|
|
121
|
+
createOrderEvidence: ordersEndpoints.postModule.createOrderEvidence,
|
|
121
122
|
deletePaymentLineById: ordersEndpoints.deleteModule.deletePaymentLineById,
|
|
122
123
|
getListCustomersApp: ordersEndpoints.getModule.getListCustomersApp,
|
|
123
124
|
getByIdCustomersApp: ordersEndpoints.getModule.getByIdCustomersApp,
|
|
@@ -253,6 +254,7 @@ const WashdayClient = function WashdayClient(apiToken) {
|
|
|
253
254
|
exportCustomersReport: csvExportEndpoints.getModule.exportCustomersReport,
|
|
254
255
|
exportSuppliesReport: csvExportEndpoints.getModule.exportSuppliesReport,
|
|
255
256
|
exportDiscountCodesReport: csvExportEndpoints.getModule.exportDiscountCodesReport,
|
|
257
|
+
exportStaffReport: csvExportEndpoints.getModule.exportStaffReport,
|
|
256
258
|
exportProductSalesReport: csvExportEndpoints.getModule.exportProductSalesReport,
|
|
257
259
|
exportPaymentLinesReport: csvExportEndpoints.getModule.exportPaymentLinesReport,
|
|
258
260
|
exportUnpaidOrdersReportCSV: csvExportEndpoints.getModule.exportUnpaidOrdersReportCSV,
|
package/dist/api/order/post.js
CHANGED
|
@@ -81,3 +81,21 @@ export const bulkCreatePaymentLines = function (storeId, body) {
|
|
|
81
81
|
}
|
|
82
82
|
});
|
|
83
83
|
};
|
|
84
|
+
export const createOrderEvidence = function (orderId, data) {
|
|
85
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
86
|
+
try {
|
|
87
|
+
const config = {
|
|
88
|
+
headers: {
|
|
89
|
+
Authorization: `Bearer ${this.apiToken}`,
|
|
90
|
+
// 'Content-Type': 'multipart/form-data',
|
|
91
|
+
'Content-Type': false
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
return yield axiosInstance.post(`${GET_SET_ORDER}/${orderId}/evidence`, data, config);
|
|
95
|
+
}
|
|
96
|
+
catch (error) {
|
|
97
|
+
console.error('Error fetching createOrderEvidence:', error);
|
|
98
|
+
throw error;
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
};
|
package/package.json
CHANGED
package/src/api/discounts/put.ts
CHANGED
|
@@ -48,6 +48,10 @@ export const updateDiscountCodeById = async function (this: WashdayClientInstanc
|
|
|
48
48
|
products?: string[];
|
|
49
49
|
buyAndGetConditions?: any;
|
|
50
50
|
freeProductSetting?: any;
|
|
51
|
+
name?: string;
|
|
52
|
+
code?: string;
|
|
53
|
+
fromDate?: string;
|
|
54
|
+
toDate?: string;
|
|
51
55
|
}): Promise<any> {
|
|
52
56
|
try {
|
|
53
57
|
const config = {
|
package/src/api/index.ts
CHANGED
|
@@ -125,6 +125,7 @@ const WashdayClient: WashdayClientConstructor = function WashdayClient(this: Was
|
|
|
125
125
|
createOrderCustomersApp: ordersEndpoints.postModule.createOrderCustomersApp,
|
|
126
126
|
createOrderUsersApp: ordersEndpoints.postModule.createOrderUsersApp,
|
|
127
127
|
bulkCreatePaymentLines: ordersEndpoints.postModule.bulkCreatePaymentLines,
|
|
128
|
+
createOrderEvidence: ordersEndpoints.postModule.createOrderEvidence,
|
|
128
129
|
deletePaymentLineById: ordersEndpoints.deleteModule.deletePaymentLineById,
|
|
129
130
|
getListCustomersApp: ordersEndpoints.getModule.getListCustomersApp,
|
|
130
131
|
getByIdCustomersApp: ordersEndpoints.getModule.getByIdCustomersApp,
|
|
@@ -260,6 +261,7 @@ const WashdayClient: WashdayClientConstructor = function WashdayClient(this: Was
|
|
|
260
261
|
exportCustomersReport: csvExportEndpoints.getModule.exportCustomersReport,
|
|
261
262
|
exportSuppliesReport: csvExportEndpoints.getModule.exportSuppliesReport,
|
|
262
263
|
exportDiscountCodesReport: csvExportEndpoints.getModule.exportDiscountCodesReport,
|
|
264
|
+
exportStaffReport: csvExportEndpoints.getModule.exportStaffReport,
|
|
263
265
|
exportProductSalesReport: csvExportEndpoints.getModule.exportProductSalesReport,
|
|
264
266
|
exportPaymentLinesReport: csvExportEndpoints.getModule.exportPaymentLinesReport,
|
|
265
267
|
exportUnpaidOrdersReportCSV: csvExportEndpoints.getModule.exportUnpaidOrdersReportCSV,
|
package/src/api/order/post.ts
CHANGED
|
@@ -80,4 +80,21 @@ export const bulkCreatePaymentLines = async function (this: WashdayClientInstanc
|
|
|
80
80
|
console.error('Error fetching bulkCreatePaymentLines:', error);
|
|
81
81
|
throw error;
|
|
82
82
|
}
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
export const createOrderEvidence = async function (this: WashdayClientInstance, orderId: string, data: FormData): Promise<any> {
|
|
87
|
+
try {
|
|
88
|
+
const config = {
|
|
89
|
+
headers: {
|
|
90
|
+
Authorization: `Bearer ${this.apiToken}`,
|
|
91
|
+
// 'Content-Type': 'multipart/form-data',
|
|
92
|
+
'Content-Type': false
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
return await axiosInstance.post(`${GET_SET_ORDER}/${orderId}/evidence`, data, config);
|
|
96
|
+
} catch (error) {
|
|
97
|
+
console.error('Error fetching createOrderEvidence:', error);
|
|
98
|
+
throw error;
|
|
99
|
+
}
|
|
83
100
|
};
|
package/src/api/products/post.ts
CHANGED
package/src/api/products/put.ts
CHANGED
|
@@ -34,7 +34,8 @@ export const updateById = async function (this: WashdayClientInstance, id: strin
|
|
|
34
34
|
invoice_product_unit_key?: string
|
|
35
35
|
invoice_product_unit_name?: string
|
|
36
36
|
isOutsourced?: boolean
|
|
37
|
-
outsourcingPartner?: string
|
|
37
|
+
outsourcingPartner?: string,
|
|
38
|
+
barcode?: string
|
|
38
39
|
}): Promise<any> {
|
|
39
40
|
try {
|
|
40
41
|
const config = {
|
package/src/api/users/put.ts
CHANGED
|
@@ -17,6 +17,9 @@ interface userDTO {
|
|
|
17
17
|
email?: string
|
|
18
18
|
name?: string
|
|
19
19
|
phoneNumber?: string
|
|
20
|
+
currentPassword?: string;
|
|
21
|
+
newPassword?: string;
|
|
22
|
+
confirmNewPassword?: string;
|
|
20
23
|
}
|
|
21
24
|
|
|
22
25
|
export const updateUserById = async function (this: WashdayClientInstance, userId: string, data: userDTO): Promise<any> {
|
package/src/interfaces/Api.ts
CHANGED
|
@@ -110,6 +110,7 @@ export interface WashdayClientInstance {
|
|
|
110
110
|
createOrderCustomersApp: typeof ordersEndpoints.postModule.createOrderCustomersApp,
|
|
111
111
|
createOrderUsersApp: typeof ordersEndpoints.postModule.createOrderUsersApp,
|
|
112
112
|
bulkCreatePaymentLines: typeof ordersEndpoints.postModule.bulkCreatePaymentLines,
|
|
113
|
+
createOrderEvidence: typeof ordersEndpoints.postModule.createOrderEvidence,
|
|
113
114
|
deletePaymentLineById: typeof ordersEndpoints.deleteModule.deletePaymentLineById;
|
|
114
115
|
getListCustomersApp: typeof ordersEndpoints.getModule.getListCustomersApp;
|
|
115
116
|
getByIdCustomersApp: typeof ordersEndpoints.getModule.getByIdCustomersApp;
|
|
@@ -244,6 +245,11 @@ export interface WashdayClientInstance {
|
|
|
244
245
|
exportProductSalesReport: typeof csvExportEndpoints.getModule.exportProductSalesReport;
|
|
245
246
|
exportPaymentLinesReport: typeof csvExportEndpoints.getModule.exportPaymentLinesReport;
|
|
246
247
|
exportUnpaidOrdersReportCSV: typeof csvExportEndpoints.getModule.exportUnpaidOrdersReportCSV;
|
|
248
|
+
exportOrdersList: typeof csvExportEndpoints.getModule.exportOrdersList,
|
|
249
|
+
exportProductsList: typeof csvExportEndpoints.getModule.exportProductsList,
|
|
250
|
+
exportCleanedOrdersReport: typeof csvExportEndpoints.getModule.exportCleanedOrdersReport,
|
|
251
|
+
exportSalesReport: typeof csvExportEndpoints.getModule.exportSalesReport,
|
|
252
|
+
exportStaffReport: typeof csvExportEndpoints.getModule.exportStaffReport,
|
|
247
253
|
};
|
|
248
254
|
pdf: {
|
|
249
255
|
exportUnpaidOrdersReportPDF: typeof pdfExportEndpoints.getModule.exportUnpaidOrdersReportPDF;
|
package/tsconfig.json
CHANGED
|
@@ -5,7 +5,10 @@
|
|
|
5
5
|
"strict": true,
|
|
6
6
|
"esModuleInterop": true,
|
|
7
7
|
"moduleResolution": "node",
|
|
8
|
-
"outDir": "dist"
|
|
8
|
+
"outDir": "dist",
|
|
9
|
+
"skipLibCheck": true,
|
|
10
|
+
"lib": ["esnext"]
|
|
9
11
|
},
|
|
10
|
-
"include": ["src/**/*.ts"]
|
|
12
|
+
"include": ["src/**/*.ts"],
|
|
13
|
+
"exclude": ["node_modules"]
|
|
11
14
|
}
|