washday-sdk 1.1.10 → 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 (162) hide show
  1. package/dist/api/attendance/get.js +4 -5
  2. package/dist/api/attendance/post.js +2 -3
  3. package/dist/api/attendance/put.js +1 -2
  4. package/dist/api/auth/post.js +13 -14
  5. package/dist/api/axiosInstance.js +47 -36
  6. package/dist/api/cashierbox/delete.js +2 -3
  7. package/dist/api/cashierbox/get.js +3 -4
  8. package/dist/api/cashierbox/post.js +2 -3
  9. package/dist/api/cashierbox/put.js +2 -3
  10. package/dist/api/cashups/delete.js +1 -2
  11. package/dist/api/cashups/get.js +3 -4
  12. package/dist/api/cashups/post.js +1 -2
  13. package/dist/api/cashups/put.js +2 -2
  14. package/dist/api/cfdi/delete.js +1 -2
  15. package/dist/api/cfdi/get.js +6 -7
  16. package/dist/api/cfdi/post.js +2 -3
  17. package/dist/api/cfdi/put.js +2 -2
  18. package/dist/api/companies/get.js +1 -2
  19. package/dist/api/companies/post.js +2 -3
  20. package/dist/api/companies/put.js +3 -4
  21. package/dist/api/countries/get.js +1 -2
  22. package/dist/api/csv/get.js +13 -14
  23. package/dist/api/customers/delete.js +2 -3
  24. package/dist/api/customers/get.js +6 -7
  25. package/dist/api/customers/post.js +2 -3
  26. package/dist/api/customers/put.js +3 -4
  27. package/dist/api/discounts/get.js +7 -8
  28. package/dist/api/discounts/post.js +2 -3
  29. package/dist/api/discounts/put.js +4 -5
  30. package/dist/api/index.js +4 -1
  31. package/dist/api/inventory/delete.js +1 -2
  32. package/dist/api/inventory/get.js +3 -4
  33. package/dist/api/inventory/post.js +1 -2
  34. package/dist/api/inventory/put.js +2 -3
  35. package/dist/api/order/delete.js +2 -3
  36. package/dist/api/order/get.js +8 -9
  37. package/dist/api/order/post.js +7 -8
  38. package/dist/api/order/put.js +13 -14
  39. package/dist/api/outsourcedOrders/delete.js +1 -2
  40. package/dist/api/outsourcedOrders/get.js +3 -4
  41. package/dist/api/outsourcedOrders/post.js +1 -2
  42. package/dist/api/outsourcedOrders/put.js +1 -2
  43. package/dist/api/partners/delete.js +1 -2
  44. package/dist/api/partners/get.js +2 -3
  45. package/dist/api/partners/post.js +1 -2
  46. package/dist/api/partners/put.js +1 -2
  47. package/dist/api/pdf/get.js +1 -2
  48. package/dist/api/products/delete.js +3 -4
  49. package/dist/api/products/get.js +1 -2
  50. package/dist/api/products/post.js +4 -5
  51. package/dist/api/products/put.js +3 -4
  52. package/dist/api/publics/get.js +1 -2
  53. package/dist/api/reports/get.js +15 -16
  54. package/dist/api/reviews/delete.js +1 -1
  55. package/dist/api/reviews/get.js +2 -3
  56. package/dist/api/reviews/post.js +1 -1
  57. package/dist/api/reviews/put.js +2 -2
  58. package/dist/api/routes/delete.js +1 -2
  59. package/dist/api/routes/get.js +5 -6
  60. package/dist/api/routes/post.js +3 -4
  61. package/dist/api/routes/put.js +3 -4
  62. package/dist/api/sections/delete.js +1 -2
  63. package/dist/api/sections/get.js +3 -4
  64. package/dist/api/sections/post.js +1 -2
  65. package/dist/api/sections/put.js +1 -2
  66. package/dist/api/staff/delete.js +1 -2
  67. package/dist/api/staff/get.js +2 -3
  68. package/dist/api/staff/post.js +1 -2
  69. package/dist/api/staff/put.js +1 -2
  70. package/dist/api/stores/get.js +6 -7
  71. package/dist/api/stores/post.js +3 -4
  72. package/dist/api/stores/put.js +2 -3
  73. package/dist/api/stripe/post.js +4 -5
  74. package/dist/api/supplies/delete.js +1 -2
  75. package/dist/api/supplies/get.js +3 -4
  76. package/dist/api/supplies/post.js +1 -2
  77. package/dist/api/supplies/put.js +2 -3
  78. package/dist/api/users/delete.js +1 -2
  79. package/dist/api/users/post.js +1 -2
  80. package/dist/api/users/put.js +1 -2
  81. package/package.json +1 -1
  82. package/src/api/attendance/get.ts +4 -4
  83. package/src/api/attendance/post.ts +2 -2
  84. package/src/api/attendance/put.ts +1 -1
  85. package/src/api/auth/post.ts +13 -13
  86. package/src/api/axiosInstance.ts +51 -40
  87. package/src/api/cashierbox/delete.ts +2 -2
  88. package/src/api/cashierbox/get.ts +3 -3
  89. package/src/api/cashierbox/post.ts +2 -2
  90. package/src/api/cashierbox/put.ts +2 -2
  91. package/src/api/cashups/delete.ts +1 -1
  92. package/src/api/cashups/get.ts +3 -3
  93. package/src/api/cashups/post.ts +1 -1
  94. package/src/api/cashups/put.ts +2 -2
  95. package/src/api/cfdi/delete.ts +1 -1
  96. package/src/api/cfdi/get.ts +6 -6
  97. package/src/api/cfdi/post.ts +2 -2
  98. package/src/api/cfdi/put.ts +2 -2
  99. package/src/api/companies/get.ts +1 -1
  100. package/src/api/companies/post.ts +2 -2
  101. package/src/api/companies/put.ts +3 -3
  102. package/src/api/countries/get.ts +1 -1
  103. package/src/api/csv/get.ts +13 -13
  104. package/src/api/customers/delete.ts +2 -2
  105. package/src/api/customers/get.ts +6 -6
  106. package/src/api/customers/post.ts +2 -2
  107. package/src/api/customers/put.ts +3 -3
  108. package/src/api/discounts/get.ts +7 -7
  109. package/src/api/discounts/post.ts +2 -2
  110. package/src/api/discounts/put.ts +4 -4
  111. package/src/api/index.ts +4 -2
  112. package/src/api/inventory/delete.ts +1 -1
  113. package/src/api/inventory/get.ts +3 -3
  114. package/src/api/inventory/post.ts +1 -1
  115. package/src/api/inventory/put.ts +2 -2
  116. package/src/api/order/delete.ts +2 -2
  117. package/src/api/order/get.ts +8 -8
  118. package/src/api/order/post.ts +7 -7
  119. package/src/api/order/put.ts +13 -13
  120. package/src/api/outsourcedOrders/delete.ts +1 -1
  121. package/src/api/outsourcedOrders/get.ts +3 -3
  122. package/src/api/outsourcedOrders/post.ts +1 -1
  123. package/src/api/outsourcedOrders/put.ts +1 -1
  124. package/src/api/partners/delete.ts +1 -1
  125. package/src/api/partners/get.ts +2 -2
  126. package/src/api/partners/post.ts +1 -1
  127. package/src/api/partners/put.ts +1 -1
  128. package/src/api/pdf/get.ts +1 -1
  129. package/src/api/products/delete.ts +3 -3
  130. package/src/api/products/get.ts +1 -1
  131. package/src/api/products/post.ts +4 -4
  132. package/src/api/products/put.ts +3 -3
  133. package/src/api/publics/get.ts +1 -1
  134. package/src/api/reports/get.ts +15 -15
  135. package/src/api/reviews/delete.ts +1 -1
  136. package/src/api/reviews/get.ts +2 -2
  137. package/src/api/reviews/post.ts +1 -1
  138. package/src/api/reviews/put.ts +2 -2
  139. package/src/api/routes/delete.ts +1 -1
  140. package/src/api/routes/get.ts +5 -5
  141. package/src/api/routes/post.ts +3 -3
  142. package/src/api/routes/put.ts +3 -3
  143. package/src/api/sections/delete.ts +1 -1
  144. package/src/api/sections/get.ts +3 -3
  145. package/src/api/sections/post.ts +1 -1
  146. package/src/api/sections/put.ts +1 -1
  147. package/src/api/staff/delete.ts +1 -1
  148. package/src/api/staff/get.ts +2 -2
  149. package/src/api/staff/post.ts +1 -1
  150. package/src/api/staff/put.ts +1 -1
  151. package/src/api/stores/get.ts +6 -6
  152. package/src/api/stores/post.ts +3 -3
  153. package/src/api/stores/put.ts +2 -2
  154. package/src/api/stripe/post.ts +4 -4
  155. package/src/api/supplies/delete.ts +1 -1
  156. package/src/api/supplies/get.ts +3 -3
  157. package/src/api/supplies/post.ts +1 -1
  158. package/src/api/supplies/put.ts +2 -2
  159. package/src/api/users/delete.ts +1 -1
  160. package/src/api/users/post.ts +1 -1
  161. package/src/api/users/put.ts +1 -1
  162. package/src/interfaces/Api.ts +3 -0
