washday-sdk 0.0.140 → 0.0.141

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,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "washday-sdk",
3
- "version": "0.0.140",
3
+ "version": "0.0.141",
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,
@@ -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;