washday-sdk 0.0.137 → 0.0.138
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 +13 -0
- package/dist/api/index.js +1 -0
- package/package.json +1 -1
- package/src/api/auth/post.ts +15 -1
- package/src/api/index.ts +1 -0
- package/src/interfaces/Api.ts +1 -0
package/dist/api/auth/post.js
CHANGED
|
@@ -9,6 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
};
|
|
10
10
|
import axiosInstance from "../axiosInstance";
|
|
11
11
|
const GET_AUTH = "api/v2/washdayapp/auth";
|
|
12
|
+
const REGULAR_USER_AUTH = "api/auth";
|
|
12
13
|
export const appleLogin = function (params) {
|
|
13
14
|
return __awaiter(this, void 0, void 0, function* () {
|
|
14
15
|
try {
|
|
@@ -57,3 +58,15 @@ export const googleLogin = function (params) {
|
|
|
57
58
|
}
|
|
58
59
|
});
|
|
59
60
|
};
|
|
61
|
+
export const regularUserLogin = function (params) {
|
|
62
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
63
|
+
try {
|
|
64
|
+
const config = {};
|
|
65
|
+
return yield axiosInstance.post(`${REGULAR_USER_AUTH}/login`, params, config);
|
|
66
|
+
}
|
|
67
|
+
catch (error) {
|
|
68
|
+
console.error('Error fetching regularUserLogin:', error);
|
|
69
|
+
throw error;
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
};
|
package/dist/api/index.js
CHANGED
|
@@ -78,6 +78,7 @@ const WashdayClient = function WashdayClient(apiToken) {
|
|
|
78
78
|
appleLogin: authEndpoints.postModule.appleLogin,
|
|
79
79
|
customerRegularLogin: authEndpoints.postModule.customerRegularLogin,
|
|
80
80
|
customerSignUp: authEndpoints.postModule.customerSignUp,
|
|
81
|
+
regularUserLogin: authEndpoints.postModule.regularUserLogin,
|
|
81
82
|
});
|
|
82
83
|
this.orders = bindMethods(this, {
|
|
83
84
|
getList: ordersEndpoints.getModule.getList,
|
package/package.json
CHANGED
package/src/api/auth/post.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { WashdayClientInstance } from "../../interfaces/Api";
|
|
|
3
3
|
import { AppleAuthenticationCredential } from "../../interfaces/Apple";
|
|
4
4
|
import axiosInstance from "../axiosInstance";
|
|
5
5
|
const GET_AUTH = "api/v2/washdayapp/auth"
|
|
6
|
+
const REGULAR_USER_AUTH = "api/auth"
|
|
6
7
|
|
|
7
8
|
export const appleLogin = async function (this: WashdayClientInstance, params: {
|
|
8
9
|
companyId: string;
|
|
@@ -68,4 +69,17 @@ export const googleLogin = async function (this: WashdayClientInstance, params:
|
|
|
68
69
|
console.error('Error fetching googleLogin:', error);
|
|
69
70
|
throw error;
|
|
70
71
|
}
|
|
71
|
-
};
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
export const regularUserLogin = async function (this: WashdayClientInstance, params: {
|
|
75
|
+
email: string
|
|
76
|
+
password: string
|
|
77
|
+
}): Promise<any> {
|
|
78
|
+
try {
|
|
79
|
+
const config = {};
|
|
80
|
+
return await axiosInstance.post(`${REGULAR_USER_AUTH}/login`, params, config);
|
|
81
|
+
} catch (error) {
|
|
82
|
+
console.error('Error fetching regularUserLogin:', error);
|
|
83
|
+
throw error;
|
|
84
|
+
}
|
|
85
|
+
};
|
package/src/api/index.ts
CHANGED
|
@@ -84,6 +84,7 @@ const WashdayClient: WashdayClientConstructor = function WashdayClient(this: Was
|
|
|
84
84
|
appleLogin: authEndpoints.postModule.appleLogin,
|
|
85
85
|
customerRegularLogin: authEndpoints.postModule.customerRegularLogin,
|
|
86
86
|
customerSignUp: authEndpoints.postModule.customerSignUp,
|
|
87
|
+
regularUserLogin: authEndpoints.postModule.regularUserLogin,
|
|
87
88
|
});
|
|
88
89
|
this.orders = bindMethods(this, {
|
|
89
90
|
getList: ordersEndpoints.getModule.getList,
|
package/src/interfaces/Api.ts
CHANGED
|
@@ -60,6 +60,7 @@ export interface WashdayClientInstance {
|
|
|
60
60
|
appleLogin: typeof authEndpoints.postModule.appleLogin;
|
|
61
61
|
customerRegularLogin: typeof authEndpoints.postModule.customerRegularLogin;
|
|
62
62
|
customerSignUp: typeof authEndpoints.postModule.customerSignUp;
|
|
63
|
+
regularUserLogin: typeof authEndpoints.postModule.regularUserLogin;
|
|
63
64
|
}
|
|
64
65
|
review: {
|
|
65
66
|
getList: typeof reviewsEndpoints.getModule.getList;
|