@@ -63,7 +63,7 @@ export const getList = async function (this: WashdayClientInstance, params: {
63
63
  'cfdiId',
64
64
  ], params);
65
65
  // ], { ...params, q: params.q ? encodeURIComponent(params.q) : undefined });
66
- return await axiosInstance.get(`${GET_SET_ORDER}?${queryParams}`, config);
66
+ return await this.axiosInstance.get(`${GET_SET_ORDER}?${queryParams}`, config);
67
67
  } catch (error) {
68
68
  console.error('Error fetching getList orders:', error);
69
69
  throw error;
@@ -83,7 +83,7 @@ export const getOrdersHeaderSummary = async function (this: WashdayClientInstanc
83
83
  'status',
84
84
  ], params);
85
85
 
86
- return await axiosInstance.get(`${GET_HEADER_SUMMARY}?${queryParams}`, config);
86
+ return await this.axiosInstance.get(`${GET_HEADER_SUMMARY}?${queryParams}`, config);
87
87
  } catch (error) {
88
88
  console.error('Error fetching getOrdersHeaderSummary :', error);
89
89
  throw error;
@@ -101,7 +101,7 @@ export const getById = async function (this: WashdayClientInstance, id: string,
101
101
  const queryParams = generateQueryParamsStr([
102
102
  'fetchSection',
103
103
  ], params);
104
- return await axiosInstance.get(`${GET_SET_ORDER}/${id}?${queryParams}`, config);
104
+ return await this.axiosInstance.get(`${GET_SET_ORDER}/${id}?${queryParams}`, config);
105
105
  } catch (error) {
106
106
  console.error('Error fetching:', error);
107
107
  throw error;
@@ -113,7 +113,7 @@ export const getCFDIOrdersByDateAndStore = async function (this: WashdayClientIn
113
113
  const config = {
114
114
  headers: { Authorization: `Bearer ${this.apiToken}` }
115
115
  };
116
- return await axiosInstance.get(`${GET_SET_ORDER}/${id}`, config);
116
+ return await this.axiosInstance.get(`${GET_SET_ORDER}/${id}`, config);
117
117
  } catch (error) {
118
118
  console.error('Error fetching:', error);
119
119
  throw error;
@@ -136,7 +136,7 @@ export const fetchOrdersForCFDI = async function (this: WashdayClientInstance, p
136
136
  "storeID",
137
137
  "customerID"
138
138
  ], params);
139
- return await axiosInstance.get(`${GET_SET_ORDER_CFDI}/cfdiPreview?${queryParams}`, config);
139
+ return await this.axiosInstance.get(`${GET_SET_ORDER_CFDI}/cfdiPreview?${queryParams}`, config);
140
140
  } catch (error) {
141
141
  console.error('Error fetching:', error);
142
142
  throw error;
@@ -175,7 +175,7 @@ export const getListCustomersApp = async function (this: WashdayClientInstance,
175
175
  'readyDateTime',
176
176
  'collectedDateTime',
177
177
  ], params);
178
- return await axiosInstance.get(`${GET_SET_ORDER_CUSTOMERS_APP}?${queryParams}`, config);
178
+ return await this.axiosInstance.get(`${GET_SET_ORDER_CUSTOMERS_APP}?${queryParams}`, config);
179
179
  } catch (error) {
180
180
  console.error('Error fetching getListCustomersApp orders:', error);
181
181
  throw error;
@@ -187,7 +187,7 @@ export const getByIdCustomersApp = async function (this: WashdayClientInstance,
187
187
  const config = {
188
188
  headers: { Authorization: `Bearer ${this.apiToken}` }
189
189
  };
190
- return await axiosInstance.get(`${GET_SET_ORDER_CUSTOMERS_APP}/${id}`, config);
190
+ return await this.axiosInstance.get(`${GET_SET_ORDER_CUSTOMERS_APP}/${id}`, config);
191
191
  } catch (error) {
192
192
  console.error('Error fetching:', error);
193
193
  throw error;
@@ -199,7 +199,7 @@ export const getRequestedOrdersSummary = async function (this: WashdayClientInst
199
199
  const config = {
200
200
  headers: { Authorization: `Bearer ${this.apiToken}` }
201
201
  };
202
- return await axiosInstance.get(`${GET_SET_ORDER}/requested-summary?storeIds=${storeIds}`, config);
202
+ return await this.axiosInstance.get(`${GET_SET_ORDER}/requested-summary?storeIds=${storeIds}`, config);
203
203
  } catch (error) {
204
204
  console.error('Error fetching:', error);
205
205
  throw error;
@@ -18,7 +18,7 @@ export const createPaymentLine = async function (this: WashdayClientInstance, id
18
18
  const config = {
19
19
  headers: { Authorization: `Bearer ${this.apiToken}` }
20
20
  };
21
- return await axiosInstance.post(`${GET_SET_ORDER_PAYMENTLINES(id)}`, data, config);
21
+ return await this.axiosInstance.post(`${GET_SET_ORDER_PAYMENTLINES(id)}`, data, config);
22
22
  } catch (error) {
23
23
  console.error('Error fetching create:', error);
24
24
  throw error;
@@ -31,7 +31,7 @@ export const sendEmailReceipt = async function (this: WashdayClientInstance, id:
31
31
  const config = {
32
32
  headers: { Authorization: `Bearer ${this.apiToken}` }
33
33
  };
34
- return await axiosInstance.post(`${GET_SET_ORDER}/${id}/sendEmailReceipt`, {}, config);
34
+ return await this.axiosInstance.post(`${GET_SET_ORDER}/${id}/sendEmailReceipt`, {}, config);
35
35
  } catch (error) {
36
36
  console.error('Error fetching create:', error);
37
37
  throw error;
@@ -43,7 +43,7 @@ export const createOrderCustomersApp = async function (this: WashdayClientInstan
43
43
  const config = {
44
44
  headers: { Authorization: `Bearer ${this.apiToken}` }
45
45
  };
46
- return await axiosInstance.post(`${GET_SET_ORDER_CUSTOMERS_APP}`, data, config);
46
+ return await this.axiosInstance.post(`${GET_SET_ORDER_CUSTOMERS_APP}`, data, config);
47
47
  } catch (error) {
48
48
  console.error('Error fetching createOrderCustomersApp:', error);
49
49
  throw error;
@@ -55,7 +55,7 @@ export const createOrderUsersApp = async function (this: WashdayClientInstance,
55
55
  const config = {
56
56
  headers: { Authorization: `Bearer ${this.apiToken}` }
57
57
  };
58
- return await axiosInstance.post(`${GET_SET_ORDER}`, data, config);
58
+ return await this.axiosInstance.post(`${GET_SET_ORDER}`, data, config);
59
59
  } catch (error) {
60
60
  console.error('Error fetching createOrderUsersApp:', error);
61
61
  throw error;
@@ -77,7 +77,7 @@ export const bulkCreatePaymentLines = async function (this: WashdayClientInstanc
77
77
  const config = {
78
78
  headers: { Authorization: `Bearer ${this.apiToken}` }
79
79
  };
80
- return await axiosInstance.post(`${GET_SET_ORDER}/${storeId}/bulkPaymentLines`, body, config);
80
+ return await this.axiosInstance.post(`${GET_SET_ORDER}/${storeId}/bulkPaymentLines`, body, config);
81
81
  } catch (error) {
82
82
  console.error('Error fetching bulkCreatePaymentLines:', error);
83
83
  throw error;
@@ -94,7 +94,7 @@ export const createOrderEvidence = async function (this: WashdayClientInstance,
94
94
  'Content-Type': false
95
95
  }
96
96
  };
97
- return await axiosInstance.post(`${GET_SET_ORDER}/${orderId}/evidence`, data, config);
97
+ return await this.axiosInstance.post(`${GET_SET_ORDER}/${orderId}/evidence`, data, config);
98
98
  } catch (error) {
99
99
  console.error('Error fetching createOrderEvidence:', error);
100
100
  throw error;
@@ -110,7 +110,7 @@ export const getRedeemPointsPreview = async function (this: WashdayClientInstanc
110
110
  const config = {
111
111
  headers: { Authorization: `Bearer ${this.apiToken}` }
112
112
  };
113
- return await axiosInstance.post(`${GET_SET_ORDER}/redeemPointsPreview`, data, config);
113
+ return await this.axiosInstance.post(`${GET_SET_ORDER}/redeemPointsPreview`, data, config);
114
114
  } catch (error) {
115
115
  console.error('Error fetching getRedeemPointsPreview:', error);
116
116
  throw error;
@@ -33,7 +33,7 @@ export const updateById = async function (this: WashdayClientInstance, id: strin
33
33
  const config = {
34
34
  headers: { Authorization: `Bearer ${this.apiToken}` }
35
35
  };
36
- return await axiosInstance.put(`${GET_SET_ORDER}/${id}`, data, config);
36
+ return await this.axiosInstance.put(`${GET_SET_ORDER}/${id}`, data, config);
37
37
  } catch (error) {
38
38
  console.error('Error fetching updateById:', error);
39
39
  throw error;
@@ -49,7 +49,7 @@ export const updatePaymentLineById = async function (this: WashdayClientInstance
49
49
  const config = {
50
50
  headers: { Authorization: `Bearer ${this.apiToken}` }
51
51
  };
52
- return await axiosInstance.put(`${GET_SET_ORDER_PAYMENTLINES(orderId)}/${id}`, data, config);
52
+ return await this.axiosInstance.put(`${GET_SET_ORDER_PAYMENTLINES(orderId)}/${id}`, data, config);
53
53
  } catch (error) {
54
54
  console.error('Error fetching updateById:', error);
55
55
  throw error;
@@ -63,7 +63,7 @@ export const setOrderCancelledBySequence = async function (this: WashdayClientIn
63
63
  const config = {
64
64
  headers: { Authorization: `Bearer ${this.apiToken}` }
65
65
  };
66
- return await axiosInstance.put(`${GET_SET_ORDER_OLD}/${sequence}/${storeId}/cancelled`, data, config);
66
+ return await this.axiosInstance.put(`${GET_SET_ORDER_OLD}/${sequence}/${storeId}/cancelled`, data, config);
67
67
  } catch (error) {
68
68
  console.error('Error fetching setOrderCancelledBySequence:', error);
69
69
  throw error;
@@ -75,7 +75,7 @@ export const setOrderCleaningBySequence = async function (this: WashdayClientIns
75
75
  const config = {
76
76
  headers: { Authorization: `Bearer ${this.apiToken}` }
77
77
  };
78
- return await axiosInstance.put(`${GET_SET_ORDER_OLD}/${sequence}/${storeId}/cleaning`, {}, config);
78
+ return await this.axiosInstance.put(`${GET_SET_ORDER_OLD}/${sequence}/${storeId}/cleaning`, {}, config);
79
79
  } catch (error) {
80
80
  console.error('Error fetching setOrderCleaningBySequence:', error);
81
81
  throw error;
@@ -95,7 +95,7 @@ export const setOrderCleanedBySequence = async function (this: WashdayClientInst
95
95
  const queryParams = generateQueryParamsStr([
96
96
  'markOutsourcedAsReturned',
97
97
  ], params);
98
- return await axiosInstance.put(`${GET_SET_ORDER_OLD}/${sequence}/${storeId}/cleaned?${queryParams}`, data, config);
98
+ return await this.axiosInstance.put(`${GET_SET_ORDER_OLD}/${sequence}/${storeId}/cleaned?${queryParams}`, data, config);
99
99
  } catch (error) {
100
100
  console.error('Error fetching setOrderCleanedBySequence:', error);
101
101
  throw error;
@@ -111,7 +111,7 @@ export const setOrderCollectedBySequence = async function (this: WashdayClientIn
111
111
  const config = {
112
112
  headers: { Authorization: `Bearer ${this.apiToken}` }
113
113
  };
114
- return await axiosInstance.put(`${GET_SET_ORDER_OLD}/${sequence}/${storeId}/collected`, data, config);
114
+ return await this.axiosInstance.put(`${GET_SET_ORDER_OLD}/${sequence}/${storeId}/collected`, data, config);
115
115
  } catch (error) {
116
116
  console.error('Error fetching setOrderCollectedBySequence:', error);
117
117
  throw error;
@@ -125,7 +125,7 @@ export const setOrdePickingBySequence = async function (this: WashdayClientInsta
125
125
  const config = {
126
126
  headers: { Authorization: `Bearer ${this.apiToken}` }
127
127
  };
128
- return await axiosInstance.put(`${GET_SET_ORDER_OLD}/${sequence}/${storeId}/picking`, data, config);
128
+ return await this.axiosInstance.put(`${GET_SET_ORDER_OLD}/${sequence}/${storeId}/picking`, data, config);
129
129
  } catch (error) {
130
130
  console.error('Error fetching setOrdePickingBySequence:', error);
131
131
  throw error;
@@ -139,7 +139,7 @@ export const setOrdeDeliveringBySequence = async function (this: WashdayClientIn
139
139
  const config = {
140
140
  headers: { Authorization: `Bearer ${this.apiToken}` }
141
141
  };
142
- return await axiosInstance.put(`${GET_SET_ORDER_OLD}/${sequence}/${storeId}/delivering`, data, config);
142
+ return await this.axiosInstance.put(`${GET_SET_ORDER_OLD}/${sequence}/${storeId}/delivering`, data, config);
143
143
  } catch (error) {
144
144
  console.error('Error fetching setOrdeDeliveringBySequence:', error);
145
145
  throw error;
@@ -153,7 +153,7 @@ export const setOrdeDeliveredBySequence = async function (this: WashdayClientIns
153
153
  const config = {
154
154
  headers: { Authorization: `Bearer ${this.apiToken}` }
155
155
  };
156
- return await axiosInstance.put(`${GET_SET_ORDER_OLD}/${sequence}/${storeId}/delivered`, data, config);
156
+ return await this.axiosInstance.put(`${GET_SET_ORDER_OLD}/${sequence}/${storeId}/delivered`, data, config);
157
157
  } catch (error) {
158
158
  console.error('Error fetching setOrdeDeliveredBySequence:', error);
159
159
  throw error;
@@ -165,7 +165,7 @@ export const setOrderAcceptedBySequence = async function (this: WashdayClientIns
165
165
  const config = {
166
166
  headers: { Authorization: `Bearer ${this.apiToken}` }
167
167
  };
168
- return await axiosInstance.put(`${GET_SET_ORDER}/${sequence}/${storeId}/accepted`, {}, config);
168
+ return await this.axiosInstance.put(`${GET_SET_ORDER}/${sequence}/${storeId}/accepted`, {}, config);
169
169
  } catch (error) {
170
170
  console.error('Error fetching setOrderAcceptedBySequence:', error);
171
171
  throw error;
@@ -180,7 +180,7 @@ export const bulkCancel = async function (this: WashdayClientInstance, storeId:
180
180
  const config = {
181
181
  headers: { Authorization: `Bearer ${this.apiToken}` }
182
182
  };
183
- return await axiosInstance.put(`${GET_SET_ORDER}/${storeId}/bulkCancel`, body, config);
183
+ return await this.axiosInstance.put(`${GET_SET_ORDER}/${storeId}/bulkCancel`, body, config);
184
184
  } catch (error) {
185
185
  console.error('Error fetching bulkCancel:', error);
186
186
  throw error;
@@ -201,7 +201,7 @@ export const bulkClean = async function (this: WashdayClientInstance, storeId: s
201
201
  const queryParams = generateQueryParamsStr([
202
202
  'markOutsourcedAsReturned',
203
203
  ], params);
204
- return await axiosInstance.put(`${GET_SET_ORDER}/${storeId}/bulkClean?${queryParams}`, body, config);
204
+ return await this.axiosInstance.put(`${GET_SET_ORDER}/${storeId}/bulkClean?${queryParams}`, body, config);
205
205
  } catch (error) {
206
206
  console.error('Error fetching bulkClean:', error);
207
207
  throw error;
@@ -216,7 +216,7 @@ export const bulkCollect = async function (this: WashdayClientInstance, storeId:
216
216
  const config = {
217
217
  headers: { Authorization: `Bearer ${this.apiToken}` }
218
218
  };
219
- return await axiosInstance.put(`${GET_SET_ORDER}/${storeId}/bulkCollect`, body, config);
219
+ return await this.axiosInstance.put(`${GET_SET_ORDER}/${storeId}/bulkCollect`, body, config);
220
220
  } catch (error) {
221
221
  console.error('Error fetching bulkCollect:', error);
222
222
  throw error;
@@ -7,7 +7,7 @@ export const deleteOutsourcedOrderById = async function (this: WashdayClientInst
7
7
  const config = {
8
8
  headers: { Authorization: `Bearer ${this.apiToken}` }
9
9
  };
10
- return await axiosInstance.delete(`${GET_SET_OUTSOURCED_ORDERS}/${id}`, config);
10
+ return await this.axiosInstance.delete(`${GET_SET_OUTSOURCED_ORDERS}/${id}`, config);
11
11
  } catch (error) {
12
12
  console.error('Error fetching deleteOutsourcedOrderById:', error);
13
13
  throw error;
@@ -10,7 +10,7 @@ export const getOutsourcedOrdersByOrder = async function (this: WashdayClientIns
10
10
  const config = {
11
11
  headers: { Authorization: `Bearer ${this.apiToken}` }
12
12
  };
13
- return await axiosInstance.get(`${GET_OUTSOURCED_ORDERS_BY_ORDER.replace(':orderId', orderId)}`, config);
13
+ return await this.axiosInstance.get(`${GET_OUTSOURCED_ORDERS_BY_ORDER.replace(':orderId', orderId)}`, config);
14
14
  } catch (error) {
15
15
  console.error('Error fetching getOutsourcedOrdersByOrder:', error);
16
16
  throw error;
@@ -34,7 +34,7 @@ export const getOutsourcedOrdersByStore = async function (this: WashdayClientIns
34
34
  'limit',
35
35
  'sequence'
36
36
  ], params);
37
- return await axiosInstance.get(`${GET_OUTSOURCED_ORDERS_BY_STORE.replace(':storeId', params.storeId)}?${queryParams}`, config);
37
+ return await this.axiosInstance.get(`${GET_OUTSOURCED_ORDERS_BY_STORE.replace(':storeId', params.storeId)}?${queryParams}`, config);
38
38
  } catch (error) {
39
39
  console.error('Error fetching getOutsourcedOrdersByStore:', error);
40
40
  throw error;
@@ -46,7 +46,7 @@ export const getOutsourcedOrderById = async function (this: WashdayClientInstanc
46
46
  const config = {
47
47
  headers: { Authorization: `Bearer ${this.apiToken}` }
48
48
  };
49
- return await axiosInstance.get(`${GET_SET_OUTSOURCED_ORDERS}/${id}`, config);
49
+ return await this.axiosInstance.get(`${GET_SET_OUTSOURCED_ORDERS}/${id}`, config);
50
50
  } catch (error) {
51
51
  console.error('Error fetching getOutsourcedOrderById:', error);
52
52
  throw error;
@@ -16,7 +16,7 @@ export const createOutsourcedOrder = async function (this: WashdayClientInstance
16
16
  const config = {
17
17
  headers: { Authorization: `Bearer ${this.apiToken}` }
18
18
  };
19
- return await axiosInstance.post(GET_SET_OUTSOURCED_ORDERS, data, config);
19
+ return await this.axiosInstance.post(GET_SET_OUTSOURCED_ORDERS, data, config);
20
20
  } catch (error) {
21
21
  console.error('Error fetching createOutsourcedOrder:', error);
22
22
  throw error;
@@ -13,7 +13,7 @@ export const updateOutsourcedOrderById = async function (this: WashdayClientInst
13
13
  const config = {
14
14
  headers: { Authorization: `Bearer ${this.apiToken}` }
15
15
  };
16
- return await axiosInstance.put(`${GET_SET_OUTSOURCED_ORDERS}/${id}`, data, config);
16
+ return await this.axiosInstance.put(`${GET_SET_OUTSOURCED_ORDERS}/${id}`, data, config);
17
17
  } catch (error) {
18
18
  console.error('Error fetching updateOutsourcedOrderById:', error);
19
19
  throw error;
@@ -7,7 +7,7 @@ export const deletePartnerById = async function (this: WashdayClientInstance, id
7
7
  const config = {
8
8
  headers: { Authorization: `Bearer ${this.apiToken}` }
9
9
  };
10
- return await axiosInstance.delete(`${GET_SET_PARTNERS}/${id}`, config);
10
+ return await this.axiosInstance.delete(`${GET_SET_PARTNERS}/${id}`, config);
11
11
  } catch (error) {
12
12
  console.error('Error fetching deletePartnerById:', error);
13
13
  throw error;
@@ -8,7 +8,7 @@ export const getPartners = async function (this: WashdayClientInstance): Promise
8
8
  const config = {
9
9
  headers: { Authorization: `Bearer ${this.apiToken}` }
10
10
  };
11
- return await axiosInstance.get(`${GET_SET_PARTNERS}`, config);
11
+ return await this.axiosInstance.get(`${GET_SET_PARTNERS}`, config);
12
12
  } catch (error) {
13
13
  console.error('Error fetching getPartners:', error);
14
14
  throw error;
@@ -20,7 +20,7 @@ export const getPartnerById = async function (this: WashdayClientInstance, id: s
20
20
  const config = {
21
21
  headers: { Authorization: `Bearer ${this.apiToken}` }
22
22
  };
23
- return await axiosInstance.get(`${GET_SET_PARTNERS}/${id}`, config);
23
+ return await this.axiosInstance.get(`${GET_SET_PARTNERS}/${id}`, config);
24
24
  } catch (error) {
25
25
  console.error('Error fetching getPartnerById:', error);
26
26
  throw error;
@@ -13,7 +13,7 @@ export const createPartner = async function (this: WashdayClientInstance, data:
13
13
  const config = {
14
14
  headers: { Authorization: `Bearer ${this.apiToken}` }
15
15
  };
16
- return await axiosInstance.post(GET_SET_PARTNERS, data, config);
16
+ return await this.axiosInstance.post(GET_SET_PARTNERS, data, config);
17
17
  } catch (error) {
18
18
  console.error('Error fetching createPartner:', error);
19
19
  throw error;
@@ -13,7 +13,7 @@ export const updatePartnerById = async function (this: WashdayClientInstance, id
13
13
  const config = {
14
14
  headers: { Authorization: `Bearer ${this.apiToken}` }
15
15
  };
16
- return await axiosInstance.put(`${GET_SET_PARTNERS}/${id}`, data, config);
16
+ return await this.axiosInstance.put(`${GET_SET_PARTNERS}/${id}`, data, config);
17
17
  } catch (error) {
18
18
  console.error('Error fetching updatePartnerById:', error);
19
19
  throw error;
@@ -24,7 +24,7 @@ export const exportUnpaidOrdersReportPDF = async function (this: WashdayClientIn
24
24
  };
25
25
 
26
26
  const queryParams = generateQueryParamsStr(['store', 'fromDate', 'toDate', 'timezone', 'customerName'], params);
27
- return await axiosInstance.get(`${GET_SET_REPORTS}/${storeId}/unpaidOrders/export/pdf?${queryParams}`, config);
27
+ return await this.axiosInstance.get(`${GET_SET_REPORTS}/${storeId}/unpaidOrders/export/pdf?${queryParams}`, config);
28
28
 
29
29
  // // Create a link element, trigger a download
30
30
  // const url = window.URL.createObjectURL(new Blob([response.data]));
@@ -8,7 +8,7 @@ export const deleteById = async function (this: WashdayClientInstance, id: strin
8
8
  const config = {
9
9
  headers: { Authorization: `Bearer ${this.apiToken}` }
10
10
  };
11
- return await axiosInstance.delete(`${GET_SET_PRODUCTS}/${id}`, config);
11
+ return await this.axiosInstance.delete(`${GET_SET_PRODUCTS}/${id}`, config);
12
12
  } catch (error) {
13
13
  console.error('Error fetching deleteById:', error);
14
14
  throw error;
@@ -20,7 +20,7 @@ export const deleteProductSupplyById = async function (this: WashdayClientInstan
20
20
  const config = {
21
21
  headers: { Authorization: `Bearer ${this.apiToken}` }
22
22
  };
23
- return await axiosInstance.delete(`${GET_SET_PRODUCTS_SUPPLY}/${id}/${productSupplyId}`, config);
23
+ return await this.axiosInstance.delete(`${GET_SET_PRODUCTS_SUPPLY}/${id}/${productSupplyId}`, config);
24
24
  } catch (error) {
25
25
  console.error('Error fetching deleteProductSupplyById:', error);
26
26
  throw error;
@@ -33,7 +33,7 @@ export const deletePriceOption = async function (this: WashdayClientInstance, pr
33
33
  const config = {
34
34
  headers: { Authorization: `Bearer ${this.apiToken}` }
35
35
  };
36
- const response = await axiosInstance.delete(`${GET_SET_PRODUCTS}/${productId}/price-options/${optionId}`, config);
36
+ const response = await this.axiosInstance.delete(`${GET_SET_PRODUCTS}/${productId}/price-options/${optionId}`, config);
37
37
  return response.data || {};
38
38
  } catch (error) {
39
39
  console.error('Error deleting price option:', error);
@@ -8,7 +8,7 @@ export const getById = async function (this: WashdayClientInstance, id: string):
8
8
  const config = {
9
9
  headers: { Authorization: `Bearer ${this.apiToken}` }
10
10
  };
11
- return await axiosInstance.get(`${GET_SET_PRODUCTS}/${id}`, config);
11
+ return await this.axiosInstance.get(`${GET_SET_PRODUCTS}/${id}`, config);
12
12
  } catch (error) {
13
13
  console.error('Error fetching getById:', error);
14
14
  throw error;
@@ -32,7 +32,7 @@ export const create = async function (this: WashdayClientInstance, data: {
32
32
  const config = {
33
33
  headers: { Authorization: `Bearer ${this.apiToken}` }
34
34
  };
35
- const response = await axiosInstance.post(`${GET_SET_PRODUCTS}`, data, config);
35
+ const response = await this.axiosInstance.post(`${GET_SET_PRODUCTS}`, data, config);
36
36
  return response;
37
37
  } catch (error) {
38
38
  console.error('Error fetching create:', error);
@@ -48,7 +48,7 @@ export const createProductSupply = async function (this: WashdayClientInstance,
48
48
  const config = {
49
49
  headers: { Authorization: `Bearer ${this.apiToken}` }
50
50
  };
51
- const response = await axiosInstance.post(`${GET_SET_PRODUCTS_SUPPLY}/${id}`, data, config);
51
+ const response = await this.axiosInstance.post(`${GET_SET_PRODUCTS_SUPPLY}/${id}`, data, config);
52
52
  return response;
53
53
  } catch (error) {
54
54
  console.error('Error fetching createProductSupply:', error);
@@ -64,7 +64,7 @@ export const bulkCreate = async function (this: WashdayClientInstance, storeId:
64
64
  'Content-Type': 'multipart/form-data' // Let axios handle the boundary
65
65
  }
66
66
  };
67
- const response = await axiosInstance.post(`${GET_SET_PRODUCTS}/${storeId}/bulk`, data, config);
67
+ const response = await this.axiosInstance.post(`${GET_SET_PRODUCTS}/${storeId}/bulk`, data, config);
68
68
  return response.data || {};
69
69
  } catch (error) {
70
70
  console.error('Error fetching products bulkCreate:', error);
@@ -84,7 +84,7 @@ export const createPriceOption = async function (this: WashdayClientInstance, pr
84
84
  const config = {
85
85
  headers: { Authorization: `Bearer ${this.apiToken}` }
86
86
  };
87
- const response = await axiosInstance.post(`${GET_SET_PRODUCTS}/${productId}/price-options`, data, config);
87
+ const response = await this.axiosInstance.post(`${GET_SET_PRODUCTS}/${productId}/price-options`, data, config);
88
88
  return response.data || {};
89
89
  } catch (error) {
90
90
  console.error('Error creating price option:', error);
@@ -7,7 +7,7 @@ export const bulkUpdate = async function (this: WashdayClientInstance, storeId:
7
7
  const config = {
8
8
  headers: { Authorization: `Bearer ${this.apiToken}`, 'Content-Type': false }
9
9
  };
10
- const response = await axiosInstance.put(`${GET_SET_PRODUCTS}/${storeId}/bulk`, data, config);
10
+ const response = await this.axiosInstance.put(`${GET_SET_PRODUCTS}/${storeId}/bulk`, data, config);
11
11
  return response.data || {}
12
12
  } catch (error) {
13
13
  console.error('Error fetching getStoreById:', error);
@@ -41,7 +41,7 @@ export const updateById = async function (this: WashdayClientInstance, id: strin
41
41
  const config = {
42
42
  headers: { Authorization: `Bearer ${this.apiToken}` }
43
43
  };
44
- return await axiosInstance.put(`${GET_SET_PRODUCTS}/${id}`, data, config);
44
+ return await this.axiosInstance.put(`${GET_SET_PRODUCTS}/${id}`, data, config);
45
45
  } catch (error) {
46
46
  console.error('Error fetching updateById:', error);
47
47
  throw error;
@@ -60,7 +60,7 @@ export const updatePriceOption = async function (this: WashdayClientInstance, pr
60
60
  const config = {
61
61
  headers: { Authorization: `Bearer ${this.apiToken}` }
62
62
  };
63
- const response = await axiosInstance.put(`${GET_SET_PRODUCTS}/${productId}/price-options/${optionId}`, data, config);
63
+ const response = await this.axiosInstance.put(`${GET_SET_PRODUCTS}/${productId}/price-options/${optionId}`, data, config);
64
64
  return response.data || {};
65
65
  } catch (error) {
66
66
  console.error('Error updating price option:', error);
@@ -8,7 +8,7 @@ export const getOrderPublicReceipt = async function (this: WashdayClientInstance
8
8
  const config = {
9
9
  headers: { Authorization: `Bearer ${this.apiToken}` }
10
10
  };
11
- return await axiosInstance.get(`${GET_PUBLIC_ORDERS_ROUTES}/${orderPublicToken}/receipt`, config);
11
+ return await this.axiosInstance.get(`${GET_PUBLIC_ORDERS_ROUTES}/${orderPublicToken}/receipt`, config);
12
12
  } catch (error) {
13
13
  console.error('Error fetching getOrderPublicReceipt:', error);
14
14
  throw error;
@@ -24,7 +24,7 @@ export const getCleanedOrdersReport = async function (this: WashdayClientInstanc
24
24
  'timezone',
25
25
  'includeGraph',
26
26
  ], params);
27
- return await axiosInstance.get(`${GET_SET_REPORTS}/${storeId}/cleaned-orders?${queryParams}`, config);
27
+ return await this.axiosInstance.get(`${GET_SET_REPORTS}/${storeId}/cleaned-orders?${queryParams}`, config);
28
28
  } catch (error) {
29
29
  console.error('Error fetching getCleanedOrdersReport:', error);
30
30
  throw error;
@@ -45,7 +45,7 @@ export const getCleanedOrdersGraphDataReport = async function (this: WashdayClie
45
45
  'fromDate',
46
46
  'timezone',
47
47
  ], params);
48
- return await axiosInstance.get(`${GET_SET_REPORTS}/${storeId}/cleaned-orders-graph?${queryParams}`, config);
48
+ return await this.axiosInstance.get(`${GET_SET_REPORTS}/${storeId}/cleaned-orders-graph?${queryParams}`, config);
49
49
  } catch (error) {
50
50
  console.error('Error fetching getCleanedOrdersGraphDataReport :', error);
51
51
  throw error;
@@ -68,7 +68,7 @@ export const getSalesReport = async function (this: WashdayClientInstance, store
68
68
  'timezone',
69
69
  'type',
70
70
  ], params);
71
- return await axiosInstance.get(`${GET_SET_REPORTS}/${storeId}/sales?${queryParams}`, config);
71
+ return await this.axiosInstance.get(`${GET_SET_REPORTS}/${storeId}/sales?${queryParams}`, config);
72
72
  } catch (error) {
73
73
  console.error('Error fetching getSalesReport:', error);
74
74
  throw error;
@@ -88,7 +88,7 @@ export const getCustomersReport = async function (this: WashdayClientInstance, s
88
88
  'fromDate',
89
89
  'toDate',
90
90
  ], params);
91
- return await axiosInstance.get(`${GET_SET_REPORTS}/${storeId}/customers?${queryParams}`, config);
91
+ return await this.axiosInstance.get(`${GET_SET_REPORTS}/${storeId}/customers?${queryParams}`, config);
92
92
  } catch (error) {
93
93
  console.error('Error fetching getCustomersReport:', error);
94
94
  throw error;
@@ -108,7 +108,7 @@ export const getSuppliesReport = async function (this: WashdayClientInstance, st
108
108
  'fromDate',
109
109
  'toDate',
110
110
  ], params);
111
- return await axiosInstance.get(`${GET_SET_REPORTS}/${storeId}/supplies?${queryParams}`, config);
111
+ return await this.axiosInstance.get(`${GET_SET_REPORTS}/${storeId}/supplies?${queryParams}`, config);
112
112
  } catch (error) {
113
113
  console.error('Error fetching getSuppliesReport:', error);
114
114
  throw error;
@@ -123,7 +123,7 @@ export const getDiscountCodesReport = async function (this: WashdayClientInstanc
123
123
  };
124
124
  const queryParams = generateQueryParamsStr([
125
125
  ], params);
126
- return await axiosInstance.get(`${GET_SET_REPORTS}/${storeId}/discountCodes?${queryParams}`, config);
126
+ return await this.axiosInstance.get(`${GET_SET_REPORTS}/${storeId}/discountCodes?${queryParams}`, config);
127
127
  } catch (error) {
128
128
  console.error('Error fetching getDiscountCodesReport:', error);
129
129
  throw error;
@@ -143,7 +143,7 @@ export const getStaffReport = async function (this: WashdayClientInstance, store
143
143
  'fromDate',
144
144
  'toDate',
145
145
  ], params);
146
- return await axiosInstance.get(`${GET_SET_REPORTS}/${storeId}/staff?${queryParams}`, config);
146
+ return await this.axiosInstance.get(`${GET_SET_REPORTS}/${storeId}/staff?${queryParams}`, config);
147
147
  } catch (error) {
148
148
  console.error('Error fetching getStaffReport:', error);
149
149
  throw error;
@@ -164,7 +164,7 @@ export const getProductSalesReport = async function (this: WashdayClientInstance
164
164
  'fromDate',
165
165
  'timezone',
166
166
  ], params);
167
- return await axiosInstance.get(`${GET_SET_REPORTS}/${storeId}/productSales?${queryParams}`, config);
167
+ return await this.axiosInstance.get(`${GET_SET_REPORTS}/${storeId}/productSales?${queryParams}`, config);
168
168
  } catch (error) {
169
169
  console.error('Error fetching getProductSalesReport:', error);
170
170
  throw error;
@@ -189,7 +189,7 @@ export const getPaymentLinesReport = async function (this: WashdayClientInstance
189
189
  'limit',
190
190
  'timezone',
191
191
  ], params);
192
- return await axiosInstance.get(`${GET_SET_REPORTS}/${storeId}/paymentLines?${queryParams}`, config);
192
+ return await this.axiosInstance.get(`${GET_SET_REPORTS}/${storeId}/paymentLines?${queryParams}`, config);
193
193
  } catch (error) {
194
194
  console.error('Error fetching getPaymentLinesReport:', error);
195
195
  throw error;
@@ -216,7 +216,7 @@ export const getUnpaidOrdersReport = async function (this: WashdayClientInstance
216
216
  'timezone',
217
217
  'customerName'
218
218
  ], params);
219
- return await axiosInstance.get(`${GET_SET_REPORTS}/${storeId}/unpaidOrders?${queryParams}`, config);
219
+ return await this.axiosInstance.get(`${GET_SET_REPORTS}/${storeId}/unpaidOrders?${queryParams}`, config);
220
220
  } catch (error) {
221
221
  console.error('Error fetching getUnpaidOrdersReport:', error);
222
222
  throw error;
@@ -237,7 +237,7 @@ export const getAnnualSalesStatistics = async function (this: WashdayClientInsta
237
237
  'fromDate',
238
238
  'timezone',
239
239
  ], params);
240
- return await axiosInstance.get(`${GET_SET_STATISTICS}/${storeId}/annual?${queryParams}`, config);
240
+ return await this.axiosInstance.get(`${GET_SET_STATISTICS}/${storeId}/annual?${queryParams}`, config);
241
241
  } catch (error) {
242
242
  console.error('Error fetching getAnnualSalesStatistics :', error);
243
243
  throw error;
@@ -258,7 +258,7 @@ export const getPaymentMethodStatistics = async function (this: WashdayClientIns
258
258
  'fromDate',
259
259
  'timezone',
260
260
  ], params);
261
- return await axiosInstance.get(`${GET_SET_STATISTICS}/${storeId}/ordersPaymentMethod?${queryParams}`, config);
261
+ return await this.axiosInstance.get(`${GET_SET_STATISTICS}/${storeId}/ordersPaymentMethod?${queryParams}`, config);
262
262
  } catch (error) {
263
263
  console.error('Error fetching getPaymentMethodStatistics :', error);
264
264
  throw error;
@@ -279,7 +279,7 @@ export const getProductsStatistics = async function (this: WashdayClientInstance
279
279
  'fromDate',
280
280
  'timezone',
281
281
  ], params);
282
- return await axiosInstance.get(`${GET_SET_STATISTICS}/${storeId}/ordersProduct?${queryParams}`, config);
282
+ return await this.axiosInstance.get(`${GET_SET_STATISTICS}/${storeId}/ordersProduct?${queryParams}`, config);
283
283
  } catch (error) {
284
284
  console.error('Error fetching getProductsStatistics :', error);
285
285
  throw error;
@@ -300,7 +300,7 @@ export const getMonthSalesStatistics = async function (this: WashdayClientInstan
300
300
  'fromDate',
301
301
  'timezone',
302
302
  ], params);
303
- return await axiosInstance.get(`${GET_SET_STATISTICS}/${storeId}/month?${queryParams}`, config);
303
+ return await this.axiosInstance.get(`${GET_SET_STATISTICS}/${storeId}/month?${queryParams}`, config);
304
304
  } catch (error) {
305
305
  console.error('Error fetching getMonthSalesStatistics :', error);
306
306
  throw error;
@@ -321,7 +321,7 @@ export const getPopularDaysStatistics = async function (this: WashdayClientInsta
321
321
  'fromDate',
322
322
  'timezone',
323
323
  ], params);
324
- return await axiosInstance.get(`${GET_SET_STATISTICS}/${storeId}/popularDays?${queryParams}`, config);
324
+ return await this.axiosInstance.get(`${GET_SET_STATISTICS}/${storeId}/popularDays?${queryParams}`, config);
325
325
  } catch (error) {
326
326
  console.error('Error fetching getPopularDaysStatistics :', error);
327
327
  throw error;
@@ -7,7 +7,7 @@
7
7
  // const config = {
8
8
  // headers: { Authorization: `Bearer ${this.apiToken}` }
9
9
  // };
10
- // return await axiosInstance.delete(`${GET_SET_ORDER_PAYMENTLINES(orderId)}/${id}`, config);
10
+ // return await this.axiosInstance.delete(`${GET_SET_ORDER_PAYMENTLINES(orderId)}/${id}`, config);
11
11
  // } catch (error) {
12
12
  // console.error('Error fetching deleteById:', error);
13
13
  // throw error;
@@ -11,7 +11,7 @@ export const getList = async function (this: WashdayClientInstance, storeId: str
11
11
  };
12
12
  const queryParams = generateQueryParamsStr(['sortBy'], params);
13
13
 
14
- return await axiosInstance.get(`${GET_SET_REVIEWS}/${storeId}?${queryParams}`, config);
14
+ return await this.axiosInstance.get(`${GET_SET_REVIEWS}/${storeId}?${queryParams}`, config);
15
15
  } catch (error) {
16
16
  console.error('Error fetching:', error);
17
17
  throw error;
@@ -23,7 +23,7 @@ export const requestStoreReviewByCustomerId = async function (this: WashdayClien
23
23
  const config = {
24
24
  headers: { Authorization: `Bearer ${this.apiToken}` }
25
25
  };
26
- return await axiosInstance.get(`${GET_SET_REVIEWS}/request/${storeId}/${customerId}`, config);
26
+ return await this.axiosInstance.get(`${GET_SET_REVIEWS}/request/${storeId}/${customerId}`, config);
27
27
  } catch (error) {
28
28
  console.error('Error fetching:', error);
29
29
  throw error;