washday-sdk 0.0.98 → 0.0.99

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.
@@ -9,6 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  };
10
10
  import axiosInstance from "../axiosInstance";
11
11
  const GET_SET_ORDER = 'api/v2/order';
12
+ const GET_SET_ORDER_OLD = 'api/order';
12
13
  const GET_SET_ORDER_PAYMENTLINES = (orderId) => `/api/v2/order/${orderId}/paymentLines`;
13
14
  export const updateById = function (id, data) {
14
15
  return __awaiter(this, void 0, void 0, function* () {
@@ -44,7 +45,7 @@ export const setOrderCancelledBySequence = function (sequence, storeId, data) {
44
45
  const config = {
45
46
  headers: { Authorization: `Bearer ${this.apiToken}` }
46
47
  };
47
- return yield axiosInstance.put(`${GET_SET_ORDER}/${sequence}/${storeId}/cancelled`, data, config);
48
+ return yield axiosInstance.put(`${GET_SET_ORDER_OLD}/${sequence}/${storeId}/cancelled`, data, config);
48
49
  }
49
50
  catch (error) {
50
51
  console.error('Error fetching setOrderCancelledBySequence:', error);
@@ -58,7 +59,7 @@ export const setOrderCleanedBySequence = function (sequence, storeId, data) {
58
59
  const config = {
59
60
  headers: { Authorization: `Bearer ${this.apiToken}` }
60
61
  };
61
- return yield axiosInstance.put(`${GET_SET_ORDER}/${sequence}/${storeId}/cleaned`, data, config);
62
+ return yield axiosInstance.put(`${GET_SET_ORDER_OLD}/${sequence}/${storeId}/cleaned`, data, config);
62
63
  }
63
64
  catch (error) {
64
65
  console.error('Error fetching setOrderCleanedBySequence:', error);
@@ -72,7 +73,7 @@ export const setOrderCollectedBySequence = function (sequence, storeId, data) {
72
73
  const config = {
73
74
  headers: { Authorization: `Bearer ${this.apiToken}` }
74
75
  };
75
- return yield axiosInstance.put(`${GET_SET_ORDER}/${sequence}/${storeId}/collected`, data, config);
76
+ return yield axiosInstance.put(`${GET_SET_ORDER_OLD}/${sequence}/${storeId}/collected`, data, config);
76
77
  }
77
78
  catch (error) {
78
79
  console.error('Error fetching setOrderCollectedBySequence:', error);
@@ -86,7 +87,7 @@ export const setOrdePickingBySequence = function (sequence, storeId, data) {
86
87
  const config = {
87
88
  headers: { Authorization: `Bearer ${this.apiToken}` }
88
89
  };
89
- return yield axiosInstance.put(`${GET_SET_ORDER}/${sequence}/${storeId}/picking`, data, config);
90
+ return yield axiosInstance.put(`${GET_SET_ORDER_OLD}/${sequence}/${storeId}/picking`, data, config);
90
91
  }
91
92
  catch (error) {
92
93
  console.error('Error fetching setOrdePickingBySequence:', error);
@@ -100,7 +101,7 @@ export const setOrdeDeliveringBySequence = function (sequence, storeId, data) {
100
101
  const config = {
101
102
  headers: { Authorization: `Bearer ${this.apiToken}` }
102
103
  };
103
- return yield axiosInstance.put(`${GET_SET_ORDER}/${sequence}/${storeId}/delivering`, data, config);
104
+ return yield axiosInstance.put(`${GET_SET_ORDER_OLD}/${sequence}/${storeId}/delivering`, data, config);
104
105
  }
105
106
  catch (error) {
106
107
  console.error('Error fetching setOrdeDeliveringBySequence:', error);
@@ -114,7 +115,7 @@ export const setOrdeDeliveredBySequence = function (sequence, storeId, data) {
114
115
  const config = {
115
116
  headers: { Authorization: `Bearer ${this.apiToken}` }
116
117
  };
117
- return yield axiosInstance.put(`${GET_SET_ORDER}/${sequence}/${storeId}/delivered`, data, config);
118
+ return yield axiosInstance.put(`${GET_SET_ORDER_OLD}/${sequence}/${storeId}/delivered`, data, config);
118
119
  }
119
120
  catch (error) {
120
121
  console.error('Error fetching setOrdeDeliveredBySequence:', error);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "washday-sdk",
3
- "version": "0.0.98",
3
+ "version": "0.0.99",
4
4
  "description": "Washday utilities functions and API",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -1,6 +1,7 @@
1
1
  import { WashdayClientInstance } from "../../interfaces/Api";
2
2
  import axiosInstance from "../axiosInstance";
3
3
  const GET_SET_ORDER = 'api/v2/order';
4
+ const GET_SET_ORDER_OLD = 'api/order';
4
5
  const GET_SET_ORDER_PAYMENTLINES = (orderId: string) => `/api/v2/order/${orderId}/paymentLines`;
5
6
 
6
7
  export const updateById = async function (this: WashdayClientInstance, id: string, data: {
@@ -59,7 +60,7 @@ export const setOrderCancelledBySequence = async function (this: WashdayClientIn
59
60
  const config = {
60
61
  headers: { Authorization: `Bearer ${this.apiToken}` }
61
62
  };
62
- return await axiosInstance.put(`${GET_SET_ORDER}/${sequence}/${storeId}/cancelled`, data, config);
63
+ return await axiosInstance.put(`${GET_SET_ORDER_OLD}/${sequence}/${storeId}/cancelled`, data, config);
63
64
  } catch (error) {
64
65
  console.error('Error fetching setOrderCancelledBySequence:', error);
65
66
  throw error;
@@ -74,7 +75,7 @@ export const setOrderCleanedBySequence = async function (this: WashdayClientInst
74
75
  const config = {
75
76
  headers: { Authorization: `Bearer ${this.apiToken}` }
76
77
  };
77
- return await axiosInstance.put(`${GET_SET_ORDER}/${sequence}/${storeId}/cleaned`, data, config);
78
+ return await axiosInstance.put(`${GET_SET_ORDER_OLD}/${sequence}/${storeId}/cleaned`, data, config);
78
79
  } catch (error) {
79
80
  console.error('Error fetching setOrderCleanedBySequence:', error);
80
81
  throw error;
@@ -88,7 +89,7 @@ export const setOrderCollectedBySequence = async function (this: WashdayClientIn
88
89
  const config = {
89
90
  headers: { Authorization: `Bearer ${this.apiToken}` }
90
91
  };
91
- return await axiosInstance.put(`${GET_SET_ORDER}/${sequence}/${storeId}/collected`, data, config);
92
+ return await axiosInstance.put(`${GET_SET_ORDER_OLD}/${sequence}/${storeId}/collected`, data, config);
92
93
  } catch (error) {
93
94
  console.error('Error fetching setOrderCollectedBySequence:', error);
94
95
  throw error;
@@ -102,7 +103,7 @@ export const setOrdePickingBySequence = async function (this: WashdayClientInsta
102
103
  const config = {
103
104
  headers: { Authorization: `Bearer ${this.apiToken}` }
104
105
  };
105
- return await axiosInstance.put(`${GET_SET_ORDER}/${sequence}/${storeId}/picking`, data, config);
106
+ return await axiosInstance.put(`${GET_SET_ORDER_OLD}/${sequence}/${storeId}/picking`, data, config);
106
107
  } catch (error) {
107
108
  console.error('Error fetching setOrdePickingBySequence:', error);
108
109
  throw error;
@@ -116,7 +117,7 @@ export const setOrdeDeliveringBySequence = async function (this: WashdayClientIn
116
117
  const config = {
117
118
  headers: { Authorization: `Bearer ${this.apiToken}` }
118
119
  };
119
- return await axiosInstance.put(`${GET_SET_ORDER}/${sequence}/${storeId}/delivering`, data, config);
120
+ return await axiosInstance.put(`${GET_SET_ORDER_OLD}/${sequence}/${storeId}/delivering`, data, config);
120
121
  } catch (error) {
121
122
  console.error('Error fetching setOrdeDeliveringBySequence:', error);
122
123
  throw error;
@@ -130,7 +131,7 @@ export const setOrdeDeliveredBySequence = async function (this: WashdayClientIns
130
131
  const config = {
131
132
  headers: { Authorization: `Bearer ${this.apiToken}` }
132
133
  };
133
- return await axiosInstance.put(`${GET_SET_ORDER}/${sequence}/${storeId}/delivered`, data, config);
134
+ return await axiosInstance.put(`${GET_SET_ORDER_OLD}/${sequence}/${storeId}/delivered`, data, config);
134
135
  } catch (error) {
135
136
  console.error('Error fetching setOrdeDeliveredBySequence:', error);
136
137
  throw error;