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 +1 -0
- package/dist/api/order/post.js +14 -0
- package/package.json +1 -1
- package/src/api/index.ts +1 -0
- package/src/api/order/post.ts +17 -0
- package/src/interfaces/Api.ts +1 -0
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,
|
package/dist/api/order/post.js
CHANGED
|
@@ -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
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,
|
package/src/api/order/post.ts
CHANGED
|
@@ -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
|
};
|
package/src/interfaces/Api.ts
CHANGED
|
@@ -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;
|