washday-sdk 0.0.152 → 0.0.153

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.
@@ -106,3 +106,27 @@ export const forgotPassword = function (params) {
106
106
  }
107
107
  });
108
108
  };
109
+ export const customersAppForgotPassword = function (companyId, params) {
110
+ return __awaiter(this, void 0, void 0, function* () {
111
+ try {
112
+ const config = {};
113
+ return yield axiosInstance.post(`${CUSTOMERSAPP_GET_AUTH}/${companyId}/forget-password`, params, config);
114
+ }
115
+ catch (error) {
116
+ console.error('Error fetching customersAppForgotPassword:', error);
117
+ throw error;
118
+ }
119
+ });
120
+ };
121
+ export const customersAppChangePassword = function (params) {
122
+ return __awaiter(this, void 0, void 0, function* () {
123
+ try {
124
+ const config = {};
125
+ return yield axiosInstance.post(`${CUSTOMERSAPP_GET_AUTH}/change-password`, params, config);
126
+ }
127
+ catch (error) {
128
+ console.error('Error fetching customerSignUp:', error);
129
+ throw error;
130
+ }
131
+ });
132
+ };
package/dist/api/index.js CHANGED
@@ -82,7 +82,9 @@ const WashdayClient = function WashdayClient(apiToken) {
82
82
  customerSignUp: authEndpoints.postModule.customerSignUp,
83
83
  regularUserLogin: authEndpoints.postModule.regularUserLogin,
84
84
  regularUserTokenLogin: authEndpoints.postModule.regularUserTokenLogin,
85
- forgotPassword: authEndpoints.postModule.forgotPassword,
85
+ forgotPassword: authEndpoints.postModule.customersAppForgotPassword,
86
+ customersAppForgotPassword: authEndpoints.postModule.customersAppForgotPassword,
87
+ customersAppChangePassword: authEndpoints.postModule.customersAppChangePassword,
86
88
  });
87
89
  this.orders = bindMethods(this, {
88
90
  getList: ordersEndpoints.getModule.getList,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "washday-sdk",
3
- "version": "0.0.152",
3
+ "version": "0.0.153",
4
4
  "description": "Washday utilities functions and API",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -121,3 +121,29 @@ export const forgotPassword = async function (this: WashdayClientInstance, param
121
121
  throw error;
122
122
  }
123
123
  };
124
+
125
+
126
+ export const customersAppForgotPassword = async function (this: WashdayClientInstance, companyId: string, params: {
127
+ email: string;
128
+ }): Promise<any> {
129
+ try {
130
+ const config = {};
131
+ return await axiosInstance.post(`${CUSTOMERSAPP_GET_AUTH}/${companyId}/forget-password`, params, config);
132
+ } catch (error) {
133
+ console.error('Error fetching customersAppForgotPassword:', error);
134
+ throw error;
135
+ }
136
+ };
137
+
138
+ export const customersAppChangePassword = async function (this: WashdayClientInstance, params: {
139
+ password: string
140
+ token: string | null
141
+ }): Promise<any> {
142
+ try {
143
+ const config = {};
144
+ return await axiosInstance.post(`${CUSTOMERSAPP_GET_AUTH}/change-password`, params, config);
145
+ } catch (error) {
146
+ console.error('Error fetching customerSignUp:', error);
147
+ throw error;
148
+ }
149
+ };
package/src/api/index.ts CHANGED
@@ -37,6 +37,7 @@ import * as reviewsEndpoints from './reviews';
37
37
  import * as cfdiEndpoints from './cfdi';
38
38
  import * as cashupsEndpoints from './cashups';
39
39
  import { deleteUserById } from "./users/delete";
40
+ import { customersAppChangePassword } from './auth/post';
40
41
 
41
42
  type WashdayClientConstructor = {
42
43
  new(apiToken: string): WashdayClientInstance
@@ -88,7 +89,9 @@ const WashdayClient: WashdayClientConstructor = function WashdayClient(this: Was
88
89
  customerSignUp: authEndpoints.postModule.customerSignUp,
89
90
  regularUserLogin: authEndpoints.postModule.regularUserLogin,
90
91
  regularUserTokenLogin: authEndpoints.postModule.regularUserTokenLogin,
91
- forgotPassword: authEndpoints.postModule.forgotPassword,
92
+ forgotPassword: authEndpoints.postModule.customersAppForgotPassword,
93
+ customersAppForgotPassword: authEndpoints.postModule.customersAppForgotPassword,
94
+ customersAppChangePassword: authEndpoints.postModule.customersAppChangePassword,
92
95
  });
93
96
  this.orders = bindMethods(this, {
94
97
  getList: ordersEndpoints.getModule.getList,
@@ -65,6 +65,8 @@ export interface WashdayClientInstance {
65
65
  regularUserLogin: typeof authEndpoints.postModule.regularUserLogin;
66
66
  regularUserTokenLogin: typeof authEndpoints.postModule.regularUserTokenLogin;
67
67
  forgotPassword: typeof authEndpoints.postModule.forgotPassword;
68
+ customersAppForgotPassword: typeof authEndpoints.postModule.customersAppForgotPassword;
69
+ customersAppChangePassword: typeof authEndpoints.postModule.customersAppChangePassword;
68
70
  }
69
71
  review: {
70
72
  getList: typeof reviewsEndpoints.getModule.getList;
@@ -15,6 +15,8 @@ export interface IStore {
15
15
  state: string,
16
16
  country: string,
17
17
  phone: string,
18
+ phoneCountryCode?: string,
19
+ phoneCountryName?: string,
18
20
  taxesType: string,
19
21
  taxOne?: ITax,
20
22
  isActive: boolean,