washday-sdk 0.0.200 → 0.0.201
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/auth/post.js +14 -0
- package/dist/api/index.js +1 -0
- package/package.json +1 -1
- package/src/api/auth/post.ts +14 -0
- package/src/api/index.ts +1 -0
- package/src/interfaces/Api.ts +1 -0
package/dist/api/auth/post.js
CHANGED
|
@@ -154,3 +154,17 @@ export const customersAppChangePassword = function (params) {
|
|
|
154
154
|
}
|
|
155
155
|
});
|
|
156
156
|
};
|
|
157
|
+
export const pinLogin = function (data) {
|
|
158
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
159
|
+
try {
|
|
160
|
+
const config = {
|
|
161
|
+
headers: { Authorization: `Bearer ${this.apiToken}` }
|
|
162
|
+
};
|
|
163
|
+
return yield axiosInstance.post(`${REGULAR_USER_AUTH}/pin-login`, data, config);
|
|
164
|
+
}
|
|
165
|
+
catch (error) {
|
|
166
|
+
console.error('Error fetching pinLogin:', error);
|
|
167
|
+
throw error;
|
|
168
|
+
}
|
|
169
|
+
});
|
|
170
|
+
};
|
package/dist/api/index.js
CHANGED
|
@@ -99,6 +99,7 @@ const WashdayClient = function WashdayClient(apiToken) {
|
|
|
99
99
|
customerRegularLogin: authEndpoints.postModule.customerRegularLogin,
|
|
100
100
|
customerSignUp: authEndpoints.postModule.customerSignUp,
|
|
101
101
|
regularUserLogin: authEndpoints.postModule.regularUserLogin,
|
|
102
|
+
pinLogin: authEndpoints.postModule.pinLogin,
|
|
102
103
|
regularUserTokenLogin: authEndpoints.postModule.regularUserTokenLogin,
|
|
103
104
|
forgotPassword: authEndpoints.postModule.customersAppForgotPassword,
|
|
104
105
|
customersAppForgotPassword: authEndpoints.postModule.customersAppForgotPassword,
|
package/package.json
CHANGED
package/src/api/auth/post.ts
CHANGED
|
@@ -181,4 +181,18 @@ export const customersAppChangePassword = async function (this: WashdayClientIns
|
|
|
181
181
|
console.error('Error fetching customerSignUp:', error);
|
|
182
182
|
throw error;
|
|
183
183
|
}
|
|
184
|
+
};
|
|
185
|
+
|
|
186
|
+
export const pinLogin = async function (this: WashdayClientInstance, data: {
|
|
187
|
+
pinCode: string;
|
|
188
|
+
}): Promise<any> {
|
|
189
|
+
try {
|
|
190
|
+
const config = {
|
|
191
|
+
headers: { Authorization: `Bearer ${this.apiToken}` }
|
|
192
|
+
};
|
|
193
|
+
return await axiosInstance.post(`${REGULAR_USER_AUTH}/pin-login`, data, config);
|
|
194
|
+
} catch (error) {
|
|
195
|
+
console.error('Error fetching pinLogin:', error);
|
|
196
|
+
throw error;
|
|
197
|
+
}
|
|
184
198
|
};
|
package/src/api/index.ts
CHANGED
|
@@ -106,6 +106,7 @@ const WashdayClient: WashdayClientConstructor = function WashdayClient(this: Was
|
|
|
106
106
|
customerRegularLogin: authEndpoints.postModule.customerRegularLogin,
|
|
107
107
|
customerSignUp: authEndpoints.postModule.customerSignUp,
|
|
108
108
|
regularUserLogin: authEndpoints.postModule.regularUserLogin,
|
|
109
|
+
pinLogin: authEndpoints.postModule.pinLogin,
|
|
109
110
|
regularUserTokenLogin: authEndpoints.postModule.regularUserTokenLogin,
|
|
110
111
|
forgotPassword: authEndpoints.postModule.customersAppForgotPassword,
|
|
111
112
|
customersAppForgotPassword: authEndpoints.postModule.customersAppForgotPassword,
|
package/src/interfaces/Api.ts
CHANGED
|
@@ -69,6 +69,7 @@ export interface WashdayClientInstance {
|
|
|
69
69
|
customerRegularLogin: typeof authEndpoints.postModule.customerRegularLogin;
|
|
70
70
|
customerSignUp: typeof authEndpoints.postModule.customerSignUp;
|
|
71
71
|
regularUserLogin: typeof authEndpoints.postModule.regularUserLogin;
|
|
72
|
+
pinLogin: typeof authEndpoints.postModule.pinLogin;
|
|
72
73
|
regularUserTokenLogin: typeof authEndpoints.postModule.regularUserTokenLogin;
|
|
73
74
|
forgotPassword: typeof authEndpoints.postModule.forgotPassword;
|
|
74
75
|
customersAppForgotPassword: typeof authEndpoints.postModule.customersAppForgotPassword;
|