@studious-lms/server 1.4.5 → 1.4.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/config/cors.d.ts.map +1 -1
- package/dist/lib/config/cors.js +8 -3
- package/dist/lib/config/cors.js.map +1 -1
- package/dist/models/access.d.ts +112 -0
- package/dist/models/access.d.ts.map +1 -0
- package/dist/models/access.js +49 -0
- package/dist/models/access.js.map +1 -0
- package/dist/models/announcement.d.ts +17 -2
- package/dist/models/announcement.d.ts.map +1 -1
- package/dist/models/announcement.js +21 -4
- package/dist/models/announcement.js.map +1 -1
- package/dist/models/assignment.d.ts +37 -37
- package/dist/models/assignment.d.ts.map +1 -1
- package/dist/models/assignment.js +15 -15
- package/dist/models/assignment.js.map +1 -1
- package/dist/models/attendance.d.ts +1 -1
- package/dist/models/attendance.d.ts.map +1 -1
- package/dist/models/attendance.js +6 -5
- package/dist/models/attendance.js.map +1 -1
- package/dist/models/auth.d.ts +5 -5
- package/dist/models/auth.d.ts.map +1 -1
- package/dist/models/auth.js +7 -11
- package/dist/models/auth.js.map +1 -1
- package/dist/models/class.d.ts +26 -26
- package/dist/models/class.d.ts.map +1 -1
- package/dist/models/class.js +7 -11
- package/dist/models/class.js.map +1 -1
- package/dist/models/comment.d.ts +233 -6
- package/dist/models/comment.d.ts.map +1 -1
- package/dist/models/comment.js +133 -3
- package/dist/models/comment.js.map +1 -1
- package/dist/models/conversation.d.ts +7 -7
- package/dist/models/event.d.ts +52 -3
- package/dist/models/event.d.ts.map +1 -1
- package/dist/models/event.js +56 -6
- package/dist/models/event.js.map +1 -1
- package/dist/models/file.d.ts +178 -103
- package/dist/models/file.d.ts.map +1 -1
- package/dist/models/file.js +54 -14
- package/dist/models/file.js.map +1 -1
- package/dist/models/folder.d.ts +22 -22
- package/dist/models/folder.d.ts.map +1 -1
- package/dist/models/folder.js +5 -4
- package/dist/models/folder.js.map +1 -1
- package/dist/models/labChat.d.ts +20 -20
- package/dist/models/labChat.d.ts.map +1 -1
- package/dist/models/labChat.js +8 -10
- package/dist/models/labChat.js.map +1 -1
- package/dist/models/marketing.d.ts +1 -1
- package/dist/models/message.d.ts +6 -6
- package/dist/models/newtonChat.d.ts +5 -5
- package/dist/models/school.d.ts +361 -0
- package/dist/models/school.d.ts.map +1 -0
- package/dist/models/school.js +314 -0
- package/dist/models/school.js.map +1 -0
- package/dist/models/section.d.ts +1 -1
- package/dist/models/section.d.ts.map +1 -1
- package/dist/models/section.js +5 -4
- package/dist/models/section.js.map +1 -1
- package/dist/models/user.d.ts +4 -4
- package/dist/models/worksheet.d.ts +67 -65
- package/dist/models/worksheet.d.ts.map +1 -1
- package/dist/models/worksheet.js +6 -14
- package/dist/models/worksheet.js.map +1 -1
- package/dist/pipelines/aiLabChat.d.ts.map +1 -1
- package/dist/pipelines/aiLabChat.js +4 -3
- package/dist/pipelines/aiLabChat.js.map +1 -1
- package/dist/pipelines/gradeWorksheet.d.ts +2 -2
- package/dist/pipelines/pdfToWorksheet.d.ts +1 -1
- package/dist/routers/_app.d.ts +2462 -1104
- package/dist/routers/_app.d.ts.map +1 -1
- package/dist/routers/_app.js +4 -2
- package/dist/routers/_app.js.map +1 -1
- package/dist/routers/announcement.d.ts +13 -5
- package/dist/routers/announcement.d.ts.map +1 -1
- package/dist/routers/announcement.js +25 -5
- package/dist/routers/announcement.js.map +1 -1
- package/dist/routers/assignment.d.ts +266 -36
- package/dist/routers/assignment.d.ts.map +1 -1
- package/dist/routers/assignment.js +221 -3
- package/dist/routers/assignment.js.map +1 -1
- package/dist/routers/class.d.ts +21 -20
- package/dist/routers/class.d.ts.map +1 -1
- package/dist/routers/class.js +3 -2
- package/dist/routers/class.js.map +1 -1
- package/dist/routers/comment.d.ts +40 -3
- package/dist/routers/comment.d.ts.map +1 -1
- package/dist/routers/comment.js +14 -5
- package/dist/routers/comment.js.map +1 -1
- package/dist/routers/conversation.d.ts +6 -6
- package/dist/routers/event.d.ts +21 -2
- package/dist/routers/event.d.ts.map +1 -1
- package/dist/routers/file.d.ts +2 -2
- package/dist/routers/folder.d.ts +24 -24
- package/dist/routers/labChat.d.ts +7 -7
- package/dist/routers/school.d.ts +384 -0
- package/dist/routers/school.d.ts.map +1 -0
- package/dist/routers/school.js +79 -0
- package/dist/routers/school.js.map +1 -0
- package/dist/routers/search.d.ts +1 -1
- package/dist/routers/worksheet.d.ts +23 -21
- package/dist/routers/worksheet.d.ts.map +1 -1
- package/dist/services/announcement.d.ts.map +1 -1
- package/dist/services/announcement.js +10 -6
- package/dist/services/announcement.js.map +1 -1
- package/dist/services/assignment.d.ts +36 -36
- package/dist/services/class.d.ts +20 -19
- package/dist/services/class.d.ts.map +1 -1
- package/dist/services/class.js +22 -3
- package/dist/services/class.js.map +1 -1
- package/dist/services/comment.d.ts +31 -5
- package/dist/services/comment.d.ts.map +1 -1
- package/dist/services/comment.js +102 -19
- package/dist/services/comment.js.map +1 -1
- package/dist/services/conversation.d.ts +6 -6
- package/dist/services/event.d.ts +21 -2
- package/dist/services/event.d.ts.map +1 -1
- package/dist/services/event.js +11 -7
- package/dist/services/event.js.map +1 -1
- package/dist/services/file.d.ts +2 -2
- package/dist/services/file.d.ts.map +1 -1
- package/dist/services/file.js +17 -8
- package/dist/services/file.js.map +1 -1
- package/dist/services/folder.d.ts +24 -24
- package/dist/services/labChat.d.ts +7 -7
- package/dist/services/school.d.ts +299 -0
- package/dist/services/school.d.ts.map +1 -0
- package/dist/services/school.js +225 -0
- package/dist/services/school.js.map +1 -0
- package/dist/services/worksheet.d.ts +23 -21
- package/dist/services/worksheet.d.ts.map +1 -1
- package/package.json +1 -1
- package/prisma/migrations/20260502230500_assignment_submission_comments/migration.sql +60 -0
- package/prisma/migrations/20260504071500_school_memberships/migration.sql +81 -0
- package/prisma/schema.prisma +75 -2
- package/src/lib/config/cors.ts +8 -1
- package/src/models/access.ts +48 -0
- package/src/models/announcement.ts +19 -2
- package/src/models/assignment.ts +17 -13
- package/src/models/attendance.ts +4 -3
- package/src/models/auth.ts +8 -9
- package/src/models/class.ts +8 -9
- package/src/models/comment.ts +137 -1
- package/src/models/event.ts +54 -4
- package/src/models/file.ts +53 -12
- package/src/models/folder.ts +3 -2
- package/src/models/labChat.ts +9 -8
- package/src/models/school.ts +361 -0
- package/src/models/section.ts +3 -2
- package/src/models/worksheet.ts +7 -12
- package/src/pipelines/aiLabChat.ts +2 -1
- package/src/routers/_app.ts +2 -0
- package/src/routers/announcement.ts +30 -4
- package/src/routers/assignment.ts +243 -2
- package/src/routers/class.ts +1 -0
- package/src/routers/comment.ts +19 -2
- package/src/routers/school.ts +122 -0
- package/src/services/announcement.ts +12 -4
- package/src/services/class.ts +25 -2
- package/src/services/comment.ts +122 -18
- package/src/services/event.ts +23 -6
- package/src/services/file.ts +20 -6
- package/src/services/school.ts +308 -0
- package/tests/lib/cors.test.ts +13 -1
- package/tests/routers/assignment.test.ts +68 -2
- package/tests/routers/comment.test.ts +42 -1
- package/vercel.json +8 -0
|
@@ -17,8 +17,8 @@ export declare function findClassWithStudent(classId: string, studentId: string)
|
|
|
17
17
|
/** @returns Submission for assignment and student. */
|
|
18
18
|
export declare function findSubmissionByAssignmentAndStudent(assignmentId: string, studentId: string): import(".prisma/client").Prisma.Prisma__SubmissionClient<{
|
|
19
19
|
id: string;
|
|
20
|
-
assignmentId: string;
|
|
21
20
|
createdAt: Date;
|
|
21
|
+
assignmentId: string;
|
|
22
22
|
modifiedAt: Date;
|
|
23
23
|
studentId: string;
|
|
24
24
|
extendedResponse: string | null;
|
|
@@ -51,8 +51,8 @@ export declare function findNewtonChatByIdAndMember(newtonChatId: string, userId
|
|
|
51
51
|
};
|
|
52
52
|
} & {
|
|
53
53
|
id: string;
|
|
54
|
-
assignmentId: string;
|
|
55
54
|
createdAt: Date;
|
|
55
|
+
assignmentId: string;
|
|
56
56
|
modifiedAt: Date;
|
|
57
57
|
studentId: string;
|
|
58
58
|
extendedResponse: string | null;
|
|
@@ -71,11 +71,11 @@ export declare function findNewtonChatByIdAndMember(newtonChatId: string, userId
|
|
|
71
71
|
};
|
|
72
72
|
} & {
|
|
73
73
|
id: string;
|
|
74
|
+
createdAt: Date;
|
|
75
|
+
updatedAt: Date;
|
|
74
76
|
submissionId: string;
|
|
75
77
|
conversationId: string;
|
|
76
|
-
createdAt: Date;
|
|
77
78
|
title: string;
|
|
78
|
-
updatedAt: Date;
|
|
79
79
|
}) | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
80
80
|
datasources: {
|
|
81
81
|
db: {
|
|
@@ -86,9 +86,9 @@ export declare function findNewtonChatByIdAndMember(newtonChatId: string, userId
|
|
|
86
86
|
/** @returns Conversation members for given user IDs. */
|
|
87
87
|
export declare function findConversationMembersByUserIds(conversationId: string, userIds: string[]): import(".prisma/client").Prisma.PrismaPromise<{
|
|
88
88
|
id: string;
|
|
89
|
+
role: import(".prisma/client").$Enums.ConversationRole;
|
|
89
90
|
userId: string;
|
|
90
91
|
conversationId: string;
|
|
91
|
-
role: import(".prisma/client").$Enums.ConversationRole;
|
|
92
92
|
joinedAt: Date;
|
|
93
93
|
hiddenAt: Date | null;
|
|
94
94
|
lastViewedAt: Date | null;
|
|
@@ -0,0 +1,361 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* School model - school membership, invites, and admin lookups.
|
|
3
|
+
*/
|
|
4
|
+
import { SchoolMembershipRole } from "@prisma/client";
|
|
5
|
+
export declare function findSchoolMembership(schoolId: string, userId: string): import(".prisma/client").Prisma.Prisma__SchoolMembershipClient<{
|
|
6
|
+
status: import(".prisma/client").$Enums.SchoolMembershipStatus;
|
|
7
|
+
id: string;
|
|
8
|
+
createdAt: Date;
|
|
9
|
+
updatedAt: Date;
|
|
10
|
+
role: import(".prisma/client").$Enums.SchoolMembershipRole;
|
|
11
|
+
schoolId: string;
|
|
12
|
+
userId: string;
|
|
13
|
+
} | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
14
|
+
datasources: {
|
|
15
|
+
db: {
|
|
16
|
+
url: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
}>;
|
|
20
|
+
export declare function findActiveSchoolMembership(schoolId: string, userId: string): import(".prisma/client").Prisma.Prisma__SchoolMembershipClient<{
|
|
21
|
+
status: import(".prisma/client").$Enums.SchoolMembershipStatus;
|
|
22
|
+
id: string;
|
|
23
|
+
createdAt: Date;
|
|
24
|
+
updatedAt: Date;
|
|
25
|
+
role: import(".prisma/client").$Enums.SchoolMembershipRole;
|
|
26
|
+
schoolId: string;
|
|
27
|
+
userId: string;
|
|
28
|
+
} | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
29
|
+
datasources: {
|
|
30
|
+
db: {
|
|
31
|
+
url: string;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
}>;
|
|
35
|
+
export declare function findActiveSchoolAdminMembership(schoolId: string, userId: string): import(".prisma/client").Prisma.Prisma__SchoolMembershipClient<{
|
|
36
|
+
status: import(".prisma/client").$Enums.SchoolMembershipStatus;
|
|
37
|
+
id: string;
|
|
38
|
+
createdAt: Date;
|
|
39
|
+
updatedAt: Date;
|
|
40
|
+
role: import(".prisma/client").$Enums.SchoolMembershipRole;
|
|
41
|
+
schoolId: string;
|
|
42
|
+
userId: string;
|
|
43
|
+
} | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
44
|
+
datasources: {
|
|
45
|
+
db: {
|
|
46
|
+
url: string;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
}>;
|
|
50
|
+
export declare function listUserSchoolMemberships(userId: string): import(".prisma/client").Prisma.PrismaPromise<({
|
|
51
|
+
school: {
|
|
52
|
+
name: string;
|
|
53
|
+
id: string;
|
|
54
|
+
logoId: string | null;
|
|
55
|
+
subdomain: string | null;
|
|
56
|
+
createdAt: Date;
|
|
57
|
+
updatedAt: Date;
|
|
58
|
+
};
|
|
59
|
+
} & {
|
|
60
|
+
status: import(".prisma/client").$Enums.SchoolMembershipStatus;
|
|
61
|
+
id: string;
|
|
62
|
+
createdAt: Date;
|
|
63
|
+
updatedAt: Date;
|
|
64
|
+
role: import(".prisma/client").$Enums.SchoolMembershipRole;
|
|
65
|
+
schoolId: string;
|
|
66
|
+
userId: string;
|
|
67
|
+
})[]>;
|
|
68
|
+
export declare function createSchoolWithAdmin(data: {
|
|
69
|
+
name: string;
|
|
70
|
+
subdomain?: string;
|
|
71
|
+
logoId?: string;
|
|
72
|
+
userId: string;
|
|
73
|
+
}): import(".prisma/client").Prisma.Prisma__SchoolClient<{
|
|
74
|
+
memberships: {
|
|
75
|
+
status: import(".prisma/client").$Enums.SchoolMembershipStatus;
|
|
76
|
+
id: string;
|
|
77
|
+
createdAt: Date;
|
|
78
|
+
updatedAt: Date;
|
|
79
|
+
role: import(".prisma/client").$Enums.SchoolMembershipRole;
|
|
80
|
+
schoolId: string;
|
|
81
|
+
userId: string;
|
|
82
|
+
}[];
|
|
83
|
+
} & {
|
|
84
|
+
name: string;
|
|
85
|
+
id: string;
|
|
86
|
+
logoId: string | null;
|
|
87
|
+
subdomain: string | null;
|
|
88
|
+
createdAt: Date;
|
|
89
|
+
updatedAt: Date;
|
|
90
|
+
}, never, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
91
|
+
datasources: {
|
|
92
|
+
db: {
|
|
93
|
+
url: string;
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
}>;
|
|
97
|
+
export declare function getSchoolById(schoolId: string): import(".prisma/client").Prisma.Prisma__SchoolClient<{
|
|
98
|
+
name: string;
|
|
99
|
+
id: string;
|
|
100
|
+
logoId: string | null;
|
|
101
|
+
subdomain: string | null;
|
|
102
|
+
createdAt: Date;
|
|
103
|
+
updatedAt: Date;
|
|
104
|
+
} | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
105
|
+
datasources: {
|
|
106
|
+
db: {
|
|
107
|
+
url: string;
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
}>;
|
|
111
|
+
export declare function getSchoolOverview(schoolId: string): import(".prisma/client").Prisma.Prisma__SchoolClient<{
|
|
112
|
+
name: string;
|
|
113
|
+
id: string;
|
|
114
|
+
subdomain: string | null;
|
|
115
|
+
_count: {
|
|
116
|
+
memberships: number;
|
|
117
|
+
invites: number;
|
|
118
|
+
classes: number;
|
|
119
|
+
};
|
|
120
|
+
memberships: {
|
|
121
|
+
role: import(".prisma/client").$Enums.SchoolMembershipRole;
|
|
122
|
+
}[];
|
|
123
|
+
invites: {
|
|
124
|
+
id: string;
|
|
125
|
+
createdAt: Date;
|
|
126
|
+
email: string;
|
|
127
|
+
role: import(".prisma/client").$Enums.SchoolMembershipRole;
|
|
128
|
+
expiresAt: Date;
|
|
129
|
+
}[];
|
|
130
|
+
classes: {
|
|
131
|
+
name: string;
|
|
132
|
+
id: string;
|
|
133
|
+
subject: string;
|
|
134
|
+
color: string | null;
|
|
135
|
+
section: string;
|
|
136
|
+
_count: {
|
|
137
|
+
teachers: number;
|
|
138
|
+
students: number;
|
|
139
|
+
};
|
|
140
|
+
}[];
|
|
141
|
+
} | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
142
|
+
datasources: {
|
|
143
|
+
db: {
|
|
144
|
+
url: string;
|
|
145
|
+
};
|
|
146
|
+
};
|
|
147
|
+
}>;
|
|
148
|
+
export declare function listSchoolClasses(schoolId: string): import(".prisma/client").Prisma.PrismaPromise<({
|
|
149
|
+
_count: {
|
|
150
|
+
assignments: number;
|
|
151
|
+
teachers: number;
|
|
152
|
+
students: number;
|
|
153
|
+
};
|
|
154
|
+
teachers: {
|
|
155
|
+
id: string;
|
|
156
|
+
username: string;
|
|
157
|
+
profile: {
|
|
158
|
+
displayName: string | null;
|
|
159
|
+
profilePicture: string | null;
|
|
160
|
+
profilePictureThumbnail: string | null;
|
|
161
|
+
} | null;
|
|
162
|
+
}[];
|
|
163
|
+
students: {
|
|
164
|
+
id: string;
|
|
165
|
+
}[];
|
|
166
|
+
} & {
|
|
167
|
+
name: string;
|
|
168
|
+
id: string;
|
|
169
|
+
schoolId: string | null;
|
|
170
|
+
subject: string;
|
|
171
|
+
color: string | null;
|
|
172
|
+
section: string;
|
|
173
|
+
syllabus: string | null;
|
|
174
|
+
})[]>;
|
|
175
|
+
export declare function listSchoolMembers(schoolId: string): import(".prisma/client").Prisma.PrismaPromise<{
|
|
176
|
+
status: import(".prisma/client").$Enums.SchoolMembershipStatus;
|
|
177
|
+
id: string;
|
|
178
|
+
createdAt: Date;
|
|
179
|
+
updatedAt: Date;
|
|
180
|
+
user: {
|
|
181
|
+
id: string;
|
|
182
|
+
username: string;
|
|
183
|
+
email: string;
|
|
184
|
+
profile: {
|
|
185
|
+
displayName: string | null;
|
|
186
|
+
profilePicture: string | null;
|
|
187
|
+
profilePictureThumbnail: string | null;
|
|
188
|
+
} | null;
|
|
189
|
+
};
|
|
190
|
+
role: import(".prisma/client").$Enums.SchoolMembershipRole;
|
|
191
|
+
}[]>;
|
|
192
|
+
export declare function countActiveAdmins(schoolId: string): import(".prisma/client").Prisma.PrismaPromise<number>;
|
|
193
|
+
export declare function upsertSchoolMembership(data: {
|
|
194
|
+
schoolId: string;
|
|
195
|
+
userId: string;
|
|
196
|
+
role: SchoolMembershipRole;
|
|
197
|
+
}): import(".prisma/client").Prisma.Prisma__SchoolMembershipClient<{
|
|
198
|
+
status: import(".prisma/client").$Enums.SchoolMembershipStatus;
|
|
199
|
+
id: string;
|
|
200
|
+
createdAt: Date;
|
|
201
|
+
updatedAt: Date;
|
|
202
|
+
role: import(".prisma/client").$Enums.SchoolMembershipRole;
|
|
203
|
+
schoolId: string;
|
|
204
|
+
userId: string;
|
|
205
|
+
}, never, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
206
|
+
datasources: {
|
|
207
|
+
db: {
|
|
208
|
+
url: string;
|
|
209
|
+
};
|
|
210
|
+
};
|
|
211
|
+
}>;
|
|
212
|
+
export declare function updateSchoolMembershipRole(schoolId: string, userId: string, role: SchoolMembershipRole): import(".prisma/client").Prisma.Prisma__SchoolMembershipClient<{
|
|
213
|
+
status: import(".prisma/client").$Enums.SchoolMembershipStatus;
|
|
214
|
+
id: string;
|
|
215
|
+
createdAt: Date;
|
|
216
|
+
updatedAt: Date;
|
|
217
|
+
role: import(".prisma/client").$Enums.SchoolMembershipRole;
|
|
218
|
+
schoolId: string;
|
|
219
|
+
userId: string;
|
|
220
|
+
}, never, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
221
|
+
datasources: {
|
|
222
|
+
db: {
|
|
223
|
+
url: string;
|
|
224
|
+
};
|
|
225
|
+
};
|
|
226
|
+
}>;
|
|
227
|
+
export declare function removeSchoolMembershipPreservingContent(schoolId: string, userId: string): Promise<{
|
|
228
|
+
status: import(".prisma/client").$Enums.SchoolMembershipStatus;
|
|
229
|
+
id: string;
|
|
230
|
+
createdAt: Date;
|
|
231
|
+
updatedAt: Date;
|
|
232
|
+
role: import(".prisma/client").$Enums.SchoolMembershipRole;
|
|
233
|
+
schoolId: string;
|
|
234
|
+
userId: string;
|
|
235
|
+
}>;
|
|
236
|
+
export declare function findUserByEmailForSchool(email: string): import(".prisma/client").Prisma.Prisma__UserClient<{
|
|
237
|
+
id: string;
|
|
238
|
+
username: string;
|
|
239
|
+
email: string;
|
|
240
|
+
} | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
241
|
+
datasources: {
|
|
242
|
+
db: {
|
|
243
|
+
url: string;
|
|
244
|
+
};
|
|
245
|
+
};
|
|
246
|
+
}>;
|
|
247
|
+
export declare function findUserByIdForSchool(userId: string): import(".prisma/client").Prisma.Prisma__UserClient<{
|
|
248
|
+
id: string;
|
|
249
|
+
username: string;
|
|
250
|
+
email: string;
|
|
251
|
+
} | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
252
|
+
datasources: {
|
|
253
|
+
db: {
|
|
254
|
+
url: string;
|
|
255
|
+
};
|
|
256
|
+
};
|
|
257
|
+
}>;
|
|
258
|
+
export declare function createSchoolInvite(data: {
|
|
259
|
+
schoolId: string;
|
|
260
|
+
invitedById: string;
|
|
261
|
+
email: string;
|
|
262
|
+
role: SchoolMembershipRole;
|
|
263
|
+
token: string;
|
|
264
|
+
expiresAt: Date;
|
|
265
|
+
}): import(".prisma/client").Prisma.Prisma__SchoolInviteClient<{
|
|
266
|
+
school: {
|
|
267
|
+
name: string;
|
|
268
|
+
id: string;
|
|
269
|
+
};
|
|
270
|
+
} & {
|
|
271
|
+
status: import(".prisma/client").$Enums.SchoolInviteStatus;
|
|
272
|
+
id: string;
|
|
273
|
+
createdAt: Date;
|
|
274
|
+
updatedAt: Date;
|
|
275
|
+
email: string;
|
|
276
|
+
role: import(".prisma/client").$Enums.SchoolMembershipRole;
|
|
277
|
+
schoolId: string;
|
|
278
|
+
token: string;
|
|
279
|
+
expiresAt: Date;
|
|
280
|
+
acceptedAt: Date | null;
|
|
281
|
+
revokedAt: Date | null;
|
|
282
|
+
invitedById: string;
|
|
283
|
+
}, never, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
284
|
+
datasources: {
|
|
285
|
+
db: {
|
|
286
|
+
url: string;
|
|
287
|
+
};
|
|
288
|
+
};
|
|
289
|
+
}>;
|
|
290
|
+
export declare function listSchoolInvites(schoolId: string): import(".prisma/client").Prisma.PrismaPromise<{
|
|
291
|
+
status: import(".prisma/client").$Enums.SchoolInviteStatus;
|
|
292
|
+
id: string;
|
|
293
|
+
createdAt: Date;
|
|
294
|
+
email: string;
|
|
295
|
+
role: import(".prisma/client").$Enums.SchoolMembershipRole;
|
|
296
|
+
expiresAt: Date;
|
|
297
|
+
acceptedAt: Date | null;
|
|
298
|
+
revokedAt: Date | null;
|
|
299
|
+
invitedBy: {
|
|
300
|
+
id: string;
|
|
301
|
+
username: string;
|
|
302
|
+
profile: {
|
|
303
|
+
displayName: string | null;
|
|
304
|
+
} | null;
|
|
305
|
+
};
|
|
306
|
+
}[]>;
|
|
307
|
+
export declare function revokeSchoolInvite(inviteId: string, schoolId: string): import(".prisma/client").Prisma.Prisma__SchoolInviteClient<{
|
|
308
|
+
status: import(".prisma/client").$Enums.SchoolInviteStatus;
|
|
309
|
+
id: string;
|
|
310
|
+
createdAt: Date;
|
|
311
|
+
updatedAt: Date;
|
|
312
|
+
email: string;
|
|
313
|
+
role: import(".prisma/client").$Enums.SchoolMembershipRole;
|
|
314
|
+
schoolId: string;
|
|
315
|
+
token: string;
|
|
316
|
+
expiresAt: Date;
|
|
317
|
+
acceptedAt: Date | null;
|
|
318
|
+
revokedAt: Date | null;
|
|
319
|
+
invitedById: string;
|
|
320
|
+
}, never, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
321
|
+
datasources: {
|
|
322
|
+
db: {
|
|
323
|
+
url: string;
|
|
324
|
+
};
|
|
325
|
+
};
|
|
326
|
+
}>;
|
|
327
|
+
export declare function findPendingInviteByToken(token: string): import(".prisma/client").Prisma.Prisma__SchoolInviteClient<({
|
|
328
|
+
school: {
|
|
329
|
+
name: string;
|
|
330
|
+
id: string;
|
|
331
|
+
};
|
|
332
|
+
} & {
|
|
333
|
+
status: import(".prisma/client").$Enums.SchoolInviteStatus;
|
|
334
|
+
id: string;
|
|
335
|
+
createdAt: Date;
|
|
336
|
+
updatedAt: Date;
|
|
337
|
+
email: string;
|
|
338
|
+
role: import(".prisma/client").$Enums.SchoolMembershipRole;
|
|
339
|
+
schoolId: string;
|
|
340
|
+
token: string;
|
|
341
|
+
expiresAt: Date;
|
|
342
|
+
acceptedAt: Date | null;
|
|
343
|
+
revokedAt: Date | null;
|
|
344
|
+
invitedById: string;
|
|
345
|
+
}) | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
346
|
+
datasources: {
|
|
347
|
+
db: {
|
|
348
|
+
url: string;
|
|
349
|
+
};
|
|
350
|
+
};
|
|
351
|
+
}>;
|
|
352
|
+
export declare function acceptSchoolInvite(inviteId: string, userId: string): Promise<{
|
|
353
|
+
status: import(".prisma/client").$Enums.SchoolMembershipStatus;
|
|
354
|
+
id: string;
|
|
355
|
+
createdAt: Date;
|
|
356
|
+
updatedAt: Date;
|
|
357
|
+
role: import(".prisma/client").$Enums.SchoolMembershipRole;
|
|
358
|
+
schoolId: string;
|
|
359
|
+
userId: string;
|
|
360
|
+
}>;
|
|
361
|
+
//# sourceMappingURL=school.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"school.d.ts","sourceRoot":"/","sources":["models/school.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAyBtD,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;;;;;;;;;;;;;;GAIpE;AAED,wBAAgB,0BAA0B,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;;;;;;;;;;;;;;GAI1E;AAED,wBAAgB,+BAA+B,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;;;;;;;;;;;;;;GAI/E;AAED,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,MAAM;;;;;;;;;;;;;;;;;MAiBvD;AAED,wBAAgB,qBAAqB,CAAC,IAAI,EAAE;IAC1C,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;CAChB;;;;;;;;;;;;;;;;;;;;;;;GAoBA;AAED,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM;;;;;;;;;;;;;GAY7C;AAED,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CjD;AAED,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;MAsBjD;AAED,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM;;;;;;;;;;;;;;;;KAMjD;AAED,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,yDAIjD;AAED,wBAAgB,sBAAsB,CAAC,IAAI,EAAE;IAC3C,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,oBAAoB,CAAC;CAC5B;;;;;;;;;;;;;;GAmBA;AAED,wBAAgB,0BAA0B,CACxC,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,oBAAoB;;;;;;;;;;;;;;GAM3B;AAED,wBAAgB,uCAAuC,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;;;;;;;;GAsBvF;AAED,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,MAAM;;;;;;;;;;GAKrD;AAED,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,MAAM;;;;;;;;;;GAKnD;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE;IACvC,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,oBAAoB,CAAC;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,IAAI,CAAC;CACjB;;;;;;;;;;;;;;;;;;;;;;;;GAOA;AAED,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM;;;;;;;;;;;;;;;;KAsBjD;AAED,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;;;;;;;;;;;;;;;;;;;GAQpE;AAED,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;GAKrD;AAED,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;;;;;;;;GAuClE"}
|