washday-sdk 1.6.2 → 1.6.3

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/index.js CHANGED
@@ -134,6 +134,7 @@ const WashdayClient = function WashdayClient(apiToken, env = 'PROD', clientId, c
134
134
  bulkCreatePaymentLines: ordersEndpoints.postModule.bulkCreatePaymentLines,
135
135
  createOrderEvidence: ordersEndpoints.postModule.createOrderEvidence,
136
136
  getRedeemPointsPreview: ordersEndpoints.postModule.getRedeemPointsPreview,
137
+ setOrderUncollected: ordersEndpoints.postModule.setOrderUncollected,
137
138
  deletePaymentLineById: ordersEndpoints.deleteModule.deletePaymentLineById,
138
139
  getListCustomersApp: ordersEndpoints.getModule.getListCustomersApp,
139
140
  getByIdCustomersApp: ordersEndpoints.getModule.getByIdCustomersApp,
@@ -112,3 +112,17 @@ export const getRedeemPointsPreview = function (data) {
112
112
  }
113
113
  });
114
114
  };
115
+ export const setOrderUncollected = function (data) {
116
+ return __awaiter(this, void 0, void 0, function* () {
117
+ try {
118
+ const config = {
119
+ headers: { Authorization: `Bearer ${this.apiToken}` }
120
+ };
121
+ return yield this.axiosInstance.post(`${GET_SET_ORDER}/uncollected`, data, config);
122
+ }
123
+ catch (error) {
124
+ console.error('Error fetching setOrderUncollected:', error);
125
+ throw error;
126
+ }
127
+ });
128
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "washday-sdk",
3
- "version": "1.6.2",
3
+ "version": "1.6.3",
4
4
  "description": "Washday utilities functions and API",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
package/src/api/index.ts CHANGED
@@ -141,6 +141,7 @@ const WashdayClient: WashdayClientConstructor = function WashdayClient(this: Was
141
141
  bulkCreatePaymentLines: ordersEndpoints.postModule.bulkCreatePaymentLines,
142
142
  createOrderEvidence: ordersEndpoints.postModule.createOrderEvidence,
143
143
  getRedeemPointsPreview: ordersEndpoints.postModule.getRedeemPointsPreview,
144
+ setOrderUncollected: ordersEndpoints.postModule.setOrderUncollected,
144
145
  deletePaymentLineById: ordersEndpoints.deleteModule.deletePaymentLineById,
145
146
  getListCustomersApp: ordersEndpoints.getModule.getListCustomersApp,
146
147
  getByIdCustomersApp: ordersEndpoints.getModule.getByIdCustomersApp,
@@ -115,4 +115,21 @@ export const getRedeemPointsPreview = async function (this: WashdayClientInstanc
115
115
  console.error('Error fetching getRedeemPointsPreview:', error);
116
116
  throw error;
117
117
  }
118
+ };
119
+
120
+ export const setOrderUncollected = async function (this: WashdayClientInstance, data: {
121
+ orderId?: string;
122
+ orderSequence?: string;
123
+ orderStore?: string;
124
+ reason?: 'abandoned' | 'sent_to_warehouse' | 'donated' | 'discarded' | 'other';
125
+ }): Promise<any> {
126
+ try {
127
+ const config = {
128
+ headers: { Authorization: `Bearer ${this.apiToken}` }
129
+ };
130
+ return await this.axiosInstance.post(`${GET_SET_ORDER}/uncollected`, data, config);
131
+ } catch (error) {
132
+ console.error('Error fetching setOrderUncollected:', error);
133
+ throw error;
134
+ }
118
135
  };
@@ -126,6 +126,7 @@ export interface WashdayClientInstance {
126
126
  bulkCreatePaymentLines: typeof ordersEndpoints.postModule.bulkCreatePaymentLines,
127
127
  createOrderEvidence: typeof ordersEndpoints.postModule.createOrderEvidence,
128
128
  getRedeemPointsPreview: typeof ordersEndpoints.postModule.getRedeemPointsPreview,
129
+ setOrderUncollected: typeof ordersEndpoints.postModule.setOrderUncollected,
129
130
  deletePaymentLineById: typeof ordersEndpoints.deleteModule.deletePaymentLineById;
130
131
  getListCustomersApp: typeof ordersEndpoints.getModule.getListCustomersApp;
131
132
  getByIdCustomersApp: typeof ordersEndpoints.getModule.getByIdCustomersApp;