-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtypings.d.ts
172 lines (143 loc) · 3.24 KB
/
typings.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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
type ChildrenType = {
children: React.ReactNode;
};
type VoidType = () => void;
type Dispatch<A> = (value: A) => void;
type DATAType = IUserProfile;
type UPDATE_DATAType = IUserProfileDataUpdate;
type GETType = {
_uid: string;
};
type POSTType = {
_data: IUserProfile;
};
type PUTType = {
_uid: string;
_data: IUserProfileDataUpdate;
};
type DELETEType = {
_uid: string;
};
type FetchType = 'CREATE' | 'UPDATE' | 'DELETE';
type FetchDataType = {
uid?: string;
create?: IUserProfile;
update?: IUserProfileDataUpdate;
};
type ParamType = Promise<{
_uid: string;
}>;
interface ISuccess {
name: string;
message: string;
}
interface IError {
name: string;
message: string;
}
interface IServerError {
status: number;
statusText: string;
}
interface IUserProfileDataUpdate {
'_data.fullName'?: string;
'_data.emailAddress'?: string;
'_data.phoneNumber'?: string;
'_data.photoURL'?: string;
'_data.dateOfBirth'?: string;
'_data.age'?: string;
'_data.gender'?: string;
'_data.isVerified.phoneNumber'?: boolean;
'_data.isVerified.emailAddress'?: boolean;
}
interface IUserProfileData {
fullName?: string;
emailAddress?: string;
phoneNumber?: string;
photoURL?: string;
dateOfBirth?: string;
age?: string;
gender?: string;
isVerified?: {
phoneNumber?: boolean;
emailAddress?: boolean;
};
}
interface IUserProfileDataConstructor {
_data: IUserProfileData;
}
interface IUserProfileID {
_uid: string;
}
interface IUserProfile extends IUserProfileID, IUserProfileDataConstructor {}
type AuthScreenType =
| 'login-phone'
| 'login-email'
| 'login-others'
| 'login-otp'
| 'login-password'
| 'login-forgot-password'
| 'register-name'
| 'register-phone'
| 'register-otp'
| 'register-email'
| 'register-password'
| 'register-verify-email'
| 'register-profile-picture'
| 'register-date-of-birth'
| 'register-gender'
| undefined;
type AuthAnimationType = {
Initial: {
x: number;
opacity: number;
};
Final: {
x: number;
opacity: number;
};
Transition: {
type: string;
};
};
type AuthErrorType = 'database-not-created' | 'get-user-failed' | undefined;
type ToastSettingType = {
Show: boolean;
Title: string;
Description: string;
Type: 'Error' | 'Success' | 'Info' | 'Warning' | '' | '';
};
type AuthMainScreenType = 'Error' | 'CheckInfo' | 'Finish' | 'Setup';
interface IToastDark {
Open: boolean;
onClose: Dispatch<boolean>;
MessageTitle: string;
MessageDescription: string;
Type: string;
}
type ICheckInfoScreen =
| 'initial-login-load'
| 'after-name'
| 'after-phone'
| 'after-email'
| 'after-verify-email'
| 'after-profile-picture'
| 'after-date-of-birth'
| 'after-gender';
interface ToastDarkProps {
SlideDirection: 'left' | 'right' | 'up' | 'down';
Vertical: 'top' | 'bottom';
Horizontal: 'left' | 'center' | 'right';
HideDuration: number;
Toast: {
Open: boolean;
onClose: Dispatch<boolean>;
MessageTitle: string;
MessageDescription: string;
Type: 'Error' | 'Success' | 'Info' | 'Warning' | '';
};
}
type StringType = string | undefined | null;
type BooleanType = boolean | undefined | null;
type NumberType = number | undefined | null;
type RouteType = __next_route_internal_types__.RouteImpl<string>;