-
Notifications
You must be signed in to change notification settings - Fork 0
/
endpoints.ts
78 lines (64 loc) · 1.76 KB
/
endpoints.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
import { Festival, PaymentStatus, QRCode, Response, User } from "./models";
export type GetAllUsersResponse = Response<User[]>;
export type RegisterUserRequest = {
firstName: string;
lastName: string;
gender: boolean;
birthdate: string;
email: string;
phoneNumber?: string;
};
export type RegisterUserResponse = Response<User>;
export type UpdateUserRequest = {
firstName?: string;
lastName?: string;
gender?: boolean;
birthdate?: string;
email?: string;
phoneNumber?: string;
status?: boolean;
};
export type UpdateUserResponse = Response<User>;
export type GetUserByIdRequest = {
id: string;
};
export type GetUserByIdResponse = Response<User>;
export type CreatePaymentRequest = {
price: number;
description?: string;
userId: string;
festivalId: string;
minimumAge?: number;
};
export type CreatePaymentResponse = Response<{
success: boolean;
message: string;
status: PaymentStatus;
}>;
export type GetAllFestivalsResponse = Response<Festival[]>;
export type GetFestivalByIdRequest = {
id: string;
};
export type GetFestivalByIdResponse = Response<Festival>;
export type UpdateFestivalRequest = {
name: string;
description?: string;
location?: string;
};
export type UpdateFestivalResponse = Response<Festival>;
export type CreateFestivalRequest = {
name: string;
description?: string;
location?: string;
};
export type CreateFestivalResponse = Response<Festival>;
export type GetAllQRCodesResponse = Response<QRCode[]>;
export type GetQRCodeByIdRequest = {
id: string;
};
export type GetQRCodeByIdResponse = Response<QRCode>;
export type LinkQRCodeRequest = {
qrcode: string;
festivalUserId: string;
};
export type LinkQRCodeResponse = Response<null>;