返回 AiToEarn
auth.types.ts
根目录 / project / aitoearn-web / src / api / auth / auth.types.ts
1 import type { UserInfo } from '@/store/user'
2
3 // Source: types/auth.ts
4
5 /**
6 * SendEmailCodeParams 请求参数。
7 */
8 export interface SendEmailCodeParams {
9 mail: string
10 }
11
12 /**
13 * EmailCodeLoginParams 请求参数。
14 */
15 export interface EmailCodeLoginParams {
16 mail: string
17 code: string
18 inviteCode?: string
19 }
20
21 /**
22 * SendPhoneCodeParams 请求参数。
23 */
24 export interface SendPhoneCodeParams {
25 phone: string
26 }
27
28 /**
29 * PhoneCodeLoginParams 请求参数。
30 */
31 export interface PhoneCodeLoginParams {
32 phone: string
33 code: string
34 }
35
36 /**
37 * CodeLoginResponse 响应数据。
38 */
39 export interface CodeLoginResponse {
40 token?: string
41 userInfo?: UserInfo
42 }
43
44 // Source: auth/auth.api.ts inline types
45 // Source: apiReq.ts
46
47 /**
48 * LoginResponse 响应数据。
49 */
50 export interface LoginResponse {
51 token?: string
52 userInfo?: UserInfo
53 }
54
55 /**
56 * GoogleLoginParams 请求参数。
57 */
58 export interface GoogleLoginParams {
59 clientId: string
60 credential: string
61 placeId?: string
62 }
63
64 /**
65 * 鉴权请求选项。
66 */
67 export interface AuthRequestOptions {
68 silent?: boolean
69 }
70
71 /**
72 * 更新用户信息请求参数。
73 */
74 export interface UpdateUserInfoParams {
75 name: string
76 avatar?: string
77 }
78
78 lines TYPESCRIPT