@movalib/movalib-commons 1.2.11 → 1.2.12
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.
|
@@ -3,6 +3,7 @@ import { MovaAppType } from "../helpers/Enums";
|
|
|
3
3
|
import Garage from "../models/Garage";
|
|
4
4
|
import User from "../models/User";
|
|
5
5
|
export default class UserService {
|
|
6
|
+
static existsByPhoneNumber(phoneNumber: string): Promise<APIResponse<User>>;
|
|
6
7
|
static reestPassword(req: any): Promise<APIResponse<string>>;
|
|
7
8
|
static resendSecurityCode(req: any): Promise<APIResponse<string>>;
|
|
8
9
|
static getSalesGarages(salesId: string): Promise<APIResponse<Garage[]>>;
|
|
@@ -45,6 +45,12 @@ var Logger_1 = __importDefault(require("../helpers/Logger"));
|
|
|
45
45
|
var UserService = /** @class */ (function () {
|
|
46
46
|
function UserService() {
|
|
47
47
|
}
|
|
48
|
+
UserService.existsByPhoneNumber = function (phoneNumber) {
|
|
49
|
+
return (0, ApiHelper_1.request)({
|
|
50
|
+
url: "".concat(ApiHelper_1.API_BASE_URL, "/user/phone-number/").concat(phoneNumber),
|
|
51
|
+
method: Enums_1.APIMethod.GET
|
|
52
|
+
});
|
|
53
|
+
};
|
|
48
54
|
UserService.reestPassword = function (req) {
|
|
49
55
|
return (0, ApiHelper_1.request)({
|
|
50
56
|
url: "".concat(ApiHelper_1.API_BASE_URL, "/user/reset-password"),
|
package/package.json
CHANGED
|
@@ -6,6 +6,13 @@ import User from "../models/User";
|
|
|
6
6
|
|
|
7
7
|
export default class UserService {
|
|
8
8
|
|
|
9
|
+
static existsByPhoneNumber(phoneNumber: string): Promise<APIResponse<User>> {
|
|
10
|
+
return request({
|
|
11
|
+
url: `${API_BASE_URL}/user/phone-number/${phoneNumber}`,
|
|
12
|
+
method: APIMethod.GET
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
|
|
9
16
|
static reestPassword(req: any): Promise<APIResponse<string>> {
|
|
10
17
|
return request({
|
|
11
18
|
url: `${API_BASE_URL}/user/reset-password`,
|