washday-sdk 1.2.0 → 1.2.1

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.
Files changed (65) hide show
  1. package/dist/api/cashierbox/get.js +3 -4
  2. package/dist/api/cashierbox/post.js +2 -3
  3. package/dist/api/cashierbox/put.js +2 -3
  4. package/dist/api/companies/get.js +1 -2
  5. package/dist/api/companies/post.js +2 -3
  6. package/dist/api/companies/put.js +3 -4
  7. package/dist/api/countries/get.js +1 -2
  8. package/dist/api/customers/get.js +2 -3
  9. package/dist/api/customers/post.js +2 -3
  10. package/dist/api/customers/put.js +1 -1
  11. package/dist/api/inventory/delete.js +1 -2
  12. package/dist/api/inventory/get.js +2 -3
  13. package/dist/api/inventory/post.js +1 -2
  14. package/dist/api/inventory/put.js +2 -3
  15. package/dist/api/products/delete.js +1 -2
  16. package/dist/api/products/post.js +4 -5
  17. package/dist/api/products/put.js +2 -3
  18. package/dist/api/sections/post.js +1 -2
  19. package/dist/api/staff/delete.js +1 -2
  20. package/dist/api/staff/get.js +1 -2
  21. package/dist/api/staff/post.js +1 -2
  22. package/dist/api/staff/put.js +1 -2
  23. package/dist/api/stores/get.js +6 -7
  24. package/dist/api/stores/post.js +3 -4
  25. package/dist/api/stores/put.js +2 -3
  26. package/dist/api/stripe/post.js +3 -4
  27. package/dist/api/supplies/delete.js +1 -2
  28. package/dist/api/supplies/get.js +2 -3
  29. package/dist/api/supplies/post.js +1 -2
  30. package/dist/api/supplies/put.js +2 -3
  31. package/dist/api/users/delete.js +1 -2
  32. package/dist/api/users/put.js +1 -2
  33. package/package.json +1 -1
  34. package/src/api/cashierbox/get.ts +3 -3
  35. package/src/api/cashierbox/post.ts +2 -2
  36. package/src/api/cashierbox/put.ts +2 -2
  37. package/src/api/companies/get.ts +1 -1
  38. package/src/api/companies/post.ts +2 -2
  39. package/src/api/companies/put.ts +3 -3
  40. package/src/api/countries/get.ts +1 -1
  41. package/src/api/customers/get.ts +2 -2
  42. package/src/api/customers/post.ts +2 -2
  43. package/src/api/customers/put.ts +1 -1
  44. package/src/api/inventory/delete.ts +1 -1
  45. package/src/api/inventory/get.ts +2 -2
  46. package/src/api/inventory/post.ts +1 -1
  47. package/src/api/inventory/put.ts +2 -2
  48. package/src/api/products/delete.ts +1 -1
  49. package/src/api/products/post.ts +4 -4
  50. package/src/api/products/put.ts +2 -2
  51. package/src/api/sections/post.ts +1 -1
  52. package/src/api/staff/delete.ts +1 -1
  53. package/src/api/staff/get.ts +1 -1
  54. package/src/api/staff/post.ts +1 -1
  55. package/src/api/staff/put.ts +1 -1
  56. package/src/api/stores/get.ts +6 -6
  57. package/src/api/stores/post.ts +3 -3
  58. package/src/api/stores/put.ts +2 -2
  59. package/src/api/stripe/post.ts +3 -3
  60. package/src/api/supplies/delete.ts +1 -1
  61. package/src/api/supplies/get.ts +2 -2
  62. package/src/api/supplies/post.ts +1 -1
  63. package/src/api/supplies/put.ts +2 -2
  64. package/src/api/users/delete.ts +1 -1
  65. package/src/api/users/put.ts +1 -1
@@ -7,7 +7,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7
7
  step((generator = generator.apply(thisArg, _arguments || [])).next());
8
8
  });
9
9
  };
10
- import axiosInstance from "../axiosInstance";
11
10
  const GET_SET_CASHIER_BOX = (storeId) => `api/store/${storeId}/cashierbox`;
