forked from expertiza/reimplementation-front-end
-
Notifications
You must be signed in to change notification settings - Fork 1
/
interfaces.ts
114 lines (100 loc) · 2.21 KB
/
interfaces.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
/**
* @author Ankur Mundra on June, 2023
*/
export interface IEditor {
mode: "create" | "update";
}
export interface IRole {
id?: number;
name: string;
parent_id: number;
}
export interface IInstitution {
id?: number;
name: string;
}
export interface IInstructor {
id?: number;
name: string;
}
export interface ITA {
id?: number;
name: string;
}
export interface IUserResponse {
id: number;
name: string;
email: string;
full_name: string;
email_on_review: boolean;
email_on_submission: boolean;
email_on_review_of_review: boolean;
role: { id: number; name: string };
parent: { id: number | null; name: string | null };
institution: { id: number | null; name: string | null };
}
export interface IUserRequest {
name: string;
email: string;
full_name: string;
role_id: number;
parent_id?: number | null;
institution_id: number;
email_on_review?: boolean;
email_on_submission?: boolean;
email_on_review_of_review?: boolean;
}
export interface ITAResponse {
id: number;
name: string;
email: string;
full_name: string;
email_on_review: boolean;
email_on_submission: boolean;
email_on_review_of_review: boolean;
role: { id: number; name: string };
parent: { id: number | null; name: string | null };
institution: { id: number | null; name: string | null };
}
export interface ITARequest {
name: string;
}
export interface ILoggedInUser {
id: number;
name: string;
full_name: string;
role: string;
institution_id: number;
}
export interface ICourseResponse{
id: number;
name: string;
directory_path: string;
info: string;
private: boolean;
created_at: Date;
updated_at: Date;
institution_id: number;
instructor_id: number;
institution: { id: number | null; name: string | null };
instructor: { id: number | null; name: string | null };
}
export interface ICourseRequest{
name: string;
directory_path: string;
info: string;
private: boolean;
institution_id: number;
instructor_id: number;
}
export interface IInstitutionResponse {
id: number;
name: string;
}
export enum ROLE {
SUPER_ADMIN = "Super Administrator",
ADMIN = "Administrator",
INSTRUCTOR = "Instructor",
TA = "Teaching Assistant",
STUDENT = "Student",
}