washday-sdk 0.0.135 → 0.0.136
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/csv/get.js +1 -1
- package/dist/api/pdf/get.js +2 -1
- package/dist/api/reports/get.js +0 -1
- package/package.json +1 -1
- package/src/api/csv/get.ts +1 -1
- package/src/api/pdf/get.ts +2 -1
- package/src/api/reports/get.ts +0 -1
package/dist/api/csv/get.js
CHANGED
|
@@ -315,7 +315,7 @@ export const exportUnpaidOrdersReportCSV = function (storeId, params) {
|
|
|
315
315
|
'timezone',
|
|
316
316
|
'customerName'
|
|
317
317
|
], params);
|
|
318
|
-
return yield axiosInstance.get(`${GET_SET_REPORTS}/${storeId}/
|
|
318
|
+
return yield axiosInstance.get(`${GET_SET_REPORTS}/${storeId}/unpaidOrders/export/csv?${queryParams}`, config);
|
|
319
319
|
}
|
|
320
320
|
catch (error) {
|
|
321
321
|
console.error('Error fetching exportOrdersList:', error);
|
package/dist/api/pdf/get.js
CHANGED
|
@@ -10,6 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
import { generateQueryParamsStr } from "../../utils/apiUtils";
|
|
11
11
|
import axiosInstance from "../axiosInstance";
|
|
12
12
|
const GENERATE_EXPORT = 'api/export';
|
|
13
|
+
const GET_SET_REPORTS = 'api/reports';
|
|
13
14
|
export const exportUnpaidOrdersReportPDF = function (storeId, params) {
|
|
14
15
|
return __awaiter(this, void 0, void 0, function* () {
|
|
15
16
|
try {
|
|
@@ -23,7 +24,7 @@ export const exportUnpaidOrdersReportPDF = function (storeId, params) {
|
|
|
23
24
|
// responseType: 'blob', // Important for handling the PDF blob response
|
|
24
25
|
};
|
|
25
26
|
const queryParams = generateQueryParamsStr(['store', 'fromDate', 'toDate', 'timezone', 'customerName'], params);
|
|
26
|
-
return yield axiosInstance.get(`${
|
|
27
|
+
return yield axiosInstance.get(`${GET_SET_REPORTS}/${storeId}/unpaidOrders/export/pdf?${queryParams}`, config);
|
|
27
28
|
// // Create a link element, trigger a download
|
|
28
29
|
// const url = window.URL.createObjectURL(new Blob([response.data]));
|
|
29
30
|
// const link = document.createElement('a');
|
package/dist/api/reports/get.js
CHANGED
package/package.json
CHANGED
package/src/api/csv/get.ts
CHANGED
|
@@ -346,7 +346,7 @@ export const exportUnpaidOrdersReportCSV = async function (this: WashdayClientIn
|
|
|
346
346
|
'timezone',
|
|
347
347
|
'customerName'
|
|
348
348
|
], params);
|
|
349
|
-
return await axiosInstance.get(`${GET_SET_REPORTS}/${storeId}/
|
|
349
|
+
return await axiosInstance.get(`${GET_SET_REPORTS}/${storeId}/unpaidOrders/export/csv?${queryParams}`, config);
|
|
350
350
|
} catch (error) {
|
|
351
351
|
console.error('Error fetching exportOrdersList:', error);
|
|
352
352
|
throw error;
|
package/src/api/pdf/get.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { generateQueryParamsStr } from "../../utils/apiUtils";
|
|
|
3
3
|
import axiosInstance from "../axiosInstance";
|
|
4
4
|
|
|
5
5
|
const GENERATE_EXPORT = 'api/export';
|
|
6
|
+
const GET_SET_REPORTS = 'api/reports';
|
|
6
7
|
|
|
7
8
|
export const exportUnpaidOrdersReportPDF = async function (this: WashdayClientInstance, storeId: string, params: {
|
|
8
9
|
store: string | undefined,
|
|
@@ -23,7 +24,7 @@ export const exportUnpaidOrdersReportPDF = async function (this: WashdayClientIn
|
|
|
23
24
|
};
|
|
24
25
|
|
|
25
26
|
const queryParams = generateQueryParamsStr(['store', 'fromDate', 'toDate', 'timezone', 'customerName'], params);
|
|
26
|
-
return await axiosInstance.get(`${
|
|
27
|
+
return await axiosInstance.get(`${GET_SET_REPORTS}/${storeId}/unpaidOrders/export/pdf?${queryParams}`, config);
|
|
27
28
|
|
|
28
29
|
// // Create a link element, trigger a download
|
|
29
30
|
// const url = window.URL.createObjectURL(new Blob([response.data]));
|
package/src/api/reports/get.ts
CHANGED
|
@@ -162,7 +162,6 @@ export const getProductSalesReport = async function (this: WashdayClientInstance
|
|
|
162
162
|
'toDate',
|
|
163
163
|
'fromDate',
|
|
164
164
|
'timezone',
|
|
165
|
-
'type',
|
|
166
165
|
], params);
|
|
167
166
|
return await axiosInstance.get(`${GET_SET_REPORTS}/${storeId}/productSales?${queryParams}`, config);
|
|
168
167
|
} catch (error) {
|