shared-ritm 1.2.120 → 1.2.121
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.
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import ApiService from '../settings/ApiService';
|
|
2
|
+
import { Api_Auth_Login, ConfigResponse } from '@/api/types/Api_Auth';
|
|
2
3
|
declare class AuthService extends ApiService {
|
|
3
|
-
login(email: string, password: string): Promise<
|
|
4
|
-
loginPhoto(photo: any): Promise<
|
|
5
|
-
loginVideo(data: any): Promise<
|
|
6
|
-
logout(): Promise<
|
|
4
|
+
login(email: string, password: string): Promise<Api_Auth_Login>;
|
|
5
|
+
loginPhoto(photo: any): Promise<Api_Auth_Login>;
|
|
6
|
+
loginVideo(data: any): Promise<Api_Auth_Login>;
|
|
7
|
+
logout(): Promise<Api_Auth_Login>;
|
|
7
8
|
userInfo(): Promise<any>;
|
|
8
|
-
configs(): Promise<
|
|
9
|
+
configs(): Promise<ConfigResponse>;
|
|
9
10
|
changePassword(id: string, password: string, password_confirmation: string): Promise<any>;
|
|
10
11
|
}
|
|
11
12
|
export default function useAuthService(): AuthService;
|
package/package.json
CHANGED
|
@@ -8,24 +8,24 @@ import {
|
|
|
8
8
|
} from '@/api/types/Api_Auth'
|
|
9
9
|
|
|
10
10
|
class AuthService extends ApiService {
|
|
11
|
-
public login(email: string, password: string) {
|
|
11
|
+
public login(email: string, password: string): Promise<Api_Auth_Login> {
|
|
12
12
|
return this.post<LoginPayload, Api_Auth_Login>(`/login`, {
|
|
13
13
|
email,
|
|
14
14
|
password,
|
|
15
15
|
})
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
public loginPhoto(photo: any) {
|
|
18
|
+
public loginPhoto(photo: any): Promise<Api_Auth_Login> {
|
|
19
19
|
return this.post<any, Api_Auth_Login>(`/login/from_photo`, { photo })
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
public loginVideo(data: any) {
|
|
22
|
+
public loginVideo(data: any): Promise<Api_Auth_Login> {
|
|
23
23
|
return this.post<any, Api_Auth_Login>(`/login/video`, data, {
|
|
24
24
|
transformRequest: d => d,
|
|
25
25
|
})
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
public logout() {
|
|
28
|
+
public logout(): Promise<Api_Auth_Login> {
|
|
29
29
|
return this.post<null, Api_Auth_Login>(`/logout`, null)
|
|
30
30
|
}
|
|
31
31
|
|
|
@@ -33,7 +33,7 @@ class AuthService extends ApiService {
|
|
|
33
33
|
return this.get<any>(`/users/auth`)
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
public configs() {
|
|
36
|
+
public configs(): Promise<ConfigResponse> {
|
|
37
37
|
return this.get<ConfigResponse>(`/configs`)
|
|
38
38
|
}
|
|
39
39
|
|