washday-sdk 1.1.7 → 1.1.9
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
CHANGED
|
@@ -25,7 +25,7 @@ export const exportCustomersList = function (params) {
|
|
|
25
25
|
responseType: 'blob'
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
|
-
const queryParams = generateQueryParamsStr(['searchTerm', 'name', 'phone', 'email', 'fromDate', 'toDate', 'limit', 'pageNum'], params);
|
|
28
|
+
const queryParams = generateQueryParamsStr(['searchTerm', 'name', 'phone', 'email', 'fromDate', 'toDate', 'limit', 'pageNum', 'createdIn'], params);
|
|
29
29
|
return yield axiosInstance.get(`${GENERATE_EXPORT}/export-all-customers?${queryParams}`, config);
|
|
30
30
|
}
|
|
31
31
|
catch (error) {
|
|
@@ -30,7 +30,7 @@ export const bulkCreate = function (storeId, data) {
|
|
|
30
30
|
const config = {
|
|
31
31
|
headers: { Authorization: `Bearer ${this.apiToken}`, 'Content-Type': false }
|
|
32
32
|
};
|
|
33
|
-
const response = yield axiosInstance.post(`${GET_SET_CUSTOMERS}/bulk`,
|
|
33
|
+
const response = yield axiosInstance.post(`${GET_SET_CUSTOMERS}/bulk`, data, config);
|
|
34
34
|
return response.data || {};
|
|
35
35
|
}
|
|
36
36
|
catch (error) {
|
package/package.json
CHANGED
package/src/api/csv/get.ts
CHANGED
|
@@ -15,6 +15,7 @@ export const exportCustomersList = async function (this: WashdayClientInstance,
|
|
|
15
15
|
toDate?: string
|
|
16
16
|
limit: string
|
|
17
17
|
pageNum: string
|
|
18
|
+
createdIn?: string
|
|
18
19
|
}): Promise<any> {
|
|
19
20
|
try {
|
|
20
21
|
const config = {
|
|
@@ -27,7 +28,7 @@ export const exportCustomersList = async function (this: WashdayClientInstance,
|
|
|
27
28
|
responseType: 'blob'
|
|
28
29
|
}
|
|
29
30
|
};
|
|
30
|
-
const queryParams = generateQueryParamsStr(['searchTerm', 'name', 'phone', 'email', 'fromDate', 'toDate', 'limit', 'pageNum'], params)
|
|
31
|
+
const queryParams = generateQueryParamsStr(['searchTerm', 'name', 'phone', 'email', 'fromDate', 'toDate', 'limit', 'pageNum', 'createdIn'], params)
|
|
31
32
|
return await axiosInstance.get(`${GENERATE_EXPORT}/export-all-customers?${queryParams}`, config);
|
|
32
33
|
} catch (error) {
|
|
33
34
|
console.error('Error fetching exportCustomersList:', error);
|
|
@@ -40,10 +40,7 @@ export const bulkCreate = async function (this: WashdayClientInstance, storeId:
|
|
|
40
40
|
const config = {
|
|
41
41
|
headers: { Authorization: `Bearer ${this.apiToken}`, 'Content-Type': false }
|
|
42
42
|
};
|
|
43
|
-
const response = await axiosInstance.post(`${GET_SET_CUSTOMERS}/bulk`,
|
|
44
|
-
...data,
|
|
45
|
-
createdIn: storeId
|
|
46
|
-
}, config);
|
|
43
|
+
const response = await axiosInstance.post(`${GET_SET_CUSTOMERS}/bulk`, data, config);
|
|
47
44
|
return response.data || {}
|
|
48
45
|
} catch (error) {
|
|
49
46
|
console.error('Error fetching customers bulkCreate:', error);
|