washday-sdk 0.0.140 → 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.
@@ -82,3 +82,15 @@ export const regularUserTokenLogin = function (params) {
82
82
  }
83
83
  });
84
84
  };
85
+ export const forgotPassword = function (params) {
86
+ return __awaiter(this, void 0, void 0, function* () {
87
+ try {
88
+ const config = {};
89
+ return yield axiosInstance.post(`${REGULAR_USER_AUTH}/forget-password`, params, config);
90
+ }
91
+ catch (error) {
92
+ console.error('Error fetching forgotPassword:', error);
93
+ throw error;
94
+ }
95
+ });
96
+ };
package/dist/api/index.js CHANGED
@@ -81,6 +81,7 @@ const WashdayClient = function WashdayClient(apiToken) {
81
81
  customerSignUp: authEndpoints.postModule.customerSignUp,
82
82
  regularUserLogin: authEndpoints.postModule.regularUserLogin,
83
83
  regularUserTokenLogin: authEndpoints.postModule.regularUserTokenLogin,
84
+ forgotPassword: authEndpoints.postModule.forgotPassword,
84
85
  });
85
86
  this.orders = bindMethods(this, {
86
87
  getList: ordersEndpoints.getModule.getList,
@@ -99,6 +100,7 @@ const WashdayClient = function WashdayClient(apiToken) {
99
100
  createPaymentLine: ordersEndpoints.postModule.createPaymentLine,
100
101
  sendEmailReceipt: ordersEndpoints.postModule.sendEmailReceipt,
101
102
  createOrderCustomersApp: ordersEndpoints.postModule.createOrderCustomersApp,
103
+ createOrderUsersApp: ordersEndpoints.postModule.createOrderUsersApp,
102
104
  deletePaymentLineById: ordersEndpoints.deleteModule.deletePaymentLineById,
103
105
  getListCustomersApp: ordersEndpoints.getModule.getListCustomersApp,
104
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.140",
3
+ "version": "0.0.142",
4
4
  "description": "Washday utilities functions and API",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -96,3 +96,16 @@ export const regularUserTokenLogin = async function (this: WashdayClientInstance
96
96
  throw error;
97
97
  }
98
98
  };
99
+
100
+
101
+ export const forgotPassword = async function (this: WashdayClientInstance, params: {
102
+ email: string;
103
+ }): Promise<any> {
104
+ try {
105
+ const config = {};
106
+ return await axiosInstance.post(`${REGULAR_USER_AUTH}/forget-password`, params, config);
107
+ } catch (error) {
108
+ console.error('Error fetching forgotPassword:', error);
109
+ throw error;
110
+ }
111
+ };
package/src/api/index.ts CHANGED
@@ -87,6 +87,7 @@ const WashdayClient: WashdayClientConstructor = function WashdayClient(this: Was
87
87
  customerSignUp: authEndpoints.postModule.customerSignUp,
88
88
  regularUserLogin: authEndpoints.postModule.regularUserLogin,
89
89
  regularUserTokenLogin: authEndpoints.postModule.regularUserTokenLogin,
90
+ forgotPassword: authEndpoints.postModule.forgotPassword,
90
91
  });
91
92
  this.orders = bindMethods(this, {
92
93
  getList: ordersEndpoints.getModule.getList,
@@ -105,6 +106,7 @@ const WashdayClient: WashdayClientConstructor = function WashdayClient(this: Was
105
106
  createPaymentLine: ordersEndpoints.postModule.createPaymentLine,
106
107
  sendEmailReceipt: ordersEndpoints.postModule.sendEmailReceipt,
107
108
  createOrderCustomersApp: ordersEndpoints.postModule.createOrderCustomersApp,
109
+ createOrderUsersApp: ordersEndpoints.postModule.createOrderUsersApp,
108
110
  deletePaymentLineById: ordersEndpoints.deleteModule.deletePaymentLineById,
109
111
  getListCustomersApp: ordersEndpoints.getModule.getListCustomersApp,
110
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
  };
@@ -63,6 +63,7 @@ export interface WashdayClientInstance {
63
63
  customerSignUp: typeof authEndpoints.postModule.customerSignUp;
64
64
  regularUserLogin: typeof authEndpoints.postModule.regularUserLogin;
65
65
  regularUserTokenLogin: typeof authEndpoints.postModule.regularUserTokenLogin;
66
+ forgotPassword: typeof authEndpoints.postModule.forgotPassword;
66
67
  }
67
68
  review: {
68
69
  getList: typeof reviewsEndpoints.getModule.getList;
@@ -91,6 +92,7 @@ export interface WashdayClientInstance {
91
92
  setOrdeDeliveredBySequence: typeof ordersEndpoints.putModule.setOrdeDeliveredBySequence,
92
93
  createPaymentLine: typeof ordersEndpoints.postModule.createPaymentLine;
93
94
  createOrderCustomersApp: typeof ordersEndpoints.postModule.createOrderCustomersApp,
95
+ createOrderUsersApp: typeof ordersEndpoints.postModule.createOrderUsersApp,
94
96
  deletePaymentLineById: typeof ordersEndpoints.deleteModule.deletePaymentLineById;
95
97
  getListCustomersApp: typeof ordersEndpoints.getModule.getListCustomersApp;
96
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;