washday-sdk 0.0.182 → 0.0.183

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
@@ -118,6 +118,7 @@ const WashdayClient = function WashdayClient(apiToken) {
118
118
  createOrderCustomersApp: ordersEndpoints.postModule.createOrderCustomersApp,
119
119
  createOrderUsersApp: ordersEndpoints.postModule.createOrderUsersApp,
120
120
  bulkCreatePaymentLines: ordersEndpoints.postModule.bulkCreatePaymentLines,
121
+ createOrderEvidence: ordersEndpoints.postModule.createOrderEvidence,
121
122
  deletePaymentLineById: ordersEndpoints.deleteModule.deletePaymentLineById,
122
123
  getListCustomersApp: ordersEndpoints.getModule.getListCustomersApp,
123
124
  getByIdCustomersApp: ordersEndpoints.getModule.getByIdCustomersApp,
@@ -81,3 +81,21 @@ export const bulkCreatePaymentLines = function (storeId, body) {
81
81
  }
82
82
  });
83
83
  };
84
+ export const createOrderEvidence = function (orderId, data) {
85
+ return __awaiter(this, void 0, void 0, function* () {
86
+ try {
87
+ const config = {
88
+ headers: {
89
+ Authorization: `Bearer ${this.apiToken}`,
90
+ // 'Content-Type': 'multipart/form-data',
91
+ 'Content-Type': false
92
+ }
93
+ };
94
+ return yield axiosInstance.post(`${GET_SET_ORDER}/${orderId}/evidence`, data, config);
95
+ }
96
+ catch (error) {
97
+ console.error('Error fetching createOrderEvidence:', error);
98
+ throw error;
99
+ }
100
+ });
101
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "washday-sdk",
3
- "version": "0.0.182",
3
+ "version": "0.0.183",
4
4
  "description": "Washday utilities functions and API",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
package/src/api/index.ts CHANGED
@@ -125,6 +125,7 @@ const WashdayClient: WashdayClientConstructor = function WashdayClient(this: Was
125
125
  createOrderCustomersApp: ordersEndpoints.postModule.createOrderCustomersApp,
126
126
  createOrderUsersApp: ordersEndpoints.postModule.createOrderUsersApp,
127
127
  bulkCreatePaymentLines: ordersEndpoints.postModule.bulkCreatePaymentLines,
128
+ createOrderEvidence: ordersEndpoints.postModule.createOrderEvidence,
128
129
  deletePaymentLineById: ordersEndpoints.deleteModule.deletePaymentLineById,
129
130
  getListCustomersApp: ordersEndpoints.getModule.getListCustomersApp,
130
131
  getByIdCustomersApp: ordersEndpoints.getModule.getByIdCustomersApp,
@@ -80,4 +80,21 @@ export const bulkCreatePaymentLines = async function (this: WashdayClientInstanc
80
80
  console.error('Error fetching bulkCreatePaymentLines:', error);
81
81
  throw error;
82
82
  }
83
+ };
84
+
85
+
86
+ export const createOrderEvidence = async function (this: WashdayClientInstance, orderId: string, data: FormData): Promise<any> {
87
+ try {
88
+ const config = {
89
+ headers: {
90
+ Authorization: `Bearer ${this.apiToken}`,
91
+ // 'Content-Type': 'multipart/form-data',
92
+ 'Content-Type': false
93
+ }
94
+ };
95
+ return await axiosInstance.post(`${GET_SET_ORDER}/${orderId}/evidence`, data, config);
96
+ } catch (error) {
97
+ console.error('Error fetching createOrderEvidence:', error);
98
+ throw error;
99
+ }
83
100
  };
@@ -110,6 +110,7 @@ export interface WashdayClientInstance {
110
110
  createOrderCustomersApp: typeof ordersEndpoints.postModule.createOrderCustomersApp,
111
111
  createOrderUsersApp: typeof ordersEndpoints.postModule.createOrderUsersApp,
112
112
  bulkCreatePaymentLines: typeof ordersEndpoints.postModule.bulkCreatePaymentLines,
113
+ createOrderEvidence: typeof ordersEndpoints.postModule.createOrderEvidence,
113
114
  deletePaymentLineById: typeof ordersEndpoints.deleteModule.deletePaymentLineById;
114
115
  getListCustomersApp: typeof ordersEndpoints.getModule.getListCustomersApp;
115
116
  getByIdCustomersApp: typeof ordersEndpoints.getModule.getByIdCustomersApp;