forked from hsh2001/react-native-kakao-login
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
81 lines (67 loc) · 1.91 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
declare module '@beblue/react-native-kakao-login' {
export interface ProfileType {
id: number;
connected_at: string;
kakao_account: {
profile_needs_agreement?: boolean;
profile?: {
nickname?: string;
profile_image_url?: string;
thumbnail_image_url?: string;
};
emailNeedsAgreement?: boolean;
email?: string;
isEmailValid?: boolean;
isEmailVerified?: boolean;
birthdayNeedsAgreement?: boolean;
birthday?: string;
birthyearNeedsAgreement?: boolean;
birthyear?: string;
genderNeedsAgreement?: boolean;
gender?: 'male' | 'female' | null;
ciNeedsAgreement?: boolean;
ci?: string;
ciAuthenticatedAt?: string;
legalBirthDateNeedsAgreement?: boolean;
legalBirthDate?: string;
legalGenderNeedsAgreement?: boolean;
legalGender?: 'male' | 'female' | null;
legalNameNeedsAgreement?: boolean;
legalName?: string;
ageRangeNeedsAgreement?: boolean;
ageRange?:
| '0~9'
| '10~14'
| '15~19'
| '20~29'
| '30~39'
| '40~49'
| '50~59'
| '60~69'
| '70~79'
| '80~89'
| '90~'
| null;
phoneNumberNeedsAgreement?: boolean;
phoneNumber?: string;
};
properties: any;
}
export interface AccessTokenType {
access_token: string;
refresh_token: string;
access_token_expiresAt: string;
refresh_token_expiresAt: string;
scopes: string[];
}
export interface ARNKakaoLogin {
getAccessToken: () => Promise<null | AccessTokenType>;
login: () => Promise<null | AccessTokenType>;
loginWithNewScopes: (scopes: string[]) => Promise<null | AccessTokenType>;
getProfile: () => Promise<ProfileType>;
logout: () => Promise<'SUCCESS'>;
unlink: () => Promise<'SUCCESS'>;
}
const KakaoLogin: ARNKakaoLogin;
export default KakaoLogin;
}