washday-sdk 1.1.8 → 1.1.10

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.
@@ -24,9 +24,9 @@ export const getList = function (params, options) {
24
24
  catch (error) {
25
25
  if (error instanceof Error && (error.name === 'AbortError' || error.name === 'CanceledError')) {
26
26
  console.log('Request was cancelled');
27
- throw new Error('Request cancelled');
27
+ throw error;
28
28
  }
29
- console.error('Error fetching customers:', error);
29
+ console.error('Washday SDK - Error fetching customers:', error);
30
30
  throw error;
31
31
  }
32
32
  });
@@ -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`, Object.assign(Object.assign({}, data), { createdIn: storeId }), config);
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "washday-sdk",
3
- "version": "1.1.8",
3
+ "version": "1.1.10",
4
4
  "description": "Washday utilities functions and API",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -29,9 +29,9 @@ export const getList = async function (this: WashdayClientInstance, params: {
29
29
  } catch (error) {
30
30
  if (error instanceof Error && (error.name === 'AbortError' || error.name === 'CanceledError')) {
31
31
  console.log('Request was cancelled');
32
- throw new Error('Request cancelled');
32
+ throw error;
33
33
  }
34
- console.error('Error fetching customers:', error);
34
+ console.error('Washday SDK - Error fetching customers:', error);
35
35
  throw error;
36
36
  }
37
37
  };
@@ -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);