washday-sdk 1.6.72 → 1.6.73

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/index.js CHANGED
@@ -356,6 +356,7 @@ const WashdayClient = function WashdayClient(apiToken, env = 'PROD', clientId, c
356
356
  getSuppliesReport: reportsExportEndpoints.getModule.getSuppliesReport,
357
357
  getDiscountCodesReport: reportsExportEndpoints.getModule.getDiscountCodesReport,
358
358
  getStaffReport: reportsExportEndpoints.getModule.getStaffReport,
359
+ getStaffActivityDetails: reportsExportEndpoints.getModule.getStaffActivityDetails,
359
360
  getProductSalesReport: reportsExportEndpoints.getModule.getProductSalesReport,
360
361
  getProductSalesDrillDown: reportsExportEndpoints.getModule.getProductSalesDrillDown,
361
362
  getPaymentLinesReport: reportsExportEndpoints.getModule.getPaymentLinesReport,
@@ -145,6 +145,25 @@ export const getStaffReport = function (storeId, params) {
145
145
  }
146
146
  });
147
147
  };
148
+ export const getStaffActivityDetails = function (storeId, params) {
149
+ return __awaiter(this, void 0, void 0, function* () {
150
+ try {
151
+ const config = {
152
+ headers: { Authorization: `Bearer ${this.apiToken}` }
153
+ };
154
+ const queryParams = generateQueryParamsStr([
155
+ 'fromDate',
156
+ 'toDate',
157
+ 'employeeId',
158
+ ], params);
159
+ return yield this.axiosInstance.get(`${GET_SET_REPORTS}/${storeId}/staff/details?${queryParams}`, config);
160
+ }
161
+ catch (error) {
162
+ console.error('Error fetching getStaffActivityDetails:', error);
163
+ throw error;
164
+ }
165
+ });
166
+ };
148
167
  export const getProductSalesReport = function (storeId, params) {
149
168
  return __awaiter(this, void 0, void 0, function* () {
150
169
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "washday-sdk",
3
- "version": "1.6.72",
3
+ "version": "1.6.73",
4
4
  "description": "Washday utilities functions and API",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
package/src/api/index.ts CHANGED
@@ -363,6 +363,7 @@ const WashdayClient: WashdayClientConstructor = function WashdayClient(this: Was
363
363
  getSuppliesReport: reportsExportEndpoints.getModule.getSuppliesReport,
364
364
  getDiscountCodesReport: reportsExportEndpoints.getModule.getDiscountCodesReport,
365
365
  getStaffReport: reportsExportEndpoints.getModule.getStaffReport,
366
+ getStaffActivityDetails: reportsExportEndpoints.getModule.getStaffActivityDetails,
366
367
  getProductSalesReport: reportsExportEndpoints.getModule.getProductSalesReport,
367
368
  getProductSalesDrillDown: reportsExportEndpoints.getModule.getProductSalesDrillDown,
368
369
  getPaymentLinesReport: reportsExportEndpoints.getModule.getPaymentLinesReport,
@@ -154,6 +154,27 @@ export const getStaffReport = async function (this: WashdayClientInstance, store
154
154
  }
155
155
  };
156
156
 
157
+ export const getStaffActivityDetails = async function (this: WashdayClientInstance, storeId: string, params: {
158
+ fromDate?: string
159
+ toDate?: string
160
+ employeeId?: string
161
+ }): Promise<any> {
162
+ try {
163
+ const config = {
164
+ headers: { Authorization: `Bearer ${this.apiToken}` }
165
+ };
166
+ const queryParams = generateQueryParamsStr([
167
+ 'fromDate',
168
+ 'toDate',
169
+ 'employeeId',
170
+ ], params);
171
+ return await this.axiosInstance.get(`${GET_SET_REPORTS}/${storeId}/staff/details?${queryParams}`, config);
172
+ } catch (error) {
173
+ console.error('Error fetching getStaffActivityDetails:', error);
174
+ throw error;
175
+ }
176
+ };
177
+
157
178
  export const getProductSalesReport = async function (this: WashdayClientInstance, storeId: string, params: {
158
179
  fromDate?: string
159
180
  toDate?: string
@@ -348,6 +348,7 @@ export interface WashdayClientInstance {
348
348
  getSuppliesReport: typeof reportsExportEndpoints.getModule.getSuppliesReport;
349
349
  getDiscountCodesReport: typeof reportsExportEndpoints.getModule.getDiscountCodesReport;
350
350
  getStaffReport: typeof reportsExportEndpoints.getModule.getStaffReport;
351
+ getStaffActivityDetails: typeof reportsExportEndpoints.getModule.getStaffActivityDetails;
351
352
  getProductSalesReport: typeof reportsExportEndpoints.getModule.getProductSalesReport;
352
353
  getProductSalesDrillDown: typeof reportsExportEndpoints.getModule.getProductSalesDrillDown;
353
354
  getPaymentLinesReport: typeof reportsExportEndpoints.getModule.getPaymentLinesReport;