-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtypes.ts
77 lines (67 loc) · 1.33 KB
/
types.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
export enum Status {
'IDLE', 'LOADING', 'SUCCEEDED', 'FAILED'
}
export interface RegistrationRequest {
name: string,
surname: string,
email: string,
phoneNumber: string,
password: string,
navigation: any
}
export interface RegistrationResponse {
user: User,
navigation: any
}
export interface LoginRequest {
email: string,
password: string
}
export interface LoginResponse {
jwt: string,
user: User
}
export interface EditProfileRequest {
userId: number,
name: string,
surname: string,
email: string,
phoneNumber: string,
token: string
}
export interface Institution {
id: number,
name: string,
phoneNumber: string,
institutionType: string,
address: string
}
interface Post {
id: number,
userId: number,
description: string,
title: string,
petType: string,
postType: string,
createdAt: Date,
updatedAt: Date,
userName: string | null
}
export interface NotificationPost extends Post {
longitude: number,
latitude: number,
noOfPets: number
}
export interface ImagedPost extends Post {
image: string,
isCompleted: boolean
}
export interface User {
id: number,
name: string,
surname: string,
phoneNumber: string,
email: string,
isVerified: boolean,
createdAt: Date | null,
}