12
11
  export const getCashierboxesByStoreId = function (storeId, queryParams) {
13
12
  return __awaiter(this, void 0, void 0, function* () {
@@ -15,7 +14,7 @@ export const getCashierboxesByStoreId = function (storeId, queryParams) {
15
14
  const config = {
16
15
  headers: { Authorization: `Bearer ${this.apiToken}` }
17
16
  };
18
- const response = yield axiosInstance.get(`${GET_SET_CASHIER_BOX(storeId)}?${queryParams || ''}`, config);
17
+ const response = yield this.axiosInstance.get(`${GET_SET_CASHIER_BOX(storeId)}?${queryParams || ''}`, config);
19
18
  return response;
20
19
  }
21
20
  catch (error) {
@@ -30,7 +29,7 @@ export const getCashierboxesById = function (storeId, id, queryParams) {
30
29
  const config = {
31
30
  headers: { Authorization: `Bearer ${this.apiToken}` }
32
31
  };
33
- const response = yield axiosInstance.get(`${GET_SET_CASHIER_BOX(storeId)}/${id}?${queryParams}`, config);
32
+ const response = yield this.axiosInstance.get(`${GET_SET_CASHIER_BOX(storeId)}/${id}?${queryParams}`, config);
34
33
  return response;
35
34
  }
36
35
  catch (error) {
@@ -52,7 +51,7 @@ export const getCashierBoxMovementsHistory = function (storeId, id, params) {
52
51
  if (params === null || params === void 0 ? void 0 : params.hasOwnProperty('limit')) {
53
52
  queryParams += `&limit=${params === null || params === void 0 ? void 0 : params.limit}`;
54
53
  }
55
- const response = yield axiosInstance.get(`${GET_SET_CASHIER_BOX(storeId)}/${id}/history?${queryParams}`, config);
54
+ const response = yield this.axiosInstance.get(`${GET_SET_CASHIER_BOX(storeId)}/${id}/history?${queryParams}`, config);
56
55
  return response;
57
56
  }
58
57
  catch (error) {
@@ -7,7 +7,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7
7
  step((generator = generator.apply(thisArg, _arguments || [])).next());
8
8
  });
9
9
  };
10
- import axiosInstance from "../axiosInstance";
11
10
  const GET_SET_CASHIER_BOX = (storeId) => `api/store/${storeId}/cashierbox`;
12
11
  const GET_SET_CASHIER_BOX_MOVEMENT = (storeId, cashierBoxId) => `/api/store/cashierbox/movement/${storeId}/${cashierBoxId}`;
13
12
  export const createCashierBox = function (storeId, data) {
@@ -16,7 +15,7 @@ export const createCashierBox = function (storeId, data) {
16
15
  const config = {
17
16
  headers: { Authorization: `Bearer ${this.apiToken}` }
18
17
  };
19
- const response = yield axiosInstance.post(`${GET_SET_CASHIER_BOX(storeId)}`, data, config);
18
+ const response = yield this.axiosInstance.post(`${GET_SET_CASHIER_BOX(storeId)}`, data, config);
20
19
  return response;
21
20
  }
22
21
  catch (error) {
@@ -31,7 +30,7 @@ export const addCashierBoxMovement = function (storeId, id, data) {
31
30
  const config = {
32
31
  headers: { Authorization: `Bearer ${this.apiToken}` }
33
32
  };
34
- const response = yield axiosInstance.post(`${GET_SET_CASHIER_BOX(storeId)}/${id}/add-movement`, data, config);
33
+ const response = yield this.axiosInstance.post(`${GET_SET_CASHIER_BOX(storeId)}/${id}/add-movement`, data, config);
35
34
  return response;
36
35
  }
37
36
  catch (error) {
@@ -7,7 +7,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7
7
  step((generator = generator.apply(thisArg, _arguments || [])).next());
8
8
  });
9
9
  };
10
- import axiosInstance from "../axiosInstance";
11
10
  const GET_SET_CASHIER_BOX = (storeId) => `api/store/${storeId}/cashierbox`;
12
11
  const GET_SET_CASHIER_BOX_MOVEMENT = (storeId, cashierBoxId) => `/api/store/cashierbox/movement/${storeId}/${cashierBoxId}`;
13
12
  export const updateCashierBoxById = function (storeId, id, data) {
@@ -16,7 +15,7 @@ export const updateCashierBoxById = function (storeId, id, data) {
16
15
  const config = {
17
16
  headers: { Authorization: `Bearer ${this.apiToken}` }
18
17
  };
19
- const response = yield axiosInstance.put(`${GET_SET_CASHIER_BOX(storeId)}/${id}`, data, config);
18
+ const response = yield this.axiosInstance.put(`${GET_SET_CASHIER_BOX(storeId)}/${id}`, data, config);
20
19
  return response;
21
20
  }
22
21
  catch (error) {
@@ -31,7 +30,7 @@ export const updateCashierBoxMovementById = function (_a, data_1) {
31
30
  const config = {
32
31
  headers: { Authorization: `Bearer ${this.apiToken}` }
33
32
  };
34
- const response = yield axiosInstance.put(`${GET_SET_CASHIER_BOX_MOVEMENT(storeId, cashierBoxId)}/${id}`, data, config);
33
+ const response = yield this.axiosInstance.put(`${GET_SET_CASHIER_BOX_MOVEMENT(storeId, cashierBoxId)}/${id}`, data, config);
35
34
  return response;
36
35
  }
37
36
  catch (error) {
@@ -7,7 +7,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7
7
  step((generator = generator.apply(thisArg, _arguments || [])).next());
8
8
  });
9
9
  };
10
- import axiosInstance from "../axiosInstance";
11
10
  const GET_SET_COMPANIES = 'api/company';
12
11
  const REQUEST_PARAMS = {
13
12
  token: 'LOGGED_USER_TOKEN',
@@ -18,7 +17,7 @@ export const getCompanyById = function (companyId) {
18
17
  const config = {
19
18
  headers: { Authorization: `Bearer ${this.apiToken}` }
20
19
  };
21
- const response = yield axiosInstance.get(`${GET_SET_COMPANIES}/${companyId}`, config);
20
+ const response = yield this.axiosInstance.get(`${GET_SET_COMPANIES}/${companyId}`, config);
22
21
  return response;
23
22
  }
24
23
  catch (error) {
@@ -7,7 +7,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7
7
  step((generator = generator.apply(thisArg, _arguments || [])).next());
8
8
  });
9
9
  };
10
- import axiosInstance from "../axiosInstance";
11
10
  const GET_SET_COMPANIES = 'api/company';
12
11
  export const updateCompanyTaxInfoCertificates = function (companyId, data) {
13
12
  return __awaiter(this, void 0, void 0, function* () {
@@ -15,7 +14,7 @@ export const updateCompanyTaxInfoCertificates = function (companyId, data) {
15
14
  const config = {
16
15
  headers: { Authorization: `Bearer ${this.apiToken}`, 'Content-Type': false }
17
16
  };
18
- const response = yield axiosInstance.post(`${GET_SET_COMPANIES}/${companyId}/taxInfo/certificates`, data, config);
17
+ const response = yield this.axiosInstance.post(`${GET_SET_COMPANIES}/${companyId}/taxInfo/certificates`, data, config);
19
18
  return response;
20
19
  }
21
20
  catch (error) {
@@ -30,7 +29,7 @@ export const updateCFDIOrgLogo = function (companyId, data) {
30
29
  const config = {
31
30
  headers: { Authorization: `Bearer ${this.apiToken}`, 'Content-Type': false }
32
31
  };
33
- const response = yield axiosInstance.post(`${GET_SET_COMPANIES}/${companyId}/taxInfo/logo`, data, config);
32
+ const response = yield this.axiosInstance.post(`${GET_SET_COMPANIES}/${companyId}/taxInfo/logo`, data, config);
34
33
  return response;
35
34
  }
36
35
  catch (error) {
@@ -7,7 +7,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7
7
  step((generator = generator.apply(thisArg, _arguments || [])).next());
8
8
  });
9
9
  };
10
- import axiosInstance from "../axiosInstance";
11
10
  const GET_SET_COMPANIES = 'api/company';
12
11
  export const updateCompanyById = function (companyId, data) {
13
12
  return __awaiter(this, void 0, void 0, function* () {
@@ -15,7 +14,7 @@ export const updateCompanyById = function (companyId, data) {
15
14
  const config = {
16
15
  headers: { Authorization: `Bearer ${this.apiToken}` }
17
16
  };
18
- const response = yield axiosInstance.put(`${GET_SET_COMPANIES}/${companyId}`, data, config);
17
+ const response = yield this.axiosInstance.put(`${GET_SET_COMPANIES}/${companyId}`, data, config);
19
18
  return response;
20
19
  }
21
20
  catch (error) {
@@ -31,7 +30,7 @@ export const updateCompanyLogoById = function (companyId, data) {
31
30
  const config = {
32
31
  headers: { Authorization: `Bearer ${this.apiToken}`, 'Content-Type': false }
33
32
  };
34
- const response = yield axiosInstance.put(`${GET_SET_COMPANIES}/${companyId}`, data, config);
33
+ const response = yield this.axiosInstance.put(`${GET_SET_COMPANIES}/${companyId}`, data, config);
35
34
  return response;
36
35
  }
37
36
  catch (error) {
@@ -46,7 +45,7 @@ export const updateCompanyTaxInfoById = function (companyId, data) {
46
45
  const config = {
47
46
  headers: { Authorization: `Bearer ${this.apiToken}` }
48
47
  };
49
- const response = yield axiosInstance.put(`${GET_SET_COMPANIES}/${companyId}/taxInfo`, data, config);
48
+ const response = yield this.axiosInstance.put(`${GET_SET_COMPANIES}/${companyId}/taxInfo`, data, config);
50
49
  return response;
51
50
  }
52
51
  catch (error) {
@@ -7,7 +7,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7
7
  step((generator = generator.apply(thisArg, _arguments || [])).next());
8
8
  });
9
9
  };
10
- import axiosInstance from "../axiosInstance";
11
10
  const GET_SET_COUNTRIES = 'api/country';
12
11
  const REQUEST_PARAMS = {
13
12
  token: 'LOGGED_USER_TOKEN',
@@ -18,7 +17,7 @@ export const getCountries = function () {
18
17
  const config = {
19
18
  headers: { Authorization: '' }
20
19
  };
21
- const response = yield axiosInstance.get(`${GET_SET_COUNTRIES}`, config);
20
+ const response = yield this.axiosInstance.get(`${GET_SET_COUNTRIES}`, config);
22
21
  return response;
23
22
  }
24
23
  catch (error) {
@@ -8,7 +8,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  });
9
9
  };
10
10
  import { generateQueryParamsStr } from "../../utils/apiUtils";
11
- import axiosInstance from "../axiosInstance";
12
11
  const GET_SET_CUSTOMERS_APP = 'api/v2/washdayapp/customers';
13
12
  const GET_SET_CUSTOMERS = 'api/customer';
14
13
  export const getList = function (params, options) {
@@ -37,7 +36,7 @@ export const getCustomerById = function (customerId) {
37
36
  const config = {
38
37
  headers: { Authorization: `Bearer ${this.apiToken}` }
39
38
  };
40
- const response = yield axiosInstance.get(`${GET_SET_CUSTOMERS}/${customerId}`, config);
39
+ const response = yield this.axiosInstance.get(`${GET_SET_CUSTOMERS}/${customerId}`, config);
41
40
  return response.data;
42
41
  }
43
42
  catch (error) {
@@ -52,7 +51,7 @@ export const getCustomerHighlightsById = function (customerId) {
52
51
  const config = {
53
52
  headers: { Authorization: `Bearer ${this.apiToken}` }
54
53
  };
55
- const response = yield axiosInstance.get(`${GET_SET_CUSTOMERS}/${customerId}/highlights`, config);
54
+ const response = yield this.axiosInstance.get(`${GET_SET_CUSTOMERS}/${customerId}/highlights`, config);
56
55
  return response.data;
57
56
  }
58
57
  catch (error) {
@@ -7,7 +7,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7
7
  step((generator = generator.apply(thisArg, _arguments || [])).next());
8
8
  });
9
9
  };
10
- import axiosInstance from "../axiosInstance";
11
10
  const GET_SET_CUSTOMERS = 'api/customer';
12
11
  export const create = function (data) {
13
12
  return __awaiter(this, void 0, void 0, function* () {
@@ -15,7 +14,7 @@ export const create = function (data) {
15
14
  const config = {
16
15
  headers: { Authorization: `Bearer ${this.apiToken}` }
17
16
  };
18
- const response = yield axiosInstance.post(`${GET_SET_CUSTOMERS}`, data, config);
17
+ const response = yield this.axiosInstance.post(`${GET_SET_CUSTOMERS}`, data, config);
19
18
  return response;
20
19
  }
21
20
  catch (error) {
@@ -30,7 +29,7 @@ export const bulkCreate = function (storeId, data) {
30
29
  const config = {
31
30
  headers: { Authorization: `Bearer ${this.apiToken}`, 'Content-Type': false }
32
31
  };
33
- const response = yield axiosInstance.post(`${GET_SET_CUSTOMERS}/bulk`, data, config);
32
+ const response = yield this.axiosInstance.post(`${GET_SET_CUSTOMERS}/bulk`, data, config);
34
33
  return response.data || {};
35
34
  }
36
35
  catch (error) {
@@ -14,7 +14,7 @@ const GET_SET_CUSTOMERS_APP = 'api/v2/washdayapp/customers';
14
14
  // const config = {
15
15
  // headers: { Authorization: `Bearer ${this.apiToken}`, 'Content-Type': false }
16
16
  // };
17
- // const response = await axiosInstance.put(`${GET_SET_PRODUCTS}/${storeId}/bulk`, data, config);
17
+ // const response = await this.axiosInstance.put(`${GET_SET_PRODUCTS}/${storeId}/bulk`, data, config);
18
18
  // return response.data || {}
19
19
  // } catch (error) {
20
20
  // console.error('Error fetching getStoreById:', error);
@@ -7,7 +7,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7
7
  step((generator = generator.apply(thisArg, _arguments || [])).next());
8
8
  });
9
9
  };
10
- import axiosInstance from "../axiosInstance";
11
10
  const GET_SET_INVENTORY = (storeId) => `api/store/${storeId}/inventory`;
12
11
  export const deleteById = function (storeId, id) {
13
12
  return __awaiter(this, void 0, void 0, function* () {
@@ -15,7 +14,7 @@ export const deleteById = function (storeId, id) {
15
14
  const config = {
16
15
  headers: { Authorization: `Bearer ${this.apiToken}` }
17
16
  };
18
- const response = yield axiosInstance.delete(`${GET_SET_INVENTORY(storeId)}/${id}`, config);
17
+ const response = yield this.axiosInstance.delete(`${GET_SET_INVENTORY(storeId)}/${id}`, config);
19
18
  return response;
20
19
  }
21
20
  catch (error) {
@@ -7,7 +7,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7
7
  step((generator = generator.apply(thisArg, _arguments || [])).next());
8
8
  });
9
9
  };
10
- import axiosInstance from "../axiosInstance";
11
10
  const GET_SET_INVENTORY = (storeId) => `api/store/${storeId}/inventory`;
12
11
  export const getInventory = function (storeId, queryParams) {
13
12
  return __awaiter(this, void 0, void 0, function* () {
@@ -15,7 +14,7 @@ export const getInventory = function (storeId, queryParams) {
15
14
  const config = {
16
15
  headers: { Authorization: `Bearer ${this.apiToken}` }
17
16
  };
18
- const response = yield axiosInstance.get(`${GET_SET_INVENTORY(storeId)}?${queryParams}`, config);
17
+ const response = yield this.axiosInstance.get(`${GET_SET_INVENTORY(storeId)}?${queryParams}`, config);
19
18
  return response;
20
19
  }
21
20
  catch (error) {
@@ -51,7 +50,7 @@ export const getHistoryById = function (storeId, id, params) {
51
50
  if (params === null || params === void 0 ? void 0 : params.hasOwnProperty('limit')) {
52
51
  queryParams += `&limit=${params === null || params === void 0 ? void 0 : params.limit}`;
53
52
  }
54
- const response = yield axiosInstance.get(`${GET_SET_INVENTORY(storeId)}/${id}/history?${queryParams}`, config);
53
+ const response = yield this.axiosInstance.get(`${GET_SET_INVENTORY(storeId)}/${id}/history?${queryParams}`, config);
55
54
  return response;
56
55
  }
57
56
  catch (error) {
@@ -7,7 +7,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7
7
  step((generator = generator.apply(thisArg, _arguments || [])).next());
8
8
  });
9
9
  };
10
- import axiosInstance from "../axiosInstance";
11
10
  const GET_SET_INVENTORY = (storeId) => `api/store/${storeId}/inventory`;
12
11
  export const create = function (storeId, data) {
13
12
  return __awaiter(this, void 0, void 0, function* () {
@@ -15,7 +14,7 @@ export const create = function (storeId, data) {
15
14
  const config = {
16
15
  headers: { Authorization: `Bearer ${this.apiToken}` }
17
16
  };
18
- const response = yield axiosInstance.post(`${GET_SET_INVENTORY(storeId)}`, data, config);
17
+ const response = yield this.axiosInstance.post(`${GET_SET_INVENTORY(storeId)}`, data, config);
19
18
  return response;
20
19
  }
21
20
  catch (error) {
@@ -7,7 +7,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7
7
  step((generator = generator.apply(thisArg, _arguments || [])).next());
8
8
  });
9
9
  };
10
- import axiosInstance from "../axiosInstance";
11
10
  const GET_SET_INVENTORY = (storeId) => `api/store/${storeId}/inventory`;
12
11
  export const updateById = function (storeId, id, data) {
13
12
  return __awaiter(this, void 0, void 0, function* () {
@@ -15,7 +14,7 @@ export const updateById = function (storeId, id, data) {
15
14
  const config = {
16
15
  headers: { Authorization: `Bearer ${this.apiToken}` }
17
16
  };
18
- const response = yield axiosInstance.put(`${GET_SET_INVENTORY(storeId)}/${id}`, data, config);
17
+ const response = yield this.axiosInstance.put(`${GET_SET_INVENTORY(storeId)}/${id}`, data, config);
19
18
  return response;
20
19
  }
21
20
  catch (error) {
@@ -30,7 +29,7 @@ export const addStock = function (storeId, id, data) {
30
29
  const config = {
31
30
  headers: { Authorization: `Bearer ${this.apiToken}` }
32
31
  };
33
- const response = yield axiosInstance.put(`${GET_SET_INVENTORY(storeId)}/${id}/add-stock`, data, config);
32
+ const response = yield this.axiosInstance.put(`${GET_SET_INVENTORY(storeId)}/${id}/add-stock`, data, config);
34
33
  return response;
35
34
  }
36
35
  catch (error) {
@@ -7,7 +7,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7
7
  step((generator = generator.apply(thisArg, _arguments || [])).next());
8
8
  });
9
9
  };
10
- import axiosInstance from "../axiosInstance";
11
10
  const GET_SET_PRODUCTS = 'api/product';
12
11
  const GET_SET_PRODUCTS_SUPPLY = 'api/product-supply';
13
12
  export const deleteById = function (id) {
@@ -45,7 +44,7 @@ export const deletePriceOption = function (productId, optionId) {
45
44
  const config = {
46
45
  headers: { Authorization: `Bearer ${this.apiToken}` }
47
46
  };
48
- const response = yield axiosInstance.delete(`${GET_SET_PRODUCTS}/${productId}/price-options/${optionId}`, config);
47
+ const response = yield this.axiosInstance.delete(`${GET_SET_PRODUCTS}/${productId}/price-options/${optionId}`, config);
49
48
  return response.data || {};
50
49
  }
51
50
  catch (error) {
@@ -7,7 +7,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7
7
  step((generator = generator.apply(thisArg, _arguments || [])).next());
8
8
  });
9
9
  };
10
- import axiosInstance from "../axiosInstance";
11
10
  const GET_SET_PRODUCTS_SUPPLY = 'api/product-supply';
12
11
  const GET_SET_PRODUCTS = 'api/product';
13
12
  export const create = function (data) {
@@ -16,7 +15,7 @@ export const create = function (data) {
16
15
  const config = {
17
16
  headers: { Authorization: `Bearer ${this.apiToken}` }
18
17
  };
19
- const response = yield axiosInstance.post(`${GET_SET_PRODUCTS}`, data, config);
18
+ const response = yield this.axiosInstance.post(`${GET_SET_PRODUCTS}`, data, config);
20
19
  return response;
21
20
  }
22
21
  catch (error) {
@@ -31,7 +30,7 @@ export const createProductSupply = function (id, data) {
31
30
  const config = {
32
31
  headers: { Authorization: `Bearer ${this.apiToken}` }
33
32
  };
34
- const response = yield axiosInstance.post(`${GET_SET_PRODUCTS_SUPPLY}/${id}`, data, config);
33
+ const response = yield this.axiosInstance.post(`${GET_SET_PRODUCTS_SUPPLY}/${id}`, data, config);
35
34
  return response;
36
35
  }
37
36
  catch (error) {
@@ -49,7 +48,7 @@ export const bulkCreate = function (storeId, data) {
49
48
  'Content-Type': 'multipart/form-data' // Let axios handle the boundary
50
49
  }
51
50
  };
52
- const response = yield axiosInstance.post(`${GET_SET_PRODUCTS}/${storeId}/bulk`, data, config);
51
+ const response = yield this.axiosInstance.post(`${GET_SET_PRODUCTS}/${storeId}/bulk`, data, config);
53
52
  return response.data || {};
54
53
  }
55
54
  catch (error) {
@@ -65,7 +64,7 @@ export const createPriceOption = function (productId, data) {
65
64
  const config = {
66
65
  headers: { Authorization: `Bearer ${this.apiToken}` }
67
66
  };
68
- const response = yield axiosInstance.post(`${GET_SET_PRODUCTS}/${productId}/price-options`, data, config);
67
+ const response = yield this.axiosInstance.post(`${GET_SET_PRODUCTS}/${productId}/price-options`, data, config);
69
68
  return response.data || {};
70
69
  }
71
70
  catch (error) {
@@ -7,7 +7,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7
7
  step((generator = generator.apply(thisArg, _arguments || [])).next());
8
8
  });
9
9
  };
10
- import axiosInstance from "../axiosInstance";
11
10
  const GET_SET_PRODUCTS = 'api/product';
12
11
  export const bulkUpdate = function (storeId, data) {
13
12
  return __awaiter(this, void 0, void 0, function* () {
@@ -15,7 +14,7 @@ export const bulkUpdate = function (storeId, data) {
15
14
  const config = {
16
15
  headers: { Authorization: `Bearer ${this.apiToken}`, 'Content-Type': false }
17
16
  };
18
- const response = yield axiosInstance.put(`${GET_SET_PRODUCTS}/${storeId}/bulk`, data, config);
17
+ const response = yield this.axiosInstance.put(`${GET_SET_PRODUCTS}/${storeId}/bulk`, data, config);
19
18
  return response.data || {};
20
19
  }
21
20
  catch (error) {
@@ -45,7 +44,7 @@ export const updatePriceOption = function (productId, optionId, data) {
45
44
  const config = {
46
45
  headers: { Authorization: `Bearer ${this.apiToken}` }
47
46
  };
48
- const response = yield axiosInstance.put(`${GET_SET_PRODUCTS}/${productId}/price-options/${optionId}`, data, config);
47
+ const response = yield this.axiosInstance.put(`${GET_SET_PRODUCTS}/${productId}/price-options/${optionId}`, data, config);
49
48
  return response.data || {};
50
49
  }
51
50
  catch (error) {
@@ -7,7 +7,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7
7
  step((generator = generator.apply(thisArg, _arguments || [])).next());
8
8
  });
9
9
  };
10
- import axiosInstance from "../axiosInstance";
11
10
  const GET_SET_SECTIONS = 'api/section';
12
11
  export const create = function (data) {
13
12
  return __awaiter(this, void 0, void 0, function* () {
@@ -15,7 +14,7 @@ export const create = function (data) {
15
14
  const config = {
16
15
  headers: { Authorization: `Bearer ${this.apiToken}` }
17
16
  };
18
- const response = yield axiosInstance.post(`${GET_SET_SECTIONS}`, data, config);
17
+ const response = yield this.axiosInstance.post(`${GET_SET_SECTIONS}`, data, config);
19
18
  return response;
20
19
  }
21
20
  catch (error) {
@@ -7,7 +7,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7
7
  step((generator = generator.apply(thisArg, _arguments || [])).next());
8
8
  });
9
9
  };
10
- import axiosInstance from "../axiosInstance";
11
10
  const GET_SET_STAFF = (storeId) => `api/store/${storeId}/staff`;
12
11
  export const deleteStoreStaffById = function (storeId, staffId) {
13
12
  return __awaiter(this, void 0, void 0, function* () {
@@ -15,7 +14,7 @@ export const deleteStoreStaffById = function (storeId, staffId) {
15
14
  const config = {
16
15
  headers: { Authorization: `Bearer ${this.apiToken}` }
17
16
  };
18
- const response = yield axiosInstance.delete(`${GET_SET_STAFF(storeId)}/${staffId}`, config);
17
+ const response = yield this.axiosInstance.delete(`${GET_SET_STAFF(storeId)}/${staffId}`, config);
19
18
  return response;
20
19
  }
21
20
  catch (error) {
@@ -7,7 +7,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7
7
  step((generator = generator.apply(thisArg, _arguments || [])).next());
8
8
  });
9
9
  };
10
- import axiosInstance from "../axiosInstance";
11
10
  const GET_SET_STAFF = (storeId) => `api/store/${storeId}/staff`;
12
11
  export const getStoreStaff = function (storeId, queryParams) {
13
12
  return __awaiter(this, void 0, void 0, function* () {
@@ -15,7 +14,7 @@ export const getStoreStaff = function (storeId, queryParams) {
15
14
  const config = {
16
15
  headers: { Authorization: `Bearer ${this.apiToken}` }
17
16
  };
18
- const response = yield axiosInstance.get(`${GET_SET_STAFF(storeId)}?${queryParams}`, config);
17
+ const response = yield this.axiosInstance.get(`${GET_SET_STAFF(storeId)}?${queryParams}`, config);
19
18
  return response;
20
19
  }
21
20
  catch (error) {
@@ -7,7 +7,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7
7
  step((generator = generator.apply(thisArg, _arguments || [])).next());
8
8
  });
9
9
  };
10
- import axiosInstance from "../axiosInstance";
11
10
  const GET_SET_STAFF = (storeId) => `api/store/${storeId}/staff`;
12
11
  export const createStoreStaff = function (storeId, data) {
13
12
  return __awaiter(this, void 0, void 0, function* () {
@@ -15,7 +14,7 @@ export const createStoreStaff = function (storeId, data) {
15
14
  const config = {
16
15
  headers: { Authorization: `Bearer ${this.apiToken}` }
17
16
  };
18
- const response = yield axiosInstance.post(`${GET_SET_STAFF(storeId)}`, data, config);
17
+ const response = yield this.axiosInstance.post(`${GET_SET_STAFF(storeId)}`, data, config);
19
18
  return response;
20
19
  }
21
20
  catch (error) {
@@ -7,7 +7,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7
7
  step((generator = generator.apply(thisArg, _arguments || [])).next());
8
8
  });
9
9
  };
10
- import axiosInstance from "../axiosInstance";
11
10
  const GET_SET_STAFF = (storeId) => `api/store/${storeId}/staff`;
12
11
  export const updateStoreStaffById = function (storeId, staffId, data) {
13
12
  return __awaiter(this, void 0, void 0, function* () {
@@ -15,7 +14,7 @@ export const updateStoreStaffById = function (storeId, staffId, data) {
15
14
  const config = {
16
15
  headers: { Authorization: `Bearer ${this.apiToken}` }
17
16
  };
18
- const response = yield axiosInstance.put(`${GET_SET_STAFF(storeId)}/${staffId}`, data, config);
17
+ const response = yield this.axiosInstance.put(`${GET_SET_STAFF(storeId)}/${staffId}`, data, config);
19
18
  return response;
20
19
  }
21
20
  catch (error) {
@@ -8,7 +8,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  });
9
9
  };
10
10
  import { generateQueryParamsStr } from "../../utils/apiUtils";
11
- import axiosInstance from "../axiosInstance";
12
11
  const GET_SET_STORES = 'api/store';
13
12
  const GET_SET_STORE_IMAGE = 'api/store-image';
14
13
  const REQUEST_PARAMS = {
@@ -24,7 +23,7 @@ export const getStores = function (params) {
24
23
  if (params.isActive) {
25
24
  queryParams += `isActive=${params.isActive}`;
26
25
  }
27
- const response = yield axiosInstance.get(`${GET_SET_STORES}?${queryParams}`, { params: Object.assign({}, REQUEST_PARAMS) });
26
+ const response = yield this.axiosInstance.get(`${GET_SET_STORES}?${queryParams}`, { params: Object.assign({}, REQUEST_PARAMS) });
28
27
  return ((_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.stores) || [];
29
28
  }
30
29
  catch (error) {
@@ -39,7 +38,7 @@ export const getStoreReviewLink = function (storeId) {
39
38
  const config = {
40
39
  headers: { Authorization: `Bearer ${this.apiToken}` }
41
40
  };
42
- const response = yield axiosInstance.get(`${GET_SET_STORES}/review-link/${storeId}`, config);
41
+ const response = yield this.axiosInstance.get(`${GET_SET_STORES}/review-link/${storeId}`, config);
43
42
  return response;
44
43
  }
45
44
  catch (error) {
@@ -53,7 +52,7 @@ export const getStoreById = function (storeId) {
53
52
  var _a;
54
53
  try {
55
54
  REQUEST_PARAMS.token = this.apiToken;
56
- const response = yield axiosInstance.get(`${GET_SET_STORES}/${storeId}`, { params: Object.assign({}, REQUEST_PARAMS) });
55
+ const response = yield this.axiosInstance.get(`${GET_SET_STORES}/${storeId}`, { params: Object.assign({}, REQUEST_PARAMS) });
57
56
  return ((_a = response.data) === null || _a === void 0 ? void 0 : _a.data) || {};
58
57
  }
59
58
  catch (error) {
@@ -68,7 +67,7 @@ export const getStoreImages = function (storeId) {
68
67
  const config = {
69
68
  headers: { Authorization: `Bearer ${this.apiToken}` }
70
69
  };
71
- const response = yield axiosInstance.get(`${GET_SET_STORE_IMAGE}?store=${storeId}`, config);
70
+ const response = yield this.axiosInstance.get(`${GET_SET_STORE_IMAGE}?store=${storeId}`, config);
72
71
  return response;
73
72
  }
74
73
  catch (error) {
@@ -83,7 +82,7 @@ export const getStoresByName = function (query) {
83
82
  try {
84
83
  const config = {};
85
84
  const queryParams = generateQueryParamsStr(['q'], query);
86
- const response = yield axiosInstance.get(`${GET_STORES_WASHDAY_APP}?${queryParams}`, config);
85
+ const response = yield this.axiosInstance.get(`${GET_STORES_WASHDAY_APP}?${queryParams}`, config);
87
86
  return ((_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.stores) || [];
88
87
  }
89
88
  catch (error) {
@@ -99,7 +98,7 @@ export const getStoresByIdCustomersApp = function (id) {
99
98
  const config = {
100
99
  headers: { Authorization: `Bearer ${this.apiToken}` }
101
100
  };
102
- const response = yield axiosInstance.get(`${GET_STORES_WASHDAY_APP}/${id}`, config);
101
+ const response = yield this.axiosInstance.get(`${GET_STORES_WASHDAY_APP}/${id}`, config);
103
102
  return ((_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.store) || [];
104
103
  }
105
104
  catch (error) {
@@ -7,7 +7,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7
7
  step((generator = generator.apply(thisArg, _arguments || [])).next());
8
8
  });
9
9
  };
10
- import axiosInstance from "../axiosInstance";
11
10
  const GET_SET_STORE_IMAGE = 'api/store-image';
12
11
  const GET_SET_STORES = 'api/store';
13
12
  export const createStoreImage = function (data) {
@@ -16,7 +15,7 @@ export const createStoreImage = function (data) {
16
15
  const config = {
17
16
  headers: { Authorization: `Bearer ${this.apiToken}`, 'Content-Type': false }
18
17
  };
19
- const response = yield axiosInstance.post(`${GET_SET_STORE_IMAGE}`, data, config);
18
+ const response = yield this.axiosInstance.post(`${GET_SET_STORE_IMAGE}`, data, config);
20
19
  return response;
21
20
  }
22
21
  catch (error) {
@@ -31,7 +30,7 @@ export const createStore = function (data) {
31
30
  const config = {
32
31
  headers: { Authorization: `Bearer ${this.apiToken}` }
33
32
  };
34
- const response = yield axiosInstance.post(`${GET_SET_STORES}`, data, config);
33
+ const response = yield this.axiosInstance.post(`${GET_SET_STORES}`, data, config);
35
34
  return response;
36
35
  }
37
36
  catch (error) {
@@ -48,7 +47,7 @@ export const copyStore = function (copyStoreId) {
48
47
  const config = {
49
48
  headers: { Authorization: `Bearer ${this.apiToken}` }
50
49
  };
51
- const response = yield axiosInstance.post(`${GET_SET_STORES}/copy`, {
50
+ const response = yield this.axiosInstance.post(`${GET_SET_STORES}/copy`, {
52
51
  fromStoreId: copyStoreId
53
52
  }, config);
54
53
  return response;
@@ -7,7 +7,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7
7
  step((generator = generator.apply(thisArg, _arguments || [])).next());
8
8
  });
9
9
  };
10
- import axiosInstance from "../axiosInstance";
11
10
  const GET_SET_STORES = 'api/store';
12
11
  const REQUEST_PARAMS = {
13
12
  token: 'LOGGED_USER_TOKEN',
@@ -18,7 +17,7 @@ export const updateStoreById = function (storeId, data) {
18
17
  const config = {
19
18
  headers: { Authorization: `Bearer ${this.apiToken}` }
20
19
  };
21
- const response = yield axiosInstance.put(`${GET_SET_STORES}/${storeId}`, data, config);
20
+ const response = yield this.axiosInstance.put(`${GET_SET_STORES}/${storeId}`, data, config);
22
21
  return response.data || {};
23
22
  }
24
23
  catch (error) {
@@ -33,7 +32,7 @@ export const deleteStoreById = function (storeId) {
33
32
  const config = {
34
33
  headers: { Authorization: `Bearer ${this.apiToken}` }
35
34
  };
36
- const response = yield axiosInstance.delete(`${GET_SET_STORES}/${storeId}`, config);
35
+ const response = yield this.axiosInstance.delete(`${GET_SET_STORES}/${storeId}`, config);
37
36
  return response;
38
37
  }
39
38
  catch (error) {