washday-sdk 1.6.41 → 1.6.42
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 +20 -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 +23 -0
- package/src/interfaces/Api.ts +2 -0
- package/src/interfaces/Product.ts +4 -3
package/dist/api/csv/get.js
CHANGED
|
@@ -429,3 +429,30 @@ export const exportScheduledDeliveriesReport = function (companyId, params) {
|
|
|
429
429
|
}
|
|
430
430
|
});
|
|
431
431
|
};
|
|
432
|
+
export const exportServicesToDeliverReport = function (companyId, params) {
|
|
433
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
434
|
+
try {
|
|
435
|
+
const config = {
|
|
436
|
+
headers: {
|
|
437
|
+
Authorization: `Bearer ${this.apiToken}`,
|
|
438
|
+
'Content-Type': 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
|
439
|
+
'Content-disposition': 'attachment; filename=[file.xlsx]'
|
|
440
|
+
},
|
|
441
|
+
params: {
|
|
442
|
+
responseType: 'blob'
|
|
443
|
+
}
|
|
444
|
+
};
|
|
445
|
+
const queryParams = generateQueryParamsStr([
|
|
446
|
+
'storeId',
|
|
447
|
+
'dateFrom',
|
|
448
|
+
'dateTo',
|
|
449
|
+
'hideReady'
|
|
450
|
+
], params);
|
|
451
|
+
return yield this.axiosInstance.get(`${GET_SET_REPORTS}/${companyId}/servicesToDeliver/export/csv?${queryParams}`, config);
|
|
452
|
+
}
|
|
453
|
+
catch (error) {
|
|
454
|
+
console.error('Error fetching exportServicesToDeliverReport:', error);
|
|
455
|
+
throw error;
|
|
456
|
+
}
|
|
457
|
+
});
|
|
458
|
+
};
|
package/dist/api/index.js
CHANGED
|
@@ -308,6 +308,7 @@ const WashdayClient = function WashdayClient(apiToken, env = 'PROD', clientId, c
|
|
|
308
308
|
exportAttendanceReport: csvExportEndpoints.getModule.exportAttendanceReport,
|
|
309
309
|
exportCashUpReportsByDateRange: csvExportEndpoints.getModule.exportCashUpReportsByDateRange,
|
|
310
310
|
exportScheduledDeliveriesReport: csvExportEndpoints.getModule.exportScheduledDeliveriesReport,
|
|
311
|
+
exportServicesToDeliverReport: csvExportEndpoints.getModule.exportServicesToDeliverReport,
|
|
311
312
|
});
|
|
312
313
|
this.pdf = bindMethods(this, {
|
|
313
314
|
exportUnpaidOrdersReportPDF: pdfExportEndpoints.getModule.exportUnpaidOrdersReportPDF,
|
|
@@ -327,6 +328,7 @@ const WashdayClient = function WashdayClient(apiToken, env = 'PROD', clientId, c
|
|
|
327
328
|
getCashierBoxMovementsReport: reportsExportEndpoints.getModule.getCashierBoxMovementsReport,
|
|
328
329
|
getUnpaidOrdersReport: reportsExportEndpoints.getModule.getUnpaidOrdersReport,
|
|
329
330
|
getScheduledDeliveries: reportsExportEndpoints.getModule.getScheduledDeliveries,
|
|
331
|
+
getServicesToDeliver: reportsExportEndpoints.getModule.getServicesToDeliver,
|
|
330
332
|
getAnnualSalesStatistics: reportsExportEndpoints.getModule.getAnnualSalesStatistics,
|
|
331
333
|
getPaymentMethodStatistics: reportsExportEndpoints.getModule.getPaymentMethodStatistics,
|
|
332
334
|
getProductsStatistics: reportsExportEndpoints.getModule.getProductsStatistics,
|
package/dist/api/reports/get.js
CHANGED
|
@@ -432,3 +432,23 @@ export const getScheduledDeliveries = function (companyId, params) {
|
|
|
432
432
|
}
|
|
433
433
|
});
|
|
434
434
|
};
|
|
435
|
+
export const getServicesToDeliver = function (companyId, params) {
|
|
436
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
437
|
+
try {
|
|
438
|
+
const config = {
|
|
439
|
+
headers: { Authorization: `Bearer ${this.apiToken}` }
|
|
440
|
+
};
|
|
441
|
+
const queryParams = generateQueryParamsStr([
|
|
442
|
+
'storeId',
|
|
443
|
+
'dateFrom',
|
|
444
|
+
'dateTo',
|
|
445
|
+
'hideReady',
|
|
446
|
+
], params);
|
|
447
|
+
return yield this.axiosInstance.get(`${GET_SET_REPORTS}/${companyId}/servicesToDeliver?${queryParams}`, config);
|
|
448
|
+
}
|
|
449
|
+
catch (error) {
|
|
450
|
+
console.error('Error fetching getServicesToDeliver:', error);
|
|
451
|
+
throw error;
|
|
452
|
+
}
|
|
453
|
+
});
|
|
454
|
+
};
|
package/package.json
CHANGED
package/src/api/csv/get.ts
CHANGED
|
@@ -470,3 +470,33 @@ export const exportScheduledDeliveriesReport = async function (this: WashdayClie
|
|
|
470
470
|
throw error;
|
|
471
471
|
}
|
|
472
472
|
};
|
|
473
|
+
|
|
474
|
+
export const exportServicesToDeliverReport = async function (this: WashdayClientInstance, companyId: string, params: {
|
|
475
|
+
storeId?: string
|
|
476
|
+
dateFrom?: string
|
|
477
|
+
dateTo?: string
|
|
478
|
+
hideReady?: string
|
|
479
|
+
}): Promise<any> {
|
|
480
|
+
try {
|
|
481
|
+
const config = {
|
|
482
|
+
headers: {
|
|
483
|
+
Authorization: `Bearer ${this.apiToken}`,
|
|
484
|
+
'Content-Type': 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
|
485
|
+
'Content-disposition': 'attachment; filename=[file.xlsx]'
|
|
486
|
+
},
|
|
487
|
+
params: {
|
|
488
|
+
responseType: 'blob'
|
|
489
|
+
}
|
|
490
|
+
};
|
|
491
|
+
const queryParams = generateQueryParamsStr([
|
|
492
|
+
'storeId',
|
|
493
|
+
'dateFrom',
|
|
494
|
+
'dateTo',
|
|
495
|
+
'hideReady'
|
|
496
|
+
], params);
|
|
497
|
+
return await this.axiosInstance.get(`${GET_SET_REPORTS}/${companyId}/servicesToDeliver/export/csv?${queryParams}`, config);
|
|
498
|
+
} catch (error) {
|
|
499
|
+
console.error('Error fetching exportServicesToDeliverReport:', error);
|
|
500
|
+
throw error;
|
|
501
|
+
}
|
|
502
|
+
};
|
package/src/api/index.ts
CHANGED
|
@@ -315,6 +315,7 @@ const WashdayClient: WashdayClientConstructor = function WashdayClient(this: Was
|
|
|
315
315
|
exportAttendanceReport: csvExportEndpoints.getModule.exportAttendanceReport,
|
|
316
316
|
exportCashUpReportsByDateRange: csvExportEndpoints.getModule.exportCashUpReportsByDateRange,
|
|
317
317
|
exportScheduledDeliveriesReport: csvExportEndpoints.getModule.exportScheduledDeliveriesReport,
|
|
318
|
+
exportServicesToDeliverReport: csvExportEndpoints.getModule.exportServicesToDeliverReport,
|
|
318
319
|
});
|
|
319
320
|
this.pdf = bindMethods(this, {
|
|
320
321
|
exportUnpaidOrdersReportPDF: pdfExportEndpoints.getModule.exportUnpaidOrdersReportPDF,
|
|
@@ -334,6 +335,7 @@ const WashdayClient: WashdayClientConstructor = function WashdayClient(this: Was
|
|
|
334
335
|
getCashierBoxMovementsReport: reportsExportEndpoints.getModule.getCashierBoxMovementsReport,
|
|
335
336
|
getUnpaidOrdersReport: reportsExportEndpoints.getModule.getUnpaidOrdersReport,
|
|
336
337
|
getScheduledDeliveries: reportsExportEndpoints.getModule.getScheduledDeliveries,
|
|
338
|
+
getServicesToDeliver: reportsExportEndpoints.getModule.getServicesToDeliver,
|
|
337
339
|
getAnnualSalesStatistics: reportsExportEndpoints.getModule.getAnnualSalesStatistics,
|
|
338
340
|
getPaymentMethodStatistics: reportsExportEndpoints.getModule.getPaymentMethodStatistics,
|
|
339
341
|
getProductsStatistics: reportsExportEndpoints.getModule.getProductsStatistics,
|
package/src/api/reports/get.ts
CHANGED
|
@@ -484,3 +484,26 @@ export const getScheduledDeliveries = async function (this: WashdayClientInstanc
|
|
|
484
484
|
throw error;
|
|
485
485
|
}
|
|
486
486
|
};
|
|
487
|
+
|
|
488
|
+
export const getServicesToDeliver = async function (this: WashdayClientInstance, companyId: string, params: {
|
|
489
|
+
storeId?: string
|
|
490
|
+
dateFrom?: string
|
|
491
|
+
dateTo?: string
|
|
492
|
+
hideReady?: string
|
|
493
|
+
}): Promise<any> {
|
|
494
|
+
try {
|
|
495
|
+
const config = {
|
|
496
|
+
headers: { Authorization: `Bearer ${this.apiToken}` }
|
|
497
|
+
};
|
|
498
|
+
const queryParams = generateQueryParamsStr([
|
|
499
|
+
'storeId',
|
|
500
|
+
'dateFrom',
|
|
501
|
+
'dateTo',
|
|
502
|
+
'hideReady',
|
|
503
|
+
], params);
|
|
504
|
+
return await this.axiosInstance.get(`${GET_SET_REPORTS}/${companyId}/servicesToDeliver?${queryParams}`, config);
|
|
505
|
+
} catch (error) {
|
|
506
|
+
console.error('Error fetching getServicesToDeliver:', error);
|
|
507
|
+
throw error;
|
|
508
|
+
}
|
|
509
|
+
};
|
package/src/interfaces/Api.ts
CHANGED
|
@@ -294,6 +294,7 @@ export interface WashdayClientInstance {
|
|
|
294
294
|
exportUnpaidOrdersReportCSV: typeof csvExportEndpoints.getModule.exportUnpaidOrdersReportCSV;
|
|
295
295
|
exportCashUpReportsByDateRange: typeof csvExportEndpoints.getModule.exportCashUpReportsByDateRange;
|
|
296
296
|
exportScheduledDeliveriesReport: typeof csvExportEndpoints.getModule.exportScheduledDeliveriesReport;
|
|
297
|
+
exportServicesToDeliverReport: typeof csvExportEndpoints.getModule.exportServicesToDeliverReport;
|
|
297
298
|
exportOrdersList: typeof csvExportEndpoints.getModule.exportOrdersList,
|
|
298
299
|
exportProductsList: typeof csvExportEndpoints.getModule.exportProductsList,
|
|
299
300
|
exportCleanedOrdersReport: typeof csvExportEndpoints.getModule.exportCleanedOrdersReport,
|
|
@@ -319,6 +320,7 @@ export interface WashdayClientInstance {
|
|
|
319
320
|
getCashierBoxMovementsReport: typeof reportsExportEndpoints.getModule.getCashierBoxMovementsReport;
|
|
320
321
|
getUnpaidOrdersReport: typeof reportsExportEndpoints.getModule.getUnpaidOrdersReport;
|
|
321
322
|
getScheduledDeliveries: typeof reportsExportEndpoints.getModule.getScheduledDeliveries;
|
|
323
|
+
getServicesToDeliver: typeof reportsExportEndpoints.getModule.getServicesToDeliver;
|
|
322
324
|
getAnnualSalesStatistics: typeof reportsExportEndpoints.getModule.getAnnualSalesStatistics;
|
|
323
325
|
getPaymentMethodStatistics: typeof reportsExportEndpoints.getModule.getPaymentMethodStatistics;
|
|
324
326
|
getProductsStatistics: typeof reportsExportEndpoints.getModule.getProductsStatistics;
|
|
@@ -75,12 +75,13 @@ export interface IOrderProduct extends IProduct {
|
|
|
75
75
|
|
|
76
76
|
// Operational line-level status fields (added 2026-04-04)
|
|
77
77
|
status?: OrderProductLineStatus,
|
|
78
|
-
cleanedDateTime?: Date | null,
|
|
79
|
-
readyDateTime?: Date | null,
|
|
78
|
+
cleanedDateTime?: Date | null, // set on → ready (cleaning completed)
|
|
79
|
+
readyDateTime?: Date | null, // set on → ready; currently always equals cleanedDateTime
|
|
80
80
|
collectedDateTime?: Date | null,
|
|
81
81
|
uncollectedDateTime?: Date | null,
|
|
82
82
|
cancelledDateTime?: Date | null,
|
|
83
|
-
|
|
83
|
+
markedCleaningBy?: IUser | string | null, // who sent the line to cleaning (→ cleaning)
|
|
84
|
+
markedCleanedBy?: IUser | string | null, // who confirmed cleaning complete (→ ready)
|
|
84
85
|
markedReadyBy?: IUser | string | null,
|
|
85
86
|
markedCollectedBy?: IUser | string | null,
|
|
86
87
|
markedUncollectedBy?: IUser | string | null,
|