washday-sdk 0.0.141 → 0.0.142

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
@@ -100,6 +100,7 @@ const WashdayClient = function WashdayClient(apiToken) {
100
100
  createPaymentLine: ordersEndpoints.postModule.createPaymentLine,
101
101
  sendEmailReceipt: ordersEndpoints.postModule.sendEmailReceipt,
102
102
  createOrderCustomersApp: ordersEndpoints.postModule.createOrderCustomersApp,
103
+ createOrderUsersApp: ordersEndpoints.postModule.createOrderUsersApp,
103
104
  deletePaymentLineById: ordersEndpoints.deleteModule.deletePaymentLineById,
104
105
  getListCustomersApp: ordersEndpoints.getModule.getListCustomersApp,
105
106
  getByIdCustomersApp: ordersEndpoints.getModule.getByIdCustomersApp,
@@ -53,3 +53,17 @@ export const createOrderCustomersApp = function (data) {
53
53
  }
54
54
  });
55
55
  };
56
+ export const createOrderUsersApp = function (data) {
57
+ return __awaiter(this, void 0, void 0, function* () {
58
+ try {
59
+ const config = {
60
+ headers: { Authorization: `Bearer ${this.apiToken}` }
61
+ };
62
+ return yield axiosInstance.post(`${GET_SET_ORDER}`, data, config);
63
+ }
64
+ catch (error) {
65
+ console.error('Error fetching createOrderUsersApp:', error);
66
+ throw error;
67
+ }
68
+ });
69
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "washday-sdk",
3
- "version": "0.0.141",
3
+ "version": "0.0.142",
4
4
  "description": "Washday utilities functions and API",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
package/src/api/index.ts CHANGED
@@ -106,6 +106,7 @@ const WashdayClient: WashdayClientConstructor = function WashdayClient(this: Was
106
106
  createPaymentLine: ordersEndpoints.postModule.createPaymentLine,
107
107
  sendEmailReceipt: ordersEndpoints.postModule.sendEmailReceipt,
108
108
  createOrderCustomersApp: ordersEndpoints.postModule.createOrderCustomersApp,
109
+ createOrderUsersApp: ordersEndpoints.postModule.createOrderUsersApp,
109
110
  deletePaymentLineById: ordersEndpoints.deleteModule.deletePaymentLineById,
110
111
  getListCustomersApp: ordersEndpoints.getModule.getListCustomersApp,
111
112
  getByIdCustomersApp: ordersEndpoints.getModule.getByIdCustomersApp,
@@ -45,4 +45,16 @@ export const createOrderCustomersApp = async function (this: WashdayClientInstan
45
45
  console.error('Error fetching createOrderCustomersApp:', error);
46
46
  throw error;
47
47
  }
48
+ };
49
+
50
+ export const createOrderUsersApp = async function (this: WashdayClientInstance, data: OrderDto): Promise<any> {
51
+ try {
52
+ const config = {
53
+ headers: { Authorization: `Bearer ${this.apiToken}` }
54
+ };
55
+ return await axiosInstance.post(`${GET_SET_ORDER}`, data, config);
56
+ } catch (error) {
57
+ console.error('Error fetching createOrderUsersApp:', error);
58
+ throw error;
59
+ }
48
60
  };
@@ -92,6 +92,7 @@ export interface WashdayClientInstance {
92
92
  setOrdeDeliveredBySequence: typeof ordersEndpoints.putModule.setOrdeDeliveredBySequence,
93
93
  createPaymentLine: typeof ordersEndpoints.postModule.createPaymentLine;
94
94
  createOrderCustomersApp: typeof ordersEndpoints.postModule.createOrderCustomersApp,
95
+ createOrderUsersApp: typeof ordersEndpoints.postModule.createOrderUsersApp,
95
96
  deletePaymentLineById: typeof ordersEndpoints.deleteModule.deletePaymentLineById;
96
97
  getListCustomersApp: typeof ordersEndpoints.getModule.getListCustomersApp;
97
98
  getByIdCustomersApp: typeof ordersEndpoints.getModule.getByIdCustomersApp;
@@ -8,8 +8,6 @@ export const calculateTotalTaxesOverPrice = (
8
8
  storeDiscounts: any[],
9
9
  appliedOrderDiscounts: any,
10
10
  discountCodeObj: any | null
11
-
12
-
13
11
  ) => {
14
12
  const productTableImports = [...order.products, ...order.buyAndGetProducts].map((current) => {
15
13
  let discPercentageInteger = 0;