washday-sdk 1.6.21 → 1.6.23
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 +27 -0
- package/dist/api/index.js +2 -0
- package/dist/api/reports/get.js +22 -0
- package/package.json +1 -1
- package/src/api/csv/get.ts +30 -0
- package/src/api/index.ts +2 -0
- package/src/api/reports/get.ts +27 -0
- package/src/interfaces/Api.ts +2 -0
- package/src/interfaces/Store.ts +1 -0
package/dist/api/csv/get.js
CHANGED
|
@@ -294,6 +294,33 @@ export const exportPaymentLinesReport = function (storeId, params) {
|
|
|
294
294
|
}
|
|
295
295
|
});
|
|
296
296
|
};
|
|
297
|
+
export const exportCashierBoxMovementsReport = 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
|
+
'cashierBoxId',
|
|
312
|
+
'fromDate',
|
|
313
|
+
'toDate',
|
|
314
|
+
'timezone'
|
|
315
|
+
], params);
|
|
316
|
+
return yield this.axiosInstance.get(`${GET_SET_REPORTS}/${storeId}/cashierBoxMovements/export?${queryParams}`, config);
|
|
317
|
+
}
|
|
318
|
+
catch (error) {
|
|
319
|
+
console.error('Error fetching exportCashierBoxMovementsReport:', error);
|
|
320
|
+
throw error;
|
|
321
|
+
}
|
|
322
|
+
});
|
|
323
|
+
};
|
|
297
324
|
export const exportCashUpReportsByDateRange = function (storeId, params) {
|
|
298
325
|
return __awaiter(this, void 0, void 0, function* () {
|
|
299
326
|
try {
|
package/dist/api/index.js
CHANGED
|
@@ -294,6 +294,7 @@ const WashdayClient = function WashdayClient(apiToken, env = 'PROD', clientId, c
|
|
|
294
294
|
exportStaffReport: csvExportEndpoints.getModule.exportStaffReport,
|
|
295
295
|
exportProductSalesReport: csvExportEndpoints.getModule.exportProductSalesReport,
|
|
296
296
|
exportPaymentLinesReport: csvExportEndpoints.getModule.exportPaymentLinesReport,
|
|
297
|
+
exportCashierBoxMovementsReport: csvExportEndpoints.getModule.exportCashierBoxMovementsReport,
|
|
297
298
|
exportUnpaidOrdersReportCSV: csvExportEndpoints.getModule.exportUnpaidOrdersReportCSV,
|
|
298
299
|
exportAttendanceReport: csvExportEndpoints.getModule.exportAttendanceReport,
|
|
299
300
|
exportCashUpReportsByDateRange: csvExportEndpoints.getModule.exportCashUpReportsByDateRange,
|
|
@@ -313,6 +314,7 @@ const WashdayClient = function WashdayClient(apiToken, env = 'PROD', clientId, c
|
|
|
313
314
|
getStaffReport: reportsExportEndpoints.getModule.getStaffReport,
|
|
314
315
|
getProductSalesReport: reportsExportEndpoints.getModule.getProductSalesReport,
|
|
315
316
|
getPaymentLinesReport: reportsExportEndpoints.getModule.getPaymentLinesReport,
|
|
317
|
+
getCashierBoxMovementsReport: reportsExportEndpoints.getModule.getCashierBoxMovementsReport,
|
|
316
318
|
getUnpaidOrdersReport: reportsExportEndpoints.getModule.getUnpaidOrdersReport,
|
|
317
319
|
getScheduledDeliveries: reportsExportEndpoints.getModule.getScheduledDeliveries,
|
|
318
320
|
getAnnualSalesStatistics: reportsExportEndpoints.getModule.getAnnualSalesStatistics,
|
package/dist/api/reports/get.js
CHANGED
|
@@ -183,6 +183,28 @@ export const getPaymentLinesReport = function (storeId, params) {
|
|
|
183
183
|
}
|
|
184
184
|
});
|
|
185
185
|
};
|
|
186
|
+
export const getCashierBoxMovementsReport = 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
|
+
'cashierBoxId',
|
|
194
|
+
'fromDate',
|
|
195
|
+
'toDate',
|
|
196
|
+
'pageNum',
|
|
197
|
+
'limit',
|
|
198
|
+
'timezone',
|
|
199
|
+
], params);
|
|
200
|
+
return yield this.axiosInstance.get(`${GET_SET_REPORTS}/${storeId}/cashierBoxMovements?${queryParams}`, config);
|
|
201
|
+
}
|
|
202
|
+
catch (error) {
|
|
203
|
+
console.error('Error fetching getCashierBoxMovementsReport:', error);
|
|
204
|
+
throw error;
|
|
205
|
+
}
|
|
206
|
+
});
|
|
207
|
+
};
|
|
186
208
|
export const getSupplyCostReport = function (params) {
|
|
187
209
|
return __awaiter(this, void 0, void 0, function* () {
|
|
188
210
|
try {
|
package/package.json
CHANGED
package/src/api/csv/get.ts
CHANGED
|
@@ -321,6 +321,36 @@ export const exportPaymentLinesReport = async function (this: WashdayClientInsta
|
|
|
321
321
|
}
|
|
322
322
|
};
|
|
323
323
|
|
|
324
|
+
export const exportCashierBoxMovementsReport = async function (this: WashdayClientInstance, storeId: string, params: {
|
|
325
|
+
cashierBoxId?: string
|
|
326
|
+
fromDate?: string
|
|
327
|
+
toDate?: string
|
|
328
|
+
timezone?: 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
|
+
'cashierBoxId',
|
|
343
|
+
'fromDate',
|
|
344
|
+
'toDate',
|
|
345
|
+
'timezone'
|
|
346
|
+
], params);
|
|
347
|
+
return await this.axiosInstance.get(`${GET_SET_REPORTS}/${storeId}/cashierBoxMovements/export?${queryParams}`, config);
|
|
348
|
+
} catch (error) {
|
|
349
|
+
console.error('Error fetching exportCashierBoxMovementsReport:', error);
|
|
350
|
+
throw error;
|
|
351
|
+
}
|
|
352
|
+
};
|
|
353
|
+
|
|
324
354
|
export const exportCashUpReportsByDateRange = async function (this: WashdayClientInstance, storeId: string, params: {
|
|
325
355
|
fromDate?: string
|
|
326
356
|
toDate?: string
|
package/src/api/index.ts
CHANGED
|
@@ -301,6 +301,7 @@ const WashdayClient: WashdayClientConstructor = function WashdayClient(this: Was
|
|
|
301
301
|
exportStaffReport: csvExportEndpoints.getModule.exportStaffReport,
|
|
302
302
|
exportProductSalesReport: csvExportEndpoints.getModule.exportProductSalesReport,
|
|
303
303
|
exportPaymentLinesReport: csvExportEndpoints.getModule.exportPaymentLinesReport,
|
|
304
|
+
exportCashierBoxMovementsReport: csvExportEndpoints.getModule.exportCashierBoxMovementsReport,
|
|
304
305
|
exportUnpaidOrdersReportCSV: csvExportEndpoints.getModule.exportUnpaidOrdersReportCSV,
|
|
305
306
|
exportAttendanceReport: csvExportEndpoints.getModule.exportAttendanceReport,
|
|
306
307
|
exportCashUpReportsByDateRange: csvExportEndpoints.getModule.exportCashUpReportsByDateRange,
|
|
@@ -320,6 +321,7 @@ const WashdayClient: WashdayClientConstructor = function WashdayClient(this: Was
|
|
|
320
321
|
getStaffReport: reportsExportEndpoints.getModule.getStaffReport,
|
|
321
322
|
getProductSalesReport: reportsExportEndpoints.getModule.getProductSalesReport,
|
|
322
323
|
getPaymentLinesReport: reportsExportEndpoints.getModule.getPaymentLinesReport,
|
|
324
|
+
getCashierBoxMovementsReport: reportsExportEndpoints.getModule.getCashierBoxMovementsReport,
|
|
323
325
|
getUnpaidOrdersReport: reportsExportEndpoints.getModule.getUnpaidOrdersReport,
|
|
324
326
|
getScheduledDeliveries: reportsExportEndpoints.getModule.getScheduledDeliveries,
|
|
325
327
|
getAnnualSalesStatistics: reportsExportEndpoints.getModule.getAnnualSalesStatistics,
|
package/src/api/reports/get.ts
CHANGED
|
@@ -196,6 +196,33 @@ export const getPaymentLinesReport = async function (this: WashdayClientInstance
|
|
|
196
196
|
}
|
|
197
197
|
};
|
|
198
198
|
|
|
199
|
+
export const getCashierBoxMovementsReport = async function (this: WashdayClientInstance, storeId: string, params: {
|
|
200
|
+
cashierBoxId?: string
|
|
201
|
+
fromDate?: string
|
|
202
|
+
toDate?: string
|
|
203
|
+
timezone?: string
|
|
204
|
+
pageNum?: string
|
|
205
|
+
limit?: string
|
|
206
|
+
}): Promise<any> {
|
|
207
|
+
try {
|
|
208
|
+
const config = {
|
|
209
|
+
headers: { Authorization: `Bearer ${this.apiToken}` }
|
|
210
|
+
};
|
|
211
|
+
const queryParams = generateQueryParamsStr([
|
|
212
|
+
'cashierBoxId',
|
|
213
|
+
'fromDate',
|
|
214
|
+
'toDate',
|
|
215
|
+
'pageNum',
|
|
216
|
+
'limit',
|
|
217
|
+
'timezone',
|
|
218
|
+
], params);
|
|
219
|
+
return await this.axiosInstance.get(`${GET_SET_REPORTS}/${storeId}/cashierBoxMovements?${queryParams}`, config);
|
|
220
|
+
} catch (error) {
|
|
221
|
+
console.error('Error fetching getCashierBoxMovementsReport:', error);
|
|
222
|
+
throw error;
|
|
223
|
+
}
|
|
224
|
+
};
|
|
225
|
+
|
|
199
226
|
export const getSupplyCostReport = async function (this: WashdayClientInstance, params: {
|
|
200
227
|
store?: string; // store id or "all"
|
|
201
228
|
fromDate?: string;
|
package/src/interfaces/Api.ts
CHANGED
|
@@ -281,6 +281,7 @@ export interface WashdayClientInstance {
|
|
|
281
281
|
exportDiscountCodesReport: typeof csvExportEndpoints.getModule.exportDiscountCodesReport;
|
|
282
282
|
exportProductSalesReport: typeof csvExportEndpoints.getModule.exportProductSalesReport;
|
|
283
283
|
exportPaymentLinesReport: typeof csvExportEndpoints.getModule.exportPaymentLinesReport;
|
|
284
|
+
exportCashierBoxMovementsReport: typeof csvExportEndpoints.getModule.exportCashierBoxMovementsReport;
|
|
284
285
|
exportUnpaidOrdersReportCSV: typeof csvExportEndpoints.getModule.exportUnpaidOrdersReportCSV;
|
|
285
286
|
exportCashUpReportsByDateRange: typeof csvExportEndpoints.getModule.exportCashUpReportsByDateRange;
|
|
286
287
|
exportScheduledDeliveriesReport: typeof csvExportEndpoints.getModule.exportScheduledDeliveriesReport;
|
|
@@ -305,6 +306,7 @@ export interface WashdayClientInstance {
|
|
|
305
306
|
getStaffReport: typeof reportsExportEndpoints.getModule.getStaffReport;
|
|
306
307
|
getProductSalesReport: typeof reportsExportEndpoints.getModule.getProductSalesReport;
|
|
307
308
|
getPaymentLinesReport: typeof reportsExportEndpoints.getModule.getPaymentLinesReport;
|
|
309
|
+
getCashierBoxMovementsReport: typeof reportsExportEndpoints.getModule.getCashierBoxMovementsReport;
|
|
308
310
|
getUnpaidOrdersReport: typeof reportsExportEndpoints.getModule.getUnpaidOrdersReport;
|
|
309
311
|
getScheduledDeliveries: typeof reportsExportEndpoints.getModule.getScheduledDeliveries;
|
|
310
312
|
getAnnualSalesStatistics: typeof reportsExportEndpoints.getModule.getAnnualSalesStatistics;
|
package/src/interfaces/Store.ts
CHANGED
|
@@ -77,6 +77,7 @@ export interface IStore {
|
|
|
77
77
|
cashierBoxes?: ICashierBox,
|
|
78
78
|
ticketStructure?: ITicketStructure | null,
|
|
79
79
|
ticketForLaundryStructure?: ITicketForLaundryStructure | null,
|
|
80
|
+
ticketScanMode?: 'order' | 'customer',
|
|
80
81
|
storeDiscounts: IStoreDiscount | null,
|
|
81
82
|
discountCodes: IDiscountCode | null,
|
|
82
83
|
marketingConfig: IMarketingConfig,
|