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.
@@ -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}/paymentLines/export?${queryParams}`, config);
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);
@@ -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(`${GENERATE_EXPORT}/${storeId}/export-unpaid-orders-report/pdf?${queryParams}`, config);
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');
@@ -153,7 +153,6 @@ export const getProductSalesReport = function (storeId, params) {
153
153
  'toDate',
154
154
  'fromDate',
155
155
  'timezone',
156
- 'type',
157
156
  ], params);
158
157
  return yield axiosInstance.get(`${GET_SET_REPORTS}/${storeId}/productSales?${queryParams}`, config);
159
158
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "washday-sdk",
3
- "version": "0.0.135",
3
+ "version": "0.0.136",
4
4
  "description": "Washday utilities functions and API",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -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}/paymentLines/export?${queryParams}`, config);
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;
@@ -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(`${GENERATE_EXPORT}/${storeId}/export-unpaid-orders-report/pdf?${queryParams}`, config);
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]));
@@ -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) {