washday-sdk 0.0.110 → 0.0.111
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/get.js +14 -0
- package/package.json +1 -1
- package/src/api/index.ts +1 -0
- package/src/api/order/get.ts +12 -0
- package/src/interfaces/Api.ts +1 -0
package/dist/api/index.js
CHANGED
|
@@ -91,6 +91,7 @@ const WashdayClient = function WashdayClient(apiToken) {
|
|
|
91
91
|
sendEmailReceipt: ordersEndpoints.postModule.sendEmailReceipt,
|
|
92
92
|
deletePaymentLineById: ordersEndpoints.deleteModule.deletePaymentLineById,
|
|
93
93
|
getListCustomersApp: ordersEndpoints.getModule.getListCustomersApp,
|
|
94
|
+
getByIdCustomersApp: ordersEndpoints.getModule.getByIdCustomersApp,
|
|
94
95
|
});
|
|
95
96
|
this.customers = bindMethods(this, {
|
|
96
97
|
getCustomers: customersEndpoints.getModule.getList,
|
package/dist/api/order/get.js
CHANGED
|
@@ -140,3 +140,17 @@ export const getListCustomersApp = function (params) {
|
|
|
140
140
|
}
|
|
141
141
|
});
|
|
142
142
|
};
|
|
143
|
+
export const getByIdCustomersApp = function (id) {
|
|
144
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
145
|
+
try {
|
|
146
|
+
const config = {
|
|
147
|
+
headers: { Authorization: `Bearer ${this.apiToken}` }
|
|
148
|
+
};
|
|
149
|
+
return yield axiosInstance.get(`${GET_SET_ORDER_CUSTOMERS_APP}/${id}`, config);
|
|
150
|
+
}
|
|
151
|
+
catch (error) {
|
|
152
|
+
console.error('Error fetching:', error);
|
|
153
|
+
throw error;
|
|
154
|
+
}
|
|
155
|
+
});
|
|
156
|
+
};
|
package/package.json
CHANGED
package/src/api/index.ts
CHANGED
|
@@ -97,6 +97,7 @@ const WashdayClient: WashdayClientConstructor = function WashdayClient(this: Was
|
|
|
97
97
|
sendEmailReceipt: ordersEndpoints.postModule.sendEmailReceipt,
|
|
98
98
|
deletePaymentLineById: ordersEndpoints.deleteModule.deletePaymentLineById,
|
|
99
99
|
getListCustomersApp: ordersEndpoints.getModule.getListCustomersApp,
|
|
100
|
+
getByIdCustomersApp: ordersEndpoints.getModule.getByIdCustomersApp,
|
|
100
101
|
});
|
|
101
102
|
this.customers = bindMethods(this, {
|
|
102
103
|
getCustomers: customersEndpoints.getModule.getList,
|
package/src/api/order/get.ts
CHANGED
|
@@ -160,3 +160,15 @@ export const getListCustomersApp = async function (this: WashdayClientInstance,
|
|
|
160
160
|
throw error;
|
|
161
161
|
}
|
|
162
162
|
};
|
|
163
|
+
|
|
164
|
+
export const getByIdCustomersApp = async function (this: WashdayClientInstance, id: string): Promise<IOrder> {
|
|
165
|
+
try {
|
|
166
|
+
const config = {
|
|
167
|
+
headers: { Authorization: `Bearer ${this.apiToken}` }
|
|
168
|
+
};
|
|
169
|
+
return await axiosInstance.get(`${GET_SET_ORDER_CUSTOMERS_APP}/${id}`, config);
|
|
170
|
+
} catch (error) {
|
|
171
|
+
console.error('Error fetching:', error);
|
|
172
|
+
throw error;
|
|
173
|
+
}
|
|
174
|
+
}
|
package/src/interfaces/Api.ts
CHANGED
|
@@ -83,6 +83,7 @@ export interface WashdayClientInstance {
|
|
|
83
83
|
createPaymentLine: typeof ordersEndpoints.postModule.createPaymentLine;
|
|
84
84
|
deletePaymentLineById: typeof ordersEndpoints.deleteModule.deletePaymentLineById;
|
|
85
85
|
getListCustomersApp: typeof ordersEndpoints.getModule.getListCustomersApp;
|
|
86
|
+
getByIdCustomersApp: typeof ordersEndpoints.getModule.getByIdCustomersApp;
|
|
86
87
|
};
|
|
87
88
|
customers: {
|
|
88
89
|
getCustomers: typeof customersEndpoints.getModule.getList;
|