washday-sdk 0.0.134 → 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 +81 -0
- package/dist/api/index.js +6 -0
- package/dist/api/pdf/get.js +2 -1
- package/dist/api/reports/get.js +63 -0
- package/package.json +1 -1
- package/src/api/csv/get.ts +91 -0
- package/src/api/index.ts +6 -0
- package/src/api/pdf/get.ts +2 -1
- package/src/api/reports/get.ts +75 -1
- package/src/interfaces/Api.ts +6 -0
package/dist/api/csv/get.js
CHANGED
|
@@ -242,3 +242,84 @@ export const exportStaffReport = function (storeId, params) {
|
|
|
242
242
|
}
|
|
243
243
|
});
|
|
244
244
|
};
|
|
245
|
+
export const exportProductSalesReport = function (storeId, params) {
|
|
246
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
247
|
+
try {
|
|
248
|
+
const config = {
|
|
249
|
+
headers: {
|
|
250
|
+
Authorization: `Bearer ${this.apiToken}`,
|
|
251
|
+
'Content-Type': 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
|
252
|
+
'Content-disposition': 'attachment; filename=[file.csv]'
|
|
253
|
+
},
|
|
254
|
+
params: {
|
|
255
|
+
responseType: 'blob'
|
|
256
|
+
}
|
|
257
|
+
};
|
|
258
|
+
const queryParams = generateQueryParamsStr([
|
|
259
|
+
'fromDate',
|
|
260
|
+
'toDate',
|
|
261
|
+
'timezone'
|
|
262
|
+
], params);
|
|
263
|
+
return yield axiosInstance.get(`${GET_SET_REPORTS}/${storeId}/productSales/export?${queryParams}`, config);
|
|
264
|
+
}
|
|
265
|
+
catch (error) {
|
|
266
|
+
console.error('Error fetching exportOrdersList:', error);
|
|
267
|
+
throw error;
|
|
268
|
+
}
|
|
269
|
+
});
|
|
270
|
+
};
|
|
271
|
+
export const exportPaymentLinesReport = function (storeId, params) {
|
|
272
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
273
|
+
try {
|
|
274
|
+
const config = {
|
|
275
|
+
headers: {
|
|
276
|
+
Authorization: `Bearer ${this.apiToken}`,
|
|
277
|
+
'Content-Type': 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
|
278
|
+
'Content-disposition': 'attachment; filename=[file.csv]'
|
|
279
|
+
},
|
|
280
|
+
params: {
|
|
281
|
+
responseType: 'blob'
|
|
282
|
+
}
|
|
283
|
+
};
|
|
284
|
+
const queryParams = generateQueryParamsStr([
|
|
285
|
+
'fromDate',
|
|
286
|
+
'toDate',
|
|
287
|
+
'timezone'
|
|
288
|
+
], params);
|
|
289
|
+
return yield axiosInstance.get(`${GET_SET_REPORTS}/${storeId}/paymentLines/export?${queryParams}`, config);
|
|
290
|
+
}
|
|
291
|
+
catch (error) {
|
|
292
|
+
console.error('Error fetching exportOrdersList:', error);
|
|
293
|
+
throw error;
|
|
294
|
+
}
|
|
295
|
+
});
|
|
296
|
+
};
|
|
297
|
+
export const exportUnpaidOrdersReportCSV = function (storeId, params) {
|
|
298
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
299
|
+
try {
|
|
300
|
+
const config = {
|
|
301
|
+
headers: {
|
|
302
|
+
Authorization: `Bearer ${this.apiToken}`,
|
|
303
|
+
'Content-Type': 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
|
304
|
+
'Content-disposition': 'attachment; filename=[file.csv]'
|
|
305
|
+
},
|
|
306
|
+
params: {
|
|
307
|
+
responseType: 'blob'
|
|
308
|
+
}
|
|
309
|
+
};
|
|
310
|
+
const queryParams = generateQueryParamsStr([
|
|
311
|
+
'fromDate',
|
|
312
|
+
'toDate',
|
|
313
|
+
'pageNum',
|
|
314
|
+
'limit',
|
|
315
|
+
'timezone',
|
|
316
|
+
'customerName'
|
|
317
|
+
], params);
|
|
318
|
+
return yield axiosInstance.get(`${GET_SET_REPORTS}/${storeId}/unpaidOrders/export/csv?${queryParams}`, config);
|
|
319
|
+
}
|
|
320
|
+
catch (error) {
|
|
321
|
+
console.error('Error fetching exportOrdersList:', error);
|
|
322
|
+
throw error;
|
|
323
|
+
}
|
|
324
|
+
});
|
|
325
|
+
};
|
package/dist/api/index.js
CHANGED
|
@@ -226,6 +226,9 @@ const WashdayClient = function WashdayClient(apiToken) {
|
|
|
226
226
|
exportCustomersReport: csvExportEndpoints.getModule.exportCustomersReport,
|
|
227
227
|
exportSuppliesReport: csvExportEndpoints.getModule.exportSuppliesReport,
|
|
228
228
|
exportDiscountCodesReport: csvExportEndpoints.getModule.exportDiscountCodesReport,
|
|
229
|
+
exportProductSalesReport: csvExportEndpoints.getModule.exportProductSalesReport,
|
|
230
|
+
exportPaymentLinesReport: csvExportEndpoints.getModule.exportPaymentLinesReport,
|
|
231
|
+
exportUnpaidOrdersReportCSV: csvExportEndpoints.getModule.exportUnpaidOrdersReportCSV,
|
|
229
232
|
});
|
|
230
233
|
this.pdf = bindMethods(this, {
|
|
231
234
|
exportUnpaidOrdersReportPDF: pdfExportEndpoints.getModule.exportUnpaidOrdersReportPDF,
|
|
@@ -238,6 +241,9 @@ const WashdayClient = function WashdayClient(apiToken) {
|
|
|
238
241
|
getSuppliesReport: reportsExportEndpoints.getModule.getSuppliesReport,
|
|
239
242
|
getDiscountCodesReport: reportsExportEndpoints.getModule.getDiscountCodesReport,
|
|
240
243
|
getStaffReport: reportsExportEndpoints.getModule.getStaffReport,
|
|
244
|
+
getProductSalesReport: reportsExportEndpoints.getModule.getProductSalesReport,
|
|
245
|
+
getPaymentLinesReport: reportsExportEndpoints.getModule.getPaymentLinesReport,
|
|
246
|
+
getUnpaidOrdersReport: reportsExportEndpoints.getModule.getUnpaidOrdersReport,
|
|
241
247
|
});
|
|
242
248
|
};
|
|
243
249
|
export default WashdayClient;
|
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
|
@@ -21,6 +21,7 @@ export const getCleanedOrdersReport = function (storeId, params) {
|
|
|
21
21
|
'fromDate',
|
|
22
22
|
'pageNum',
|
|
23
23
|
'limit',
|
|
24
|
+
'timezone',
|
|
24
25
|
'includeGraph',
|
|
25
26
|
], params);
|
|
26
27
|
return yield axiosInstance.get(`${GET_SET_REPORTS}/${storeId}/cleaned-orders?${queryParams}`, config);
|
|
@@ -142,3 +143,65 @@ export const getStaffReport = function (storeId, params) {
|
|
|
142
143
|
}
|
|
143
144
|
});
|
|
144
145
|
};
|
|
146
|
+
export const getProductSalesReport = function (storeId, params) {
|
|
147
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
148
|
+
try {
|
|
149
|
+
const config = {
|
|
150
|
+
headers: { Authorization: `Bearer ${this.apiToken}` }
|
|
151
|
+
};
|
|
152
|
+
const queryParams = generateQueryParamsStr([
|
|
153
|
+
'toDate',
|
|
154
|
+
'fromDate',
|
|
155
|
+
'timezone',
|
|
156
|
+
], params);
|
|
157
|
+
return yield axiosInstance.get(`${GET_SET_REPORTS}/${storeId}/productSales?${queryParams}`, config);
|
|
158
|
+
}
|
|
159
|
+
catch (error) {
|
|
160
|
+
console.error('Error fetching getProductSalesReport:', error);
|
|
161
|
+
throw error;
|
|
162
|
+
}
|
|
163
|
+
});
|
|
164
|
+
};
|
|
165
|
+
export const getPaymentLinesReport = function (storeId, params) {
|
|
166
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
167
|
+
try {
|
|
168
|
+
const config = {
|
|
169
|
+
headers: { Authorization: `Bearer ${this.apiToken}` }
|
|
170
|
+
};
|
|
171
|
+
const queryParams = generateQueryParamsStr([
|
|
172
|
+
'fromDate',
|
|
173
|
+
'toDate',
|
|
174
|
+
'pageNum',
|
|
175
|
+
'limit',
|
|
176
|
+
'timezone',
|
|
177
|
+
], params);
|
|
178
|
+
return yield axiosInstance.get(`${GET_SET_REPORTS}/${storeId}/paymentLines?${queryParams}`, config);
|
|
179
|
+
}
|
|
180
|
+
catch (error) {
|
|
181
|
+
console.error('Error fetching getPaymentLinesReport:', error);
|
|
182
|
+
throw error;
|
|
183
|
+
}
|
|
184
|
+
});
|
|
185
|
+
};
|
|
186
|
+
export const getUnpaidOrdersReport = function (storeId, params) {
|
|
187
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
188
|
+
try {
|
|
189
|
+
const config = {
|
|
190
|
+
headers: { Authorization: `Bearer ${this.apiToken}` }
|
|
191
|
+
};
|
|
192
|
+
const queryParams = generateQueryParamsStr([
|
|
193
|
+
'fromDate',
|
|
194
|
+
'toDate',
|
|
195
|
+
'pageNum',
|
|
196
|
+
'limit',
|
|
197
|
+
'timezone',
|
|
198
|
+
'customerName'
|
|
199
|
+
], params);
|
|
200
|
+
return yield axiosInstance.get(`${GET_SET_REPORTS}/${storeId}/unpaidOrders?${queryParams}`, config);
|
|
201
|
+
}
|
|
202
|
+
catch (error) {
|
|
203
|
+
console.error('Error fetching getUnpaidOrdersReport:', error);
|
|
204
|
+
throw error;
|
|
205
|
+
}
|
|
206
|
+
});
|
|
207
|
+
};
|
package/package.json
CHANGED
package/src/api/csv/get.ts
CHANGED
|
@@ -260,4 +260,95 @@ export const exportStaffReport = async function (this: WashdayClientInstance, st
|
|
|
260
260
|
console.error('Error fetching exportCustomersReport:', error);
|
|
261
261
|
throw error;
|
|
262
262
|
}
|
|
263
|
+
};
|
|
264
|
+
|
|
265
|
+
|
|
266
|
+
export const exportProductSalesReport = async function (this: WashdayClientInstance, storeId: string, params: {
|
|
267
|
+
fromDate?: string
|
|
268
|
+
toDate?: string
|
|
269
|
+
timezone?: string
|
|
270
|
+
}): Promise<any> {
|
|
271
|
+
try {
|
|
272
|
+
const config = {
|
|
273
|
+
headers: {
|
|
274
|
+
Authorization: `Bearer ${this.apiToken}`,
|
|
275
|
+
'Content-Type': 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
|
276
|
+
'Content-disposition': 'attachment; filename=[file.csv]'
|
|
277
|
+
},
|
|
278
|
+
params: {
|
|
279
|
+
responseType: 'blob'
|
|
280
|
+
}
|
|
281
|
+
};
|
|
282
|
+
const queryParams = generateQueryParamsStr([
|
|
283
|
+
'fromDate',
|
|
284
|
+
'toDate',
|
|
285
|
+
'timezone'
|
|
286
|
+
], params);
|
|
287
|
+
return await axiosInstance.get(`${GET_SET_REPORTS}/${storeId}/productSales/export?${queryParams}`, config);
|
|
288
|
+
} catch (error) {
|
|
289
|
+
console.error('Error fetching exportOrdersList:', error);
|
|
290
|
+
throw error;
|
|
291
|
+
}
|
|
292
|
+
};
|
|
293
|
+
|
|
294
|
+
export const exportPaymentLinesReport = async function (this: WashdayClientInstance, storeId: string, params: {
|
|
295
|
+
fromDate?: string
|
|
296
|
+
toDate?: string
|
|
297
|
+
timezone?: string
|
|
298
|
+
}): Promise<any> {
|
|
299
|
+
try {
|
|
300
|
+
const config = {
|
|
301
|
+
headers: {
|
|
302
|
+
Authorization: `Bearer ${this.apiToken}`,
|
|
303
|
+
'Content-Type': 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
|
304
|
+
'Content-disposition': 'attachment; filename=[file.csv]'
|
|
305
|
+
},
|
|
306
|
+
params: {
|
|
307
|
+
responseType: 'blob'
|
|
308
|
+
}
|
|
309
|
+
};
|
|
310
|
+
const queryParams = generateQueryParamsStr([
|
|
311
|
+
'fromDate',
|
|
312
|
+
'toDate',
|
|
313
|
+
'timezone'
|
|
314
|
+
], params);
|
|
315
|
+
return await axiosInstance.get(`${GET_SET_REPORTS}/${storeId}/paymentLines/export?${queryParams}`, config);
|
|
316
|
+
} catch (error) {
|
|
317
|
+
console.error('Error fetching exportOrdersList:', error);
|
|
318
|
+
throw error;
|
|
319
|
+
}
|
|
320
|
+
};
|
|
321
|
+
|
|
322
|
+
export const exportUnpaidOrdersReportCSV = async function (this: WashdayClientInstance, storeId: string, params: {
|
|
323
|
+
fromDate?: string
|
|
324
|
+
toDate?: string
|
|
325
|
+
timezone?: string
|
|
326
|
+
pageNum?: string
|
|
327
|
+
limit?: string
|
|
328
|
+
customerName?: string
|
|
329
|
+
}): Promise<any> {
|
|
330
|
+
try {
|
|
331
|
+
const config = {
|
|
332
|
+
headers: {
|
|
333
|
+
Authorization: `Bearer ${this.apiToken}`,
|
|
334
|
+
'Content-Type': 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
|
335
|
+
'Content-disposition': 'attachment; filename=[file.csv]'
|
|
336
|
+
},
|
|
337
|
+
params: {
|
|
338
|
+
responseType: 'blob'
|
|
339
|
+
}
|
|
340
|
+
};
|
|
341
|
+
const queryParams = generateQueryParamsStr([
|
|
342
|
+
'fromDate',
|
|
343
|
+
'toDate',
|
|
344
|
+
'pageNum',
|
|
345
|
+
'limit',
|
|
346
|
+
'timezone',
|
|
347
|
+
'customerName'
|
|
348
|
+
], params);
|
|
349
|
+
return await axiosInstance.get(`${GET_SET_REPORTS}/${storeId}/unpaidOrders/export/csv?${queryParams}`, config);
|
|
350
|
+
} catch (error) {
|
|
351
|
+
console.error('Error fetching exportOrdersList:', error);
|
|
352
|
+
throw error;
|
|
353
|
+
}
|
|
263
354
|
};
|
package/src/api/index.ts
CHANGED
|
@@ -232,6 +232,9 @@ const WashdayClient: WashdayClientConstructor = function WashdayClient(this: Was
|
|
|
232
232
|
exportCustomersReport: csvExportEndpoints.getModule.exportCustomersReport,
|
|
233
233
|
exportSuppliesReport: csvExportEndpoints.getModule.exportSuppliesReport,
|
|
234
234
|
exportDiscountCodesReport: csvExportEndpoints.getModule.exportDiscountCodesReport,
|
|
235
|
+
exportProductSalesReport: csvExportEndpoints.getModule.exportProductSalesReport,
|
|
236
|
+
exportPaymentLinesReport: csvExportEndpoints.getModule.exportPaymentLinesReport,
|
|
237
|
+
exportUnpaidOrdersReportCSV: csvExportEndpoints.getModule.exportUnpaidOrdersReportCSV,
|
|
235
238
|
});
|
|
236
239
|
this.pdf = bindMethods(this, {
|
|
237
240
|
exportUnpaidOrdersReportPDF: pdfExportEndpoints.getModule.exportUnpaidOrdersReportPDF,
|
|
@@ -244,6 +247,9 @@ const WashdayClient: WashdayClientConstructor = function WashdayClient(this: Was
|
|
|
244
247
|
getSuppliesReport: reportsExportEndpoints.getModule.getSuppliesReport,
|
|
245
248
|
getDiscountCodesReport: reportsExportEndpoints.getModule.getDiscountCodesReport,
|
|
246
249
|
getStaffReport: reportsExportEndpoints.getModule.getStaffReport,
|
|
250
|
+
getProductSalesReport: reportsExportEndpoints.getModule.getProductSalesReport,
|
|
251
|
+
getPaymentLinesReport: reportsExportEndpoints.getModule.getPaymentLinesReport,
|
|
252
|
+
getUnpaidOrdersReport: reportsExportEndpoints.getModule.getUnpaidOrdersReport,
|
|
247
253
|
});
|
|
248
254
|
} as any;
|
|
249
255
|
|
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
|
@@ -20,6 +20,7 @@ export const getCleanedOrdersReport = async function (this: WashdayClientInstanc
|
|
|
20
20
|
'fromDate',
|
|
21
21
|
'pageNum',
|
|
22
22
|
'limit',
|
|
23
|
+
'timezone',
|
|
23
24
|
'includeGraph',
|
|
24
25
|
], params);
|
|
25
26
|
return await axiosInstance.get(`${GET_SET_REPORTS}/${storeId}/cleaned-orders?${queryParams}`, config);
|
|
@@ -146,4 +147,77 @@ export const getStaffReport = async function (this: WashdayClientInstance, store
|
|
|
146
147
|
console.error('Error fetching getStaffReport:', error);
|
|
147
148
|
throw error;
|
|
148
149
|
}
|
|
149
|
-
};
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
export const getProductSalesReport = async function (this: WashdayClientInstance, storeId: string, params: {
|
|
153
|
+
fromDate?: string
|
|
154
|
+
toDate?: string
|
|
155
|
+
timezone?: string
|
|
156
|
+
}): Promise<any> {
|
|
157
|
+
try {
|
|
158
|
+
const config = {
|
|
159
|
+
headers: { Authorization: `Bearer ${this.apiToken}` }
|
|
160
|
+
};
|
|
161
|
+
const queryParams = generateQueryParamsStr([
|
|
162
|
+
'toDate',
|
|
163
|
+
'fromDate',
|
|
164
|
+
'timezone',
|
|
165
|
+
], params);
|
|
166
|
+
return await axiosInstance.get(`${GET_SET_REPORTS}/${storeId}/productSales?${queryParams}`, config);
|
|
167
|
+
} catch (error) {
|
|
168
|
+
console.error('Error fetching getProductSalesReport:', error);
|
|
169
|
+
throw error;
|
|
170
|
+
}
|
|
171
|
+
};
|
|
172
|
+
|
|
173
|
+
export const getPaymentLinesReport = async function (this: WashdayClientInstance, storeId: string, params: {
|
|
174
|
+
fromDate?: string
|
|
175
|
+
toDate?: string
|
|
176
|
+
timezone?: string
|
|
177
|
+
pageNum?: string
|
|
178
|
+
limit?: string
|
|
179
|
+
}): Promise<any> {
|
|
180
|
+
try {
|
|
181
|
+
const config = {
|
|
182
|
+
headers: { Authorization: `Bearer ${this.apiToken}` }
|
|
183
|
+
};
|
|
184
|
+
const queryParams = generateQueryParamsStr([
|
|
185
|
+
'fromDate',
|
|
186
|
+
'toDate',
|
|
187
|
+
'pageNum',
|
|
188
|
+
'limit',
|
|
189
|
+
'timezone',
|
|
190
|
+
], params);
|
|
191
|
+
return await axiosInstance.get(`${GET_SET_REPORTS}/${storeId}/paymentLines?${queryParams}`, config);
|
|
192
|
+
} catch (error) {
|
|
193
|
+
console.error('Error fetching getPaymentLinesReport:', error);
|
|
194
|
+
throw error;
|
|
195
|
+
}
|
|
196
|
+
};
|
|
197
|
+
|
|
198
|
+
export const getUnpaidOrdersReport = async function (this: WashdayClientInstance, storeId: string, params: {
|
|
199
|
+
fromDate?: string
|
|
200
|
+
toDate?: string
|
|
201
|
+
timezone?: string
|
|
202
|
+
pageNum?: string
|
|
203
|
+
limit?: string
|
|
204
|
+
customerName?: string
|
|
205
|
+
}): Promise<any> {
|
|
206
|
+
try {
|
|
207
|
+
const config = {
|
|
208
|
+
headers: { Authorization: `Bearer ${this.apiToken}` }
|
|
209
|
+
};
|
|
210
|
+
const queryParams = generateQueryParamsStr([
|
|
211
|
+
'fromDate',
|
|
212
|
+
'toDate',
|
|
213
|
+
'pageNum',
|
|
214
|
+
'limit',
|
|
215
|
+
'timezone',
|
|
216
|
+
'customerName'
|
|
217
|
+
], params);
|
|
218
|
+
return await axiosInstance.get(`${GET_SET_REPORTS}/${storeId}/unpaidOrders?${queryParams}`, config);
|
|
219
|
+
} catch (error) {
|
|
220
|
+
console.error('Error fetching getUnpaidOrdersReport:', error);
|
|
221
|
+
throw error;
|
|
222
|
+
}
|
|
223
|
+
};
|
package/src/interfaces/Api.ts
CHANGED
|
@@ -214,6 +214,9 @@ export interface WashdayClientInstance {
|
|
|
214
214
|
exportCustomersReport: typeof csvExportEndpoints.getModule.exportCustomersReport;
|
|
215
215
|
exportSuppliesReport: typeof csvExportEndpoints.getModule.exportSuppliesReport;
|
|
216
216
|
exportDiscountCodesReport: typeof csvExportEndpoints.getModule.exportDiscountCodesReport;
|
|
217
|
+
exportProductSalesReport: typeof csvExportEndpoints.getModule.exportProductSalesReport;
|
|
218
|
+
exportPaymentLinesReport: typeof csvExportEndpoints.getModule.exportPaymentLinesReport;
|
|
219
|
+
exportUnpaidOrdersReportCSV: typeof csvExportEndpoints.getModule.exportUnpaidOrdersReportCSV;
|
|
217
220
|
};
|
|
218
221
|
pdf: {
|
|
219
222
|
exportUnpaidOrdersReportPDF: typeof pdfExportEndpoints.getModule.exportUnpaidOrdersReportPDF;
|
|
@@ -226,5 +229,8 @@ export interface WashdayClientInstance {
|
|
|
226
229
|
getSuppliesReport: typeof reportsExportEndpoints.getModule.getSuppliesReport;
|
|
227
230
|
getDiscountCodesReport: typeof reportsExportEndpoints.getModule.getDiscountCodesReport;
|
|
228
231
|
getStaffReport: typeof reportsExportEndpoints.getModule.getStaffReport;
|
|
232
|
+
getProductSalesReport: typeof reportsExportEndpoints.getModule.getProductSalesReport;
|
|
233
|
+
getPaymentLinesReport: typeof reportsExportEndpoints.getModule.getPaymentLinesReport;
|
|
234
|
+
getUnpaidOrdersReport: typeof reportsExportEndpoints.getModule.getUnpaidOrdersReport;
|
|
229
235
|
};
|
|
230
236
|
}
|